/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source visit the plugins github repository */ /* License obsidian-tasks: MIT License Copyright (c) 2021 Martin Schenck Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* License rrule (included library): rrule.js: Library for working with recurrence rules for calendar dates. ======================================================================= Copyright 2010, Jakub Roztocil 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 Copyright (c) 2012 - Tomi Pieviläinen All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* License chrono-node (included library): The MIT License Copyright (c) 2014, Wanasit Tanakitrungruang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ var ay=Object.create;var yn=Object.defineProperty,oy=Object.defineProperties,uy=Object.getOwnPropertyDescriptor,ly=Object.getOwnPropertyDescriptors,cy=Object.getOwnPropertyNames,Zu=Object.getOwnPropertySymbols,dy=Object.getPrototypeOf,Ku=Object.prototype.hasOwnProperty,fy=Object.prototype.propertyIsEnumerable;var Ju=(n,e,t)=>e in n?yn(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ve=(n,e)=>{for(var t in e||(e={}))Ku.call(e,t)&&Ju(n,t,e[t]);if(Zu)for(var t of Zu(e))fy.call(e,t)&&Ju(n,t,e[t]);return n},cr=(n,e)=>oy(n,ly(e)),Qu=n=>yn(n,"__esModule",{value:!0});var g=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),hy=(n,e)=>{Qu(n);for(var t in e)yn(n,t,{get:e[t],enumerable:!0})},my=(n,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of cy(e))!Ku.call(n,r)&&r!=="default"&&yn(n,r,{get:()=>e[r],enumerable:!(t=uy(e,r))||t.enumerable});return n},$e=n=>my(Qu(yn(n!=null?ay(dy(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var ae=(n,e,t)=>new Promise((r,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?r(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(n,e)).next())});var Ml=g((zE,Si)=>{var al,ol,ul,ll,cl,dl,fl,hl,ml,Pi,Bs,pl,yl,Ir,gl,vl,Tl,_l,bl,wl,Dl,El,kl;(function(n){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(r){n(t(e,t(r)))}):typeof Si=="object"&&typeof Si.exports=="object"?n(t(e,t(Si.exports))):n(t(e));function t(r,i){return r!==e&&(typeof Object.create=="function"?Object.defineProperty(r,"__esModule",{value:!0}):r.__esModule=!0),function(s,a){return r[s]=i?i(s,a):a}}})(function(n){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])};al=function(t,r){e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)},ol=Object.assign||function(t){for(var r,i=1,s=arguments.length;i=0;l--)(u=t[l])&&(o=(a<3?u(o):a>3?u(r,i,o):u(r,i))||o);return a>3&&o&&Object.defineProperty(r,i,o),o},cl=function(t,r){return function(i,s){r(i,s,t)}},dl=function(t,r){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,r)},fl=function(t,r,i,s){function a(o){return o instanceof i?o:new i(function(u){u(o)})}return new(i||(i=Promise))(function(o,u){function l(f){try{c(s.next(f))}catch(h){u(h)}}function d(f){try{c(s.throw(f))}catch(h){u(h)}}function c(f){f.done?o(f.value):a(f.value).then(l,d)}c((s=s.apply(t,r||[])).next())})},hl=function(t,r){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},s,a,o,u;return u={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function l(c){return function(f){return d([c,f])}}function d(c){if(s)throw new TypeError("Generator is already executing.");for(;i;)try{if(s=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,a=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(o=i.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},Bs=function(t,r){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var s=i.call(t),a,o=[],u;try{for(;(r===void 0||r-- >0)&&!(a=s.next()).done;)o.push(a.value)}catch(l){u={error:l}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(u)throw u.error}}return o},pl=function(){for(var t=[],r=0;r1||l(m,p)})})}function l(m,p){try{d(s[m](p))}catch(y){h(o[0][3],y)}}function d(m){m.value instanceof Ir?Promise.resolve(m.value.v).then(c,f):h(o[0][2],m)}function c(m){l("next",m)}function f(m){l("throw",m)}function h(m,p){m(p),o.shift(),o.length&&l(o[0][0],o[0][1])}},vl=function(t){var r,i;return r={},s("next"),s("throw",function(a){throw a}),s("return"),r[Symbol.iterator]=function(){return this},r;function s(a,o){r[a]=t[a]?function(u){return(i=!i)?{value:Ir(t[a](u)),done:a==="return"}:o?o(u):u}:o}},Tl=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=t[Symbol.asyncIterator],i;return r?r.call(t):(t=typeof Pi=="function"?Pi(t):t[Symbol.iterator](),i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i);function s(o){i[o]=t[o]&&function(u){return new Promise(function(l,d){u=t[o](u),a(l,d,u.done,u.value)})}}function a(o,u,l,d){Promise.resolve(d).then(function(c){o({value:c,done:l})},u)}},_l=function(t,r){return Object.defineProperty?Object.defineProperty(t,"raw",{value:r}):t.raw=r,t},bl=function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var i in t)Object.hasOwnProperty.call(t,i)&&(r[i]=t[i]);return r.default=t,r},wl=function(t){return t&&t.__esModule?t:{default:t}},Dl=function(t,r){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return r.get(t)},El=function(t,r,i){if(!r.has(t))throw new TypeError("attempted to set private field on non-instance");return r.set(t,i),i},n("__extends",al),n("__assign",ol),n("__rest",ul),n("__decorate",ll),n("__param",cl),n("__metadata",dl),n("__awaiter",fl),n("__generator",hl),n("__exportStar",ml),n("__createBinding",kl),n("__values",Pi),n("__read",Bs),n("__spread",pl),n("__spreadArrays",yl),n("__await",Ir),n("__asyncGenerator",gl),n("__asyncDelegator",vl),n("__asyncValues",Tl),n("__makeTemplateObject",_l),n("__importStar",bl),n("__importDefault",wl),n("__classPrivateFieldGet",Dl),n("__classPrivateFieldSet",El)})});var Hc=g(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});function Wl(n,e){for(var t=0;t=0)&&(t[i]=n[i]);return t}function xy(n,e){if(!!n){if(typeof n=="string")return Ul(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(t);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ul(n,e)}}function Ul(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t=n.length?{done:!0}:{done:!1,value:n[e++]}};throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return e=n[Symbol.iterator](),e.next.bind(e)}var mr=function(n){it(e,n);function e(){return n.apply(this,arguments)||this}return e}(Vs(Error)),Ay=function(n){it(e,n);function e(t){return n.call(this,"Invalid DateTime: "+t.toMessage())||this}return e}(mr),Ny=function(n){it(e,n);function e(t){return n.call(this,"Invalid Interval: "+t.toMessage())||this}return e}(mr),Cy=function(n){it(e,n);function e(t){return n.call(this,"Invalid Duration: "+t.toMessage())||this}return e}(mr),Dn=function(n){it(e,n);function e(){return n.apply(this,arguments)||this}return e}(mr),Yl=function(n){it(e,n);function e(t){return n.call(this,"Invalid unit "+t)||this}return e}(mr),st=function(n){it(e,n);function e(){return n.apply(this,arguments)||this}return e}(mr),Gt=function(n){it(e,n);function e(){return n.call(this,"Zone is an abstract class")||this}return e}(mr),_="numeric",ft="short",Je="long",Ni={year:_,month:_,day:_},Zs={year:_,month:ft,day:_},ql={year:_,month:ft,day:_,weekday:ft},Ks={year:_,month:Je,day:_},Js={year:_,month:Je,day:_,weekday:Je},Qs={hour:_,minute:_},Xs={hour:_,minute:_,second:_},ea={hour:_,minute:_,second:_,timeZoneName:ft},ta={hour:_,minute:_,second:_,timeZoneName:Je},ra={hour:_,minute:_,hour12:!1},na={hour:_,minute:_,second:_,hour12:!1},ia={hour:_,minute:_,second:_,hour12:!1,timeZoneName:ft},sa={hour:_,minute:_,second:_,hour12:!1,timeZoneName:Je},aa={year:_,month:_,day:_,hour:_,minute:_},oa={year:_,month:_,day:_,hour:_,minute:_,second:_},ua={year:_,month:ft,day:_,hour:_,minute:_},la={year:_,month:ft,day:_,hour:_,minute:_,second:_},jl={year:_,month:ft,day:_,weekday:ft,hour:_,minute:_},ca={year:_,month:Je,day:_,hour:_,minute:_,timeZoneName:ft},da={year:_,month:Je,day:_,hour:_,minute:_,second:_,timeZoneName:ft},fa={year:_,month:Je,day:_,weekday:Je,hour:_,minute:_,timeZoneName:Je},ha={year:_,month:Je,day:_,weekday:Je,hour:_,minute:_,second:_,timeZoneName:Je};function H(n){return typeof n=="undefined"}function pr(n){return typeof n=="number"}function Ci(n){return typeof n=="number"&&n%1==0}function Iy(n){return typeof n=="string"}function Fy(n){return Object.prototype.toString.call(n)==="[object Date]"}function kt(){try{return typeof Intl!="undefined"&&Intl.DateTimeFormat}catch(n){return!1}}function En(){return!H(Intl.DateTimeFormat.prototype.formatToParts)}function $l(){try{return typeof Intl!="undefined"&&!!Intl.RelativeTimeFormat}catch(n){return!1}}function Ly(n){return Array.isArray(n)?n:[n]}function Bl(n,e,t){if(n.length!==0)return n.reduce(function(r,i){var s=[e(i),i];return r&&t(r[0],s[0])===r[0]?r:s},null)[1]}function Hl(n,e){return e.reduce(function(t,r){return t[r]=n[r],t},{})}function Ur(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function Nt(n,e,t){return Ci(n)&&n>=e&&n<=t}function Wy(n,e){return n-e*Math.floor(n/e)}function Yr(n,e){e===void 0&&(e=2);var t=n<0?"-":"",r=t?n*-1:n,i;return r.toString().length=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function Fi(n){var e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,r=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||r===3?53:52}function ga(n){return n>99?n:n>60?1900+n:2e3+n}function Gl(n,e,t,r){r===void 0&&(r=null);var i=new Date(n),s={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);var a=Object.assign({timeZoneName:e},s),o=kt();if(o&&En()){var u=new Intl.DateTimeFormat(t,a).formatToParts(i).find(function(h){return h.type.toLowerCase()==="timezonename"});return u?u.value:null}else if(o){var l=new Intl.DateTimeFormat(t,s).format(i),d=new Intl.DateTimeFormat(t,a).format(i),c=d.substring(l.length),f=c.replace(/^[, \u200e]+/,"");return f}else return null}function Li(n,e){var t=parseInt(n,10);Number.isNaN(t)&&(t=0);var r=parseInt(e,10)||0,i=t<0||Object.is(t,-0)?-r:r;return t*60+i}function zl(n){var e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new st("Invalid unit value "+n);return e}function Wi(n,e,t){var r={};for(var i in n)if(Ur(n,i)){if(t.indexOf(i)>=0)continue;var s=n[i];if(s==null)continue;r[e(i)]=zl(s)}return r}function Ui(n,e){var t=Math.trunc(Math.abs(n/60)),r=Math.trunc(Math.abs(n%60)),i=n>=0?"+":"-";switch(e){case"short":return""+i+Yr(t,2)+":"+Yr(r,2);case"narrow":return""+i+t+(r>0?":"+r:"");case"techie":return""+i+Yr(t,2)+Yr(r,2);default:throw new RangeError("Value format "+e+" is out of range for property format")}}function Yi(n){return Hl(n,["hour","minute","second","millisecond"])}var Vl=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function oe(n){return JSON.stringify(n,Object.keys(n).sort())}var Uy=["January","February","March","April","May","June","July","August","September","October","November","December"],Zl=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Yy=["J","F","M","A","M","J","J","A","S","O","N","D"];function Kl(n){switch(n){case"narrow":return[].concat(Yy);case"short":return[].concat(Zl);case"long":return[].concat(Uy);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var Jl=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ql=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],qy=["M","T","W","T","F","S","S"];function Xl(n){switch(n){case"narrow":return[].concat(qy);case"short":return[].concat(Ql);case"long":return[].concat(Jl);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var ec=["AM","PM"],jy=["Before Christ","Anno Domini"],$y=["BC","AD"],By=["B","A"];function tc(n){switch(n){case"narrow":return[].concat(By);case"short":return[].concat($y);case"long":return[].concat(jy);default:return null}}function Hy(n){return ec[n.hour<12?0:1]}function Gy(n,e){return Xl(e)[n.weekday-1]}function zy(n,e){return Kl(e)[n.month-1]}function Vy(n,e){return tc(e)[n.year<0?0:1]}function Zy(n,e,t,r){t===void 0&&(t="always"),r===void 0&&(r=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&s){var a=n==="days";switch(e){case 1:return a?"tomorrow":"next "+i[n][0];case-1:return a?"yesterday":"last "+i[n][0];case 0:return a?"today":"this "+i[n][0]}}var o=Object.is(e,-0)||e<0,u=Math.abs(e),l=u===1,d=i[n],c=r?l?d[1]:d[2]||d[1]:l?i[n][0]:n;return o?u+" "+c+" ago":"in "+u+" "+c}function Ky(n){var e=Hl(n,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]),t=oe(e),r="EEEE, LLLL d, yyyy, h:mm a";switch(t){case oe(Ni):return"M/d/yyyy";case oe(Zs):return"LLL d, yyyy";case oe(ql):return"EEE, LLL d, yyyy";case oe(Ks):return"LLLL d, yyyy";case oe(Js):return"EEEE, LLLL d, yyyy";case oe(Qs):return"h:mm a";case oe(Xs):return"h:mm:ss a";case oe(ea):return"h:mm a";case oe(ta):return"h:mm a";case oe(ra):return"HH:mm";case oe(na):return"HH:mm:ss";case oe(ia):return"HH:mm";case oe(sa):return"HH:mm";case oe(aa):return"M/d/yyyy, h:mm a";case oe(ua):return"LLL d, yyyy, h:mm a";case oe(ca):return"LLLL d, yyyy, h:mm a";case oe(fa):return r;case oe(oa):return"M/d/yyyy, h:mm:ss a";case oe(la):return"LLL d, yyyy, h:mm:ss a";case oe(jl):return"EEE, d LLL yyyy, h:mm a";case oe(da):return"LLLL d, yyyy, h:mm:ss a";case oe(ha):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return r}}function rc(n,e){for(var t="",r=Ht(n),i;!(i=r()).done;){var s=i.value;s.literal?t+=s.val:t+=e(s.val)}return t}var Jy={D:Ni,DD:Zs,DDD:Ks,DDDD:Js,t:Qs,tt:Xs,ttt:ea,tttt:ta,T:ra,TT:na,TTT:ia,TTTT:sa,f:aa,ff:ua,fff:ca,ffff:fa,F:oa,FF:la,FFF:da,FFFF:ha},Mt=function(){n.create=function(r,i){return i===void 0&&(i={}),new n(r,i)},n.parseFormat=function(r){for(var i=null,s="",a=!1,o=[],u=0;u0&&o.push({literal:a,val:s}),i=null,s="",a=!a):a||l===i?s+=l:(s.length>0&&o.push({literal:!1,val:s}),s=l,i=l)}return s.length>0&&o.push({literal:a,val:s}),o},n.macroTokenToFormatOpts=function(r){return Jy[r]};function n(t,r){this.opts=r,this.loc=t,this.systemLoc=null}var e=n.prototype;return e.formatWithSystemDefault=function(r,i){this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem());var s=this.systemLoc.dtFormatter(r,Object.assign({},this.opts,i));return s.format()},e.formatDateTime=function(r,i){i===void 0&&(i={});var s=this.loc.dtFormatter(r,Object.assign({},this.opts,i));return s.format()},e.formatDateTimeParts=function(r,i){i===void 0&&(i={});var s=this.loc.dtFormatter(r,Object.assign({},this.opts,i));return s.formatToParts()},e.resolvedOptions=function(r,i){i===void 0&&(i={});var s=this.loc.dtFormatter(r,Object.assign({},this.opts,i));return s.resolvedOptions()},e.num=function(r,i){if(i===void 0&&(i=0),this.opts.forceSimple)return Yr(r,i);var s=Object.assign({},this.opts);return i>0&&(s.padTo=i),this.loc.numberFormatter(s).format(r)},e.formatDateTimeFromString=function(r,i){var s=this,a=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory"&&En(),u=function(v,A){return s.loc.extract(r,v,A)},l=function(v){return r.isOffsetFixed&&r.offset===0&&v.allowZ?"Z":r.isValid?r.zone.formatOffset(r.ts,v.format):""},d=function(){return a?Hy(r):u({hour:"numeric",hour12:!0},"dayperiod")},c=function(v,A){return a?zy(r,v):u(A?{month:v}:{month:v,day:"numeric"},"month")},f=function(v,A){return a?Gy(r,v):u(A?{weekday:v}:{weekday:v,month:"long",day:"numeric"},"weekday")},h=function(v){var A=n.macroTokenToFormatOpts(v);return A?s.formatWithSystemDefault(r,A):v},m=function(v){return a?Vy(r,v):u({era:v},"era")},p=function(v){switch(v){case"S":return s.num(r.millisecond);case"u":case"SSS":return s.num(r.millisecond,3);case"s":return s.num(r.second);case"ss":return s.num(r.second,2);case"m":return s.num(r.minute);case"mm":return s.num(r.minute,2);case"h":return s.num(r.hour%12==0?12:r.hour%12);case"hh":return s.num(r.hour%12==0?12:r.hour%12,2);case"H":return s.num(r.hour);case"HH":return s.num(r.hour,2);case"Z":return l({format:"narrow",allowZ:s.opts.allowZ});case"ZZ":return l({format:"short",allowZ:s.opts.allowZ});case"ZZZ":return l({format:"techie",allowZ:s.opts.allowZ});case"ZZZZ":return r.zone.offsetName(r.ts,{format:"short",locale:s.loc.locale});case"ZZZZZ":return r.zone.offsetName(r.ts,{format:"long",locale:s.loc.locale});case"z":return r.zoneName;case"a":return d();case"d":return o?u({day:"numeric"},"day"):s.num(r.day);case"dd":return o?u({day:"2-digit"},"day"):s.num(r.day,2);case"c":return s.num(r.weekday);case"ccc":return f("short",!0);case"cccc":return f("long",!0);case"ccccc":return f("narrow",!0);case"E":return s.num(r.weekday);case"EEE":return f("short",!1);case"EEEE":return f("long",!1);case"EEEEE":return f("narrow",!1);case"L":return o?u({month:"numeric",day:"numeric"},"month"):s.num(r.month);case"LL":return o?u({month:"2-digit",day:"numeric"},"month"):s.num(r.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return o?u({month:"numeric"},"month"):s.num(r.month);case"MM":return o?u({month:"2-digit"},"month"):s.num(r.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return o?u({year:"numeric"},"year"):s.num(r.year);case"yy":return o?u({year:"2-digit"},"year"):s.num(r.year.toString().slice(-2),2);case"yyyy":return o?u({year:"numeric"},"year"):s.num(r.year,4);case"yyyyyy":return o?u({year:"numeric"},"year"):s.num(r.year,6);case"G":return m("short");case"GG":return m("long");case"GGGGG":return m("narrow");case"kk":return s.num(r.weekYear.toString().slice(-2),2);case"kkkk":return s.num(r.weekYear,4);case"W":return s.num(r.weekNumber);case"WW":return s.num(r.weekNumber,2);case"o":return s.num(r.ordinal);case"ooo":return s.num(r.ordinal,3);case"q":return s.num(r.quarter);case"qq":return s.num(r.quarter,2);case"X":return s.num(Math.floor(r.ts/1e3));case"x":return s.num(r.ts);default:return h(v)}};return rc(n.parseFormat(i),p)},e.formatDurationFromString=function(r,i){var s=this,a=function(f){switch(f[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},o=function(f){return function(h){var m=a(h);return m?s.num(f.get(m),h.length):h}},u=n.parseFormat(i),l=u.reduce(function(c,f){var h=f.literal,m=f.val;return h?c:c.concat(m)},[]),d=r.shiftTo.apply(r,l.map(a).filter(function(c){return c}));return rc(u,o(d))},n}(),ht=function(){function n(t,r){this.reason=t,this.explanation=r}var e=n.prototype;return e.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},n}(),qr=function(){function n(){}var e=n.prototype;return e.offsetName=function(r,i){throw new Gt},e.formatOffset=function(r,i){throw new Gt},e.offset=function(r){throw new Gt},e.equals=function(r){throw new Gt},dt(n,[{key:"type",get:function(){throw new Gt}},{key:"name",get:function(){throw new Gt}},{key:"universal",get:function(){throw new Gt}},{key:"isValid",get:function(){throw new Gt}}]),n}(),va=null,nc=function(n){it(e,n);function e(){return n.apply(this,arguments)||this}var t=e.prototype;return t.offsetName=function(i,s){var a=s.format,o=s.locale;return Gl(i,a,o)},t.formatOffset=function(i,s){return Ui(this.offset(i),s)},t.offset=function(i){return-new Date(i).getTimezoneOffset()},t.equals=function(i){return i.type==="local"},dt(e,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return kt()?new Intl.DateTimeFormat().resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return va===null&&(va=new e),va}}]),e}(qr),Qy=RegExp("^"+Vl.source+"$"),qi={};function Xy(n){return qi[n]||(qi[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),qi[n]}var eg={year:0,month:1,day:2,hour:3,minute:4,second:5};function tg(n,e){var t=n.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(t),i=r[1],s=r[2],a=r[3],o=r[4],u=r[5],l=r[6];return[a,i,s,o,u,l]}function rg(n,e){for(var t=n.formatToParts(e),r=[],i=0;i=0?v:1e3+v,(p-y)/(60*1e3)},t.equals=function(i){return i.type==="iana"&&i.name===this.name},dt(e,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),e}(qr),Ta=null,Qe=function(n){it(e,n),e.instance=function(i){return i===0?e.utcInstance:new e(i)},e.parseSpecifier=function(i){if(i){var s=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(s)return new e(Li(s[1],s[2]))}return null},dt(e,null,[{key:"utcInstance",get:function(){return Ta===null&&(Ta=new e(0)),Ta}}]);function e(r){var i;return i=n.call(this)||this,i.fixed=r,i}var t=e.prototype;return t.offsetName=function(){return this.name},t.formatOffset=function(i,s){return Ui(this.fixed,s)},t.offset=function(){return this.fixed},t.equals=function(i){return i.type==="fixed"&&i.fixed===this.fixed},dt(e,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return this.fixed===0?"UTC":"UTC"+Ui(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),e}(qr),_a=function(n){it(e,n);function e(r){var i;return i=n.call(this)||this,i.zoneName=r,i}var t=e.prototype;return t.offsetName=function(){return null},t.formatOffset=function(){return""},t.offset=function(){return NaN},t.equals=function(){return!1},dt(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(qr);function yr(n,e){var t;if(H(n)||n===null)return e;if(n instanceof qr)return n;if(Iy(n)){var r=n.toLowerCase();return r==="local"?e:r==="utc"||r==="gmt"?Qe.utcInstance:(t=Ot.parseGMTOffset(n))!=null?Qe.instance(t):Ot.isValidSpecifier(r)?Ot.create(n):Qe.parseSpecifier(r)||new _a(n)}else return pr(n)?Qe.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new _a(n)}var ic=function(){return Date.now()},ba=null,sc=null,ac=null,oc=null,uc=!1,fe=function(){function n(){}return n.resetCaches=function(){_e.resetCache(),Ot.resetCache()},dt(n,null,[{key:"now",get:function(){return ic},set:function(t){ic=t}},{key:"defaultZoneName",get:function(){return n.defaultZone.name},set:function(t){t?ba=yr(t):ba=null}},{key:"defaultZone",get:function(){return ba||nc.instance}},{key:"defaultLocale",get:function(){return sc},set:function(t){sc=t}},{key:"defaultNumberingSystem",get:function(){return ac},set:function(t){ac=t}},{key:"defaultOutputCalendar",get:function(){return oc},set:function(t){oc=t}},{key:"throwOnInvalid",get:function(){return uc},set:function(t){uc=t}}]),n}(),wa={};function Da(n,e){e===void 0&&(e={});var t=JSON.stringify([n,e]),r=wa[t];return r||(r=new Intl.DateTimeFormat(n,e),wa[t]=r),r}var Ea={};function ng(n,e){e===void 0&&(e={});var t=JSON.stringify([n,e]),r=Ea[t];return r||(r=new Intl.NumberFormat(n,e),Ea[t]=r),r}var ka={};function ig(n,e){e===void 0&&(e={});var t=e,r=t.base,i=Sy(t,["base"]),s=JSON.stringify([n,i]),a=ka[s];return a||(a=new Intl.RelativeTimeFormat(n,e),ka[s]=a),a}var gr=null;function sg(){if(gr)return gr;if(kt()){var n=new Intl.DateTimeFormat().resolvedOptions().locale;return gr=!n||n==="und"?"en-US":n,gr}else return gr="en-US",gr}function ag(n){var e=n.indexOf("-u-");if(e===-1)return[n];var t,r=n.substring(0,e);try{t=Da(n).resolvedOptions()}catch(o){t=Da(r).resolvedOptions()}var i=t,s=i.numberingSystem,a=i.calendar;return[r,s,a]}function og(n,e,t){return kt()?((t||e)&&(n+="-u",t&&(n+="-ca-"+t),e&&(n+="-nu-"+e)),n):[]}function ug(n){for(var e=[],t=1;t<=12;t++){var r=pe.utc(2016,t,1);e.push(n(r))}return e}function lg(n){for(var e=[],t=1;t<=7;t++){var r=pe.utc(2016,11,13+t);e.push(n(r))}return e}function $i(n,e,t,r,i){var s=n.listingMode(t);return s==="error"?null:s==="en"?r(e):i(e)}function cg(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||kt()&&new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}var dg=function(){function n(t,r,i){if(this.padTo=i.padTo||0,this.floor=i.floor||!1,!r&&kt()){var s={useGrouping:!1};i.padTo>0&&(s.minimumIntegerDigits=i.padTo),this.inf=ng(t,s)}}var e=n.prototype;return e.format=function(r){if(this.inf){var i=this.floor?Math.floor(r):r;return this.inf.format(i)}else{var s=this.floor?Math.floor(r):pa(r,3);return Yr(s,this.padTo)}},n}(),fg=function(){function n(t,r,i){this.opts=i,this.hasIntl=kt();var s;if(t.zone.universal&&this.hasIntl){var a=-1*(t.offset/60),o=a>=0?"Etc/GMT+"+a:"Etc/GMT"+a,u=Ot.isValidZone(o);t.offset!==0&&u?(s=o,this.dt=t):(s="UTC",i.timeZoneName?this.dt=t:this.dt=t.offset===0?t:pe.fromMillis(t.ts+t.offset*60*1e3))}else t.zone.type==="local"?this.dt=t:(this.dt=t,s=t.zone.name);if(this.hasIntl){var l=Object.assign({},this.opts);s&&(l.timeZone=s),this.dtf=Da(r,l)}}var e=n.prototype;return e.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var r=Ky(this.opts),i=_e.create("en-US");return Mt.create(i).formatDateTimeFromString(this.dt,r)},e.formatToParts=function(){return this.hasIntl&&En()?this.dtf.formatToParts(this.dt.toJSDate()):[]},e.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},n}(),hg=function(){function n(t,r,i){this.opts=Object.assign({style:"long"},i),!r&&$l()&&(this.rtf=ig(t,i))}var e=n.prototype;return e.format=function(r,i){return this.rtf?this.rtf.format(r,i):Zy(i,r,this.opts.numeric,this.opts.style!=="long")},e.formatToParts=function(r,i){return this.rtf?this.rtf.formatToParts(r,i):[]},n}(),_e=function(){n.fromOpts=function(r){return n.create(r.locale,r.numberingSystem,r.outputCalendar,r.defaultToEN)},n.create=function(r,i,s,a){a===void 0&&(a=!1);var o=r||fe.defaultLocale,u=o||(a?"en-US":sg()),l=i||fe.defaultNumberingSystem,d=s||fe.defaultOutputCalendar;return new n(u,l,d,o)},n.resetCache=function(){gr=null,wa={},Ea={},ka={}},n.fromObject=function(r){var i=r===void 0?{}:r,s=i.locale,a=i.numberingSystem,o=i.outputCalendar;return n.create(s,a,o)};function n(t,r,i,s){var a=ag(t),o=a[0],u=a[1],l=a[2];this.locale=o,this.numberingSystem=r||u||null,this.outputCalendar=i||l||null,this.intl=og(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}var e=n.prototype;return e.listingMode=function(r){r===void 0&&(r=!0);var i=kt(),s=i&&En(),a=this.isEnglish(),o=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return!s&&!(a&&o)&&!r?"error":!s||a&&o?"en":"intl"},e.clone=function(r){return!r||Object.getOwnPropertyNames(r).length===0?this:n.create(r.locale||this.specifiedLocale,r.numberingSystem||this.numberingSystem,r.outputCalendar||this.outputCalendar,r.defaultToEN||!1)},e.redefaultToEN=function(r){return r===void 0&&(r={}),this.clone(Object.assign({},r,{defaultToEN:!0}))},e.redefaultToSystem=function(r){return r===void 0&&(r={}),this.clone(Object.assign({},r,{defaultToEN:!1}))},e.months=function(r,i,s){var a=this;return i===void 0&&(i=!1),s===void 0&&(s=!0),$i(this,r,s,Kl,function(){var o=i?{month:r,day:"numeric"}:{month:r},u=i?"format":"standalone";return a.monthsCache[u][r]||(a.monthsCache[u][r]=ug(function(l){return a.extract(l,o,"month")})),a.monthsCache[u][r]})},e.weekdays=function(r,i,s){var a=this;return i===void 0&&(i=!1),s===void 0&&(s=!0),$i(this,r,s,Xl,function(){var o=i?{weekday:r,year:"numeric",month:"long",day:"numeric"}:{weekday:r},u=i?"format":"standalone";return a.weekdaysCache[u][r]||(a.weekdaysCache[u][r]=lg(function(l){return a.extract(l,o,"weekday")})),a.weekdaysCache[u][r]})},e.meridiems=function(r){var i=this;return r===void 0&&(r=!0),$i(this,void 0,r,function(){return ec},function(){if(!i.meridiemCache){var s={hour:"numeric",hour12:!0};i.meridiemCache=[pe.utc(2016,11,13,9),pe.utc(2016,11,13,19)].map(function(a){return i.extract(a,s,"dayperiod")})}return i.meridiemCache})},e.eras=function(r,i){var s=this;return i===void 0&&(i=!0),$i(this,r,i,tc,function(){var a={era:r};return s.eraCache[r]||(s.eraCache[r]=[pe.utc(-40,1,1),pe.utc(2017,1,1)].map(function(o){return s.extract(o,a,"era")})),s.eraCache[r]})},e.extract=function(r,i,s){var a=this.dtFormatter(r,i),o=a.formatToParts(),u=o.find(function(l){return l.type.toLowerCase()===s});return u?u.value:null},e.numberFormatter=function(r){return r===void 0&&(r={}),new dg(this.intl,r.forceSimple||this.fastNumbers,r)},e.dtFormatter=function(r,i){return i===void 0&&(i={}),new fg(r,this.intl,i)},e.relFormatter=function(r){return r===void 0&&(r={}),new hg(this.intl,this.isEnglish(),r)},e.isEnglish=function(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||kt()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(r){return this.locale===r.locale&&this.numberingSystem===r.numberingSystem&&this.outputCalendar===r.outputCalendar},dt(n,[{key:"fastNumbers",get:function(){return this.fastNumbersCached==null&&(this.fastNumbersCached=cg(this)),this.fastNumbersCached}}]),n}();function jr(){for(var n=arguments.length,e=new Array(n),t=0;t1?e-1:0),r=1;r3?Jl.indexOf(n)+1:Ql.indexOf(n)+1),o}var kg=/^(?:(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\d)(\d\d)))$/;function Mg(n){var e=n[1],t=n[2],r=n[3],i=n[4],s=n[5],a=n[6],o=n[7],u=n[8],l=n[9],d=n[10],c=n[11],f=Ra(e,i,r,t,s,a,o),h;return u?h=Eg[u]:l?h=0:h=Li(d,c),[f,new Qe(h)]}function Og(n){return n.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var Rg=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Pg=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Sg=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function pc(n){var e=n[1],t=n[2],r=n[3],i=n[4],s=n[5],a=n[6],o=n[7],u=Ra(e,i,r,t,s,a,o);return[u,Qe.utcInstance]}function xg(n){var e=n[1],t=n[2],r=n[3],i=n[4],s=n[5],a=n[6],o=n[7],u=Ra(e,o,t,r,i,s,a);return[u,Qe.utcInstance]}var Ag=jr(mg,Oa),Ng=jr(pg,Oa),Cg=jr(yg,Oa),Ig=jr(dc),Fg=vr(hc,Tr,Hr),Lg=vr(gg,Tr,Hr),Wg=vr(vg,Tr,Hr),Ug=vr(Tr,Hr);function Yg(n){return $r(n,[Ag,Fg],[Ng,Lg],[Cg,Wg],[Ig,Ug])}function qg(n){return $r(Og(n),[kg,Mg])}function jg(n){return $r(n,[Rg,pc],[Pg,pc],[Sg,xg])}function $g(n){return $r(n,[wg,Dg])}var Bg=vr(Tr);function Hg(n){return $r(n,[bg,Bg])}var Gg=jr(Tg,_g),zg=jr(fc),Vg=vr(hc,Tr,Hr,mc),Zg=vr(Tr,Hr,mc);function Kg(n){return $r(n,[Gg,Vg],[zg,Zg])}var Jg="Invalid Duration",yc={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Qg=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3}},yc),at=146097/400,Gr=146097/4800,Xg=Object.assign({years:{quarters:4,months:12,weeks:at/7,days:at,hours:at*24,minutes:at*24*60,seconds:at*24*60*60,milliseconds:at*24*60*60*1e3},quarters:{months:3,weeks:at/28,days:at/4,hours:at*24/4,minutes:at*24*60/4,seconds:at*24*60*60/4,milliseconds:at*24*60*60*1e3/4},months:{weeks:Gr/7,days:Gr,hours:Gr*24,minutes:Gr*24*60,seconds:Gr*24*60*60,milliseconds:Gr*24*60*60*1e3}},yc),zr=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ev=zr.slice(0).reverse();function _r(n,e,t){t===void 0&&(t=!1);var r={values:t?e.values:Object.assign({},n.values,e.values||{}),loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new qe(r)}function tv(n){return n<0?Math.floor(n):Math.ceil(n)}function gc(n,e,t,r,i){var s=n[i][t],a=e[t]/s,o=Math.sign(a)===Math.sign(r[i]),u=!o&&r[i]!==0&&Math.abs(a)<=1?tv(a):Math.trunc(a);r[i]+=u,e[t]-=u*s}function rv(n,e){ev.reduce(function(t,r){return H(e[r])?t:(t&&gc(n,e,t,e,r),r)},null)}var qe=function(){function n(t){var r=t.conversionAccuracy==="longterm"||!1;this.values=t.values,this.loc=t.loc||_e.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r?Xg:Qg,this.isLuxonDuration=!0}n.fromMillis=function(r,i){return n.fromObject(Object.assign({milliseconds:r},i))},n.fromObject=function(r){if(r==null||typeof r!="object")throw new st("Duration.fromObject: argument expected to be an object, got "+(r===null?"null":typeof r));return new n({values:Wi(r,n.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:_e.fromObject(r),conversionAccuracy:r.conversionAccuracy})},n.fromISO=function(r,i){var s=$g(r),a=s[0];if(a){var o=Object.assign(a,i);return n.fromObject(o)}else return n.invalid("unparsable",'the input "'+r+`" can't be parsed as ISO 8601`)},n.fromISOTime=function(r,i){var s=Hg(r),a=s[0];if(a){var o=Object.assign(a,i);return n.fromObject(o)}else return n.invalid("unparsable",'the input "'+r+`" can't be parsed as ISO 8601`)},n.invalid=function(r,i){if(i===void 0&&(i=null),!r)throw new st("need to specify a reason the Duration is invalid");var s=r instanceof ht?r:new ht(r,i);if(fe.throwOnInvalid)throw new Cy(s);return new n({invalid:s})},n.normalizeUnit=function(r){var i={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[r&&r.toLowerCase()];if(!i)throw new Yl(r);return i},n.isDuration=function(r){return r&&r.isLuxonDuration||!1};var e=n.prototype;return e.toFormat=function(r,i){i===void 0&&(i={});var s=Object.assign({},i,{floor:i.round!==!1&&i.floor!==!1});return this.isValid?Mt.create(this.loc,s).formatDurationFromString(this,r):Jg},e.toObject=function(r){if(r===void 0&&(r={}),!this.isValid)return{};var i=Object.assign({},this.values);return r.includeConfig&&(i.conversionAccuracy=this.conversionAccuracy,i.numberingSystem=this.loc.numberingSystem,i.locale=this.loc.locale),i},e.toISO=function(){if(!this.isValid)return null;var r="P";return this.years!==0&&(r+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(r+=this.months+this.quarters*3+"M"),this.weeks!==0&&(r+=this.weeks+"W"),this.days!==0&&(r+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(r+="T"),this.hours!==0&&(r+=this.hours+"H"),this.minutes!==0&&(r+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(r+=pa(this.seconds+this.milliseconds/1e3,3)+"S"),r==="P"&&(r+="T0S"),r},e.toISOTime=function(r){if(r===void 0&&(r={}),!this.isValid)return null;var i=this.toMillis();if(i<0||i>=864e5)return null;r=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},r);var s=this.shiftTo("hours","minutes","seconds","milliseconds"),a=r.format==="basic"?"hhmm":"hh:mm";(!r.suppressSeconds||s.seconds!==0||s.milliseconds!==0)&&(a+=r.format==="basic"?"ss":":ss",(!r.suppressMilliseconds||s.milliseconds!==0)&&(a+=".SSS"));var o=s.toFormat(a);return r.includePrefix&&(o="T"+o),o},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.toMillis=function(){return this.as("milliseconds")},e.valueOf=function(){return this.toMillis()},e.plus=function(r){if(!this.isValid)return this;for(var i=br(r),s={},a=Ht(zr),o;!(o=a()).done;){var u=o.value;(Ur(i.values,u)||Ur(this.values,u))&&(s[u]=i.get(u)+this.get(u))}return _r(this,{values:s},!0)},e.minus=function(r){if(!this.isValid)return this;var i=br(r);return this.plus(i.negate())},e.mapUnits=function(r){if(!this.isValid)return this;for(var i={},s=0,a=Object.keys(this.values);s=0){l=f;var h=0;for(var m in o)h+=this.matrix[m][f]*o[m],o[m]=0;pr(u[f])&&(h+=u[f]);var p=Math.trunc(h);a[f]=p,o[f]=h-p;for(var y in u)zr.indexOf(y)>zr.indexOf(f)&&gc(this.matrix,u,y,a,f)}else pr(u[f])&&(o[f]=u[f])}for(var v in o)o[v]!==0&&(a[l]+=v===l?o[v]:o[v]/this.matrix[l][v]);return _r(this,{values:a},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var r={},i=0,s=Object.keys(this.values);ir:!1},e.isBefore=function(r){return this.isValid?this.e<=r:!1},e.contains=function(r){return this.isValid?this.s<=r&&this.e>r:!1},e.set=function(r){var i=r===void 0?{}:r,s=i.start,a=i.end;return this.isValid?n.fromDateTimes(s||this.s,a||this.e):this},e.splitAt=function(){var r=this;if(!this.isValid)return[];for(var i=arguments.length,s=new Array(i),a=0;a+this.e?this.e:c;u.push(n.fromDateTimes(l,f)),l=f,d+=1}return u},e.splitBy=function(r){var i=br(r);if(!this.isValid||!i.isValid||i.as("milliseconds")===0)return[];for(var s=this.s,a=1,o,u=[];s+this.e?this.e:l,u.push(n.fromDateTimes(s,o)),s=o,a+=1}return u},e.divideEqually=function(r){return this.isValid?this.splitBy(this.length()/r).slice(0,r):[]},e.overlaps=function(r){return this.e>r.s&&this.s=r.e:!1},e.equals=function(r){return!this.isValid||!r.isValid?!1:this.s.equals(r.s)&&this.e.equals(r.e)},e.intersection=function(r){if(!this.isValid)return this;var i=this.s>r.s?this.s:r.s,s=this.e=s?null:n.fromDateTimes(i,s)},e.union=function(r){if(!this.isValid)return this;var i=this.sr.e?this.e:r.e;return n.fromDateTimes(i,s)},n.merge=function(r){var i=r.sort(function(o,u){return o.s-u.s}).reduce(function(o,u){var l=o[0],d=o[1];return d?d.overlaps(u)||d.abutsStart(u)?[l,d.union(u)]:[l.concat([d]),u]:[l,u]},[[],null]),s=i[0],a=i[1];return a&&s.push(a),s},n.xor=function(r){for(var i,s=null,a=0,o=[],u=r.map(function(m){return[{time:m.s,type:"s"},{time:m.e,type:"e"}]}),l=(i=Array.prototype).concat.apply(i,u),d=l.sort(function(m,p){return m.time-p.time}),c=Ht(d),f;!(f=c()).done;){var h=f.value;a+=h.type==="s"?1:-1,a===1?s=h.time:(s&&+s!=+h.time&&o.push(n.fromDateTimes(s,h.time)),s=null)}return n.merge(o)},e.difference=function(){for(var r=this,i=arguments.length,s=new Array(i),a=0;a=0){var f;s=d;var h=c(n,e);if(a=n.plus((f={},f[d]=h,f)),a>e){var m;n=n.plus((m={},m[d]=h-1,m)),h-=1}else n=a;i[d]=h}}return[n,i,a,s]}function sv(n,e,t,r){var i=iv(n,e,t),s=i[0],a=i[1],o=i[2],u=i[3],l=e-s,d=t.filter(function(m){return["hours","minutes","seconds","milliseconds"].indexOf(m)>=0});if(d.length===0){if(o0){var h;return(h=qe.fromMillis(l,r)).shiftTo.apply(h,d).plus(f)}else return f}var Pa={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},Tc={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},av=Pa.hanidec.replace(/[\[|\]]/g,"").split("");function ov(n){var e=parseInt(n,10);if(isNaN(e)){e="";for(var t=0;t=a&&r<=o&&(e+=r-a)}}return parseInt(e,10)}else return e}function mt(n,e){var t=n.numberingSystem;return e===void 0&&(e=""),new RegExp(""+Pa[t||"latn"]+e)}var uv="missing Intl.DateTimeFormat.formatToParts support";function J(n,e){return e===void 0&&(e=function(r){return r}),{regex:n,deser:function(r){var i=r[0];return e(ov(i))}}}var lv=String.fromCharCode(160),_c="( |"+lv+")",bc=new RegExp(_c,"g");function cv(n){return n.replace(/\./g,"\\.?").replace(bc,_c)}function wc(n){return n.replace(/\./g,"").replace(bc," ").toLowerCase()}function pt(n,e){return n===null?null:{regex:RegExp(n.map(cv).join("|")),deser:function(r){var i=r[0];return n.findIndex(function(s){return wc(i)===wc(s)})+e}}}function Dc(n,e){return{regex:n,deser:function(r){var i=r[1],s=r[2];return Li(i,s)},groups:e}}function Ec(n){return{regex:n,deser:function(t){var r=t[0];return r}}}function dv(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function fv(n,e){var t=mt(e),r=mt(e,"{2}"),i=mt(e,"{3}"),s=mt(e,"{4}"),a=mt(e,"{6}"),o=mt(e,"{1,2}"),u=mt(e,"{1,3}"),l=mt(e,"{1,6}"),d=mt(e,"{1,9}"),c=mt(e,"{2,4}"),f=mt(e,"{4,6}"),h=function(v){return{regex:RegExp(dv(v.val)),deser:function(X){var W=X[0];return W},literal:!0}},m=function(v){if(n.literal)return h(v);switch(v.val){case"G":return pt(e.eras("short",!1),0);case"GG":return pt(e.eras("long",!1),0);case"y":return J(l);case"yy":return J(c,ga);case"yyyy":return J(s);case"yyyyy":return J(f);case"yyyyyy":return J(a);case"M":return J(o);case"MM":return J(r);case"MMM":return pt(e.months("short",!0,!1),1);case"MMMM":return pt(e.months("long",!0,!1),1);case"L":return J(o);case"LL":return J(r);case"LLL":return pt(e.months("short",!1,!1),1);case"LLLL":return pt(e.months("long",!1,!1),1);case"d":return J(o);case"dd":return J(r);case"o":return J(u);case"ooo":return J(i);case"HH":return J(r);case"H":return J(o);case"hh":return J(r);case"h":return J(o);case"mm":return J(r);case"m":return J(o);case"q":return J(o);case"qq":return J(r);case"s":return J(o);case"ss":return J(r);case"S":return J(u);case"SSS":return J(i);case"u":return Ec(d);case"a":return pt(e.meridiems(),0);case"kkkk":return J(s);case"kk":return J(c,ga);case"W":return J(o);case"WW":return J(r);case"E":case"c":return J(t);case"EEE":return pt(e.weekdays("short",!1,!1),1);case"EEEE":return pt(e.weekdays("long",!1,!1),1);case"ccc":return pt(e.weekdays("short",!0,!1),1);case"cccc":return pt(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Dc(new RegExp("([+-]"+o.source+")(?::("+r.source+"))?"),2);case"ZZZ":return Dc(new RegExp("([+-]"+o.source+")("+r.source+")?"),2);case"z":return Ec(/[a-z_+-/]{1,256}?/i);default:return h(v)}},p=m(n)||{invalidReason:uv};return p.token=n,p}var hv={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function mv(n,e,t){var r=n.type,i=n.value;if(r==="literal")return{literal:!0,val:i};var s=t[r],a=hv[r];if(typeof a=="object"&&(a=a[s]),a)return{literal:!1,val:a}}function pv(n){var e=n.map(function(t){return t.regex}).reduce(function(t,r){return t+"("+r.source+")"},"");return["^"+e+"$",n]}function yv(n,e,t){var r=n.match(e);if(r){var i={},s=1;for(var a in t)if(Ur(t,a)){var o=t[a],u=o.groups?o.groups+1:1;!o.literal&&o.token&&(i[o.token.val[0]]=o.deser(r.slice(s,s+u))),s+=u}return[r,i]}else return[r,{}]}function gv(n){var e=function(s){switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},t;H(n.Z)?H(n.z)?t=null:t=Ot.create(n.z):t=new Qe(n.Z),H(n.q)||(n.M=(n.q-1)*3+1),H(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),H(n.u)||(n.S=ma(n.u));var r=Object.keys(n).reduce(function(i,s){var a=e(s);return a&&(i[a]=n[s]),i},{});return[r,t]}var Sa=null;function vv(){return Sa||(Sa=pe.fromMillis(1555555555555)),Sa}function Tv(n,e){if(n.literal)return n;var t=Mt.macroTokenToFormatOpts(n.val);if(!t)return n;var r=Mt.create(e,t),i=r.formatDateTimeParts(vv()),s=i.map(function(a){return mv(a,e,t)});return s.includes(void 0)?n:s}function _v(n,e){var t;return(t=Array.prototype).concat.apply(t,n.map(function(r){return Tv(r,e)}))}function kc(n,e,t){var r=_v(Mt.parseFormat(t),n),i=r.map(function(y){return fv(y,n)}),s=i.find(function(y){return y.invalidReason});if(s)return{input:e,tokens:r,invalidReason:s.invalidReason};var a=pv(i),o=a[0],u=a[1],l=RegExp(o,"i"),d=yv(e,l,u),c=d[0],f=d[1],h=f?gv(f):[null,null],m=h[0],p=h[1];if(Ur(f,"a")&&Ur(f,"H"))throw new Dn("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:r,regex:l,rawMatches:c,matches:f,result:m,zone:p}}function bv(n,e,t){var r=kc(n,e,t),i=r.result,s=r.zone,a=r.invalidReason;return[i,s,a]}var Mc=[0,31,59,90,120,151,181,212,243,273,304,334],Oc=[0,31,60,91,121,152,182,213,244,274,305,335];function ot(n,e){return new ht("unit out of range","you specified "+e+" (of type "+typeof e+") as a "+n+", which is invalid")}function Rc(n,e,t){var r=new Date(Date.UTC(n,e-1,t)).getUTCDay();return r===0?7:r}function Pc(n,e,t){return t+(kn(n)?Oc:Mc)[e-1]}function Sc(n,e){var t=kn(n)?Oc:Mc,r=t.findIndex(function(s){return sFi(e)?(o=e+1,a=1):o=e,Object.assign({weekYear:o,weekNumber:a,weekday:s},Yi(n))}function xc(n){var e=n.weekYear,t=n.weekNumber,r=n.weekday,i=Rc(e,1,4),s=Mn(e),a=t*7+r-i-3,o;a<1?(o=e-1,a+=Mn(o)):a>s?(o=e+1,a-=Mn(e)):o=e;var u=Sc(o,a),l=u.month,d=u.day;return Object.assign({year:o,month:l,day:d},Yi(n))}function Aa(n){var e=n.year,t=n.month,r=n.day,i=Pc(e,t,r);return Object.assign({year:e,ordinal:i},Yi(n))}function Ac(n){var e=n.year,t=n.ordinal,r=Sc(e,t),i=r.month,s=r.day;return Object.assign({year:e,month:i,day:s},Yi(n))}function wv(n){var e=Ci(n.weekYear),t=Nt(n.weekNumber,1,Fi(n.weekYear)),r=Nt(n.weekday,1,7);return e?t?r?!1:ot("weekday",n.weekday):ot("week",n.week):ot("weekYear",n.weekYear)}function Dv(n){var e=Ci(n.year),t=Nt(n.ordinal,1,Mn(n.year));return e?t?!1:ot("ordinal",n.ordinal):ot("year",n.year)}function Nc(n){var e=Ci(n.year),t=Nt(n.month,1,12),r=Nt(n.day,1,Ii(n.year,n.month));return e?t?r?!1:ot("day",n.day):ot("month",n.month):ot("year",n.year)}function Cc(n){var e=n.hour,t=n.minute,r=n.second,i=n.millisecond,s=Nt(e,0,23)||e===24&&t===0&&r===0&&i===0,a=Nt(t,0,59),o=Nt(r,0,59),u=Nt(i,0,999);return s?a?o?u?!1:ot("millisecond",i):ot("second",r):ot("minute",t):ot("hour",e)}var Na="Invalid DateTime",Ic=864e13;function Bi(n){return new ht("unsupported zone",'the zone "'+n.name+'" is not supported')}function Ca(n){return n.weekData===null&&(n.weekData=xa(n.c)),n.weekData}function Sn(n,e){var t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new pe(Object.assign({},t,e,{old:t}))}function Fc(n,e,t){var r=n-e*60*1e3,i=t.offset(r);if(e===i)return[r,e];r-=(i-e)*60*1e3;var s=t.offset(r);return i===s?[r,i]:[n-Math.min(i,s)*60*1e3,Math.max(i,s)]}function Lc(n,e){n+=e*60*1e3;var t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function Hi(n,e,t){return Fc(ya(n),e,t)}function Wc(n,e){var t=n.o,r=n.c.year+Math.trunc(e.years),i=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,s=Object.assign({},n.c,{year:r,month:i,day:Math.min(n.c.day,Ii(r,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7}),a=qe.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=ya(s),u=Fc(o,t,n.zone),l=u[0],d=u[1];return a!==0&&(l+=a,d=n.zone.offset(l)),{ts:l,o:d}}function xn(n,e,t,r,i){var s=t.setZone,a=t.zone;if(n&&Object.keys(n).length!==0){var o=e||a,u=pe.fromObject(Object.assign(n,t,{zone:o,setZone:void 0}));return s?u:u.setZone(a)}else return pe.invalid(new ht("unparsable",'the input "'+i+`" can't be parsed as `+r))}function Vr(n,e,t){return t===void 0&&(t=!0),n.isValid?Mt.create(_e.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function Uc(n,e){var t=e.suppressSeconds,r=t===void 0?!1:t,i=e.suppressMilliseconds,s=i===void 0?!1:i,a=e.includeOffset,o=e.includePrefix,u=o===void 0?!1:o,l=e.includeZone,d=l===void 0?!1:l,c=e.spaceZone,f=c===void 0?!1:c,h=e.format,m=h===void 0?"extended":h,p=m==="basic"?"HHmm":"HH:mm";(!r||n.second!==0||n.millisecond!==0)&&(p+=m==="basic"?"ss":":ss",(!s||n.millisecond!==0)&&(p+=".SSS")),(d||a)&&f&&(p+=" "),d?p+="z":a&&(p+=m==="basic"?"ZZZ":"ZZ");var y=Vr(n,p);return u&&(y="T"+y),y}var Yc={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Ev={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},kv={ordinal:1,hour:0,minute:0,second:0,millisecond:0},qc=["year","month","day","hour","minute","second","millisecond"],Mv=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Ov=["year","ordinal","hour","minute","second","millisecond"];function jc(n){var e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new Yl(n);return e}function $c(n,e){for(var t=Ht(qc),r;!(r=t()).done;){var i=r.value;H(n[i])&&(n[i]=Yc[i])}var s=Nc(n)||Cc(n);if(s)return pe.invalid(s);var a=fe.now(),o=e.offset(a),u=Hi(n,o,e),l=u[0],d=u[1];return new pe({ts:l,zone:e,o:d})}function Bc(n,e,t){var r=H(t.round)?!0:t.round,i=function(c,f){c=pa(c,r||t.calendary?0:2,!0);var h=e.loc.clone(t).relFormatter(t);return h.format(c,f)},s=function(c){return t.calendary?e.hasSame(n,c)?0:e.startOf(c).diff(n.startOf(c),c).get(c):e.diff(n,c).get(c)};if(t.unit)return i(s(t.unit),t.unit);for(var a=Ht(t.units),o;!(o=a()).done;){var u=o.value,l=s(u);if(Math.abs(l)>=1)return i(l,u)}return i(n>e?-0:0,t.units[t.units.length-1])}var pe=function(){function n(t){var r=t.zone||fe.defaultZone,i=t.invalid||(Number.isNaN(t.ts)?new ht("invalid input"):null)||(r.isValid?null:Bi(r));this.ts=H(t.ts)?fe.now():t.ts;var s=null,a=null;if(!i){var o=t.old&&t.old.ts===this.ts&&t.old.zone.equals(r);if(o){var u=[t.old.c,t.old.o];s=u[0],a=u[1]}else{var l=r.offset(this.ts);s=Lc(this.ts,l),i=Number.isNaN(s.year)?new ht("invalid input"):null,s=i?null:s,a=i?null:l}}this._zone=r,this.loc=t.loc||_e.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=a,this.isLuxonDateTime=!0}n.now=function(){return new n({})},n.local=function(r,i,s,a,o,u,l){return H(r)?n.now():$c({year:r,month:i,day:s,hour:a,minute:o,second:u,millisecond:l},fe.defaultZone)},n.utc=function(r,i,s,a,o,u,l){return H(r)?new n({ts:fe.now(),zone:Qe.utcInstance}):$c({year:r,month:i,day:s,hour:a,minute:o,second:u,millisecond:l},Qe.utcInstance)},n.fromJSDate=function(r,i){i===void 0&&(i={});var s=Fy(r)?r.valueOf():NaN;if(Number.isNaN(s))return n.invalid("invalid input");var a=yr(i.zone,fe.defaultZone);return a.isValid?new n({ts:s,zone:a,loc:_e.fromObject(i)}):n.invalid(Bi(a))},n.fromMillis=function(r,i){if(i===void 0&&(i={}),pr(r))return r<-Ic||r>Ic?n.invalid("Timestamp out of range"):new n({ts:r,zone:yr(i.zone,fe.defaultZone),loc:_e.fromObject(i)});throw new st("fromMillis requires a numerical input, but received a "+typeof r+" with value "+r)},n.fromSeconds=function(r,i){if(i===void 0&&(i={}),pr(r))return new n({ts:r*1e3,zone:yr(i.zone,fe.defaultZone),loc:_e.fromObject(i)});throw new st("fromSeconds requires a numerical input")},n.fromObject=function(r){var i=yr(r.zone,fe.defaultZone);if(!i.isValid)return n.invalid(Bi(i));var s=fe.now(),a=i.offset(s),o=Wi(r,jc,["zone","locale","outputCalendar","numberingSystem"]),u=!H(o.ordinal),l=!H(o.year),d=!H(o.month)||!H(o.day),c=l||d,f=o.weekYear||o.weekNumber,h=_e.fromObject(r);if((c||u)&&f)throw new Dn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&u)throw new Dn("Can't mix ordinal dates with month/day");var m=f||o.weekday&&!c,p,y,v=Lc(s,a);m?(p=Mv,y=Ev,v=xa(v)):u?(p=Ov,y=kv,v=Aa(v)):(p=qc,y=Yc);for(var A=!1,X=Ht(p),W;!(W=X()).done;){var G=W.value,P=o[G];H(P)?A?o[G]=y[G]:o[G]=v[G]:A=!0}var j=m?wv(o):u?Dv(o):Nc(o),M=j||Cc(o);if(M)return n.invalid(M);var Ie=m?xc(o):u?Ac(o):o,Fe=Hi(Ie,a,i),E=Fe[0],D=Fe[1],T=new n({ts:E,zone:i,o:D,loc:h});return o.weekday&&c&&r.weekday!==T.weekday?n.invalid("mismatched weekday","you can't specify both a weekday of "+o.weekday+" and a date of "+T.toISO()):T},n.fromISO=function(r,i){i===void 0&&(i={});var s=Yg(r),a=s[0],o=s[1];return xn(a,o,i,"ISO 8601",r)},n.fromRFC2822=function(r,i){i===void 0&&(i={});var s=qg(r),a=s[0],o=s[1];return xn(a,o,i,"RFC 2822",r)},n.fromHTTP=function(r,i){i===void 0&&(i={});var s=jg(r),a=s[0],o=s[1];return xn(a,o,i,"HTTP",i)},n.fromFormat=function(r,i,s){if(s===void 0&&(s={}),H(r)||H(i))throw new st("fromFormat requires an input string and a format");var a=s,o=a.locale,u=o===void 0?null:o,l=a.numberingSystem,d=l===void 0?null:l,c=_e.fromOpts({locale:u,numberingSystem:d,defaultToEN:!0}),f=bv(c,r,i),h=f[0],m=f[1],p=f[2];return p?n.invalid(p):xn(h,m,s,"format "+i,r)},n.fromString=function(r,i,s){return s===void 0&&(s={}),n.fromFormat(r,i,s)},n.fromSQL=function(r,i){i===void 0&&(i={});var s=Kg(r),a=s[0],o=s[1];return xn(a,o,i,"SQL",r)},n.invalid=function(r,i){if(i===void 0&&(i=null),!r)throw new st("need to specify a reason the DateTime is invalid");var s=r instanceof ht?r:new ht(r,i);if(fe.throwOnInvalid)throw new Ay(s);return new n({invalid:s})},n.isDateTime=function(r){return r&&r.isLuxonDateTime||!1};var e=n.prototype;return e.get=function(r){return this[r]},e.resolvedLocaleOpts=function(r){r===void 0&&(r={});var i=Mt.create(this.loc.clone(r),r).resolvedOptions(this),s=i.locale,a=i.numberingSystem,o=i.calendar;return{locale:s,numberingSystem:a,outputCalendar:o}},e.toUTC=function(r,i){return r===void 0&&(r=0),i===void 0&&(i={}),this.setZone(Qe.instance(r),i)},e.toLocal=function(){return this.setZone(fe.defaultZone)},e.setZone=function(r,i){var s=i===void 0?{}:i,a=s.keepLocalTime,o=a===void 0?!1:a,u=s.keepCalendarTime,l=u===void 0?!1:u;if(r=yr(r,fe.defaultZone),r.equals(this.zone))return this;if(r.isValid){var d=this.ts;if(o||l){var c=r.offset(this.ts),f=this.toObject(),h=Hi(f,c,r);d=h[0]}return Sn(this,{ts:d,zone:r})}else return n.invalid(Bi(r))},e.reconfigure=function(r){var i=r===void 0?{}:r,s=i.locale,a=i.numberingSystem,o=i.outputCalendar,u=this.loc.clone({locale:s,numberingSystem:a,outputCalendar:o});return Sn(this,{loc:u})},e.setLocale=function(r){return this.reconfigure({locale:r})},e.set=function(r){if(!this.isValid)return this;var i=Wi(r,jc,[]),s=!H(i.weekYear)||!H(i.weekNumber)||!H(i.weekday),a=!H(i.ordinal),o=!H(i.year),u=!H(i.month)||!H(i.day),l=o||u,d=i.weekYear||i.weekNumber;if((l||a)&&d)throw new Dn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new Dn("Can't mix ordinal dates with month/day");var c;s?c=xc(Object.assign(xa(this.c),i)):H(i.ordinal)?(c=Object.assign(this.toObject(),i),H(i.day)&&(c.day=Math.min(Ii(c.year,c.month),c.day))):c=Ac(Object.assign(Aa(this.c),i));var f=Hi(c,this.o,this.zone),h=f[0],m=f[1];return Sn(this,{ts:h,o:m})},e.plus=function(r){if(!this.isValid)return this;var i=br(r);return Sn(this,Wc(this,i))},e.minus=function(r){if(!this.isValid)return this;var i=br(r).negate();return Sn(this,Wc(this,i))},e.startOf=function(r){if(!this.isValid)return this;var i={},s=qe.normalizeUnit(r);switch(s){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break}if(s==="weeks"&&(i.weekday=1),s==="quarters"){var a=Math.ceil(this.month/3);i.month=(a-1)*3+1}return this.set(i)},e.endOf=function(r){var i;return this.isValid?this.plus((i={},i[r]=1,i)).startOf(r).minus(1):this},e.toFormat=function(r,i){return i===void 0&&(i={}),this.isValid?Mt.create(this.loc.redefaultToEN(i)).formatDateTimeFromString(this,r):Na},e.toLocaleString=function(r){return r===void 0&&(r=Ni),this.isValid?Mt.create(this.loc.clone(r),r).formatDateTime(this):Na},e.toLocaleParts=function(r){return r===void 0&&(r={}),this.isValid?Mt.create(this.loc.clone(r),r).formatDateTimeParts(this):[]},e.toISO=function(r){return r===void 0&&(r={}),this.isValid?this.toISODate(r)+"T"+this.toISOTime(r):null},e.toISODate=function(r){var i=r===void 0?{}:r,s=i.format,a=s===void 0?"extended":s,o=a==="basic"?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(o="+"+o),Vr(this,o)},e.toISOWeekDate=function(){return Vr(this,"kkkk-'W'WW-c")},e.toISOTime=function(r){var i=r===void 0?{}:r,s=i.suppressMilliseconds,a=s===void 0?!1:s,o=i.suppressSeconds,u=o===void 0?!1:o,l=i.includeOffset,d=l===void 0?!0:l,c=i.includePrefix,f=c===void 0?!1:c,h=i.format,m=h===void 0?"extended":h;return Uc(this,{suppressSeconds:u,suppressMilliseconds:a,includeOffset:d,includePrefix:f,format:m})},e.toRFC2822=function(){return Vr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function(){return Vr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return Vr(this,"yyyy-MM-dd")},e.toSQLTime=function(r){var i=r===void 0?{}:r,s=i.includeOffset,a=s===void 0?!0:s,o=i.includeZone,u=o===void 0?!1:o;return Uc(this,{includeOffset:a,includeZone:u,spaceZone:!0})},e.toSQL=function(r){return r===void 0&&(r={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(r):null},e.toString=function(){return this.isValid?this.toISO():Na},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(r){if(r===void 0&&(r={}),!this.isValid)return{};var i=Object.assign({},this.c);return r.includeConfig&&(i.outputCalendar=this.outputCalendar,i.numberingSystem=this.loc.numberingSystem,i.locale=this.loc.locale),i},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(r,i,s){if(i===void 0&&(i="milliseconds"),s===void 0&&(s={}),!this.isValid||!r.isValid)return qe.invalid(this.invalid||r.invalid,"created by diffing an invalid DateTime");var a=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},s),o=Ly(i).map(qe.normalizeUnit),u=r.valueOf()>this.valueOf(),l=u?this:r,d=u?r:this,c=sv(l,d,o,a);return u?c.negate():c},e.diffNow=function(r,i){return r===void 0&&(r="milliseconds"),i===void 0&&(i={}),this.diff(n.now(),r,i)},e.until=function(r){return this.isValid?Rn.fromDateTimes(this,r):this},e.hasSame=function(r,i){if(!this.isValid)return!1;var s=r.valueOf(),a=this.setZone(r.zone,{keepLocalTime:!0});return a.startOf(i)<=s&&s<=a.endOf(i)},e.equals=function(r){return this.isValid&&r.isValid&&this.valueOf()===r.valueOf()&&this.zone.equals(r.zone)&&this.loc.equals(r.loc)},e.toRelative=function(r){if(r===void 0&&(r={}),!this.isValid)return null;var i=r.base||n.fromObject({zone:this.zone}),s=r.padding?thisthis.set({month:1}).offset||this.offset>this.set({month:5}).offset}},{key:"isInLeapYear",get:function(){return kn(this.year)}},{key:"daysInMonth",get:function(){return Ii(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?Mn(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?Fi(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return Ni}},{key:"DATE_MED",get:function(){return Zs}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return ql}},{key:"DATE_FULL",get:function(){return Ks}},{key:"DATE_HUGE",get:function(){return Js}},{key:"TIME_SIMPLE",get:function(){return Qs}},{key:"TIME_WITH_SECONDS",get:function(){return Xs}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return ea}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return ta}},{key:"TIME_24_SIMPLE",get:function(){return ra}},{key:"TIME_24_WITH_SECONDS",get:function(){return na}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return ia}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return sa}},{key:"DATETIME_SHORT",get:function(){return aa}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return oa}},{key:"DATETIME_MED",get:function(){return ua}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return la}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return jl}},{key:"DATETIME_FULL",get:function(){return ca}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return da}},{key:"DATETIME_HUGE",get:function(){return fa}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return ha}}]),n}();function An(n){if(pe.isDateTime(n))return n;if(n&&n.valueOf&&pr(n.valueOf()))return pe.fromJSDate(n);if(n&&typeof n=="object")return pe.fromObject(n);throw new st("Unknown datetime argument: "+n+", of type "+typeof n)}var Rv="1.28.0";Xe.DateTime=pe;Xe.Duration=qe;Xe.FixedOffsetZone=Qe;Xe.IANAZone=Ot;Xe.Info=Pn;Xe.Interval=Rn;Xe.InvalidZone=_a;Xe.LocalZone=nc;Xe.Settings=fe;Xe.VERSION=Rv;Xe.Zone=qr});var ce=g(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.matchAnyPattern=Qt.extractTerms=Qt.repeatedTimeunitPattern=void 0;function aT(n,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${n}${t}\\s*(?:,?\\s{0,5}${t}){0,10}`}Qt.repeatedTimeunitPattern=aT;function Rd(n){let e;return n instanceof Array?e=[...n]:n instanceof Map?e=Array.from(n.keys()):e=Object.keys(n),e}Qt.extractTerms=Rd;function oT(n){return`(?:${Rd(n).sort((t,r)=>r.length-t.length).join("|").replace(/\./g,"\\.")})`}Qt.matchAnyPattern=oT});var Oe=g((za,Va)=>{(function(n,e){typeof za=="object"&&typeof Va!="undefined"?Va.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis!="undefined"?globalThis:n||self).dayjs=e()})(za,function(){"use strict";var n=1e3,e=6e4,t=36e5,r="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",d="quarter",c="year",f="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|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,y={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("_")},v=function(E,D,T){var k=String(E);return!k||k.length>=D?E:""+Array(D+1-k.length).join(T)+E},A={s:v,z:function(E){var D=-E.utcOffset(),T=Math.abs(D),k=Math.floor(T/60),w=T%60;return(D<=0?"+":"-")+v(k,2,"0")+":"+v(w,2,"0")},m:function E(D,T){if(D.date(){"use strict";var uT=Xt&&Xt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.findYearClosestToRef=Xt.findMostLikelyADYear=void 0;var lT=uT(Oe());function cT(n){return n<100&&(n>50?n=n+1900:n=n+2e3),n}Xt.findMostLikelyADYear=cT;function dT(n,e,t){let r=lT.default(n),i=r;i=i.month(t-1),i=i.date(e),i=i.year(r.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(r)){"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.parseTimeUnits=N.TIME_UNITS_PATTERN=N.parseYear=N.YEAR_PATTERN=N.parseOrdinalNumberPattern=N.ORDINAL_NUMBER_PATTERN=N.parseNumberPattern=N.NUMBER_PATTERN=N.TIME_UNIT_DICTIONARY=N.ORDINAL_WORD_DICTIONARY=N.INTEGER_WORD_DICTIONARY=N.MONTH_DICTIONARY=N.FULL_MONTH_NAME_DICTIONARY=N.WEEKDAY_DICTIONARY=void 0;var es=ce(),fT=Be();N.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};N.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};N.MONTH_DICTIONARY=Object.assign(Object.assign({},N.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});N.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};N.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};N.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",y:"year",yr:"year",year:"year",years:"year"};N.NUMBER_PATTERN=`(?:${es.matchAnyPattern(N.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Pd(n){let e=n.toLowerCase();return N.INTEGER_WORD_DICTIONARY[e]!==void 0?N.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)}N.parseNumberPattern=Pd;N.ORDINAL_NUMBER_PATTERN=`(?:${es.matchAnyPattern(N.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function hT(n){let e=n.toLowerCase();return N.ORDINAL_WORD_DICTIONARY[e]!==void 0?N.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}N.parseOrdinalNumberPattern=hT;N.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:BE|AD|BC)|[1-2][0-9]{3}|[5-9][0-9])";function mT(n){if(/BE/i.test(n))return n=n.replace(/BE/i,""),parseInt(n)-543;if(/BC/i.test(n))return n=n.replace(/BC/i,""),-parseInt(n);if(/AD/i.test(n))return n=n.replace(/AD/i,""),parseInt(n);let e=parseInt(n);return fT.findMostLikelyADYear(e)}N.parseYear=mT;var Sd=`(${N.NUMBER_PATTERN})\\s{0,5}(${es.matchAnyPattern(N.TIME_UNIT_DICTIONARY)})\\s{0,5}`,xd=new RegExp(Sd,"i");N.TIME_UNITS_PATTERN=es.repeatedTimeunitPattern("(?:(?:about|around)\\s*)?",Sd);function pT(n){let e={},t=n,r=xd.exec(t);for(;r;)yT(e,r),t=t.substring(r[0].length),r=xd.exec(t);return e}N.parseTimeUnits=pT;function yT(n,e){let t=Pd(e[1]),r=N.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];n[r]=t}});var Ad=g((Za,Ka)=>{(function(n,e){typeof Za=="object"&&typeof Ka!="undefined"?Ka.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis!="undefined"?globalThis:n||self).dayjs_plugin_quarterOfYear=e()})(Za,function(){"use strict";var n="month",e="quarter";return function(t,r){var i=r.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,n):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),d=!!l.u(u)||u;if(l.p(o)===e){var c=this.quarter()-1;return d?this.month(3*c).startOf(n).startOf("day"):this.month(3*c+2).endOf(n).endOf("day")}return a.bind(this)(o,u)}}})});var gt=g(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.implySimilarTime=Rt.assignSimilarTime=Rt.assignSimilarDate=Rt.assignTheNextDay=void 0;function gT(n,e){e=e.add(1,"day"),Nd(n,e),Cd(n,e)}Rt.assignTheNextDay=gT;function Nd(n,e){n.assign("day",e.date()),n.assign("month",e.month()+1),n.assign("year",e.year())}Rt.assignSimilarDate=Nd;function vT(n,e){n.assign("hour",e.hour()),n.assign("minute",e.minute()),n.assign("second",e.second()),n.assign("millisecond",e.millisecond()),n.assign("timezoneOffset",e.utcOffset())}Rt.assignSimilarTime=vT;function Cd(n,e){n.imply("hour",e.hour()),n.imply("minute",e.minute()),n.imply("second",e.second()),n.imply("millisecond",e.millisecond()),n.imply("timezoneOffset",e.utcOffset())}Rt.implySimilarTime=Cd});var ut=g(er=>{"use strict";var Id=er&&er.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(er,"__esModule",{value:!0});er.ParsingResult=er.ParsingComponents=void 0;var TT=Id(Ad()),ts=Id(Oe()),Ja=gt();ts.default.extend(TT.default);var Jr=class{constructor(e,t){if(this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let r=ts.default(e);this.imply("day",r.date()),this.imply("month",r.month()+1),this.imply("year",r.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 Jr(new Date);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.isCertain("timezoneOffset")?this.dateWithoutTimezoneAdjustment():this.date();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}]`}dayjs(){return ts.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getTimezoneAdjustmentMinute(e){var t;e=e!=null?e:new Date;let r=-e.getTimezoneOffset(),i=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:r;return r-i}static createRelativeFromRefDate(e,t){let r=ts.default(e);for(let s in t)r=r.add(t[s],s);let i=new Jr(e);return t.hour||t.minute||t.second?(Ja.assignSimilarTime(i,r),Ja.assignSimilarDate(i,r)):(Ja.implySimilarTime(i,r),t.d?(i.assign("day",r.date()),i.assign("month",r.month()+1),i.assign("year",r.year())):(t.week&&i.imply("weekday",r.day()),i.imply("day",r.date()),t.month?(i.assign("month",r.month()+1),i.assign("year",r.year())):(i.imply("month",r.month()+1),t.year?i.assign("year",r.year()):i.imply("year",r.year())))),i}};er.ParsingComponents=Jr;var rs=class{constructor(e,t,r,i,s){this.refDate=e,this.index=t,this.text=r,this.start=i||new Jr(this.refDate),this.end=s}clone(){let e=new rs(this.refDate,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};er.ParsingResult=rs});var C=g(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.AbstractParserWithWordBoundaryChecking=void 0;var Fd=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`(\\W|^)${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){let r=t[1];t.index=t.index+r.length,t[0]=t[0].substring(r.length);for(let i=2;i{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});var Qa=Ne(),_T=ut(),bT=C(),wT=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Qa.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),DT=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Qa.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Ld=class extends bT.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?DT:wT}innerExtract(e,t){let r=Qa.parseTimeUnits(t[1]);return _T.ParsingComponents.createRelativeFromRefDate(e.refDate,r)}};Xa.default=Ld});var Hd=g(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});var ET=Be(),Ud=Ne(),Yd=Ne(),is=Ne(),kT=ce(),MT=C(),OT=new RegExp(`(?:on\\s*?)?(${is.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:to|\\-|\\\u2013|until|through|till|\\s)\\s*(${is.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+kT.matchAnyPattern(Ud.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Yd.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),qd=1,jd=2,RT=3,$d=4,Bd=class extends MT.AbstractParserWithWordBoundaryChecking{innerPattern(){return OT}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),i=Ud.MONTH_DICTIONARY[t[RT].toLowerCase()],s=is.parseOrdinalNumberPattern(t[qd]);if(s>31)return t.index=t.index+t[qd].length,null;if(r.start.assign("month",i),r.start.assign("day",s),t[$d]){let a=Yd.parseYear(t[$d]);r.start.assign("year",a)}else{let a=ET.findYearClosestToRef(e.refDate,s,i);r.start.imply("year",a)}if(t[jd]){let a=is.parseOrdinalNumberPattern(t[jd]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};eo.default=Bd});var Jd=g(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});var PT=Be(),Gd=Ne(),ss=Ne(),zd=Ne(),ST=ce(),xT=C(),AT=new RegExp(`(${ST.matchAnyPattern(Gd.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${ss.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${ss.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${zd.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),NT=1,CT=2,Vd=3,Zd=4,Kd=class extends xT.AbstractParserWithWordBoundaryChecking{innerPattern(){return AT}innerExtract(e,t){let r=Gd.MONTH_DICTIONARY[t[NT].toLowerCase()],i=ss.parseOrdinalNumberPattern(t[CT]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:r});if(t[Zd]){let u=zd.parseYear(t[Zd]);s.assign("year",u)}else{let u=PT.findYearClosestToRef(e.refDate,i,r);s.imply("year",u)}if(!t[Vd])return s;let a=ss.parseOrdinalNumberPattern(t[Vd]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};to.default=Kd});var tf=g(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});var ro=Ne(),IT=Be(),FT=ce(),Qd=Ne(),LT=C(),WT=new RegExp(`((?:in)\\s*)?(${FT.matchAnyPattern(ro.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Qd.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),UT=1,YT=2,Xd=3,ef=class extends LT.AbstractParserWithWordBoundaryChecking{innerPattern(){return WT}innerExtract(e,t){let r=t[YT].toLowerCase();if(t[0].length<=3&&!ro.FULL_MONTH_NAME_DICTIONARY[r])return null;let i=e.createParsingResult(t.index+(t[UT]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=ro.MONTH_DICTIONARY[r];if(i.start.assign("month",s),t[Xd]){let a=Qd.parseYear(t[Xd]);i.start.assign("year",a)}else{let a=IT.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};no.default=ef});var af=g(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});var rf=Ne(),qT=ce(),jT=C(),$T=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${qT.matchAnyPattern(rf.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),BT=1,HT=2,nf=3,GT=4,sf=class extends jT.AbstractParserWithWordBoundaryChecking{innerPattern(){return $T}innerExtract(e,t){let r=t[nf]?parseInt(t[nf]):rf.MONTH_DICTIONARY[t[HT].toLowerCase()];if(r<1||r>12)return null;let i=parseInt(t[BT]);return{day:parseInt(t[GT]),month:r,year:i}}};io.default=sf});var uf=g(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});var zT=C(),VT=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),ZT=1,KT=2,of=class extends zT.AbstractParserWithWordBoundaryChecking{innerPattern(){return VT}innerExtract(e,t){let r=parseInt(t[KT]),i=parseInt(t[ZT]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",r)}};so.default=of});var Xr=g(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.AbstractTimeExpressionParser=void 0;var je=Re();function JT(n,e){return new RegExp(`(^|\\s|T|\\b)${n}(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\:|\\\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}function QT(n,e){return new RegExp(`^(${n})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var lf=2,Qr=3,as=4,os=5,Fn=6,cf=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let r=this.extractPrimaryTimeComponents(e,t);if(!r)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,r);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,r=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[lf]);if(o>100){if(this.strictMode||t[Qr]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[Qr]!=null){if(t[Qr].length==1&&!t[Fn])return null;s=parseInt(t[Qr])}if(s>=60)return null;if(o>12&&(a=je.Meridiem.PM),t[Fn]!=null){if(o>12)return null;let u=t[Fn][0].toLowerCase();u=="a"&&(a=je.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=je.Meridiem.PM,o!=12&&(o+=12))}if(i.assign("hour",o),i.assign("minute",s),a!==null?i.assign("meridiem",a):o<12?i.imply("meridiem",je.Meridiem.AM):i.imply("meridiem",je.Meridiem.PM),t[os]!=null){let u=parseInt(t[os].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[as]!=null){let u=parseInt(t[as]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,r){let i=e.createParsingComponents();if(t[os]!=null){let u=parseInt(t[os].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[as]!=null){let u=parseInt(t[as]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[lf]),a=0,o=-1;if(t[Qr]!=null?a=parseInt(t[Qr]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=je.Meridiem.PM),t[Fn]!=null){if(s>12)return null;let u=t[Fn][0].toLowerCase();u=="a"&&(o=je.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=je.Meridiem.PM,s!=12&&(s+=12)),r.start.isCertain("meridiem")||(o==je.Meridiem.AM?(r.start.imply("meridiem",je.Meridiem.AM),r.start.get("hour")==12&&r.start.assign("hour",0)):(r.start.imply("meridiem",je.Meridiem.PM),r.start.get("hour")!=12&&r.start.assign("hour",r.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):r.start.isCertain("meridiem")&&r.start.get("hour")>12?r.start.get("hour")-12>s?i.imply("meridiem",je.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",je.Meridiem.PM)):s>12?i.imply("meridiem",je.Meridiem.PM):s<=12&&i.imply("meridiem",je.Meridiem.AM),i.date().getTime()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 r=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(r);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=JT(e,t),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=QT(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};us.AbstractTimeExpressionParser=cf});var ff=g(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});var ls=Re(),XT=Xr(),df=class extends XT.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 r=super.extractPrimaryTimeComponents(e,t);if(r){if(t[0].endsWith("night")){let i=r.get("hour");i>=6&&i<12?(r.assign("hour",r.get("hour")+12),r.assign("meridiem",ls.Meridiem.PM)):i<6&&r.assign("meridiem",ls.Meridiem.AM)}if(t[0].endsWith("afternoon")){r.assign("meridiem",ls.Meridiem.PM);let i=r.get("hour");i>=0&&i<=6&&r.assign("hour",r.get("hour")+12)}t[0].endsWith("morning")&&(r.assign("meridiem",ls.Meridiem.AM),r.get("hour")<12&&r.assign("hour",r.get("hour")))}return r}};ao.default=df});var tn=g(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.addImpliedTimeUnits=en.reverseTimeUnits=void 0;function e_(n){let e={};for(let t in n)e[t]=-n[t];return e}en.reverseTimeUnits=e_;function t_(n,e){let t=n.clone(),r=n.dayjs();for(let i in e)r=r.add(e[i],i);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",r.date()),t.imply("month",r.month()+1),t.imply("year",r.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",r.second()),t.imply("minute",r.minute()),t.imply("hour",r.hour())),t}en.addImpliedTimeUnits=t_});var mf=g(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});var oo=Ne(),r_=ut(),n_=C(),i_=tn(),s_=new RegExp("("+oo.TIME_UNITS_PATTERN+")(?:ago|before|earlier)(?=(?:\\W|$))","i"),a_=new RegExp("("+oo.TIME_UNITS_PATTERN+")ago(?=(?:\\W|$))","i"),hf=class extends n_.AbstractParserWithWordBoundaryChecking{constructor(e){super();this.strictMode=e}innerPattern(){return this.strictMode?a_:s_}innerExtract(e,t){let r=oo.parseTimeUnits(t[1]),i=i_.reverseTimeUnits(r);return r_.ParsingComponents.createRelativeFromRefDate(e.refDate,i)}};uo.default=hf});var yf=g(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});var lo=Ne(),o_=ut(),u_=C(),l_=new RegExp("("+lo.TIME_UNITS_PATTERN+")(later|after|from now|henceforth|forward|out)(?=(?:\\W|$))","i"),c_=new RegExp("("+lo.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),d_=1,pf=class extends u_.AbstractParserWithWordBoundaryChecking{constructor(e){super();this.strictMode=e}innerPattern(){return this.strictMode?c_:l_}innerExtract(e,t){let r=lo.parseTimeUnits(t[d_]);return o_.ParsingComponents.createRelativeFromRefDate(e.refDate,r)}};co.default=pf});var Ln=g(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.MergingRefiner=rn.Filter=void 0;var gf=class{refine(e,t){return t.filter(r=>this.isValid(e,r))}};rn.Filter=gf;var vf=class{refine(e,t){if(t.length<2)return t;let r=[],i=t[0],s=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${d}`)}),i=d}}return i!=null&&r.push(i),r}};rn.MergingRefiner=vf});var kr=g(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});var f_=Ln(),Tf=class extends f_.MergingRefiner{shouldMergeResults(e,t,r){return!t.end&&!r.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,r){if(!t.start.isOnlyWeekdayComponent()&&!r.start.isOnlyWeekdayComponent()&&(r.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,r.start.get(s))}),t.start.getCertainComponents().forEach(s=>{r.start.isCertain(s)||r.start.assign(s,t.start.get(s))})),t.start.date().getTime()>r.start.date().getTime()){let s=t.start.dayjs(),a=r.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):r.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),r.start.imply("day",a.date()),r.start.imply("month",a.month()+1),r.start.imply("year",a.year())):[r,t]=[t,r]}let i=t.clone();return i.start=t.start,i.end=r.start,i.index=Math.min(t.index,r.index),t.index{"use strict";var h_=Wn&&Wn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Wn,"__esModule",{value:!0});var m_=h_(kr()),_f=class extends m_.default{patternBetween(){return/^\s*(to|-)\s*$/i}};Wn.default=_f});var wf=g(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.mergeDateTimeComponent=nn.mergeDateTimeResult=void 0;var p_=Re();function y_(n,e){let t=n.clone(),r=n.start,i=e.start;if(t.start=ho(r,i),n.end!=null||e.end!=null){let s=n.end==null?n.start:n.end,a=e.end==null?e.start:e.end,o=ho(s,a);n.end==null&&o.date().getTime(){"use strict";Object.defineProperty(mo,"__esModule",{value:!0});var g_=Ln(),Df=wf(),Ef=class extends g_.MergingRefiner{shouldMergeResults(e,t,r){return(t.start.isOnlyDate()&&r.start.isOnlyTime()||r.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,r){let i=t.start.isOnlyDate()?Df.mergeDateTimeResult(t,r):Df.mergeDateTimeResult(r,t);return i.index=t.index,i.text=t.text+e+r.text,i}};mo.default=Ef});var Mf=g(Un=>{"use strict";var v_=Un&&Un.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Un,"__esModule",{value:!0});var T_=v_(sn()),kf=class extends T_.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};Un.default=kf});var Rf=g(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});var __=new RegExp("^\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),b_={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},Of=class{constructor(e){this.timezone=Object.assign(Object.assign({},b_),e)}refine(e,t){var r;let i=(r=e.option.timezones)!==null&&r!==void 0?r:{};return t.forEach(s=>{var a,o;let u=e.text.substring(s.index+s.text.length),l=__.exec(u);if(!l)return;let d=l[1].toUpperCase(),c=(o=(a=i[d])!==null&&a!==void 0?a:this.timezone[d])!==null&&o!==void 0?o:null;if(c===null)return;e.debug(()=>{console.log(`Extracting timezone: '${d}' into : ${c}`)});let f=s.start.get("timezoneOffset");f!==null&&c!=f||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",c),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",c))}),t}};po.default=Of});var Sf=g(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});var w_=new RegExp("^\\s*(?:(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?","i"),D_=1,E_=2,k_=3,Pf=class{refine(e,t){return t.forEach(function(r){if(r.start.isCertain("timezoneOffset"))return;let i=e.text.substring(r.index+r.text.length),s=w_.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${r}`)});let a=parseInt(s[E_]),o=parseInt(s[k_]||"0"),u=a*60+o;s[D_]==="-"&&(u=-u),r.end!=null&&r.end.assign("timezoneOffset",u),r.start.assign("timezoneOffset",u),r.text+=s[0]}),t}};yo.default=Pf});var Af=g(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});var xf=class{refine(e,t){if(t.length<2)return t;let r=[],i=t[0];for(let s=1;si.text.length&&(i=a):(r.push(i),i=a)}return i!=null&&r.push(i),r}};go.default=xf});var Cf=g(Yn=>{"use strict";var M_=Yn&&Yn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Yn,"__esModule",{value:!0});var O_=M_(Oe()),Nf=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(r){let i=O_.default(e.refDate);if(r.start.isOnlyDayMonthComponent()&&i.isAfter(r.start.dayjs()))for(let s=0;s<3&&i.isAfter(r.start.dayjs());s++)r.start.imply("year",r.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${r} (${r.start})`)}),r.end&&!r.end.isCertain("year")&&(r.end.imply("year",r.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${r} (${r.end})`)}));r.start.isOnlyWeekdayComponent()&&i.isAfter(r.start.dayjs())&&(i.day()>r.start.get("weekday")?i=i.day(r.start.get("weekday")+7):i=i.day(r.start.get("weekday")),r.start.imply("day",i.date()),r.start.imply("month",i.month()+1),r.start.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${r} (${r.start})`)}),r.end&&r.end.isOnlyWeekdayComponent()&&(i.day()>r.end.get("weekday")?i=i.day(r.end.get("weekday")+7):i=i.day(r.end.get("weekday")),r.end.imply("day",i.date()),r.end.imply("month",i.month()+1),r.end.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${r} (${r.end})`)})))}),t}};Yn.default=Nf});var Ff=g(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});var R_=Ln(),If=class extends R_.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}};vo.default=If});var _o=g(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});var P_=C(),S_=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"),x_=1,A_=2,N_=3,Lf=4,C_=5,Wf=6,Uf=7,Yf=8,qf=9,jf=class extends P_.AbstractParserWithWordBoundaryChecking{innerPattern(){return S_}innerExtract(e,t){let r={};if(r.year=parseInt(t[x_]),r.month=parseInt(t[A_]),r.day=parseInt(t[N_]),t[Lf]!=null)if(r.hour=parseInt(t[Lf]),r.minute=parseInt(t[C_]),t[Wf]!=null&&(r.second=parseInt(t[Wf])),t[Uf]!=null&&(r.millisecond=parseInt(t[Uf])),t[Yf]==null)r.timezoneOffset=0;else{let i=parseInt(t[Yf]),s=0;t[qf]!=null&&(s=parseInt(t[qf]));let a=i*60;a<0?a-=s:a+=s,r.timezoneOffset=a}return r}};To.default=jf});var Bf=g(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});var I_=Ln(),$f=class extends I_.MergingRefiner{mergeResults(e,t,r){let i=r.clone();return i.index=t.index,i.text=t.text+e+i.text,i.start.assign("weekday",t.start.get("weekday")),i.end&&i.end.assign("weekday",t.start.get("weekday")),i}shouldMergeResults(e,t,r){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&r.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};bo.default=$f});var on=g(an=>{"use strict";var Mr=an&&an.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(an,"__esModule",{value:!0});an.includeCommonConfiguration=void 0;var F_=Mr(Rf()),L_=Mr(Sf()),Hf=Mr(Af()),W_=Mr(Cf()),U_=Mr(Ff()),Y_=Mr(_o()),q_=Mr(Bf());function j_(n,e=!1){return n.parsers.unshift(new Y_.default),n.refiners.unshift(new q_.default),n.refiners.unshift(new F_.default),n.refiners.unshift(new L_.default),n.refiners.unshift(new Hf.default),n.refiners.push(new Hf.default),n.refiners.push(new W_.default),n.refiners.push(new U_.default(e)),n}an.includeCommonConfiguration=j_});var Or=g(He=>{"use strict";var $_=He&&He.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(He,"__esModule",{value:!0});He.tonight=He.tomorrow=He.yesterday=He.today=He.now=void 0;var qn=ut(),jn=$_(Oe()),tr=gt(),B_=Re();function H_(n){let e=jn.default(n),t=new qn.ParsingComponents(n,{});return tr.assignSimilarDate(t,e),tr.assignSimilarTime(t,e),t}He.now=H_;function G_(n){let e=jn.default(n),t=new qn.ParsingComponents(n,{});return tr.assignSimilarDate(t,e),tr.implySimilarTime(t,e),t}He.today=G_;function z_(n){let e=jn.default(n),t=new qn.ParsingComponents(n,{});return e=e.add(-1,"day"),tr.assignSimilarDate(t,e),tr.implySimilarTime(t,e),t}He.yesterday=z_;function V_(n){let e=jn.default(n),t=new qn.ParsingComponents(n,{});return tr.assignTheNextDay(t,e),t}He.tomorrow=V_;function Z_(n,e=22){let t=jn.default(n),r=new qn.ParsingComponents(n,{});return r.imply("hour",e),r.imply("meridiem",B_.Meridiem.PM),tr.assignSimilarDate(r,t),r}He.tonight=Z_});var zf=g(vt=>{"use strict";var K_=vt&&vt.__createBinding||(Object.create?function(n,e,t,r){r===void 0&&(r=t),Object.defineProperty(n,r,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}),J_=vt&&vt.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Q_=vt&&vt.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.prototype.hasOwnProperty.call(n,t)&&K_(e,n,t);return J_(e,n),e},X_=vt&&vt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(vt,"__esModule",{value:!0});var eb=X_(Oe()),tb=C(),rb=gt(),$n=Q_(Or()),nb=/(now|today|tonight|tomorrow|tmr|yesterday|last\s*night)(?=\W|$)/i,Gf=class extends tb.AbstractParserWithWordBoundaryChecking{innerPattern(e){return nb}innerExtract(e,t){let r=eb.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return $n.now(e.refDate);case"today":return $n.today(e.refDate);case"yesterday":return $n.yesterday(e.refDate);case"tomorrow":case"tmr":return $n.tomorrow(e.refDate);case"tonight":return $n.tonight(e.refDate);default:i.match(/last\s*night/)&&(r.hour()>6&&(r=r.add(-1,"day")),rb.assignSimilarDate(s,r),s.imply("hour",0));break}return s}};vt.default=Gf});var Zf=g(Bn=>{"use strict";var ib=Bn&&Bn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Bn,"__esModule",{value:!0});var cs=Re(),sb=C(),ab=ib(Oe()),ob=gt(),ub=/(?:this)?\s*(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Vf=class extends sb.AbstractParserWithWordBoundaryChecking{innerPattern(){return ub}innerExtract(e,t){let r=ab.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",cs.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",cs.Meridiem.PM),i.imply("hour",20);break;case"midnight":ob.assignTheNextDay(i,r),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",cs.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",cs.Meridiem.AM),i.imply("hour",12);break}return i}};Bn.default=Vf});var un=g(rr=>{"use strict";var lb=rr&&rr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(rr,"__esModule",{value:!0});rr.toDayJSClosestWeekday=rr.toDayJSWeekday=void 0;var Kf=lb(Oe());function cb(n,e,t){if(!t)return Jf(n,e);let r=Kf.default(n);switch(t){case"this":r=r.day(e);break;case"next":r=r.day(e+7);break;case"last":r=r.day(e-7);break}return r}rr.toDayJSWeekday=cb;function Jf(n,e){let t=Kf.default(n),r=t.day();return Math.abs(e-7-r){"use strict";Object.defineProperty(wo,"__esModule",{value:!0});var Qf=Ne(),db=ce(),fb=C(),hb=un(),mb=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${db.matchAnyPattern(Qf.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),pb=1,yb=2,gb=3,Xf=class extends fb.AbstractParserWithWordBoundaryChecking{innerPattern(){return mb}innerExtract(e,t){let r=t[yb].toLowerCase(),i=Qf.WEEKDAY_DICTIONARY[r],s=t[pb],a=t[gb],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=hb.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};wo.default=Xf});var ih=g(Hn=>{"use strict";var vb=Hn&&Hn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Hn,"__esModule",{value:!0});var th=Ne(),rh=ut(),Tb=vb(Oe()),_b=C(),bb=ce(),wb=new RegExp(`(this|next|last|past)\\s*(${bb.matchAnyPattern(th.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),Db=1,Eb=2,nh=class extends _b.AbstractParserWithWordBoundaryChecking{innerPattern(){return wb}innerExtract(e,t){let r=t[Db].toLowerCase(),i=t[Eb].toLowerCase(),s=th.TIME_UNIT_DICTIONARY[i];if(r=="next"){let u={};return u[s]=1,rh.ParsingComponents.createRelativeFromRefDate(e.refDate,u)}if(r=="last"||r=="past"){let u={};return u[s]=-1,rh.ParsingComponents.createRelativeFromRefDate(e.refDate,u)}let a=e.createParsingComponents(),o=Tb.default(e.refDate);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Hn.default=nh});var nr=g(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ParsingContext=ln.Chrono=void 0;var Gn=ut(),kb=Eo(),zn=class{constructor(e){e=e||kb.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new zn({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,r){let i=this.parse(e,t,r);return i.length>0?i[0].start.date():null}parse(e,t,r){let i=new Do(e,t||new Date,r||{}),s=[];return this.parsers.forEach(a=>{let o=zn.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let r=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let d=null;l instanceof Gn.ParsingResult?d=l:l instanceof Gn.ParsingComponents?(d=e.createParsingResult(o.index,o[0]),d.start=l):d=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${d}`)),r.push(d),a=s.substring(u+d.text.length),o=i.exec(a)}return r}};ln.Chrono=zn;var Do=class{constructor(e,t,r){this.text=e,this.refDate=t,this.option=r}createParsingComponents(e){return e instanceof Gn.ParsingComponents?e:new Gn.ParsingComponents(this.refDate,e)}createParsingResult(e,t,r,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=r?this.createParsingComponents(r):null,o=i?this.createParsingComponents(i):null;return new Gn.ParsingResult(this.refDate,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};ln.ParsingContext=Do});var cn=g(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});var sh=Be(),Mb=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"),ds=1,ah=5,oh=2,uh=3,ko=4,lh=class{constructor(e){this.groupNumberMonth=e?uh:oh,this.groupNumberDay=e?oh:uh}pattern(){return Mb}extract(e,t){if(t[ds]=="/"||t[ah]=="/"){t.index+=t[0].length;return}let r=t.index+t[ds].length,i=t[0].substr(t[ds].length,t[0].length-t[ds].length-t[ah].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[ko]&&t[0].indexOf("/")<0)return;let s=e.createParsingResult(r,i),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),t[ko]){let u=parseInt(t[ko]),l=sh.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=sh.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};Mo.default=lh});var fh=g(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});var ch=Ne(),Ob=ut(),Rb=C(),Pb=tn(),Sb=new RegExp(`(this|last|past|next|\\+|-)\\s*(${ch.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),dh=class extends Rb.AbstractParserWithWordBoundaryChecking{innerPattern(){return Sb}innerExtract(e,t){let r=t[1].toLowerCase(),i=ch.parseTimeUnits(t[2]);switch(r){case"last":case"past":case"-":i=Pb.reverseTimeUnits(i);break}return Ob.ParsingComponents.createRelativeFromRefDate(e.refDate,i)}};Oo.default=dh});var Eo=g(ye=>{"use strict";var Pe=ye&&ye.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ye,"__esModule",{value:!0});ye.createConfiguration=ye.createCasualConfiguration=ye.parseDate=ye.parse=ye.GB=ye.strict=ye.casual=void 0;var xb=Pe(Wd()),Ab=Pe(Hd()),Nb=Pe(Jd()),Cb=Pe(tf()),Ib=Pe(af()),Fb=Pe(uf()),Lb=Pe(ff()),Wb=Pe(mf()),Ub=Pe(yf()),Yb=Pe(bf()),qb=Pe(Mf()),jb=on(),$b=Pe(zf()),Bb=Pe(Zf()),Hb=Pe(eh()),Gb=Pe(ih()),Ro=nr(),zb=Pe(cn()),Vb=Pe(fh());ye.casual=new Ro.Chrono(hh(!1));ye.strict=new Ro.Chrono(fs(!0,!1));ye.GB=new Ro.Chrono(fs(!1,!0));function Zb(n,e,t){return ye.casual.parse(n,e,t)}ye.parse=Zb;function Kb(n,e,t){return ye.casual.parseDate(n,e,t)}ye.parseDate=Kb;function hh(n=!1){let e=fs(!1,n);return e.parsers.unshift(new $b.default),e.parsers.unshift(new Bb.default),e.parsers.unshift(new Cb.default),e.parsers.unshift(new Gb.default),e.parsers.unshift(new Vb.default),e}ye.createCasualConfiguration=hh;function fs(n=!0,e=!1){return jb.includeCommonConfiguration({parsers:[new zb.default(e),new xb.default,new Ab.default,new Nb.default,new Hb.default,new Ib.default,new Fb.default,new Lb.default(n),new Wb.default(n),new Ub.default(n)],refiners:[new qb.default,new Yb.default]},n)}ye.createConfiguration=fs});var yh=g(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});var Jb=Xr(),mh=Re(),ph=class extends Jb.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}primarySuffix(){return"(?:\\s*uhr)?(?:\\s*(?:morgens|vormittags|nachmittags|abends|nachts))?(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let r=super.extractPrimaryTimeComponents(e,t);return r&&((t[0].endsWith("morgens")||t[0].endsWith("vormittags"))&&(r.assign("meridiem",mh.Meridiem.AM),r.get("hour")<12&&r.assign("hour",r.get("hour"))),(t[0].endsWith("nachmittags")||t[0].endsWith("abends")||t[0].endsWith("nachts"))&&(r.assign("meridiem",mh.Meridiem.PM),r.get("hour")<12&&r.assign("hour",r.get("hour")+12))),r}};Po.default=ph});var hs=g(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.parseTimeUnits=te.TIME_UNITS_PATTERN=te.parseYear=te.YEAR_PATTERN=te.parseNumberPattern=te.NUMBER_PATTERN=te.TIME_UNIT_DICTIONARY=te.INTEGER_WORD_DICTIONARY=te.MONTH_DICTIONARY=te.WEEKDAY_DICTIONARY=void 0;var So=ce(),Qb=Be();te.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};te.MONTH_DICTIONARY={januar:1,jan:1,"jan.":1,februar:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};te.INTEGER_WORD_DICTIONARY={eins:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};te.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",y:"year",yr:"year",year:"year",years:"year"};te.NUMBER_PATTERN=`(?:${So.matchAnyPattern(te.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function gh(n){let e=n.toLowerCase();return te.INTEGER_WORD_DICTIONARY[e]!==void 0?te.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)}te.parseNumberPattern=gh;te.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*C(?:hr)?\\.?)?)";function Xb(n){if(/v/i.test(n))return-parseInt(n.replace(/[^0-9]+/gi,""));if(/n/i.test(n))return parseInt(n.replace(/[^0-9]+/gi,""));let e=parseInt(n);return Qb.findMostLikelyADYear(e)}te.parseYear=Xb;var vh=`(${te.NUMBER_PATTERN})\\s{0,5}(${So.matchAnyPattern(te.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Th=new RegExp(vh,"i");te.TIME_UNITS_PATTERN=So.repeatedTimeunitPattern("",vh);function e0(n){let e={},t=n,r=Th.exec(t);for(;r;)t0(e,r),t=t.substring(r[0].length),r=Th.exec(t);return e}te.parseTimeUnits=e0;function t0(n,e){let t=gh(e[1]),r=te.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];n[r]=t}});var wh=g(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});var _h=hs(),r0=ce(),n0=C(),i0=un(),s0=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${r0.matchAnyPattern(_h.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),a0=1,o0=3,u0=2,bh=class extends n0.AbstractParserWithWordBoundaryChecking{innerPattern(){return s0}innerExtract(e,t){let r=t[u0].toLowerCase(),i=_h.WEEKDAY_DICTIONARY[r],s=t[a0],a=t[o0],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=i0.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};xo.default=bh});var Eh=g(Vn=>{"use strict";var l0=Vn&&Vn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Vn,"__esModule",{value:!0});var c0=l0(kr()),Dh=class extends c0.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};Vn.default=Dh});var Mh=g(Zn=>{"use strict";var d0=Zn&&Zn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Zn,"__esModule",{value:!0});var f0=d0(sn()),kh=class extends f0.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};Zn.default=kh});var Ao=g(Kn=>{"use strict";var h0=Kn&&Kn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Kn,"__esModule",{value:!0});var m0=h0(Oe()),Rr=Re(),p0=C(),y0=gt(),g0=tn(),ms=class extends p0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let r=m0.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return y0.implySimilarTime(s,r),ms.extractTimeComponents(s,i)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Rr.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Rr.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Rr.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Rr.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Rr.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Rr.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=g0.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Rr.Meridiem.AM);break}return e}};Kn.default=ms});var Sh=g(Tt=>{"use strict";var v0=Tt&&Tt.__createBinding||(Object.create?function(n,e,t,r){r===void 0&&(r=t),Object.defineProperty(n,r,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}),T0=Tt&&Tt.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),_0=Tt&&Tt.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.prototype.hasOwnProperty.call(n,t)&&v0(e,n,t);return T0(e,n),e},Oh=Tt&&Tt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Tt,"__esModule",{value:!0});var b0=Oh(Oe()),w0=C(),Pr=gt(),D0=Oh(Ao()),Rh=_0(Or()),E0=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),k0=1,M0=2,Ph=class extends w0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return E0}innerExtract(e,t){let r=b0.default(e.refDate),i=(t[k0]||"").toLowerCase(),s=(t[M0]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=Rh.now(e.refDate);break;case"heute":a=Rh.today(e.refDate);break;case"morgen":Pr.assignTheNextDay(a,r);break;case"\xFCbermorgen":case"uebermorgen":r=r.add(1,"day"),Pr.assignTheNextDay(a,r);break;case"gestern":r=r.add(-1,"day"),Pr.assignSimilarDate(a,r),Pr.implySimilarTime(a,r);break;case"vorgestern":r=r.add(-2,"day"),Pr.assignSimilarDate(a,r),Pr.implySimilarTime(a,r);break;default:i.match(/letzte\s*nacht/)&&(r.hour()>6&&(r=r.add(-1,"day")),Pr.assignSimilarDate(a,r),a.imply("hour",0));break}return s&&(a=D0.default.extractTimeComponents(a,s)),a}};Tt.default=Ph});var Lh=g(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});var O0=Be(),xh=hs(),Ah=hs(),R0=ce(),P0=C(),S0=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${R0.matchAnyPattern(xh.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Ah.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Nh=1,Ch=2,x0=3,Ih=4,Fh=class extends P0.AbstractParserWithWordBoundaryChecking{innerPattern(){return S0}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),i=xh.MONTH_DICTIONARY[t[x0].toLowerCase()],s=parseInt(t[Nh]);if(s>31)return t.index=t.index+t[Nh].length,null;if(r.start.assign("month",i),r.start.assign("day",s),t[Ih]){let a=Ah.parseYear(t[Ih]);r.start.assign("year",a)}else{let a=O0.findYearClosestToRef(e.refDate,s,i);r.start.imply("year",a)}if(t[Ch]){let a=parseInt(t[Ch]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};No.default=Fh});var Yh=g(be=>{"use strict";var Lt=be&&be.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(be,"__esModule",{value:!0});be.createConfiguration=be.createCasualConfiguration=be.parseDate=be.parse=be.strict=be.casual=void 0;var A0=on(),Wh=nr(),N0=Lt(cn()),C0=Lt(_o()),I0=Lt(yh()),F0=Lt(wh()),L0=Lt(Eh()),W0=Lt(Mh()),U0=Lt(Sh()),Y0=Lt(Ao()),q0=Lt(Lh());be.casual=new Wh.Chrono(Uh());be.strict=new Wh.Chrono(Co(!0));function j0(n,e,t){return be.casual.parse(n,e,t)}be.parse=j0;function $0(n,e,t){return be.casual.parseDate(n,e,t)}be.parseDate=$0;function Uh(n=!0){let e=Co(!1,n);return e.parsers.unshift(new Y0.default),e.parsers.unshift(new U0.default),e}be.createCasualConfiguration=Uh;function Co(n=!0,e=!0){return A0.includeCommonConfiguration({parsers:[new C0.default,new N0.default(e),new I0.default,new q0.default,new F0.default],refiners:[new L0.default,new W0.default]},n)}be.createConfiguration=Co});var $h=g(_t=>{"use strict";var B0=_t&&_t.__createBinding||(Object.create?function(n,e,t,r){r===void 0&&(r=t),Object.defineProperty(n,r,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}),H0=_t&&_t.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),G0=_t&&_t.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.prototype.hasOwnProperty.call(n,t)&&B0(e,n,t);return H0(e,n),e},z0=_t&&_t.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(_t,"__esModule",{value:!0});var V0=z0(Oe()),Z0=Re(),K0=C(),qh=gt(),ps=G0(Or()),jh=class extends K0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let r=V0.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return ps.now(e.refDate);case"aujourd'hui":return ps.today(e.refDate);case"hier":return ps.yesterday(e.refDate);case"demain":return ps.tomorrow(e.refDate);default:i.match(/cette\s*nuit/)?(qh.assignSimilarDate(s,r),s.imply("hour",22),s.imply("meridiem",Z0.Meridiem.PM)):i.match(/la\s*veille/)&&(r=r.add(-1,"day"),qh.assignSimilarDate(s,r),s.imply("hour",0))}return s}};_t.default=jh});var Hh=g(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});var Jn=Re(),J0=C(),Bh=class extends J0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let r=t[2].toLowerCase(),i=e.createParsingComponents();switch(r){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",Jn.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",Jn.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",Jn.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",Jn.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",Jn.Meridiem.AM);break}return i}};Io.default=Bh});var zh=g(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});var Q0=Xr(),Gh=class extends Q0.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)}};Fo.default=Gh});var Zh=g(Qn=>{"use strict";var X0=Qn&&Qn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Qn,"__esModule",{value:!0});var ew=X0(sn()),Vh=class extends ew.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};Qn.default=Vh});var Jh=g(Xn=>{"use strict";var tw=Xn&&Xn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Xn,"__esModule",{value:!0});var rw=tw(kr()),Kh=class extends rw.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Xn.default=Kh});var ir=g(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.parseTimeUnits=V.TIME_UNITS_PATTERN=V.parseYear=V.YEAR_PATTERN=V.parseOrdinalNumberPattern=V.ORDINAL_NUMBER_PATTERN=V.parseNumberPattern=V.NUMBER_PATTERN=V.TIME_UNIT_DICTIONARY=V.INTEGER_WORD_DICTIONARY=V.MONTH_DICTIONARY=V.WEEKDAY_DICTIONARY=void 0;var Lo=ce();V.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};V.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};V.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};V.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"};V.NUMBER_PATTERN=`(?:${Lo.matchAnyPattern(V.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?|quelques?|demi-?)`;function Qh(n){let e=n.toLowerCase();return V.INTEGER_WORD_DICTIONARY[e]!==void 0?V.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}V.parseNumberPattern=Qh;V.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function nw(n){let e=n.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}V.parseOrdinalNumberPattern=nw;V.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 iw(n){if(/AC/i.test(n))return n=n.replace(/BC/i,""),-parseInt(n);if(/AD/i.test(n)||/C/i.test(n))return n=n.replace(/[^\d]+/i,""),parseInt(n);let e=parseInt(n);return e<100&&(e>50?e=e+1900:e=e+2e3),e}V.parseYear=iw;var Xh=`(${V.NUMBER_PATTERN})\\s{0,5}(${Lo.matchAnyPattern(V.TIME_UNIT_DICTIONARY)})\\s{0,5}`,em=new RegExp(Xh,"i");V.TIME_UNITS_PATTERN=Lo.repeatedTimeunitPattern("",Xh);function sw(n){let e={},t=n,r=em.exec(t);for(;r;)aw(e,r),t=t.substring(r[0].length),r=em.exec(t);return e}V.parseTimeUnits=sw;function aw(n,e){let t=Qh(e[1]),r=V.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];n[r]=t}});var nm=g(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});var tm=ir(),ow=ce(),uw=C(),lw=un(),cw=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${ow.matchAnyPattern(tm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),dw=1,fw=2,rm=class extends uw.AbstractParserWithWordBoundaryChecking{innerPattern(){return cw}innerExtract(e,t){let r=t[dw].toLowerCase(),i=tm.WEEKDAY_DICTIONARY[r];if(i===void 0)return null;let s=t[fw];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=lw.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};Wo.default=rm});var om=g(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});var ei=Re(),hw=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"),mw=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"),pw=2,im=3,sm=4,am=5,ti=class{pattern(e){return hw}extract(e,t){let r=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(r.text.match(/^\d{4}$/)||(r.start=ti.extractTimeComponent(r.start.clone(),t),!r.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=mw.exec(i);return s&&(r.end=ti.extractTimeComponent(r.start.clone(),s),r.end&&(r.text+=s[0])),r}static extractTimeComponent(e,t){let r=0,i=0,s=null;if(r=parseInt(t[pw]),t[im]!=null&&(i=parseInt(t[im])),i>=60||r>24)return null;if(r>=12&&(s=ei.Meridiem.PM),t[am]!=null){if(r>12)return null;let a=t[am][0].toLowerCase();a=="a"&&(s=ei.Meridiem.AM,r==12&&(r=0)),a=="p"&&(s=ei.Meridiem.PM,r!=12&&(r+=12))}if(e.assign("hour",r),e.assign("minute",i),s!==null?e.assign("meridiem",s):r<12?e.imply("meridiem",ei.Meridiem.AM):e.imply("meridiem",ei.Meridiem.PM),t[sm]!=null){let a=parseInt(t[sm]);if(a>=60)return null;e.assign("second",a)}return e}};Uo.default=ti});var mm=g(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});var yw=Be(),um=ir(),lm=ir(),ys=ir(),gw=ce(),vw=C(),Tw=new RegExp(`(?:on\\s*?)?(${ys.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${ys.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${gw.matchAnyPattern(um.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${lm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),cm=1,dm=2,_w=3,fm=4,hm=class extends vw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Tw}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),i=um.MONTH_DICTIONARY[t[_w].toLowerCase()],s=ys.parseOrdinalNumberPattern(t[cm]);if(s>31)return t.index=t.index+t[cm].length,null;if(r.start.assign("month",i),r.start.assign("day",s),t[fm]){let a=lm.parseYear(t[fm]);r.start.assign("year",a)}else{let a=yw.findYearClosestToRef(e.refDate,s,i);r.start.imply("year",a)}if(t[dm]){let a=ys.parseOrdinalNumberPattern(t[dm]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};Yo.default=hm});var gm=g(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});var pm=ir(),bw=ut(),ww=C(),Dw=tn(),ym=class extends ww.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${pm.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let r=pm.parseTimeUnits(t[1]),i=Dw.reverseTimeUnits(r);return bw.ParsingComponents.createRelativeFromRefDate(e.refDate,i)}};qo.default=ym});var _m=g(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});var vm=ir(),Ew=ut(),kw=C(),Tm=class extends kw.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant)\\s*(${vm.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let r=vm.parseTimeUnits(t[1]);return Ew.ParsingComponents.createRelativeFromRefDate(e.refDate,r)}};jo.default=Tm});var wm=g($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});var gs=ir(),Mw=ut(),Ow=C(),Rw=tn(),Pw=ce(),bm=class extends Ow.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${gs.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${Pw.matchAnyPattern(gs.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 r=t[1]?gs.parseNumberPattern(t[1]):1,i=gs.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],s={};s[i]=r;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=Rw.reverseTimeUnits(s)),Mw.ParsingComponents.createRelativeFromRefDate(e.refDate,s)}};$o.default=bm});var km=g(we=>{"use strict";var lt=we&&we.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(we,"__esModule",{value:!0});we.createConfiguration=we.createCasualConfiguration=we.parseDate=we.parse=we.strict=we.casual=void 0;var Sw=on(),Dm=nr(),xw=lt($h()),Aw=lt(Hh()),Nw=lt(cn()),Cw=lt(zh()),Iw=lt(Zh()),Fw=lt(Jh()),Lw=lt(nm()),Ww=lt(om()),Uw=lt(mm()),Yw=lt(gm()),qw=lt(_m()),jw=lt(wm());we.casual=new Dm.Chrono(Em());we.strict=new Dm.Chrono(Bo(!0));function $w(n,e,t){return we.casual.parse(n,e,t)}we.parse=$w;function Bw(n,e,t){return we.casual.parseDate(n,e,t)}we.parseDate=Bw;function Em(n=!0){let e=Bo(!1,n);return e.parsers.unshift(new xw.default),e.parsers.unshift(new Aw.default),e.parsers.unshift(new jw.default),e}we.createCasualConfiguration=Em;function Bo(n=!0,e=!0){return Sw.includeCommonConfiguration({parsers:[new Nw.default(e),new Uw.default,new Cw.default,new Ww.default,new Yw.default,new qw.default,new Lw.default],refiners:[new Iw.default,new Fw.default]},n)}we.createConfiguration=Bo});var Mm=g(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.toHankaku=void 0;function Hw(n){return String(n).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,Gw)}vs.toHankaku=Hw;function Gw(n){return String.fromCharCode(n.charCodeAt(0)-65248)}});var Pm=g(ri=>{"use strict";var zw=ri&&ri.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ri,"__esModule",{value:!0});var Ho=Mm(),Vw=Be(),Zw=zw(Oe()),Kw=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,Om=1,Jw=2,Go=3,Qw=4,Xw=5,e1=6,Rm=class{pattern(){return Kw}extract(e,t){let r=parseInt(Ho.toHankaku(t[Xw])),i=parseInt(Ho.toHankaku(t[e1])),s=e.createParsingComponents({day:i,month:r});if(t[Om]&&t[Om].match("\u540C|\u4ECA|\u672C")){let a=Zw.default(e.refDate);s.assign("year",a.year())}if(t[Jw]){let a=t[Qw],o=a=="\u5143"?1:parseInt(Ho.toHankaku(a));t[Go]=="\u4EE4\u548C"?o+=2018:t[Go]=="\u5E73\u6210"?o+=1988:t[Go]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=Vw.findYearClosestToRef(e.refDate,i,r);s.imply("year",a)}return s}};ri.default=Rm});var xm=g(ni=>{"use strict";var t1=ni&&ni.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ni,"__esModule",{value:!0});var r1=t1(kr()),Sm=class extends r1.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};ni.default=Sm});var Cm=g(bt=>{"use strict";var n1=bt&&bt.__createBinding||(Object.create?function(n,e,t,r){r===void 0&&(r=t),Object.defineProperty(n,r,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}),i1=bt&&bt.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),s1=bt&&bt.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.prototype.hasOwnProperty.call(n,t)&&n1(e,n,t);return i1(e,n),e},a1=bt&&bt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(bt,"__esModule",{value:!0});var o1=a1(Oe()),Am=Re(),zo=s1(Or()),u1=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Nm=class{pattern(){return u1}extract(e,t){let r=t[0],i=o1.default(e.refDate),s=e.createParsingComponents();switch(r){case"\u6628\u65E5":return zo.yesterday(e.refDate);case"\u660E\u65E5":return zo.tomorrow(e.refDate);case"\u4ECA\u65E5":case"\u5F53\u65E5":return zo.today(e.refDate)}return r=="\u4ECA\u591C"||r=="\u4ECA\u5915"||r=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",Am.Meridiem.PM)):r.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",Am.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};bt.default=Nm});var Lm=g(De=>{"use strict";var Vo=De&&De.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(De,"__esModule",{value:!0});De.createConfiguration=De.createCasualConfiguration=De.parseDate=De.parse=De.strict=De.casual=void 0;var l1=Vo(Pm()),c1=Vo(xm()),d1=Vo(Cm()),Im=nr();De.casual=new Im.Chrono(Fm());De.strict=new Im.Chrono(Zo());function f1(n,e,t){return De.casual.parse(n,e,t)}De.parse=f1;function h1(n,e,t){return De.casual.parseDate(n,e,t)}De.parseDate=h1;function Fm(){let n=Zo();return n.parsers.unshift(new d1.default),n}De.createCasualConfiguration=Fm;function Zo(){return{parsers:[new l1.default],refiners:[new c1.default]}}De.createConfiguration=Zo});var Ts=g(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.parseYear=Pt.YEAR_PATTERN=Pt.MONTH_DICTIONARY=Pt.WEEKDAY_DICTIONARY=void 0;Pt.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};Pt.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};Pt.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function m1(n){if(n.match(/^[0-9]{1,4}$/)){let e=parseInt(n);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return n.match(/a\.?\s*c\.?/i)?(n=n.replace(/a\.?\s*c\.?/i,""),-parseInt(n)):parseInt(n)}Pt.parseYear=m1});var Ym=g(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});var Wm=Ts(),p1=ce(),y1=C(),g1=un(),v1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${p1.matchAnyPattern(Wm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),T1=1,_1=2,b1=3,Um=class extends y1.AbstractParserWithWordBoundaryChecking{innerPattern(){return v1}innerExtract(e,t){let r=t[_1].toLowerCase(),i=Wm.WEEKDAY_DICTIONARY[r];if(i===void 0)return null;let s=t[T1],a=t[b1],o=s||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=g1.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Ko.default=Um});var jm=g(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});var w1=Xr(),qm=class extends w1.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Jo.default=qm});var Bm=g(ii=>{"use strict";var D1=ii&&ii.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ii,"__esModule",{value:!0});var E1=D1(sn()),$m=class extends E1.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};ii.default=$m});var Gm=g(si=>{"use strict";var k1=si&&si.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(si,"__esModule",{value:!0});var M1=k1(kr()),Hm=class extends M1.default{patternBetween(){return/^\s*(?:-)\s*$/i}};si.default=Hm});var Xm=g(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});var O1=Be(),zm=Ts(),Vm=Ts(),R1=ce(),P1=C(),S1=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*)(${R1.matchAnyPattern(zm.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Vm.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Zm=1,Km=2,x1=3,Jm=4,Qm=class extends P1.AbstractParserWithWordBoundaryChecking{innerPattern(){return S1}innerExtract(e,t){let r=e.createParsingResult(t.index,t[0]),i=zm.MONTH_DICTIONARY[t[x1].toLowerCase()],s=parseInt(t[Zm]);if(s>31)return t.index=t.index+t[Zm].length,null;if(r.start.assign("month",i),r.start.assign("day",s),t[Jm]){let a=Vm.parseYear(t[Jm]);r.start.assign("year",a)}else{let a=O1.findYearClosestToRef(e.refDate,s,i);r.start.imply("year",a)}if(t[Km]){let a=parseInt(t[Km]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};Qo.default=Qm});var tp=g(Wt=>{"use strict";var A1=Wt&&Wt.__createBinding||(Object.create?function(n,e,t,r){r===void 0&&(r=t),Object.defineProperty(n,r,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}),N1=Wt&&Wt.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),C1=Wt&&Wt.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.prototype.hasOwnProperty.call(n,t)&&A1(e,n,t);return N1(e,n),e};Object.defineProperty(Wt,"__esModule",{value:!0});var I1=C(),_s=C1(Or()),ep=class extends I1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let r=t[0].toLowerCase(),i=e.createParsingComponents();switch(r){case"agora":return _s.now(e.refDate);case"hoje":return _s.today(e.refDate);case"amanha":case"amanh\xE3":return _s.tomorrow(e.refDate);case"ontem":return _s.yesterday(e.refDate)}return i}};Wt.default=ep});var np=g(ai=>{"use strict";var F1=ai&&ai.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ai,"__esModule",{value:!0});var bs=Re(),L1=C(),W1=gt(),U1=F1(Oe()),rp=class extends L1.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let r=U1.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",bs.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",bs.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",bs.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":W1.assignTheNextDay(i,r),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",bs.Meridiem.AM),i.imply("hour",12);break}return i}};ai.default=rp});var ap=g(Ee=>{"use strict";var sr=Ee&&Ee.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.createConfiguration=Ee.createCasualConfiguration=Ee.parseDate=Ee.parse=Ee.strict=Ee.casual=void 0;var Y1=on(),ip=nr(),q1=sr(cn()),j1=sr(Ym()),$1=sr(jm()),B1=sr(Bm()),H1=sr(Gm()),G1=sr(Xm()),z1=sr(tp()),V1=sr(np());Ee.casual=new ip.Chrono(sp());Ee.strict=new ip.Chrono(Xo(!0));function Z1(n,e,t){return Ee.casual.parse(n,e,t)}Ee.parse=Z1;function K1(n,e,t){return Ee.casual.parseDate(n,e,t)}Ee.parseDate=K1;function sp(n=!0){let e=Xo(!1,n);return e.parsers.push(new z1.default),e.parsers.push(new V1.default),e}Ee.createCasualConfiguration=sp;function Xo(n=!0,e=!0){return Y1.includeCommonConfiguration({parsers:[new q1.default(e),new j1.default,new $1.default,new G1.default],refiners:[new B1.default,new H1.default]},n)}Ee.createConfiguration=Xo});var up=g(oi=>{"use strict";var J1=oi&&oi.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(oi,"__esModule",{value:!0});var Q1=J1(kr()),op=class extends Q1.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};oi.default=op});var cp=g(ui=>{"use strict";var X1=ui&&ui.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ui,"__esModule",{value:!0});var eD=X1(sn()),lp=class extends eD.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};ui.default=lp});var fp=g(Ut=>{"use strict";var tD=Ut&&Ut.__createBinding||(Object.create?function(n,e,t,r){r===void 0&&(r=t),Object.defineProperty(n,r,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}),rD=Ut&&Ut.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),nD=Ut&&Ut.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.prototype.hasOwnProperty.call(n,t)&&tD(e,n,t);return rD(e,n),e};Object.defineProperty(Ut,"__esModule",{value:!0});var iD=C(),ws=nD(Or()),dp=class extends iD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let r=t[0].toLowerCase(),i=e.createParsingComponents();switch(r){case"nu":return ws.now(e.refDate);case"vandaag":return ws.today(e.refDate);case"morgen":case"morgend":return ws.tomorrow(e.refDate);case"gisteren":return ws.yesterday(e.refDate)}return i}};Ut.default=dp});var mp=g(li=>{"use strict";var sD=li&&li.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(li,"__esModule",{value:!0});var Ds=Re(),aD=C(),oD=sD(Oe()),uD=gt(),lD=1,cD=2,hp=class extends aD.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let r=oD.default(e.refDate),i=e.createParsingComponents();switch(t[lD]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[cD].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",Ds.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",Ds.Meridiem.PM),i.imply("hour",20);break;case"middernacht":uD.assignTheNextDay(i,r),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",Ds.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",Ds.Meridiem.AM),i.imply("hour",12);break}return i}};li.default=hp});var Yt=g(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.parseTimeUnits=L.TIME_UNITS_PATTERN=L.parseYear=L.YEAR_PATTERN=L.parseOrdinalNumberPattern=L.ORDINAL_NUMBER_PATTERN=L.parseNumberPattern=L.NUMBER_PATTERN=L.TIME_UNIT_DICTIONARY=L.ORDINAL_WORD_DICTIONARY=L.INTEGER_WORD_DICTIONARY=L.MONTH_DICTIONARY=L.WEEKDAY_DICTIONARY=void 0;var Es=ce(),dD=Be();L.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};L.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};L.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};L.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};L.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuten:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};L.NUMBER_PATTERN=`(?:${Es.matchAnyPattern(L.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|een?|halve?)`;function pp(n){let e=n.toLowerCase();return L.INTEGER_WORD_DICTIONARY[e]!==void 0?L.INTEGER_WORD_DICTIONARY[e]:e==="een"?1:e.match(/halve?/)?.5:parseFloat(e)}L.parseNumberPattern=pp;L.ORDINAL_NUMBER_PATTERN=`(?:${Es.matchAnyPattern(L.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function fD(n){let e=n.toLowerCase();return L.ORDINAL_WORD_DICTIONARY[e]!==void 0?L.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}L.parseOrdinalNumberPattern=fD;L.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function hD(n){if(/voor Christus/i.test(n))return n=n.replace(/voor Christus/i,""),-parseInt(n);if(/na Christus/i.test(n))return n=n.replace(/na Christus/i,""),parseInt(n);let e=parseInt(n);return dD.findMostLikelyADYear(e)}L.parseYear=hD;var yp=`(${L.NUMBER_PATTERN})\\s{0,5}(${Es.matchAnyPattern(L.TIME_UNIT_DICTIONARY)})\\s{0,5}`,gp=new RegExp(yp,"i");L.TIME_UNITS_PATTERN=Es.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",yp);function mD(n){let e={},t=n,r=gp.exec(t);for(;r;)pD(e,r),t=t.substring(r[0].length),r=gp.exec(t);return e}L.parseTimeUnits=mD;function pD(n,e){let t=pp(e[1]),r=L.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];n[r]=t}});var _p=g(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});var vp=Yt(),yD=ut(),gD=C(),Tp=class extends gD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+vp.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let r=vp.parseTimeUnits(t[1]);return yD.ParsingComponents.createRelativeFromRefDate(e.refDate,r)}};eu.default=Tp});var Dp=g(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});var bp=Yt(),vD=ce(),TD=C(),_D=un(),bD=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${vD.matchAnyPattern(bp.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),wD=1,DD=2,ED=3,wp=class extends TD.AbstractParserWithWordBoundaryChecking{innerPattern(){return bD}innerExtract(e,t){let r=t[DD].toLowerCase(),i=bp.WEEKDAY_DICTIONARY[r],s=t[wD],a=t[ED],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=_D.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};tu.default=wp});var Sp=g(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});var kD=Be(),Ep=Yt(),ks=Yt(),kp=Yt(),MD=ce(),OD=C(),RD=new RegExp(`(?:on\\s*?)?(${ks.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${ks.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+MD.matchAnyPattern(Ep.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${kp.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),PD=3,Mp=1,Op=2,Rp=4,Pp=class extends OD.AbstractParserWithWordBoundaryChecking{innerPattern(){return RD}innerExtract(e,t){let r=Ep.MONTH_DICTIONARY[t[PD].toLowerCase()],i=ks.parseOrdinalNumberPattern(t[Mp]);if(i>31)return t.index=t.index+t[Mp].length,null;let s=e.createParsingComponents({day:i,month:r});if(t[Rp]){let u=kp.parseYear(t[Rp]);s.assign("year",u)}else{let u=kD.findYearClosestToRef(e.refDate,i,r);s.imply("year",u)}if(!t[Op])return s;let a=ks.parseOrdinalNumberPattern(t[Op]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};ru.default=Pp});var Ip=g(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});var xp=Yt(),SD=Be(),xD=ce(),Ap=Yt(),AD=C(),ND=new RegExp(`(${xD.matchAnyPattern(xp.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Ap.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),CD=1,Np=2,Cp=class extends AD.AbstractParserWithWordBoundaryChecking{innerPattern(){return ND}innerExtract(e,t){let r=e.createParsingComponents();r.imply("day",1);let i=t[CD],s=xp.MONTH_DICTIONARY[i.toLowerCase()];if(r.assign("month",s),t[Np]){let a=Ap.parseYear(t[Np]);r.assign("year",a)}else{let a=SD.findYearClosestToRef(e.refDate,1,s);r.imply("year",a)}return r}};nu.default=Cp});var Lp=g(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});var ID=C(),FD=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),LD=1,WD=2,Fp=class extends ID.AbstractParserWithWordBoundaryChecking{innerPattern(){return FD}innerExtract(e,t){let r=parseInt(t[WD]),i=parseInt(t[LD]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",r)}};iu.default=Fp});var Up=g(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});var UD=Xr(),Wp=class extends UD.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};su.default=Wp});var $p=g(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});var Yp=Yt(),YD=ce(),qD=C(),jD=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${YD.matchAnyPattern(Yp.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),$D=1,BD=2,qp=3,HD=4,jp=class extends qD.AbstractParserWithWordBoundaryChecking{innerPattern(){return jD}innerExtract(e,t){let r=t[qp]?parseInt(t[qp]):Yp.MONTH_DICTIONARY[t[BD].toLowerCase()];if(r<1||r>12)return null;let i=parseInt(t[$D]);return{day:parseInt(t[HD]),month:r,year:i}}};au.default=jp});var Hp=g(ci=>{"use strict";var GD=ci&&ci.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ci,"__esModule",{value:!0});var zD=C(),Ms=Re(),ou=gt(),VD=GD(Oe()),ZD=1,KD=2,Bp=class extends zD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let r=t[ZD].toLowerCase(),i=t[KD].toLowerCase(),s=e.createParsingComponents(),a=VD.default(e.refDate);switch(r){case"gisteren":ou.assignSimilarDate(s,a.add(-1,"day"));break;case"van":ou.assignSimilarDate(s,a);break;case"morgen":ou.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",Ms.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",Ms.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",Ms.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",Ms.Meridiem.PM),s.imply("hour",20);break}return s}};ci.default=Bp});var Vp=g(ke=>{"use strict";var et=ke&&ke.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ke,"__esModule",{value:!0});ke.createConfiguration=ke.createCasualConfiguration=ke.parseDate=ke.parse=ke.strict=ke.casual=void 0;var JD=on(),Gp=nr(),QD=et(up()),XD=et(cp()),eE=et(fp()),tE=et(mp()),rE=et(cn()),nE=et(_p()),iE=et(Dp()),sE=et(Sp()),aE=et(Ip()),oE=et(Lp()),uE=et(Up()),lE=et($p()),cE=et(Hp());ke.casual=new Gp.Chrono(zp());ke.strict=new Gp.Chrono(uu(!0));function dE(n,e,t){return ke.casual.parse(n,e,t)}ke.parse=dE;function fE(n,e,t){return ke.casual.parseDate(n,e,t)}ke.parseDate=fE;function zp(n=!0){let e=uu(!1,n);return e.parsers.unshift(new eE.default),e.parsers.unshift(new tE.default),e.parsers.unshift(new cE.default),e}ke.createCasualConfiguration=zp;function uu(n=!0,e=!0){return JD.includeCommonConfiguration({parsers:[new rE.default(e),new sE.default,new aE.default,new uE.default,new nE.default,new oE.default,new iE.default,new lE.default],refiners:[new XD.default,new QD.default]},n)}ke.createConfiguration=uu});var Re=g(q=>{"use strict";var hE=q&&q.__createBinding||(Object.create?function(n,e,t,r){r===void 0&&(r=t),Object.defineProperty(n,r,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}),mE=q&&q.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),dn=q&&q.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.prototype.hasOwnProperty.call(n,t)&&hE(e,n,t);return mE(e,n),e};Object.defineProperty(q,"__esModule",{value:!0});q.parseDate=q.parse=q.casual=q.strict=q.nl=q.pt=q.ja=q.fr=q.de=q.Meridiem=q.Chrono=q.en=void 0;var lu=dn(Eo());q.en=lu;var pE=nr();Object.defineProperty(q,"Chrono",{enumerable:!0,get:function(){return pE.Chrono}});var yE;(function(n){n[n.AM=0]="AM",n[n.PM=1]="PM"})(yE=q.Meridiem||(q.Meridiem={}));var gE=dn(Yh());q.de=gE;var vE=dn(km());q.fr=vE;var TE=dn(Lm());q.ja=TE;var _E=dn(ap());q.pt=_E;var bE=dn(Vp());q.nl=bE;q.strict=lu.strict;q.casual=lu.casual;function wE(n,e,t){return q.casual.parse(n,e,t)}q.parse=wE;function DE(n,e,t){return q.casual.parseDate(n,e,t)}q.parseDate=DE});hy(exports,{default:()=>xu});var sy=$e(require("obsidian"));var Vi=$e(require("obsidian"));var xE=new Error("timeout while waiting for mutex to become available"),AE=new Error("mutex already locked"),py=new Error("request for lock canceled"),Xu=function(n,e,t,r){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(d){try{l(r.next(d))}catch(c){a(c)}}function u(d){try{l(r.throw(d))}catch(c){a(c)}}function l(d){d.done?s(d.value):i(d.value).then(o,u)}l((r=r.apply(n,e||[])).next())})},el=class{constructor(e,t=py){if(this._maxConcurrency=e,this._cancelError=t,this._queue=[],this._waiters=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}acquire(){let e=this.isLocked(),t=new Promise((r,i)=>this._queue.push({resolve:r,reject:i}));return e||this._dispatch(),t}runExclusive(e){return Xu(this,void 0,void 0,function*(){let[t,r]=yield this.acquire();try{return yield e(t)}finally{r()}})}waitForUnlock(){return Xu(this,void 0,void 0,function*(){return this.isLocked()?new Promise(t=>this._waiters.push({resolve:t})):Promise.resolve()})}isLocked(){return this._value<=0}release(){if(this._maxConcurrency>1)throw new Error("this method is unavailable on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){let e=this._currentReleaser;this._currentReleaser=void 0,e()}}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatch(){let e=this._queue.shift();if(!e)return;let t=!1;this._currentReleaser=()=>{t||(t=!0,this._value++,this._resolveWaiters(),this._dispatch())},e.resolve([this._value--,this._currentReleaser])}_resolveWaiters(){this._waiters.forEach(e=>e.resolve()),this._waiters=[]}},yy=function(n,e,t,r){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(d){try{l(r.next(d))}catch(c){a(c)}}function u(d){try{l(r.throw(d))}catch(c){a(c)}}function l(d){d.done?s(d.value):i(d.value).then(o,u)}l((r=r.apply(n,e||[])).next())})},Us=class{constructor(e){this._semaphore=new el(1,e)}acquire(){return yy(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var pd=$e(require("obsidian"));var tl=$e(require("obsidian"));var gy={globalFilter:"",removeGlobalFilter:!1,setDoneDate:!0},Ys=Ve({},gy),le=()=>Ve({},Ys),Cr=n=>(Ys=Ve(Ve({},Ys),n),le());var qs,js,rl=({metadataCache:n,vault:e})=>{qs=n,js=e},Mi=t=>ae(void 0,[t],function*({originalTask:n,newTasks:e}){if(js===void 0||qs===void 0){console.error("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),nl({originalTask:n,newTasks:e,vault:js,metadataCache:qs,previousTries:0})}),nl=s=>ae(void 0,[s],function*({originalTask:n,newTasks:e,vault:t,metadataCache:r,previousTries:i}){let a=()=>{if(i>10){console.error("Tasks: Too many retries. File update not possible ...");return}let y=Math.min(Math.pow(10,i),100);setTimeout(()=>{nl({originalTask:n,newTasks:e,vault:t,metadataCache:r,previousTries:i+1})},y)},o=t.getAbstractFileByPath(n.path);if(!(o instanceof tl.TFile))return console.warn(`Tasks: No file found for task ${n.description}. Retrying ...`),a();if(o.extension!=="md"){console.error("Tasks: Only supporting files with the .md file extension.");return}let u=r.getFileCache(o);if(u==null||u===null)return console.warn(`Tasks: No file cache found for file ${o.path}. Retrying ...`),a();let l=u.listItems;if(l===void 0||l.length===0)return console.warn(`Tasks: No list items found in file cache of ${o.path}. Retrying ...`),a();let c=(yield t.read(o)).split(` `),{globalFilter:f}=le(),h,m=0;for(let y of l){if(y.position.start.liney.toFileLineString()),...c.slice(h.position.start.line+1)];yield t.modify(o,p.join(` `))});var gn=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.shortMode=!1}};var Oi=["MO","TU","WE","TH","FR","SA","SU"],me=function(){function n(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return n.fromStr=function(e){return new n(Oi.indexOf(e))},n.prototype.nth=function(e){return this.n===e?this:new n(this.weekday,e)},n.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},n.prototype.toString=function(){var e=Oi[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},n.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},n}();var re=function(n){return n!=null},Ze=function(n){return typeof n=="number"},$s=function(n){return Oi.indexOf(n)>=0},Me=Array.isArray,rt=function(n,e){e===void 0&&(e=n),arguments.length===1&&(e=n,n=0);for(var t=[],r=n;r>0,r.length>e?String(r):(e=e-r.length,e>t.length&&(t+=U(t,e/t.length)),t.slice(0,e)+String(r))}var sl=function(n,e,t){var r=n.split(e);return t?r.slice(0,t).concat([r.slice(t).join(e)]):r},Se=function(n,e){var t=n%e;return t*e<0?t+e:t},Ri=function(n,e){return{div:Math.floor(n/e),mod:Se(n,e)}},Ke=function(n){return!re(n)||n.length===0},de=function(n){return!Ke(n)},Y=function(n,e){return de(n)&&n.indexOf(e)!==-1};var Bt;(function(n){n.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],n.ONE_DAY=1e3*60*60*24,n.MAXYEAR=9999,n.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),n.PY_WEEKDAYS=[6,0,1,2,3,4,5],n.getYearDay=function(e){var t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((t.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/n.ONE_DAY)+1},n.isLeapYear=function(e){return e%4==0&&e%100!=0||e%400==0},n.isDate=function(e){return e instanceof Date},n.isValidDate=function(e){return n.isDate(e)&&!isNaN(e.getTime())},n.tzOffset=function(e){return e.getTimezoneOffset()*60*1e3},n.daysBetween=function(e,t){var r=e.getTime()-n.tzOffset(e),i=t.getTime()-n.tzOffset(t),s=r-i;return Math.round(s/n.ONE_DAY)},n.toOrdinal=function(e){return n.daysBetween(e,n.ORDINAL_BASE)},n.fromOrdinal=function(e){return new Date(n.ORDINAL_BASE.getTime()+e*n.ONE_DAY)},n.getMonthDays=function(e){var t=e.getUTCMonth();return t===1&&n.isLeapYear(e.getUTCFullYear())?29:n.MONTH_DAYS[t]},n.getWeekday=function(e){return n.PY_WEEKDAYS[e.getUTCDay()]},n.monthRange=function(e,t){var r=new Date(Date.UTC(e,t,1));return[n.getWeekday(r),n.getMonthDays(r)]},n.combine=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},n.clone=function(e){var t=new Date(e.getTime());return t},n.cloneDates=function(e){for(var t=[],r=0;rthis.maxDate;if(this.method==="between"){if(t)return!0;if(r)return!1}else if(this.method==="before"){if(r)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},n.prototype.add=function(e){return this._result.push(e),!0},n.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}},n.prototype.clone=function(){return new n(this.method,this.args)},n}(),At=vy;var Ol=$e(Ml()),{__extends:Fr,__assign:Ue,__rest:VE,__decorate:ZE,__param:KE,__metadata:JE,__awaiter:QE,__generator:XE,__exportStar:ek,__createBinding:tk,__values:rk,__read:nk,__spread:ik,__spreadArrays:fr,__await:sk,__asyncGenerator:ak,__asyncDelegator:ok,__asyncValues:uk,__makeTemplateObject:lk,__importStar:ck,__importDefault:dk,__classPrivateFieldGet:fk,__classPrivateFieldSet:hk}=Ol.default;var Ty=function(n){Fr(e,n);function e(t,r,i){var s=n.call(this,t,r)||this;return s.iterator=i,s}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(At),Hs=Ty;var _y={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}},hr=_y;var Rl=function(n,e){return n.indexOf(e)!==-1},by=function(n){return n.toString()},wy=function(n,e,t){return e+" "+t+", "+n},Dy=function(){function n(e,t,r,i){if(t===void 0&&(t=by),r===void 0&&(r=hr),i===void 0&&(i=wy),this.text=[],this.language=r||hr,this.gettext=t,this.dateFormatter=i,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var s=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);s.sort(function(d,c){return d-c}),a.sort(function(d,c){return c-d}),this.bymonthday=s.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(re(this.origOptions.byweekday)){var o=Me(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(o);this.byweekday={allWeeks:o.filter(function(d){return!d.n}),someWeeks:o.filter(function(d){return Boolean(d.n)}),isWeekdays:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")===-1&&u.indexOf("SU")===-1,isEveryDay:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")!==-1&&u.indexOf("SU")!==-1};var l=function(d,c){return d.weekday-c.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return n.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in n.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var r in e.origOptions){if(Rl(["dtstart","wkst","freq"],r))return!0;if(!Rl(n.IMPLEMENTED[e.options.freq],r))return!1}return t},n.prototype.isFullyConvertible=function(){return n.isFullyConvertible(this.rrule)},n.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in n.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[ee.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("")},n.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"))},n.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"))},n.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()},n.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())},n.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()},n.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")))},n.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")))},n.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"))))},n.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},n.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},n.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,r,i=this.gettext;if(e===-1)return i("last");switch(r=Math.abs(e),r){case 1:case 21:case 31:t=r+i("st");break;case 2:case 22:t=r+i("nd");break;case 3:case 23:t=r+i("rd");break;default:t=r+i("th")}return e<0?t+" "+i("last"):t},n.prototype.monthtext=function(e){return this.language.monthNames[e-1]},n.prototype.weekdaytext=function(e){var t=Ze(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},n.prototype.plural=function(e){return e%100!=1},n.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},n.prototype.list=function(e,t,r,i){i===void 0&&(i=","),Me(e)||(e=[e]);var s=function(u,l,d){for(var c="",f=0;fe[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},n.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},n.prototype.acceptNumber=function(){return this.accept("number")},n.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},n}();function vn(n,e){e===void 0&&(e=hr);var t={},r=new Ey(e.tokens);if(!r.start(n))return null;return i(),t;function i(){r.expect("every");var f=r.acceptNumber();if(f&&(t.interval=parseInt(f[0],10)),r.isDone())throw new Error("Unexpected end");switch(r.symbol){case"day(s)":t.freq=ee.DAILY,r.nextSymbol()&&(a(),c());break;case"weekday(s)":t.freq=ee.WEEKLY,t.byweekday=[ee.MO,ee.TU,ee.WE,ee.TH,ee.FR],r.nextSymbol(),c();break;case"week(s)":t.freq=ee.WEEKLY,r.nextSymbol()&&(s(),c());break;case"hour(s)":t.freq=ee.HOURLY,r.nextSymbol()&&(s(),c());break;case"minute(s)":t.freq=ee.MINUTELY,r.nextSymbol()&&(s(),c());break;case"month(s)":t.freq=ee.MONTHLY,r.nextSymbol()&&(s(),c());break;case"year(s)":t.freq=ee.YEARLY,r.nextSymbol()&&(s(),c());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=ee.WEEKLY;var h=r.symbol.substr(0,2).toUpperCase();if(t.byweekday=[ee[h]],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var m=u();if(!m)throw new Error("Unexpected symbol "+r.symbol+", expected weekday");t.byweekday.push(ee[m]),r.nextSymbol()}d(),c();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=ee.YEARLY,t.bymonth=[o()],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var p=o();if(!p)throw new Error("Unexpected symbol "+r.symbol+", expected month");t.bymonth.push(p),r.nextSymbol()}s(),c();break;default:throw new Error("Unknown symbol")}}function s(){var f=r.accept("on"),h=r.accept("the");if(!!(f||h))do{var m=l(),p=u(),y=o();if(m)p?(r.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(ee[p].nth(m))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(m),r.accept("day(s)"));else if(p)r.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(ee[p]);else if(r.symbol==="weekday(s)")r.nextSymbol(),t.byweekday||(t.byweekday=[ee.MO,ee.TU,ee.WE,ee.TH,ee.FR]);else if(r.symbol==="week(s)"){r.nextSymbol();var v=r.acceptNumber();if(!v)throw new Error("Unexpected symbol "+r.symbol+", expected week number");for(t.byweekno=[parseInt(v[0],10)];r.accept("comma");){if(v=r.acceptNumber(),!v)throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");t.byweekno.push(parseInt(v[0],10))}}else if(y)r.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(y);else return}while(r.accept("comma")||r.accept("the")||r.accept("on"))}function a(){var f=r.accept("at");if(!!f)do{var h=r.acceptNumber();if(!h)throw new Error("Unexpected symbol "+r.symbol+", expected hour");for(t.byhour=[parseInt(h[0],10)];r.accept("comma");){if(h=r.acceptNumber(),!h)throw new Error("Unexpected symbol "+r.symbol+"; expected hour");t.byhour.push(parseInt(h[0],10))}}while(r.accept("comma")||r.accept("at"))}function o(){switch(r.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(r.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return r.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(r.symbol){case"last":return r.nextSymbol(),-1;case"first":return r.nextSymbol(),1;case"second":return r.nextSymbol(),r.accept("last")?-2:2;case"third":return r.nextSymbol(),r.accept("last")?-3:3;case"nth":var f=parseInt(r.value[1],10);if(f<-366||f>366)throw new Error("Nth out of range: "+f);return r.nextSymbol(),r.accept("last")?-f:f;default:return!1}}function d(){r.accept("on"),r.accept("the");var f=l();if(!!f)for(t.bymonthday=[f],r.nextSymbol();r.accept("comma");){if(f=l(),!f)throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");t.bymonthday.push(f),r.nextSymbol()}}function c(){if(r.symbol==="until"){var f=Date.parse(r.text);if(!f)throw new Error("Cannot parse until date:"+r.text);t.until=new Date(f)}else r.accept("for")&&(t.count=parseInt(r.value[0],10),r.expect("number"))}}var I;(function(n){n[n.YEARLY=0]="YEARLY",n[n.MONTHLY=1]="MONTHLY",n[n.WEEKLY=2]="WEEKLY",n[n.DAILY=3]="DAILY",n[n.HOURLY=4]="HOURLY",n[n.MINUTELY=5]="MINUTELY",n[n.SECONDLY=6]="SECONDLY"})(I||(I={}));function Tn(n){return n12){var r=Math.floor(this.month/12),i=Se(this.month,12);this.month=i,this.year+=r,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,r){r>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-r))+t*7:this.day+=-(this.getWeekday()-r)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,r,i){for(r&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=Ri(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),Ke(i)||Y(i,this.hour))break}},e.prototype.addMinutes=function(t,r,i,s){for(r&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=Ri(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(Ke(i)||Y(i,this.hour))&&(Ke(s)||Y(s,this.minute)))break}},e.prototype.addSeconds=function(t,r,i,s,a){for(r&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=Ri(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(Ke(i)||Y(i,this.hour))&&(Ke(s)||Y(s,this.minute))&&(Ke(a)||Y(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=Bt.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>Bt.MAXYEAR))return;t=Bt.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,r){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case I.YEARLY:return this.addYears(s);case I.MONTHLY:return this.addMonths(s);case I.WEEKLY:return this.addWeekly(s,a);case I.DAILY:return this.addDaily(s);case I.HOURLY:return this.addHours(s,r,o);case I.MINUTELY:return this.addMinutes(s,r,o,u);case I.SECONDLY:return this.addSeconds(s,r,o,u,l)}},e}(Wr);function Gs(n){for(var e=[],t=Object.keys(n),r=0,i=t;r=-366&&r<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||de(e.byweekno)||de(e.byyearday)||Boolean(e.bymonthday)||de(e.bymonthday)||re(e.byweekday)||re(e.byeaster)))switch(e.freq){case $.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case $.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case $.WEEKLY:e.byweekday=[O.getWeekday(e.dtstart)];break}if(re(e.bymonth)&&!Me(e.bymonth)&&(e.bymonth=[e.bymonth]),re(e.byyearday)&&!Me(e.byyearday)&&Ze(e.byyearday)&&(e.byyearday=[e.byyearday]),!re(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(Me(e.bymonthday)){for(var i=[],s=[],t=0;t0?i.push(r):r<0&&s.push(r)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(re(e.byweekno)&&!Me(e.byweekno)&&(e.byweekno=[e.byweekno]),!re(e.byweekday))e.bynweekday=null;else if(Ze(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if($s(e.byweekday))e.byweekday=[me.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof me)!e.byweekday.n||e.freq>$.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;t$.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=de(a)?a:null,e.bynweekday=de(o)?o:null}return re(e.byhour)?Ze(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<$.HOURLY?[e.dtstart.getUTCHours()]:null,re(e.byminute)?Ze(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<$.MINUTELY?[e.dtstart.getUTCMinutes()]:null,re(e.bysecond)?Ze(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<$.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function Cl(n){var e=n.dtstart.getTime()%1e3;if(!Tn(n.freq))return[];var t=[];return n.byhour.forEach(function(r){n.byminute.forEach(function(i){n.bysecond.forEach(function(s){t.push(new Wr(r,i,s,e))})})}),t}function bn(n){var e=n.split(` `).map(ky).filter(function(t){return t!==null});return Ue(Ue({},e[0]),e[1])}function wn(n){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(n);if(!t)return e;var r=t[0],i=t[1],s=t[2];return i&&(e.tzid=i),e.dtstart=O.untilStringToDate(s),e}function ky(n){if(n=n.replace(/^\s+|\s+$/,""),!n.length)return null;var e=/^([A-Z]+?)[:;]/.exec(n.toUpperCase());if(!e)return Fl(n);var t=e[0],r=e[1];switch(r.toUpperCase()){case"RRULE":case"EXRULE":return Fl(n);case"DTSTART":return wn(n);default:throw new Error("Unsupported RFC prop "+r+" in "+n)}}function Fl(n){var e=n.replace(/^RRULE:/i,""),t=wn(e),r=n.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return r.forEach(function(i){var s=i.split("="),a=s[0],o=s[1];switch(a.toUpperCase()){case"FREQ":t.freq=I[o.toUpperCase()];break;case"WKST":t.wkst=nt[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var u=My(o),l=a.toLowerCase();t[l]=u;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=Oy(o);break;case"DTSTART":case"TZID":var d=wn(n);t.tzid=d.tzid,t.dtstart=d.dtstart;break;case"UNTIL":t.until=O.untilStringToDate(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),t}function My(n){if(n.indexOf(",")!==-1){var e=n.split(",");return e.map(Ll)}return Ll(n)}function Ll(n){return/^[+-]?\d+$/.test(n)?Number(n):n}function Oy(n){var e=n.split(",");return e.map(function(t){if(t.length===2)return nt[t];var r=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/),i=Number(r[1]),s=r[2],a=nt[s].weekday;return new me(a,i)})}var Gc=$e(Hc()),wr=function(){function n(e,t){this.date=e,this.tzid=t}return Object.defineProperty(n.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!0,configurable:!0}),n.prototype.toString=function(){var e=O.timeToUntilString(this.date.getTime(),this.isUTC);return this.isUTC?":"+e:";TZID="+this.tzid+":"+e},n.prototype.getTime=function(){return this.date.getTime()},n.prototype.rezonedDate=function(){if(this.isUTC)return this.date;try{var e=Gc.DateTime.fromJSDate(this.date),t=e.setZone(this.tzid,{keepLocalTime:!0});return t.toJSDate()}catch(r){return r instanceof TypeError&&console.error("Using TZID without Luxon available is unsupported. Returned times are in UTC, not the requested time zone"),this.date}},n}();function Nn(n){for(var e=[],t="",r=Object.keys(n),i=Object.keys(_n),s=0;s=4?(d=0,l=o.yearlen+Se(a-e.wkst,7)):l=r-d;for(var c=Math.floor(l/7),f=Se(l,7),h=Math.floor(c+f/4),m=0;m0&&p<=h){var y=void 0;p>1?(y=d+(p-1)*7,d!==u&&(y-=7-u)):y=d;for(var v=0;v<7&&(o.wnomask[y]=1,y++,o.wdaymask[y]!==e.wkst);v++);}}if(Y(e.byweekno,1)){var y=d+h*7;if(d!==u&&(y-=7-u),y=4?(W=0,P=G+Se(X-e.wkst,7)):P=r-d,A=Math.floor(52+Se(P,7)/4)}if(Y(e.byweekno,A))for(var y=0;ys)return Ct(n);if(A>=t){var X=od(A,e);if(!n.accept(X)||o&&(--o,!o))return Ct(n)}}else for(var v=h;vs)return Ct(n);if(A>=t){var X=od(A,e);if(!n.accept(X)||o&&(--o,!o))return Ct(n)}}}if(e.interval===0||(u.add(e,p),u.year>O.MAXYEAR))return Ct(n);Tn(r)||(d=l.gettimeset(r)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function Fv(n,e,t){var r=t.bymonth,i=t.byweekno,s=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return de(r)&&!Y(r,n.mmask[e])||de(i)&&!n.wnomask[e]||de(s)&&!Y(s,n.wdaymask[e])||de(n.nwdaymask)&&!n.nwdaymask[e]||a!==null&&!Y(n.eastermask,e)||(de(o)||de(u))&&!Y(o,n.mdaymask[e])&&!Y(u,n.nmdaymask[e])||de(l)&&(e=n.yearlen&&!Y(l,e+1-n.yearlen)&&!Y(l,-n.nextyearlen+e-n.yearlen))}function od(n,e){return new wr(n,e.tzid).rezonedDate()}function Ct(n){return n.getValue()}function Lv(n,e,t,r,i){for(var s=!1,a=e;a=$.HOURLY&&de(i)&&!Y(i,e.hour)||r>=$.MINUTELY&&de(s)&&!Y(s,e.minute)||r>=$.SECONDLY&&de(a)&&!Y(a,e.second)?[]:n.gettimeset(r)(e.hour,e.minute,e.second,e.millisecond)}var nt={MO:new me(0),TU:new me(1),WE:new me(2),TH:new me(3),FR:new me(4),SA:new me(5),SU:new me(6)},_n={freq:I.YEARLY,dtstart:null,interval:1,wkst:nt.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},Il=Object.keys(_n),Uv=function(){function n(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new zc,this.origOptions=Gs(e);var r=Nl(e).parsedOptions;this.options=r}return n.parseText=function(e,t){return vn(e,t)},n.fromText=function(e,t){return Pl(e,t)},n.fromString=function(e){return new n(n.parseString(e)||void 0)},n.prototype._iter=function(e){return Gi(e,this.options)},n.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},n.prototype._cacheAdd=function(e,t,r){if(!!this._cache)return this._cache._cacheAdd(e,t,r)},n.prototype.all=function(e){if(e)return this._iter(new Hs("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new At("all",{})),this._cacheAdd("all",t)),t},n.prototype.between=function(e,t,r,i){if(r===void 0&&(r=!1),!O.isValidDate(e)||!O.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:r};if(i)return this._iter(new Hs("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new At("between",s)),this._cacheAdd("between",a,s)),a},n.prototype.before=function(e,t){if(t===void 0&&(t=!1),!O.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var r={dt:e,inc:t},i=this._cacheGet("before",r);return i===!1&&(i=this._iter(new At("before",r)),this._cacheAdd("before",i,r)),i},n.prototype.after=function(e,t){if(t===void 0&&(t=!1),!O.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var r={dt:e,inc:t},i=this._cacheGet("after",r);return i===!1&&(i=this._iter(new At("after",r)),this._cacheAdd("after",i,r)),i},n.prototype.count=function(){return this.all().length},n.prototype.toString=function(){return Nn(this.origOptions)},n.prototype.toText=function(e,t,r){return Sl(this,e,t,r)},n.prototype.isFullyConvertibleToText=function(){return xl(this)},n.prototype.clone=function(){return new n(this.origOptions)},n.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],n.YEARLY=I.YEARLY,n.MONTHLY=I.MONTHLY,n.WEEKLY=I.WEEKLY,n.DAILY=I.DAILY,n.HOURLY=I.HOURLY,n.MINUTELY=I.MINUTELY,n.SECONDLY=I.SECONDLY,n.MO=nt.MO,n.TU=nt.TU,n.WE=nt.WE,n.TH=nt.TH,n.FR=nt.FR,n.SA=nt.SA,n.SU=nt.SU,n.parseString=bn,n.optionsToString=Nn,n}(),$=Uv;function ud(n,e,t,r,i,s){var a={},o=n.accept;function u(f,h){t.forEach(function(m){m.between(f,h,!0).forEach(function(p){a[Number(p)]=!0})})}i.forEach(function(f){var h=new wr(f,s).rezonedDate();a[Number(h)]=!0}),n.accept=function(f){var h=Number(f);return isNaN(h)?o.call(this,f):!a[h]&&(u(new Date(h-1),new Date(h+1)),!a[h])?(a[h]=!0,o.call(this,f)):!0},n.method==="between"&&(u(n.args.after,n.args.before),n.accept=function(f){var h=Number(f);return a[h]?!0:(a[h]=!0,o.call(this,f))});for(var l=0;l1||i.length||s.length||a.length){var d=new La(l);return d.dtstart(o),d.tzid(u||void 0),r.forEach(function(f){d.rrule(new $(Fa(f,o,u),l))}),i.forEach(function(f){d.rdate(f)}),s.forEach(function(f){d.exrule(new $(Fa(f,o,u),l))}),a.forEach(function(f){d.exdate(f)}),e.compatible&&e.dtstart&&d.rdate(o),d}var c=r[0]||{};return new $(Fa(c,c.dtstart||e.dtstart||o,c.tzid||e.tzid||u),l)}function zi(n,e){return e===void 0&&(e={}),qv(n,jv(e))}function Fa(n,e,t){return Ue(Ue({},n),{dtstart:e,tzid:t})}function jv(n){var e=[],t=Object.keys(n),r=Object.keys(ld);if(t.forEach(function(i){Y(r,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return Ue(Ue({},ld),n)}function $v(n){if(n.indexOf(":")===-1)return{name:"RRULE",value:n};var e=sl(n,":",1),t=e[0],r=e[1];return{name:t,value:r}}function Bv(n){var e=$v(n),t=e.name,r=e.value,i=t.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:r}}function Hv(n,e){if(e===void 0&&(e=!1),n=n&&n.trim(),!n)throw new Error("Invalid empty string");if(!e)return n.split(/\s/);for(var t=n.split(` `),r=0;r0&&i[0]===" "?(t[r-1]+=i.slice(1),t.splice(r,1)):r+=1:t.splice(r,1)}return t}function Gv(n){n.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function cd(n,e){return Gv(e),n.split(",").map(function(t){return O.untilStringToDate(t)})}function dd(n){var e=this;return function(t){if(t!==void 0&&(e["_"+n]=t),e["_"+n]!==void 0)return e["_"+n];for(var r=0;r=7?i=1:r>=-14?i=(r+14)*.8/21+.2:i=.2,t+=i*It.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*It.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*It.startedCoefficient),e.priority){case"1":t+=1*It.priorityCoefficient;break;case"2":t+=.65*It.priorityCoefficient;break;case"3":t+=.325*It.priorityCoefficient;break}return t}},Kt=It;Kt.dueCoefficient=12,Kt.scheduledCoefficient=5,Kt.startedCoefficient=-3,Kt.priorityCoefficient=6,Kt.milliSecondsPerDay=1e3*60*60*24;var he;(function(t){t.Todo="Todo",t.Done="Done"})(he||(he={}));var ie;(function(i){i.High="1",i.Medium="2",i.None="3",i.Low="4"})(ie||(ie={}));var Z=class{constructor({status:e,description:t,path:r,indentation:i,sectionStart:s,sectionIndex:a,originalStatusCharacter:o,precedingHeader:u,priority:l,startDate:d,scheduledDate:c,dueDate:f,doneDate:h,recurrence:m,blockLink:p,tags:y}){this._urgency=null;this.status=e,this.description=t,this.path=r,this.indentation=i,this.sectionStart=s,this.sectionIndex=a,this.originalStatusCharacter=o,this.precedingHeader=u,this.tags=y,this.priority=l,this.startDate=d,this.scheduledDate=c,this.dueDate=f,this.doneDate=h,this.recurrence=m,this.blockLink=p}static fromLine({line:e,path:t,sectionStart:r,sectionIndex:i,precedingHeader:s}){let a=e.match(Z.taskRegex);if(a===null)return null;let o=a[3].trim(),{globalFilter:u}=le();if(!o.includes(u))return null;let l=o,d=a[1],c=a[2].toLowerCase(),f;switch(c){case" ":f=he.Todo;break;default:f=he.Done}let h=l.match(this.blockLinkRegex),m=h!==null?h[0]:"";m!==""&&(l=l.replace(this.blockLinkRegex,"").trim());let p,y=ie.None,v=null,A=null,X=null,W=null,G=null,P=[],j=7,M=0;do{p=!1;let E=l.match(Z.priorityRegex);if(E!==null){switch(E[1]){case"\u{1F53D}":y=ie.Low;break;case"\u{1F53C}":y=ie.Medium;break;case"\u23EB":y=ie.High;break}l=l.replace(Z.priorityRegex,"").trim(),p=!0}let D=l.match(Z.doneDateRegex);D!==null&&(W=window.moment(D[1],Z.dateFormat),l=l.replace(Z.doneDateRegex,"").trim(),p=!0);let T=l.match(Z.dueDateRegex);T!==null&&(X=window.moment(T[1],Z.dateFormat),l=l.replace(Z.dueDateRegex,"").trim(),p=!0);let k=l.match(Z.scheduledDateRegex);k!==null&&(A=window.moment(k[1],Z.dateFormat),l=l.replace(Z.scheduledDateRegex,"").trim(),p=!0);let w=l.match(Z.startDateRegex);w!==null&&(v=window.moment(w[1],Z.dateFormat),l=l.replace(Z.startDateRegex,"").trim(),p=!0);let R=l.match(Z.recurrenceRegex);R!==null&&(G=Zt.fromText({recurrenceRuleText:R[1].trim(),startDate:v,scheduledDate:A,dueDate:X}),l=l.replace(Z.recurrenceRegex,"").trim(),p=!0),M++}while(p&&M<=j);let Ie=l.match(this.hashTags);return Ie!==null&&(P=Ie.filter(E=>E!==u).map(E=>E.trim())),new Z({status:f,description:l,path:t,indentation:d,sectionStart:r,sectionIndex:i,originalStatusCharacter:c,precedingHeader:s,priority:y,startDate:v,scheduledDate:A,dueDate:X,doneDate:W,recurrence:G,blockLink:m,tags:P})}toLi(s){return ae(this,arguments,function*({parentUlElement:e,listIndex:t,layoutOptions:r,isFilenameUnique:i}){let a=e.createEl("li");a.addClasses(["task-list-item","plugin-tasks-list-item"]);let o=this.toString(r),{globalFilter:u,removeGlobalFilter:l}=le();l&&(o=o.replace(u,"").trim());let d=a.createSpan();d.addClass("tasks-list-text"),yield pd.MarkdownRenderer.renderMarkdown(o,d,this.path,null);let c=d.querySelector("blockquote"),f=c!=null?c:d,h=f.querySelector("p");if(h!==null){for(;h.firstChild;)f.insertBefore(h.firstChild,h);h.remove()}d.findAll("p").forEach(p=>{p.hasChildNodes()||p.remove()}),d.findAll(".footnotes").forEach(p=>{p.remove()});let m=a.createEl("input");return m.addClass("task-list-item-checkbox"),m.type="checkbox",this.status!==he.Todo&&(m.checked=!0,a.addClass("is-checked")),m.onClickEvent(p=>{p.preventDefault(),p.stopPropagation(),m.disabled=!0;let y=this.toggle();Mi({originalTask:this,newTasks:y})}),a.prepend(m),a.setAttr("data-task",this.originalStatusCharacter.trim()),a.setAttr("data-line",t),m.setAttr("data-line",t),(r==null?void 0:r.shortMode)&&this.addTooltip({element:d,isFilenameUnique:i}),a})}toString(e){var i;e=e!=null?e:new gn;let t=this.description;if(!e.hidePriority){let s="";this.priority===ie.High?s=" \u23EB":this.priority===ie.Medium?s=" \u{1F53C}":this.priority===ie.Low&&(s=" \u{1F53D}"),t+=s}return!e.hideRecurrenceRule&&this.recurrence&&(t+=e.shortMode?" \u{1F501}":` \u{1F501} ${this.recurrence.toText()}`),!e.hideStartDate&&this.startDate&&(t+=e.shortMode?" \u{1F6EB}":` \u{1F6EB} ${this.startDate.format(Z.dateFormat)}`),!e.hideScheduledDate&&this.scheduledDate&&(t+=e.shortMode?" \u23F3":` \u23F3 ${this.scheduledDate.format(Z.dateFormat)}`),!e.hideDueDate&&this.dueDate&&(t+=e.shortMode?" \u{1F4C5}":` \u{1F4C5} ${this.dueDate.format(Z.dateFormat)}`),!e.hideDoneDate&&this.doneDate&&(t+=e.shortMode?" \u2705":` \u2705 ${this.doneDate.format(Z.dateFormat)}`),t+=(i=this.blockLink)!=null?i:"",t}toFileLineString(){return`${this.indentation}- [${this.originalStatusCharacter}] ${this.toString()}`}toggle(){let e=this.status===he.Todo?he.Done:he.Todo,t=null,r=null;if(e!==he.Todo){let{setDoneDate:a}=le();a&&(t=window.moment()),this.recurrence!==null&&(r=this.recurrence.next())}let i=new Z(cr(Ve({},this),{status:e,doneDate:t,originalStatusCharacter:e===he.Done?"x":" "})),s=[];if(r!==null){let a=new Z(cr(Ve(Ve({},this),r),{blockLink:""}));s.push(a)}return s.push(i),s}get urgency(){return this._urgency===null&&(this._urgency=Kt.calculate(this)),this._urgency}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}addTooltip({element:e,isFilenameUnique:t}){e.addEventListener("mouseenter",()=>{let r=e.createDiv();r.addClasses(["tooltip","mod-right"]),this.recurrence&&r.createDiv().setText(`\u{1F501} ${this.recurrence.toText()}`),this.startDate&&r.createDiv().setText(Z.toTooltipDate({signifier:"\u{1F6EB}",date:this.startDate})),this.scheduledDate&&r.createDiv().setText(Z.toTooltipDate({signifier:"\u23F3",date:this.scheduledDate})),this.dueDate&&r.createDiv().setText(Z.toTooltipDate({signifier:"\u{1F4C5}",date:this.dueDate})),this.doneDate&&r.createDiv().setText(Z.toTooltipDate({signifier:"\u2705",date:this.doneDate}));let i=this.getLinkText({isFilenameUnique:t});i&&r.createDiv().setText(`\u{1F517} ${i}`),e.addEventListener("mouseleave",()=>{r.remove()})})}static toTooltipDate({signifier:e,date:t}){return`${e} ${t.format(Z.dateFormat)} (${t.from(window.moment().startOf("day"))})`}},Q=Z;Q.dateFormat="YYYY-MM-DD",Q.taskRegex=/^([\s\t]*)[-*] +\[(.)\] *(.*)/u,Q.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,Q.priorityRegex=/([⏫🔼🔽])$/u,Q.startDateRegex=/🛫 ?(\d{4}-\d{2}-\d{2})$/u,Q.scheduledDateRegex=/[⏳⌛] ?(\d{4}-\d{2}-\d{2})$/u,Q.dueDateRegex=/[📅📆🗓] ?(\d{4}-\d{2}-\d{2})$/u,Q.doneDateRegex=/✅ ?(\d{4}-\d{2}-\d{2})$/u,Q.recurrenceRegex=/🔁 ?([a-zA-Z0-9, !]+)$/iu,Q.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g;var Dr;(function(r){r.Cold="Cold",r.Initializing="Initializing",r.Warm="Warm"})(Dr||(Dr={}));var Wa=class{constructor({metadataCache:e,vault:t,events:r}){this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=r,this.eventsEventReferences=[],this.tasksMutex=new Us,this.state=Dr.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",()=>ae(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",r=>{this.tasksMutex.runExclusive(()=>{this.indexFile(r)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){let e=this.vault.on("create",i=>{i instanceof Vi.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(i)})});this.vaultEventReferences.push(e);let t=this.vault.on("delete",i=>{i instanceof Vi.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(s=>s.path!==i.path),this.notifySubscribers()})});this.vaultEventReferences.push(t);let r=this.vault.on("rename",(i,s)=>{i instanceof Vi.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.map(a=>a.path===s?new Q(cr(Ve({},a),{path:i.path})):a),this.notifySubscribers()})});this.vaultEventReferences.push(r)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>ae(this,null,function*(){this.state=Dr.Initializing,yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state=Dr.Warm,this.notifySubscribers()}))}indexFile(e){return ae(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let r=t.listItems;r===void 0&&(r=[]);let s=(yield this.vault.cachedRead(e)).split(` `);this.tasks=this.tasks.filter(u=>u.path!==e.path);let a=null,o=0;for(let u of r)if(u.task!==void 0){if((a===null||a.position.end.line=e)return r;return null}getPrecedingHeader({lineNumberTask:e,sections:t,fileLines:r}){if(t===void 0)return null;let i;for(let l of t)if(l.type==="heading"){if(l.position.start.line>e)break;i=l}if(i===void 0)return null;let s=i.position.start.line,a=r[s],o=/^#+ +(.*)/u,u=a.match(o);return u===null?null:u[1]}};var cu=$e(require("obsidian"));var Jp=$e(require("obsidian"));function Zr(){}function Ua(n){return n()}function yd(){return Object.create(null)}function Er(n){n.forEach(Ua)}function gd(n){return typeof n=="function"}function vd(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}function Td(n){return Object.keys(n).length===0}var HO=new Set;var _d=!1;function Vv(){_d=!0}function Zv(){_d=!1}function b(n,e){n.appendChild(e)}function Ya(n,e,t){n.insertBefore(e,t||null)}function Zi(n){n.parentNode.removeChild(n)}function x(n){return document.createElement(n)}function Ft(n){return document.createTextNode(n)}function ne(){return Ft(" ")}function Jt(n,e,t,r){return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}function bd(n){return function(e){return e.preventDefault(),n.call(this,e)}}function F(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Kv(n){return Array.from(n.childNodes)}function wd(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function yt(n,e){n.value=e==null?"":e}function qa(n,e){for(let t=0;t{let u=s.map(Ua).filter(gd);a?a.push(...u):Er(u),n.$$.on_mount=[]}),o.forEach(In)}function Md(n,e){let t=n.$$;t.fragment!==null&&(Er(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function iT(n,e){n.$$.dirty[0]===-1&&(Cn.push(n),Xv(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{let m=h.length?h[0]:f;return l.ctx&&i(l.ctx[c],l.ctx[c]=m)&&(!l.skip_bound&&l.bound[c]&&l.bound[c](m),d&&iT(n,c)),f}):[],l.update(),d=!0,Er(l.before_update),l.fragment=r?r(l.ctx):!1,e.target){if(e.hydrate){Vv();let c=Kv(e.target);l.fragment&&l.fragment.l(c),c.forEach(Zi)}else l.fragment&&l.fragment.c();e.intro&&rT(n.$$.fragment),nT(n,e.target,e.anchor,e.customElement),Zv(),kd()}Ji(u)}var sT;typeof HTMLElement=="function"&&(sT=class extends HTMLElement{constructor(){super();this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:n}=this.$$;this.$$.on_disconnect=n.map(Ua).filter(gd);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(n,e,t){this[n]=t}disconnectedCallback(){Er(this.$$.on_disconnect)}$destroy(){Md(this,1),this.$destroy=Zr}$on(n,e){let t=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return t.push(e),()=>{let r=t.indexOf(e);r!==-1&&t.splice(r,1)}}$set(n){this.$$set&&!Td(n)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}});var Ga=class{$destroy(){Md(this,1),this.$destroy=Zr}$on(e,t){let r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(t),()=>{let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!Td(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var ar=$e(Re());function EE(n){let e,t,r,i,s,a,o,u,l,d,c,f,h,m,p,y,v,A,X,W,G,P,j,M,Ie,Fe,E,D,T,k,w,R,S,K,se,z,ge,Ge,tt,Dt,jt,Le,ve,ct,ze,ur,yi,Au,gi,Nu,$t,vi,Cu,xt,Iu,Ti,Fu,_i,Lu,Wu,Uu,Ar,Nr,Yu,lr,bi,qu,Is,wi=n[0].status+"",Fs,ju,Di,$u,Ei,Bu,Hu,Gu,Ls,zu,ki,Ws,Vu;return{c(){e=x("div"),t=x("form"),r=x("div"),i=x("label"),i.textContent="Description",s=ne(),a=x("input"),o=ne(),u=x("hr"),l=ne(),d=x("div"),c=x("label"),c.textContent="Priority",f=ne(),h=x("select"),m=x("option"),m.textContent="None",p=x("option"),p.textContent="\u23EB High",y=x("option"),y.textContent="\u{1F53C} Medium",v=x("option"),v.textContent="\u{1F53D} Low",A=ne(),X=x("hr"),W=ne(),G=x("div"),P=x("label"),P.textContent="Recurrence",j=ne(),M=x("input"),Ie=ne(),Fe=x("code"),E=Ft("\u{1F501} "),D=new Kr,T=ne(),k=x("hr"),w=ne(),R=x("div"),S=x("div"),K=x("label"),K.textContent="Due",se=ne(),z=x("input"),ge=ne(),Ge=x("code"),tt=Ft("\u{1F4C5} "),Dt=new Kr,jt=ne(),Le=x("div"),ve=x("label"),ve.textContent="Scheduled",ct=ne(),ze=x("input"),ur=ne(),yi=x("code"),Au=Ft("\u23F3 "),gi=new Kr,Nu=ne(),$t=x("div"),vi=x("label"),vi.textContent="Start",Cu=ne(),xt=x("input"),Iu=ne(),Ti=x("code"),Fu=Ft("\u{1F6EB} "),_i=new Kr,Lu=ne(),Wu=x("hr"),Uu=ne(),Ar=x("div"),Nr=x("div"),Yu=Ft(`Status: `),lr=x("input"),qu=ne(),Is=x("code"),Fs=Ft(wi),ju=ne(),Di=x("div"),$u=Ft(`Done on: `),Ei=x("code"),Bu=ne(),Hu=x("hr"),Gu=ne(),Ls=x("div"),zu=ne(),ki=x("div"),ki.innerHTML='',F(i,"for","description"),F(a,"id","description"),F(a,"type","text"),F(a,"class","tasks-modal-description"),F(a,"placeholder","Take out the trash"),F(r,"class","tasks-modal-section"),F(c,"for","priority"),m.__value="none",m.value=m.__value,p.__value="high",p.value=p.__value,y.__value="medium",y.value=y.__value,v.__value="low",v.value=v.__value,F(h,"id","priority"),F(h,"class","dropdown"),n[0].priority===void 0&&In(()=>n[14].call(h)),F(d,"class","tasks-modal-section"),F(P,"for","recurrence"),F(M,"id","description"),F(M,"type","text"),F(M,"placeholder","Try 'every 2 weeks on Thursday'."),D.a=null,F(G,"class","tasks-modal-section"),F(K,"for","due"),F(z,"id","due"),F(z,"type","text"),F(z,"placeholder","Try 'Monday' or 'tomorrow'."),Dt.a=null,F(S,"class","tasks-modal-date"),F(ve,"for","scheduled"),F(ze,"id","scheduled"),F(ze,"type","text"),F(ze,"placeholder","Try 'Monday' or 'tomorrow'."),gi.a=null,F(Le,"class","tasks-modal-date"),F(vi,"for","start"),F(xt,"id","start"),F(xt,"type","text"),F(xt,"placeholder","Try 'Monday' or 'tomorrow'."),_i.a=null,F($t,"class","tasks-modal-date"),F(R,"class","tasks-modal-section"),F(lr,"type","checkbox"),F(lr,"class","task-list-item-checkbox tasks-modal-checkbox"),lr.checked=bi=n[0].status===he.Done,lr.disabled=!0,F(Ar,"class","tasks-modal-section"),F(Ls,"class","tasks-modal-section"),F(ki,"class","tasks-modal-section"),F(e,"class","tasks-modal")},m(ue,We){Ya(ue,e,We),b(e,t),b(t,r),b(r,i),b(r,s),b(r,a),yt(a,n[0].description),n[13](a),b(t,o),b(t,u),b(t,l),b(t,d),b(d,c),b(d,f),b(d,h),b(h,m),b(h,p),b(h,y),b(h,v),qa(h,n[0].priority),b(t,A),b(t,X),b(t,W),b(t,G),b(G,P),b(G,j),b(G,M),yt(M,n[0].recurrenceRule),b(G,Ie),b(G,Fe),b(Fe,E),D.m(n[5],Fe),b(t,T),b(t,k),b(t,w),b(t,R),b(R,S),b(S,K),b(S,se),b(S,z),yt(z,n[0].dueDate),b(S,ge),b(S,Ge),b(Ge,tt),Dt.m(n[4],Ge),b(R,jt),b(R,Le),b(Le,ve),b(Le,ct),b(Le,ze),yt(ze,n[0].scheduledDate),b(Le,ur),b(Le,yi),b(yi,Au),gi.m(n[3],yi),b(R,Nu),b(R,$t),b($t,vi),b($t,Cu),b($t,xt),yt(xt,n[0].startDate),b($t,Iu),b($t,Ti),b(Ti,Fu),_i.m(n[2],Ti),b(t,Lu),b(t,Wu),b(t,Uu),b(t,Ar),b(Ar,Nr),b(Nr,Yu),b(Nr,lr),b(Nr,qu),b(Nr,Is),b(Is,Fs),b(Ar,ju),b(Ar,Di),b(Di,$u),b(Di,Ei),Ei.innerHTML=n[6],b(t,Bu),b(t,Hu),b(t,Gu),b(t,Ls),b(t,zu),b(t,ki),Ws||(Vu=[Jt(a,"input",n[12]),Jt(h,"change",n[14]),Jt(M,"input",n[15]),Jt(z,"input",n[16]),Jt(ze,"input",n[17]),Jt(xt,"input",n[18]),Jt(t,"submit",bd(n[7]))],Ws=!0)},p(ue,[We]){We&1&&a.value!==ue[0].description&&yt(a,ue[0].description),We&1&&qa(h,ue[0].priority),We&1&&M.value!==ue[0].recurrenceRule&&yt(M,ue[0].recurrenceRule),We&32&&D.p(ue[5]),We&1&&z.value!==ue[0].dueDate&&yt(z,ue[0].dueDate),We&16&&Dt.p(ue[4]),We&1&&ze.value!==ue[0].scheduledDate&&yt(ze,ue[0].scheduledDate),We&8&&gi.p(ue[3]),We&1&&xt.value!==ue[0].startDate&&yt(xt,ue[0].startDate),We&4&&_i.p(ue[2]),We&1&&bi!==(bi=ue[0].status===he.Done)&&(lr.checked=bi),We&1&&wi!==(wi=ue[0].status+"")&&wd(Fs,wi),We&64&&(Ei.innerHTML=ue[6])},i:Zr,o:Zr,d(ue){ue&&Zi(e),n[13](null),Ws=!1,Er(Vu)}}}function kE(n,e,t){var r,i;let{task:s}=e,{onSubmit:a}=e,o,u={description:"",status:he.Todo,priority:"none",recurrenceRule:"",startDate:"",scheduledDate:"",dueDate:"",doneDate:""},l="",d="",c="",f="",h="";ja(()=>{let{globalFilter:P}=le(),j=s.description.replace(P,"").replace(" "," ").trim(),M="none";s.priority===ie.Low?M="low":s.priority===ie.Medium?M="medium":s.priority===ie.High&&(M="high"),t(0,u={description:j,status:s.status,priority:M,recurrenceRule:s.recurrence?s.recurrence.toText():"",startDate:s.startDate?s.startDate.format("YYYY-MM-DD"):"",scheduledDate:s.scheduledDate?s.scheduledDate.format("YYYY-MM-DD"):"",dueDate:s.dueDate?s.dueDate.format("YYYY-MM-DD"):"",doneDate:s.doneDate?s.doneDate.format("YYYY-MM-DD"):""}),setTimeout(()=>{o.focus()},10)});let m=()=>{let{globalFilter:P}=le(),j=u.description.trim();j.includes(P)||(j=P+" "+j);let M=null,Ie=ar.default.parseDate(u.startDate,new Date,{forwardDate:!0});Ie!==null&&(M=window.moment(Ie));let Fe=null,E=ar.default.parseDate(u.scheduledDate,new Date,{forwardDate:!0});E!==null&&(Fe=window.moment(E));let D=null,T=ar.default.parseDate(u.dueDate,new Date,{forwardDate:!0});T!==null&&(D=window.moment(T));let k=null;u.recurrenceRule&&(k=Zt.fromText({recurrenceRuleText:u.recurrenceRule,startDate:M,scheduledDate:Fe,dueDate:D}));let w;switch(u.priority){case"low":w=ie.Low;break;case"medium":w=ie.Medium;break;case"high":w=ie.High;break;default:w=ie.None}let R=new Q(Object.assign(Object.assign({},s),{description:j,status:u.status,priority:w,recurrence:k,startDate:M,scheduledDate:Fe,dueDate:D,doneDate:window.moment(u.doneDate,"YYYY-MM-DD").isValid()?window.moment(u.doneDate,"YYYY-MM-DD"):null}));a([R])};function p(){u.description=this.value,t(0,u)}function y(P){Qi[P?"unshift":"push"](()=>{o=P,t(1,o)})}function v(){u.priority=Dd(this),t(0,u)}function A(){u.recurrenceRule=this.value,t(0,u)}function X(){u.dueDate=this.value,t(0,u)}function W(){u.scheduledDate=this.value,t(0,u)}function G(){u.startDate=this.value,t(0,u)}return n.$$set=P=>{"task"in P&&t(8,s=P.task),"onSubmit"in P&&t(9,a=P.onSubmit)},n.$$.update=()=>{if(n.$$.dirty&1){e:if(!u.startDate)t(2,l="no start date");else{let P=ar.default.parseDate(u.startDate,new Date,{forwardDate:!0});P!==null?t(2,l=window.moment(P).format("YYYY-MM-DD")):t(2,l="invalid start date")}}if(n.$$.dirty&1){e:if(!u.scheduledDate)t(3,d="no scheduled date");else{let P=ar.default.parseDate(u.scheduledDate,new Date,{forwardDate:!0});P!==null?t(3,d=window.moment(P).format("YYYY-MM-DD")):t(3,d="invalid scheduled date")}}if(n.$$.dirty&1){e:if(!u.dueDate)t(4,c="no due date");else{let P=ar.default.parseDate(u.dueDate,new Date,{forwardDate:!0});P!==null?t(4,c=window.moment(P).format("YYYY-MM-DD")):t(4,c="invalid due date")}}if(n.$$.dirty&3073){e:u.recurrenceRule?t(5,f=t(11,i=t(10,r=Zt.fromText({recurrenceRuleText:u.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||r===void 0?void 0:r.toText())!==null&&i!==void 0?i:"invalid recurrence rule"):t(5,f="not recurring")}if(n.$$.dirty&1){e:if(!u.doneDate)t(6,h="no done date");else{let P=ar.default.parseDate(u.doneDate);P!==null?t(6,h=window.moment(P).format("YYYY-MM-DD")):t(6,h="invalid done date")}}},[u,o,l,d,c,f,h,m,s,a,r,i,p,y,v,A,X,W,G]}var Zp=class extends Ga{constructor(e){super();Od(this,e,kE,EE,vd,{task:8,onSubmit:9})}},Kp=Zp;var di=class extends Jp.Modal{constructor({app:e,task:t,onSubmit:r}){super(e);this.task=t,this.onSubmit=i=>{r(i),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:e}=this;new Kp({target:e,props:{task:this.task,onSubmit:this.onSubmit}})}onClose(){let{contentEl:e}=this;e.empty()}};var Qp=(n,e,t,r)=>{var c;if(n)return t instanceof cu.MarkdownView;if(!(t instanceof cu.MarkdownView))return;let i=(c=t.file)==null?void 0:c.path;if(i===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=ME({line:o,path:i}),l=f=>{let h=f.map(m=>m.toFileLineString()).join(` `);e.setLine(a,h)};new di({app:r,task:u,onSubmit:l}).open()},ME=({line:n,path:e})=>{var c;let t=Q.fromLine({line:n,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null});if(t!==null)return t;let r=/^([\s\t]*)[-*]? *(\[(.)\])? *(.*)/u,i=n.match(r);if(i===null)return console.error("Tasks: Cannot create task on line:",n),new Q({status:he.Todo,description:"",path:e,indentation:"",originalStatusCharacter:" ",priority:ie.None,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,blockLink:"",tags:[]});let s=i[1],a=(c=i[3])!=null?c:" ",o=a===" "?he.Todo:he.Done,u=i[4],l=n.match(Q.blockLinkRegex),d=l!==null?l[0]:"";return d!==""&&(u=u.replace(Q.blockLinkRegex,"")),new Q({status:o,description:u,path:e,indentation:s,originalStatusCharacter:a,blockLink:d,priority:ie.None,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,tags:[]})};var du=$e(require("obsidian"));var Xp=(n,e,t)=>{var u;if(n)return t instanceof du.MarkdownView;if(!(t instanceof du.MarkdownView))return;let r=(u=t.file)==null?void 0:u.path;if(r===void 0)return;let i=e.getCursor(),s=i.line,a=e.getLine(s),o=OE({line:a,path:r});e.setLine(s,o),/[^ [\]*-]/.test(o)&&e.setCursor({line:i.line,ch:i.ch+o.length-a.length})},OE=({line:n,path:e})=>{let t=n,r=Q.fromLine({line:n,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null});if(r!==null)t=RE({task:r});else{let i=n.match(Q.taskRegex);if(i!==null)t=PE({regexMatch:i});else{let s=/^([\s\t]*)([-*])/;s.test(n)?t=n.replace(s,"$1$2 [ ]"):t=n.replace(/^([\s\t]*)/,"$1- ")}}return t},RE=({task:n})=>n.toggle().map(r=>r.toFileLineString()).join(` `),PE=({regexMatch:n})=>{let e=n[1],t=n[2].toLowerCase(),r=n[3];return`${e}- [${t===" "?"x":" "}] ${r}`};var fu=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,r,i)=>Qp(t,r,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Xp})}};var fn;(function(t){t.CacheUpdate="obsidian-tasks-plugin:cache-update",t.RequestCacheUpdate="obsidian-tasks-plugin:request-cache-update"})(fn||(fn={}));var hu=class{constructor({obsidianEents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on(fn.CacheUpdate,e)}triggerCacheUpdate(e){this.obsidianEvents.trigger(fn.CacheUpdate,e)}onRequestCacheUpdate(e){return this.obsidianEvents.on(fn.RequestCacheUpdate,e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger(fn.RequestCacheUpdate,e)}off(e){this.obsidianEvents.offref(e)}};var mu=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return ae(this,null,function*(){var d;let{globalFilter:r}=le(),i=e.findAll(".task-list-item").filter(c=>{var m;let f=(m=c.textContent)==null?void 0:m.split(` `);if(f===void 0)return!1;let h=null;for(let p=0;pey.ViewPlugin.fromClass(ry),ry=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let{state:r}=this.view,i=this.view.posAtDOM(t),s=r.doc.lineAt(i),a=Q.fromLine({line:s.text,path:"",sectionStart:0,sectionIndex:0,precedingHeader:null});if(a===null)return!1;e.preventDefault();let u=a.toggle().map(c=>c.toFileLineString()).join(r.lineBreak),l=r.update({changes:{from:s.from,to:s.to,insert:u}});this.view.dispatch(l);let d=t.checked;return setTimeout(()=>{t.checked=d},1),!0}};var iy=$e(require("obsidian"));var pu=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var yu=class{constructor(e){this.lastHeadingAtLevel=new Array;let r=e.keys().next().value.length;for(let i=0;ie(t,r)*-1}static makeCompositeComparator(e){return(t,r)=>{for(let i of e){let s=i(t,r);if(s!==0)return s}return 0}}static compareByUrgency(e,t){return t.urgency-e.urgency}static compareByStatus(e,t){return e.statust.status?-1:0}static compareByPriority(e,t){return e.priority.localeCompare(t.priority)}static compareByStartDate(e,t){return B.compareByDate(e.startDate,t.startDate)}static compareByScheduledDate(e,t){return B.compareByDate(e.scheduledDate,t.scheduledDate)}static compareByDueDate(e,t){return B.compareByDate(e.dueDate,t.dueDate)}static compareByDoneDate(e,t){return B.compareByDate(e.doneDate,t.doneDate)}static compareByTag(e,t){if(e.tags.length===0&&t.tags.length===0)return 0;if(e.tags.length===0)return 1;if(t.tags.length===0)return-1;let r=B.tagPropertyInstance-1;return e.tags.length=B.tagPropertyInstance?1:t.tags.length=B.tagPropertyInstance?-1:e.tags.lengtht.tags[r]?1:0}static compareByDate(e,t){return e!==null&&t===null?-1:e===null&&t!==null?1:e!==null&&t!==null?e.isAfter(t)?1:e.isBefore(t)?-1:0:0}static compareByPath(e,t){return e.patht.path?1:0}static compareByDescription(e,t){return B.cleanDescription(e.description).localeCompare(B.cleanDescription(t.description))}static cleanDescription(e){let t=le().globalFilter;e=e.replace(t,"").trim();let r=/^\[\[?([^\]]*)\]/,i=e.match(r);if(i!==null){let l=i[1];e=l.substring(l.indexOf("|")+1)+e.replace(r,"")}let s=/^\*\*?([^*]*)\*/,a=e.match(s);a!==null&&(e=a[1]+e.replace(r,""));let o=/^==?([^=]*)==/,u=e.match(o);return u!==null&&(e=u[1]+e.replace(o,"")),e}},fi=B;fi.tagPropertyInstance=1,fi.comparators={urgency:B.compareByUrgency,description:B.compareByDescription,priority:B.compareByPriority,start:B.compareByStartDate,scheduled:B.compareByScheduledDate,due:B.compareByDueDate,done:B.compareByDoneDate,path:B.compareByPath,status:B.compareByStatus,tag:B.compareByTag};var wt=class{canCreateFilterForLine(e){return this.filterRegexp().test(e)}};var Ce=class{};var St=class extends wt{createFilterOrErrorMessage(e){let t=new Ce,r=e.match(this.filterRegexp());return r!==null?r[1]==="includes"?t.filter=s=>St.stringIncludesCaseInsensitive(this.value(s),r[2]):r[1]==="does not include"?t.filter=s=>!St.stringIncludesCaseInsensitive(this.value(s),r[2]):t.error=`do not understand query filter (${this.fieldName()})`:t.error=`do not understand query filter (${this.fieldName()})`,t}static stringIncludesCaseInsensitive(e,t){return e.toLocaleLowerCase().includes(t.toLocaleLowerCase())}};var bu=class extends St{fieldName(){return"description"}filterRegexp(){return bu.descriptionRegexp}value(e){let t=le().globalFilter;return e.description.replace(t,"").trim()}},Os=bu;Os.descriptionRegexp=/^description (includes|does not include) (.*)/;var ny=$e(Re()),hi=class{static parseDate(e){return window.moment(ny.parseDate(e)).startOf("day")}};var qt=class extends wt{createFilterOrErrorMessage(e){let t=new Ce,r=e.match(this.filterRegexp());if(r!==null){let i=hi.parseDate(r[2]);i.isValid()?r[1]==="before"?t.filter=s=>{let a=this.date(s);return a?a.isBefore(i):this.filterResultIfFieldMissing()}:r[1]==="after"?t.filter=s=>{let a=this.date(s);return a?a.isAfter(i):this.filterResultIfFieldMissing()}:t.filter=s=>{let a=this.date(s);return a?a.isSame(i):this.filterResultIfFieldMissing()}:t.error="do not understand "+this.fieldName()+" date"}else t.error="do not understand query filter ("+this.fieldName()+" date)";return t}};var Sr=class extends qt{canCreateFilterForLine(e){return e===Sr.instructionForFieldPresence||e===Sr.instructionForFieldAbsence?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){if(e===Sr.instructionForFieldPresence){let t=new Ce;return t.filter=r=>this.date(r)!==null,t}if(e===Sr.instructionForFieldAbsence){let t=new Ce;return t.filter=r=>this.date(r)===null,t}return super.createFilterOrErrorMessage(e)}filterRegexp(){return Sr.doneRegexp}fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}},hn=Sr;hn.doneRegexp=/^done (before|after|on)? ?(.*)/,hn.instructionForFieldPresence="has done date",hn.instructionForFieldAbsence="no done date";var wu=class extends qt{filterRegexp(){return wu.dueRegexp}fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}},Rs=wu;Rs.dueRegexp=/^due (before|after|on)? ?(.*)/;var Du=class extends St{filterRegexp(){return Du.headingRegexp}fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}},Ps=Du;Ps.headingRegexp=/^heading (includes|does not include) (.*)/;var Eu=class extends St{filterRegexp(){return Eu.pathRegexp}fieldName(){return"path"}value(e){return e.path}},Ss=Eu;Ss.pathRegexp=/^path (includes|does not include) (.*)/;var ku=class extends wt{createFilterOrErrorMessage(e){let t=new Ce,r=e.match(this.filterRegexp());if(r!==null){let i=r[3],s=null;switch(i){case"low":s=ie.Low;break;case"none":s=ie.None;break;case"medium":s=ie.Medium;break;case"high":s=ie.High;break}if(s===null)return t.error="do not understand priority",t;let a;r[2]==="above"?a=o=>o.priority?o.priority.localeCompare(s)<0:!1:r[2]==="below"?a=o=>o.priority?o.priority.localeCompare(s)>0:!1:a=o=>o.priority?o.priority===s:!1,t.filter=a}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegexp(){return ku.priorityRegexp}},xs=ku;xs.priorityRegexp=/^priority (is )?(above|below)? ?(low|none|medium|high)/;var Mu=class extends qt{filterRegexp(){return Mu.scheduledRegexp}fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}},As=Mu;As.scheduledRegexp=/^scheduled (before|after|on)? ?(.*)/;var Ou=class extends qt{filterRegexp(){return Ou.startRegexp}fieldName(){return"start"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}},Ns=Ou;Ns.startRegexp=/^starts (before|after|on)? ?(.*)/;var xr=class extends wt{canCreateFilterForLine(e){return e===xr.instructionForFieldPresence||e===xr.instructionForFieldAbsence?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){let t=new Ce;if(e===xr.instructionForFieldPresence){let i=new Ce;return i.filter=s=>this.dates(s).some(a=>a!==null),i}if(e===xr.instructionForFieldAbsence){let i=new Ce;return i.filter=s=>!this.dates(s).some(a=>a!==null),i}let r=e.match(this.filterRegexp());if(r!==null){let i=hi.parseDate(r[2]);i.isValid()?r[1]==="before"?t.filter=s=>this.dates(s).some(a=>a&&a.isBefore(i)):r[1]==="after"?t.filter=s=>this.dates(s).some(a=>a&&a.isAfter(i)):t.filter=s=>this.dates(s).some(a=>a&&a.isSame(i)):t.error="do not understand happens date"}else t.error="do not understand query filter (happens date)";return t}filterRegexp(){return xr.happensRegexp}dates(e){return Array.of(e.startDate,e.scheduledDate,e.dueDate)}fieldName(){return"happens"}},mn=xr;mn.happensRegexp=/^happens (before|after|on)? ?(.*)/,mn.instructionForFieldPresence="has happens date",mn.instructionForFieldAbsence="no happens date";var Ru=class extends wt{createFilterOrErrorMessage(e){let t=new Ce,r=e.match(this.filterRegexp());if(r!==null){let i=r[2],s=r[3].replace(/^#/,"");i==="include"||i==="includes"?t.filter=a=>a.tags.find(o=>o.toLowerCase().includes(s.toLowerCase()))!==void 0:r[2]==="do not include"||r[2]==="does not include"?t.filter=a=>a.tags.find(o=>o.toLowerCase().includes(s.toLowerCase()))==null:t.error="do not understand query filter (tag/tags)"}else t.error="do not understand query filter (tag/tags)";return t}fieldName(){return"tag/tags"}filterRegexp(){return Ru.tagRegexp}},Cs=Ru;Cs.tagRegexp=/^(tag|tags) (includes|does not include|include|do not include) (.*)/;var mi=class{constructor({source:e}){this._limit=void 0;this._layoutOptions=new gn;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this.noStartString="no start date";this.hasStartString="has start date";this.noScheduledString="no scheduled date";this.hasScheduledString="has scheduled date";this.noDueString="no due date";this.hasDueString="has due date";this.doneString="done";this.notDoneString="not done";this.sortByRegexp=/^sort by (urgency|status|priority|start|scheduled|due|done|path|description|tag)( reverse)?[\s]*(\d+)?/;this.groupByRegexp=/^group by (backlink|done|due|filename|folder|heading|path|scheduled|start|status)/;this.hideOptionsRegexp=/^hide (task count|backlink|priority|start date|scheduled date|done date|due date|recurrence rule|edit button)/;this.shortModeRegexp=/^short/;this.recurringString="is recurring";this.notRecurringString="is not recurring";this.limitRegexp=/^limit (to )?(\d+)( tasks?)?/;this.excludeSubItemsString="exclude sub-items";this.commentRegexp=/^#.*/;this.source=e,e.split(` `).map(t=>t.trim()).forEach(t=>{switch(!0){case t==="":break;case t===this.doneString:this._filters.push(r=>r.status===he.Done);break;case t===this.notDoneString:this._filters.push(r=>r.status!==he.Done);break;case t===this.recurringString:this._filters.push(r=>r.recurrence!==null);break;case t===this.notRecurringString:this._filters.push(r=>r.recurrence===null);break;case t===this.excludeSubItemsString:this._filters.push(r=>r.indentation==="");break;case t===this.noStartString:this._filters.push(r=>r.startDate===null);break;case t===this.noScheduledString:this._filters.push(r=>r.scheduledDate===null);break;case t===this.noDueString:this._filters.push(r=>r.dueDate===null);break;case t===this.hasStartString:this._filters.push(r=>r.startDate!==null);break;case t===this.hasScheduledString:this._filters.push(r=>r.scheduledDate!==null);break;case t===this.hasDueString:this._filters.push(r=>r.dueDate!==null);break;case this.shortModeRegexp.test(t):this._layoutOptions.shortMode=!0;break;case this.parseFilter(t,new xs):break;case this.parseFilter(t,new mn):break;case this.parseFilter(t,new Ns):break;case this.parseFilter(t,new As):break;case this.parseFilter(t,new Rs):break;case this.parseFilter(t,new hn):break;case this.parseFilter(t,new Ss):break;case this.parseFilter(t,new Os):break;case this.parseFilter(t,new Cs):break;case this.parseFilter(t,new Ps):break;case this.limitRegexp.test(t):this.parseLimit({line:t});break;case this.sortByRegexp.test(t):this.parseSortBy({line:t});break;case this.groupByRegexp.test(t):this.parseGroupBy({line:t});break;case this.hideOptionsRegexp.test(t):this.parseHideOptions({line:t});break;case this.commentRegexp.test(t):break;default:this._error=`do not understand query: ${t}`}})}get limit(){return this._limit}get layoutOptions(){return this._layoutOptions}get filters(){return this._filters}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}applyQueryToTasks(e){this.filters.forEach(r=>{e=e.filter(r)});let t=fi.by(this,e).slice(0,this.limit);return or.by(this.grouping,t)}parseHideOptions({line:e}){let t=e.match(this.hideOptionsRegexp);if(t!==null)switch(t[1].trim().toLowerCase()){case"task count":this._layoutOptions.hideTaskCount=!0;break;case"backlink":this._layoutOptions.hideBacklinks=!0;break;case"priority":this._layoutOptions.hidePriority=!0;break;case"start date":this._layoutOptions.hideStartDate=!0;break;case"scheduled date":this._layoutOptions.hideScheduledDate=!0;break;case"due date":this._layoutOptions.hideDueDate=!0;break;case"done date":this._layoutOptions.hideDoneDate=!0;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=!0;break;case"edit button":this._layoutOptions.hideEditButton=!0;break;default:this._error="do not understand hide option"}}parseFilter(e,t){if(t.canCreateFilterForLine(e)){let{filter:r,error:i}=t.createFilterOrErrorMessage(e);return r?this._filters.push(r):this._error=i,!0}else return!1}parseLimit({line:e}){let t=e.match(this.limitRegexp);t!==null?this._limit=Number.parseInt(t[2],10):this._error="do not understand query limit"}parseSortBy({line:e}){let t=e.match(this.sortByRegexp);t!==null?this._sorting.push({property:t[1],reverse:!!t[2],propertyInstance:isNaN(+t[3])?1:+t[3]}):this._error="do not understand query sorting"}parseGroupBy({line:e}){let t=e.match(this.groupByRegexp);t!==null?this._grouping.push({property:t[1]}):this._error="do not understand query grouping"}};var Pu=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,r){return ae(this,null,function*(){r.addChild(new pi({app:this.app,events:this.events,container:t,source:e}))})}},pi=class extends iy.MarkdownRenderChild{constructor({app:e,events:t,container:r,source:i}){super(r);switch(this.app=e,this.events=t,this.source=i,this.containerEl.className){case"block-language-tasks":this.query=new mi({source:i}),this.queryType="tasks";break;default:this.query=new mi({source:i}),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let e=new Date;e.setHours(24,0,0,0);let t=new Date,r=e.getTime()-t.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=new mi({source:this.source}),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},r+1e3)}render(r){return ae(this,arguments,function*({tasks:e,state:t}){var s;console.debug(`Render ${this.queryType} called for ${e.length} tasks, state: ${t}`);let i=this.containerEl.createEl("div");if(t===Dr.Warm&&this.query.error===void 0){let a=this.query.applyQueryToTasks(e);for(let u of a.groups){pi.addGroupHeadings(i,u.groupHeadings);let{taskList:l}=yield this.createTasksList({tasks:u.tasks,content:i});i.appendChild(l)}let o=a.totalTasksCount();this.addTaskCount(i,o)}else this.query.error!==void 0?i.setText(`Tasks query: ${this.query.error}`):i.setText("Loading Tasks ...");(s=this.containerEl.firstChild)==null||s.replaceWith(i)})}createTasksList(r){return ae(this,arguments,function*({tasks:e,content:t}){let i=e.length,s=t.createEl("ul");s.addClasses(["contains-task-list","plugin-tasks-query-result"]);for(let a=0;ah.remove());let c=l.createSpan(),f=this.query.layoutOptions.shortMode;this.query.layoutOptions.hideBacklinks||this.addBacklinks(c,o,f,u),this.query.layoutOptions.hideEditButton||this.addEditButton(c,o),s.appendChild(l)}return{taskList:s,tasksCount:i}})}addEditButton(e,t){e.createEl("a",{cls:"tasks-edit"}).onClickEvent(i=>{i.preventDefault();let s=o=>{Mi({originalTask:t,newTasks:o})};new di({app:this.app,task:t,onSubmit:s}).open()})}static addGroupHeadings(e,t){for(let r of t)pi.addGroupHeading(e,r)}static addGroupHeading(e,t){let r;t.nestingLevel===0?r=e.createEl("h4",{cls:"tasks-group-heading"}):t.nestingLevel===1?r=e.createEl("h5",{cls:"tasks-group-heading"}):r=e.createEl("h6",{cls:"tasks-group-heading"}),r.appendText(t.name)}addBacklinks(e,t,r,i){var o;e.addClass("tasks-backlink"),r||e.append(" (");let s=e.createEl("a");s.href=t.path,s.setAttribute("data-href",t.path),s.rel="noopener",s.target="_blank",s.addClass("internal-link"),r&&s.addClass("internal-link-short-mode"),t.precedingHeader!==null&&(s.href=s.href+"#"+t.precedingHeader,s.setAttribute("data-href",s.getAttribute("data-href")+"#"+t.precedingHeader));let a;r?a=" \u{1F517}":a=(o=t.getLinkText({isFilenameUnique:i}))!=null?o:"",s.setText(a),r||e.append(")")}addTaskCount(e,t){this.query.layoutOptions.hideTaskCount||e.createDiv({text:`${t} task${t!==1?"s":""}`,cls:"tasks-count"})}isFilenameUnique({task:e}){let t=e.path.match(/([^/]*)\..+$/i);if(t===null)return;let r=t[1];return this.app.vault.getMarkdownFiles().filter(s=>{if(s.basename===r)return!0}).length<2}};var pn=$e(require("obsidian"));var Su=class extends pn.PluginSettingTab{constructor({plugin:e}){super(e.app,e);this.plugin=e}display(){let{containerEl:e}=this;e.empty(),e.createEl("h2",{text:"Tasks Settings"}),e.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),new pn.Setting(e).setName("Global task filter").setDesc("The global filter will be applied to all checklist items.").addText(t=>{let r=le();t.setPlaceholder("#task").setValue(r.globalFilter).onChange(i=>ae(this,null,function*(){Cr({globalFilter:i}),yield this.plugin.saveSettings()}))}),e.createEl("div",{cls:"setting-item-description",text:'The global filter will be applied to all checklist items to filter out "non-task" checklist items.\nA checklist item must include the specified string in its description in order to be considered a task.\nFor example, if you set the global filter to `#task`, the Tasks plugin will only handle checklist items tagged with `#task`.\nOther checklist items will remain normal checklist items and not appear in queries or get a done date set.\nLeave empty if you want all checklist items from your vault to be tasks managed by this plugin.'}),new pn.Setting(e).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(t=>{let r=le();t.setValue(r.removeGlobalFilter).onChange(i=>ae(this,null,function*(){Cr({removeGlobalFilter:i}),yield this.plugin.saveSettings()}))}),new pn.Setting(e).setName("Set done date on every completed task").setDesc("Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done").addToggle(t=>{let r=le();t.setValue(r.setDoneDate).onChange(i=>ae(this,null,function*(){Cr({setDoneDate:i}),yield this.plugin.saveSettings()}))})}};var xu=class extends sy.Plugin{onload(){return ae(this,null,function*(){console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new Su({plugin:this})),rl({metadataCache:this.app.metadataCache,vault:this.app.vault});let e=new hu({obsidianEents:this.app.workspace});this.cache=new Wa({metadataCache:this.app.metadataCache,vault:this.app.vault,events:e}),this.inlineRenderer=new mu({plugin:this}),this.queryRenderer=new Pu({plugin:this,events:e}),this.registerEditorExtension(ty()),new fu({plugin:this})})}onunload(){var e;console.log('unloading plugin "tasks"'),(e=this.cache)==null||e.unload()}loadSettings(){return ae(this,null,function*(){let e=yield this.loadData();Cr(e)})}saveSettings(){return ae(this,null,function*(){yield this.saveData(le())})}}; /*! * rrule.js - Library for working with recurrence rules for calendar dates. * https://github.com/jakubroztocil/rrule * * Copyright 2010, Jakub Roztocil and Lars Schoning * Licenced under the BSD licence. * https://github.com/jakubroztocil/rrule/blob/master/LICENCE * * Based on: * python-dateutil - Extensions to the standard Python datetime module. * Copyright (c) 2003-2011 - Gustavo Niemeyer * Copyright (c) 2012 - Tomi Pieviläinen * https://github.com/jakubroztocil/rrule/blob/master/LICENCE * */ /*! * rrule.js - Library for working with recurrence rules for calendar dates. * https://github.com/jakubroztocil/rrule * * Copyright 2010, Jakub Roztocil and Lars Schoning * Licenced under the BSD licence. * https://github.com/jakubroztocil/rrule/blob/master/LICENCE * */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */