From cdb6555e94a0e9bb465a79bab61927a5919fb74c Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sat, 24 Aug 2024 08:23:23 +0300 Subject: [PATCH] vault backup: 2024-08-24 08:23:23 --- .obsidian/plugins/home-tab/data.json | 26 +++----- .obsidian/plugins/homepage/main.js | 2 +- .obsidian/plugins/homepage/manifest.json | 2 +- .obsidian/plugins/khoj/main.js | 51 +++++++++++++++- .obsidian/plugins/khoj/manifest.json | 2 +- .../plugins/obsidian-hider/manifest.json | 2 +- .../plugins/obsidian-tasks-plugin/main.js | 60 +++++++++---------- .../obsidian-tasks-plugin/manifest.json | 2 +- .../plugins/recent-files-obsidian/data.json | 16 ++--- .obsidian/plugins/templater-obsidian/main.js | 2 +- .../plugins/templater-obsidian/manifest.json | 2 +- 11 files changed, 104 insertions(+), 63 deletions(-) diff --git a/.obsidian/plugins/home-tab/data.json b/.obsidian/plugins/home-tab/data.json index f7dd6217..8bb3b83c 100644 --- a/.obsidian/plugins/home-tab/data.json +++ b/.obsidian/plugins/home-tab/data.json @@ -23,25 +23,17 @@ "markdownOnly": false, "unresolvedLinks": false, "recentFilesStore": [ + { + "filepath": "_inbox/Уроки от English Galaxy.md", + "timestamp": 1724476751121 + }, + { + "filepath": "Home.md", + "timestamp": 1724476703382 + }, { "filepath": "_inbox/Утилита ngrok.md", - "timestamp": 1724433883247 - }, - { - "filepath": "notes/Эротическая игра в телеграме для пар.md", - "timestamp": 1724433739484 - }, - { - "filepath": "knowledge/health/болезни/Бессонница.md", - "timestamp": 1724430483144 - }, - { - "filepath": "knowledge/health/болезни/Депрессия.md", - "timestamp": 1724430479981 - }, - { - "filepath": "_inbox/Кошмар.md", - "timestamp": 1724428176822 + "timestamp": 1724476702377 } ], "bookmarkedFileStore": [], diff --git a/.obsidian/plugins/homepage/main.js b/.obsidian/plugins/homepage/main.js index 7138be26..e91c1642 100644 --- a/.obsidian/plugins/homepage/main.js +++ b/.obsidian/plugins/homepage/main.js @@ -1,2 +1,2 @@ "use strict";var Ye=Object.create;var Y=Object.defineProperty;var Be=Object.getOwnPropertyDescriptor;var Ue=Object.getOwnPropertyNames;var Ke=Object.getPrototypeOf,je=Object.prototype.hasOwnProperty;var qe=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),ze=(a,t)=>{for(var e in t)Y(a,e,{get:t[e],enumerable:!0})},me=(a,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ue(t))!je.call(a,i)&&i!==e&&Y(a,i,{get:()=>t[i],enumerable:!(n=Be(t,i))||n.enumerable});return a};var Ge=(a,t,e)=>(e=a!=null?Ye(Ke(a)):{},me(t||!a||!a.__esModule?Y(e,"default",{value:a,enumerable:!0}):e,a)),$e=a=>me(Y({},"__esModule",{value:!0}),a);var Ce=qe(l=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});var g=require("obsidian"),te="YYYY-MM-DD",ne="gggg-[W]ww",be="YYYY-MM",ke="YYYY-[Q]Q",Pe="YYYY";function F(a){let t=window.app.plugins.getPlugin("periodic-notes");return t&&t.settings?.[a]?.enabled}function O(){try{let{internalPlugins:a,plugins:t}=window.app;if(F("daily")){let{format:o,folder:s,template:c}=t.getPlugin("periodic-notes")?.settings?.daily||{};return{format:o||te,folder:s?.trim()||"",template:c?.trim()||""}}let{folder:e,format:n,template:i}=a.getPluginById("daily-notes")?.instance?.options||{};return{format:n||te,folder:e?.trim()||"",template:i?.trim()||""}}catch(a){console.info("No custom daily note settings found!",a)}}function L(){try{let a=window.app.plugins,t=a.getPlugin("calendar")?.options,e=a.getPlugin("periodic-notes")?.settings?.weekly;if(F("weekly"))return{format:e.format||ne,folder:e.folder?.trim()||"",template:e.template?.trim()||""};let n=t||{};return{format:n.weeklyNoteFormat||ne,folder:n.weeklyNoteFolder?.trim()||"",template:n.weeklyNoteTemplate?.trim()||""}}catch(a){console.info("No custom weekly note settings found!",a)}}function x(){let a=window.app.plugins;try{let t=F("monthly")&&a.getPlugin("periodic-notes")?.settings?.monthly||{};return{format:t.format||be,folder:t.folder?.trim()||"",template:t.template?.trim()||""}}catch(t){console.info("No custom monthly note settings found!",t)}}function C(){let a=window.app.plugins;try{let t=F("quarterly")&&a.getPlugin("periodic-notes")?.settings?.quarterly||{};return{format:t.format||ke,folder:t.folder?.trim()||"",template:t.template?.trim()||""}}catch(t){console.info("No custom quarterly note settings found!",t)}}function H(){let a=window.app.plugins;try{let t=F("yearly")&&a.getPlugin("periodic-notes")?.settings?.yearly||{};return{format:t.format||Pe,folder:t.folder?.trim()||"",template:t.template?.trim()||""}}catch(t){console.info("No custom yearly note settings found!",t)}}function Te(...a){let t=[];for(let n=0,i=a.length;n{let Z=n(),X=a.clone().set({hour:Z.get("hour"),minute:Z.get("minute"),second:Z.get("second")});return E&&X.add(parseInt(v,10),w),f?X.format(f.substring(1).trim()):X.format(o)}).replace(/{{\s*yesterday\s*}}/gi,a.clone().subtract(1,"day").format(o)).replace(/{{\s*tomorrow\s*}}/gi,a.clone().add(1,"d").format(o)));return t.foldManager.save(p,m),p}catch(p){console.error(`Failed to create file: '${d}'`,p),new g.Notice("Unable to create new file.")}}function et(a,t){return t[P(a,"day")]??null}function tt(){let{vault:a}=window.app,{folder:t}=O(),e=a.getAbstractFileByPath(g.normalizePath(t));if(!e)throw new ae("Failed to find daily notes folder");let n={};return g.Vault.recurseChildren(e,i=>{if(i instanceof g.TFile){let o=M(i,"day");if(o){let s=P(o,"day");n[s]=i}}}),n}var ie=class extends Error{};function nt(){let{moment:a}=window,t=a.localeData()._week.dow,e=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];for(;t;)e.push(e.shift()),t--;return e}function at(a){return nt().indexOf(a.toLowerCase())}async function Me(a){let{vault:t}=window.app,{template:e,format:n,folder:i}=L(),[o,s]=await A(e),c=a.format(n),m=await R(i,c);try{let r=await t.create(m,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,p,T,D,E,v)=>{let w=window.moment(),f=a.clone().set({hour:w.get("hour"),minute:w.get("minute"),second:w.get("second")});return T&&f.add(parseInt(D,10),E),v?f.format(v.substring(1).trim()):f.format(n)}).replace(/{{\s*title\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(d,p,T)=>{let D=at(p);return a.weekday(D).format(T.trim())}));return window.app.foldManager.save(r,s),r}catch(r){console.error(`Failed to create file: '${m}'`,r),new g.Notice("Unable to create new file.")}}function it(a,t){return t[P(a,"week")]??null}function ot(){let a={};if(!Fe())return a;let{vault:t}=window.app,{folder:e}=L(),n=t.getAbstractFileByPath(g.normalizePath(e));if(!n)throw new ie("Failed to find weekly notes folder");return g.Vault.recurseChildren(n,i=>{if(i instanceof g.TFile){let o=M(i,"week");if(o){let s=P(o,"week");a[s]=i}}}),a}var oe=class extends Error{};async function Se(a){let{vault:t}=window.app,{template:e,format:n,folder:i}=x(),[o,s]=await A(e),c=a.format(n),m=await R(i,c);try{let r=await t.create(m,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,p,T,D,E,v)=>{let w=window.moment(),f=a.clone().set({hour:w.get("hour"),minute:w.get("minute"),second:w.get("second")});return T&&f.add(parseInt(D,10),E),v?f.format(v.substring(1).trim()):f.format(n)}).replace(/{{\s*date\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,c));return window.app.foldManager.save(r,s),r}catch(r){console.error(`Failed to create file: '${m}'`,r),new g.Notice("Unable to create new file.")}}function st(a,t){return t[P(a,"month")]??null}function rt(){let a={};if(!Oe())return a;let{vault:t}=window.app,{folder:e}=x(),n=t.getAbstractFileByPath(g.normalizePath(e));if(!n)throw new oe("Failed to find monthly notes folder");return g.Vault.recurseChildren(n,i=>{if(i instanceof g.TFile){let o=M(i,"month");if(o){let s=P(o,"month");a[s]=i}}}),a}var se=class extends Error{};async function lt(a){let{vault:t}=window.app,{template:e,format:n,folder:i}=C(),[o,s]=await A(e),c=a.format(n),m=await R(i,c);try{let r=await t.create(m,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,p,T,D,E,v)=>{let w=window.moment(),f=a.clone().set({hour:w.get("hour"),minute:w.get("minute"),second:w.get("second")});return T&&f.add(parseInt(D,10),E),v?f.format(v.substring(1).trim()):f.format(n)}).replace(/{{\s*date\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,c));return window.app.foldManager.save(r,s),r}catch(r){console.error(`Failed to create file: '${m}'`,r),new g.Notice("Unable to create new file.")}}function ct(a,t){return t[P(a,"quarter")]??null}function dt(){let a={};if(!Le())return a;let{vault:t}=window.app,{folder:e}=C(),n=t.getAbstractFileByPath(g.normalizePath(e));if(!n)throw new se("Failed to find quarterly notes folder");return g.Vault.recurseChildren(n,i=>{if(i instanceof g.TFile){let o=M(i,"quarter");if(o){let s=P(o,"quarter");a[s]=i}}}),a}var re=class extends Error{};async function pt(a){let{vault:t}=window.app,{template:e,format:n,folder:i}=H(),[o,s]=await A(e),c=a.format(n),m=await R(i,c);try{let r=await t.create(m,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,p,T,D,E,v)=>{let w=window.moment(),f=a.clone().set({hour:w.get("hour"),minute:w.get("minute"),second:w.get("second")});return T&&f.add(parseInt(D,10),E),v?f.format(v.substring(1).trim()):f.format(n)}).replace(/{{\s*date\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,c));return window.app.foldManager.save(r,s),r}catch(r){console.error(`Failed to create file: '${m}'`,r),new g.Notice("Unable to create new file.")}}function ut(a,t){return t[P(a,"year")]??null}function gt(){let a={};if(!xe())return a;let{vault:t}=window.app,{folder:e}=H(),n=t.getAbstractFileByPath(g.normalizePath(e));if(!n)throw new re("Failed to find yearly notes folder");return g.Vault.recurseChildren(n,i=>{if(i instanceof g.TFile){let o=M(i,"year");if(o){let s=P(o,"year");a[s]=i}}}),a}function mt(){let{app:a}=window,t=a.internalPlugins.plugins["daily-notes"];if(t&&t.enabled)return!0;let e=a.plugins.getPlugin("periodic-notes");return e&&e.settings?.daily?.enabled}function Fe(){let{app:a}=window;if(a.plugins.getPlugin("calendar"))return!0;let t=a.plugins.getPlugin("periodic-notes");return t&&t.settings?.weekly?.enabled}function Oe(){let{app:a}=window,t=a.plugins.getPlugin("periodic-notes");return t&&t.settings?.monthly?.enabled}function Le(){let{app:a}=window,t=a.plugins.getPlugin("periodic-notes");return t&&t.settings?.quarterly?.enabled}function xe(){let{app:a}=window,t=a.plugins.getPlugin("periodic-notes");return t&&t.settings?.yearly?.enabled}function ht(a){let t={day:O,week:L,month:x,quarter:C,year:H}[a];return t()}function ft(a,t){return{day:Ae,month:Se,week:Me}[a](t)}l.DEFAULT_DAILY_NOTE_FORMAT=te;l.DEFAULT_MONTHLY_NOTE_FORMAT=be;l.DEFAULT_QUARTERLY_NOTE_FORMAT=ke;l.DEFAULT_WEEKLY_NOTE_FORMAT=ne;l.DEFAULT_YEARLY_NOTE_FORMAT=Pe;l.appHasDailyNotesPluginLoaded=mt;l.appHasMonthlyNotesPluginLoaded=Oe;l.appHasQuarterlyNotesPluginLoaded=Le;l.appHasWeeklyNotesPluginLoaded=Fe;l.appHasYearlyNotesPluginLoaded=xe;l.createDailyNote=Ae;l.createMonthlyNote=Se;l.createPeriodicNote=ft;l.createQuarterlyNote=lt;l.createWeeklyNote=Me;l.createYearlyNote=pt;l.getAllDailyNotes=tt;l.getAllMonthlyNotes=rt;l.getAllQuarterlyNotes=dt;l.getAllWeeklyNotes=ot;l.getAllYearlyNotes=gt;l.getDailyNote=et;l.getDailyNoteSettings=O;l.getDateFromFile=M;l.getDateFromPath=Xe;l.getDateUID=P;l.getMonthlyNote=st;l.getMonthlyNoteSettings=x;l.getPeriodicNoteSettings=ht;l.getQuarterlyNote=ct;l.getQuarterlyNoteSettings=C;l.getTemplateInfo=A;l.getWeeklyNote=it;l.getWeeklyNoteSettings=L;l.getYearlyNote=ut;l.getYearlyNoteSettings=H});var Nt={};ze(Nt,{default:()=>J});module.exports=$e(Nt);var b=require("obsidian");var N=require("obsidian");var He=require("obsidian");var he=require("obsidian");function k(a){return a?a.extension=="md"?a.path.slice(0,-3):a.path:""}function fe(a){return a.split("/").slice(-1)[0].contains(".")?a:`${a}.md`}function we(a){let t=a.vault.getFiles().filter(e=>["md","canvas"].contains(e.extension));if(t.length){let e=Math.floor(Math.random()*t.length);return k(t[e])}}function ye(a){return a.workspace.getActiveViewOfType(he.View)?.getViewType()=="empty"}function ee(a,t){return a.localeCompare(t,void 0,{sensitivity:"accent"})===0}function B(a){return new Promise(t=>setTimeout(t,a))}function ve(a,t){a.workspace.iterateRootLeaves(e=>{!e.view||!t.contains(e.view.getViewType())||e.detach()})}function Ne(a){let t=new Promise(e=>{let n=async()=>{e(),a.workspace.off("layout-change",n)};a.workspace.on("layout-change",n)});return Promise.race([t,new Promise(e=>setTimeout(e,1500))])}var u=Ge(Ce()),le={["Daily Note"]:{noun:"day",adjective:"daily",create:u.createDailyNote,get:u.getDailyNote,getAll:u.getAllDailyNotes},["Weekly Note"]:{noun:"week",adjective:"weekly",create:u.createWeeklyNote,get:u.getWeeklyNote,getAll:u.getAllWeeklyNotes},["Monthly Note"]:{noun:"month",adjective:"monthly",create:u.createMonthlyNote,get:u.getMonthlyNote,getAll:u.getAllMonthlyNotes},["Yearly Note"]:{noun:"year",adjective:"yearly",create:u.createYearlyNote,get:u.getYearlyNote,getAll:u.getAllYearlyNotes}},U=["Daily Note","Weekly Note","Monthly Note","Yearly Note"],Re="Date-dependent file",ce="Date-dependent notes in Homepage have been removed. Set your Homepage as a Periodic or Daily Note instead.";async function Ie(a,t){let e=t.communityPlugins["periodic-notes"],n=le[a],i=(0,He.moment)().startOf(n.noun),o;if(_e(e)){let s=n.getAll();Object.keys(s).length?o=n.get(i,s)||await n.create(i):o=await n.create(i)}else e.cache.initialize(),o=e.getPeriodicNote(n.noun,i)||await e.createPeriodicNote(n.noun,i);return k(o)}function Ve(a,t){if(a=="Daily Note"&&t.internalPlugins["daily-notes"]?.enabled)return!0;let e=t.communityPlugins["periodic-notes"];if(!e)return!1;if(_e(e)){let n=le[a].adjective;return e.settings[n]?.enabled}else{let n=le[a].noun;return e?.calendarSetManager?.getActiveSet()[n]?.enabled}}function K(a){let t=a.internalPlugins["daily-notes"];return t?.enabled&&t?.instance.options.autorun}function _e(a){return(a?.manifest.version||"0").startsWith("0")}var y=require("obsidian");var h=require("obsidian");var j=class extends h.AbstractInputSuggest{getSuggestions(e){let n=this.app.vault.getAllLoadedFiles(),i=[],o=e.toLowerCase();return n.forEach(s=>{s instanceof h.TFile&&["md","canvas"].contains(s.extension)&&s.path.toLowerCase().contains(o)&&i.push(s)}),i}renderSuggestion(e,n){e.extension=="md"?n.setText(k(e)):(n.setText(e.path.slice(0,-7)),n.insertAdjacentHTML("beforeend",''))}selectSuggestion(e){this.textInputEl.value=k(e),this.textInputEl.trigger("input"),this.close()}},q=class extends h.AbstractInputSuggest{getSuggestions(e){let n=Object.keys(this.app.internalPlugins.plugins.workspaces?.instance.workspaces),i=e.toLowerCase();return n.filter(o=>o.toLowerCase().contains(i))}renderSuggestion(e,n){n.setText(e)}selectSuggestion(e){this.textInputEl.value=e,this.textInputEl.trigger("input"),this.close()}},z=class{constructor(t){this.app=t.plugin.app,this.homepage=t.plugin.homepage,this.tab=t,this.container=t.containerEl.createDiv({cls:"nv-command-box"}),this.dropzone=document.createElement("div"),this.dropzone.className="nv-command-pill nv-dropzone",this.dropzone.addEventListener("dragenter",e=>e.preventDefault()),this.dropzone.addEventListener("dragover",e=>e.preventDefault()),this.dropzone.addEventListener("drop",()=>this.terminateDrag()),this.update()}update(){this.container.innerHTML="",this.activeDrag=null,this.activeCommand=null;for(let t of this.homepage.data.commands){let e=this.app.commands.findCommand(t.id),n=this.container.createDiv({cls:"nv-command-pill",attr:{draggable:!0}});n.addEventListener("dragstart",o=>{o.dataTransfer.effectAllowed="move",this.activeCommand=this.homepage.data.commands.splice(this.indexOf(n),1)[0],this.activeDrag=n,this.dropzone.style.width=`${n.clientWidth}px`,this.dropzone.style.height=`${n.clientHeight}px`}),n.addEventListener("dragover",o=>this.moveDropzone(n,o)),n.addEventListener("drop",o=>o.preventDefault()),n.addEventListener("dragend",()=>this.terminateDrag()),n.createSpan({cls:"nv-command-text",text:e?.name??t.id});let i=new h.ButtonComponent(n).setIcon("route").setClass("clickable-icon").setClass("nv-command-period").onClick(o=>this.showMenu(t,o,i));t.period!="Both"&&(i.setClass("nv-command-selected"),i.setIcon(""),i.buttonEl.createSpan({text:t.period})),new h.ButtonComponent(n).setIcon("trash-2").setClass("clickable-icon").setClass("nv-command-delete").onClick(()=>this.delete(t)),e||(n.classList.add("nv-command-invalid"),n.prepend((0,h.getIcon)("ban")),(0,h.setTooltip)(n,"This command can't be found, so it won't be executed. It may belong to a disabled plugin.",{delay:.001}))}new h.ButtonComponent(this.container).setClass("nv-command-add-button").setButtonText("Add...").onClick(()=>{new de(this.tab).open()})}delete(t){this.homepage.data.commands.remove(t),this.homepage.save(),this.update()}showMenu(t,e,n){let i=new h.Menu;for(let s of Object.values(G))i.addItem(c=>{c.setTitle(s),c.setChecked(t.period==s),c.onClick(()=>{t.period=s,this.homepage.save(),this.update()})});let o=n.buttonEl.getBoundingClientRect();i.showAtPosition({x:o.x-22,y:o.y+o.height+8})}indexOf(t){return Array.from(this.container.children).indexOf(t)}moveDropzone(t,e){if(!this.activeDrag)return;this.activeDrag.hidden=!0;let n=t.getBoundingClientRect();e.xawait this.copyDebugInfo()})}sanitiseNote(e){return e===null||e.match(/^\s*$/)!==null?null:(0,y.normalizePath)(e)}display(){let e=this.plugin.homepage.data.kind=="Workspace",n=this.plugin.homepage.data.kind,i=K(this.plugin),o=!1,s=e?q:j;this.containerEl.empty(),this.elements={};let c=new y.Setting(this.containerEl).setName("Homepage").addDropdown(async d=>{for(let p of Object.values(I)){if(!this.plugin.hasRequiredPlugin(p))if(p==this.plugin.homepage.data.kind)o=!0;else{d.selectEl.createEl("option",{text:p,attr:{disabled:!0}});continue}d.addOption(p,p)}d.setValue(this.plugin.homepage.data.kind),d.onChange(async p=>{this.plugin.homepage.data.kind=p,await this.plugin.homepage.save(),this.display()})});c.settingEl.id="nv-main-setting";let m=c.settingEl.createEl("article",{text:wt[n],attr:{id:"nv-desc"}});o&&m.createDiv({text:"The plugin required for this homepage type isn't available.",cls:"mod-warning"}),ge.includes(n)?c.addText(d=>{d.setDisabled(!0)}):c.addText(d=>{new s(this.app,d.inputEl),d.setPlaceholder(S.value),d.setValue(S.value==this.plugin.homepage.data.value?"":this.plugin.homepage.data.value),d.onChange(async p=>{this.plugin.homepage.data.value=this.sanitiseNote(p)||S.value,await this.plugin.homepage.save()})}),this.addToggle("Open on startup","When launching Obsidian, open the homepage.","openOnStartup",d=>this.display()),i&&(this.elements.openOnStartup.descEl.createDiv({text:`This setting has been disabled, as it isn't compatible with Daily Notes' "Open daily note on startup" functionality. To use it, disable the Daily Notes setting.`,attr:{class:"mod-warning"}}),this.disableSetting("openOnStartup")),this.addToggle("Open when empty","When there are no tabs open, open the homepage.","openWhenEmpty"),this.addToggle("Use when opening normally","Use homepage settings when opening it normally, such as from a link or the file browser.","alwaysApply");let r=new y.Setting(this.containerEl).setName("Separate mobile homepage").setDesc("For mobile devices, store the homepage and its settings separately.").addToggle(d=>d.setValue(this.plugin.settings.separateMobile).onChange(async p=>{this.plugin.settings.separateMobile=p,this.plugin.homepage=this.plugin.getHomepage(),await this.plugin.saveSettings(),this.display()}));if(this.plugin.settings.separateMobile){let d=y.Platform.isMobile?"desktop":"mobile",p=document.createElement("div");r.setClass("nv-mobile-setting"),p.className="mod-warning nv-mobile-info",p.innerHTML=`Mobile settings are stored separately. Therefore, changes to other settings will not affect - ${d} devices. To edit ${d} settings, use a ${d} device.`,r.settingEl.append(p)}this.addHeading("Commands","commandsHeading"),this.containerEl.createDiv({cls:"nv-command-desc setting-item-description",text:"Select commands that will be executed when opening the homepage."}),this.commandBox=new z(this),this.addHeading("Vault environment","vaultHeading"),this.addDropdown("Opening method","Determine how extant tabs and views are affected on startup.","openMode",Q),this.addDropdown("Manual opening method","Determine how extant tabs and views are affected when opening with commands or the ribbon button.","manualOpenMode",Q),this.addToggle("Pin","Pin the homepage when opening.","pin"),this.addToggle("Hide release notes","Never display release notes when Obsidian updates.","hideReleaseNotes"),this.addToggle("Auto-create","When the homepage doesn't exist, create a note with its name.","autoCreate"),this.elements.autoCreate.descEl.createDiv({text:"If this vault is synced using unofficial services, this may lead to content being overwritten.",cls:"mod-warning"}),this.addHeading("Opened view","paneHeading"),this.addDropdown("Homepage view","Choose what view to open the homepage in.","view",ue),this.addToggle("Revert view on close","When navigating away from the homepage, restore the default view.","revertView"),this.addToggle("Auto-scroll","When opening the homepage, scroll to the bottom and focus on the last line.","autoScroll"),"dataview"in this.plugin.communityPlugins&&(this.addToggle("Refresh Dataview","Always attempt to reload Dataview views when opening the homepage.","refreshDataview"),this.elements.refreshDataview.descEl.createDiv({text:"Requires Dataview auto-refresh to be enabled.",attr:{class:"mod-warning"}})),y.Platform.isMobile||new y.ButtonComponent(this.containerEl).setButtonText("Copy debug info").setClass("nv-debug-button").onClick(async()=>await this.copyDebugInfo()),(e||n==="Nothing")&&this.disableSettings("openWhenEmpty","alwaysApply","vaultHeading","openMode","manualOpenMode","autoCreate","pin"),(e||["Nothing","Graph view"].includes(n))&&this.disableSettings("paneHeading","view","revertView","autoScroll","refreshDataview"),(!this.plugin.homepage.data.openOnStartup||i)&&this.disableSetting("openMode"),U.includes(this.plugin.homepage.data.kind)&&this.disableSetting("autoCreate")}disableSetting(e){this.elements[e]?.settingEl.setAttribute("nv-greyed","")}disableSettings(...e){e.forEach(n=>this.disableSetting(n))}addHeading(e,n){let i=new y.Setting(this.containerEl).setHeading().setName(e);this.elements[n]=i}addDropdown(e,n,i,o,s){let c=new y.Setting(this.containerEl).setName(e).setDesc(n).addDropdown(async m=>{for(let r of Object.values(o))m.addOption(r,r);m.setValue(this.plugin.homepage.data[i]),m.onChange(async r=>{this.plugin.homepage.data[i]=r,await this.plugin.homepage.save(),s&&s(r)})});return this.elements[i]=c,c}addToggle(e,n,i,o){let s=new y.Setting(this.containerEl).setName(e).setDesc(n).addToggle(c=>c.setValue(this.plugin.homepage.data[i]).onChange(async m=>{this.plugin.homepage.data[i]=m,await this.plugin.homepage.save(),o&&o(m)}));return this.elements[i]=s,s}async copyDebugInfo(){let e=this.app.vault.config,n={...this.settings,_defaultViewMode:e.defaultViewMode||"default",_livePreview:e.livePreview!==void 0?e.livePreview:"default",_focusNewTab:e.focusNewTab!==void 0?e.focusNewTab:"default",_plugins:Object.keys(this.plugin.communityPlugins),_internalPlugins:Object.values(this.plugin.internalPlugins).flatMap(i=>i.enabled?[i.instance.id]:[]),_obsidianVersion:window.electron.ipcRenderer.sendSync("version")};await navigator.clipboard.writeText(JSON.stringify(n)),new y.Notice("Copied homepage debug information to clipboard")}};var We=["markdown","canvas","kanban"],yt=[...We,"audio","graph","image","pdf","video"],_="Main Homepage",W="Mobile Homepage",Q=(n=>(n.ReplaceAll="Replace all open notes",n.ReplaceLast="Replace last note",n.Retain="Keep open notes",n))(Q||{}),ue=(i=>(i.Default="Default view",i.Reading="Reading view",i.Source="Editing view (Source)",i.LivePreview="Editing view (Live Preview)",i))(ue||{}),I=(r=>(r.File="File",r.Workspace="Workspace",r.Random="Random file",r.Graph="Graph view",r.None="Nothing",r.DailyNote="Daily Note",r.WeeklyNote="Weekly Note",r.MonthlyNote="Monthly Note",r.YearlyNote="Yearly Note",r))(I||{}),G=(n=>(n.Both="Both",n.Startup="Startup only",n.Manual="Manual only",n))(G||{}),ge=["Random file","Graph view","Nothing",...U],V=class{constructor(t,e){this.lastView=void 0;this.openedViews=new WeakMap;this.name=t,this.plugin=e,this.app=e.app;let n=this.plugin.settings.homepages[t];n?this.data=Object.assign({},S,n):(this.plugin.settings.homepages[t]={...S},this.data=this.plugin.settings.homepages[t])}async open(t=!1){if(!this.plugin.hasRequiredPlugin(this.data.kind)){new N.Notice("Homepage cannot be opened due to plugin unavailablity.");return}if(this.data.kind==="Workspace")await this.launchWorkspace();else if(this.data.kind!=="Nothing"){let n=this.plugin.loaded?this.data.manualOpenMode:this.data.openMode;t&&(n="Keep open notes"),await this.launchLeaf(n)}if(this.data.commands.length<1)return;let e=this.plugin.loaded?"Startup only":"Manual only";await Ne(this.app);for(let{id:n,period:i}of this.data.commands)i!==e&&this.app.commands.executeCommandById(n)}async launchWorkspace(){let t=this.plugin.internalPlugins.workspaces?.instance;if(!(this.data.value in t.workspaces)){new N.Notice(`Cannot find the workspace "${this.data.value}" to use as the homepage.`);return}t.loadWorkspace(this.data.value),await B(100)}async launchLeaf(t){let e;if(this.computedValue=await this.computeValue(),this.plugin.executing=!0,!(K(this.plugin)&&!this.plugin.loaded)){if(t!=="Replace all open notes"){let n=this.getOpened();if(n.length>0){this.app.workspace.setActiveLeaf(n[0]),await this.configure(n[0]);return}else t=="Keep open notes"&&ye(this.app)&&(t="Replace last note")}t!=="Keep open notes"&&this.app.workspace.getActiveViewOfType(N.View)?.leaf.setPinned(!1),t==="Replace all open notes"&&(this.app.workspace?.floatingSplit?.children&&(await B(0),this.app.workspace.floatingSplit.children.forEach(n=>n.win.close())),ve(this.app,yt),await B(0),this.app.workspace.iterateRootLeaves(n=>this.app.workspace.setActiveLeaf(n))),this.data.kind==="Graph view"?e=await this.launchGraph(t):e=await this.launchNote(t),e&&await this.configure(e)}}async launchGraph(t){if(t==="Keep open notes"){let e=this.app.workspace.getLeaf("tab");this.app.workspace.setActiveLeaf(e)}return this.app.commands.executeCommandById("graph:open"),this.app.workspace.getActiveViewOfType(N.View)?.leaf}async launchNote(t){let e=this.app.metadataCache.getFirstLinkpathDest(this.computedValue,"/");if(!e){if(!this.data.autoCreate){new N.Notice(`Homepage "${this.computedValue}" does not exist.`);return}e=await this.app.vault.create(fe(this.computedValue),"")}let n=await this.app.vault.cachedRead(e),i=this.app.workspace.getLeaf(t=="Keep open notes");return await i.openFile(e),this.app.workspace.setActiveLeaf(i),n!==await this.app.vault.read(e)&&await this.app.vault.modify(e,n),i}async configure(t){this.plugin.executing=!1;let e=t.view;if(!(e instanceof N.MarkdownView)){this.data.pin&&e.leaf.setPinned(!0);return}let n=e.getState();if(this.data.revertView&&(this.lastView=new WeakRef(e)),this.data.autoScroll){let i=e.editor.lineCount();n.mode=="preview"?e.previewMode.applyScroll(i-4):(e.editor.setCursor(i),e.editor.focus())}if(this.data.pin&&e.leaf.setPinned(!0),this.data.view!="Default view"){switch(this.data.view){case"Editing view (Live Preview)":case"Editing view (Source)":n.mode="source",n.source=this.data.view!="Editing view (Live Preview)";break;case"Reading view":n.mode="preview";break}await e.leaf.setViewState({type:"markdown",state:n}),this.plugin.loaded&&this.data.refreshDataview&&this.plugin.communityPlugins.dataview?.index.touch()}}getOpened(){return this.data.kind=="Graph view"?this.app.workspace.getLeavesOfType("graph"):We.flatMap(e=>this.app.workspace.getLeavesOfType(e)).filter(e=>ee(k(e.view.file),this.computedValue))}async computeValue(){let t=this.data.value;switch(this.data.kind){case"Random file":let e=we(this.app);e&&(t=e);break;case"Daily Note":case"Weekly Note":case"Monthly Note":case"Yearly Note":t=await Ie(this.data.kind,this.plugin);break}return t}async save(){this.plugin.settings.homepages[this.name]=this.data,await this.plugin.saveSettings()}async setToActiveFile(){this.data.value=k(this.app.workspace.getActiveFile()),await this.save(),new N.Notice(`The homepage has been changed to "${this.data.value}".`)}canSetToFile(){return this.app.workspace.getActiveFile()!==null&&!ge.includes(this.data.kind)}async revertView(){if(this.lastView==null||this.data.view=="Default view")return;let t=this.lastView.deref();if(!t||ee(k(t.file),this.computedValue))return;let e=t.getState(),n=this.app.vault.config,i=n.defaultViewMode||"source",o=n.livePreview!==void 0?!n.livePreview:!1;t.leaf.getViewState().type=="markdown"&&(i!=e.mode||o!=e.source)&&(e.mode=i,e.source=o,await t.leaf.setViewState({type:"markdown",state:e,active:!0})),this.lastView=void 0}async openWhenEmpty(){if(!this.plugin.loaded||this.plugin.executing)return;let t=this.app.workspace.getActiveViewOfType(N.View)?.leaf;t?.getViewState().type!=="empty"||t.parentSplit.children.length!=1||await this.open(!0)}async apply(){let t=this.app.workspace.getActiveViewOfType(N.FileView);if(!t)return;let e=k(t.file);this.openedViews.get(t)!==e&&(this.openedViews.set(t,e),e===await this.computeValue()&&this.plugin.loaded&&!this.plugin.executing&&await this.configure(t.leaf))}};var vt='',J=class extends b.Plugin{constructor(){super(...arguments);this.newRelease=!1;this.loaded=!1;this.executing=!1;this.onLayoutChange=async()=>{this.homepage.data.revertView&&await this.homepage.revertView(),this.homepage.data.openWhenEmpty&&await this.homepage.openWhenEmpty(),this.homepage.data.alwaysApply&&await this.homepage.apply()}}async onload(){let e=document.body.querySelector(".progress-bar");this.patchReleaseNotes(),this.showInterstitial(e),this.settings=await this.loadSettings(),this.internalPlugins=this.app.internalPlugins.plugins,this.communityPlugins=this.app.plugins.plugins,this.homepage=this.getHomepage(),this.app.workspace.onLayoutReady(async()=>{let n=this.homepage.data.openOnStartup&&e&&!await this.hasUrlParams();this.patchNewTabPage(),n&&await this.homepage.open(),this.loaded=!0,this.unpatchReleaseNotes(),this.interstitial?.detach()}),(0,b.addIcon)("homepage",vt),this.addRibbonIcon("homepage","Open homepage",n=>this.homepage.open(n.button==1||n.button==2||b.Keymap.isModifier(n,"Mod"))).setAttribute("id","nv-homepage-icon"),this.registerEvent(this.app.workspace.on("layout-change",this.onLayoutChange)),this.addSettingTab(new $(this.app,this)),this.addCommand({id:"open-homepage",name:"Open homepage",callback:()=>this.homepage.open()}),this.addCommand({id:"set-to-active-file",name:"Set to active file",checkCallback:n=>{if(n)return this.homepage.canSetToFile();this.homepage.setToActiveFile()}})}async onunload(){this.app.workspace.off("layout-change",this.onLayoutChange),this.unpatchNewTabPage()}getHomepage(){return this.settings.separateMobile&&b.Platform.isMobile?(W in this.settings.homepages||(this.settings.homepages[W]={...this.settings.homepages?.[_]},this.settings.homepages[W].commands=[...this.settings.homepages?.[_]?.commands]),new V(W,this)):new V(_,this)}async loadSettings(){let e=await this.loadData();return e?.version!==4?e?this.upgradeSettings(e):Object.assign({},pe):e}async saveSettings(){await this.saveData(this.settings)}showInterstitial(e){e&&(this.interstitial=createDiv({cls:"progress-bar nv-homepage-interstitial"}),document.body.insertBefore(this.interstitial,e))}async hasUrlParams(){let e,n;if(b.Platform.isMobile){let i=await window.Capacitor.Plugins.App.getLaunchUrl();if(!i)return!1;let o=new URL(i.url);n=Array.from(o.searchParams.keys()),e=o.hostname}else if(window.OBS_ACT)n=Object.keys(window.OBS_ACT),e=window.OBS_ACT.action;else return!1;return["open","advanced-uri"].includes(e)&&["file","filepath","workspace"].some(i=>n.includes(i))}hasRequiredPlugin(e){switch(e){case"Workspace":return this.internalPlugins.workspaces?.enabled;case"Graph view":return this.internalPlugins.graph?.enabled;case"Daily Note":case"Weekly Note":case"Monthly Note":case"Yearly Note":return Ve(e,this);default:return!0}}patchNewTabPage(){let e=this.communityPlugins["new-tab-default-page"];e&&(e.nvOrig_checkForNewTab=e.checkForNewTab,e.checkForNewTab=async n=>{if(!(this&&this.executing))return await e.nvOrig_checkForNewTab(n)})}unpatchNewTabPage(){let e=this.communityPlugins["new-tab-default-page"];e&&(e.checkForNewTab=e._checkForNewTab)}patchReleaseNotes(){this.app.nvOrig_showReleaseNotes=this.app.showReleaseNotes,this.app.showReleaseNotes=()=>this.newRelease=!0}unpatchReleaseNotes(){this.newRelease&&!this.homepage.data.hideReleaseNotes&&this.app.nvOrig_showReleaseNotes(),this.app.showReleaseNotes=this.app.nvOrig_showReleaseNotes}upgradeSettings(e){if(e.version==3){let i=e,o=!1;for(let s of Object.values(i.homepages))s.commands=s.commands.map(c=>({id:c,period:"Both"})),s.kind==Re&&(o=!0,s.kind="Daily Note");return o&&new b.Notice(ce),i.version=4,this.saveData(i),i}let n=Object.assign({},pe);return e.workspaceEnabled?(e.value=e.workspace,e.kind="Workspace"):e.momentFormat?(e.kind="Daily Note",new b.Notice(ce)):(e.value=e.defaultNote,e.kind="File"),e.commands=[],delete e.workspace,delete e.momentFormat,delete e.defaultNote,delete e.useMoment,delete e.workspaceEnabled,n.homepages[_]=e,this.saveData(n),n}}; + ${d} devices. To edit ${d} settings, use a ${d} device.`,r.settingEl.append(p)}this.addHeading("Commands","commandsHeading"),this.containerEl.createDiv({cls:"nv-command-desc setting-item-description",text:"Select commands that will be executed when opening the homepage."}),this.commandBox=new z(this),this.addHeading("Vault environment","vaultHeading"),this.addDropdown("Opening method","Determine how extant tabs and views are affected on startup.","openMode",Q),this.addDropdown("Manual opening method","Determine how extant tabs and views are affected when opening with commands or the ribbon button.","manualOpenMode",Q),this.addToggle("Pin","Pin the homepage when opening.","pin"),this.addToggle("Hide release notes","Never display release notes when Obsidian updates.","hideReleaseNotes"),this.addToggle("Auto-create","When the homepage doesn't exist, create a note with its name.","autoCreate"),this.elements.autoCreate.descEl.createDiv({text:"If this vault is synced using unofficial services, this may lead to content being overwritten.",cls:"mod-warning"}),this.addHeading("Opened view","paneHeading"),this.addDropdown("Homepage view","Choose what view to open the homepage in.","view",ue),this.addToggle("Revert view on close","When navigating away from the homepage, restore the default view.","revertView"),this.addToggle("Auto-scroll","When opening the homepage, scroll to the bottom and focus on the last line.","autoScroll"),"dataview"in this.plugin.communityPlugins&&(this.addToggle("Refresh Dataview","Always attempt to reload Dataview views when opening the homepage.","refreshDataview"),this.elements.refreshDataview.descEl.createDiv({text:"Requires Dataview auto-refresh to be enabled.",attr:{class:"mod-warning"}})),y.Platform.isMobile||new y.ButtonComponent(this.containerEl).setButtonText("Copy debug info").setClass("nv-debug-button").onClick(async()=>await this.copyDebugInfo()),(e||n==="Nothing")&&this.disableSettings("openWhenEmpty","alwaysApply","vaultHeading","openMode","manualOpenMode","autoCreate","pin"),(e||["Nothing","Graph view"].includes(n))&&this.disableSettings("paneHeading","view","revertView","autoScroll","refreshDataview"),(!this.plugin.homepage.data.openOnStartup||i)&&this.disableSetting("openMode"),U.includes(this.plugin.homepage.data.kind)&&this.disableSetting("autoCreate")}disableSetting(e){this.elements[e]?.settingEl.setAttribute("nv-greyed","")}disableSettings(...e){e.forEach(n=>this.disableSetting(n))}addHeading(e,n){let i=new y.Setting(this.containerEl).setHeading().setName(e);this.elements[n]=i}addDropdown(e,n,i,o,s){let c=new y.Setting(this.containerEl).setName(e).setDesc(n).addDropdown(async m=>{for(let r of Object.values(o))m.addOption(r,r);m.setValue(this.plugin.homepage.data[i]),m.onChange(async r=>{this.plugin.homepage.data[i]=r,await this.plugin.homepage.save(),s&&s(r)})});return this.elements[i]=c,c}addToggle(e,n,i,o){let s=new y.Setting(this.containerEl).setName(e).setDesc(n).addToggle(c=>c.setValue(this.plugin.homepage.data[i]).onChange(async m=>{this.plugin.homepage.data[i]=m,await this.plugin.homepage.save(),o&&o(m)}));return this.elements[i]=s,s}async copyDebugInfo(){let e=this.app.vault.config,n={...this.settings,_defaultViewMode:e.defaultViewMode||"default",_livePreview:e.livePreview!==void 0?e.livePreview:"default",_focusNewTab:e.focusNewTab!==void 0?e.focusNewTab:"default",_plugins:Object.keys(this.plugin.communityPlugins),_internalPlugins:Object.values(this.plugin.internalPlugins).flatMap(i=>i.enabled?[i.instance.id]:[]),_obsidianVersion:window.electron.ipcRenderer.sendSync("version")};await navigator.clipboard.writeText(JSON.stringify(n)),new y.Notice("Copied homepage debug information to clipboard")}};var We=["markdown","canvas","kanban"],yt=[...We,"audio","graph","image","pdf","video"],_="Main Homepage",W="Mobile Homepage",Q=(n=>(n.ReplaceAll="Replace all open notes",n.ReplaceLast="Replace last note",n.Retain="Keep open notes",n))(Q||{}),ue=(i=>(i.Default="Default view",i.Reading="Reading view",i.Source="Editing view (Source)",i.LivePreview="Editing view (Live Preview)",i))(ue||{}),I=(r=>(r.File="File",r.Workspace="Workspace",r.Random="Random file",r.Graph="Graph view",r.None="Nothing",r.DailyNote="Daily Note",r.WeeklyNote="Weekly Note",r.MonthlyNote="Monthly Note",r.YearlyNote="Yearly Note",r))(I||{}),G=(n=>(n.Both="Both",n.Startup="Startup only",n.Manual="Manual only",n))(G||{}),ge=["Random file","Graph view","Nothing",...U],V=class{constructor(t,e){this.lastView=void 0;this.openedViews=new WeakMap;this.name=t,this.plugin=e,this.app=e.app;let n=this.plugin.settings.homepages[t];n?this.data=Object.assign({},S,n):(this.plugin.settings.homepages[t]={...S},this.data=this.plugin.settings.homepages[t])}async open(t=!1){if(!this.plugin.hasRequiredPlugin(this.data.kind)){new N.Notice("Homepage cannot be opened due to plugin unavailablity.");return}if(this.data.kind==="Workspace")await this.launchWorkspace();else if(this.data.kind!=="Nothing"){let n=this.plugin.loaded?this.data.manualOpenMode:this.data.openMode;t&&(n="Keep open notes"),await this.launchLeaf(n)}if(this.data.commands.length<1)return;let e=this.plugin.loaded?"Startup only":"Manual only";await Ne(this.app);for(let{id:n,period:i}of this.data.commands)i!==e&&this.app.commands.executeCommandById(n)}async launchWorkspace(){let t=this.plugin.internalPlugins.workspaces?.instance;if(!(this.data.value in t.workspaces)){new N.Notice(`Cannot find the workspace "${this.data.value}" to use as the homepage.`);return}t.loadWorkspace(this.data.value),await B(100)}async launchLeaf(t){let e;if(this.computedValue=await this.computeValue(),this.plugin.executing=!0,!(K(this.plugin)&&!this.plugin.loaded)){if(t!=="Replace all open notes"){let n=this.getOpened();if(n.length>0){this.app.workspace.setActiveLeaf(n[0]),await this.configure(n[0]);return}else t=="Keep open notes"&&ye(this.app)&&(t="Replace last note")}t!=="Keep open notes"&&this.app.workspace.getActiveViewOfType(N.View)?.leaf.setPinned(!1),t==="Replace all open notes"&&(this.app.workspace?.floatingSplit?.children&&(await B(0),this.app.workspace.floatingSplit.children.forEach(n=>n.win.close())),ve(this.app,yt),await B(0),this.app.workspace.iterateRootLeaves(n=>this.app.workspace.setActiveLeaf(n))),this.data.kind==="Graph view"?e=await this.launchGraph(t):e=await this.launchNote(t),e&&await this.configure(e)}}async launchGraph(t){if(t==="Keep open notes"){let e=this.app.workspace.getLeaf("tab");this.app.workspace.setActiveLeaf(e)}return this.app.commands.executeCommandById("graph:open"),this.app.workspace.getActiveViewOfType(N.View)?.leaf}async launchNote(t){let e=this.app.metadataCache.getFirstLinkpathDest(this.computedValue,"/");if(!e){if(!this.data.autoCreate){new N.Notice(`Homepage "${this.computedValue}" does not exist.`);return}e=await this.app.vault.create(fe(this.computedValue),"")}let n=await this.app.vault.cachedRead(e),i=this.app.workspace.getLeaf(t=="Keep open notes");return await i.openFile(e),this.app.workspace.setActiveLeaf(i),n!==await this.app.vault.read(e)&&await this.app.vault.modify(e,n),i}async configure(t){this.plugin.executing=!1;let e=t.view;if(!(e instanceof N.MarkdownView)){this.data.pin&&e.leaf.setPinned(!0);return}let n=e.getState();if(this.data.revertView&&(this.lastView=new WeakRef(e)),this.data.autoScroll){let i=e.editor.lineCount();n.mode=="preview"?e.previewMode.applyScroll(i-4):(e.editor.setCursor(i),e.editor.focus())}if(this.data.pin&&e.leaf.setPinned(!0),this.data.view!="Default view"){switch(this.data.view){case"Editing view (Live Preview)":case"Editing view (Source)":n.mode="source",n.source=this.data.view!="Editing view (Live Preview)";break;case"Reading view":n.mode="preview";break}await e.leaf.setViewState({type:"markdown",state:n}),this.plugin.loaded&&this.data.refreshDataview&&this.plugin.communityPlugins.dataview?.index.touch()}}getOpened(){return this.data.kind=="Graph view"?this.app.workspace.getLeavesOfType("graph"):We.flatMap(e=>this.app.workspace.getLeavesOfType(e)).filter(e=>ee(k(e.view.file),this.computedValue))}async computeValue(){let t=this.data.value;switch(this.data.kind){case"Random file":let e=we(this.app);e&&(t=e);break;case"Daily Note":case"Weekly Note":case"Monthly Note":case"Yearly Note":t=await Ie(this.data.kind,this.plugin);break}return t}async save(){this.plugin.settings.homepages[this.name]=this.data,await this.plugin.saveSettings()}async setToActiveFile(){this.data.value=k(this.app.workspace.getActiveFile()),await this.save(),new N.Notice(`The homepage has been changed to "${this.data.value}".`)}canSetToFile(){return this.app.workspace.getActiveFile()!==null&&!ge.includes(this.data.kind)}async revertView(){if(this.lastView==null||this.data.view=="Default view")return;let t=this.lastView.deref();if(!t||ee(k(t.file),this.computedValue))return;let e=t.getState(),n=this.app.vault.config,i=n.defaultViewMode||"source",o=n.livePreview!==void 0?!n.livePreview:!1;t.leaf.getViewState().type=="markdown"&&(i!=e.mode||o!=e.source)&&(e.mode=i,e.source=o,await t.leaf.setViewState({type:"markdown",state:e,active:!0})),this.lastView=void 0}async openWhenEmpty(){if(!this.plugin.loaded||this.plugin.executing)return;let t=this.app.workspace.getActiveViewOfType(N.View)?.leaf;t?.getViewState().type!=="empty"||t.parentSplit.children.length!=1||await this.open(!0)}async apply(){let t=this.app.workspace.getActiveViewOfType(N.FileView);if(!t)return;let e=k(t.file);this.openedViews.get(t)!==e&&(this.openedViews.set(t,e),e===await this.computeValue()&&this.plugin.loaded&&!this.plugin.executing&&await this.configure(t.leaf))}};var vt='',J=class extends b.Plugin{constructor(){super(...arguments);this.newRelease=!1;this.loaded=!1;this.executing=!1;this.onLayoutChange=async()=>{this.homepage.data.revertView&&await this.homepage.revertView(),this.homepage.data.openWhenEmpty&&await this.homepage.openWhenEmpty(),this.homepage.data.alwaysApply&&await this.homepage.apply()};this.hideInterstitial=()=>{this.interstitial?.detach(),window.removeEventListener("error",this.hideInterstitial)}}async onload(){let e=document.body.querySelector(".progress-bar");this.showInterstitial(e),this.patchReleaseNotes(),this.settings=await this.loadSettings(),this.internalPlugins=this.app.internalPlugins.plugins,this.communityPlugins=this.app.plugins.plugins,this.homepage=this.getHomepage(),this.app.workspace.onLayoutReady(async()=>{let n=this.homepage.data.openOnStartup&&e&&!await this.hasUrlParams();this.patchNewTabPage(),n&&await this.homepage.open(),this.loaded=!0,this.unpatchReleaseNotes(),this.hideInterstitial()}),(0,b.addIcon)("homepage",vt),this.addRibbonIcon("homepage","Open homepage",n=>this.homepage.open(n.button==1||n.button==2||b.Keymap.isModifier(n,"Mod"))).setAttribute("id","nv-homepage-icon"),this.registerEvent(this.app.workspace.on("layout-change",this.onLayoutChange)),this.addSettingTab(new $(this.app,this)),this.addCommand({id:"open-homepage",name:"Open homepage",callback:()=>this.homepage.open()}),this.addCommand({id:"set-to-active-file",name:"Set to active file",checkCallback:n=>{if(n)return this.homepage.canSetToFile();this.homepage.setToActiveFile()}})}async onunload(){this.app.workspace.off("layout-change",this.onLayoutChange),this.unpatchNewTabPage()}getHomepage(){return this.settings.separateMobile&&b.Platform.isMobile?(W in this.settings.homepages||(this.settings.homepages[W]={...this.settings.homepages?.[_]},this.settings.homepages[W].commands=[...this.settings.homepages?.[_]?.commands]),new V(W,this)):new V(_,this)}async loadSettings(){let e=await this.loadData();return e?.version!==4?e?this.upgradeSettings(e):Object.assign({},pe):e}async saveSettings(){await this.saveData(this.settings)}showInterstitial(e){e&&(this.interstitial=createDiv({cls:"progress-bar nv-homepage-interstitial"}),document.body.insertBefore(this.interstitial,e),window.addEventListener("error",this.hideInterstitial))}async hasUrlParams(){let e,n;if(b.Platform.isMobile){let i=await window.Capacitor.Plugins.App.getLaunchUrl();if(!i)return!1;let o=new URL(i.url);n=Array.from(o.searchParams.keys()),e=o.hostname}else if(window.OBS_ACT)n=Object.keys(window.OBS_ACT),e=window.OBS_ACT.action;else return!1;return["open","advanced-uri"].includes(e)&&["file","filepath","workspace"].some(i=>n.includes(i))}hasRequiredPlugin(e){switch(e){case"Workspace":return this.internalPlugins.workspaces?.enabled;case"Graph view":return this.internalPlugins.graph?.enabled;case"Daily Note":case"Weekly Note":case"Monthly Note":case"Yearly Note":return Ve(e,this);default:return!0}}patchNewTabPage(){let e=this.communityPlugins["new-tab-default-page"];e&&(e.nvOrig_checkForNewTab=e.checkForNewTab,e.checkForNewTab=async n=>{if(!(this&&this.executing))return await e.nvOrig_checkForNewTab(n)})}unpatchNewTabPage(){let e=this.communityPlugins["new-tab-default-page"];e&&(e.checkForNewTab=e._checkForNewTab)}patchReleaseNotes(){this.app.nvOrig_showReleaseNotes=this.app.showReleaseNotes,this.app.showReleaseNotes=()=>this.newRelease=!0}unpatchReleaseNotes(){this.newRelease&&!this.homepage.data.hideReleaseNotes&&this.app.nvOrig_showReleaseNotes(),this.app.showReleaseNotes=this.app.nvOrig_showReleaseNotes}upgradeSettings(e){if(e.version==3){let i=e,o=!1;for(let s of Object.values(i.homepages))s.commands=s.commands.map(c=>({id:c,period:"Both"})),s.kind==Re&&(o=!0,s.kind="Daily Note");return o&&new b.Notice(ce),i.version=4,this.saveData(i),i}let n=Object.assign({},pe);return e.workspaceEnabled?(e.value=e.workspace,e.kind="Workspace"):e.momentFormat?(e.kind="Daily Note",new b.Notice(ce)):(e.value=e.defaultNote,e.kind="File"),e.commands=[],delete e.workspace,delete e.momentFormat,delete e.defaultNote,delete e.useMoment,delete e.workspaceEnabled,n.homepages[_]=e,this.saveData(n),n}}; diff --git a/.obsidian/plugins/homepage/manifest.json b/.obsidian/plugins/homepage/manifest.json index e0a337b4..006241f9 100644 --- a/.obsidian/plugins/homepage/manifest.json +++ b/.obsidian/plugins/homepage/manifest.json @@ -1,7 +1,7 @@ { "id": "homepage", "name": "Homepage", - "version": "4.0.3", + "version": "4.0.4", "minAppVersion": "1.4.10", "description": "Open a specified note, canvas, or workspace on startup, or set it for quick access later.", "author": "novov", diff --git a/.obsidian/plugins/khoj/main.js b/.obsidian/plugins/khoj/main.js index c0e9a563..e7d6d9a5 100644 --- a/.obsidian/plugins/khoj/main.js +++ b/.obsidian/plugins/khoj/main.js @@ -1531,6 +1531,10 @@ var KhojChatView = class extends KhojPaneView { constructor(leaf, setting) { super(leaf, setting); this.keyPressTimeout = null; + this.userMessages = []; + this.currentMessageIndex = -1; + this.currentUserInput = ""; + this.startingMessage = "Message"; this.scope = new import_obsidian5.Scope(this.app.scope); this.scope.register(["Ctrl"], "n", (_) => this.createNewConversation()); this.scope.register(["Ctrl"], "o", async (_) => await this.toggleChatSessions()); @@ -1562,6 +1566,12 @@ var KhojChatView = class extends KhojPaneView { async chat(isVoice = false) { let input_el = this.contentEl.getElementsByClassName("khoj-chat-input")[0]; let user_message = input_el.value.trim(); + if (user_message) { + this.userMessages.push(user_message); + const modifierKey = import_obsidian5.Platform.isMacOS ? "\u2318" : "^"; + this.startingMessage = `(${modifierKey}+\u2191/\u2193) for prev messages`; + input_el.placeholder = this.startingMessage; + } input_el.value = ""; this.autoResize(); await this.getChatResponse(user_message, isVoice); @@ -1604,6 +1614,7 @@ var KhojChatView = class extends KhojPaneView { }); chatInput.addEventListener("keydown", (event) => { this.incrementalChat(event); + this.handleArrowKeys(event); }); this.contentEl.addEventListener("keydown", this.handleKeyDown.bind(this)); this.contentEl.addEventListener("keyup", this.handleKeyUp.bind(this)); @@ -1644,7 +1655,7 @@ var KhojChatView = class extends KhojPaneView { await this.chat(); }); let getChatHistorySucessfully = await this.getChatHistory(chatBodyEl); - let placeholderText = getChatHistorySucessfully ? "Message" : "Configure Khoj to enable chat"; + let placeholderText = getChatHistorySucessfully ? this.startingMessage : "Configure Khoj to enable chat"; chatInput.placeholder = placeholderText; chatInput.disabled = !getChatHistorySucessfully; requestAnimationFrame(() => { @@ -1974,10 +1985,17 @@ ${inferredQuery}`; chatBodyEl.innerHTML = ""; chatBodyEl.dataset.conversationId = ""; chatBodyEl.dataset.conversationTitle = ""; + this.userMessages = []; + this.startingMessage = "Message"; + const chatInput = this.contentEl.querySelector(".khoj-chat-input"); + if (chatInput) { + chatInput.placeholder = this.startingMessage; + } this.renderMessage(chatBodyEl, "Hey \u{1F44B}\u{1F3FE}, what's up?", "khoj"); } async toggleChatSessions(forceShow = false) { var _a; + this.userMessages = []; let chatBodyEl = this.contentEl.getElementsByClassName("khoj-chat-body")[0]; if (!forceShow && ((_a = this.contentEl.getElementsByClassName("side-panel")) == null ? void 0 : _a.length) > 0) { chatBodyEl.innerHTML = ""; @@ -2144,7 +2162,16 @@ ${inferredQuery}`; chatLogs.forEach((chatLog) => { var _a2, _b2; this.renderMessageWithReferences(chatBodyEl, chatLog.message, chatLog.by, chatLog.context, chatLog.onlineContext, new Date(chatLog.created), (_a2 = chatLog.intent) == null ? void 0 : _a2.type, (_b2 = chatLog.intent) == null ? void 0 : _b2["inferred-queries"]); + if (chatLog.by === "you") { + this.userMessages.push(chatLog.message); + } }); + const modifierKey = import_obsidian5.Platform.isMacOS ? "\u2318" : "^"; + this.startingMessage = this.userMessages.length > 0 ? `(${modifierKey}+\u2191/\u2193) for prev messages` : "Message"; + const chatInput = this.contentEl.querySelector(".khoj-chat-input"); + if (chatInput) { + chatInput.placeholder = this.startingMessage; + } } } catch (err) { let errorMsg = "Unable to get response from Khoj server \u2764\uFE0F\u200D\u{1FA79}. Ensure server is running or contact developers for help at [team@khoj.dev](mailto:team@khoj.dev) or in [Discord](https://discord.gg/BDgyabRM6e)"; @@ -2451,6 +2478,8 @@ Content-Type: "application/octet-stream"\r onChatInput() { const chatInput = this.contentEl.getElementsByClassName("khoj-chat-input")[0]; chatInput.value = chatInput.value.trimStart(); + this.currentMessageIndex = -1; + this.currentUserInput = chatInput.value; this.autoResize(); } autoResize() { @@ -2561,6 +2590,26 @@ ${inferredQuery}`; referencesDiv.appendChild(referenceSection); return referencesDiv; } + handleArrowKeys(event) { + const chatInput = event.target; + const isModKey = import_obsidian5.Platform.isMacOS ? event.metaKey : event.ctrlKey; + if (isModKey && event.key === "ArrowUp") { + event.preventDefault(); + if (this.currentMessageIndex < this.userMessages.length - 1) { + this.currentMessageIndex++; + chatInput.value = this.userMessages[this.userMessages.length - 1 - this.currentMessageIndex]; + } + } else if (isModKey && event.key === "ArrowDown") { + event.preventDefault(); + if (this.currentMessageIndex > 0) { + this.currentMessageIndex--; + chatInput.value = this.userMessages[this.userMessages.length - 1 - this.currentMessageIndex]; + } else if (this.currentMessageIndex === 0) { + this.currentMessageIndex = -1; + chatInput.value = this.currentUserInput; + } + } + } }; // src/main.ts diff --git a/.obsidian/plugins/khoj/manifest.json b/.obsidian/plugins/khoj/manifest.json index 74bceaca..0bfd7b62 100644 --- a/.obsidian/plugins/khoj/manifest.json +++ b/.obsidian/plugins/khoj/manifest.json @@ -1,7 +1,7 @@ { "id": "khoj", "name": "Khoj", - "version": "1.20.4", + "version": "1.21.3", "minAppVersion": "0.15.0", "description": "Your Second Brain", "author": "Khoj Inc.", diff --git a/.obsidian/plugins/obsidian-hider/manifest.json b/.obsidian/plugins/obsidian-hider/manifest.json index 0e5fb5c8..af445b07 100644 --- a/.obsidian/plugins/obsidian-hider/manifest.json +++ b/.obsidian/plugins/obsidian-hider/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-hider", "name": "Hider", - "version": "1.4.0", + "version": "1.4.1", "minAppVersion": "1.6.0", "description": "Hide UI elements such as tooltips, status, titlebar and more", "author": "@kepano", diff --git a/.obsidian/plugins/obsidian-tasks-plugin/main.js b/.obsidian/plugins/obsidian-tasks-plugin/main.js index 4442a2c2..ea3610ff 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/main.js +++ b/.obsidian/plugins/obsidian-tasks-plugin/main.js @@ -122,14 +122,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -"use strict";var iE=Object.create;var aa=Object.defineProperty,sE=Object.defineProperties,aE=Object.getOwnPropertyDescriptor,oE=Object.getOwnPropertyDescriptors,uE=Object.getOwnPropertyNames,Bo=Object.getOwnPropertySymbols,lE=Object.getPrototypeOf,Sc=Object.prototype.hasOwnProperty,Qh=Object.prototype.propertyIsEnumerable;var Kh=(r,e,t)=>e in r?aa(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,K=(r,e)=>{for(var t in e||(e={}))Sc.call(e,t)&&Kh(r,t,e[t]);if(Bo)for(var t of Bo(e))Qh.call(e,t)&&Kh(r,t,e[t]);return r},he=(r,e)=>sE(r,oE(e));var Ho=(r,e)=>{var t={};for(var n in r)Sc.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&Bo)for(var n of Bo(r))e.indexOf(n)<0&&Qh.call(r,n)&&(t[n]=r[n]);return t};var k=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),cE=(r,e)=>{for(var t in e)aa(r,t,{get:e[t],enumerable:!0})},Xh=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of uE(e))!Sc.call(r,i)&&i!==t&&aa(r,i,{get:()=>e[i],enumerable:!(n=aE(e,i))||n.enumerable});return r};var oa=(r,e,t)=>(t=r!=null?iE(lE(r)):{},Xh(e||!r||!r.__esModule?aa(t,"default",{value:r,enumerable:!0}):t,r)),dE=r=>Xh(aa({},"__esModule",{value:!0}),r);var P=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});var Re=k(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.matchAnyPattern=Ln.extractTerms=Ln.repeatedTimeunitPattern=void 0;function hE(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Ln.repeatedTimeunitPattern=hE;function Zh(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Ln.extractTerms=Zh;function gE(r){return`(?:${Zh(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Ln.matchAnyPattern=gE});var we=k((Dc,xc)=>{(function(r,e){typeof Dc=="object"&&typeof xc!="undefined"?xc.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Dc,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",c="quarter",d="year",p="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},E=function(j,$,D){var B=String(j);return!B||B.length>=$?j:""+Array($+1-B.length).join(D)+j},R={s:E,z:function(j){var $=-j.utcOffset(),D=Math.abs($),B=Math.floor(D/60),I=D%60;return($<=0?"+":"-")+E(B,2,"0")+":"+E(I,2,"0")},m:function j($,D){if($.date(){"use strict";var yE=Un&&Un.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Un,"__esModule",{value:!0});Un.findYearClosestToRef=Un.findMostLikelyADYear=void 0;var bE=yE(we());function TE(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Un.findMostLikelyADYear=TE;function _E(r,e,t){let n=bE.default(r),i=n;i=i.month(t-1),i=i.date(e),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n)){"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.parseTimeUnits=ce.TIME_UNITS_PATTERN=ce.parseYear=ce.YEAR_PATTERN=ce.parseOrdinalNumberPattern=ce.ORDINAL_NUMBER_PATTERN=ce.parseNumberPattern=ce.NUMBER_PATTERN=ce.TIME_UNIT_DICTIONARY=ce.ORDINAL_WORD_DICTIONARY=ce.INTEGER_WORD_DICTIONARY=ce.MONTH_DICTIONARY=ce.FULL_MONTH_NAME_DICTIONARY=ce.WEEKDAY_DICTIONARY=void 0;var Ko=Re(),vE=ot();ce.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};ce.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};ce.MONTH_DICTIONARY=Object.assign(Object.assign({},ce.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});ce.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};ce.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};ce.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};ce.NUMBER_PATTERN=`(?:${Ko.matchAnyPattern(ce.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function eg(r){let e=r.toLowerCase();return ce.INTEGER_WORD_DICTIONARY[e]!==void 0?ce.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)}ce.parseNumberPattern=eg;ce.ORDINAL_NUMBER_PATTERN=`(?:${Ko.matchAnyPattern(ce.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function wE(r){let e=r.toLowerCase();return ce.ORDINAL_WORD_DICTIONARY[e]!==void 0?ce.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ce.parseOrdinalNumberPattern=wE;ce.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function kE(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return vE.findMostLikelyADYear(e)}ce.parseYear=kE;var tg=`(${ce.NUMBER_PATTERN})\\s{0,3}(${Ko.matchAnyPattern(ce.TIME_UNIT_DICTIONARY)})`,Jh=new RegExp(tg,"i");ce.TIME_UNITS_PATTERN=Ko.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",tg);function EE(r){let e={},t=r,n=Jh.exec(t);for(;n;)SE(e,n),t=t.substring(n[0].length).trim(),n=Jh.exec(t);return e}ce.parseTimeUnits=EE;function SE(r,e){let t=eg(e[1]),n=ce.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var rg=k((Rc,Mc)=>{(function(r,e){typeof Rc=="object"&&typeof Mc!="undefined"?Mc.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Rc,function(){"use strict";var r="month",e="quarter";return function(t,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var d=this.quarter()-1;return c?this.month(3*d).startOf(r).startOf("day"):this.month(3*d+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var ir=k($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.implySimilarTime=$r.assignSimilarTime=$r.assignSimilarDate=$r.assignTheNextDay=void 0;var ng=ze();function OE(r,e){e=e.add(1,"day"),ig(r,e),sg(r,e)}$r.assignTheNextDay=OE;function ig(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}$r.assignSimilarDate=ig;function DE(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",ng.Meridiem.AM):r.assign("meridiem",ng.Meridiem.PM)}$r.assignSimilarTime=DE;function sg(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}$r.implySimilarTime=sg});var ag=k(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.toTimezoneOffset=ui.TIMEZONE_ABBR_MAP=void 0;ui.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function xE(r){var e;return r==null?null:typeof r=="number"?r:(e=ui.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}ui.toTimezoneOffset=xE});var We=k(jr=>{"use strict";var og=jr&&jr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(jr,"__esModule",{value:!0});jr.ParsingResult=jr.ParsingComponents=jr.ReferenceWithTimezone=void 0;var RE=og(rg()),Qo=og(we()),Cc=ir(),ME=ag();Qo.default.extend(RE.default);var Ac=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=ME.toTimezoneOffset(e.timezone))}};jr.ReferenceWithTimezone=Ac;var li=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let n=Qo.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new li(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return Qo.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let i=-e.getTimezoneOffset(),s=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:i;return i-s}static createRelativeFromReference(e,t){let n=Qo.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new li(e);return t.hour||t.minute||t.second?(Cc.assignSimilarTime(i,n),Cc.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Cc.implySimilarTime(i,n),e.timezoneOffset!==null&&i.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(t.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),t.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),t.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};jr.ParsingComponents=li;var ua=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new li(e),this.end=s}clone(){let e=new ua(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};jr.ParsingResult=ua});var V=k(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.AbstractParserWithWordBoundaryChecking=void 0;var Pc=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let i=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+i.length,t[0]=t[0].substring(i.length);for(let s=2;s{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var Ic=ut(),CE=We(),AE=V(),PE=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Ic.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),NE=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Ic.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Nc=class extends AE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?NE:PE}innerExtract(e,t){let n=Ic.parseTimeUnits(t[1]);return CE.ParsingComponents.createRelativeFromReference(e.reference,n)}};Fc.default=Nc});var mg=k(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var IE=ot(),fg=ut(),pg=ut(),Zo=ut(),FE=Re(),LE=V(),UE=new RegExp(`(?:on\\s{0,3})?(${Zo.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Zo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${FE.matchAnyPattern(fg.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${pg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),lg=1,cg=2,WE=3,dg=4,Lc=class extends LE.AbstractParserWithWordBoundaryChecking{innerPattern(){return UE}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=fg.MONTH_DICTIONARY[t[WE].toLowerCase()],s=Zo.parseOrdinalNumberPattern(t[lg]);if(s>31)return t.index=t.index+t[lg].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[dg]){let a=pg.parseYear(t[dg]);n.start.assign("year",a)}else{let a=IE.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[cg]){let a=Zo.parseOrdinalNumberPattern(t[cg]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Uc.default=Lc});var Tg=k(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var qE=ot(),yg=ut(),Jo=ut(),bg=ut(),$E=Re(),jE=V(),GE=new RegExp(`(${$E.matchAnyPattern(yg.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Jo.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Jo.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${bg.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),YE=1,BE=2,hg=3,gg=4,Wc=class extends jE.AbstractParserWithWordBoundaryChecking{innerPattern(){return GE}innerExtract(e,t){let n=yg.MONTH_DICTIONARY[t[YE].toLowerCase()],i=Jo.parseOrdinalNumberPattern(t[BE]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[gg]){let u=bg.parseYear(t[gg]);s.assign("year",u)}else{let u=qE.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[hg])return s;let a=Jo.parseOrdinalNumberPattern(t[hg]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};qc.default=Wc});var wg=k(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});var $c=ut(),HE=ot(),VE=Re(),vg=ut(),zE=V(),KE=new RegExp(`((?:in)\\s*)?(${VE.matchAnyPattern($c.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${vg.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),QE=1,XE=2,_g=3,jc=class extends zE.AbstractParserWithWordBoundaryChecking{innerPattern(){return KE}innerExtract(e,t){let n=t[XE].toLowerCase();if(t[0].length<=3&&!$c.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[QE]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=$c.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[_g]){let a=vg.parseYear(t[_g]);i.start.assign("year",a)}else{let a=HE.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Gc.default=jc});var Sg=k(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var Eg=ut(),ZE=Re(),JE=V(),eS=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${ZE.matchAnyPattern(Eg.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),tS=1,rS=2,kg=3,nS=4,Yc=class extends JE.AbstractParserWithWordBoundaryChecking{innerPattern(){return eS}innerExtract(e,t){let n=t[kg]?parseInt(t[kg]):Eg.MONTH_DICTIONARY[t[rS].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[tS]);return{day:parseInt(t[nS]),month:n,year:i}}};Bc.default=Yc});var Og=k(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});var iS=V(),sS=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),aS=1,oS=2,Hc=class extends iS.AbstractParserWithWordBoundaryChecking{innerPattern(){return sS}innerExtract(e,t){let n=parseInt(t[oS]),i=parseInt(t[aS]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Vc.default=Hc});var ci=k(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.AbstractTimeExpressionParser=void 0;var wt=ze();function uS(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function lS(r,e){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var Dg=2,zi=3,eu=4,tu=5,la=6,zc=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[Dg]);if(o>100){if(this.strictMode||t[zi]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[zi]!=null){if(t[zi].length==1&&!t[la])return null;s=parseInt(t[zi])}if(s>=60)return null;if(o>12&&(a=wt.Meridiem.PM),t[la]!=null){if(o>12)return null;let u=t[la][0].toLowerCase();u=="a"&&(a=wt.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=wt.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",wt.Meridiem.AM):i.imply("meridiem",wt.Meridiem.PM),t[tu]!=null){let u=parseInt(t[tu].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[eu]!=null){let u=parseInt(t[eu]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[tu]!=null){let u=parseInt(t[tu].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[eu]!=null){let u=parseInt(t[eu]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[Dg]),a=0,o=-1;if(t[zi]!=null?a=parseInt(t[zi]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=wt.Meridiem.PM),t[la]!=null){if(s>12)return null;let u=t[la][0].toLowerCase();u=="a"&&(o=wt.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=wt.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==wt.Meridiem.AM?(n.start.imply("meridiem",wt.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",wt.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?i.imply("meridiem",wt.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",wt.Meridiem.PM)):s>12?i.imply("meridiem",wt.Meridiem.PM):s<=12&&i.imply("meridiem",wt.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 n=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=uS(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=lS(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};ru.AbstractTimeExpressionParser=zc});var xg=k(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var nu=ze(),cS=ci(),Kc=class extends cS.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",nu.Meridiem.PM)):i<6&&n.assign("meridiem",nu.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",nu.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",nu.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Qc.default=Kc});var sr=k(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.addImpliedTimeUnits=Ki.reverseTimeUnits=void 0;function dS(r){let e={};for(let t in r)e[t]=-r[t];return e}Ki.reverseTimeUnits=dS;function fS(r,e){let t=r.clone(),n=r.dayjs();for(let i in e)n=n.add(e[i],i);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}Ki.addImpliedTimeUnits=fS});var Rg=k(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var Zc=ut(),pS=We(),mS=V(),hS=sr(),gS=new RegExp(`(${Zc.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),yS=new RegExp(`(${Zc.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),Xc=class extends mS.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?yS:gS}innerExtract(e,t){let n=Zc.parseTimeUnits(t[1]),i=hS.reverseTimeUnits(n);return pS.ParsingComponents.createRelativeFromReference(e.reference,i)}};Jc.default=Xc});var Mg=k(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});var td=ut(),bS=We(),TS=V(),_S=new RegExp(`(${td.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),vS=new RegExp("("+td.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),wS=1,ed=class extends TS.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?vS:_S}innerExtract(e,t){let n=td.parseTimeUnits(t[wS]);return bS.ParsingComponents.createRelativeFromReference(e.reference,n)}};rd.default=ed});var Xi=k(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.MergingRefiner=Qi.Filter=void 0;var nd=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};Qi.Filter=nd;var id=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0],s=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),i=c}}return i!=null&&n.push(i),n}};Qi.MergingRefiner=id});var Gr=k(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});var kS=Xi(),sd=class extends kS.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let i=t.clone();return i.start=t.start,i.end=n.start,i.index=Math.min(t.index,n.index),t.index{"use strict";var ES=ca&&ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ca,"__esModule",{value:!0});var SS=ES(Gr()),od=class extends SS.default{patternBetween(){return/^\s*(to|-)\s*$/i}};ca.default=od});var Ag=k(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.mergeDateTimeComponent=Zi.mergeDateTimeResult=void 0;var OS=ze();function DS(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=ud(n,i),r.end!=null||e.end!=null){let s=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=ud(s,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(cd,"__esModule",{value:!0});var xS=Xi(),Pg=Ag(),ld=class extends xS.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let i=t.start.isOnlyDate()?Pg.mergeDateTimeResult(t,n):Pg.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};cd.default=ld});var Ng=k(da=>{"use strict";var RS=da&&da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(da,"__esModule",{value:!0});var MS=RS(cn()),dd=class extends MS.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};da.default=dd});var Ig=k(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});var CS=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),AS={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},fd=class{constructor(e){this.timezone=Object.assign(Object.assign({},AS),e)}refine(e,t){var n;let i=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(s=>{var a,o;let u=e.text.substring(s.index+s.text.length),l=CS.exec(u);if(!l)return;let c=l[1].toUpperCase(),d=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(d===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${d} for: ${s.start}`)});let p=s.start.get("timezoneOffset");p!==null&&d!=p&&(s.start.isCertain("timezoneOffset")||c!=l[1])||s.start.isOnlyDate()&&c!=l[1]||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",d),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",d))}),t}};pd.default=fd});var iu=k(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});var PS=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),NS=1,IS=2,FS=3,md=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let i=e.text.substring(n.index+n.text.length),s=PS.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[IS]),o=parseInt(s[FS]||"0"),u=a*60+o;u>14*60||(s[NS]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};hd.default=md});var Fg=k(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});var gd=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0];for(let s=1;si.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};yd.default=gd});var Lg=k(fa=>{"use strict";var LS=fa&&fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fa,"__esModule",{value:!0});var US=LS(we()),bd=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=US.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&i.isAfter(n.start.dayjs()))for(let s=0;s<3&&i.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&i.isAfter(n.start.dayjs())&&(i.day()>=n.start.get("weekday")?i=i.day(n.start.get("weekday")+7):i=i.day(n.start.get("weekday")),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(i.day()>n.end.get("weekday")?i=i.day(n.end.get("weekday")+7):i=i.day(n.end.get("weekday")),n.end.imply("day",i.date()),n.end.imply("month",i.month()+1),n.end.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};fa.default=bd});var Ug=k(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var WS=Xi(),Td=class extends WS.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}};_d.default=Td});var kd=k(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});var qS=V(),$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"),jS=1,GS=2,YS=3,Wg=4,BS=5,qg=6,$g=7,jg=8,Gg=9,vd=class extends qS.AbstractParserWithWordBoundaryChecking{innerPattern(){return $S}innerExtract(e,t){let n={};if(n.year=parseInt(t[jS]),n.month=parseInt(t[GS]),n.day=parseInt(t[YS]),t[Wg]!=null)if(n.hour=parseInt(t[Wg]),n.minute=parseInt(t[BS]),t[qg]!=null&&(n.second=parseInt(t[qg])),t[$g]!=null&&(n.millisecond=parseInt(t[$g])),t[jg]==null)n.timezoneOffset=0;else{let i=parseInt(t[jg]),s=0;t[Gg]!=null&&(s=parseInt(t[Gg]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};wd.default=vd});var Yg=k(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});var HS=Xi(),Ed=class extends HS.MergingRefiner{mergeResults(e,t,n){let i=n.clone();return i.index=t.index,i.text=t.text+e+i.text,i.start.assign("weekday",t.start.get("weekday")),i.end&&i.end.assign("weekday",t.start.get("weekday")),i}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};Sd.default=Ed});var dn=k(Ji=>{"use strict";var di=Ji&&Ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ji,"__esModule",{value:!0});Ji.includeCommonConfiguration=void 0;var VS=di(Ig()),zS=di(iu()),Bg=di(Fg()),KS=di(Lg()),QS=di(Ug()),XS=di(kd()),ZS=di(Yg());function JS(r,e=!1){return r.parsers.unshift(new XS.default),r.refiners.unshift(new ZS.default),r.refiners.unshift(new VS.default),r.refiners.unshift(new zS.default),r.refiners.unshift(new Bg.default),r.refiners.push(new Bg.default),r.refiners.push(new KS.default),r.refiners.push(new QS.default(e)),r}Ji.includeCommonConfiguration=JS});var pn=k(Oe=>{"use strict";var eO=Oe&&Oe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.noon=Oe.morning=Oe.midnight=Oe.yesterdayEvening=Oe.evening=Oe.lastNight=Oe.tonight=Oe.theDayAfter=Oe.tomorrow=Oe.theDayBefore=Oe.yesterday=Oe.today=Oe.now=void 0;var Yr=We(),es=eO(we()),fn=ir(),pa=ze();function tO(r){let e=es.default(r.instant),t=new Yr.ParsingComponents(r,{});return fn.assignSimilarDate(t,e),fn.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}Oe.now=tO;function rO(r){let e=es.default(r.instant),t=new Yr.ParsingComponents(r,{});return fn.assignSimilarDate(t,e),fn.implySimilarTime(t,e),t}Oe.today=rO;function nO(r){return Hg(r,1)}Oe.yesterday=nO;function Hg(r,e){return Od(r,-e)}Oe.theDayBefore=Hg;function iO(r){return Od(r,1)}Oe.tomorrow=iO;function Od(r,e){let t=es.default(r.instant),n=new Yr.ParsingComponents(r,{});return t=t.add(e,"day"),fn.assignSimilarDate(n,t),fn.implySimilarTime(n,t),n}Oe.theDayAfter=Od;function sO(r,e=22){let t=es.default(r.instant),n=new Yr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",pa.Meridiem.PM),fn.assignSimilarDate(n,t),n}Oe.tonight=sO;function aO(r,e=0){let t=es.default(r.instant),n=new Yr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),fn.assignSimilarDate(n,t),n.imply("hour",e),n}Oe.lastNight=aO;function oO(r,e=20){let t=new Yr.ParsingComponents(r,{});return t.imply("meridiem",pa.Meridiem.PM),t.imply("hour",e),t}Oe.evening=oO;function uO(r,e=20){let t=es.default(r.instant),n=new Yr.ParsingComponents(r,{});return t=t.add(-1,"day"),fn.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",pa.Meridiem.PM),n}Oe.yesterdayEvening=uO;function lO(r){let e=new Yr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}Oe.midnight=lO;function cO(r,e=6){let t=new Yr.ParsingComponents(r,{});return t.imply("meridiem",pa.Meridiem.AM),t.imply("hour",e),t}Oe.morning=cO;function dO(r){let e=new Yr.ParsingComponents(r,{});return e.imply("meridiem",pa.Meridiem.AM),e.imply("hour",12),e}Oe.noon=dO});var Vg=k(wr=>{"use strict";var fO=wr&&wr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),pO=wr&&wr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),mO=wr&&wr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&fO(e,r,t);return pO(e,r),e},hO=wr&&wr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wr,"__esModule",{value:!0});var gO=hO(we()),yO=V(),bO=ir(),ma=mO(pn()),TO=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Dd=class extends yO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return TO}innerExtract(e,t){let n=gO.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return ma.now(e.reference);case"today":return ma.today(e.reference);case"yesterday":return ma.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return ma.tomorrow(e.reference);case"tonight":return ma.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),bO.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};wr.default=Dd});var zg=k(ha=>{"use strict";var _O=ha&&ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ha,"__esModule",{value:!0});var su=ze(),vO=V(),wO=_O(we()),kO=ir(),EO=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,xd=class extends vO.AbstractParserWithWordBoundaryChecking{innerPattern(){return EO}innerExtract(e,t){let n=wO.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",su.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",su.Meridiem.PM),i.imply("hour",20);break;case"midnight":kO.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",su.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",su.Meridiem.AM),i.imply("hour",12);break}return i}};ha.default=xd});var fi=k(Wn=>{"use strict";var SO=Wn&&Wn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.toDayJSClosestWeekday=Wn.toDayJSWeekday=void 0;var Kg=SO(we());function OO(r,e,t){if(!t)return Qg(r,e);let n=Kg.default(r);switch(t){case"this":n=n.day(e);break;case"next":n=n.day(e+7);break;case"last":n=n.day(e-7);break}return n}Wn.toDayJSWeekday=OO;function Qg(r,e){let t=Kg.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(Md,"__esModule",{value:!0});var Xg=ut(),DO=Re(),xO=V(),RO=fi(),MO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${DO.matchAnyPattern(Xg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),CO=1,AO=2,PO=3,Rd=class extends xO.AbstractParserWithWordBoundaryChecking{innerPattern(){return MO}innerExtract(e,t){let n=t[AO].toLowerCase(),i=Xg.WEEKDAY_DICTIONARY[n],s=t[CO],a=t[PO],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=RO.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Md.default=Rd});var ty=k(ga=>{"use strict";var NO=ga&&ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ga,"__esModule",{value:!0});var ey=ut(),Jg=We(),IO=NO(we()),FO=V(),LO=Re(),UO=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${LO.matchAnyPattern(ey.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),WO=1,qO=2,Cd=class extends FO.AbstractParserWithWordBoundaryChecking{innerPattern(){return UO}innerExtract(e,t){let n=t[WO].toLowerCase(),i=t[qO].toLowerCase(),s=ey.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,Jg.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,Jg.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=IO.default(e.reference.instant);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}};ga.default=Cd});var kr=k(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.ParsingContext=ns.Chrono=void 0;var ts=We(),$O=Ad(),rs=class{constructor(e){e=e||$O.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new rs({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let i=this.parse(e,t,n);return i.length>0?i[0].start.date():null}parse(e,t,n){let i=new au(e,t,n),s=[];return this.parsers.forEach(a=>{let o=rs.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let n=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;l instanceof ts.ParsingResult?c=l:l instanceof ts.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=s.substring(u+c.text.length),o=i.exec(a)}return n}};ns.Chrono=rs;var au=class{constructor(e,t,n){this.text=e,this.reference=new ts.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof ts.ParsingComponents?e:new ts.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new ts.ParsingResult(this.reference,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};ns.ParsingContext=au});var pi=k(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});var ry=ot(),jO=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"),ou=1,ny=5,iy=2,sy=3,Pd=4,Nd=class{constructor(e){this.groupNumberMonth=e?sy:iy,this.groupNumberDay=e?iy:sy}pattern(){return jO}extract(e,t){if(t[ou]=="/"||t[ny]=="/"){t.index+=t[0].length;return}let n=t.index+t[ou].length,i=t[0].substr(t[ou].length,t[0].length-t[ou].length-t[ny].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[Pd]&&t[0].indexOf("/")<0)return;let s=e.createParsingResult(n,i),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),t[Pd]){let u=parseInt(t[Pd]),l=ry.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=ry.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};Id.default=Nd});var oy=k(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});var ay=ut(),GO=We(),YO=V(),BO=sr(),HO=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${ay.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Fd=class extends YO.AbstractParserWithWordBoundaryChecking{innerPattern(){return HO}innerExtract(e,t){let n=t[1].toLowerCase(),i=ay.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=BO.reverseTimeUnits(i);break}return GO.ParsingComponents.createRelativeFromReference(e.reference,i)}};Ld.default=Fd});var ly=k(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});var VO=Xi(),Ud=We(),zO=ut(),KO=sr();function uy(r){return r.text.match(/\s+(before|from)$/i)!=null}function QO(r){return r.text.match(/\s+(after|since)$/i)!=null}var Wd=class extends VO.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!uy(t)&&!QO(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=zO.parseTimeUnits(t.text);uy(t)&&(i=KO.reverseTimeUnits(i));let s=Ud.ParsingComponents.createRelativeFromReference(new Ud.ReferenceWithTimezone(n.start.date()),i);return new Ud.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};qd.default=Wd});var Ad=k(Ge=>{"use strict";var Xe=Ge&&Ge.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.createConfiguration=Ge.createCasualConfiguration=Ge.parseDate=Ge.parse=Ge.GB=Ge.strict=Ge.casual=void 0;var XO=Xe(ug()),ZO=Xe(mg()),JO=Xe(Tg()),e0=Xe(wg()),t0=Xe(Sg()),r0=Xe(Og()),n0=Xe(xg()),i0=Xe(Rg()),s0=Xe(Mg()),a0=Xe(Cg()),o0=Xe(Ng()),u0=dn(),l0=Xe(Vg()),c0=Xe(zg()),d0=Xe(Zg()),f0=Xe(ty()),$d=kr(),p0=Xe(pi()),m0=Xe(oy()),h0=Xe(ly());Ge.casual=new $d.Chrono(cy(!1));Ge.strict=new $d.Chrono(uu(!0,!1));Ge.GB=new $d.Chrono(uu(!1,!0));function g0(r,e,t){return Ge.casual.parse(r,e,t)}Ge.parse=g0;function y0(r,e,t){return Ge.casual.parseDate(r,e,t)}Ge.parseDate=y0;function cy(r=!1){let e=uu(!1,r);return e.parsers.unshift(new l0.default),e.parsers.unshift(new c0.default),e.parsers.unshift(new e0.default),e.parsers.unshift(new f0.default),e.parsers.unshift(new m0.default),e}Ge.createCasualConfiguration=cy;function uu(r=!0,e=!1){return u0.includeCommonConfiguration({parsers:[new p0.default(e),new XO.default,new ZO.default,new JO.default,new d0.default,new t0.default,new r0.default,new n0.default(r),new i0.default(r),new s0.default(r)],refiners:[new h0.default,new o0.default,new a0.default]},r)}Ge.createConfiguration=uu});var dy=k(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});var b0=ci(),jd=class extends b0.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Gd.default=jd});var ya=k(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.parseTimeUnits=Ae.TIME_UNITS_PATTERN=Ae.parseYear=Ae.YEAR_PATTERN=Ae.parseNumberPattern=Ae.NUMBER_PATTERN=Ae.TIME_UNIT_DICTIONARY=Ae.INTEGER_WORD_DICTIONARY=Ae.MONTH_DICTIONARY=Ae.WEEKDAY_DICTIONARY=void 0;var Yd=Re(),T0=ot();Ae.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};Ae.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};Ae.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};Ae.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};Ae.NUMBER_PATTERN=`(?:${Yd.matchAnyPattern(Ae.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function py(r){let e=r.toLowerCase();return Ae.INTEGER_WORD_DICTIONARY[e]!==void 0?Ae.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)}Ae.parseNumberPattern=py;Ae.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function _0(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return T0.findMostLikelyADYear(e)}Ae.parseYear=_0;var my=`(${Ae.NUMBER_PATTERN})\\s{0,5}(${Yd.matchAnyPattern(Ae.TIME_UNIT_DICTIONARY)})\\s{0,5}`,fy=new RegExp(my,"i");Ae.TIME_UNITS_PATTERN=Yd.repeatedTimeunitPattern("",my);function v0(r){let e={},t=r,n=fy.exec(t);for(;n;)w0(e,n),t=t.substring(n[0].length),n=fy.exec(t);return e}Ae.parseTimeUnits=v0;function w0(r,e){let t=py(e[1]),n=Ae.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var gy=k(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});var hy=ya(),k0=Re(),E0=V(),S0=fi(),O0=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${k0.matchAnyPattern(hy.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),D0=1,x0=3,R0=2,Bd=class extends E0.AbstractParserWithWordBoundaryChecking{innerPattern(){return O0}innerExtract(e,t){let n=t[R0].toLowerCase(),i=hy.WEEKDAY_DICTIONARY[n],s=t[D0],a=t[x0],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=S0.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Hd.default=Bd});var _y=k(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});var qn=ze(),M0=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),C0=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),A0=2,yy=3,by=4,Ty=5,is=class{pattern(e){return M0}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=is.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=C0.exec(i);return s&&(n.end=is.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[A0]),t[yy]!=null&&(i=parseInt(t[yy])),i>=60||n>24)return null;if(n>=12&&(s=qn.Meridiem.PM),t[Ty]!=null){if(n>12)return null;let a=t[Ty].toLowerCase();a.match(/morgen|vormittag/)&&(s=qn.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=qn.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=qn.Meridiem.AM,n=0):n<6?s=qn.Meridiem.AM:(s=qn.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",qn.Meridiem.AM):e.imply("meridiem",qn.Meridiem.PM),t[by]!=null){let a=parseInt(t[by]);if(a>=60)return null;e.assign("second",a)}return e}};Vd.default=is});var vy=k(ba=>{"use strict";var P0=ba&&ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ba,"__esModule",{value:!0});var N0=P0(Gr()),zd=class extends N0.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};ba.default=zd});var wy=k(Ta=>{"use strict";var I0=Ta&&Ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ta,"__esModule",{value:!0});var F0=I0(cn()),Kd=class extends F0.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};Ta.default=Kd});var Qd=k(va=>{"use strict";var L0=va&&va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(va,"__esModule",{value:!0});var U0=L0(we()),mi=ze(),W0=V(),q0=ir(),$0=sr(),_a=class extends W0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=U0.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return q0.implySimilarTime(s,n),_a.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",mi.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",mi.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",mi.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",mi.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",mi.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",mi.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=$0.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",mi.Meridiem.AM);break}return e}};va.default=_a});var Sy=k(Er=>{"use strict";var j0=Er&&Er.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),G0=Er&&Er.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Y0=Er&&Er.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&j0(e,r,t);return G0(e,r),e},Ey=Er&&Er.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Er,"__esModule",{value:!0});var B0=Ey(we()),H0=V(),hi=ir(),V0=Ey(Qd()),ky=Y0(pn()),z0=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),K0=1,Q0=2,Xd=class extends H0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return z0}innerExtract(e,t){let n=B0.default(e.refDate),i=(t[K0]||"").toLowerCase(),s=(t[Q0]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=ky.now(e.reference);break;case"heute":a=ky.today(e.reference);break;case"morgen":hi.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),hi.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),hi.assignSimilarDate(a,n),hi.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),hi.assignSimilarDate(a,n),hi.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),hi.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=V0.default.extractTimeComponents(a,s)),a}};Er.default=Xd});var Cy=k(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});var X0=ot(),Ry=ya(),My=ya(),Z0=Re(),J0=V(),e1=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${Z0.matchAnyPattern(Ry.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${My.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Oy=1,Dy=2,t1=3,xy=4,Zd=class extends J0.AbstractParserWithWordBoundaryChecking{innerPattern(){return e1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Ry.MONTH_DICTIONARY[t[t1].toLowerCase()],s=parseInt(t[Oy]);if(s>31)return t.index=t.index+t[Oy].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[xy]){let a=My.parseYear(t[xy]);n.start.assign("year",a)}else{let a=X0.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Dy]){let a=parseInt(t[Dy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Jd.default=Zd});var Ay=k(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});var lu=ya(),r1=We(),n1=V(),i1=sr(),s1=Re(),ef=class extends n1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${lu.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${s1.matchAnyPattern(lu.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?lu.parseNumberPattern(t[2]):1,i=lu.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],s={};s[i]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=i1.reverseTimeUnits(s)),r1.ParsingComponents.createRelativeFromReference(e.reference,s)}};tf.default=ef});var Iy=k(Ze=>{"use strict";var Sr=Ze&&Ze.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.createConfiguration=Ze.createCasualConfiguration=Ze.parseDate=Ze.parse=Ze.strict=Ze.casual=void 0;var a1=dn(),Py=kr(),o1=Sr(pi()),u1=Sr(kd()),l1=Sr(dy()),c1=Sr(gy()),d1=Sr(_y()),f1=Sr(vy()),p1=Sr(wy()),m1=Sr(Sy()),h1=Sr(Qd()),g1=Sr(Cy()),y1=Sr(Ay());Ze.casual=new Py.Chrono(Ny());Ze.strict=new Py.Chrono(rf(!0));function b1(r,e,t){return Ze.casual.parse(r,e,t)}Ze.parse=b1;function T1(r,e,t){return Ze.casual.parseDate(r,e,t)}Ze.parseDate=T1;function Ny(r=!0){let e=rf(!1,r);return e.parsers.unshift(new h1.default),e.parsers.unshift(new m1.default),e.parsers.unshift(new y1.default),e}Ze.createCasualConfiguration=Ny;function rf(r=!0,e=!0){return a1.includeCommonConfiguration({parsers:[new u1.default,new o1.default(e),new l1.default,new d1.default,new g1.default,new c1.default],refiners:[new f1.default,new p1.default]},r)}Ze.createConfiguration=rf});var Ly=k(Or=>{"use strict";var _1=Or&&Or.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),v1=Or&&Or.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),w1=Or&&Or.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&_1(e,r,t);return v1(e,r),e},k1=Or&&Or.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Or,"__esModule",{value:!0});var E1=k1(we()),S1=ze(),O1=V(),Fy=ir(),cu=w1(pn()),nf=class extends O1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=E1.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return cu.now(e.reference);case"aujourd'hui":return cu.today(e.reference);case"hier":return cu.yesterday(e.reference);case"demain":return cu.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(Fy.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",S1.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),Fy.assignSimilarDate(s,n),s.imply("hour",0))}return s}};Or.default=nf});var Uy=k(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});var wa=ze(),D1=V(),sf=class extends D1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),i=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",wa.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",wa.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",wa.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",wa.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",wa.Meridiem.AM);break}return i}};af.default=sf});var Wy=k(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var x1=ci(),of=class extends x1.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)}};uf.default=of});var qy=k(ka=>{"use strict";var R1=ka&&ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ka,"__esModule",{value:!0});var M1=R1(cn()),lf=class extends M1.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};ka.default=lf});var $y=k(Ea=>{"use strict";var C1=Ea&&Ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ea,"__esModule",{value:!0});var A1=C1(Gr()),cf=class extends A1.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Ea.default=cf});var $n=k(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.parseTimeUnits=ke.TIME_UNITS_PATTERN=ke.parseYear=ke.YEAR_PATTERN=ke.parseOrdinalNumberPattern=ke.ORDINAL_NUMBER_PATTERN=ke.parseNumberPattern=ke.NUMBER_PATTERN=ke.TIME_UNIT_DICTIONARY=ke.INTEGER_WORD_DICTIONARY=ke.MONTH_DICTIONARY=ke.WEEKDAY_DICTIONARY=void 0;var df=Re();ke.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};ke.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};ke.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};ke.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"};ke.NUMBER_PATTERN=`(?:${df.matchAnyPattern(ke.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function Gy(r){let e=r.toLowerCase();return ke.INTEGER_WORD_DICTIONARY[e]!==void 0?ke.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}ke.parseNumberPattern=Gy;ke.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function P1(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}ke.parseOrdinalNumberPattern=P1;ke.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 N1(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}ke.parseYear=N1;var Yy=`(${ke.NUMBER_PATTERN})\\s{0,5}(${df.matchAnyPattern(ke.TIME_UNIT_DICTIONARY)})\\s{0,5}`,jy=new RegExp(Yy,"i");ke.TIME_UNITS_PATTERN=df.repeatedTimeunitPattern("",Yy);function I1(r){let e={},t=r,n=jy.exec(t);for(;n;)F1(e,n),t=t.substring(n[0].length),n=jy.exec(t);return e}ke.parseTimeUnits=I1;function F1(r,e){let t=Gy(e[1]),n=ke.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Hy=k(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});var By=$n(),L1=Re(),U1=V(),W1=fi(),q1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${L1.matchAnyPattern(By.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),$1=1,j1=2,ff=class extends U1.AbstractParserWithWordBoundaryChecking{innerPattern(){return q1}innerExtract(e,t){let n=t[$1].toLowerCase(),i=By.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[j1];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=W1.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};pf.default=ff});var Qy=k(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});var Sa=ze(),G1=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"),Y1=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"),B1=2,Vy=3,zy=4,Ky=5,ss=class{pattern(e){return G1}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=ss.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=Y1.exec(i);return s&&(n.end=ss.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[B1]),t[Vy]!=null&&(i=parseInt(t[Vy])),i>=60||n>24)return null;if(n>=12&&(s=Sa.Meridiem.PM),t[Ky]!=null){if(n>12)return null;let a=t[Ky][0].toLowerCase();a=="a"&&(s=Sa.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=Sa.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Sa.Meridiem.AM):e.imply("meridiem",Sa.Meridiem.PM),t[zy]!=null){let a=parseInt(t[zy]);if(a>=60)return null;e.assign("second",a)}return e}};mf.default=ss});var rb=k(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});var H1=ot(),eb=$n(),tb=$n(),du=$n(),V1=Re(),z1=V(),K1=new RegExp(`(?:on\\s*?)?(${du.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${du.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${V1.matchAnyPattern(eb.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${tb.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Xy=1,Zy=2,Q1=3,Jy=4,hf=class extends z1.AbstractParserWithWordBoundaryChecking{innerPattern(){return K1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=eb.MONTH_DICTIONARY[t[Q1].toLowerCase()],s=du.parseOrdinalNumberPattern(t[Xy]);if(s>31)return t.index=t.index+t[Xy].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Jy]){let a=tb.parseYear(t[Jy]);n.start.assign("year",a)}else{let a=H1.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Zy]){let a=du.parseOrdinalNumberPattern(t[Zy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};gf.default=hf});var ib=k(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var nb=$n(),X1=We(),Z1=V(),J1=sr(),yf=class extends Z1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${nb.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=nb.parseTimeUnits(t[1]),i=J1.reverseTimeUnits(n);return X1.ParsingComponents.createRelativeFromReference(e.reference,i)}};bf.default=yf});var ab=k(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var sb=$n(),eD=We(),tD=V(),Tf=class extends tD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${sb.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=sb.parseTimeUnits(t[1]);return eD.ParsingComponents.createRelativeFromReference(e.reference,n)}};_f.default=Tf});var ob=k(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var fu=$n(),rD=We(),nD=V(),iD=sr(),sD=Re(),vf=class extends nD.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${fu.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${sD.matchAnyPattern(fu.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let n=t[1]?fu.parseNumberPattern(t[1]):1,i=fu.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],s={};s[i]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=iD.reverseTimeUnits(s)),rD.ParsingComponents.createRelativeFromReference(e.reference,s)}};wf.default=vf});var cb=k(Je=>{"use strict";var ar=Je&&Je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Je,"__esModule",{value:!0});Je.createConfiguration=Je.createCasualConfiguration=Je.parseDate=Je.parse=Je.strict=Je.casual=void 0;var aD=dn(),ub=kr(),oD=ar(Ly()),uD=ar(Uy()),lD=ar(pi()),cD=ar(Wy()),dD=ar(qy()),fD=ar($y()),pD=ar(Hy()),mD=ar(Qy()),hD=ar(rb()),gD=ar(ib()),yD=ar(ab()),bD=ar(ob());Je.casual=new ub.Chrono(lb());Je.strict=new ub.Chrono(kf(!0));function TD(r,e,t){return Je.casual.parse(r,e,t)}Je.parse=TD;function _D(r,e,t){return Je.casual.parseDate(r,e,t)}Je.parseDate=_D;function lb(r=!0){let e=kf(!1,r);return e.parsers.unshift(new oD.default),e.parsers.unshift(new uD.default),e.parsers.unshift(new bD.default),e}Je.createCasualConfiguration=lb;function kf(r=!0,e=!0){return aD.includeCommonConfiguration({parsers:[new lD.default(e),new hD.default,new cD.default,new mD.default,new gD.default,new yD.default,new pD.default],refiners:[new dD.default,new fD.default]},r)}Je.createConfiguration=kf});var db=k(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.toHankaku=void 0;function vD(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,wD)}pu.toHankaku=vD;function wD(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var pb=k(Oa=>{"use strict";var kD=Oa&&Oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oa,"__esModule",{value:!0});var Ef=db(),ED=ot(),SD=kD(we()),OD=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,fb=1,DD=2,Sf=3,xD=4,RD=5,MD=6,Of=class{pattern(){return OD}extract(e,t){let n=parseInt(Ef.toHankaku(t[RD])),i=parseInt(Ef.toHankaku(t[MD])),s=e.createParsingComponents({day:i,month:n});if(t[fb]&&t[fb].match("\u540C|\u4ECA|\u672C")){let a=SD.default(e.refDate);s.assign("year",a.year())}if(t[DD]){let a=t[xD],o=a=="\u5143"?1:parseInt(Ef.toHankaku(a));t[Sf]=="\u4EE4\u548C"?o+=2018:t[Sf]=="\u5E73\u6210"?o+=1988:t[Sf]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=ED.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};Oa.default=Of});var mb=k(Da=>{"use strict";var CD=Da&&Da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Da,"__esModule",{value:!0});var AD=CD(Gr()),Df=class extends AD.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Da.default=Df});var gb=k(Dr=>{"use strict";var PD=Dr&&Dr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),ND=Dr&&Dr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),ID=Dr&&Dr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&PD(e,r,t);return ND(e,r),e},FD=Dr&&Dr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dr,"__esModule",{value:!0});var LD=FD(we()),hb=ze(),xf=ID(pn()),UD=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Rf=class{pattern(){return UD}extract(e,t){let n=t[0],i=LD.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return xf.yesterday(e.reference);case"\u660E\u65E5":return xf.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return xf.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",hb.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",hb.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};Dr.default=Rf});var Tb=k(et=>{"use strict";var Mf=et&&et.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(et,"__esModule",{value:!0});et.createConfiguration=et.createCasualConfiguration=et.parseDate=et.parse=et.strict=et.casual=void 0;var WD=Mf(pb()),qD=Mf(mb()),$D=Mf(gb()),yb=kr();et.casual=new yb.Chrono(bb());et.strict=new yb.Chrono(Cf());function jD(r,e,t){return et.casual.parse(r,e,t)}et.parse=jD;function GD(r,e,t){return et.casual.parseDate(r,e,t)}et.parseDate=GD;function bb(){let r=Cf();return r.parsers.unshift(new $D.default),r}et.createCasualConfiguration=bb;function Cf(){return{parsers:[new WD.default],refiners:[new qD.default]}}et.createConfiguration=Cf});var mu=k(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.parseYear=Br.YEAR_PATTERN=Br.MONTH_DICTIONARY=Br.WEEKDAY_DICTIONARY=void 0;Br.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};Br.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};Br.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function YD(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}Br.parseYear=YD});var vb=k(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});var _b=mu(),BD=Re(),HD=V(),VD=fi(),zD=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${BD.matchAnyPattern(_b.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),KD=1,QD=2,XD=3,Af=class extends HD.AbstractParserWithWordBoundaryChecking{innerPattern(){return zD}innerExtract(e,t){let n=t[QD].toLowerCase(),i=_b.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[KD],a=t[XD],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=VD.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Pf.default=Af});var wb=k(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});var ZD=ci(),Nf=class extends ZD.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};If.default=Nf});var kb=k(xa=>{"use strict";var JD=xa&&xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xa,"__esModule",{value:!0});var ex=JD(cn()),Ff=class extends ex.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};xa.default=Ff});var Eb=k(Ra=>{"use strict";var tx=Ra&&Ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ra,"__esModule",{value:!0});var rx=tx(Gr()),Lf=class extends rx.default{patternBetween(){return/^\s*(?:-)\s*$/i}};Ra.default=Lf});var Mb=k(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});var nx=ot(),xb=mu(),Rb=mu(),ix=Re(),sx=V(),ax=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*)(${ix.matchAnyPattern(xb.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Rb.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Sb=1,Ob=2,ox=3,Db=4,Uf=class extends sx.AbstractParserWithWordBoundaryChecking{innerPattern(){return ax}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=xb.MONTH_DICTIONARY[t[ox].toLowerCase()],s=parseInt(t[Sb]);if(s>31)return t.index=t.index+t[Sb].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Db]){let a=Rb.parseYear(t[Db]);n.start.assign("year",a)}else{let a=nx.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Ob]){let a=parseInt(t[Ob]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Wf.default=Uf});var Cb=k(mn=>{"use strict";var ux=mn&&mn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),lx=mn&&mn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),cx=mn&&mn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&ux(e,r,t);return lx(e,r),e};Object.defineProperty(mn,"__esModule",{value:!0});var dx=V(),hu=cx(pn()),qf=class extends dx.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"agora":return hu.now(e.reference);case"hoje":return hu.today(e.reference);case"amanha":case"amanh\xE3":return hu.tomorrow(e.reference);case"ontem":return hu.yesterday(e.reference)}return i}};mn.default=qf});var Ab=k(Ma=>{"use strict";var fx=Ma&&Ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ma,"__esModule",{value:!0});var gu=ze(),px=V(),mx=ir(),hx=fx(we()),$f=class extends px.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=hx.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",gu.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",gu.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",gu.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":mx.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",gu.Meridiem.AM),i.imply("hour",12);break}return i}};Ma.default=$f});var Ib=k(tt=>{"use strict";var jn=tt&&tt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tt,"__esModule",{value:!0});tt.createConfiguration=tt.createCasualConfiguration=tt.parseDate=tt.parse=tt.strict=tt.casual=void 0;var gx=dn(),Pb=kr(),yx=jn(pi()),bx=jn(vb()),Tx=jn(wb()),_x=jn(kb()),vx=jn(Eb()),wx=jn(Mb()),kx=jn(Cb()),Ex=jn(Ab());tt.casual=new Pb.Chrono(Nb());tt.strict=new Pb.Chrono(jf(!0));function Sx(r,e,t){return tt.casual.parse(r,e,t)}tt.parse=Sx;function Ox(r,e,t){return tt.casual.parseDate(r,e,t)}tt.parseDate=Ox;function Nb(r=!0){let e=jf(!1,r);return e.parsers.push(new kx.default),e.parsers.push(new Ex.default),e}tt.createCasualConfiguration=Nb;function jf(r=!0,e=!0){return gx.includeCommonConfiguration({parsers:[new yx.default(e),new bx.default,new Tx.default,new wx.default],refiners:[new _x.default,new vx.default]},r)}tt.createConfiguration=jf});var Fb=k(Ca=>{"use strict";var Dx=Ca&&Ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ca,"__esModule",{value:!0});var xx=Dx(Gr()),Gf=class extends xx.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Ca.default=Gf});var Lb=k(Aa=>{"use strict";var Rx=Aa&&Aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Aa,"__esModule",{value:!0});var Mx=Rx(cn()),Yf=class extends Mx.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};Aa.default=Yf});var Ub=k(hn=>{"use strict";var Cx=hn&&hn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Ax=hn&&hn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Px=hn&&hn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Cx(e,r,t);return Ax(e,r),e};Object.defineProperty(hn,"__esModule",{value:!0});var Nx=V(),yu=Px(pn()),Bf=class extends Nx.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"nu":return yu.now(e.reference);case"vandaag":return yu.today(e.reference);case"morgen":case"morgend":return yu.tomorrow(e.reference);case"gisteren":return yu.yesterday(e.reference)}return i}};hn.default=Bf});var Wb=k(Pa=>{"use strict";var Ix=Pa&&Pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pa,"__esModule",{value:!0});var bu=ze(),Fx=V(),Lx=Ix(we()),Ux=ir(),Wx=1,qx=2,Hf=class extends Fx.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=Lx.default(e.refDate),i=e.createParsingComponents();switch(t[Wx]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[qx].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",bu.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",bu.Meridiem.PM),i.imply("hour",20);break;case"middernacht":Ux.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",bu.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",bu.Meridiem.AM),i.imply("hour",12);break}return i}};Pa.default=Hf});var Gt=k(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.parseTimeUnits=ge.TIME_UNITS_PATTERN=ge.parseYear=ge.YEAR_PATTERN=ge.parseOrdinalNumberPattern=ge.ORDINAL_NUMBER_PATTERN=ge.parseNumberPattern=ge.NUMBER_PATTERN=ge.TIME_UNIT_DICTIONARY=ge.ORDINAL_WORD_DICTIONARY=ge.INTEGER_WORD_DICTIONARY=ge.MONTH_DICTIONARY=ge.WEEKDAY_DICTIONARY=void 0;var Tu=Re(),$x=ot();ge.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};ge.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};ge.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};ge.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};ge.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};ge.NUMBER_PATTERN=`(?:${Tu.matchAnyPattern(ge.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function $b(r){let e=r.toLowerCase();return ge.INTEGER_WORD_DICTIONARY[e]!==void 0?ge.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}ge.parseNumberPattern=$b;ge.ORDINAL_NUMBER_PATTERN=`(?:${Tu.matchAnyPattern(ge.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function jx(r){let e=r.toLowerCase();return ge.ORDINAL_WORD_DICTIONARY[e]!==void 0?ge.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}ge.parseOrdinalNumberPattern=jx;ge.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function Gx(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return $x.findMostLikelyADYear(e)}ge.parseYear=Gx;var jb=`(${ge.NUMBER_PATTERN})\\s{0,5}(${Tu.matchAnyPattern(ge.TIME_UNIT_DICTIONARY)})\\s{0,5}`,qb=new RegExp(jb,"i");ge.TIME_UNITS_PATTERN=Tu.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",jb);function Yx(r){let e={},t=r,n=qb.exec(t);for(;n;)Bx(e,n),t=t.substring(n[0].length),n=qb.exec(t);return e}ge.parseTimeUnits=Yx;function Bx(r,e){let t=$b(e[1]),n=ge.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Yb=k(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});var Gb=Gt(),Hx=We(),Vx=V(),Vf=class extends Vx.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+Gb.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=Gb.parseTimeUnits(t[1]);return Hx.ParsingComponents.createRelativeFromReference(e.reference,n)}};zf.default=Vf});var Hb=k(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var Bb=Gt(),zx=Re(),Kx=V(),Qx=fi(),Xx=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${zx.matchAnyPattern(Bb.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),Zx=1,Jx=2,eR=3,Kf=class extends Kx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Xx}innerExtract(e,t){let n=t[Jx].toLowerCase(),i=Bb.WEEKDAY_DICTIONARY[n],s=t[Zx],a=t[eR],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=Qx.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Qf.default=Kf});var Zb=k(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var tR=ot(),Qb=Gt(),_u=Gt(),Xb=Gt(),rR=Re(),nR=V(),iR=new RegExp(`(?:on\\s*?)?(${_u.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${_u.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+rR.matchAnyPattern(Qb.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Xb.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),sR=3,Vb=1,zb=2,Kb=4,Xf=class extends nR.AbstractParserWithWordBoundaryChecking{innerPattern(){return iR}innerExtract(e,t){let n=Qb.MONTH_DICTIONARY[t[sR].toLowerCase()],i=_u.parseOrdinalNumberPattern(t[Vb]);if(i>31)return t.index=t.index+t[Vb].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[Kb]){let u=Xb.parseYear(t[Kb]);s.assign("year",u)}else{let u=tR.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[zb])return s;let a=_u.parseOrdinalNumberPattern(t[zb]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Zf.default=Xf});var rT=k(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});var eT=Gt(),aR=ot(),oR=Re(),tT=Gt(),uR=V(),lR=new RegExp(`(${oR.matchAnyPattern(eT.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${tT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),cR=1,Jb=2,Jf=class extends uR.AbstractParserWithWordBoundaryChecking{innerPattern(){return lR}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[cR],s=eT.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[Jb]){let a=tT.parseYear(t[Jb]);n.assign("year",a)}else{let a=aR.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};ep.default=Jf});var nT=k(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});var dR=V(),fR=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),pR=1,mR=2,tp=class extends dR.AbstractParserWithWordBoundaryChecking{innerPattern(){return fR}innerExtract(e,t){let n=parseInt(t[mR]),i=parseInt(t[pR]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};rp.default=tp});var iT=k(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});var hR=ci(),np=class extends hR.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};ip.default=np});var oT=k(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});var aT=Gt(),gR=Re(),yR=V(),bR=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${gR.matchAnyPattern(aT.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),TR=1,_R=2,sT=3,vR=4,sp=class extends yR.AbstractParserWithWordBoundaryChecking{innerPattern(){return bR}innerExtract(e,t){let n=t[sT]?parseInt(t[sT]):aT.MONTH_DICTIONARY[t[_R].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[TR]);return{day:parseInt(t[vR]),month:n,year:i}}};ap.default=sp});var uT=k(Na=>{"use strict";var wR=Na&&Na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Na,"__esModule",{value:!0});var kR=V(),vu=ze(),op=ir(),ER=wR(we()),SR=1,OR=2,up=class extends kR.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[SR].toLowerCase(),i=t[OR].toLowerCase(),s=e.createParsingComponents(),a=ER.default(e.refDate);switch(n){case"gisteren":op.assignSimilarDate(s,a.add(-1,"day"));break;case"van":op.assignSimilarDate(s,a);break;case"morgen":op.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",vu.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",vu.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",vu.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",vu.Meridiem.PM),s.imply("hour",20);break}return s}};Na.default=up});var cT=k(cp=>{"use strict";Object.defineProperty(cp,"__esModule",{value:!0});var lT=Gt(),DR=We(),xR=V(),RR=sr(),MR=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${lT.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),lp=class extends xR.AbstractParserWithWordBoundaryChecking{innerPattern(){return MR}innerExtract(e,t){let n=t[1].toLowerCase(),i=lT.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=RR.reverseTimeUnits(i);break}return DR.ParsingComponents.createRelativeFromReference(e.reference,i)}};cp.default=lp});var pT=k(Ia=>{"use strict";var CR=Ia&&Ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ia,"__esModule",{value:!0});var fT=Gt(),dT=We(),AR=CR(we()),PR=V(),NR=Re(),IR=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${NR.matchAnyPattern(fT.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),FR=1,LR=2,dp=class extends PR.AbstractParserWithWordBoundaryChecking{innerPattern(){return IR}innerExtract(e,t){let n=t[FR].toLowerCase(),i=t[LR].toLowerCase(),s=fT.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,dT.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,dT.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=AR.default(e.reference.instant);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(/maand/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(/jaar/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}};Ia.default=dp});var mT=k(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});var pp=Gt(),UR=We(),WR=V(),qR=sr(),$R=new RegExp("("+pp.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),jR=new RegExp("("+pp.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),fp=class extends WR.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?jR:$R}innerExtract(e,t){let n=pp.parseTimeUnits(t[1]),i=qR.reverseTimeUnits(n);return UR.ParsingComponents.createRelativeFromReference(e.reference,i)}};mp.default=fp});var hT=k(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});var gp=Gt(),GR=We(),YR=V(),BR=new RegExp("("+gp.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),HR=new RegExp("("+gp.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),VR=1,hp=class extends YR.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?HR:BR}innerExtract(e,t){let n=gp.parseTimeUnits(t[VR]);return GR.ParsingComponents.createRelativeFromReference(e.reference,n)}};yp.default=hp});var TT=k(rt=>{"use strict";var lt=rt&&rt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rt,"__esModule",{value:!0});rt.createConfiguration=rt.createCasualConfiguration=rt.parseDate=rt.parse=rt.strict=rt.casual=void 0;var zR=dn(),gT=kr(),KR=lt(Fb()),QR=lt(Lb()),XR=lt(Ub()),ZR=lt(Wb()),JR=lt(pi()),eM=lt(Yb()),tM=lt(Hb()),rM=lt(Zb()),yT=lt(rT()),nM=lt(nT()),iM=lt(iT()),sM=lt(oT()),aM=lt(uT()),oM=lt(cT()),uM=lt(pT()),lM=lt(mT()),cM=lt(hT());rt.casual=new gT.Chrono(bT());rt.strict=new gT.Chrono(bp(!0));function dM(r,e,t){return rt.casual.parse(r,e,t)}rt.parse=dM;function fM(r,e,t){return rt.casual.parseDate(r,e,t)}rt.parseDate=fM;function bT(r=!0){let e=bp(!1,r);return e.parsers.unshift(new XR.default),e.parsers.unshift(new ZR.default),e.parsers.unshift(new aM.default),e.parsers.unshift(new yT.default),e.parsers.unshift(new uM.default),e.parsers.unshift(new oM.default),e}rt.createCasualConfiguration=bT;function bp(r=!0,e=!0){return zR.includeCommonConfiguration({parsers:[new JR.default(e),new eM.default,new rM.default,new yT.default,new tM.default,new sM.default,new nM.default,new iM.default(r),new lM.default(r),new cM.default(r)],refiners:[new QR.default,new KR.default]},r)}rt.createConfiguration=bp});var kT=k(Fa=>{"use strict";var pM=Fa&&Fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fa,"__esModule",{value:!0});var mM=pM(we()),hM=V(),gM=1,_T=2,yM=3,vT=4,wT=5,bM=6,Tp=class extends hM.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=mM.default(e.refDate),a=s;if(t[gM])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[_T]){let o=t[_T],u=t[yM];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[vT]){let u=t[vT][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[wT]){let o=t[wT];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[bM];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Fa.default=Tp});var as=k(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.zhStringToYear=Ct.zhStringToNumber=Ct.WEEKDAY_OFFSET=Ct.NUMBER=void 0;Ct.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};Ct.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function TM(r){let e=0;for(let t=0;t{"use strict";var vM=La&&La.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(La,"__esModule",{value:!0});var wM=vM(we()),kM=V(),gi=as(),_p=1,ET=2,vp=3,wp=class extends kM.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(gi.NUMBER).join("")+"]{4}|["+Object.keys(gi.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(gi.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(gi.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=wM.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[ET]);if(isNaN(s)&&(s=gi.zhStringToNumber(t[ET])),i.start.assign("month",s),t[vp]){let a=parseInt(t[vp]);isNaN(a)&&(a=gi.zhStringToNumber(t[vp])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[_p]){let a=parseInt(t[_p]);isNaN(a)&&(a=gi.zhStringToYear(t[_p])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};La.default=wp});var DT=k(Ua=>{"use strict";var EM=Ua&&Ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ua,"__esModule",{value:!0});var SM=EM(we()),OM=V(),OT=as(),DM=new RegExp("(\\d+|["+Object.keys(OT.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),kp=1,xM=2,Ep=class extends OM.AbstractParserWithWordBoundaryChecking{innerPattern(){return DM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[kp]);if(isNaN(i)&&(i=OT.zhStringToNumber(t[kp])),isNaN(i)){let u=t[kp];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=SM.default(e.refDate),o=t[xM][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Ua.default=Ep});var RT=k(Wa=>{"use strict";var RM=Wa&&Wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wa,"__esModule",{value:!0});var MM=RM(we()),CM=V(),xT=as(),AM=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(xT.WEEKDAY_OFFSET).join("|")+")"),Sp=class extends CM.AbstractParserWithWordBoundaryChecking{innerPattern(){return AM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=xT.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=MM.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var PM=qa&&qa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qa,"__esModule",{value:!0});var NM=PM(we()),IM=V(),ur=as(),FM=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(ur.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(ur.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(ur.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),LM=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(ur.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(ur.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(ur.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),wu=1,ku=2,Eu=3,Su=4,Ou=5,Du=6,or=7,os=8,xu=9,Op=class extends IM.AbstractParserWithWordBoundaryChecking{innerPattern(){return FM}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=NM.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[wu]){var a=t[wu];a=="\u660E"||a=="\u807D"?n.hour()>1&&s.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?s.add(-1,"day"):a=="\u524D"?s.add(-2,"day"):a=="\u5927\u524D"?s.add(-3,"day"):a=="\u5F8C"?s.add(2,"day"):a=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[Su]){var o=t[Su];o=="\u660E"||o=="\u807D"?s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s.add(-1,"day"):o=="\u524D"?s.add(-2,"day"):o=="\u5927\u524D"?s.add(-3,"day"):o=="\u5F8C"?s.add(2,"day"):o=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let u=0,l=0,c=-1;if(t[os]){var d=parseInt(t[os]);if(isNaN(d)&&(d=ur.zhStringToNumber(t[os])),d>=60)return null;i.start.assign("second",d)}if(u=parseInt(t[Du]),isNaN(u)&&(u=ur.zhStringToNumber(t[Du])),t[or]?t[or]=="\u534A"?l=30:t[or]=="\u6B63"||t[or]=="\u6574"?l=0:(l=parseInt(t[or]),isNaN(l)&&(l=ur.zhStringToNumber(t[or]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[xu]){if(u>12)return null;var p=t[xu][0].toLowerCase();p=="a"&&(c=0,u==12&&(u=0)),p=="p"&&(c=1,u!=12&&(u+=12))}else if(t[ku]){var m=t[ku],y=m[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[Eu]){var _=t[Eu],b=_[0];b=="\u4E0A"||b=="\u671D"||b=="\u65E9"||b=="\u51CC"?(c=0,u==12&&(u=0)):(b=="\u4E0B"||b=="\u664F"||b=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Ou]){var E=t[Ou],R=E[0];R=="\u4E0A"||R=="\u671D"||R=="\u65E9"||R=="\u51CC"?(c=0,u==12&&(u=0)):(R=="\u4E0B"||R=="\u664F"||R=="\u665A")&&(c=1,u!=12&&(u+=12))}if(i.start.assign("hour",u),i.start.assign("minute",l),c>=0?i.start.assign("meridiem",c):u<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=LM.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let S=s.clone();if(i.end=e.createParsingComponents(),t[wu]){var a=t[wu];a=="\u660E"||a=="\u807D"?n.hour()>1&&S.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?S.add(-1,"day"):a=="\u524D"?S.add(-2,"day"):a=="\u5927\u524D"?S.add(-3,"day"):a=="\u5F8C"?S.add(2,"day"):a=="\u5927\u5F8C"&&S.add(3,"day"),i.end.assign("day",S.date()),i.end.assign("month",S.month()+1),i.end.assign("year",S.year())}else if(t[Su]){var o=t[Su];o=="\u660E"||o=="\u807D"?S.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?S.add(-1,"day"):o=="\u524D"?S.add(-2,"day"):o=="\u5927\u524D"?S.add(-3,"day"):o=="\u5F8C"?S.add(2,"day"):o=="\u5927\u5F8C"&&S.add(3,"day"),i.end.assign("day",S.date()),i.end.assign("month",S.month()+1),i.end.assign("year",S.year())}else i.end.imply("day",S.date()),i.end.imply("month",S.month()+1),i.end.imply("year",S.year());if(u=0,l=0,c=-1,t[os]){var d=parseInt(t[os]);if(isNaN(d)&&(d=ur.zhStringToNumber(t[os])),d>=60)return null;i.end.assign("second",d)}if(u=parseInt(t[Du]),isNaN(u)&&(u=ur.zhStringToNumber(t[Du])),t[or]?t[or]=="\u534A"?l=30:t[or]=="\u6B63"||t[or]=="\u6574"?l=0:(l=parseInt(t[or]),isNaN(l)&&(l=ur.zhStringToNumber(t[or]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[xu]){if(u>12)return null;var p=t[xu][0].toLowerCase();p=="a"&&(c=0,u==12&&(u=0)),p=="p"&&(c=1,u!=12&&(u+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[ku]){var m=t[ku],y=m[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[Eu]){var _=t[Eu],b=_[0];b=="\u4E0A"||b=="\u671D"||b=="\u65E9"||b=="\u51CC"?(c=0,u==12&&(u=0)):(b=="\u4E0B"||b=="\u664F"||b=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Ou]){var E=t[Ou],R=E[0];R=="\u4E0A"||R=="\u671D"||R=="\u65E9"||R=="\u51CC"?(c=0,u==12&&(u=0)):(R=="\u4E0B"||R=="\u664F"||R=="\u665A")&&(c=1,u!=12&&(u+=12))}return i.text=i.text+t[0],i.end.assign("hour",u),i.end.assign("minute",l),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>u?i.end.imply("meridiem",0):u>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var UM=$a&&$a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($a,"__esModule",{value:!0});var WM=UM(we()),qM=V(),CT=as(),$M=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(CT.WEEKDAY_OFFSET).join("|")+")"),Dp=class extends qM.AbstractParserWithWordBoundaryChecking{innerPattern(){return $M}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=CT.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=WM.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var jM=ja&&ja.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ja,"__esModule",{value:!0});var GM=jM(Gr()),xp=class extends GM.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};ja.default=xp});var NT=k(Ga=>{"use strict";var YM=Ga&&Ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ga,"__esModule",{value:!0});var BM=YM(cn()),Rp=class extends BM.default{patternBetween(){return/^\s*$/i}};Ga.default=Rp});var IT=k(Ye=>{"use strict";var gn=Ye&&Ye.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.createConfiguration=Ye.createCasualConfiguration=Ye.parseDate=Ye.parse=Ye.strict=Ye.casual=Ye.hant=void 0;var Mp=kr(),HM=gn(iu()),VM=dn(),zM=gn(kT()),KM=gn(ST()),QM=gn(DT()),XM=gn(RT()),ZM=gn(MT()),JM=gn(AT()),eC=gn(PT()),tC=gn(NT());Ye.hant=new Mp.Chrono(Cp());Ye.casual=new Mp.Chrono(Cp());Ye.strict=new Mp.Chrono(Ap());function rC(r,e,t){return Ye.casual.parse(r,e,t)}Ye.parse=rC;function nC(r,e,t){return Ye.casual.parseDate(r,e,t)}Ye.parseDate=nC;function Cp(){let r=Ap();return r.parsers.unshift(new zM.default),r}Ye.createCasualConfiguration=Cp;function Ap(){let r=VM.includeCommonConfiguration({parsers:[new KM.default,new XM.default,new JM.default,new ZM.default,new QM.default],refiners:[new eC.default,new tC.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof HM.default)),r}Ye.createConfiguration=Ap});var WT=k(Ya=>{"use strict";var iC=Ya&&Ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ya,"__esModule",{value:!0});var sC=iC(we()),aC=V(),oC=1,FT=2,uC=3,LT=4,UT=5,lC=6,Pp=class extends aC.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=sC.default(e.refDate),a=s;if(t[oC])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[FT]){let o=t[FT],u=t[uC];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[LT]){let u=t[LT][0];u=="\u65E9"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[UT]){let o=t[UT];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[lC];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Ya.default=Pp});var us=k(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.zhStringToYear=At.zhStringToNumber=At.WEEKDAY_OFFSET=At.NUMBER=void 0;At.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};At.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function cC(r){let e=0;for(let t=0;t{"use strict";var fC=Ba&&Ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ba,"__esModule",{value:!0});var pC=fC(we()),mC=V(),yi=us(),Np=1,qT=2,Ip=3,Fp=class extends mC.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(yi.NUMBER).join("")+"]{4}|["+Object.keys(yi.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(yi.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(yi.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=pC.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[qT]);if(isNaN(s)&&(s=yi.zhStringToNumber(t[qT])),i.start.assign("month",s),t[Ip]){let a=parseInt(t[Ip]);isNaN(a)&&(a=yi.zhStringToNumber(t[Ip])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[Np]){let a=parseInt(t[Np]);isNaN(a)&&(a=yi.zhStringToYear(t[Np])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Ba.default=Fp});var GT=k(Ha=>{"use strict";var hC=Ha&&Ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ha,"__esModule",{value:!0});var gC=hC(we()),yC=V(),jT=us(),bC=new RegExp("(\\d+|["+Object.keys(jT.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),Lp=1,TC=2,Up=class extends yC.AbstractParserWithWordBoundaryChecking{innerPattern(){return bC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Lp]);if(isNaN(i)&&(i=jT.zhStringToNumber(t[Lp])),isNaN(i)){let u=t[Lp];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=gC.default(e.refDate),o=t[TC][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u793C"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Ha.default=Up});var BT=k(Va=>{"use strict";var _C=Va&&Va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Va,"__esModule",{value:!0});var vC=_C(we()),wC=V(),YT=us(),kC=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(YT.WEEKDAY_OFFSET).join("|")+")"),Wp=class extends wC.AbstractParserWithWordBoundaryChecking{innerPattern(){return kC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=YT.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=vC.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var EC=za&&za.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(za,"__esModule",{value:!0});var SC=EC(we()),OC=V(),cr=us(),DC=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(cr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(cr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(cr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),xC=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(cr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(cr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(cr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Ru=1,Mu=2,Cu=3,Au=4,Pu=5,Nu=6,lr=7,ls=8,Iu=9,qp=class extends OC.AbstractParserWithWordBoundaryChecking{innerPattern(){return DC}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=SC.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[Ru]){let c=t[Ru];c=="\u660E"?n.hour()>1&&s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[Au]){let c=t[Au];c=="\u660E"?s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let a=0,o=0,u=-1;if(t[ls]){let c=parseInt(t[ls]);if(isNaN(c)&&(c=cr.zhStringToNumber(t[ls])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[Nu]),isNaN(a)&&(a=cr.zhStringToNumber(t[Nu])),t[lr]?t[lr]=="\u534A"?o=30:t[lr]=="\u6B63"||t[lr]=="\u6574"?o=0:(o=parseInt(t[lr]),isNaN(o)&&(o=cr.zhStringToNumber(t[lr]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Iu]){if(a>12)return null;let c=t[Iu][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[Mu]){let d=t[Mu][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[Cu]){let d=t[Cu][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Pu]){let d=t[Pu][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),u>=0?i.start.assign("meridiem",u):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=xC.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let l=s.clone();if(i.end=e.createParsingComponents(),t[Ru]){let c=t[Ru];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else if(t[Au]){let c=t[Au];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else i.end.imply("day",l.date()),i.end.imply("month",l.month()+1),i.end.imply("year",l.year());if(a=0,o=0,u=-1,t[ls]){let c=parseInt(t[ls]);if(isNaN(c)&&(c=cr.zhStringToNumber(t[ls])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[Nu]),isNaN(a)&&(a=cr.zhStringToNumber(t[Nu])),t[lr]?t[lr]=="\u534A"?o=30:t[lr]=="\u6B63"||t[lr]=="\u6574"?o=0:(o=parseInt(t[lr]),isNaN(o)&&(o=cr.zhStringToNumber(t[lr]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Iu]){if(a>12)return null;let c=t[Iu][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(u==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[Mu]){let d=t[Mu][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[Cu]){let d=t[Cu][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Pu]){let d=t[Pu][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}return i.text=i.text+t[0],i.end.assign("hour",a),i.end.assign("minute",o),u>=0?i.end.assign("meridiem",u):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var RC=Ka&&Ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ka,"__esModule",{value:!0});var MC=RC(we()),CC=V(),VT=us(),AC=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(VT.WEEKDAY_OFFSET).join("|")+")"),$p=class extends CC.AbstractParserWithWordBoundaryChecking{innerPattern(){return AC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=VT.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=MC.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var PC=Qa&&Qa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qa,"__esModule",{value:!0});var NC=PC(Gr()),jp=class extends NC.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Qa.default=jp});var QT=k(Xa=>{"use strict";var IC=Xa&&Xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xa,"__esModule",{value:!0});var FC=IC(cn()),Gp=class extends FC.default{patternBetween(){return/^\s*$/i}};Xa.default=Gp});var XT=k(Be=>{"use strict";var yn=Be&&Be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Be,"__esModule",{value:!0});Be.createConfiguration=Be.createCasualConfiguration=Be.parseDate=Be.parse=Be.strict=Be.casual=Be.hans=void 0;var Yp=kr(),LC=yn(iu()),UC=dn(),WC=yn(WT()),qC=yn($T()),$C=yn(GT()),jC=yn(BT()),GC=yn(HT()),YC=yn(zT()),BC=yn(KT()),HC=yn(QT());Be.hans=new Yp.Chrono(Bp());Be.casual=new Yp.Chrono(Bp());Be.strict=new Yp.Chrono(Hp());function VC(r,e,t){return Be.casual.parse(r,e,t)}Be.parse=VC;function zC(r,e,t){return Be.casual.parseDate(r,e,t)}Be.parseDate=zC;function Bp(){let r=Hp();return r.parsers.unshift(new WC.default),r}Be.createCasualConfiguration=Bp;function Hp(){let r=UC.includeCommonConfiguration({parsers:[new qC.default,new jC.default,new YC.default,new GC.default,new $C.default],refiners:[new BC.default,new HC.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof LC.default)),r}Be.createConfiguration=Hp});var JT=k(Yt=>{"use strict";var ZT=Yt&&Yt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),KC=Yt&&Yt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),QC=Yt&&Yt.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&ZT(e,r,t)},XC=Yt&&Yt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&ZT(e,r,t);return KC(e,r),e};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.hans=void 0;QC(IT(),Yt);Yt.hans=XC(XT())});var Pt=k(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.parseTimeUnits=se.TIME_UNITS_PATTERN=se.parseYear=se.YEAR_PATTERN=se.parseOrdinalNumberPattern=se.ORDINAL_NUMBER_PATTERN=se.parseNumberPattern=se.NUMBER_PATTERN=se.TIME_UNIT_DICTIONARY=se.ORDINAL_WORD_DICTIONARY=se.INTEGER_WORD_DICTIONARY=se.MONTH_DICTIONARY=se.FULL_MONTH_NAME_DICTIONARY=se.WEEKDAY_DICTIONARY=se.REGEX_PARTS=void 0;var Fu=Re(),ZC=ot();se.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};se.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};se.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};se.MONTH_DICTIONARY=Object.assign(Object.assign({},se.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});se.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};se.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};se.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};se.NUMBER_PATTERN=`(?:${Fu.matchAnyPattern(se.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function t_(r){let e=r.toLowerCase();return se.INTEGER_WORD_DICTIONARY[e]!==void 0?se.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}se.parseNumberPattern=t_;se.ORDINAL_NUMBER_PATTERN=`(?:${Fu.matchAnyPattern(se.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function JC(r){let e=r.toLowerCase();return se.ORDINAL_WORD_DICTIONARY[e]!==void 0?se.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}se.parseOrdinalNumberPattern=JC;var Vp="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";se.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${Vp}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${Vp}|[5-9][0-9]${Vp})`;function eA(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return ZC.findMostLikelyADYear(e)}se.parseYear=eA;var r_=`(${se.NUMBER_PATTERN})\\s{0,3}(${Fu.matchAnyPattern(se.TIME_UNIT_DICTIONARY)})`,e_=new RegExp(r_,"i");se.TIME_UNITS_PATTERN=Fu.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",r_);function tA(r){let e={},t=r,n=e_.exec(t);for(;n;)rA(e,n),t=t.substring(n[0].length).trim(),n=e_.exec(t);return e}se.parseTimeUnits=tA;function rA(r,e){let t=t_(e[1]),n=se.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var i_=k(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});var Za=Pt(),nA=We(),iA=V(),n_=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Za.TIME_UNITS_PATTERN})${Za.REGEX_PARTS.rightBoundary}`,sA=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${n_}`,Za.REGEX_PARTS.flags),aA=new RegExp(n_,"i"),zp=class extends iA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Za.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?aA:sA}innerExtract(e,t){let n=Za.parseTimeUnits(t[1]);return nA.ParsingComponents.createRelativeFromReference(e.reference,n)}};Kp.default=zp});var l_=k(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0});var oA=ot(),Ja=Pt(),u_=Pt(),Lu=Pt(),uA=Re(),lA=V(),cA=new RegExp(`(?:\u0441)?\\s*(${Lu.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Lu.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${uA.matchAnyPattern(Ja.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${u_.YEAR_PATTERN}(?![^\\s]\\d)))?${Ja.REGEX_PARTS.rightBoundary}`,Ja.REGEX_PARTS.flags),s_=1,a_=2,dA=3,o_=4,Qp=class extends lA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ja.REGEX_PARTS.leftBoundary}innerPattern(){return cA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Ja.MONTH_DICTIONARY[t[dA].toLowerCase()],s=Lu.parseOrdinalNumberPattern(t[s_]);if(s>31)return t.index=t.index+t[s_].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[o_]){let a=u_.parseYear(t[o_]);n.start.assign("year",a)}else{let a=oA.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[a_]){let a=Lu.parseOrdinalNumberPattern(t[a_]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Xp.default=Qp});var f_=k(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});var eo=Pt(),fA=ot(),pA=Re(),d_=Pt(),mA=V(),hA=new RegExp(`((?:\u0432)\\s*)?(${pA.matchAnyPattern(eo.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${d_.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,eo.REGEX_PARTS.flags),gA=2,c_=3,Zp=class extends mA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return eo.REGEX_PARTS.leftBoundary}innerPattern(){return hA}innerExtract(e,t){let n=t[gA].toLowerCase();if(t[0].length<=3&&!eo.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index,t.index+t[0].length);i.start.imply("day",1);let s=eo.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[c_]){let a=d_.parseYear(t[c_]);i.start.assign("year",a)}else{let a=fA.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Jp.default=Zp});var m_=k(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var Uu=ze(),yA=ci(),p_=Pt(),em=class extends yA.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return p_.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${p_.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Uu.Meridiem.PM)):i<6&&n.assign("meridiem",Uu.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Uu.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Uu.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};tm.default=em});var h_=k(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});var Wu=Pt(),bA=We(),TA=V(),_A=sr(),vA=new RegExp(`(${Wu.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Wu.REGEX_PARTS.flags),rm=class extends TA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Wu.REGEX_PARTS.leftBoundary}innerPattern(){return vA}innerExtract(e,t){let n=Wu.parseTimeUnits(t[1]),i=_A.reverseTimeUnits(n);return bA.ParsingComponents.createRelativeFromReference(e.reference,i)}};nm.default=rm});var g_=k(to=>{"use strict";var wA=to&&to.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(to,"__esModule",{value:!0});var kA=wA(Gr()),im=class extends kA.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};to.default=im});var y_=k(ro=>{"use strict";var EA=ro&&ro.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ro,"__esModule",{value:!0});var SA=EA(cn()),sm=class extends SA.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};ro.default=sm});var b_=k(bn=>{"use strict";var OA=bn&&bn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),DA=bn&&bn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),xA=bn&&bn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&OA(e,r,t);return DA(e,r),e};Object.defineProperty(bn,"__esModule",{value:!0});var RA=V(),no=xA(pn()),am=Pt(),MA=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${am.REGEX_PARTS.rightBoundary}`,am.REGEX_PARTS.flags),om=class extends RA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return am.REGEX_PARTS.leftBoundary}innerPattern(e){return MA}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return no.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return no.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return no.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return no.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return no.theDayBefore(e.reference,2)}return i}};bn.default=om});var T_=k(xr=>{"use strict";var CA=xr&&xr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),AA=xr&&xr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),PA=xr&&xr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&CA(e,r,t);return AA(e,r),e},NA=xr&&xr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xr,"__esModule",{value:!0});var IA=V(),bi=PA(pn()),FA=ir(),LA=NA(we()),um=Pt(),UA=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${um.REGEX_PARTS.rightBoundary}`,um.REGEX_PARTS.flags),lm=class extends IA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return um.REGEX_PARTS.leftBoundary}innerPattern(){return UA}innerExtract(e,t){let n=LA.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return bi.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return bi.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return bi.morning(e.reference);if(i.match(/в\s*полдень/))return bi.noon(e.reference);if(i.match(/прошлой\s*ночью/))return bi.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return bi.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),FA.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?bi.midnight(e.reference):s}};xr.default=lm});var __=k(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var io=Pt(),WA=Re(),qA=V(),$A=fi(),jA=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${WA.matchAnyPattern(io.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${io.REGEX_PARTS.rightBoundary}`,io.REGEX_PARTS.flags),GA=1,YA=2,BA=3,cm=class extends qA.AbstractParserWithWordBoundaryChecking{innerPattern(){return jA}patternLeftBoundary(){return io.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[YA].toLowerCase(),i=io.WEEKDAY_DICTIONARY[n],s=t[GA],a=t[BA],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=$A.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};dm.default=cm});var w_=k(ao=>{"use strict";var HA=ao&&ao.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ao,"__esModule",{value:!0});var so=Pt(),v_=We(),VA=HA(we()),zA=V(),KA=Re(),QA=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${KA.matchAnyPattern(so.TIME_UNIT_DICTIONARY)})(?=\\s*)${so.REGEX_PARTS.rightBoundary}`,so.REGEX_PARTS.flags),XA=1,ZA=2,fm=class extends zA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return so.REGEX_PARTS.leftBoundary}innerPattern(){return QA}innerExtract(e,t){let n=t[XA].toLowerCase(),i=t[ZA].toLowerCase(),s=so.TIME_UNIT_DICTIONARY[i];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[s]=1,v_.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[s]=-1,v_.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=VA.default(e.reference.instant);return s.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())):s.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)):s.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}};ao.default=fm});var k_=k(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var oo=Pt(),JA=We(),eP=V(),tP=sr(),rP=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${oo.TIME_UNITS_PATTERN})${oo.REGEX_PARTS.rightBoundary}`,oo.REGEX_PARTS.flags),pm=class extends eP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return oo.REGEX_PARTS.leftBoundary}innerPattern(){return rP}innerExtract(e,t){let n=t[1].toLowerCase(),i=oo.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=tP.reverseTimeUnits(i);break}return JA.ParsingComponents.createRelativeFromReference(e.reference,i)}};mm.default=pm});var O_=k(nt=>{"use strict";var Bt=nt&&nt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nt,"__esModule",{value:!0});nt.createConfiguration=nt.createCasualConfiguration=nt.parseDate=nt.parse=nt.strict=nt.casual=void 0;var nP=Bt(i_()),iP=Bt(l_()),sP=Bt(f_()),aP=Bt(m_()),oP=Bt(h_()),uP=Bt(g_()),lP=Bt(y_()),cP=dn(),dP=Bt(b_()),fP=Bt(T_()),pP=Bt(__()),mP=Bt(w_()),E_=kr(),hP=Bt(pi()),gP=Bt(k_());nt.casual=new E_.Chrono(S_());nt.strict=new E_.Chrono(hm(!0));function yP(r,e,t){return nt.casual.parse(r,e,t)}nt.parse=yP;function bP(r,e,t){return nt.casual.parseDate(r,e,t)}nt.parseDate=bP;function S_(){let r=hm(!1);return r.parsers.unshift(new dP.default),r.parsers.unshift(new fP.default),r.parsers.unshift(new sP.default),r.parsers.unshift(new mP.default),r.parsers.unshift(new gP.default),r}nt.createCasualConfiguration=S_;function hm(r=!0){return cP.includeCommonConfiguration({parsers:[new hP.default(!0),new nP.default,new iP.default,new pP.default,new aP.default(r),new oP.default],refiners:[new lP.default,new uP.default]},r)}nt.createConfiguration=hm});var ze=k(pe=>{"use strict";var TP=pe&&pe.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),_P=pe&&pe.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Gn=pe&&pe.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&TP(e,r,t);return _P(e,r),e};Object.defineProperty(pe,"__esModule",{value:!0});pe.parseDate=pe.parse=pe.casual=pe.strict=pe.ru=pe.zh=pe.nl=pe.pt=pe.ja=pe.fr=pe.de=pe.Meridiem=pe.Chrono=pe.en=void 0;var gm=Gn(Ad());pe.en=gm;var vP=kr();Object.defineProperty(pe,"Chrono",{enumerable:!0,get:function(){return vP.Chrono}});var wP;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(wP=pe.Meridiem||(pe.Meridiem={}));var kP=Gn(Iy());pe.de=kP;var EP=Gn(cb());pe.fr=EP;var SP=Gn(Tb());pe.ja=SP;var OP=Gn(Ib());pe.pt=OP;var DP=Gn(TT());pe.nl=DP;var xP=Gn(JT());pe.zh=xP;var RP=Gn(O_());pe.ru=RP;pe.strict=gm.strict;pe.casual=gm.casual;function MP(r,e,t){return pe.casual.parse(r,e,t)}pe.parse=MP;function CP(r,e,t){return pe.casual.parseDate(r,e,t)}pe.parseDate=CP});var Mv=k((xv,Rv)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(h){return Object.prototype.toString.call(h)==="[object Array]"},n=10,i=typeof process=="object"&&typeof process.nextTick=="function",s=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",u=o?setImmediate:setTimeout,l=s?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(f){var h=Object.getOwnPropertyNames(f);return h.push.apply(h,Object.getOwnPropertySymbols(f)),h}:Object.keys;function c(){this._events={},this._conf&&d.call(this,this._conf)}function d(f){f&&(this._conf=f,f.delimiter&&(this.delimiter=f.delimiter),f.maxListeners!==r&&(this._maxListeners=f.maxListeners),f.wildcard&&(this.wildcard=f.wildcard),f.newListener&&(this._newListener=f.newListener),f.removeListener&&(this._removeListener=f.removeListener),f.verboseMemoryLeak&&(this.verboseMemoryLeak=f.verboseMemoryLeak),f.ignoreErrors&&(this.ignoreErrors=f.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function p(f,h){var g="(node) warning: possible EventEmitter memory leak detected. "+f+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(g+=" Event name: "+h+"."),typeof process!="undefined"&&process.emitWarning){var T=new Error(g);T.name="MaxListenersExceededWarning",T.emitter=this,T.count=f,process.emitWarning(T)}else console.error(g),console.trace&&console.trace()}var m=function(f,h,g){var T=arguments.length;switch(T){case 0:return[];case 1:return[f];case 2:return[f,h];case 3:return[f,h,g];default:for(var w=new Array(T);T--;)w[T]=arguments[T];return w}};function y(f,h){for(var g={},T,w=f.length,O=h?h.length:0,M=0;M0;)f=O[v],M.call(A,f,g[f]);this._listeners={},this._listenersCount=0,x()}}});function b(f,h,g,T){var w=Object.assign({},h);if(!f)return w;if(typeof f!="object")throw TypeError("options must be an object");var O=Object.keys(f),M=O.length,A,v,x;function N(le){throw Error('Invalid "'+A+'" option value'+(le?". Reason: "+le:""))}for(var re=0;re0;)if(A===f[v])return O;M(h)}}var S=R(["function"]),F=R(["object","function"]);function q(f,h,g){var T,w,O=0,M,A=new f(function(v,x,N){g=b(g,{timeout:0,overload:!1},{timeout:function(Ne,Ce){return Ne*=1,(typeof Ne!="number"||Ne<0||!Number.isFinite(Ne))&&Ce("timeout must be a positive number"),Ne}}),T=!g.overload&&typeof f.prototype.cancel=="function"&&typeof N=="function";function re(){w&&(w=null),O&&(clearTimeout(O),O=0)}var le=function(Ne){re(),v(Ne)},fe=function(Ne){re(),x(Ne)};T?h(le,fe,N):(w=[function(Ne){fe(Ne||Error("canceled"))}],h(le,fe,function(Ne){if(M)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Ne!="function")throw TypeError("onCancel callback must be a function");w.push(Ne)}),M=!0),g.timeout>0&&(O=setTimeout(function(){var Ne=Error("timeout");Ne.code="ETIMEDOUT",O=0,A.cancel(Ne),x(Ne)},g.timeout))});return T||(A.cancel=function(v){if(!!w){for(var x=w.length,N=1;N0;)fe=jt[A],fe!=="_listeners"&&(Qe=G(f,h,g[fe],T+1,w),Qe&&(le?le.push.apply(le,Qe):le=Qe));return le}else if(Wr==="**"){for(an=T+1===w||T+2===w&&Y==="*",an&&g._listeners&&(le=G(f,h,g,w,w)),jt=l(g),A=jt.length;A-- >0;)fe=jt[A],fe!=="_listeners"&&(fe==="*"||fe==="**"?(g[fe]._listeners&&!an&&(Qe=G(f,h,g[fe],w,w),Qe&&(le?le.push.apply(le,Qe):le=Qe)),Qe=G(f,h,g[fe],T,w)):fe===Y?Qe=G(f,h,g[fe],T+2,w):Qe=G(f,h,g[fe],T,w),Qe&&(le?le.push.apply(le,Qe):le=Qe));return le}else g[Wr]&&(le=G(f,h,g[Wr],T+1,w));if(Ne=g["*"],Ne&&G(f,h,Ne,T+1,w),Ce=g["**"],Ce)if(T0;)fe=jt[A],fe!=="_listeners"&&(fe===Y?G(f,h,Ce[fe],T+2,w):fe===Wr?G(f,h,Ce[fe],T+1,w):(Mt={},Mt[fe]=Ce[fe],G(f,h,{"**":Mt},T+1,w)));else Ce._listeners?G(f,h,Ce,w,w):Ce["*"]&&Ce["*"]._listeners&&G(f,h,Ce["*"],w,w);return le}function H(f,h,g){var T=0,w=0,O,M=this.delimiter,A=M.length,v;if(typeof f=="string")if((O=f.indexOf(M))!==-1){v=new Array(5);do v[T++]=f.slice(w,O),w=O+A;while((O=f.indexOf(M,w))!==-1);v[T++]=f.slice(w)}else v=[f],T=1;else v=f,T=f.length;if(T>1){for(O=0;O+10&&x._listeners.length>this._maxListeners&&(x._listeners.warned=!0,p.call(this,x._listeners.length,N))):x._listeners=h,!0;return!0}function be(f,h,g,T){for(var w=l(f),O=w.length,M,A,v,x=f._listeners,N;O-- >0;)A=w[O],M=f[A],A==="_listeners"?v=g:v=g?g.concat(A):[A],N=T||typeof A=="symbol",x&&h.push(N?v:v.join(this.delimiter)),typeof M=="object"&&be.call(this,M,h,v,N);return h}function Pe(f){for(var h=l(f),g=h.length,T,w,O;g-- >0;)w=h[g],T=f[w],T&&(O=!0,w!=="_listeners"&&!Pe(T)&&delete f[w]);return O}function j(f,h,g){this.emitter=f,this.event=h,this.listener=g}j.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function $(f,h,g){if(g===!0)w=!0;else if(g===!1)T=!0;else{if(!g||typeof g!="object")throw TypeError("options should be an object or true");var T=g.async,w=g.promisify,O=g.nextTick,M=g.objectify}if(T||O||w){var A=h,v=h._origin||h;if(O&&!i)throw Error("process.nextTick is not supported");w===r&&(w=h.constructor.name==="AsyncFunction"),h=function(){var x=arguments,N=this,re=this.event;return w?O?Promise.resolve():new Promise(function(le){u(le)}).then(function(){return N.event=re,A.apply(N,x)}):(O?process.nextTick:u)(function(){N.event=re,A.apply(N,x)})},h._async=!0,h._origin=v}return[h,M?new j(this,f,h):this]}function D(f){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,d.call(this,f)}D.EventEmitter2=D,D.prototype.listenTo=function(f,h,g){if(typeof f!="object")throw TypeError("target musts be an object");var T=this;g=b(g,{on:r,off:r,reducers:r},{on:S,off:S,reducers:F});function w(O){if(typeof O!="object")throw TypeError("events must be an object");var M=g.reducers,A=te.call(T,f),v;A===-1?v=new _(T,f,g):v=T._observers[A];for(var x=l(O),N=x.length,re,le=typeof M=="function",fe=0;fe0;)w=g[T],(!f||w._target===f)&&(w.unsubscribe(h),O=!0);return O},D.prototype.delimiter=".",D.prototype.setMaxListeners=function(f){f!==r&&(this._maxListeners=f,this._conf||(this._conf={}),this._conf.maxListeners=f)},D.prototype.getMaxListeners=function(){return this._maxListeners},D.prototype.event="",D.prototype.once=function(f,h,g){return this._once(f,h,!1,g)},D.prototype.prependOnceListener=function(f,h,g){return this._once(f,h,!0,g)},D.prototype._once=function(f,h,g,T){return this._many(f,1,h,g,T)},D.prototype.many=function(f,h,g,T){return this._many(f,h,g,!1,T)},D.prototype.prependMany=function(f,h,g,T){return this._many(f,h,g,!0,T)},D.prototype._many=function(f,h,g,T,w){var O=this;if(typeof g!="function")throw new Error("many only accepts instances of Function");function M(){return--h===0&&O.off(f,M),g.apply(this,arguments)}return M._origin=g,this._on(f,M,T,w)},D.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var f=arguments[0],h,g=this.wildcard,T,w,O,M,A;if(f==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(g&&(h=f,f!=="newListener"&&f!=="removeListener"&&typeof f=="object")){if(w=f.length,s){for(O=0;O3)for(T=new Array(v-1),M=1;M3)for(w=new Array(x-1),A=1;A0&&this._events[f].length>this._maxListeners&&(this._events[f].warned=!0,p.call(this,this._events[f].length,f))):this._events[f]=h,w)},D.prototype.off=function(f,h){if(typeof h!="function")throw new Error("removeListener only takes instances of Function");var g,T=[];if(this.wildcard){var w=typeof f=="string"?f.split(this.delimiter):f.slice();if(T=G.call(this,null,w,this.listenerTree,0),!T)return this}else{if(!this._events[f])return this;g=this._events[f],T.push({_listeners:g})}for(var O=0;O0){for(T=this._all,h=0,g=T.length;h0;)T=h[g[O]],typeof T=="function"?w.push(T):w.push.apply(w,T);return w}else{if(this.wildcard){if(M=this.listenerTree,!M)return[];var A=[],v=typeof f=="string"?f.split(this.delimiter):f.slice();return G.call(this,A,v,M,0),A}return h?(T=h[f],T?typeof T=="function"?[T]:T:[]):[]}},D.prototype.eventNames=function(f){var h=this._events;return this.wildcard?be.call(this,this.listenerTree,[],null,f):h?l(h):[]},D.prototype.listenerCount=function(f){return this.listeners(f).length},D.prototype.hasListeners=function(f){if(this.wildcard){var h=[],g=typeof f=="string"?f.split(this.delimiter):f.slice();return G.call(this,h,g,this.listenerTree,0),h.length>0}var T=this._events,w=this._all;return!!(w&&w.length||T&&(f===r?l(T).length:T[f]))},D.prototype.listenersAny=function(){return this._all?this._all:[]},D.prototype.waitFor=function(f,h){var g=this,T=typeof h;return T==="number"?h={timeout:h}:T==="function"&&(h={filter:h}),h=b(h,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:S,Promise:E}),q(h.Promise,function(w,O,M){function A(){var v=h.filter;if(!(v&&!v.apply(g,arguments)))if(g.off(f,A),h.handleError){var x=arguments[0];x?O(x):w(m.apply(null,arguments).slice(1))}else w(m.apply(null,arguments))}M(function(){g.off(f,A)}),g._on(f,A,!1)},{timeout:h.timeout,overload:h.overload})};function B(f,h,g){g=b(g,{Promise,timeout:0,overload:!1},{Promise:E});var T=g.Promise;return q(T,function(w,O,M){var A;if(typeof f.addEventListener=="function"){A=function(){w(m.apply(null,arguments))},M(function(){f.removeEventListener(h,A)}),f.addEventListener(h,A,{once:!0});return}var v=function(){x&&f.removeListener("error",x),w(m.apply(null,arguments))},x;h!=="error"&&(x=function(N){f.removeListener(h,v),O(N)},f.once("error",x)),M(function(){x&&f.removeListener("error",x),f.removeListener(h,v)}),f.once(h,v)},{timeout:g.timeout,overload:g.overload})}var I=D.prototype;if(Object.defineProperties(D,{defaultMaxListeners:{get:function(){return I._maxListeners},set:function(f){if(typeof f!="number"||f<0||Number.isNaN(f))throw TypeError("n must be a non-negative number");I._maxListeners=f},enumerable:!0},once:{value:B,writable:!0,configurable:!0}}),Object.defineProperties(I,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return D});else if(typeof xv=="object")Rv.exports=D;else{var Z=new Function("","return this")();Z.EventEmitter2=D}})()});var Lw=k(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});var Iw=Symbol("MustacheDataPath");function Nw({target:r,propertyName:e}){return[...r[Iw]||[],e]}function Fw(r,e){return typeof r!="object"?r:new Proxy(r,{get(t,n){let i=t[n];if(i===void 0&&!(n in t)){let s=Nw({target:t,propertyName:n});if(e!=null&&e.handleError)return e.handleError(s),i;throw Error(`Missing Mustache data property: ${s.join(" > ")}`)}return i&&typeof i=="object"?(i[Iw]=Nw({target:t,propertyName:n}),Fw(i,e)):i}})}ph.default=Fw});var tn=k(Fr=>{"use strict";Fr.__esModule=!0;Fr.Tokens=Fr.StructuralCharacters=Fr.Operators=void 0;var oF;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(oF=Fr.Operators||(Fr.Operators={}));var uF;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(uF=Fr.StructuralCharacters||(Fr.StructuralCharacters={}));var lF;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(lF=Fr.Tokens||(Fr.Tokens={}))});var _h=k(Us=>{"use strict";Us.__esModule=!0;Us.VALID_TOKENS=Us.OPERATOR_PRECEDENCE=void 0;var qe=tn();Us.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};Us.VALID_TOKENS={identifierOnly:[{name:qe.Tokens.IDENTIFIER},{name:qe.Tokens.STRUCTURAL_CHARACTER,value:qe.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:qe.Tokens.IDENTIFIER},{name:qe.Tokens.STRUCTURAL_CHARACTER,value:qe.StructuralCharacters.OPEN_PARENTHESIS},{name:qe.Tokens.OPERATOR,value:qe.Operators.NOT}],binaryOperator:[{name:qe.Tokens.OPERATOR,value:qe.Operators.AND},{name:qe.Tokens.OPERATOR,value:qe.Operators.OR},{name:qe.Tokens.OPERATOR,value:qe.Operators.XOR}],binaryOperatorOrClose:[{name:qe.Tokens.OPERATOR,value:qe.Operators.AND},{name:qe.Tokens.OPERATOR,value:qe.Operators.OR},{name:qe.Tokens.OPERATOR,value:qe.Operators.XOR},{name:qe.Tokens.STRUCTURAL_CHARACTER,value:qe.StructuralCharacters.CLOSE_PARENTHESIS}]}});var vh=k(Tt=>{"use strict";Tt.__esModule=!0;Tt.ESCAPE_CHARACTER=Tt.EOL=Tt.COMMENT_DELIMITER=Tt.QUOTED_IDENTIFIER_DELIMITER=Tt.SEPARATORS=Tt.OPERATORS=Tt.STRUCTURAL_CHARACTERS=void 0;var Ws=tn();Tt.STRUCTURAL_CHARACTERS={"(":Ws.StructuralCharacters.OPEN_PARENTHESIS,")":Ws.StructuralCharacters.CLOSE_PARENTHESIS};Tt.OPERATORS={AND:Ws.Operators.AND,OR:Ws.Operators.OR,XOR:Ws.Operators.XOR,NOT:Ws.Operators.NOT};Tt.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));Tt.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);Tt.COMMENT_DELIMITER=String.fromCodePoint(35);Tt.EOL=String.fromCodePoint(10);Tt.ESCAPE_CHARACTER=String.fromCodePoint(92)});var Gw=k(_r=>{"use strict";var wh=_r&&_r.__assign||function(){return wh=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";Nl.__esModule=!0;Nl.lex=void 0;var qs=tn(),Jt=vh(),$s=Gw(),pF=function(r){for(var e=null,t=null,n=null,i=0;i{"use strict";var Bw=er&&er.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";var rn=Gs&&Gs.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";_t.__esModule=!0;_t.throwInvalidExpression=_t.isOperator=_t.isIdentifier=_t.notUtil=_t.xorUtil=_t.orUtil=_t.andUtil=void 0;var Kw=tn(),_F=function(r,e){return r&&e};_t.andUtil=_F;var vF=function(r,e){return r||e};_t.orUtil=vF;var wF=function(r,e){return r!==e};_t.xorUtil=wF;var kF=function(r){return!r};_t.notUtil=kF;var EF=function(r){var e=r.name,t=r.value;return e===Kw.Tokens.IDENTIFIER&&typeof t=="string"};_t.isIdentifier=EF;var SF=function(r){var e=r.name,t=r.value;return e===Kw.Tokens.OPERATOR&&typeof t=="string"};_t.isOperator=SF;var OF=function(r){throw new TypeError("Invalid postfix expression: ".concat(r))};_t.throwInvalidExpression=OF});var Qw=k(Ll=>{"use strict";var Fo;Ll.__esModule=!0;Ll.OPERATOR_MAP=void 0;var Oh=tn(),Dh=Sh();Ll.OPERATOR_MAP=(Fo={},Fo[Oh.Operators.AND]=Dh.andUtil,Fo[Oh.Operators.OR]=Dh.orUtil,Fo[Oh.Operators.XOR]=Dh.xorUtil,Fo)});var Zw=k(vr=>{"use strict";var Ys=vr&&vr.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";var xh=nn&&nn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]});nn.__esModule=!0;nn.parse=nn.evaluate=nn.getEvaluator=void 0;var Jw=Zw();xh(nn,Jw,"getEvaluator");xh(nn,Jw,"evaluate");var AF=Eh();xh(nn,AF,"parse")});var XF={};cE(XF,{default:()=>fc});module.exports=dE(XF);var Gk=require("obsidian");var bs=require("obsidian");var JF=new Error("timeout while waiting for mutex to become available"),eL=new Error("mutex already locked"),fE=new Error("request for lock canceled"),pE=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Oc=class{constructor(e,t=fE){this._value=e,this._cancelError=t,this._weightedQueues=[],this._weightedWaiters=[]}acquire(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((t,n)=>{this._weightedQueues[e-1]||(this._weightedQueues[e-1]=[]),this._weightedQueues[e-1].push({resolve:t,reject:n}),this._dispatch()})}runExclusive(e,t=1){return pE(this,void 0,void 0,function*(){let[n,i]=yield this.acquire(t);try{return yield e(n)}finally{i()}})}waitForUnlock(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),this._weightedWaiters[e-1].push(t),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatch()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatch()}cancel(){this._weightedQueues.forEach(e=>e.forEach(t=>t.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var e;for(let t=this._value;t>0;t--){let n=(e=this._weightedQueues[t-1])===null||e===void 0?void 0:e.shift();if(!n)continue;let i=this._value,s=t;this._value-=t,t=this._value+1,n.resolve([i,this._newReleaser(s)])}this._drainUnlockWaiters()}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){for(let e=this._value;e>0;e--)!this._weightedWaiters[e-1]||(this._weightedWaiters[e-1].forEach(t=>t()),this._weightedWaiters[e-1]=[])}},mE=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Vo=class{constructor(e){this._semaphore=new Oc(1,e)}acquire(){return mE(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var zo=require("obsidian"),at=class{constructor(e,t={}){this._frontmatter={tags:[]};this._tags=[];var i,s;this._path=e,this._cachedMetadata=t;let n=t.frontmatter;if(n!==void 0&&(this._frontmatter=JSON.parse(JSON.stringify(n)),this._frontmatter.tags=(i=(0,zo.parseFrontMatterTags)(n))!=null?i:[]),Object.keys(t).length!==0){let a=(s=(0,zo.getAllTags)(this.cachedMetadata))!=null?s:[];this._tags=[...new Set(a)]}}get path(){return this._path}get tags(){return this._tags}get cachedMetadata(){return this._cachedMetadata}get frontmatter(){return this._frontmatter}rawFrontmatterIdenticalTo(e){let t=this.cachedMetadata.frontmatter,n=e.cachedMetadata.frontmatter;return t===n?!0:!t||!n?!1:JSON.stringify(t)===JSON.stringify(n)}get pathWithoutExtension(){return this.withoutExtension(this.path)}withoutExtension(e){return e.replace(/\.md$/,"")}get root(){let e=this.path.replace(/\\/g,"/");e.charAt(0)==="/"&&(e=e.substring(1));let t=e.indexOf("/");return t==-1?"/":e.substring(0,t+1)}get folder(){let e=this.path,t=this.filename,n=e.substring(0,e.lastIndexOf(t));return n===""?"/":n}get filename(){let e=this.path.match(/([^/]+)$/);return e!==null?e[1]:""}get filenameWithoutExtension(){return this.withoutExtension(this.filename)}hasProperty(e){let t=this.findKeyInFrontmatter(e);if(t===void 0)return!1;let n=this.frontmatter[t];return!(n===null||n===void 0)}property(e){let t=this.findKeyInFrontmatter(e);if(t===void 0)return null;let n=this.frontmatter[t];return n===void 0?null:Array.isArray(n)?n.filter(i=>i!==null):n}findKeyInFrontmatter(e){let t=e.toLowerCase();return Object.keys(this.frontmatter).find(n=>n.toLowerCase()===t)}};var Vi=class{constructor(e,t){this.parent=null;this.children=[];this.originalMarkdown=e,this.parent=t,t!==null&&t.children.push(this)}get root(){return this.parent===null?this:this.parent.root}get isRoot(){return this.parent===null}};var qu=oa(ze());var kt=class{constructor(e,t){this.start=e,this.end=t,t.isBefore(e)&&(this.start=t,this.end=e),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(e){let t=e==="week"?"isoWeek":e;return new kt(window.moment().startOf(t).startOf("day"),window.moment().endOf(t).startOf("day"))}static buildInvalid(){return new kt(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=window.moment.duration(1,e);this.start.subtract(t),this.end.subtract(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}moveToNext(e){let t=window.moment.duration(1,e);this.start.add(t),this.end.add(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}};var Ht=class{static parseDate(e,t=!1){return window.moment(qu.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[Ht.parseRelativeDateRange,Ht.parseNumberedDateRange,Ht.parseAbsoluteDateRange];for(let i of n){let s=i(e,t);if(s.isValid())return s}return kt.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=qu.parse(e,void 0,{forwardDate:t});if(n.length===0)return kt.buildInvalid();let i=n[0].start,s=n[1]&&n[1].start?n[1].start:i,a=window.moment(i.date()),o=window.moment(s.date());return new kt(a,o)}static parseRelativeDateRange(e,t){let n=/(last|this|next) (week|month|quarter|year)/,i=e.match(n);if(i&&i.length===3){let s=i[1],a=i[2],o=kt.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return kt.buildInvalid()}static parseNumberedDateRange(e,t){let n=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[i,s,a]of n){let o=e.match(i);if(o){let u=o[0].trim();return new kt(window.moment(u,s).startOf(a),window.moment(u,s).endOf(a))}}return kt.buildInvalid()}};var AP={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function $u(r){for(let[e,t]of Object.entries(AP))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var ym=oa(ze());function dr(r,e){return r!==null&&e===null?-1:r===null&&e!==null?1:r!==null&&e!==null?r.isValid()&&!e.isValid()?1:!r.isValid()&&e.isValid()?-1:r.isAfter(e)?1:r.isBefore(e)?-1:0:0}function PP(r,e,t=void 0){if(!e)return`no ${r} date`;let n=ym.parseDate(e,t,{forwardDate:t!=null});return n!==null?window.moment(n).format("YYYY-MM-DD"):`invalid ${r} date`}function D_(r,e,t){return PP(r,e,t?new Date:void 0)}function Ti(r,e){let t=null,n=ym.parseDate(r,new Date,{forwardDate:e});return n!==null&&(t=window.moment(n)),t}var fr=class{constructor({startDate:e=null,scheduledDate:t=null,dueDate:n=null}){this.startDate=e!=null?e:null,this.scheduledDate=t!=null?t:null,this.dueDate=n!=null?n:null,this.referenceDate=this.getReferenceDate()}getReferenceDate(){return this.dueDate?window.moment(this.dueDate):this.scheduledDate?window.moment(this.scheduledDate):this.startDate?window.moment(this.startDate):null}isIdenticalTo(e){return!(dr(this.startDate,e.startDate)!==0||dr(this.scheduledDate,e.scheduledDate)!==0||dr(this.dueDate,e.dueDate)!==0)}next(e){return this.referenceDate===null?new fr({startDate:null,scheduledDate:null,dueDate:null}):new fr({startDate:this.nextOccurrenceDate(this.startDate,e),scheduledDate:this.nextOccurrenceDate(this.scheduledDate,e),dueDate:this.nextOccurrenceDate(this.dueDate,e)})}nextOccurrenceDate(e,t){if(e===null)return null;let n=window.moment.duration(e.diff(this.referenceDate)),i=window.moment(t);return i.add(Math.round(n.asDays()),"days"),i}};var ju=["MO","TU","WE","TH","FR","SA","SU"],He=function(){function r(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return r.fromStr=function(e){return new r(ju.indexOf(e))},r.prototype.nth=function(e){return this.n===e?this:new r(this.weekday,e)},r.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},r.prototype.toString=function(){var e=ju[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var Fe=function(r){return r!=null},Vt=function(r){return typeof r=="number"},bm=function(r){return typeof r=="string"&&ju.includes(r)},ct=Array.isArray,pr=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=ye(t,e/t.length)),t.slice(0,e)+String(n))}var R_=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},mt=function(r,e){var t=r%e;return t*e<0?t+e:t},Gu=function(r,e){return{div:Math.floor(r/e),mod:mt(r,e)}},zt=function(r){return!Fe(r)||r.length===0},$e=function(r){return!zt(r)},Te=function(r,e){return $e(r)&&r.indexOf(e)!==-1};var Hr=function(r,e,t,n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=0),new Date(Date.UTC(r,e-1,t,n,i,s))},NP=[31,28,31,30,31,30,31,31,30,31,30,31],A_=1e3*60*60*24,Yu=9999,P_=Hr(1970,1,1),IP=[6,0,1,2,3,4,5];var cs=function(r){return r%4===0&&r%100!==0||r%400===0},Tm=function(r){return r instanceof Date},vi=function(r){return Tm(r)&&!isNaN(r.getTime())},M_=function(r){return r.getTimezoneOffset()*60*1e3},FP=function(r,e){var t=r.getTime()-M_(r),n=e.getTime()-M_(e),i=t-n;return Math.round(i/A_)},uo=function(r){return FP(r,P_)},Bu=function(r){return new Date(P_.getTime()+r*A_)},LP=function(r){var e=r.getUTCMonth();return e===1&&cs(r.getUTCFullYear())?29:NP[e]},Tn=function(r){return IP[r.getUTCDay()]},_m=function(r,e){var t=Hr(r,e+1,1);return[Tn(t),LP(t)]},Hu=function(r,e){return e=e||r,new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},Vu=function(r){var e=new Date(r.getTime());return e},vm=function(r){for(var e=[],t=0;tthis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),vn=UP;var wm=function(r,e){return wm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},wm(r,e)};function fs(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");wm(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var dt=function(){return dt=Object.assign||function(e){for(var t,n=1,i=arguments.length;ne[0].length)&&(e=s,t=i)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function co(r,e){e===void 0&&(e=wi);var t={},n=new YP(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var p=n.acceptNumber();if(p&&(t.interval=parseInt(p[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=z.DAILY,n.nextSymbol()&&(a(),d());break;case"weekday(s)":t.freq=z.WEEKLY,t.byweekday=[z.MO,z.TU,z.WE,z.TH,z.FR],n.nextSymbol(),d();break;case"week(s)":t.freq=z.WEEKLY,n.nextSymbol()&&(s(),d());break;case"hour(s)":t.freq=z.HOURLY,n.nextSymbol()&&(s(),d());break;case"minute(s)":t.freq=z.MINUTELY,n.nextSymbol()&&(s(),d());break;case"month(s)":t.freq=z.MONTHLY,n.nextSymbol()&&(s(),d());break;case"year(s)":t.freq=z.YEARLY,n.nextSymbol()&&(s(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=z.WEEKLY;var m=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[z[m]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var y=u();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(z[y]),n.nextSymbol()}c(),d();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=z.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var _=o();if(!_)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(_),n.nextSymbol()}s(),d();break;default:throw new Error("Unknown symbol")}}function s(){var p=n.accept("on"),m=n.accept("the");if(!!(p||m))do{var y=l(),_=u(),b=o();if(y)_?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(z[_].nth(y))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(y),n.accept("day(s)"));else if(_)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(z[_]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[z.MO,z.TU,z.WE,z.TH,z.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var E=n.acceptNumber();if(!E)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(E[0],10)];n.accept("comma");){if(E=n.acceptNumber(),!E)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(E[0],10))}}else if(b)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(b);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var p=n.accept("at");if(!!p)do{var m=n.acceptNumber();if(!m)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(m[0],10)];n.accept("comma");){if(m=n.acceptNumber(),!m)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(m[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var p=parseInt(n.value[1],10);if(p<-366||p>366)throw new Error("Nth out of range: "+p);return n.nextSymbol(),n.accept("last")?-p:p;default:return!1}}function c(){n.accept("on"),n.accept("the");var p=l();if(!!p)for(t.bymonthday=[p],n.nextSymbol();n.accept("comma");){if(p=l(),!p)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(p),n.nextSymbol()}}function d(){if(n.symbol==="until"){var p=Date.parse(n.text);if(!p)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(p)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var me;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(me||(me={}));function fo(r){return r12){var n=Math.floor(this.month/12),i=mt(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=Gu(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),zt(i)||Te(i,this.hour))break}},e.prototype.addMinutes=function(t,n,i,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=Gu(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(zt(i)||Te(i,this.hour))&&(zt(s)||Te(s,this.minute)))break}},e.prototype.addSeconds=function(t,n,i,s,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=Gu(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(zt(i)||Te(i,this.hour))&&(zt(s)||Te(s,this.minute))&&(zt(a)||Te(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=_m(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>Yu))return;t=_m(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case me.YEARLY:return this.addYears(s);case me.MONTHLY:return this.addMonths(s);case me.WEEKLY:return this.addWeekly(s,a);case me.DAILY:return this.addDaily(s);case me.HOURLY:return this.addHours(s,n,o);case me.MINUTELY:return this.addMinutes(s,n,o,u);case me.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(ms);function Em(r){for(var e=[],t=Object.keys(r),n=0,i=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||$e(e.byweekno)||$e(e.byyearday)||Boolean(e.bymonthday)||$e(e.bymonthday)||Fe(e.byweekday)||Fe(e.byeaster)))switch(e.freq){case z.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case z.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case z.WEEKLY:e.byweekday=[Tn(e.dtstart)];break}if(Fe(e.bymonth)&&!ct(e.bymonth)&&(e.bymonth=[e.bymonth]),Fe(e.byyearday)&&!ct(e.byyearday)&&Vt(e.byyearday)&&(e.byyearday=[e.byyearday]),!Fe(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(ct(e.bymonthday)){for(var i=[],s=[],t=0;t0?i.push(n):n<0&&s.push(n)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Fe(e.byweekno)&&!ct(e.byweekno)&&(e.byweekno=[e.byweekno]),!Fe(e.byweekday))e.bynweekday=null;else if(Vt(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(bm(e.byweekday))e.byweekday=[He.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof He)!e.byweekday.n||e.freq>z.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;tz.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=$e(a)?a:null,e.bynweekday=$e(o)?o:null}return Fe(e.byhour)?Vt(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(c=0,l=o.yearlen+mt(a-e.wkst,7)):l=n-c;for(var d=Math.floor(l/7),p=mt(l,7),m=Math.floor(d+p/4),y=0;y0&&_<=m){var b=void 0;_>1?(b=c+(_-1)*7,c!==u&&(b-=7-u)):b=c;for(var E=0;E<7&&(o.wnomask[b]=1,b++,o.wdaymask[b]!==e.wkst);E++);}}if(Te(e.byweekno,1)){var b=c+m*7;if(c!==u&&(b-=7-u),b=4?(F=0,te=q+mt(S-e.wkst,7)):te=n-c,R=Math.floor(52+mt(te,7)/4)}if(Te(e.byweekno,R))for(var b=0;bs)return wn(r);if(R>=t){var S=sv(R,e);if(!r.accept(S)||o&&(--o,!o))return wn(r)}}else for(var E=m;Es)return wn(r);if(R>=t){var S=sv(R,e);if(!r.accept(S)||o&&(--o,!o))return wn(r)}}}if(e.interval===0||(u.add(e,_),u.year>Yu))return wn(r);fo(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function rN(r,e,t){var n=t.bymonth,i=t.byweekno,s=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return $e(n)&&!Te(n,r.mmask[e])||$e(i)&&!r.wnomask[e]||$e(s)&&!Te(s,r.wdaymask[e])||$e(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!Te(r.eastermask,e)||($e(o)||$e(u))&&!Te(o,r.mdaymask[e])&&!Te(u,r.nmdaymask[e])||$e(l)&&(e=r.yearlen&&!Te(l,e+1-r.yearlen)&&!Te(l,-r.nextyearlen+e-r.yearlen))}function sv(r,e){return new ki(r,e.tzid).rezonedDate()}function wn(r){return r.getValue()}function nN(r,e,t,n,i){for(var s=!1,a=e;a=z.HOURLY&&$e(i)&&!Te(i,e.hour)||n>=z.MINUTELY&&$e(s)&&!Te(s,e.minute)||n>=z.SECONDLY&&$e(a)&&!Te(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var mr={MO:new He(0),TU:new He(1),WE:new He(2),TH:new He(3),FR:new He(4),SA:new He(5),SU:new He(6)},po={freq:me.YEARLY,dtstart:null,interval:1,wkst:mr.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},j_=Object.keys(po),z=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new B_,this.origOptions=Em(e);var n=q_(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return co(e,t)},r.fromText=function(e,t){return F_(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return zu(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(!!this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new km("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new vn("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!vi(e)||!vi(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:n};if(i)return this._iter(new km("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new vn("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!vi(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new vn("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!vi(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new vn("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return go(this.origOptions)},r.prototype.toText=function(e,t,n){return L_(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return U_(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=me.YEARLY,r.MONTHLY=me.MONTHLY,r.WEEKLY=me.WEEKLY,r.DAILY=me.DAILY,r.HOURLY=me.HOURLY,r.MINUTELY=me.MINUTELY,r.SECONDLY=me.SECONDLY,r.MO=mr.MO,r.TU=mr.TU,r.WE=mr.WE,r.TH=mr.TH,r.FR=mr.FR,r.SA=mr.SA,r.SU=mr.SU,r.parseString=ho,r.optionsToString=go,r}();function av(r,e,t,n,i,s){var a={},o=r.accept;function u(p,m){t.forEach(function(y){y.between(p,m,!0).forEach(function(_){a[Number(_)]=!0})})}i.forEach(function(p){var m=new ki(p,s).rezonedDate();a[Number(m)]=!0}),r.accept=function(p){var m=Number(p);return isNaN(m)?o.call(this,p):!a[m]&&(u(new Date(m-1),new Date(m+1)),!a[m])?(a[m]=!0,o.call(this,p)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(p){var m=Number(p);return a[m]?!0:(a[m]=!0,o.call(this,p))});for(var l=0;l1||i.length||s.length||a.length){var c=new Dm(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(p){c.rrule(new z(Om(p,o,u),l))}),i.forEach(function(p){c.rdate(p)}),s.forEach(function(p){c.exrule(new z(Om(p,o,u),l))}),a.forEach(function(p){c.exdate(p)}),e.compatible&&e.dtstart&&c.rdate(o),c}var d=n[0]||{};return new z(Om(d,d.dtstart||e.dtstart||o,d.tzid||e.tzid||u),l)}function Ku(r,e){return e===void 0&&(e={}),aN(r,oN(e))}function Om(r,e,t){return dt(dt({},r),{dtstart:e,tzid:t})}function oN(r){var e=[],t=Object.keys(r),n=Object.keys(ov);if(t.forEach(function(i){Te(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return dt(dt({},ov),r)}function uN(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=R_(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function lN(r){var e=uN(r),t=e.name,n=e.value,i=t.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function cN(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(` -`),n=0;n0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function dN(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function uv(r,e){return dN(e),r.split(",").map(function(t){return lo(t)})}function lv(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;ne in r?aa(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,K=(r,e)=>{for(var t in e||(e={}))Sc.call(e,t)&&Kh(r,t,e[t]);if(Bo)for(var t of Bo(e))Qh.call(e,t)&&Kh(r,t,e[t]);return r},he=(r,e)=>aE(r,uE(e));var Ho=(r,e)=>{var t={};for(var n in r)Sc.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&Bo)for(var n of Bo(r))e.indexOf(n)<0&&Qh.call(r,n)&&(t[n]=r[n]);return t};var k=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),dE=(r,e)=>{for(var t in e)aa(r,t,{get:e[t],enumerable:!0})},Xh=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of lE(e))!Sc.call(r,i)&&i!==t&&aa(r,i,{get:()=>e[i],enumerable:!(n=oE(e,i))||n.enumerable});return r};var oa=(r,e,t)=>(t=r!=null?sE(cE(r)):{},Xh(e||!r||!r.__esModule?aa(t,"default",{value:r,enumerable:!0}):t,r)),fE=r=>Xh(aa({},"__esModule",{value:!0}),r);var P=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});var Re=k(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.matchAnyPattern=Ln.extractTerms=Ln.repeatedTimeunitPattern=void 0;function gE(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Ln.repeatedTimeunitPattern=gE;function Zh(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Ln.extractTerms=Zh;function yE(r){return`(?:${Zh(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Ln.matchAnyPattern=yE});var we=k((Dc,xc)=>{(function(r,e){typeof Dc=="object"&&typeof xc!="undefined"?xc.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Dc,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",c="quarter",d="year",p="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},E=function(j,$,D){var B=String(j);return!B||B.length>=$?j:""+Array($+1-B.length).join(D)+j},R={s:E,z:function(j){var $=-j.utcOffset(),D=Math.abs($),B=Math.floor(D/60),I=D%60;return($<=0?"+":"-")+E(B,2,"0")+":"+E(I,2,"0")},m:function j($,D){if($.date(){"use strict";var bE=Un&&Un.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Un,"__esModule",{value:!0});Un.findYearClosestToRef=Un.findMostLikelyADYear=void 0;var TE=bE(we());function _E(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Un.findMostLikelyADYear=_E;function vE(r,e,t){let n=TE.default(r),i=n;i=i.month(t-1),i=i.date(e),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n)){"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.parseTimeUnits=ce.TIME_UNITS_PATTERN=ce.parseYear=ce.YEAR_PATTERN=ce.parseOrdinalNumberPattern=ce.ORDINAL_NUMBER_PATTERN=ce.parseNumberPattern=ce.NUMBER_PATTERN=ce.TIME_UNIT_DICTIONARY=ce.ORDINAL_WORD_DICTIONARY=ce.INTEGER_WORD_DICTIONARY=ce.MONTH_DICTIONARY=ce.FULL_MONTH_NAME_DICTIONARY=ce.WEEKDAY_DICTIONARY=void 0;var Ko=Re(),wE=ot();ce.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};ce.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};ce.MONTH_DICTIONARY=Object.assign(Object.assign({},ce.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});ce.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};ce.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};ce.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};ce.NUMBER_PATTERN=`(?:${Ko.matchAnyPattern(ce.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function eg(r){let e=r.toLowerCase();return ce.INTEGER_WORD_DICTIONARY[e]!==void 0?ce.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)}ce.parseNumberPattern=eg;ce.ORDINAL_NUMBER_PATTERN=`(?:${Ko.matchAnyPattern(ce.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function kE(r){let e=r.toLowerCase();return ce.ORDINAL_WORD_DICTIONARY[e]!==void 0?ce.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ce.parseOrdinalNumberPattern=kE;ce.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function EE(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return wE.findMostLikelyADYear(e)}ce.parseYear=EE;var tg=`(${ce.NUMBER_PATTERN})\\s{0,3}(${Ko.matchAnyPattern(ce.TIME_UNIT_DICTIONARY)})`,Jh=new RegExp(tg,"i");ce.TIME_UNITS_PATTERN=Ko.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",tg);function SE(r){let e={},t=r,n=Jh.exec(t);for(;n;)OE(e,n),t=t.substring(n[0].length).trim(),n=Jh.exec(t);return e}ce.parseTimeUnits=SE;function OE(r,e){let t=eg(e[1]),n=ce.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var rg=k((Rc,Mc)=>{(function(r,e){typeof Rc=="object"&&typeof Mc!="undefined"?Mc.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Rc,function(){"use strict";var r="month",e="quarter";return function(t,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var d=this.quarter()-1;return c?this.month(3*d).startOf(r).startOf("day"):this.month(3*d+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var ir=k($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.implySimilarTime=$r.assignSimilarTime=$r.assignSimilarDate=$r.assignTheNextDay=void 0;var ng=ze();function DE(r,e){e=e.add(1,"day"),ig(r,e),sg(r,e)}$r.assignTheNextDay=DE;function ig(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}$r.assignSimilarDate=ig;function xE(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",ng.Meridiem.AM):r.assign("meridiem",ng.Meridiem.PM)}$r.assignSimilarTime=xE;function sg(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}$r.implySimilarTime=sg});var ag=k(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.toTimezoneOffset=ui.TIMEZONE_ABBR_MAP=void 0;ui.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function RE(r){var e;return r==null?null:typeof r=="number"?r:(e=ui.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}ui.toTimezoneOffset=RE});var We=k(jr=>{"use strict";var og=jr&&jr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(jr,"__esModule",{value:!0});jr.ParsingResult=jr.ParsingComponents=jr.ReferenceWithTimezone=void 0;var ME=og(rg()),Qo=og(we()),Cc=ir(),CE=ag();Qo.default.extend(ME.default);var Ac=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=CE.toTimezoneOffset(e.timezone))}};jr.ReferenceWithTimezone=Ac;var li=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let n=Qo.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new li(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return Qo.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let i=-e.getTimezoneOffset(),s=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:i;return i-s}static createRelativeFromReference(e,t){let n=Qo.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new li(e);return t.hour||t.minute||t.second?(Cc.assignSimilarTime(i,n),Cc.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Cc.implySimilarTime(i,n),e.timezoneOffset!==null&&i.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(t.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),t.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),t.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};jr.ParsingComponents=li;var ua=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new li(e),this.end=s}clone(){let e=new ua(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};jr.ParsingResult=ua});var V=k(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.AbstractParserWithWordBoundaryChecking=void 0;var Pc=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let i=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+i.length,t[0]=t[0].substring(i.length);for(let s=2;s{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var Ic=ut(),AE=We(),PE=V(),NE=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Ic.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),IE=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Ic.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Nc=class extends PE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?IE:NE}innerExtract(e,t){let n=Ic.parseTimeUnits(t[1]);return AE.ParsingComponents.createRelativeFromReference(e.reference,n)}};Fc.default=Nc});var mg=k(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var FE=ot(),fg=ut(),pg=ut(),Zo=ut(),LE=Re(),UE=V(),WE=new RegExp(`(?:on\\s{0,3})?(${Zo.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Zo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${LE.matchAnyPattern(fg.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${pg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),lg=1,cg=2,qE=3,dg=4,Lc=class extends UE.AbstractParserWithWordBoundaryChecking{innerPattern(){return WE}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=fg.MONTH_DICTIONARY[t[qE].toLowerCase()],s=Zo.parseOrdinalNumberPattern(t[lg]);if(s>31)return t.index=t.index+t[lg].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[dg]){let a=pg.parseYear(t[dg]);n.start.assign("year",a)}else{let a=FE.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[cg]){let a=Zo.parseOrdinalNumberPattern(t[cg]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Uc.default=Lc});var Tg=k(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var $E=ot(),yg=ut(),Jo=ut(),bg=ut(),jE=Re(),GE=V(),YE=new RegExp(`(${jE.matchAnyPattern(yg.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Jo.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Jo.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${bg.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),BE=1,HE=2,hg=3,gg=4,Wc=class extends GE.AbstractParserWithWordBoundaryChecking{innerPattern(){return YE}innerExtract(e,t){let n=yg.MONTH_DICTIONARY[t[BE].toLowerCase()],i=Jo.parseOrdinalNumberPattern(t[HE]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[gg]){let u=bg.parseYear(t[gg]);s.assign("year",u)}else{let u=$E.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[hg])return s;let a=Jo.parseOrdinalNumberPattern(t[hg]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};qc.default=Wc});var wg=k(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});var $c=ut(),VE=ot(),zE=Re(),vg=ut(),KE=V(),QE=new RegExp(`((?:in)\\s*)?(${zE.matchAnyPattern($c.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${vg.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),XE=1,ZE=2,_g=3,jc=class extends KE.AbstractParserWithWordBoundaryChecking{innerPattern(){return QE}innerExtract(e,t){let n=t[ZE].toLowerCase();if(t[0].length<=3&&!$c.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[XE]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=$c.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[_g]){let a=vg.parseYear(t[_g]);i.start.assign("year",a)}else{let a=VE.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Gc.default=jc});var Sg=k(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var Eg=ut(),JE=Re(),eS=V(),tS=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${JE.matchAnyPattern(Eg.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),rS=1,nS=2,kg=3,iS=4,Yc=class extends eS.AbstractParserWithWordBoundaryChecking{innerPattern(){return tS}innerExtract(e,t){let n=t[kg]?parseInt(t[kg]):Eg.MONTH_DICTIONARY[t[nS].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[rS]);return{day:parseInt(t[iS]),month:n,year:i}}};Bc.default=Yc});var Og=k(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});var sS=V(),aS=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),oS=1,uS=2,Hc=class extends sS.AbstractParserWithWordBoundaryChecking{innerPattern(){return aS}innerExtract(e,t){let n=parseInt(t[uS]),i=parseInt(t[oS]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Vc.default=Hc});var ci=k(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.AbstractTimeExpressionParser=void 0;var wt=ze();function lS(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function cS(r,e){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var Dg=2,zi=3,eu=4,tu=5,la=6,zc=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[Dg]);if(o>100){if(this.strictMode||t[zi]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[zi]!=null){if(t[zi].length==1&&!t[la])return null;s=parseInt(t[zi])}if(s>=60)return null;if(o>12&&(a=wt.Meridiem.PM),t[la]!=null){if(o>12)return null;let u=t[la][0].toLowerCase();u=="a"&&(a=wt.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=wt.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",wt.Meridiem.AM):i.imply("meridiem",wt.Meridiem.PM),t[tu]!=null){let u=parseInt(t[tu].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[eu]!=null){let u=parseInt(t[eu]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[tu]!=null){let u=parseInt(t[tu].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[eu]!=null){let u=parseInt(t[eu]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[Dg]),a=0,o=-1;if(t[zi]!=null?a=parseInt(t[zi]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=wt.Meridiem.PM),t[la]!=null){if(s>12)return null;let u=t[la][0].toLowerCase();u=="a"&&(o=wt.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=wt.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==wt.Meridiem.AM?(n.start.imply("meridiem",wt.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",wt.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?i.imply("meridiem",wt.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",wt.Meridiem.PM)):s>12?i.imply("meridiem",wt.Meridiem.PM):s<=12&&i.imply("meridiem",wt.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 n=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=lS(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=cS(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};ru.AbstractTimeExpressionParser=zc});var xg=k(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var nu=ze(),dS=ci(),Kc=class extends dS.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",nu.Meridiem.PM)):i<6&&n.assign("meridiem",nu.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",nu.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",nu.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Qc.default=Kc});var sr=k(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.addImpliedTimeUnits=Ki.reverseTimeUnits=void 0;function fS(r){let e={};for(let t in r)e[t]=-r[t];return e}Ki.reverseTimeUnits=fS;function pS(r,e){let t=r.clone(),n=r.dayjs();for(let i in e)n=n.add(e[i],i);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}Ki.addImpliedTimeUnits=pS});var Rg=k(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var Zc=ut(),mS=We(),hS=V(),gS=sr(),yS=new RegExp(`(${Zc.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),bS=new RegExp(`(${Zc.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),Xc=class extends hS.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?bS:yS}innerExtract(e,t){let n=Zc.parseTimeUnits(t[1]),i=gS.reverseTimeUnits(n);return mS.ParsingComponents.createRelativeFromReference(e.reference,i)}};Jc.default=Xc});var Mg=k(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});var td=ut(),TS=We(),_S=V(),vS=new RegExp(`(${td.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),wS=new RegExp("("+td.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),kS=1,ed=class extends _S.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?wS:vS}innerExtract(e,t){let n=td.parseTimeUnits(t[kS]);return TS.ParsingComponents.createRelativeFromReference(e.reference,n)}};rd.default=ed});var Xi=k(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.MergingRefiner=Qi.Filter=void 0;var nd=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};Qi.Filter=nd;var id=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0],s=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),i=c}}return i!=null&&n.push(i),n}};Qi.MergingRefiner=id});var Gr=k(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});var ES=Xi(),sd=class extends ES.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let i=t.clone();return i.start=t.start,i.end=n.start,i.index=Math.min(t.index,n.index),t.index{"use strict";var SS=ca&&ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ca,"__esModule",{value:!0});var OS=SS(Gr()),od=class extends OS.default{patternBetween(){return/^\s*(to|-)\s*$/i}};ca.default=od});var Ag=k(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.mergeDateTimeComponent=Zi.mergeDateTimeResult=void 0;var DS=ze();function xS(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=ud(n,i),r.end!=null||e.end!=null){let s=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=ud(s,a);r.end==null&&o.date().getTime(){"use strict";Object.defineProperty(cd,"__esModule",{value:!0});var RS=Xi(),Pg=Ag(),ld=class extends RS.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let i=t.start.isOnlyDate()?Pg.mergeDateTimeResult(t,n):Pg.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};cd.default=ld});var Ng=k(da=>{"use strict";var MS=da&&da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(da,"__esModule",{value:!0});var CS=MS(cn()),dd=class extends CS.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};da.default=dd});var Ig=k(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});var AS=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),PS={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},fd=class{constructor(e){this.timezone=Object.assign(Object.assign({},PS),e)}refine(e,t){var n;let i=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(s=>{var a,o;let u=e.text.substring(s.index+s.text.length),l=AS.exec(u);if(!l)return;let c=l[1].toUpperCase(),d=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(d===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${d} for: ${s.start}`)});let p=s.start.get("timezoneOffset");p!==null&&d!=p&&(s.start.isCertain("timezoneOffset")||c!=l[1])||s.start.isOnlyDate()&&c!=l[1]||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",d),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",d))}),t}};pd.default=fd});var iu=k(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});var NS=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),IS=1,FS=2,LS=3,md=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let i=e.text.substring(n.index+n.text.length),s=NS.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[FS]),o=parseInt(s[LS]||"0"),u=a*60+o;u>14*60||(s[IS]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};hd.default=md});var Fg=k(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});var gd=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0];for(let s=1;si.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};yd.default=gd});var Lg=k(fa=>{"use strict";var US=fa&&fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fa,"__esModule",{value:!0});var WS=US(we()),bd=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=WS.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&i.isAfter(n.start.dayjs()))for(let s=0;s<3&&i.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&i.isAfter(n.start.dayjs())&&(i.day()>=n.start.get("weekday")?i=i.day(n.start.get("weekday")+7):i=i.day(n.start.get("weekday")),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(i.day()>n.end.get("weekday")?i=i.day(n.end.get("weekday")+7):i=i.day(n.end.get("weekday")),n.end.imply("day",i.date()),n.end.imply("month",i.month()+1),n.end.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};fa.default=bd});var Ug=k(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var qS=Xi(),Td=class extends qS.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}};_d.default=Td});var kd=k(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});var $S=V(),jS=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"),GS=1,YS=2,BS=3,Wg=4,HS=5,qg=6,$g=7,jg=8,Gg=9,vd=class extends $S.AbstractParserWithWordBoundaryChecking{innerPattern(){return jS}innerExtract(e,t){let n={};if(n.year=parseInt(t[GS]),n.month=parseInt(t[YS]),n.day=parseInt(t[BS]),t[Wg]!=null)if(n.hour=parseInt(t[Wg]),n.minute=parseInt(t[HS]),t[qg]!=null&&(n.second=parseInt(t[qg])),t[$g]!=null&&(n.millisecond=parseInt(t[$g])),t[jg]==null)n.timezoneOffset=0;else{let i=parseInt(t[jg]),s=0;t[Gg]!=null&&(s=parseInt(t[Gg]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};wd.default=vd});var Yg=k(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});var VS=Xi(),Ed=class extends VS.MergingRefiner{mergeResults(e,t,n){let i=n.clone();return i.index=t.index,i.text=t.text+e+i.text,i.start.assign("weekday",t.start.get("weekday")),i.end&&i.end.assign("weekday",t.start.get("weekday")),i}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};Sd.default=Ed});var dn=k(Ji=>{"use strict";var di=Ji&&Ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ji,"__esModule",{value:!0});Ji.includeCommonConfiguration=void 0;var zS=di(Ig()),KS=di(iu()),Bg=di(Fg()),QS=di(Lg()),XS=di(Ug()),ZS=di(kd()),JS=di(Yg());function eO(r,e=!1){return r.parsers.unshift(new ZS.default),r.refiners.unshift(new JS.default),r.refiners.unshift(new zS.default),r.refiners.unshift(new KS.default),r.refiners.unshift(new Bg.default),r.refiners.push(new Bg.default),r.refiners.push(new QS.default),r.refiners.push(new XS.default(e)),r}Ji.includeCommonConfiguration=eO});var pn=k(Oe=>{"use strict";var tO=Oe&&Oe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.noon=Oe.morning=Oe.midnight=Oe.yesterdayEvening=Oe.evening=Oe.lastNight=Oe.tonight=Oe.theDayAfter=Oe.tomorrow=Oe.theDayBefore=Oe.yesterday=Oe.today=Oe.now=void 0;var Yr=We(),es=tO(we()),fn=ir(),pa=ze();function rO(r){let e=es.default(r.instant),t=new Yr.ParsingComponents(r,{});return fn.assignSimilarDate(t,e),fn.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}Oe.now=rO;function nO(r){let e=es.default(r.instant),t=new Yr.ParsingComponents(r,{});return fn.assignSimilarDate(t,e),fn.implySimilarTime(t,e),t}Oe.today=nO;function iO(r){return Hg(r,1)}Oe.yesterday=iO;function Hg(r,e){return Od(r,-e)}Oe.theDayBefore=Hg;function sO(r){return Od(r,1)}Oe.tomorrow=sO;function Od(r,e){let t=es.default(r.instant),n=new Yr.ParsingComponents(r,{});return t=t.add(e,"day"),fn.assignSimilarDate(n,t),fn.implySimilarTime(n,t),n}Oe.theDayAfter=Od;function aO(r,e=22){let t=es.default(r.instant),n=new Yr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",pa.Meridiem.PM),fn.assignSimilarDate(n,t),n}Oe.tonight=aO;function oO(r,e=0){let t=es.default(r.instant),n=new Yr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),fn.assignSimilarDate(n,t),n.imply("hour",e),n}Oe.lastNight=oO;function uO(r,e=20){let t=new Yr.ParsingComponents(r,{});return t.imply("meridiem",pa.Meridiem.PM),t.imply("hour",e),t}Oe.evening=uO;function lO(r,e=20){let t=es.default(r.instant),n=new Yr.ParsingComponents(r,{});return t=t.add(-1,"day"),fn.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",pa.Meridiem.PM),n}Oe.yesterdayEvening=lO;function cO(r){let e=new Yr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}Oe.midnight=cO;function dO(r,e=6){let t=new Yr.ParsingComponents(r,{});return t.imply("meridiem",pa.Meridiem.AM),t.imply("hour",e),t}Oe.morning=dO;function fO(r){let e=new Yr.ParsingComponents(r,{});return e.imply("meridiem",pa.Meridiem.AM),e.imply("hour",12),e}Oe.noon=fO});var Vg=k(wr=>{"use strict";var pO=wr&&wr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),mO=wr&&wr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),hO=wr&&wr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&pO(e,r,t);return mO(e,r),e},gO=wr&&wr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wr,"__esModule",{value:!0});var yO=gO(we()),bO=V(),TO=ir(),ma=hO(pn()),_O=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Dd=class extends bO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return _O}innerExtract(e,t){let n=yO.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return ma.now(e.reference);case"today":return ma.today(e.reference);case"yesterday":return ma.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return ma.tomorrow(e.reference);case"tonight":return ma.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),TO.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};wr.default=Dd});var zg=k(ha=>{"use strict";var vO=ha&&ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ha,"__esModule",{value:!0});var su=ze(),wO=V(),kO=vO(we()),EO=ir(),SO=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,xd=class extends wO.AbstractParserWithWordBoundaryChecking{innerPattern(){return SO}innerExtract(e,t){let n=kO.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",su.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",su.Meridiem.PM),i.imply("hour",20);break;case"midnight":EO.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",su.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",su.Meridiem.AM),i.imply("hour",12);break}return i}};ha.default=xd});var fi=k(Wn=>{"use strict";var OO=Wn&&Wn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.toDayJSClosestWeekday=Wn.toDayJSWeekday=void 0;var Kg=OO(we());function DO(r,e,t){if(!t)return Qg(r,e);let n=Kg.default(r);switch(t){case"this":n=n.day(e);break;case"next":n=n.day(e+7);break;case"last":n=n.day(e-7);break}return n}Wn.toDayJSWeekday=DO;function Qg(r,e){let t=Kg.default(r),n=t.day();return Math.abs(e-7-n){"use strict";Object.defineProperty(Md,"__esModule",{value:!0});var Xg=ut(),xO=Re(),RO=V(),MO=fi(),CO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${xO.matchAnyPattern(Xg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),AO=1,PO=2,NO=3,Rd=class extends RO.AbstractParserWithWordBoundaryChecking{innerPattern(){return CO}innerExtract(e,t){let n=t[PO].toLowerCase(),i=Xg.WEEKDAY_DICTIONARY[n],s=t[AO],a=t[NO],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=MO.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Md.default=Rd});var ty=k(ga=>{"use strict";var IO=ga&&ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ga,"__esModule",{value:!0});var ey=ut(),Jg=We(),FO=IO(we()),LO=V(),UO=Re(),WO=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${UO.matchAnyPattern(ey.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),qO=1,$O=2,Cd=class extends LO.AbstractParserWithWordBoundaryChecking{innerPattern(){return WO}innerExtract(e,t){let n=t[qO].toLowerCase(),i=t[$O].toLowerCase(),s=ey.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,Jg.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,Jg.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=FO.default(e.reference.instant);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}};ga.default=Cd});var kr=k(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.ParsingContext=ns.Chrono=void 0;var ts=We(),jO=Ad(),rs=class{constructor(e){e=e||jO.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new rs({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let i=this.parse(e,t,n);return i.length>0?i[0].start.date():null}parse(e,t,n){let i=new au(e,t,n),s=[];return this.parsers.forEach(a=>{let o=rs.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let n=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;l instanceof ts.ParsingResult?c=l:l instanceof ts.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=s.substring(u+c.text.length),o=i.exec(a)}return n}};ns.Chrono=rs;var au=class{constructor(e,t,n){this.text=e,this.reference=new ts.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof ts.ParsingComponents?e:new ts.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new ts.ParsingResult(this.reference,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};ns.ParsingContext=au});var pi=k(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});var ry=ot(),GO=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"),ou=1,ny=5,iy=2,sy=3,Pd=4,Nd=class{constructor(e){this.groupNumberMonth=e?sy:iy,this.groupNumberDay=e?iy:sy}pattern(){return GO}extract(e,t){if(t[ou]=="/"||t[ny]=="/"){t.index+=t[0].length;return}let n=t.index+t[ou].length,i=t[0].substr(t[ou].length,t[0].length-t[ou].length-t[ny].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[Pd]&&t[0].indexOf("/")<0)return;let s=e.createParsingResult(n,i),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),t[Pd]){let u=parseInt(t[Pd]),l=ry.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=ry.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};Id.default=Nd});var oy=k(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});var ay=ut(),YO=We(),BO=V(),HO=sr(),VO=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${ay.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Fd=class extends BO.AbstractParserWithWordBoundaryChecking{innerPattern(){return VO}innerExtract(e,t){let n=t[1].toLowerCase(),i=ay.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=HO.reverseTimeUnits(i);break}return YO.ParsingComponents.createRelativeFromReference(e.reference,i)}};Ld.default=Fd});var ly=k(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});var zO=Xi(),Ud=We(),KO=ut(),QO=sr();function uy(r){return r.text.match(/\s+(before|from)$/i)!=null}function XO(r){return r.text.match(/\s+(after|since)$/i)!=null}var Wd=class extends zO.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!uy(t)&&!XO(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=KO.parseTimeUnits(t.text);uy(t)&&(i=QO.reverseTimeUnits(i));let s=Ud.ParsingComponents.createRelativeFromReference(new Ud.ReferenceWithTimezone(n.start.date()),i);return new Ud.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};qd.default=Wd});var Ad=k(Ge=>{"use strict";var Xe=Ge&&Ge.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.createConfiguration=Ge.createCasualConfiguration=Ge.parseDate=Ge.parse=Ge.GB=Ge.strict=Ge.casual=void 0;var ZO=Xe(ug()),JO=Xe(mg()),e0=Xe(Tg()),t0=Xe(wg()),r0=Xe(Sg()),n0=Xe(Og()),i0=Xe(xg()),s0=Xe(Rg()),a0=Xe(Mg()),o0=Xe(Cg()),u0=Xe(Ng()),l0=dn(),c0=Xe(Vg()),d0=Xe(zg()),f0=Xe(Zg()),p0=Xe(ty()),$d=kr(),m0=Xe(pi()),h0=Xe(oy()),g0=Xe(ly());Ge.casual=new $d.Chrono(cy(!1));Ge.strict=new $d.Chrono(uu(!0,!1));Ge.GB=new $d.Chrono(uu(!1,!0));function y0(r,e,t){return Ge.casual.parse(r,e,t)}Ge.parse=y0;function b0(r,e,t){return Ge.casual.parseDate(r,e,t)}Ge.parseDate=b0;function cy(r=!1){let e=uu(!1,r);return e.parsers.unshift(new c0.default),e.parsers.unshift(new d0.default),e.parsers.unshift(new t0.default),e.parsers.unshift(new p0.default),e.parsers.unshift(new h0.default),e}Ge.createCasualConfiguration=cy;function uu(r=!0,e=!1){return l0.includeCommonConfiguration({parsers:[new m0.default(e),new ZO.default,new JO.default,new e0.default,new f0.default,new r0.default,new n0.default,new i0.default(r),new s0.default(r),new a0.default(r)],refiners:[new g0.default,new u0.default,new o0.default]},r)}Ge.createConfiguration=uu});var dy=k(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});var T0=ci(),jd=class extends T0.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Gd.default=jd});var ya=k(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.parseTimeUnits=Ae.TIME_UNITS_PATTERN=Ae.parseYear=Ae.YEAR_PATTERN=Ae.parseNumberPattern=Ae.NUMBER_PATTERN=Ae.TIME_UNIT_DICTIONARY=Ae.INTEGER_WORD_DICTIONARY=Ae.MONTH_DICTIONARY=Ae.WEEKDAY_DICTIONARY=void 0;var Yd=Re(),_0=ot();Ae.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};Ae.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};Ae.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};Ae.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};Ae.NUMBER_PATTERN=`(?:${Yd.matchAnyPattern(Ae.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function py(r){let e=r.toLowerCase();return Ae.INTEGER_WORD_DICTIONARY[e]!==void 0?Ae.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)}Ae.parseNumberPattern=py;Ae.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function v0(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return _0.findMostLikelyADYear(e)}Ae.parseYear=v0;var my=`(${Ae.NUMBER_PATTERN})\\s{0,5}(${Yd.matchAnyPattern(Ae.TIME_UNIT_DICTIONARY)})\\s{0,5}`,fy=new RegExp(my,"i");Ae.TIME_UNITS_PATTERN=Yd.repeatedTimeunitPattern("",my);function w0(r){let e={},t=r,n=fy.exec(t);for(;n;)k0(e,n),t=t.substring(n[0].length),n=fy.exec(t);return e}Ae.parseTimeUnits=w0;function k0(r,e){let t=py(e[1]),n=Ae.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var gy=k(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});var hy=ya(),E0=Re(),S0=V(),O0=fi(),D0=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${E0.matchAnyPattern(hy.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),x0=1,R0=3,M0=2,Bd=class extends S0.AbstractParserWithWordBoundaryChecking{innerPattern(){return D0}innerExtract(e,t){let n=t[M0].toLowerCase(),i=hy.WEEKDAY_DICTIONARY[n],s=t[x0],a=t[R0],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=O0.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Hd.default=Bd});var _y=k(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});var qn=ze(),C0=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),A0=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),P0=2,yy=3,by=4,Ty=5,is=class{pattern(e){return C0}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=is.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=A0.exec(i);return s&&(n.end=is.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[P0]),t[yy]!=null&&(i=parseInt(t[yy])),i>=60||n>24)return null;if(n>=12&&(s=qn.Meridiem.PM),t[Ty]!=null){if(n>12)return null;let a=t[Ty].toLowerCase();a.match(/morgen|vormittag/)&&(s=qn.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=qn.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=qn.Meridiem.AM,n=0):n<6?s=qn.Meridiem.AM:(s=qn.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",qn.Meridiem.AM):e.imply("meridiem",qn.Meridiem.PM),t[by]!=null){let a=parseInt(t[by]);if(a>=60)return null;e.assign("second",a)}return e}};Vd.default=is});var vy=k(ba=>{"use strict";var N0=ba&&ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ba,"__esModule",{value:!0});var I0=N0(Gr()),zd=class extends I0.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};ba.default=zd});var wy=k(Ta=>{"use strict";var F0=Ta&&Ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ta,"__esModule",{value:!0});var L0=F0(cn()),Kd=class extends L0.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};Ta.default=Kd});var Qd=k(va=>{"use strict";var U0=va&&va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(va,"__esModule",{value:!0});var W0=U0(we()),mi=ze(),q0=V(),$0=ir(),j0=sr(),_a=class extends q0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=W0.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return $0.implySimilarTime(s,n),_a.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",mi.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",mi.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",mi.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",mi.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",mi.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",mi.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=j0.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",mi.Meridiem.AM);break}return e}};va.default=_a});var Sy=k(Er=>{"use strict";var G0=Er&&Er.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Y0=Er&&Er.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),B0=Er&&Er.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&G0(e,r,t);return Y0(e,r),e},Ey=Er&&Er.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Er,"__esModule",{value:!0});var H0=Ey(we()),V0=V(),hi=ir(),z0=Ey(Qd()),ky=B0(pn()),K0=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),Q0=1,X0=2,Xd=class extends V0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return K0}innerExtract(e,t){let n=H0.default(e.refDate),i=(t[Q0]||"").toLowerCase(),s=(t[X0]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=ky.now(e.reference);break;case"heute":a=ky.today(e.reference);break;case"morgen":hi.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),hi.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),hi.assignSimilarDate(a,n),hi.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),hi.assignSimilarDate(a,n),hi.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),hi.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=z0.default.extractTimeComponents(a,s)),a}};Er.default=Xd});var Cy=k(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});var Z0=ot(),Ry=ya(),My=ya(),J0=Re(),e1=V(),t1=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${J0.matchAnyPattern(Ry.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${My.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Oy=1,Dy=2,r1=3,xy=4,Zd=class extends e1.AbstractParserWithWordBoundaryChecking{innerPattern(){return t1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Ry.MONTH_DICTIONARY[t[r1].toLowerCase()],s=parseInt(t[Oy]);if(s>31)return t.index=t.index+t[Oy].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[xy]){let a=My.parseYear(t[xy]);n.start.assign("year",a)}else{let a=Z0.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Dy]){let a=parseInt(t[Dy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Jd.default=Zd});var Ay=k(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});var lu=ya(),n1=We(),i1=V(),s1=sr(),a1=Re(),ef=class extends i1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${lu.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${a1.matchAnyPattern(lu.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?lu.parseNumberPattern(t[2]):1,i=lu.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],s={};s[i]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=s1.reverseTimeUnits(s)),n1.ParsingComponents.createRelativeFromReference(e.reference,s)}};tf.default=ef});var Iy=k(Ze=>{"use strict";var Sr=Ze&&Ze.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.createConfiguration=Ze.createCasualConfiguration=Ze.parseDate=Ze.parse=Ze.strict=Ze.casual=void 0;var o1=dn(),Py=kr(),u1=Sr(pi()),l1=Sr(kd()),c1=Sr(dy()),d1=Sr(gy()),f1=Sr(_y()),p1=Sr(vy()),m1=Sr(wy()),h1=Sr(Sy()),g1=Sr(Qd()),y1=Sr(Cy()),b1=Sr(Ay());Ze.casual=new Py.Chrono(Ny());Ze.strict=new Py.Chrono(rf(!0));function T1(r,e,t){return Ze.casual.parse(r,e,t)}Ze.parse=T1;function _1(r,e,t){return Ze.casual.parseDate(r,e,t)}Ze.parseDate=_1;function Ny(r=!0){let e=rf(!1,r);return e.parsers.unshift(new g1.default),e.parsers.unshift(new h1.default),e.parsers.unshift(new b1.default),e}Ze.createCasualConfiguration=Ny;function rf(r=!0,e=!0){return o1.includeCommonConfiguration({parsers:[new l1.default,new u1.default(e),new c1.default,new f1.default,new y1.default,new d1.default],refiners:[new p1.default,new m1.default]},r)}Ze.createConfiguration=rf});var Ly=k(Or=>{"use strict";var v1=Or&&Or.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),w1=Or&&Or.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),k1=Or&&Or.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&v1(e,r,t);return w1(e,r),e},E1=Or&&Or.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Or,"__esModule",{value:!0});var S1=E1(we()),O1=ze(),D1=V(),Fy=ir(),cu=k1(pn()),nf=class extends D1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=S1.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return cu.now(e.reference);case"aujourd'hui":return cu.today(e.reference);case"hier":return cu.yesterday(e.reference);case"demain":return cu.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(Fy.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",O1.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),Fy.assignSimilarDate(s,n),s.imply("hour",0))}return s}};Or.default=nf});var Uy=k(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});var wa=ze(),x1=V(),sf=class extends x1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),i=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",wa.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",wa.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",wa.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",wa.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",wa.Meridiem.AM);break}return i}};af.default=sf});var Wy=k(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var R1=ci(),of=class extends R1.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)}};uf.default=of});var qy=k(ka=>{"use strict";var M1=ka&&ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ka,"__esModule",{value:!0});var C1=M1(cn()),lf=class extends C1.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};ka.default=lf});var $y=k(Ea=>{"use strict";var A1=Ea&&Ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ea,"__esModule",{value:!0});var P1=A1(Gr()),cf=class extends P1.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Ea.default=cf});var $n=k(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.parseTimeUnits=ke.TIME_UNITS_PATTERN=ke.parseYear=ke.YEAR_PATTERN=ke.parseOrdinalNumberPattern=ke.ORDINAL_NUMBER_PATTERN=ke.parseNumberPattern=ke.NUMBER_PATTERN=ke.TIME_UNIT_DICTIONARY=ke.INTEGER_WORD_DICTIONARY=ke.MONTH_DICTIONARY=ke.WEEKDAY_DICTIONARY=void 0;var df=Re();ke.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};ke.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};ke.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};ke.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"};ke.NUMBER_PATTERN=`(?:${df.matchAnyPattern(ke.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function Gy(r){let e=r.toLowerCase();return ke.INTEGER_WORD_DICTIONARY[e]!==void 0?ke.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}ke.parseNumberPattern=Gy;ke.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function N1(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}ke.parseOrdinalNumberPattern=N1;ke.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 I1(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}ke.parseYear=I1;var Yy=`(${ke.NUMBER_PATTERN})\\s{0,5}(${df.matchAnyPattern(ke.TIME_UNIT_DICTIONARY)})\\s{0,5}`,jy=new RegExp(Yy,"i");ke.TIME_UNITS_PATTERN=df.repeatedTimeunitPattern("",Yy);function F1(r){let e={},t=r,n=jy.exec(t);for(;n;)L1(e,n),t=t.substring(n[0].length),n=jy.exec(t);return e}ke.parseTimeUnits=F1;function L1(r,e){let t=Gy(e[1]),n=ke.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Hy=k(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});var By=$n(),U1=Re(),W1=V(),q1=fi(),$1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${U1.matchAnyPattern(By.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),j1=1,G1=2,ff=class extends W1.AbstractParserWithWordBoundaryChecking{innerPattern(){return $1}innerExtract(e,t){let n=t[j1].toLowerCase(),i=By.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[G1];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=q1.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};pf.default=ff});var Qy=k(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});var Sa=ze(),Y1=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"),B1=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"),H1=2,Vy=3,zy=4,Ky=5,ss=class{pattern(e){return Y1}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=ss.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=B1.exec(i);return s&&(n.end=ss.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[H1]),t[Vy]!=null&&(i=parseInt(t[Vy])),i>=60||n>24)return null;if(n>=12&&(s=Sa.Meridiem.PM),t[Ky]!=null){if(n>12)return null;let a=t[Ky][0].toLowerCase();a=="a"&&(s=Sa.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=Sa.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Sa.Meridiem.AM):e.imply("meridiem",Sa.Meridiem.PM),t[zy]!=null){let a=parseInt(t[zy]);if(a>=60)return null;e.assign("second",a)}return e}};mf.default=ss});var rb=k(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});var V1=ot(),eb=$n(),tb=$n(),du=$n(),z1=Re(),K1=V(),Q1=new RegExp(`(?:on\\s*?)?(${du.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${du.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${z1.matchAnyPattern(eb.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${tb.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Xy=1,Zy=2,X1=3,Jy=4,hf=class extends K1.AbstractParserWithWordBoundaryChecking{innerPattern(){return Q1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=eb.MONTH_DICTIONARY[t[X1].toLowerCase()],s=du.parseOrdinalNumberPattern(t[Xy]);if(s>31)return t.index=t.index+t[Xy].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Jy]){let a=tb.parseYear(t[Jy]);n.start.assign("year",a)}else{let a=V1.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Zy]){let a=du.parseOrdinalNumberPattern(t[Zy]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};gf.default=hf});var ib=k(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var nb=$n(),Z1=We(),J1=V(),eD=sr(),yf=class extends J1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${nb.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=nb.parseTimeUnits(t[1]),i=eD.reverseTimeUnits(n);return Z1.ParsingComponents.createRelativeFromReference(e.reference,i)}};bf.default=yf});var ab=k(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var sb=$n(),tD=We(),rD=V(),Tf=class extends rD.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${sb.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=sb.parseTimeUnits(t[1]);return tD.ParsingComponents.createRelativeFromReference(e.reference,n)}};_f.default=Tf});var ob=k(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var fu=$n(),nD=We(),iD=V(),sD=sr(),aD=Re(),vf=class extends iD.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${fu.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${aD.matchAnyPattern(fu.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let n=t[1]?fu.parseNumberPattern(t[1]):1,i=fu.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],s={};s[i]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=sD.reverseTimeUnits(s)),nD.ParsingComponents.createRelativeFromReference(e.reference,s)}};wf.default=vf});var cb=k(Je=>{"use strict";var ar=Je&&Je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Je,"__esModule",{value:!0});Je.createConfiguration=Je.createCasualConfiguration=Je.parseDate=Je.parse=Je.strict=Je.casual=void 0;var oD=dn(),ub=kr(),uD=ar(Ly()),lD=ar(Uy()),cD=ar(pi()),dD=ar(Wy()),fD=ar(qy()),pD=ar($y()),mD=ar(Hy()),hD=ar(Qy()),gD=ar(rb()),yD=ar(ib()),bD=ar(ab()),TD=ar(ob());Je.casual=new ub.Chrono(lb());Je.strict=new ub.Chrono(kf(!0));function _D(r,e,t){return Je.casual.parse(r,e,t)}Je.parse=_D;function vD(r,e,t){return Je.casual.parseDate(r,e,t)}Je.parseDate=vD;function lb(r=!0){let e=kf(!1,r);return e.parsers.unshift(new uD.default),e.parsers.unshift(new lD.default),e.parsers.unshift(new TD.default),e}Je.createCasualConfiguration=lb;function kf(r=!0,e=!0){return oD.includeCommonConfiguration({parsers:[new cD.default(e),new gD.default,new dD.default,new hD.default,new yD.default,new bD.default,new mD.default],refiners:[new fD.default,new pD.default]},r)}Je.createConfiguration=kf});var db=k(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.toHankaku=void 0;function wD(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,kD)}pu.toHankaku=wD;function kD(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var pb=k(Oa=>{"use strict";var ED=Oa&&Oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oa,"__esModule",{value:!0});var Ef=db(),SD=ot(),OD=ED(we()),DD=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,fb=1,xD=2,Sf=3,RD=4,MD=5,CD=6,Of=class{pattern(){return DD}extract(e,t){let n=parseInt(Ef.toHankaku(t[MD])),i=parseInt(Ef.toHankaku(t[CD])),s=e.createParsingComponents({day:i,month:n});if(t[fb]&&t[fb].match("\u540C|\u4ECA|\u672C")){let a=OD.default(e.refDate);s.assign("year",a.year())}if(t[xD]){let a=t[RD],o=a=="\u5143"?1:parseInt(Ef.toHankaku(a));t[Sf]=="\u4EE4\u548C"?o+=2018:t[Sf]=="\u5E73\u6210"?o+=1988:t[Sf]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=SD.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};Oa.default=Of});var mb=k(Da=>{"use strict";var AD=Da&&Da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Da,"__esModule",{value:!0});var PD=AD(Gr()),Df=class extends PD.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};Da.default=Df});var gb=k(Dr=>{"use strict";var ND=Dr&&Dr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),ID=Dr&&Dr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),FD=Dr&&Dr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&ND(e,r,t);return ID(e,r),e},LD=Dr&&Dr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dr,"__esModule",{value:!0});var UD=LD(we()),hb=ze(),xf=FD(pn()),WD=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Rf=class{pattern(){return WD}extract(e,t){let n=t[0],i=UD.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return xf.yesterday(e.reference);case"\u660E\u65E5":return xf.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return xf.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",hb.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",hb.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};Dr.default=Rf});var Tb=k(et=>{"use strict";var Mf=et&&et.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(et,"__esModule",{value:!0});et.createConfiguration=et.createCasualConfiguration=et.parseDate=et.parse=et.strict=et.casual=void 0;var qD=Mf(pb()),$D=Mf(mb()),jD=Mf(gb()),yb=kr();et.casual=new yb.Chrono(bb());et.strict=new yb.Chrono(Cf());function GD(r,e,t){return et.casual.parse(r,e,t)}et.parse=GD;function YD(r,e,t){return et.casual.parseDate(r,e,t)}et.parseDate=YD;function bb(){let r=Cf();return r.parsers.unshift(new jD.default),r}et.createCasualConfiguration=bb;function Cf(){return{parsers:[new qD.default],refiners:[new $D.default]}}et.createConfiguration=Cf});var mu=k(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.parseYear=Br.YEAR_PATTERN=Br.MONTH_DICTIONARY=Br.WEEKDAY_DICTIONARY=void 0;Br.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};Br.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};Br.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function BD(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}Br.parseYear=BD});var vb=k(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});var _b=mu(),HD=Re(),VD=V(),zD=fi(),KD=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${HD.matchAnyPattern(_b.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),QD=1,XD=2,ZD=3,Af=class extends VD.AbstractParserWithWordBoundaryChecking{innerPattern(){return KD}innerExtract(e,t){let n=t[XD].toLowerCase(),i=_b.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[QD],a=t[ZD],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=zD.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Pf.default=Af});var wb=k(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});var JD=ci(),Nf=class extends JD.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};If.default=Nf});var kb=k(xa=>{"use strict";var ex=xa&&xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xa,"__esModule",{value:!0});var tx=ex(cn()),Ff=class extends tx.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};xa.default=Ff});var Eb=k(Ra=>{"use strict";var rx=Ra&&Ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ra,"__esModule",{value:!0});var nx=rx(Gr()),Lf=class extends nx.default{patternBetween(){return/^\s*(?:-)\s*$/i}};Ra.default=Lf});var Mb=k(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});var ix=ot(),xb=mu(),Rb=mu(),sx=Re(),ax=V(),ox=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*)(${sx.matchAnyPattern(xb.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Rb.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Sb=1,Ob=2,ux=3,Db=4,Uf=class extends ax.AbstractParserWithWordBoundaryChecking{innerPattern(){return ox}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=xb.MONTH_DICTIONARY[t[ux].toLowerCase()],s=parseInt(t[Sb]);if(s>31)return t.index=t.index+t[Sb].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Db]){let a=Rb.parseYear(t[Db]);n.start.assign("year",a)}else{let a=ix.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Ob]){let a=parseInt(t[Ob]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Wf.default=Uf});var Cb=k(mn=>{"use strict";var lx=mn&&mn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),cx=mn&&mn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),dx=mn&&mn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&lx(e,r,t);return cx(e,r),e};Object.defineProperty(mn,"__esModule",{value:!0});var fx=V(),hu=dx(pn()),qf=class extends fx.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"agora":return hu.now(e.reference);case"hoje":return hu.today(e.reference);case"amanha":case"amanh\xE3":return hu.tomorrow(e.reference);case"ontem":return hu.yesterday(e.reference)}return i}};mn.default=qf});var Ab=k(Ma=>{"use strict";var px=Ma&&Ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ma,"__esModule",{value:!0});var gu=ze(),mx=V(),hx=ir(),gx=px(we()),$f=class extends mx.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=gx.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",gu.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",gu.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",gu.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":hx.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",gu.Meridiem.AM),i.imply("hour",12);break}return i}};Ma.default=$f});var Ib=k(tt=>{"use strict";var jn=tt&&tt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tt,"__esModule",{value:!0});tt.createConfiguration=tt.createCasualConfiguration=tt.parseDate=tt.parse=tt.strict=tt.casual=void 0;var yx=dn(),Pb=kr(),bx=jn(pi()),Tx=jn(vb()),_x=jn(wb()),vx=jn(kb()),wx=jn(Eb()),kx=jn(Mb()),Ex=jn(Cb()),Sx=jn(Ab());tt.casual=new Pb.Chrono(Nb());tt.strict=new Pb.Chrono(jf(!0));function Ox(r,e,t){return tt.casual.parse(r,e,t)}tt.parse=Ox;function Dx(r,e,t){return tt.casual.parseDate(r,e,t)}tt.parseDate=Dx;function Nb(r=!0){let e=jf(!1,r);return e.parsers.push(new Ex.default),e.parsers.push(new Sx.default),e}tt.createCasualConfiguration=Nb;function jf(r=!0,e=!0){return yx.includeCommonConfiguration({parsers:[new bx.default(e),new Tx.default,new _x.default,new kx.default],refiners:[new vx.default,new wx.default]},r)}tt.createConfiguration=jf});var Fb=k(Ca=>{"use strict";var xx=Ca&&Ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ca,"__esModule",{value:!0});var Rx=xx(Gr()),Gf=class extends Rx.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Ca.default=Gf});var Lb=k(Aa=>{"use strict";var Mx=Aa&&Aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Aa,"__esModule",{value:!0});var Cx=Mx(cn()),Yf=class extends Cx.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};Aa.default=Yf});var Ub=k(hn=>{"use strict";var Ax=hn&&hn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Px=hn&&hn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Nx=hn&&hn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Ax(e,r,t);return Px(e,r),e};Object.defineProperty(hn,"__esModule",{value:!0});var Ix=V(),yu=Nx(pn()),Bf=class extends Ix.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"nu":return yu.now(e.reference);case"vandaag":return yu.today(e.reference);case"morgen":case"morgend":return yu.tomorrow(e.reference);case"gisteren":return yu.yesterday(e.reference)}return i}};hn.default=Bf});var Wb=k(Pa=>{"use strict";var Fx=Pa&&Pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pa,"__esModule",{value:!0});var bu=ze(),Lx=V(),Ux=Fx(we()),Wx=ir(),qx=1,$x=2,Hf=class extends Lx.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=Ux.default(e.refDate),i=e.createParsingComponents();switch(t[qx]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[$x].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",bu.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",bu.Meridiem.PM),i.imply("hour",20);break;case"middernacht":Wx.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",bu.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",bu.Meridiem.AM),i.imply("hour",12);break}return i}};Pa.default=Hf});var Gt=k(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.parseTimeUnits=ge.TIME_UNITS_PATTERN=ge.parseYear=ge.YEAR_PATTERN=ge.parseOrdinalNumberPattern=ge.ORDINAL_NUMBER_PATTERN=ge.parseNumberPattern=ge.NUMBER_PATTERN=ge.TIME_UNIT_DICTIONARY=ge.ORDINAL_WORD_DICTIONARY=ge.INTEGER_WORD_DICTIONARY=ge.MONTH_DICTIONARY=ge.WEEKDAY_DICTIONARY=void 0;var Tu=Re(),jx=ot();ge.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};ge.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};ge.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};ge.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};ge.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};ge.NUMBER_PATTERN=`(?:${Tu.matchAnyPattern(ge.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function $b(r){let e=r.toLowerCase();return ge.INTEGER_WORD_DICTIONARY[e]!==void 0?ge.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}ge.parseNumberPattern=$b;ge.ORDINAL_NUMBER_PATTERN=`(?:${Tu.matchAnyPattern(ge.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function Gx(r){let e=r.toLowerCase();return ge.ORDINAL_WORD_DICTIONARY[e]!==void 0?ge.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}ge.parseOrdinalNumberPattern=Gx;ge.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function Yx(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return jx.findMostLikelyADYear(e)}ge.parseYear=Yx;var jb=`(${ge.NUMBER_PATTERN})\\s{0,5}(${Tu.matchAnyPattern(ge.TIME_UNIT_DICTIONARY)})\\s{0,5}`,qb=new RegExp(jb,"i");ge.TIME_UNITS_PATTERN=Tu.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",jb);function Bx(r){let e={},t=r,n=qb.exec(t);for(;n;)Hx(e,n),t=t.substring(n[0].length),n=qb.exec(t);return e}ge.parseTimeUnits=Bx;function Hx(r,e){let t=$b(e[1]),n=ge.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Yb=k(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});var Gb=Gt(),Vx=We(),zx=V(),Vf=class extends zx.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+Gb.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=Gb.parseTimeUnits(t[1]);return Vx.ParsingComponents.createRelativeFromReference(e.reference,n)}};zf.default=Vf});var Hb=k(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var Bb=Gt(),Kx=Re(),Qx=V(),Xx=fi(),Zx=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${Kx.matchAnyPattern(Bb.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),Jx=1,eR=2,tR=3,Kf=class extends Qx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Zx}innerExtract(e,t){let n=t[eR].toLowerCase(),i=Bb.WEEKDAY_DICTIONARY[n],s=t[Jx],a=t[tR],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=Xx.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Qf.default=Kf});var Zb=k(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var rR=ot(),Qb=Gt(),_u=Gt(),Xb=Gt(),nR=Re(),iR=V(),sR=new RegExp(`(?:on\\s*?)?(${_u.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${_u.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+nR.matchAnyPattern(Qb.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Xb.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),aR=3,Vb=1,zb=2,Kb=4,Xf=class extends iR.AbstractParserWithWordBoundaryChecking{innerPattern(){return sR}innerExtract(e,t){let n=Qb.MONTH_DICTIONARY[t[aR].toLowerCase()],i=_u.parseOrdinalNumberPattern(t[Vb]);if(i>31)return t.index=t.index+t[Vb].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[Kb]){let u=Xb.parseYear(t[Kb]);s.assign("year",u)}else{let u=rR.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[zb])return s;let a=_u.parseOrdinalNumberPattern(t[zb]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Zf.default=Xf});var rT=k(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});var eT=Gt(),oR=ot(),uR=Re(),tT=Gt(),lR=V(),cR=new RegExp(`(${uR.matchAnyPattern(eT.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${tT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),dR=1,Jb=2,Jf=class extends lR.AbstractParserWithWordBoundaryChecking{innerPattern(){return cR}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[dR],s=eT.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[Jb]){let a=tT.parseYear(t[Jb]);n.assign("year",a)}else{let a=oR.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};ep.default=Jf});var nT=k(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});var fR=V(),pR=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),mR=1,hR=2,tp=class extends fR.AbstractParserWithWordBoundaryChecking{innerPattern(){return pR}innerExtract(e,t){let n=parseInt(t[hR]),i=parseInt(t[mR]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};rp.default=tp});var iT=k(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});var gR=ci(),np=class extends gR.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};ip.default=np});var oT=k(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});var aT=Gt(),yR=Re(),bR=V(),TR=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${yR.matchAnyPattern(aT.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),_R=1,vR=2,sT=3,wR=4,sp=class extends bR.AbstractParserWithWordBoundaryChecking{innerPattern(){return TR}innerExtract(e,t){let n=t[sT]?parseInt(t[sT]):aT.MONTH_DICTIONARY[t[vR].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[_R]);return{day:parseInt(t[wR]),month:n,year:i}}};ap.default=sp});var uT=k(Na=>{"use strict";var kR=Na&&Na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Na,"__esModule",{value:!0});var ER=V(),vu=ze(),op=ir(),SR=kR(we()),OR=1,DR=2,up=class extends ER.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[OR].toLowerCase(),i=t[DR].toLowerCase(),s=e.createParsingComponents(),a=SR.default(e.refDate);switch(n){case"gisteren":op.assignSimilarDate(s,a.add(-1,"day"));break;case"van":op.assignSimilarDate(s,a);break;case"morgen":op.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",vu.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",vu.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",vu.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",vu.Meridiem.PM),s.imply("hour",20);break}return s}};Na.default=up});var cT=k(cp=>{"use strict";Object.defineProperty(cp,"__esModule",{value:!0});var lT=Gt(),xR=We(),RR=V(),MR=sr(),CR=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${lT.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),lp=class extends RR.AbstractParserWithWordBoundaryChecking{innerPattern(){return CR}innerExtract(e,t){let n=t[1].toLowerCase(),i=lT.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=MR.reverseTimeUnits(i);break}return xR.ParsingComponents.createRelativeFromReference(e.reference,i)}};cp.default=lp});var pT=k(Ia=>{"use strict";var AR=Ia&&Ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ia,"__esModule",{value:!0});var fT=Gt(),dT=We(),PR=AR(we()),NR=V(),IR=Re(),FR=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${IR.matchAnyPattern(fT.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),LR=1,UR=2,dp=class extends NR.AbstractParserWithWordBoundaryChecking{innerPattern(){return FR}innerExtract(e,t){let n=t[LR].toLowerCase(),i=t[UR].toLowerCase(),s=fT.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,dT.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,dT.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=PR.default(e.reference.instant);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(/maand/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(/jaar/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}};Ia.default=dp});var mT=k(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});var pp=Gt(),WR=We(),qR=V(),$R=sr(),jR=new RegExp("("+pp.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),GR=new RegExp("("+pp.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),fp=class extends qR.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?GR:jR}innerExtract(e,t){let n=pp.parseTimeUnits(t[1]),i=$R.reverseTimeUnits(n);return WR.ParsingComponents.createRelativeFromReference(e.reference,i)}};mp.default=fp});var hT=k(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});var gp=Gt(),YR=We(),BR=V(),HR=new RegExp("("+gp.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),VR=new RegExp("("+gp.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),zR=1,hp=class extends BR.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?VR:HR}innerExtract(e,t){let n=gp.parseTimeUnits(t[zR]);return YR.ParsingComponents.createRelativeFromReference(e.reference,n)}};yp.default=hp});var TT=k(rt=>{"use strict";var lt=rt&&rt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rt,"__esModule",{value:!0});rt.createConfiguration=rt.createCasualConfiguration=rt.parseDate=rt.parse=rt.strict=rt.casual=void 0;var KR=dn(),gT=kr(),QR=lt(Fb()),XR=lt(Lb()),ZR=lt(Ub()),JR=lt(Wb()),eM=lt(pi()),tM=lt(Yb()),rM=lt(Hb()),nM=lt(Zb()),yT=lt(rT()),iM=lt(nT()),sM=lt(iT()),aM=lt(oT()),oM=lt(uT()),uM=lt(cT()),lM=lt(pT()),cM=lt(mT()),dM=lt(hT());rt.casual=new gT.Chrono(bT());rt.strict=new gT.Chrono(bp(!0));function fM(r,e,t){return rt.casual.parse(r,e,t)}rt.parse=fM;function pM(r,e,t){return rt.casual.parseDate(r,e,t)}rt.parseDate=pM;function bT(r=!0){let e=bp(!1,r);return e.parsers.unshift(new ZR.default),e.parsers.unshift(new JR.default),e.parsers.unshift(new oM.default),e.parsers.unshift(new yT.default),e.parsers.unshift(new lM.default),e.parsers.unshift(new uM.default),e}rt.createCasualConfiguration=bT;function bp(r=!0,e=!0){return KR.includeCommonConfiguration({parsers:[new eM.default(e),new tM.default,new nM.default,new yT.default,new rM.default,new aM.default,new iM.default,new sM.default(r),new cM.default(r),new dM.default(r)],refiners:[new XR.default,new QR.default]},r)}rt.createConfiguration=bp});var kT=k(Fa=>{"use strict";var mM=Fa&&Fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fa,"__esModule",{value:!0});var hM=mM(we()),gM=V(),yM=1,_T=2,bM=3,vT=4,wT=5,TM=6,Tp=class extends gM.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=hM.default(e.refDate),a=s;if(t[yM])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[_T]){let o=t[_T],u=t[bM];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[vT]){let u=t[vT][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[wT]){let o=t[wT];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[TM];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Fa.default=Tp});var as=k(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.zhStringToYear=Ct.zhStringToNumber=Ct.WEEKDAY_OFFSET=Ct.NUMBER=void 0;Ct.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};Ct.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function _M(r){let e=0;for(let t=0;t{"use strict";var wM=La&&La.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(La,"__esModule",{value:!0});var kM=wM(we()),EM=V(),gi=as(),_p=1,ET=2,vp=3,wp=class extends EM.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(gi.NUMBER).join("")+"]{4}|["+Object.keys(gi.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(gi.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(gi.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=kM.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[ET]);if(isNaN(s)&&(s=gi.zhStringToNumber(t[ET])),i.start.assign("month",s),t[vp]){let a=parseInt(t[vp]);isNaN(a)&&(a=gi.zhStringToNumber(t[vp])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[_p]){let a=parseInt(t[_p]);isNaN(a)&&(a=gi.zhStringToYear(t[_p])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};La.default=wp});var DT=k(Ua=>{"use strict";var SM=Ua&&Ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ua,"__esModule",{value:!0});var OM=SM(we()),DM=V(),OT=as(),xM=new RegExp("(\\d+|["+Object.keys(OT.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),kp=1,RM=2,Ep=class extends DM.AbstractParserWithWordBoundaryChecking{innerPattern(){return xM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[kp]);if(isNaN(i)&&(i=OT.zhStringToNumber(t[kp])),isNaN(i)){let u=t[kp];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=OM.default(e.refDate),o=t[RM][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Ua.default=Ep});var RT=k(Wa=>{"use strict";var MM=Wa&&Wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wa,"__esModule",{value:!0});var CM=MM(we()),AM=V(),xT=as(),PM=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(xT.WEEKDAY_OFFSET).join("|")+")"),Sp=class extends AM.AbstractParserWithWordBoundaryChecking{innerPattern(){return PM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=xT.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=CM.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var NM=qa&&qa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qa,"__esModule",{value:!0});var IM=NM(we()),FM=V(),ur=as(),LM=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(ur.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(ur.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(ur.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),UM=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(ur.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(ur.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(ur.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),wu=1,ku=2,Eu=3,Su=4,Ou=5,Du=6,or=7,os=8,xu=9,Op=class extends FM.AbstractParserWithWordBoundaryChecking{innerPattern(){return LM}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=IM.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[wu]){var a=t[wu];a=="\u660E"||a=="\u807D"?n.hour()>1&&s.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?s.add(-1,"day"):a=="\u524D"?s.add(-2,"day"):a=="\u5927\u524D"?s.add(-3,"day"):a=="\u5F8C"?s.add(2,"day"):a=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[Su]){var o=t[Su];o=="\u660E"||o=="\u807D"?s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s.add(-1,"day"):o=="\u524D"?s.add(-2,"day"):o=="\u5927\u524D"?s.add(-3,"day"):o=="\u5F8C"?s.add(2,"day"):o=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let u=0,l=0,c=-1;if(t[os]){var d=parseInt(t[os]);if(isNaN(d)&&(d=ur.zhStringToNumber(t[os])),d>=60)return null;i.start.assign("second",d)}if(u=parseInt(t[Du]),isNaN(u)&&(u=ur.zhStringToNumber(t[Du])),t[or]?t[or]=="\u534A"?l=30:t[or]=="\u6B63"||t[or]=="\u6574"?l=0:(l=parseInt(t[or]),isNaN(l)&&(l=ur.zhStringToNumber(t[or]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[xu]){if(u>12)return null;var p=t[xu][0].toLowerCase();p=="a"&&(c=0,u==12&&(u=0)),p=="p"&&(c=1,u!=12&&(u+=12))}else if(t[ku]){var m=t[ku],y=m[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[Eu]){var _=t[Eu],b=_[0];b=="\u4E0A"||b=="\u671D"||b=="\u65E9"||b=="\u51CC"?(c=0,u==12&&(u=0)):(b=="\u4E0B"||b=="\u664F"||b=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Ou]){var E=t[Ou],R=E[0];R=="\u4E0A"||R=="\u671D"||R=="\u65E9"||R=="\u51CC"?(c=0,u==12&&(u=0)):(R=="\u4E0B"||R=="\u664F"||R=="\u665A")&&(c=1,u!=12&&(u+=12))}if(i.start.assign("hour",u),i.start.assign("minute",l),c>=0?i.start.assign("meridiem",c):u<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=UM.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let S=s.clone();if(i.end=e.createParsingComponents(),t[wu]){var a=t[wu];a=="\u660E"||a=="\u807D"?n.hour()>1&&S.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?S.add(-1,"day"):a=="\u524D"?S.add(-2,"day"):a=="\u5927\u524D"?S.add(-3,"day"):a=="\u5F8C"?S.add(2,"day"):a=="\u5927\u5F8C"&&S.add(3,"day"),i.end.assign("day",S.date()),i.end.assign("month",S.month()+1),i.end.assign("year",S.year())}else if(t[Su]){var o=t[Su];o=="\u660E"||o=="\u807D"?S.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?S.add(-1,"day"):o=="\u524D"?S.add(-2,"day"):o=="\u5927\u524D"?S.add(-3,"day"):o=="\u5F8C"?S.add(2,"day"):o=="\u5927\u5F8C"&&S.add(3,"day"),i.end.assign("day",S.date()),i.end.assign("month",S.month()+1),i.end.assign("year",S.year())}else i.end.imply("day",S.date()),i.end.imply("month",S.month()+1),i.end.imply("year",S.year());if(u=0,l=0,c=-1,t[os]){var d=parseInt(t[os]);if(isNaN(d)&&(d=ur.zhStringToNumber(t[os])),d>=60)return null;i.end.assign("second",d)}if(u=parseInt(t[Du]),isNaN(u)&&(u=ur.zhStringToNumber(t[Du])),t[or]?t[or]=="\u534A"?l=30:t[or]=="\u6B63"||t[or]=="\u6574"?l=0:(l=parseInt(t[or]),isNaN(l)&&(l=ur.zhStringToNumber(t[or]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[xu]){if(u>12)return null;var p=t[xu][0].toLowerCase();p=="a"&&(c=0,u==12&&(u=0)),p=="p"&&(c=1,u!=12&&(u+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[ku]){var m=t[ku],y=m[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[Eu]){var _=t[Eu],b=_[0];b=="\u4E0A"||b=="\u671D"||b=="\u65E9"||b=="\u51CC"?(c=0,u==12&&(u=0)):(b=="\u4E0B"||b=="\u664F"||b=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[Ou]){var E=t[Ou],R=E[0];R=="\u4E0A"||R=="\u671D"||R=="\u65E9"||R=="\u51CC"?(c=0,u==12&&(u=0)):(R=="\u4E0B"||R=="\u664F"||R=="\u665A")&&(c=1,u!=12&&(u+=12))}return i.text=i.text+t[0],i.end.assign("hour",u),i.end.assign("minute",l),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>u?i.end.imply("meridiem",0):u>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var WM=$a&&$a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($a,"__esModule",{value:!0});var qM=WM(we()),$M=V(),CT=as(),jM=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(CT.WEEKDAY_OFFSET).join("|")+")"),Dp=class extends $M.AbstractParserWithWordBoundaryChecking{innerPattern(){return jM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=CT.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=qM.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var GM=ja&&ja.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ja,"__esModule",{value:!0});var YM=GM(Gr()),xp=class extends YM.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};ja.default=xp});var NT=k(Ga=>{"use strict";var BM=Ga&&Ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ga,"__esModule",{value:!0});var HM=BM(cn()),Rp=class extends HM.default{patternBetween(){return/^\s*$/i}};Ga.default=Rp});var IT=k(Ye=>{"use strict";var gn=Ye&&Ye.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.createConfiguration=Ye.createCasualConfiguration=Ye.parseDate=Ye.parse=Ye.strict=Ye.casual=Ye.hant=void 0;var Mp=kr(),VM=gn(iu()),zM=dn(),KM=gn(kT()),QM=gn(ST()),XM=gn(DT()),ZM=gn(RT()),JM=gn(MT()),eC=gn(AT()),tC=gn(PT()),rC=gn(NT());Ye.hant=new Mp.Chrono(Cp());Ye.casual=new Mp.Chrono(Cp());Ye.strict=new Mp.Chrono(Ap());function nC(r,e,t){return Ye.casual.parse(r,e,t)}Ye.parse=nC;function iC(r,e,t){return Ye.casual.parseDate(r,e,t)}Ye.parseDate=iC;function Cp(){let r=Ap();return r.parsers.unshift(new KM.default),r}Ye.createCasualConfiguration=Cp;function Ap(){let r=zM.includeCommonConfiguration({parsers:[new QM.default,new ZM.default,new eC.default,new JM.default,new XM.default],refiners:[new tC.default,new rC.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof VM.default)),r}Ye.createConfiguration=Ap});var WT=k(Ya=>{"use strict";var sC=Ya&&Ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ya,"__esModule",{value:!0});var aC=sC(we()),oC=V(),uC=1,FT=2,lC=3,LT=4,UT=5,cC=6,Pp=class extends oC.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=aC.default(e.refDate),a=s;if(t[uC])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[FT]){let o=t[FT],u=t[lC];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[LT]){let u=t[LT][0];u=="\u65E9"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[UT]){let o=t[UT];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[cC];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Ya.default=Pp});var us=k(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.zhStringToYear=At.zhStringToNumber=At.WEEKDAY_OFFSET=At.NUMBER=void 0;At.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};At.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function dC(r){let e=0;for(let t=0;t{"use strict";var pC=Ba&&Ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ba,"__esModule",{value:!0});var mC=pC(we()),hC=V(),yi=us(),Np=1,qT=2,Ip=3,Fp=class extends hC.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(yi.NUMBER).join("")+"]{4}|["+Object.keys(yi.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(yi.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(yi.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=mC.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[qT]);if(isNaN(s)&&(s=yi.zhStringToNumber(t[qT])),i.start.assign("month",s),t[Ip]){let a=parseInt(t[Ip]);isNaN(a)&&(a=yi.zhStringToNumber(t[Ip])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[Np]){let a=parseInt(t[Np]);isNaN(a)&&(a=yi.zhStringToYear(t[Np])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Ba.default=Fp});var GT=k(Ha=>{"use strict";var gC=Ha&&Ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ha,"__esModule",{value:!0});var yC=gC(we()),bC=V(),jT=us(),TC=new RegExp("(\\d+|["+Object.keys(jT.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),Lp=1,_C=2,Up=class extends bC.AbstractParserWithWordBoundaryChecking{innerPattern(){return TC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Lp]);if(isNaN(i)&&(i=jT.zhStringToNumber(t[Lp])),isNaN(i)){let u=t[Lp];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=yC.default(e.refDate),o=t[_C][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u793C"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};Ha.default=Up});var BT=k(Va=>{"use strict";var vC=Va&&Va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Va,"__esModule",{value:!0});var wC=vC(we()),kC=V(),YT=us(),EC=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(YT.WEEKDAY_OFFSET).join("|")+")"),Wp=class extends kC.AbstractParserWithWordBoundaryChecking{innerPattern(){return EC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=YT.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=wC.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c){"use strict";var SC=za&&za.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(za,"__esModule",{value:!0});var OC=SC(we()),DC=V(),cr=us(),xC=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(cr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(cr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(cr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),RC=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(cr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(cr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(cr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Ru=1,Mu=2,Cu=3,Au=4,Pu=5,Nu=6,lr=7,ls=8,Iu=9,qp=class extends DC.AbstractParserWithWordBoundaryChecking{innerPattern(){return xC}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=OC.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[Ru]){let c=t[Ru];c=="\u660E"?n.hour()>1&&s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[Au]){let c=t[Au];c=="\u660E"?s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let a=0,o=0,u=-1;if(t[ls]){let c=parseInt(t[ls]);if(isNaN(c)&&(c=cr.zhStringToNumber(t[ls])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[Nu]),isNaN(a)&&(a=cr.zhStringToNumber(t[Nu])),t[lr]?t[lr]=="\u534A"?o=30:t[lr]=="\u6B63"||t[lr]=="\u6574"?o=0:(o=parseInt(t[lr]),isNaN(o)&&(o=cr.zhStringToNumber(t[lr]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Iu]){if(a>12)return null;let c=t[Iu][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[Mu]){let d=t[Mu][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[Cu]){let d=t[Cu][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Pu]){let d=t[Pu][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),u>=0?i.start.assign("meridiem",u):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=RC.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let l=s.clone();if(i.end=e.createParsingComponents(),t[Ru]){let c=t[Ru];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else if(t[Au]){let c=t[Au];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else i.end.imply("day",l.date()),i.end.imply("month",l.month()+1),i.end.imply("year",l.year());if(a=0,o=0,u=-1,t[ls]){let c=parseInt(t[ls]);if(isNaN(c)&&(c=cr.zhStringToNumber(t[ls])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[Nu]),isNaN(a)&&(a=cr.zhStringToNumber(t[Nu])),t[lr]?t[lr]=="\u534A"?o=30:t[lr]=="\u6B63"||t[lr]=="\u6574"?o=0:(o=parseInt(t[lr]),isNaN(o)&&(o=cr.zhStringToNumber(t[lr]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Iu]){if(a>12)return null;let c=t[Iu][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(u==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[Mu]){let d=t[Mu][0];d=="\u65E9"?(u=0,a==12&&(a=0)):d=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[Cu]){let d=t[Cu][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Pu]){let d=t[Pu][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(u=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(u=1,a!=12&&(a+=12))}return i.text=i.text+t[0],i.end.assign("hour",a),i.end.assign("minute",o),u>=0?i.end.assign("meridiem",u):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var MC=Ka&&Ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ka,"__esModule",{value:!0});var CC=MC(we()),AC=V(),VT=us(),PC=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(VT.WEEKDAY_OFFSET).join("|")+")"),$p=class extends AC.AbstractParserWithWordBoundaryChecking{innerPattern(){return PC}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=VT.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=CC.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u){"use strict";var NC=Qa&&Qa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qa,"__esModule",{value:!0});var IC=NC(Gr()),jp=class extends IC.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Qa.default=jp});var QT=k(Xa=>{"use strict";var FC=Xa&&Xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xa,"__esModule",{value:!0});var LC=FC(cn()),Gp=class extends LC.default{patternBetween(){return/^\s*$/i}};Xa.default=Gp});var XT=k(Be=>{"use strict";var yn=Be&&Be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Be,"__esModule",{value:!0});Be.createConfiguration=Be.createCasualConfiguration=Be.parseDate=Be.parse=Be.strict=Be.casual=Be.hans=void 0;var Yp=kr(),UC=yn(iu()),WC=dn(),qC=yn(WT()),$C=yn($T()),jC=yn(GT()),GC=yn(BT()),YC=yn(HT()),BC=yn(zT()),HC=yn(KT()),VC=yn(QT());Be.hans=new Yp.Chrono(Bp());Be.casual=new Yp.Chrono(Bp());Be.strict=new Yp.Chrono(Hp());function zC(r,e,t){return Be.casual.parse(r,e,t)}Be.parse=zC;function KC(r,e,t){return Be.casual.parseDate(r,e,t)}Be.parseDate=KC;function Bp(){let r=Hp();return r.parsers.unshift(new qC.default),r}Be.createCasualConfiguration=Bp;function Hp(){let r=WC.includeCommonConfiguration({parsers:[new $C.default,new GC.default,new BC.default,new YC.default,new jC.default],refiners:[new HC.default,new VC.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof UC.default)),r}Be.createConfiguration=Hp});var JT=k(Yt=>{"use strict";var ZT=Yt&&Yt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),QC=Yt&&Yt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),XC=Yt&&Yt.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&ZT(e,r,t)},ZC=Yt&&Yt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&ZT(e,r,t);return QC(e,r),e};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.hans=void 0;XC(IT(),Yt);Yt.hans=ZC(XT())});var Pt=k(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.parseTimeUnits=se.TIME_UNITS_PATTERN=se.parseYear=se.YEAR_PATTERN=se.parseOrdinalNumberPattern=se.ORDINAL_NUMBER_PATTERN=se.parseNumberPattern=se.NUMBER_PATTERN=se.TIME_UNIT_DICTIONARY=se.ORDINAL_WORD_DICTIONARY=se.INTEGER_WORD_DICTIONARY=se.MONTH_DICTIONARY=se.FULL_MONTH_NAME_DICTIONARY=se.WEEKDAY_DICTIONARY=se.REGEX_PARTS=void 0;var Fu=Re(),JC=ot();se.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};se.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};se.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};se.MONTH_DICTIONARY=Object.assign(Object.assign({},se.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});se.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};se.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};se.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};se.NUMBER_PATTERN=`(?:${Fu.matchAnyPattern(se.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function t_(r){let e=r.toLowerCase();return se.INTEGER_WORD_DICTIONARY[e]!==void 0?se.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}se.parseNumberPattern=t_;se.ORDINAL_NUMBER_PATTERN=`(?:${Fu.matchAnyPattern(se.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function eA(r){let e=r.toLowerCase();return se.ORDINAL_WORD_DICTIONARY[e]!==void 0?se.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}se.parseOrdinalNumberPattern=eA;var Vp="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";se.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${Vp}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${Vp}|[5-9][0-9]${Vp})`;function tA(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return JC.findMostLikelyADYear(e)}se.parseYear=tA;var r_=`(${se.NUMBER_PATTERN})\\s{0,3}(${Fu.matchAnyPattern(se.TIME_UNIT_DICTIONARY)})`,e_=new RegExp(r_,"i");se.TIME_UNITS_PATTERN=Fu.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",r_);function rA(r){let e={},t=r,n=e_.exec(t);for(;n;)nA(e,n),t=t.substring(n[0].length).trim(),n=e_.exec(t);return e}se.parseTimeUnits=rA;function nA(r,e){let t=t_(e[1]),n=se.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var i_=k(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});var Za=Pt(),iA=We(),sA=V(),n_=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Za.TIME_UNITS_PATTERN})${Za.REGEX_PARTS.rightBoundary}`,aA=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${n_}`,Za.REGEX_PARTS.flags),oA=new RegExp(n_,"i"),zp=class extends sA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Za.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?oA:aA}innerExtract(e,t){let n=Za.parseTimeUnits(t[1]);return iA.ParsingComponents.createRelativeFromReference(e.reference,n)}};Kp.default=zp});var l_=k(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0});var uA=ot(),Ja=Pt(),u_=Pt(),Lu=Pt(),lA=Re(),cA=V(),dA=new RegExp(`(?:\u0441)?\\s*(${Lu.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Lu.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${lA.matchAnyPattern(Ja.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${u_.YEAR_PATTERN}(?![^\\s]\\d)))?${Ja.REGEX_PARTS.rightBoundary}`,Ja.REGEX_PARTS.flags),s_=1,a_=2,fA=3,o_=4,Qp=class extends cA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ja.REGEX_PARTS.leftBoundary}innerPattern(){return dA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Ja.MONTH_DICTIONARY[t[fA].toLowerCase()],s=Lu.parseOrdinalNumberPattern(t[s_]);if(s>31)return t.index=t.index+t[s_].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[o_]){let a=u_.parseYear(t[o_]);n.start.assign("year",a)}else{let a=uA.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[a_]){let a=Lu.parseOrdinalNumberPattern(t[a_]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Xp.default=Qp});var f_=k(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});var eo=Pt(),pA=ot(),mA=Re(),d_=Pt(),hA=V(),gA=new RegExp(`((?:\u0432)\\s*)?(${mA.matchAnyPattern(eo.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${d_.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,eo.REGEX_PARTS.flags),yA=2,c_=3,Zp=class extends hA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return eo.REGEX_PARTS.leftBoundary}innerPattern(){return gA}innerExtract(e,t){let n=t[yA].toLowerCase();if(t[0].length<=3&&!eo.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index,t.index+t[0].length);i.start.imply("day",1);let s=eo.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[c_]){let a=d_.parseYear(t[c_]);i.start.assign("year",a)}else{let a=pA.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Jp.default=Zp});var m_=k(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var Uu=ze(),bA=ci(),p_=Pt(),em=class extends bA.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return p_.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${p_.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Uu.Meridiem.PM)):i<6&&n.assign("meridiem",Uu.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Uu.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Uu.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};tm.default=em});var h_=k(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});var Wu=Pt(),TA=We(),_A=V(),vA=sr(),wA=new RegExp(`(${Wu.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Wu.REGEX_PARTS.flags),rm=class extends _A.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Wu.REGEX_PARTS.leftBoundary}innerPattern(){return wA}innerExtract(e,t){let n=Wu.parseTimeUnits(t[1]),i=vA.reverseTimeUnits(n);return TA.ParsingComponents.createRelativeFromReference(e.reference,i)}};nm.default=rm});var g_=k(to=>{"use strict";var kA=to&&to.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(to,"__esModule",{value:!0});var EA=kA(Gr()),im=class extends EA.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};to.default=im});var y_=k(ro=>{"use strict";var SA=ro&&ro.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ro,"__esModule",{value:!0});var OA=SA(cn()),sm=class extends OA.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};ro.default=sm});var b_=k(bn=>{"use strict";var DA=bn&&bn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),xA=bn&&bn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),RA=bn&&bn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&DA(e,r,t);return xA(e,r),e};Object.defineProperty(bn,"__esModule",{value:!0});var MA=V(),no=RA(pn()),am=Pt(),CA=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${am.REGEX_PARTS.rightBoundary}`,am.REGEX_PARTS.flags),om=class extends MA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return am.REGEX_PARTS.leftBoundary}innerPattern(e){return CA}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return no.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return no.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return no.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return no.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return no.theDayBefore(e.reference,2)}return i}};bn.default=om});var T_=k(xr=>{"use strict";var AA=xr&&xr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),PA=xr&&xr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),NA=xr&&xr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&AA(e,r,t);return PA(e,r),e},IA=xr&&xr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xr,"__esModule",{value:!0});var FA=V(),bi=NA(pn()),LA=ir(),UA=IA(we()),um=Pt(),WA=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${um.REGEX_PARTS.rightBoundary}`,um.REGEX_PARTS.flags),lm=class extends FA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return um.REGEX_PARTS.leftBoundary}innerPattern(){return WA}innerExtract(e,t){let n=UA.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return bi.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return bi.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return bi.morning(e.reference);if(i.match(/в\s*полдень/))return bi.noon(e.reference);if(i.match(/прошлой\s*ночью/))return bi.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return bi.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),LA.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?bi.midnight(e.reference):s}};xr.default=lm});var __=k(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var io=Pt(),qA=Re(),$A=V(),jA=fi(),GA=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${qA.matchAnyPattern(io.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${io.REGEX_PARTS.rightBoundary}`,io.REGEX_PARTS.flags),YA=1,BA=2,HA=3,cm=class extends $A.AbstractParserWithWordBoundaryChecking{innerPattern(){return GA}patternLeftBoundary(){return io.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[BA].toLowerCase(),i=io.WEEKDAY_DICTIONARY[n],s=t[YA],a=t[HA],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=jA.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};dm.default=cm});var w_=k(ao=>{"use strict";var VA=ao&&ao.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ao,"__esModule",{value:!0});var so=Pt(),v_=We(),zA=VA(we()),KA=V(),QA=Re(),XA=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${QA.matchAnyPattern(so.TIME_UNIT_DICTIONARY)})(?=\\s*)${so.REGEX_PARTS.rightBoundary}`,so.REGEX_PARTS.flags),ZA=1,JA=2,fm=class extends KA.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return so.REGEX_PARTS.leftBoundary}innerPattern(){return XA}innerExtract(e,t){let n=t[ZA].toLowerCase(),i=t[JA].toLowerCase(),s=so.TIME_UNIT_DICTIONARY[i];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[s]=1,v_.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[s]=-1,v_.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=zA.default(e.reference.instant);return s.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())):s.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)):s.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}};ao.default=fm});var k_=k(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var oo=Pt(),eP=We(),tP=V(),rP=sr(),nP=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${oo.TIME_UNITS_PATTERN})${oo.REGEX_PARTS.rightBoundary}`,oo.REGEX_PARTS.flags),pm=class extends tP.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return oo.REGEX_PARTS.leftBoundary}innerPattern(){return nP}innerExtract(e,t){let n=t[1].toLowerCase(),i=oo.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=rP.reverseTimeUnits(i);break}return eP.ParsingComponents.createRelativeFromReference(e.reference,i)}};mm.default=pm});var O_=k(nt=>{"use strict";var Bt=nt&&nt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nt,"__esModule",{value:!0});nt.createConfiguration=nt.createCasualConfiguration=nt.parseDate=nt.parse=nt.strict=nt.casual=void 0;var iP=Bt(i_()),sP=Bt(l_()),aP=Bt(f_()),oP=Bt(m_()),uP=Bt(h_()),lP=Bt(g_()),cP=Bt(y_()),dP=dn(),fP=Bt(b_()),pP=Bt(T_()),mP=Bt(__()),hP=Bt(w_()),E_=kr(),gP=Bt(pi()),yP=Bt(k_());nt.casual=new E_.Chrono(S_());nt.strict=new E_.Chrono(hm(!0));function bP(r,e,t){return nt.casual.parse(r,e,t)}nt.parse=bP;function TP(r,e,t){return nt.casual.parseDate(r,e,t)}nt.parseDate=TP;function S_(){let r=hm(!1);return r.parsers.unshift(new fP.default),r.parsers.unshift(new pP.default),r.parsers.unshift(new aP.default),r.parsers.unshift(new hP.default),r.parsers.unshift(new yP.default),r}nt.createCasualConfiguration=S_;function hm(r=!0){return dP.includeCommonConfiguration({parsers:[new gP.default(!0),new iP.default,new sP.default,new mP.default,new oP.default(r),new uP.default],refiners:[new cP.default,new lP.default]},r)}nt.createConfiguration=hm});var ze=k(pe=>{"use strict";var _P=pe&&pe.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),vP=pe&&pe.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Gn=pe&&pe.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&_P(e,r,t);return vP(e,r),e};Object.defineProperty(pe,"__esModule",{value:!0});pe.parseDate=pe.parse=pe.casual=pe.strict=pe.ru=pe.zh=pe.nl=pe.pt=pe.ja=pe.fr=pe.de=pe.Meridiem=pe.Chrono=pe.en=void 0;var gm=Gn(Ad());pe.en=gm;var wP=kr();Object.defineProperty(pe,"Chrono",{enumerable:!0,get:function(){return wP.Chrono}});var kP;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(kP=pe.Meridiem||(pe.Meridiem={}));var EP=Gn(Iy());pe.de=EP;var SP=Gn(cb());pe.fr=SP;var OP=Gn(Tb());pe.ja=OP;var DP=Gn(Ib());pe.pt=DP;var xP=Gn(TT());pe.nl=xP;var RP=Gn(JT());pe.zh=RP;var MP=Gn(O_());pe.ru=MP;pe.strict=gm.strict;pe.casual=gm.casual;function CP(r,e,t){return pe.casual.parse(r,e,t)}pe.parse=CP;function AP(r,e,t){return pe.casual.parseDate(r,e,t)}pe.parseDate=AP});var Mv=k((xv,Rv)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(h){return Object.prototype.toString.call(h)==="[object Array]"},n=10,i=typeof process=="object"&&typeof process.nextTick=="function",s=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",u=o?setImmediate:setTimeout,l=s?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(f){var h=Object.getOwnPropertyNames(f);return h.push.apply(h,Object.getOwnPropertySymbols(f)),h}:Object.keys;function c(){this._events={},this._conf&&d.call(this,this._conf)}function d(f){f&&(this._conf=f,f.delimiter&&(this.delimiter=f.delimiter),f.maxListeners!==r&&(this._maxListeners=f.maxListeners),f.wildcard&&(this.wildcard=f.wildcard),f.newListener&&(this._newListener=f.newListener),f.removeListener&&(this._removeListener=f.removeListener),f.verboseMemoryLeak&&(this.verboseMemoryLeak=f.verboseMemoryLeak),f.ignoreErrors&&(this.ignoreErrors=f.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function p(f,h){var g="(node) warning: possible EventEmitter memory leak detected. "+f+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(g+=" Event name: "+h+"."),typeof process!="undefined"&&process.emitWarning){var T=new Error(g);T.name="MaxListenersExceededWarning",T.emitter=this,T.count=f,process.emitWarning(T)}else console.error(g),console.trace&&console.trace()}var m=function(f,h,g){var T=arguments.length;switch(T){case 0:return[];case 1:return[f];case 2:return[f,h];case 3:return[f,h,g];default:for(var w=new Array(T);T--;)w[T]=arguments[T];return w}};function y(f,h){for(var g={},T,w=f.length,O=h?h.length:0,M=0;M0;)f=O[v],M.call(A,f,g[f]);this._listeners={},this._listenersCount=0,x()}}});function b(f,h,g,T){var w=Object.assign({},h);if(!f)return w;if(typeof f!="object")throw TypeError("options must be an object");var O=Object.keys(f),M=O.length,A,v,x;function N(le){throw Error('Invalid "'+A+'" option value'+(le?". Reason: "+le:""))}for(var re=0;re0;)if(A===f[v])return O;M(h)}}var S=R(["function"]),F=R(["object","function"]);function q(f,h,g){var T,w,O=0,M,A=new f(function(v,x,N){g=b(g,{timeout:0,overload:!1},{timeout:function(Ne,Ce){return Ne*=1,(typeof Ne!="number"||Ne<0||!Number.isFinite(Ne))&&Ce("timeout must be a positive number"),Ne}}),T=!g.overload&&typeof f.prototype.cancel=="function"&&typeof N=="function";function re(){w&&(w=null),O&&(clearTimeout(O),O=0)}var le=function(Ne){re(),v(Ne)},fe=function(Ne){re(),x(Ne)};T?h(le,fe,N):(w=[function(Ne){fe(Ne||Error("canceled"))}],h(le,fe,function(Ne){if(M)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Ne!="function")throw TypeError("onCancel callback must be a function");w.push(Ne)}),M=!0),g.timeout>0&&(O=setTimeout(function(){var Ne=Error("timeout");Ne.code="ETIMEDOUT",O=0,A.cancel(Ne),x(Ne)},g.timeout))});return T||(A.cancel=function(v){if(!!w){for(var x=w.length,N=1;N0;)fe=jt[A],fe!=="_listeners"&&(Qe=G(f,h,g[fe],T+1,w),Qe&&(le?le.push.apply(le,Qe):le=Qe));return le}else if(Wr==="**"){for(an=T+1===w||T+2===w&&Y==="*",an&&g._listeners&&(le=G(f,h,g,w,w)),jt=l(g),A=jt.length;A-- >0;)fe=jt[A],fe!=="_listeners"&&(fe==="*"||fe==="**"?(g[fe]._listeners&&!an&&(Qe=G(f,h,g[fe],w,w),Qe&&(le?le.push.apply(le,Qe):le=Qe)),Qe=G(f,h,g[fe],T,w)):fe===Y?Qe=G(f,h,g[fe],T+2,w):Qe=G(f,h,g[fe],T,w),Qe&&(le?le.push.apply(le,Qe):le=Qe));return le}else g[Wr]&&(le=G(f,h,g[Wr],T+1,w));if(Ne=g["*"],Ne&&G(f,h,Ne,T+1,w),Ce=g["**"],Ce)if(T0;)fe=jt[A],fe!=="_listeners"&&(fe===Y?G(f,h,Ce[fe],T+2,w):fe===Wr?G(f,h,Ce[fe],T+1,w):(Mt={},Mt[fe]=Ce[fe],G(f,h,{"**":Mt},T+1,w)));else Ce._listeners?G(f,h,Ce,w,w):Ce["*"]&&Ce["*"]._listeners&&G(f,h,Ce["*"],w,w);return le}function H(f,h,g){var T=0,w=0,O,M=this.delimiter,A=M.length,v;if(typeof f=="string")if((O=f.indexOf(M))!==-1){v=new Array(5);do v[T++]=f.slice(w,O),w=O+A;while((O=f.indexOf(M,w))!==-1);v[T++]=f.slice(w)}else v=[f],T=1;else v=f,T=f.length;if(T>1){for(O=0;O+10&&x._listeners.length>this._maxListeners&&(x._listeners.warned=!0,p.call(this,x._listeners.length,N))):x._listeners=h,!0;return!0}function be(f,h,g,T){for(var w=l(f),O=w.length,M,A,v,x=f._listeners,N;O-- >0;)A=w[O],M=f[A],A==="_listeners"?v=g:v=g?g.concat(A):[A],N=T||typeof A=="symbol",x&&h.push(N?v:v.join(this.delimiter)),typeof M=="object"&&be.call(this,M,h,v,N);return h}function Pe(f){for(var h=l(f),g=h.length,T,w,O;g-- >0;)w=h[g],T=f[w],T&&(O=!0,w!=="_listeners"&&!Pe(T)&&delete f[w]);return O}function j(f,h,g){this.emitter=f,this.event=h,this.listener=g}j.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function $(f,h,g){if(g===!0)w=!0;else if(g===!1)T=!0;else{if(!g||typeof g!="object")throw TypeError("options should be an object or true");var T=g.async,w=g.promisify,O=g.nextTick,M=g.objectify}if(T||O||w){var A=h,v=h._origin||h;if(O&&!i)throw Error("process.nextTick is not supported");w===r&&(w=h.constructor.name==="AsyncFunction"),h=function(){var x=arguments,N=this,re=this.event;return w?O?Promise.resolve():new Promise(function(le){u(le)}).then(function(){return N.event=re,A.apply(N,x)}):(O?process.nextTick:u)(function(){N.event=re,A.apply(N,x)})},h._async=!0,h._origin=v}return[h,M?new j(this,f,h):this]}function D(f){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,d.call(this,f)}D.EventEmitter2=D,D.prototype.listenTo=function(f,h,g){if(typeof f!="object")throw TypeError("target musts be an object");var T=this;g=b(g,{on:r,off:r,reducers:r},{on:S,off:S,reducers:F});function w(O){if(typeof O!="object")throw TypeError("events must be an object");var M=g.reducers,A=te.call(T,f),v;A===-1?v=new _(T,f,g):v=T._observers[A];for(var x=l(O),N=x.length,re,le=typeof M=="function",fe=0;fe0;)w=g[T],(!f||w._target===f)&&(w.unsubscribe(h),O=!0);return O},D.prototype.delimiter=".",D.prototype.setMaxListeners=function(f){f!==r&&(this._maxListeners=f,this._conf||(this._conf={}),this._conf.maxListeners=f)},D.prototype.getMaxListeners=function(){return this._maxListeners},D.prototype.event="",D.prototype.once=function(f,h,g){return this._once(f,h,!1,g)},D.prototype.prependOnceListener=function(f,h,g){return this._once(f,h,!0,g)},D.prototype._once=function(f,h,g,T){return this._many(f,1,h,g,T)},D.prototype.many=function(f,h,g,T){return this._many(f,h,g,!1,T)},D.prototype.prependMany=function(f,h,g,T){return this._many(f,h,g,!0,T)},D.prototype._many=function(f,h,g,T,w){var O=this;if(typeof g!="function")throw new Error("many only accepts instances of Function");function M(){return--h===0&&O.off(f,M),g.apply(this,arguments)}return M._origin=g,this._on(f,M,T,w)},D.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var f=arguments[0],h,g=this.wildcard,T,w,O,M,A;if(f==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(g&&(h=f,f!=="newListener"&&f!=="removeListener"&&typeof f=="object")){if(w=f.length,s){for(O=0;O3)for(T=new Array(v-1),M=1;M3)for(w=new Array(x-1),A=1;A0&&this._events[f].length>this._maxListeners&&(this._events[f].warned=!0,p.call(this,this._events[f].length,f))):this._events[f]=h,w)},D.prototype.off=function(f,h){if(typeof h!="function")throw new Error("removeListener only takes instances of Function");var g,T=[];if(this.wildcard){var w=typeof f=="string"?f.split(this.delimiter):f.slice();if(T=G.call(this,null,w,this.listenerTree,0),!T)return this}else{if(!this._events[f])return this;g=this._events[f],T.push({_listeners:g})}for(var O=0;O0){for(T=this._all,h=0,g=T.length;h0;)T=h[g[O]],typeof T=="function"?w.push(T):w.push.apply(w,T);return w}else{if(this.wildcard){if(M=this.listenerTree,!M)return[];var A=[],v=typeof f=="string"?f.split(this.delimiter):f.slice();return G.call(this,A,v,M,0),A}return h?(T=h[f],T?typeof T=="function"?[T]:T:[]):[]}},D.prototype.eventNames=function(f){var h=this._events;return this.wildcard?be.call(this,this.listenerTree,[],null,f):h?l(h):[]},D.prototype.listenerCount=function(f){return this.listeners(f).length},D.prototype.hasListeners=function(f){if(this.wildcard){var h=[],g=typeof f=="string"?f.split(this.delimiter):f.slice();return G.call(this,h,g,this.listenerTree,0),h.length>0}var T=this._events,w=this._all;return!!(w&&w.length||T&&(f===r?l(T).length:T[f]))},D.prototype.listenersAny=function(){return this._all?this._all:[]},D.prototype.waitFor=function(f,h){var g=this,T=typeof h;return T==="number"?h={timeout:h}:T==="function"&&(h={filter:h}),h=b(h,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:S,Promise:E}),q(h.Promise,function(w,O,M){function A(){var v=h.filter;if(!(v&&!v.apply(g,arguments)))if(g.off(f,A),h.handleError){var x=arguments[0];x?O(x):w(m.apply(null,arguments).slice(1))}else w(m.apply(null,arguments))}M(function(){g.off(f,A)}),g._on(f,A,!1)},{timeout:h.timeout,overload:h.overload})};function B(f,h,g){g=b(g,{Promise,timeout:0,overload:!1},{Promise:E});var T=g.Promise;return q(T,function(w,O,M){var A;if(typeof f.addEventListener=="function"){A=function(){w(m.apply(null,arguments))},M(function(){f.removeEventListener(h,A)}),f.addEventListener(h,A,{once:!0});return}var v=function(){x&&f.removeListener("error",x),w(m.apply(null,arguments))},x;h!=="error"&&(x=function(N){f.removeListener(h,v),O(N)},f.once("error",x)),M(function(){x&&f.removeListener("error",x),f.removeListener(h,v)}),f.once(h,v)},{timeout:g.timeout,overload:g.overload})}var I=D.prototype;if(Object.defineProperties(D,{defaultMaxListeners:{get:function(){return I._maxListeners},set:function(f){if(typeof f!="number"||f<0||Number.isNaN(f))throw TypeError("n must be a non-negative number");I._maxListeners=f},enumerable:!0},once:{value:B,writable:!0,configurable:!0}}),Object.defineProperties(I,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return D});else if(typeof xv=="object")Rv.exports=D;else{var Z=new Function("","return this")();Z.EventEmitter2=D}})()});var Lw=k(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});var Iw=Symbol("MustacheDataPath");function Nw({target:r,propertyName:e}){return[...r[Iw]||[],e]}function Fw(r,e){return typeof r!="object"?r:new Proxy(r,{get(t,n){let i=t[n];if(i===void 0&&!(n in t)){let s=Nw({target:t,propertyName:n});if(e!=null&&e.handleError)return e.handleError(s),i;throw Error(`Missing Mustache data property: ${s.join(" > ")}`)}return i&&typeof i=="object"?(i[Iw]=Nw({target:t,propertyName:n}),Fw(i,e)):i}})}ph.default=Fw});var tn=k(Fr=>{"use strict";Fr.__esModule=!0;Fr.Tokens=Fr.StructuralCharacters=Fr.Operators=void 0;var uF;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(uF=Fr.Operators||(Fr.Operators={}));var lF;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(lF=Fr.StructuralCharacters||(Fr.StructuralCharacters={}));var cF;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(cF=Fr.Tokens||(Fr.Tokens={}))});var _h=k(Us=>{"use strict";Us.__esModule=!0;Us.VALID_TOKENS=Us.OPERATOR_PRECEDENCE=void 0;var qe=tn();Us.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};Us.VALID_TOKENS={identifierOnly:[{name:qe.Tokens.IDENTIFIER},{name:qe.Tokens.STRUCTURAL_CHARACTER,value:qe.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:qe.Tokens.IDENTIFIER},{name:qe.Tokens.STRUCTURAL_CHARACTER,value:qe.StructuralCharacters.OPEN_PARENTHESIS},{name:qe.Tokens.OPERATOR,value:qe.Operators.NOT}],binaryOperator:[{name:qe.Tokens.OPERATOR,value:qe.Operators.AND},{name:qe.Tokens.OPERATOR,value:qe.Operators.OR},{name:qe.Tokens.OPERATOR,value:qe.Operators.XOR}],binaryOperatorOrClose:[{name:qe.Tokens.OPERATOR,value:qe.Operators.AND},{name:qe.Tokens.OPERATOR,value:qe.Operators.OR},{name:qe.Tokens.OPERATOR,value:qe.Operators.XOR},{name:qe.Tokens.STRUCTURAL_CHARACTER,value:qe.StructuralCharacters.CLOSE_PARENTHESIS}]}});var vh=k(Tt=>{"use strict";Tt.__esModule=!0;Tt.ESCAPE_CHARACTER=Tt.EOL=Tt.COMMENT_DELIMITER=Tt.QUOTED_IDENTIFIER_DELIMITER=Tt.SEPARATORS=Tt.OPERATORS=Tt.STRUCTURAL_CHARACTERS=void 0;var Ws=tn();Tt.STRUCTURAL_CHARACTERS={"(":Ws.StructuralCharacters.OPEN_PARENTHESIS,")":Ws.StructuralCharacters.CLOSE_PARENTHESIS};Tt.OPERATORS={AND:Ws.Operators.AND,OR:Ws.Operators.OR,XOR:Ws.Operators.XOR,NOT:Ws.Operators.NOT};Tt.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));Tt.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);Tt.COMMENT_DELIMITER=String.fromCodePoint(35);Tt.EOL=String.fromCodePoint(10);Tt.ESCAPE_CHARACTER=String.fromCodePoint(92)});var Gw=k(_r=>{"use strict";var wh=_r&&_r.__assign||function(){return wh=Object.assign||function(r){for(var e,t=1,n=arguments.length;t{"use strict";Nl.__esModule=!0;Nl.lex=void 0;var qs=tn(),Jt=vh(),$s=Gw(),mF=function(r){for(var e=null,t=null,n=null,i=0;i{"use strict";var Bw=er&&er.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";var rn=Gs&&Gs.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";_t.__esModule=!0;_t.throwInvalidExpression=_t.isOperator=_t.isIdentifier=_t.notUtil=_t.xorUtil=_t.orUtil=_t.andUtil=void 0;var Kw=tn(),vF=function(r,e){return r&&e};_t.andUtil=vF;var wF=function(r,e){return r||e};_t.orUtil=wF;var kF=function(r,e){return r!==e};_t.xorUtil=kF;var EF=function(r){return!r};_t.notUtil=EF;var SF=function(r){var e=r.name,t=r.value;return e===Kw.Tokens.IDENTIFIER&&typeof t=="string"};_t.isIdentifier=SF;var OF=function(r){var e=r.name,t=r.value;return e===Kw.Tokens.OPERATOR&&typeof t=="string"};_t.isOperator=OF;var DF=function(r){throw new TypeError("Invalid postfix expression: ".concat(r))};_t.throwInvalidExpression=DF});var Qw=k(Ll=>{"use strict";var Fo;Ll.__esModule=!0;Ll.OPERATOR_MAP=void 0;var Oh=tn(),Dh=Sh();Ll.OPERATOR_MAP=(Fo={},Fo[Oh.Operators.AND]=Dh.andUtil,Fo[Oh.Operators.OR]=Dh.orUtil,Fo[Oh.Operators.XOR]=Dh.xorUtil,Fo)});var Zw=k(vr=>{"use strict";var Ys=vr&&vr.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n{"use strict";var xh=nn&&nn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]});nn.__esModule=!0;nn.parse=nn.evaluate=nn.getEvaluator=void 0;var Jw=Zw();xh(nn,Jw,"getEvaluator");xh(nn,Jw,"evaluate");var PF=Eh();xh(nn,PF,"parse")});var ZF={};dE(ZF,{default:()=>fc});module.exports=fE(ZF);var Yk=require("obsidian");var bs=require("obsidian");var eL=new Error("timeout while waiting for mutex to become available"),tL=new Error("mutex already locked"),pE=new Error("request for lock canceled"),mE=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Oc=class{constructor(e,t=pE){this._value=e,this._cancelError=t,this._weightedQueues=[],this._weightedWaiters=[]}acquire(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((t,n)=>{this._weightedQueues[e-1]||(this._weightedQueues[e-1]=[]),this._weightedQueues[e-1].push({resolve:t,reject:n}),this._dispatch()})}runExclusive(e,t=1){return mE(this,void 0,void 0,function*(){let[n,i]=yield this.acquire(t);try{return yield e(n)}finally{i()}})}waitForUnlock(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),this._weightedWaiters[e-1].push(t),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatch()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatch()}cancel(){this._weightedQueues.forEach(e=>e.forEach(t=>t.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var e;for(let t=this._value;t>0;t--){let n=(e=this._weightedQueues[t-1])===null||e===void 0?void 0:e.shift();if(!n)continue;let i=this._value,s=t;this._value-=t,t=this._value+1,n.resolve([i,this._newReleaser(s)])}this._drainUnlockWaiters()}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){for(let e=this._value;e>0;e--)!this._weightedWaiters[e-1]||(this._weightedWaiters[e-1].forEach(t=>t()),this._weightedWaiters[e-1]=[])}},hE=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Vo=class{constructor(e){this._semaphore=new Oc(1,e)}acquire(){return hE(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var zo=require("obsidian"),at=class{constructor(e,t={}){this._frontmatter={tags:[]};this._tags=[];var i,s;this._path=e,this._cachedMetadata=t;let n=t.frontmatter;if(n!==void 0&&(this._frontmatter=JSON.parse(JSON.stringify(n)),this._frontmatter.tags=(i=(0,zo.parseFrontMatterTags)(n))!=null?i:[]),Object.keys(t).length!==0){let a=(s=(0,zo.getAllTags)(this.cachedMetadata))!=null?s:[];this._tags=[...new Set(a)]}}get path(){return this._path}get tags(){return this._tags}get cachedMetadata(){return this._cachedMetadata}get frontmatter(){return this._frontmatter}rawFrontmatterIdenticalTo(e){let t=this.cachedMetadata.frontmatter,n=e.cachedMetadata.frontmatter;return t===n?!0:!t||!n?!1:JSON.stringify(t)===JSON.stringify(n)}get pathWithoutExtension(){return this.withoutExtension(this.path)}withoutExtension(e){return e.replace(/\.md$/,"")}get root(){let e=this.path.replace(/\\/g,"/");e.charAt(0)==="/"&&(e=e.substring(1));let t=e.indexOf("/");return t==-1?"/":e.substring(0,t+1)}get folder(){let e=this.path,t=this.filename,n=e.substring(0,e.lastIndexOf(t));return n===""?"/":n}get filename(){let e=this.path.match(/([^/]+)$/);return e!==null?e[1]:""}get filenameWithoutExtension(){return this.withoutExtension(this.filename)}hasProperty(e){let t=this.findKeyInFrontmatter(e);if(t===void 0)return!1;let n=this.frontmatter[t];return!(n===null||n===void 0)}property(e){let t=this.findKeyInFrontmatter(e);if(t===void 0)return null;let n=this.frontmatter[t];return n===void 0?null:Array.isArray(n)?n.filter(i=>i!==null):n}findKeyInFrontmatter(e){let t=e.toLowerCase();return Object.keys(this.frontmatter).find(n=>n.toLowerCase()===t)}};var Vi=class{constructor(e,t){this.parent=null;this.children=[];this.originalMarkdown=e,this.parent=t,t!==null&&t.children.push(this)}get root(){return this.parent===null?this:this.parent.root}get isRoot(){return this.parent===null}};var qu=oa(ze());var kt=class{constructor(e,t){this.start=e,this.end=t,t.isBefore(e)&&(this.start=t,this.end=e),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(e){let t=e==="week"?"isoWeek":e;return new kt(window.moment().startOf(t).startOf("day"),window.moment().endOf(t).startOf("day"))}static buildInvalid(){return new kt(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=window.moment.duration(1,e);this.start.subtract(t),this.end.subtract(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}moveToNext(e){let t=window.moment.duration(1,e);this.start.add(t),this.end.add(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}};var Ht=class{static parseDate(e,t=!1){return window.moment(qu.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[Ht.parseRelativeDateRange,Ht.parseNumberedDateRange,Ht.parseAbsoluteDateRange];for(let i of n){let s=i(e,t);if(s.isValid())return s}return kt.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=qu.parse(e,void 0,{forwardDate:t});if(n.length===0)return kt.buildInvalid();let i=n[0].start,s=n[1]&&n[1].start?n[1].start:i,a=window.moment(i.date()),o=window.moment(s.date());return new kt(a,o)}static parseRelativeDateRange(e,t){let n=/(last|this|next) (week|month|quarter|year)/,i=e.match(n);if(i&&i.length===3){let s=i[1],a=i[2],o=kt.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return kt.buildInvalid()}static parseNumberedDateRange(e,t){let n=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[i,s,a]of n){let o=e.match(i);if(o){let u=o[0].trim();return new kt(window.moment(u,s).startOf(a),window.moment(u,s).endOf(a))}}return kt.buildInvalid()}};var PP={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function $u(r){for(let[e,t]of Object.entries(PP))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var ym=oa(ze());function dr(r,e){return r!==null&&e===null?-1:r===null&&e!==null?1:r!==null&&e!==null?r.isValid()&&!e.isValid()?1:!r.isValid()&&e.isValid()?-1:r.isAfter(e)?1:r.isBefore(e)?-1:0:0}function NP(r,e,t=void 0){if(!e)return`no ${r} date`;let n=ym.parseDate(e,t,{forwardDate:t!=null});return n!==null?window.moment(n).format("YYYY-MM-DD"):`invalid ${r} date`}function D_(r,e,t){return NP(r,e,t?new Date:void 0)}function Ti(r,e){let t=null,n=ym.parseDate(r,new Date,{forwardDate:e});return n!==null&&(t=window.moment(n)),t}var fr=class{constructor({startDate:e=null,scheduledDate:t=null,dueDate:n=null}){this.startDate=e!=null?e:null,this.scheduledDate=t!=null?t:null,this.dueDate=n!=null?n:null,this.referenceDate=this.getReferenceDate()}getReferenceDate(){return this.dueDate?window.moment(this.dueDate):this.scheduledDate?window.moment(this.scheduledDate):this.startDate?window.moment(this.startDate):null}isIdenticalTo(e){return!(dr(this.startDate,e.startDate)!==0||dr(this.scheduledDate,e.scheduledDate)!==0||dr(this.dueDate,e.dueDate)!==0)}next(e){return this.referenceDate===null?new fr({startDate:null,scheduledDate:null,dueDate:null}):new fr({startDate:this.nextOccurrenceDate(this.startDate,e),scheduledDate:this.nextOccurrenceDate(this.scheduledDate,e),dueDate:this.nextOccurrenceDate(this.dueDate,e)})}nextOccurrenceDate(e,t){if(e===null)return null;let n=window.moment.duration(e.diff(this.referenceDate)),i=window.moment(t);return i.add(Math.round(n.asDays()),"days"),i}};var ju=["MO","TU","WE","TH","FR","SA","SU"],He=function(){function r(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return r.fromStr=function(e){return new r(ju.indexOf(e))},r.prototype.nth=function(e){return this.n===e?this:new r(this.weekday,e)},r.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},r.prototype.toString=function(){var e=ju[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var Fe=function(r){return r!=null},Vt=function(r){return typeof r=="number"},bm=function(r){return typeof r=="string"&&ju.includes(r)},ct=Array.isArray,pr=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=ye(t,e/t.length)),t.slice(0,e)+String(n))}var R_=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},mt=function(r,e){var t=r%e;return t*e<0?t+e:t},Gu=function(r,e){return{div:Math.floor(r/e),mod:mt(r,e)}},zt=function(r){return!Fe(r)||r.length===0},$e=function(r){return!zt(r)},Te=function(r,e){return $e(r)&&r.indexOf(e)!==-1};var Hr=function(r,e,t,n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=0),new Date(Date.UTC(r,e-1,t,n,i,s))},IP=[31,28,31,30,31,30,31,31,30,31,30,31],A_=1e3*60*60*24,Yu=9999,P_=Hr(1970,1,1),FP=[6,0,1,2,3,4,5];var cs=function(r){return r%4===0&&r%100!==0||r%400===0},Tm=function(r){return r instanceof Date},vi=function(r){return Tm(r)&&!isNaN(r.getTime())},M_=function(r){return r.getTimezoneOffset()*60*1e3},LP=function(r,e){var t=r.getTime()-M_(r),n=e.getTime()-M_(e),i=t-n;return Math.round(i/A_)},uo=function(r){return LP(r,P_)},Bu=function(r){return new Date(P_.getTime()+r*A_)},UP=function(r){var e=r.getUTCMonth();return e===1&&cs(r.getUTCFullYear())?29:IP[e]},Tn=function(r){return FP[r.getUTCDay()]},_m=function(r,e){var t=Hr(r,e+1,1);return[Tn(t),UP(t)]},Hu=function(r,e){return e=e||r,new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},Vu=function(r){var e=new Date(r.getTime());return e},vm=function(r){for(var e=[],t=0;tthis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),vn=WP;var wm=function(r,e){return wm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},wm(r,e)};function fs(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");wm(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var dt=function(){return dt=Object.assign||function(e){for(var t,n=1,i=arguments.length;ne[0].length)&&(e=s,t=i)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function co(r,e){e===void 0&&(e=wi);var t={},n=new BP(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var p=n.acceptNumber();if(p&&(t.interval=parseInt(p[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=z.DAILY,n.nextSymbol()&&(a(),d());break;case"weekday(s)":t.freq=z.WEEKLY,t.byweekday=[z.MO,z.TU,z.WE,z.TH,z.FR],n.nextSymbol(),d();break;case"week(s)":t.freq=z.WEEKLY,n.nextSymbol()&&(s(),d());break;case"hour(s)":t.freq=z.HOURLY,n.nextSymbol()&&(s(),d());break;case"minute(s)":t.freq=z.MINUTELY,n.nextSymbol()&&(s(),d());break;case"month(s)":t.freq=z.MONTHLY,n.nextSymbol()&&(s(),d());break;case"year(s)":t.freq=z.YEARLY,n.nextSymbol()&&(s(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=z.WEEKLY;var m=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[z[m]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var y=u();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(z[y]),n.nextSymbol()}c(),d();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=z.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var _=o();if(!_)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(_),n.nextSymbol()}s(),d();break;default:throw new Error("Unknown symbol")}}function s(){var p=n.accept("on"),m=n.accept("the");if(!!(p||m))do{var y=l(),_=u(),b=o();if(y)_?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(z[_].nth(y))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(y),n.accept("day(s)"));else if(_)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(z[_]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[z.MO,z.TU,z.WE,z.TH,z.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var E=n.acceptNumber();if(!E)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(E[0],10)];n.accept("comma");){if(E=n.acceptNumber(),!E)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(E[0],10))}}else if(b)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(b);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var p=n.accept("at");if(!!p)do{var m=n.acceptNumber();if(!m)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(m[0],10)];n.accept("comma");){if(m=n.acceptNumber(),!m)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(m[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var p=parseInt(n.value[1],10);if(p<-366||p>366)throw new Error("Nth out of range: "+p);return n.nextSymbol(),n.accept("last")?-p:p;default:return!1}}function c(){n.accept("on"),n.accept("the");var p=l();if(!!p)for(t.bymonthday=[p],n.nextSymbol();n.accept("comma");){if(p=l(),!p)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(p),n.nextSymbol()}}function d(){if(n.symbol==="until"){var p=Date.parse(n.text);if(!p)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(p)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var me;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(me||(me={}));function fo(r){return r12){var n=Math.floor(this.month/12),i=mt(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=Gu(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),zt(i)||Te(i,this.hour))break}},e.prototype.addMinutes=function(t,n,i,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=Gu(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(zt(i)||Te(i,this.hour))&&(zt(s)||Te(s,this.minute)))break}},e.prototype.addSeconds=function(t,n,i,s,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=Gu(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(zt(i)||Te(i,this.hour))&&(zt(s)||Te(s,this.minute))&&(zt(a)||Te(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=_m(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>Yu))return;t=_m(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case me.YEARLY:return this.addYears(s);case me.MONTHLY:return this.addMonths(s);case me.WEEKLY:return this.addWeekly(s,a);case me.DAILY:return this.addDaily(s);case me.HOURLY:return this.addHours(s,n,o);case me.MINUTELY:return this.addMinutes(s,n,o,u);case me.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(ms);function Em(r){for(var e=[],t=Object.keys(r),n=0,i=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||$e(e.byweekno)||$e(e.byyearday)||Boolean(e.bymonthday)||$e(e.bymonthday)||Fe(e.byweekday)||Fe(e.byeaster)))switch(e.freq){case z.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case z.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case z.WEEKLY:e.byweekday=[Tn(e.dtstart)];break}if(Fe(e.bymonth)&&!ct(e.bymonth)&&(e.bymonth=[e.bymonth]),Fe(e.byyearday)&&!ct(e.byyearday)&&Vt(e.byyearday)&&(e.byyearday=[e.byyearday]),!Fe(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(ct(e.bymonthday)){for(var i=[],s=[],t=0;t0?i.push(n):n<0&&s.push(n)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Fe(e.byweekno)&&!ct(e.byweekno)&&(e.byweekno=[e.byweekno]),!Fe(e.byweekday))e.bynweekday=null;else if(Vt(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(bm(e.byweekday))e.byweekday=[He.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof He)!e.byweekday.n||e.freq>z.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;tz.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=$e(a)?a:null,e.bynweekday=$e(o)?o:null}return Fe(e.byhour)?Vt(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(c=0,l=o.yearlen+mt(a-e.wkst,7)):l=n-c;for(var d=Math.floor(l/7),p=mt(l,7),m=Math.floor(d+p/4),y=0;y0&&_<=m){var b=void 0;_>1?(b=c+(_-1)*7,c!==u&&(b-=7-u)):b=c;for(var E=0;E<7&&(o.wnomask[b]=1,b++,o.wdaymask[b]!==e.wkst);E++);}}if(Te(e.byweekno,1)){var b=c+m*7;if(c!==u&&(b-=7-u),b=4?(F=0,te=q+mt(S-e.wkst,7)):te=n-c,R=Math.floor(52+mt(te,7)/4)}if(Te(e.byweekno,R))for(var b=0;bs)return wn(r);if(R>=t){var S=sv(R,e);if(!r.accept(S)||o&&(--o,!o))return wn(r)}}else for(var E=m;Es)return wn(r);if(R>=t){var S=sv(R,e);if(!r.accept(S)||o&&(--o,!o))return wn(r)}}}if(e.interval===0||(u.add(e,_),u.year>Yu))return wn(r);fo(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function nN(r,e,t){var n=t.bymonth,i=t.byweekno,s=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return $e(n)&&!Te(n,r.mmask[e])||$e(i)&&!r.wnomask[e]||$e(s)&&!Te(s,r.wdaymask[e])||$e(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!Te(r.eastermask,e)||($e(o)||$e(u))&&!Te(o,r.mdaymask[e])&&!Te(u,r.nmdaymask[e])||$e(l)&&(e=r.yearlen&&!Te(l,e+1-r.yearlen)&&!Te(l,-r.nextyearlen+e-r.yearlen))}function sv(r,e){return new ki(r,e.tzid).rezonedDate()}function wn(r){return r.getValue()}function iN(r,e,t,n,i){for(var s=!1,a=e;a=z.HOURLY&&$e(i)&&!Te(i,e.hour)||n>=z.MINUTELY&&$e(s)&&!Te(s,e.minute)||n>=z.SECONDLY&&$e(a)&&!Te(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var mr={MO:new He(0),TU:new He(1),WE:new He(2),TH:new He(3),FR:new He(4),SA:new He(5),SU:new He(6)},po={freq:me.YEARLY,dtstart:null,interval:1,wkst:mr.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},j_=Object.keys(po),z=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new B_,this.origOptions=Em(e);var n=q_(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return co(e,t)},r.fromText=function(e,t){return F_(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return zu(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(!!this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new km("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new vn("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!vi(e)||!vi(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:n};if(i)return this._iter(new km("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new vn("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!vi(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new vn("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!vi(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new vn("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return go(this.origOptions)},r.prototype.toText=function(e,t,n){return L_(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return U_(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=me.YEARLY,r.MONTHLY=me.MONTHLY,r.WEEKLY=me.WEEKLY,r.DAILY=me.DAILY,r.HOURLY=me.HOURLY,r.MINUTELY=me.MINUTELY,r.SECONDLY=me.SECONDLY,r.MO=mr.MO,r.TU=mr.TU,r.WE=mr.WE,r.TH=mr.TH,r.FR=mr.FR,r.SA=mr.SA,r.SU=mr.SU,r.parseString=ho,r.optionsToString=go,r}();function av(r,e,t,n,i,s){var a={},o=r.accept;function u(p,m){t.forEach(function(y){y.between(p,m,!0).forEach(function(_){a[Number(_)]=!0})})}i.forEach(function(p){var m=new ki(p,s).rezonedDate();a[Number(m)]=!0}),r.accept=function(p){var m=Number(p);return isNaN(m)?o.call(this,p):!a[m]&&(u(new Date(m-1),new Date(m+1)),!a[m])?(a[m]=!0,o.call(this,p)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(p){var m=Number(p);return a[m]?!0:(a[m]=!0,o.call(this,p))});for(var l=0;l1||i.length||s.length||a.length){var c=new Dm(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(p){c.rrule(new z(Om(p,o,u),l))}),i.forEach(function(p){c.rdate(p)}),s.forEach(function(p){c.exrule(new z(Om(p,o,u),l))}),a.forEach(function(p){c.exdate(p)}),e.compatible&&e.dtstart&&c.rdate(o),c}var d=n[0]||{};return new z(Om(d,d.dtstart||e.dtstart||o,d.tzid||e.tzid||u),l)}function Ku(r,e){return e===void 0&&(e={}),oN(r,uN(e))}function Om(r,e,t){return dt(dt({},r),{dtstart:e,tzid:t})}function uN(r){var e=[],t=Object.keys(r),n=Object.keys(ov);if(t.forEach(function(i){Te(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return dt(dt({},ov),r)}function lN(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=R_(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function cN(r){var e=lN(r),t=e.name,n=e.value,i=t.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function dN(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(` +`),n=0;n0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function fN(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function uv(r,e){return fN(e),r.split(",").map(function(t){return lo(t)})}function lv(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;nn}static nextAfterYears(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));it.isSkippingTooManyYears(e,t,s);)t=it.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new z(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};var hs=(m=>(m.Description="description",m.Id="id",m.DependsOn="dependsOn",m.Priority="priority",m.RecurrenceRule="recurrenceRule",m.OnCompletion="onCompletion",m.CreatedDate="createdDate",m.StartDate="startDate",m.ScheduledDate="scheduledDate",m.DueDate="dueDate",m.CancelledDate="cancelledDate",m.DoneDate="doneDate",m.BlockLink="blockLink",m))(hs||{}),Qu=Object.values(hs),zr=class{constructor(){this.visible={};this.tagsVisible=!0;Qu.forEach(e=>{this.visible[e]=!0})}isShown(e){return this.visible[e]}areTagsShown(){return this.tagsVisible}hide(e){this.visible[e]=!1}setVisibility(e,t){this.visible[e]=t}setTagsVisibility(e){this.tagsVisible=e}get shownComponents(){return Qu.filter(e=>this.visible[e])}get hiddenComponents(){return Qu.filter(e=>!this.visible[e])}get toggleableComponents(){return Qu.filter(e=>e!=="description"&&e!=="blockLink")}toggleVisibilityExceptDescriptionAndBlockLink(){this.toggleableComponents.forEach(e=>{this.visible[e]=!this.visible[e]}),this.setTagsVisibility(!this.areTagsShown())}};var Nt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(Nt||{}),Ke=class{constructor(e,t,n,i,s="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=i,this.type=s}};function pv(r){let e=r.trim().toLowerCase();return e==="delete"?"delete":e==="keep"?"keep":""}function fN(r,e){return r.filter(t=>t!==e)}function pN(r,e){let t=r.status,n=e.status,i=n.type===t.type;return n.type!=="DONE"||i}function mv(r,e){let t=e.length;if(r.onCompletion===""||r.onCompletion==="keep"||t===0)return e;let n=e[t-1];if(pN(r,n))return e;let s=r.onCompletion;return s==="delete"?fN(e,n):(console.log(`OnCompletion action ${s} not yet implemented.`),e)}var Kt=class{},J=Kt;J.dateFormat="YYYY-MM-DD",J.dateTimeFormat="YYYY-MM-DD HH:mm",J.indentationRegex=/^([\s\t>]*)/,J.listMarkerRegex=/([-*+]|[0-9]+\.)/,J.checkboxRegex=/\[(.)\]/u,J.afterCheckboxRegex=/ *(.*)/u,J.taskRegex=new RegExp(Kt.indentationRegex.source+Kt.listMarkerRegex.source+" +"+Kt.checkboxRegex.source+Kt.afterCheckboxRegex.source,"u"),J.nonTaskRegex=new RegExp(Kt.indentationRegex.source+Kt.listMarkerRegex.source+"? *("+Kt.checkboxRegex.source+")?"+Kt.afterCheckboxRegex.source,"u"),J.listItemRegex=new RegExp(Kt.indentationRegex.source+Kt.listMarkerRegex.source),J.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,J.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,J.hashTagsFromEnd=new RegExp(Kt.hashTags.source+"$");var Ei=/[a-zA-Z0-9-_]+/,xm=new RegExp(Ei.source+"( *, *"+Ei.source+" *)*"),yo={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",cancelledDateSymbol:"\u274C",recurrenceSymbol:"\u{1F501}",onCompletionSymbol:"\u{1F3C1}",dependsOnSymbol:"\u26D4",idSymbol:"\u{1F194}",TaskFormatRegularExpressions:{priorityRegex:/([🔺⏫🔼🔽⏬])\uFE0F?$/u,startDateRegex:/🛫 *(\d{4}-\d{2}-\d{2})$/u,createdDateRegex:/➕ *(\d{4}-\d{2}-\d{2})$/u,scheduledDateRegex:/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,dueDateRegex:/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,doneDateRegex:/✅ *(\d{4}-\d{2}-\d{2})$/u,cancelledDateRegex:/❌ *(\d{4}-\d{2}-\d{2})$/u,recurrenceRegex:/🔁 ?([a-zA-Z0-9, !]+)$/iu,onCompletionRegex:/🏁 ?([a-zA-Z]+)$/iu,dependsOnRegex:new RegExp("\u26D4\uFE0F? *("+xm.source+")$","iu"),idRegex:new RegExp("\u{1F194} *("+Ei.source+")$","iu")}};function Xu(r,e,t){return t?r?" "+e:` ${e} ${t}`:""}function gs(r,e,t){return t?r?" "+e:` ${e} ${t.format(J.dateFormat)}`:""}function hv(){let r=[];return Object.values(yo.prioritySymbols).forEach(e=>{e.length>0&&r.push(e)}),Object.values(yo).forEach(e=>{typeof e=="string"&&r.push(e)}),r}var Si=class{constructor(e){this.symbols=e}serialize(e){let t=new zr,n="",i=!1;for(let s of t.shownComponents)n+=this.componentToString(e,i,s);return n}componentToString(e,t,n){var _;let{prioritySymbols:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:u,cancelledDateSymbol:l,recurrenceSymbol:c,onCompletionSymbol:d,dueDateSymbol:p,dependsOnSymbol:m,idSymbol:y}=this.symbols;switch(n){case"description":return e.description;case"priority":{let b="";return e.priority==="0"?b=" "+i.Highest:e.priority==="1"?b=" "+i.High:e.priority==="2"?b=" "+i.Medium:e.priority==="4"?b=" "+i.Low:e.priority==="5"&&(b=" "+i.Lowest),b}case"startDate":return gs(t,s,e.startDate);case"createdDate":return gs(t,a,e.createdDate);case"scheduledDate":return e.scheduledDateIsInferred?"":gs(t,o,e.scheduledDate);case"doneDate":return gs(t,u,e.doneDate);case"cancelledDate":return gs(t,l,e.cancelledDate);case"dueDate":return gs(t,p,e.dueDate);case"recurrenceRule":return e.recurrence?Xu(t,c,e.recurrence.toText()):"";case"onCompletion":return e.onCompletion===""?"":Xu(t,d,e.onCompletion);case"dependsOn":return e.dependsOn.length===0?"":Xu(t,m,e.dependsOn.join(","));case"id":return Xu(t,y,e.id);case"blockLink":return(_=e.blockLink)!=null?_:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}parsePriority(e){let{prioritySymbols:t}=this.symbols;switch(e){case t.Lowest:return"5";case t.Low:return"4";case t.Medium:return"2";case t.High:return"1";case t.Highest:return"0";default:return"3"}}deserialize(e){let{TaskFormatRegularExpressions:t}=this.symbols,n,i="3",s=null,a=null,o=null,u=null,l=null,c=null,d="",p=null,m="",y="",_=[],b="",E=20,R=0;do{n=!1;let S=e.match(t.priorityRegex);S!==null&&(i=this.parsePriority(S[1]),e=e.replace(t.priorityRegex,"").trim(),n=!0);let F=e.match(t.doneDateRegex);F!==null&&(u=window.moment(F[1],J.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let q=e.match(t.cancelledDateRegex);q!==null&&(l=window.moment(q[1],J.dateFormat),e=e.replace(t.cancelledDateRegex,"").trim(),n=!0);let te=e.match(t.dueDateRegex);te!==null&&(o=window.moment(te[1],J.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let G=e.match(t.scheduledDateRegex);G!==null&&(a=window.moment(G[1],J.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let H=e.match(t.startDateRegex);H!==null&&(s=window.moment(H[1],J.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let be=e.match(t.createdDateRegex);be!==null&&(c=window.moment(be[1],J.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let Pe=e.match(t.recurrenceRegex);Pe!==null&&(d=Pe[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let j=e.match(t.onCompletionRegex);if(j!=null){e=e.replace(t.onCompletionRegex,"").trim();let I=j[1];m=pv(I),n=!0}let $=e.match(J.hashTagsFromEnd);if($!=null){e=e.replace(J.hashTagsFromEnd,"").trim(),n=!0;let I=$[0].trim();b=b.length>0?[I,b].join(" "):I}let D=e.match(t.idRegex);D!=null&&(e=e.replace(t.idRegex,"").trim(),y=D[1].trim(),n=!0);let B=e.match(t.dependsOnRegex);B!=null&&(e=e.replace(t.dependsOnRegex,"").trim(),_=B[1].replace(/ /g,"").split(",").filter(I=>I!==""),n=!0),R++}while(n&&R<=E);return d.length>0&&(p=it.fromText({recurrenceRuleText:d,occurrence:new fr({startDate:s,scheduledDate:a,dueDate:o})})),b.length>0&&(e+=" "+b),{description:e,priority:i,startDate:s,createdDate:c,scheduledDate:a,dueDate:o,doneDate:u,cancelledDate:l,recurrence:p,onCompletion:m,id:y,dependsOn:_,tags:ae.extractHashtags(e)}}};function To(r){let e="",t=!0;for(;t;)e=Math.random().toString(36).substring(2,6+2),r.includes(e)||(t=!1);return e}function Zu(r,e){return r.id!==""?r:new ae(he(K({},r),{id:To(e)}))}function gv(r,e){let t=r;if(!r.dependsOn.includes(e.id)){let n=[...r.dependsOn,e.id];t=new ae(he(K({},r),{dependsOn:n}))}return t}function yv(r,e){let t=r;if(r.dependsOn.includes(e.id)){let n=r.dependsOn.filter(i=>i!==e.id);t=new ae(he(K({},r),{dependsOn:n}))}return t}function Hn(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var Vn=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return Vn.instance||(Vn.instance=new Vn),Vn.instance}get(){return this._globalFilter}set(e){this._globalFilter=e}reset(){this.set(Vn.empty)}isEmpty(){return this.get()===Vn.empty}equals(e){return this.get()===e}includedIn(e){let t=this.get();return e.includes(t)}prependTo(e){return this.get()+" "+e}removeAsWordFromDependingOnSettings(e){return this.getRemoveGlobalFilter()?this.removeAsWordFrom(e):e}getRemoveGlobalFilter(){return this._removeGlobalFilter}setRemoveGlobalFilter(e){this._removeGlobalFilter=e}removeAsWordFrom(e){if(this.isEmpty())return e;let t=RegExp("(^|\\s)"+Hn(this.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}removeAsSubstringFrom(e){let t=this.get();return e.replace(t,"").trim()}},_e=Vn;_e.empty="";var Tv=require("obsidian");var hN=20;function Oi(r){return _e.getInstance().removeAsWordFrom(r.description)}function gN(r,e){if(r==="")return e;let t=(0,Tv.prepareSimpleSearch)(r),n=-4;return e.map(a=>{let o=t(Oi(a));return o&&o.score>n?{item:a,match:o}:null}).filter(Boolean).sort((a,o)=>o.match.score-a.match.score).map(a=>a.item)}function Ju(r,e,t,n,i){let s=gN(r,e);return s=s.filter(a=>!(a.isDone||a.description.includes("<%")&&a.description.includes("%>")||a.description===(t==null?void 0:t.description)&&a.taskLocation.path===(t==null?void 0:t.taskLocation.path)&&a.originalMarkdown===(t==null?void 0:t.originalMarkdown)||(n==null?void 0:n.includes(a))||(i==null?void 0:i.includes(a)))),t&&s.sort((a,o)=>{let u=a.taskLocation.path===t.taskLocation.path,l=o.taskLocation.path===t.taskLocation.path;return u&&l?Math.abs(a.taskLocation.lineNumber-t.taskLocation.lineNumber)-Math.abs(o.taskLocation.lineNumber-t.taskLocation.lineNumber):u?-1:l?1:0}),s.slice(0,hN)}var Rm=5,yN=!0;globalThis.SHOW_DEPENDENCY_SUGGESTIONS=yN;function _v(r){return globalThis.SHOW_DEPENDENCY_SUGGESTIONS&&r}function Mm(r,e,t){let n=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(i,s,a,o,u,l)=>{let c=[],{postfix:d,insertSkip:p}=bN(t,i,s),m={line:i,cursorPos:s,settings:a,dataviewMode:t,postfix:d,insertSkip:p};return c=c.concat(EN(n,e,m)),c=c.concat(SN(r.recurrenceSymbol,m)),_v(u)&&(c=c.concat(DN(r.idSymbol,o,m)),c=c.concat(xN(r.dependsOnSymbol,o,m,l))),c=c.concat(ON(r.onCompletionSymbol,e,m)),c=c.concat(TN(r,u,m)),c.length>0&&!c.some(y=>y.suggestionType==="match")&&(t||c.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` -`})),c=c.slice(0,a.autoSuggestMaxItems),c}}function bN(r,e,t){let n=MN(e.substring(0,t),[["(",")"],["[","]"]])=="("?")":"]",i=r?n+" ":" ",s=r&&e.length>t&&e.charAt(t)===n?1:0;return{postfix:i,insertSkip:s}}function TN(r,e,t){let n=[],i=t.line;Di(n,i,r.dueDateSymbol,"due date"),Di(n,i,r.startDateSymbol,"start date"),Di(n,i,r.scheduledDateSymbol,"scheduled date"),_N(n,r,t),Di(n,i,r.recurrenceSymbol,"recurring (repeat)"),vN(n,r,t),_v(e)&&(Di(n,i,r.idSymbol,"id"),Di(n,i,r.dependsOnSymbol,"depends on id")),Di(n,i,r.onCompletionSymbol,"on completion");let s=wN(n,t);return s.length===0&&t.settings.autoSuggestMinMatch===0?n:s}function Di(r,e,t,n){e.includes(t)||r.push({displayText:`${t} ${n}`,appendText:`${t} `})}function _N(r,e,t){if(!(i=>Object.values(e.prioritySymbols).some(s=>s.length>0&&i.includes(s)))(t.line)){let i=e.prioritySymbols,s=["High","Medium","Low","Highest","Lowest"];for(let a of s){let o=i[a];r.push({displayText:t.dataviewMode?`${o} priority`:`${o} ${a.toLowerCase()} priority`,appendText:`${o}${t.postfix}`,insertSkip:t.dataviewMode?t.insertSkip:void 0})}}}function vN(r,e,t){if(!t.line.includes(e.createdDateSymbol)){let i=Ht.parseDate("today",!0).format(J.dateFormat);r.push({textToMatch:`${e.createdDateSymbol} created`,displayText:`${e.createdDateSymbol} created today (${i})`,appendText:`${e.createdDateSymbol} ${i}`+t.postfix,insertSkip:t.dataviewMode?t.insertSkip:void 0})}}function wN(r,e){let t=ys(/([a-zA-Z'_-]*)/g,e),n=[];if(t&&t.length>0){let i=t[0];if(i.length>=Math.max(1,e.settings.autoSuggestMinMatch)){let s=r.filter(a=>{var u;return((u=a.textToMatch)!=null?u:a.displayText).toLowerCase().includes(i.toLowerCase())});for(let a of s){let o=e.dataviewMode&&(a.displayText.includes("priority")||a.displayText.includes("created"))?i.length+e.insertSkip:i.length;n.push({suggestionType:"match",displayText:a.displayText,appendText:a.appendText,insertAt:t.index,insertSkip:o})}}}return n}function vv(r,e){let t=`${e}`,n=`${r} ${e}`;return{displayText:t,appendText:n}}function kN(r,e){let n=`${Ht.parseDate(e,!0).format(J.dateFormat)}`,i=`${e} (${n})`,s=`${r} ${n}`;return{displayText:i,appendText:s}}function EN(r,e,t){let n=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],i=[],s=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),a=ys(s,t);if(a&&a.length>=2){let o=a[2];if(o.length1?Ht.parseDate($u(o),!0):null;if(u!=null&&u.isValid()){let c=u.format(J.dateFormat);el(t,a,[c],vv,i)}let l=Cm(n,o,e,!0);el(t,a,l,kN,i)}return i}function SN(r,e){var a;let t=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],n=[],i=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),s=ys(i,e);if(s&&s.length>=2){let o=s[1],u=s[2];if(u.length0){let p=(a=it.fromText({recurrenceRuleText:u,occurrence:new fr({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:a.toText();if(p){let m=`${o} ${p}`+e.postfix;if(n.push({suggestionType:"match",displayText:`\u2705 ${p}`,appendText:m,insertAt:s.index,insertSkip:Am(s[0],e)}),s[0]==m)return[]}}let l=e.settings.autoSuggestMaxItems/2,c=Cm(t,u,l,!1);c.length===0&&u.trim().length===0&&(c=t.slice(0,l)),el(e,s,c,(p,m)=>{let y=`${m}`,_=`${p} ${m}`;return{displayText:y,appendText:_}},n)}return n}function ON(r,e,t){let n=["delete","keep"],i=[],s=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),a=ys(s,t);if(a&&a.length>=2){let o=a[2];if(o.lengtho.id));n.push({suggestionType:"match",displayText:"generate unique id",appendText:`${r} ${a}`+t.postfix,insertAt:s.index,insertSkip:Am(s[0],t)})}return n}function xN(r,e,t,n){let i=[],s=t.dataviewMode?Hn("()[]"):hv(),a=new RegExp(`(${r})([0-9a-zA-Z-_ ^,]*,)*([^,${s}]*)`,"ug"),o=ys(a,t);if(o&&o.length>=1){let u=o[2]||"",l=o[3],c=[];if(u){let d=u.split(",").map(p=>p.trim());c=e.filter(p=>p.id&&d.includes(p.id))}if(l.length>=t.settings.autoSuggestMinMatch){let d=Ju(l.trim(),e,n,[],c);for(let p of d)i.push({suggestionType:"match",displayText:`${p.descriptionWithoutTags} - From: ${p.filename}.md`,appendText:`${r}${u}`,insertAt:o.index,insertSkip:r.length+u.length+l.length,taskItDependsOn:p})}}return i}function Cm(r,e,t,n){let s=r.filter(a=>e&&e.length>=1&&a.toLowerCase().includes(e.toLowerCase())).slice(0,t);return n&&s.length===0&&(s=r.slice(0,t)),s}function el(r,e,t,n,i){let s=e[1];for(let a of t){let{displayText:o,appendText:u}=n(s,a);i.push({suggestionType:"match",displayText:o,appendText:u+r.postfix,insertAt:e.index,insertSkip:Am(e[0],r)})}}function ys(r,e){let t=e.line.matchAll(r),n=e.cursorPos;for(let i of t)if((i==null?void 0:i.index)&&i.index[i,0])),n=Object.fromEntries(e.map(([i,s])=>[s,i]));for(let i of r)i in t?t[i]++:i in n&&(t[n[i]]=Math.max(0,t[n[i]]-1));return Object.values(t).some(i=>i>0)}function MN(r,e){if(e.length===0)return null;let t=Object.fromEntries(e.map(([s,a])=>[s,0])),n=Object.fromEntries(e.map(([s,a])=>[a,s])),i=[];for(let s=0;s=1){for(let o=i.length-1;o>=0;o--)if(i[o].bracket==n[a]){i.splice(o,1);break}}t[n[a]]=Math.max(0,t[n[a]]-1)}}return i.length>0?i[i.length-1].bracket:null}function wv(r,e){return(t,n,i,s,a)=>RN(t.slice(0,n),e)?r(t,n,i,s,a):[]}function kv(r,e,t){let n=_e.getInstance().includedIn(r),i=CN(t,e,n);return typeof i=="boolean"?i:n&&AN(r,e.ch)}function CN(r,e,t){var n,i;return(i=(n=r==null?void 0:r.editorComponent)==null?void 0:n.showTasksPluginAutoSuggest)==null?void 0:i.call(n,e,r,t)}function AN(r,e){if(r.length===0)return!1;let t=ae.extractTaskComponents(r);if(!t)return!1;let n=t.indentation+t.listMarker+" ["+t.status.symbol+"] ";return e>=n.length}function Am(r,e){return e.dataviewMode?r.length+e.insertSkip:r.length}function Rr(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var Pm={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",cancelledDateSymbol:"cancelled::",recurrenceSymbol:"repeat::",onCompletionSymbol:"onCompletion::",idSymbol:"id::",dependsOnSymbol:"dependsOn::",TaskFormatRegularExpressions:{priorityRegex:Rr(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:Rr(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:Rr(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:Rr(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:Rr(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:Rr(/completion:: *(\d{4}-\d{2}-\d{2})/),cancelledDateRegex:Rr(/cancelled:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:Rr(/repeat:: *([a-zA-Z0-9, !]+)/),onCompletionRegex:Rr(/onCompletion:: *([a-zA-Z]+)/),dependsOnRegex:Rr(new RegExp("dependsOn:: *("+xm.source+")")),idRegex:Rr(new RegExp("id:: *("+Ei.source+")"))}},tl=class extends Si{constructor(){super(Pm)}parsePriority(e){switch(e){case"highest":return"0";case"high":return"1";case"medium":return"2";case"low":return"4";case"lowest":return"5";default:return"3"}}componentToString(e,t,n){let i=super.componentToString(e,t,n),s=["blockLink","description"];return i!==""&&!s.includes(n)?` [${i.trim()}]`:i}};var Et=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}get typeGroupText(){let e=this.type,t;switch(e){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return`%%${t}%%${e}`}constructor(e){this.configuration=e}static makeDone(){return new Et(new Ke("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new Et(new Ke("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new Et(new Ke(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new Et(new Ke("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new Et(new Ke("/","In Progress","x",!0,"IN_PROGRESS"))}static makeNonTask(){return new Et(new Ke("Q","Non-Task","A",!0,"NON_TASK"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return Nt[e]||"TODO"}static createUnknownStatus(e){return new Et(new Ke(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=Et.getTypeFromStatusTypeString(e[3]);return new Et(new Ke(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}isCancelled(){return this.type==="CANCELLED"}identicalTo(e){let t=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let n of t)if(this[n]!==e[n])return!1;return!0}previewText(){let e="";return Et.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},ne=Et;ne.DONE=Et.makeDone(),ne.EMPTY=Et.makeEmpty(),ne.TODO=Et.makeTodo();var rl=class{constructor(e=!1,t=!1,n=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t,this.recordTimings=n}};var Le=class{constructor(){this.coreStatuses=[ne.makeTodo().configuration,ne.makeDone().configuration],this.customStatuses=[ne.makeInProgress().configuration,ne.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let i=this.findStatusIndex(t,e);return i<=-1?!1:(e.splice(i,1,n),!0)}static findStatusIndex(e,t){let n=new ne(e);return t.findIndex(i=>new ne(i).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){Le.deleteAllCustomStatuses(e),new Le().customStatuses.forEach(n=>{Le.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(i=>{e.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?n.push(`The status ${i[1]} (${i[0]}) is already added.`):Le.addStatus(e.customStatuses,ne.createFromImportedValue(i))}),n}static allStatuses(e){return e.coreStatuses.concat(e.customStatuses)}static applyToStatusRegistry(e,t){t.clearStatuses(),Le.allStatuses(e).forEach(n=>{t.add(n)})}};var Ev=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var kn=class{constructor(e,t,n,i,s,a){this.internalName=e;this.index=t;this.description=n;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let e=[];return Ev.forEach(t=>{e=[...e,new kn(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return kn.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of kn.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var Mr={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new Si(yo),buildSuggestions:Mm(yo,Rm,!1)},dataview:{displayName:"Dataview",taskSerializer:new tl,buildSuggestions:wv(Mm(Pm,Rm,!0),[["(",")"],["[","]"]])}},Im={globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,setCancelledDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:20,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsScheduledDateFormat:"",filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new Le,features:kn.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new rl,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},En=K({},Im);function Nm(r,e){for(let t in r)e[t]===void 0&&(e[t]=r[t])}var X=()=>(Nm(kn.settingsFlags,En.features),Nm(Im.loggingOptions.minLevels,En.loggingOptions.minLevels),Nm(Im.debugSettings,En.debugSettings),En.statusSettings.customStatuses.forEach((r,e,t)=>{var i,s;let n=ne.getTypeFromStatusTypeString(r.type);t[e]=new Ke((i=r.symbol)!=null?i:" ",r.name,(s=r.nextStatusSymbol)!=null?s:"x",r.availableAsCommand,n)}),K({},En)),Ve=r=>(En=K(K({},En),r),X());var xi=(r,e)=>(En.generalSettings[r]=e,X()),Sv=r=>{var e;return(e=En.features[r])!=null?e:!1};function _o(){return Mr[X().taskFormat]}function nl(r){let t={"<":"<",">":">","&":"&",'"':"""}[r];return t!==void 0?t:r}function Ov(r){let e=[...r],t="";return e.forEach(n=>{t+=nl(n)}),t}var De=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}set(e){this.clearStatuses(),e.forEach(t=>{this.add(t)})}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==ne.EMPTY.symbol)}static getInstance(){return De.instance||(De.instance=new De),De.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof ne?this._registeredStatuses.push(e):this._registeredStatuses.push(new ne(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):ne.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):ne.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:ne.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return ne.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:ne.createUnknownStatus(e.nextStatusSymbol)}getNextRecurrenceStatusOrCreate(e){let t=this.getNextStatusOrCreate(e),n=this.getNextRecurrenceStatusOfType(t,"TODO");if(n)return n;let i=this.getNextRecurrenceStatusOfType(t,"IN_PROGRESS");return i||this.bySymbolOrCreate(" ")}getNextRecurrenceStatusOfType(e,t){if(e.type===t)return e;let n=e;for(let i=0;i!this.hasSymbol(s.symbol)),n=new De,i=[];return t.forEach(s=>{if(n.hasSymbol(s.symbol))return;let a=De.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),n.add(a)}),i.sort((s,a)=>s.symbol.localeCompare(a.symbol,void 0,{numeric:!0}))}static copyStatusWithNewName(e,t){let n=new Ke(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new ne(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[ne.makeTodo(),ne.makeInProgress(),ne.makeDone(),ne.makeCancelled()].forEach(t=>{this.add(t)})}mermaidDiagram(e=!1){let t=this.registeredStatuses,n="mermaid",i=[],s=[];return t.forEach((a,o)=>{let u=this.getMermaidNodeLabel(a,e);i.push(`${o+1}${u}`);let l=this.getNextStatus(a);if(this.addEdgeIfNotToInternal(t,l,s,o,!1),a.type==="DONE"){let c=this.getNextRecurrenceStatusOrCreate(a);c.symbol!==l.symbol&&this.addEdgeIfNotToInternal(t,c,s,o,!0)}}),` +`)},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(n){return t.rrule(n.clone())}),this._exrule.forEach(function(n){return t.exrule(n.clone())}),this._rdate.forEach(function(n){return t.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return t.exdate(new Date(n.getTime()))}),t},e}(z);function cv(r,e){if(!(r instanceof z))throw new TypeError(String(r)+" is not RRule instance");Te(e.map(String),String(r))||e.push(r)}function dv(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");Te(e.map(Number),Number(r))||(e.push(r),_n(e))}function fv(r,e,t){var n=!t||t.toUpperCase()==="UTC",i=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),s=e.map(function(a){return ds(a.valueOf(),n)}).join(",");return"".concat(i).concat(s)}var it=class{constructor({rrule:e,baseOnToday:t,occurrence:n}){this.rrule=e,this.baseOnToday=t,this.occurrence=n}static fromText({recurrenceRuleText:e,occurrence:t}){try{let n=e.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(n==null)return null;let i=n[1].trim(),s=n[2]!==void 0,a=z.parseText(i);if(a!==null){let o=t.referenceDate;!s&&o!==null?a.dtstart=window.moment(o).startOf("day").utc(!0).toDate():a.dtstart=window.moment().startOf("day").utc(!0).toDate();let u=new z(a);return new it({rrule:u,baseOnToday:s,occurrence:t})}}catch(n){n instanceof Error&&console.log(n.message)}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}next(e=window.moment()){let t=this.nextReferenceDate(e);return t===null?null:this.occurrence.next(t)}identicalTo(e){return this.baseOnToday!==e.baseOnToday||!this.occurrence.isIdenticalTo(e.occurrence)?!1:this.toText()===e.toText()}nextReferenceDate(e){return this.baseOnToday?this.nextReferenceDateFromToday(e.clone()).toDate():this.nextReferenceDateFromOriginalReferenceDate().toDate()}nextReferenceDateFromToday(e){let t=new z(he(K({},this.rrule.origOptions),{dtstart:e.startOf("day").utc(!0).toDate()}));return this.nextAfter(e.endOf("day"),t)}nextReferenceDateFromOriginalReferenceDate(){var t;let e=window.moment((t=this.occurrence.referenceDate)!=null?t:void 0).endOf("day");return this.nextAfter(e,this.rrule)}nextAfter(e,t){e.utc(!0);let n=window.moment(t.after(e.toDate())),i=this.toText(),s=i.match(/every( \d+)? month(s)?(.*)?/);s!==null&&(i.includes(" on ")||(n=it.nextAfterMonths(e,n,t,s[1])));let a=i.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(n=it.nextAfterYears(e,n,t,a[1])),it.addTimezone(n)}static nextAfterMonths(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));it.isSkippingTooManyMonths(e,t,s);)t=it.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let i=t.month()-e.month();return i+=(t.year()-e.year())*12,i>n}static nextAfterYears(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));it.isSkippingTooManyYears(e,t,s);)t=it.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new z(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};var hs=(m=>(m.Description="description",m.Id="id",m.DependsOn="dependsOn",m.Priority="priority",m.RecurrenceRule="recurrenceRule",m.OnCompletion="onCompletion",m.CreatedDate="createdDate",m.StartDate="startDate",m.ScheduledDate="scheduledDate",m.DueDate="dueDate",m.CancelledDate="cancelledDate",m.DoneDate="doneDate",m.BlockLink="blockLink",m))(hs||{}),Qu=Object.values(hs),zr=class{constructor(){this.visible={};this.tagsVisible=!0;Qu.forEach(e=>{this.visible[e]=!0})}isShown(e){return this.visible[e]}areTagsShown(){return this.tagsVisible}hide(e){this.visible[e]=!1}setVisibility(e,t){this.visible[e]=t}setTagsVisibility(e){this.tagsVisible=e}get shownComponents(){return Qu.filter(e=>this.visible[e])}get hiddenComponents(){return Qu.filter(e=>!this.visible[e])}get toggleableComponents(){return Qu.filter(e=>e!=="description"&&e!=="blockLink")}toggleVisibilityExceptDescriptionAndBlockLink(){this.toggleableComponents.forEach(e=>{this.visible[e]=!this.visible[e]}),this.setTagsVisibility(!this.areTagsShown())}};var Nt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(Nt||{}),Ke=class{constructor(e,t,n,i,s="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=i,this.type=s}};function pv(r){let e=r.trim().toLowerCase();return e==="delete"?"delete":e==="keep"?"keep":""}function pN(r,e){return r.filter(t=>t!==e)}function mN(r,e){let t=r.status,n=e.status,i=n.type===t.type;return n.type!=="DONE"||i}function mv(r,e){let t=e.length;if(r.onCompletion===""||r.onCompletion==="keep"||t===0)return e;let n=e[t-1];if(mN(r,n))return e;let s=r.onCompletion;return s==="delete"?pN(e,n):(console.log(`OnCompletion action ${s} not yet implemented.`),e)}var Kt=class{},J=Kt;J.dateFormat="YYYY-MM-DD",J.dateTimeFormat="YYYY-MM-DD HH:mm",J.indentationRegex=/^([\s\t>]*)/,J.listMarkerRegex=/([-*+]|[0-9]+\.)/,J.checkboxRegex=/\[(.)\]/u,J.afterCheckboxRegex=/ *(.*)/u,J.taskRegex=new RegExp(Kt.indentationRegex.source+Kt.listMarkerRegex.source+" +"+Kt.checkboxRegex.source+Kt.afterCheckboxRegex.source,"u"),J.nonTaskRegex=new RegExp(Kt.indentationRegex.source+Kt.listMarkerRegex.source+"? *("+Kt.checkboxRegex.source+")?"+Kt.afterCheckboxRegex.source,"u"),J.listItemRegex=new RegExp(Kt.indentationRegex.source+Kt.listMarkerRegex.source),J.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,J.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,J.hashTagsFromEnd=new RegExp(Kt.hashTags.source+"$");var Ei=/[a-zA-Z0-9-_]+/,xm=new RegExp(Ei.source+"( *, *"+Ei.source+" *)*"),yo={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",cancelledDateSymbol:"\u274C",recurrenceSymbol:"\u{1F501}",onCompletionSymbol:"\u{1F3C1}",dependsOnSymbol:"\u26D4",idSymbol:"\u{1F194}",TaskFormatRegularExpressions:{priorityRegex:/([🔺⏫🔼🔽⏬])\uFE0F?$/u,startDateRegex:/🛫 *(\d{4}-\d{2}-\d{2})$/u,createdDateRegex:/➕ *(\d{4}-\d{2}-\d{2})$/u,scheduledDateRegex:/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,dueDateRegex:/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,doneDateRegex:/✅ *(\d{4}-\d{2}-\d{2})$/u,cancelledDateRegex:/❌ *(\d{4}-\d{2}-\d{2})$/u,recurrenceRegex:/🔁 ?([a-zA-Z0-9, !]+)$/iu,onCompletionRegex:/🏁 ?([a-zA-Z]+)$/iu,dependsOnRegex:new RegExp("\u26D4\uFE0F? *("+xm.source+")$","iu"),idRegex:new RegExp("\u{1F194} *("+Ei.source+")$","iu")}};function Xu(r,e,t){return t?r?" "+e:` ${e} ${t}`:""}function gs(r,e,t){return t?r?" "+e:` ${e} ${t.format(J.dateFormat)}`:""}function hv(){let r=[];return Object.values(yo.prioritySymbols).forEach(e=>{e.length>0&&r.push(e)}),Object.values(yo).forEach(e=>{typeof e=="string"&&r.push(e)}),r}var Si=class{constructor(e){this.symbols=e}serialize(e){let t=new zr,n="",i=!1;for(let s of t.shownComponents)n+=this.componentToString(e,i,s);return n}componentToString(e,t,n){var _;let{prioritySymbols:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:u,cancelledDateSymbol:l,recurrenceSymbol:c,onCompletionSymbol:d,dueDateSymbol:p,dependsOnSymbol:m,idSymbol:y}=this.symbols;switch(n){case"description":return e.description;case"priority":{let b="";return e.priority==="0"?b=" "+i.Highest:e.priority==="1"?b=" "+i.High:e.priority==="2"?b=" "+i.Medium:e.priority==="4"?b=" "+i.Low:e.priority==="5"&&(b=" "+i.Lowest),b}case"startDate":return gs(t,s,e.startDate);case"createdDate":return gs(t,a,e.createdDate);case"scheduledDate":return e.scheduledDateIsInferred?"":gs(t,o,e.scheduledDate);case"doneDate":return gs(t,u,e.doneDate);case"cancelledDate":return gs(t,l,e.cancelledDate);case"dueDate":return gs(t,p,e.dueDate);case"recurrenceRule":return e.recurrence?Xu(t,c,e.recurrence.toText()):"";case"onCompletion":return e.onCompletion===""?"":Xu(t,d,e.onCompletion);case"dependsOn":return e.dependsOn.length===0?"":Xu(t,m,e.dependsOn.join(","));case"id":return Xu(t,y,e.id);case"blockLink":return(_=e.blockLink)!=null?_:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}parsePriority(e){let{prioritySymbols:t}=this.symbols;switch(e){case t.Lowest:return"5";case t.Low:return"4";case t.Medium:return"2";case t.High:return"1";case t.Highest:return"0";default:return"3"}}deserialize(e){let{TaskFormatRegularExpressions:t}=this.symbols,n,i="3",s=null,a=null,o=null,u=null,l=null,c=null,d="",p=null,m="",y="",_=[],b="",E=20,R=0;do{n=!1;let S=e.match(t.priorityRegex);S!==null&&(i=this.parsePriority(S[1]),e=e.replace(t.priorityRegex,"").trim(),n=!0);let F=e.match(t.doneDateRegex);F!==null&&(u=window.moment(F[1],J.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let q=e.match(t.cancelledDateRegex);q!==null&&(l=window.moment(q[1],J.dateFormat),e=e.replace(t.cancelledDateRegex,"").trim(),n=!0);let te=e.match(t.dueDateRegex);te!==null&&(o=window.moment(te[1],J.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let G=e.match(t.scheduledDateRegex);G!==null&&(a=window.moment(G[1],J.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let H=e.match(t.startDateRegex);H!==null&&(s=window.moment(H[1],J.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let be=e.match(t.createdDateRegex);be!==null&&(c=window.moment(be[1],J.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let Pe=e.match(t.recurrenceRegex);Pe!==null&&(d=Pe[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let j=e.match(t.onCompletionRegex);if(j!=null){e=e.replace(t.onCompletionRegex,"").trim();let I=j[1];m=pv(I),n=!0}let $=e.match(J.hashTagsFromEnd);if($!=null){e=e.replace(J.hashTagsFromEnd,"").trim(),n=!0;let I=$[0].trim();b=b.length>0?[I,b].join(" "):I}let D=e.match(t.idRegex);D!=null&&(e=e.replace(t.idRegex,"").trim(),y=D[1].trim(),n=!0);let B=e.match(t.dependsOnRegex);B!=null&&(e=e.replace(t.dependsOnRegex,"").trim(),_=B[1].replace(/ /g,"").split(",").filter(I=>I!==""),n=!0),R++}while(n&&R<=E);return d.length>0&&(p=it.fromText({recurrenceRuleText:d,occurrence:new fr({startDate:s,scheduledDate:a,dueDate:o})})),b.length>0&&(e+=" "+b),{description:e,priority:i,startDate:s,createdDate:c,scheduledDate:a,dueDate:o,doneDate:u,cancelledDate:l,recurrence:p,onCompletion:m,id:y,dependsOn:_,tags:ae.extractHashtags(e)}}};function To(r){let e="",t=!0;for(;t;)e=Math.random().toString(36).substring(2,6+2),r.includes(e)||(t=!1);return e}function Zu(r,e){return r.id!==""?r:new ae(he(K({},r),{id:To(e)}))}function gv(r,e){let t=r;if(!r.dependsOn.includes(e.id)){let n=[...r.dependsOn,e.id];t=new ae(he(K({},r),{dependsOn:n}))}return t}function yv(r,e){let t=r;if(r.dependsOn.includes(e.id)){let n=r.dependsOn.filter(i=>i!==e.id);t=new ae(he(K({},r),{dependsOn:n}))}return t}function Hn(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var Vn=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return Vn.instance||(Vn.instance=new Vn),Vn.instance}get(){return this._globalFilter}set(e){this._globalFilter=e}reset(){this.set(Vn.empty)}isEmpty(){return this.get()===Vn.empty}equals(e){return this.get()===e}includedIn(e){let t=this.get();return e.includes(t)}prependTo(e){return this.get()+" "+e}removeAsWordFromDependingOnSettings(e){return this.getRemoveGlobalFilter()?this.removeAsWordFrom(e):e}getRemoveGlobalFilter(){return this._removeGlobalFilter}setRemoveGlobalFilter(e){this._removeGlobalFilter=e}removeAsWordFrom(e){if(this.isEmpty())return e;let t=RegExp("(^|\\s)"+Hn(this.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}removeAsSubstringFrom(e){let t=this.get();return e.replace(t,"").trim()}},_e=Vn;_e.empty="";var Tv=require("obsidian");var gN=20;function Oi(r){return _e.getInstance().removeAsWordFrom(r.description)}function yN(r,e){if(r==="")return e;let t=(0,Tv.prepareSimpleSearch)(r),n=-4;return e.map(a=>{let o=t(Oi(a));return o&&o.score>n?{item:a,match:o}:null}).filter(Boolean).sort((a,o)=>o.match.score-a.match.score).map(a=>a.item)}function Ju(r,e,t,n,i){let s=yN(r,e);return s=s.filter(a=>!(a.isDone||a.description.includes("<%")&&a.description.includes("%>")||a.description===(t==null?void 0:t.description)&&a.taskLocation.path===(t==null?void 0:t.taskLocation.path)&&a.originalMarkdown===(t==null?void 0:t.originalMarkdown)||(n==null?void 0:n.includes(a))||(i==null?void 0:i.includes(a)))),t&&s.sort((a,o)=>{let u=a.taskLocation.path===t.taskLocation.path,l=o.taskLocation.path===t.taskLocation.path;return u&&l?Math.abs(a.taskLocation.lineNumber-t.taskLocation.lineNumber)-Math.abs(o.taskLocation.lineNumber-t.taskLocation.lineNumber):u?-1:l?1:0}),s.slice(0,gN)}var Rm=5,bN=!0;globalThis.SHOW_DEPENDENCY_SUGGESTIONS=bN;function _v(r){return globalThis.SHOW_DEPENDENCY_SUGGESTIONS&&r}function Mm(r,e,t){let n=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(i,s,a,o,u,l)=>{let c=[],{postfix:d,insertSkip:p}=TN(t,i,s),m={line:i,cursorPos:s,settings:a,dataviewMode:t,postfix:d,insertSkip:p};return c=c.concat(SN(n,e,m)),c=c.concat(ON(r.recurrenceSymbol,m)),_v(u)&&(c=c.concat(xN(r.idSymbol,o,m)),c=c.concat(RN(r.dependsOnSymbol,o,m,l))),c=c.concat(DN(r.onCompletionSymbol,e,m)),c=c.concat(_N(r,u,m)),c.length>0&&!c.some(y=>y.suggestionType==="match")&&(t||c.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` +`})),c=c.slice(0,a.autoSuggestMaxItems),c}}function TN(r,e,t){let n=CN(e.substring(0,t),[["(",")"],["[","]"]])=="("?")":"]",i=r?n+" ":" ",s=r&&e.length>t&&e.charAt(t)===n?1:0;return{postfix:i,insertSkip:s}}function _N(r,e,t){let n=[],i=t.line;Di(n,i,r.dueDateSymbol,"due date"),Di(n,i,r.startDateSymbol,"start date"),Di(n,i,r.scheduledDateSymbol,"scheduled date"),vN(n,r,t),Di(n,i,r.recurrenceSymbol,"recurring (repeat)"),wN(n,r,t),_v(e)&&(Di(n,i,r.idSymbol,"id"),Di(n,i,r.dependsOnSymbol,"depends on id")),Di(n,i,r.onCompletionSymbol,"on completion");let s=kN(n,t);return s.length===0&&t.settings.autoSuggestMinMatch===0?n:s}function Di(r,e,t,n){e.includes(t)||r.push({displayText:`${t} ${n}`,appendText:`${t} `})}function vN(r,e,t){if(!(i=>Object.values(e.prioritySymbols).some(s=>s.length>0&&i.includes(s)))(t.line)){let i=e.prioritySymbols,s=["High","Medium","Low","Highest","Lowest"];for(let a of s){let o=i[a];r.push({displayText:t.dataviewMode?`${o} priority`:`${o} ${a.toLowerCase()} priority`,appendText:`${o}${t.postfix}`,insertSkip:t.dataviewMode?t.insertSkip:void 0})}}}function wN(r,e,t){if(!t.line.includes(e.createdDateSymbol)){let i=Ht.parseDate("today",!0).format(J.dateFormat);r.push({textToMatch:`${e.createdDateSymbol} created`,displayText:`${e.createdDateSymbol} created today (${i})`,appendText:`${e.createdDateSymbol} ${i}`+t.postfix,insertSkip:t.dataviewMode?t.insertSkip:void 0})}}function kN(r,e){let t=ys(/([a-zA-Z'_-]*)/g,e),n=[];if(t&&t.length>0){let i=t[0];if(i.length>=Math.max(1,e.settings.autoSuggestMinMatch)){let s=r.filter(a=>{var u;return((u=a.textToMatch)!=null?u:a.displayText).toLowerCase().includes(i.toLowerCase())});for(let a of s){let o=e.dataviewMode&&(a.displayText.includes("priority")||a.displayText.includes("created"))?i.length+e.insertSkip:i.length;n.push({suggestionType:"match",displayText:a.displayText,appendText:a.appendText,insertAt:t.index,insertSkip:o})}}}return n}function vv(r,e){let t=`${e}`,n=`${r} ${e}`;return{displayText:t,appendText:n}}function EN(r,e){let n=`${Ht.parseDate(e,!0).format(J.dateFormat)}`,i=`${e} (${n})`,s=`${r} ${n}`;return{displayText:i,appendText:s}}function SN(r,e,t){let n=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],i=[],s=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),a=ys(s,t);if(a&&a.length>=2){let o=a[2];if(o.length1?Ht.parseDate($u(o),!0):null;if(u!=null&&u.isValid()){let c=u.format(J.dateFormat);el(t,a,[c],vv,i)}let l=Cm(n,o,e,!0);el(t,a,l,EN,i)}return i}function ON(r,e){var a;let t=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],n=[],i=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),s=ys(i,e);if(s&&s.length>=2){let o=s[1],u=s[2];if(u.length0){let p=(a=it.fromText({recurrenceRuleText:u,occurrence:new fr({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:a.toText();if(p){let m=`${o} ${p}`+e.postfix;if(n.push({suggestionType:"match",displayText:`\u2705 ${p}`,appendText:m,insertAt:s.index,insertSkip:Am(s[0],e)}),s[0]==m)return[]}}let l=e.settings.autoSuggestMaxItems/2,c=Cm(t,u,l,!1);c.length===0&&u.trim().length===0&&(c=t.slice(0,l)),el(e,s,c,(p,m)=>{let y=`${m}`,_=`${p} ${m}`;return{displayText:y,appendText:_}},n)}return n}function DN(r,e,t){let n=["delete","keep"],i=[],s=new RegExp(`(${r})\\s*([0-9a-zA-Z ]*)`,"ug"),a=ys(s,t);if(a&&a.length>=2){let o=a[2];if(o.lengtho.id));n.push({suggestionType:"match",displayText:"generate unique id",appendText:`${r} ${a}`+t.postfix,insertAt:s.index,insertSkip:Am(s[0],t)})}return n}function RN(r,e,t,n){let i=[],s=t.dataviewMode?Hn("()[]"):hv(),a=new RegExp(`(${r})([0-9a-zA-Z-_ ^,]*,)*([^,${s}]*)`,"ug"),o=ys(a,t);if(o&&o.length>=1){let u=o[2]||"",l=o[3],c=[];if(u){let d=u.split(",").map(p=>p.trim());c=e.filter(p=>p.id&&d.includes(p.id))}if(l.length>=t.settings.autoSuggestMinMatch){let d=Ju(l.trim(),e,n,[],c);for(let p of d)i.push({suggestionType:"match",displayText:`${p.descriptionWithoutTags} - From: ${p.filename}.md`,appendText:`${r}${u}`,insertAt:o.index,insertSkip:r.length+u.length+l.length,taskItDependsOn:p})}}return i}function Cm(r,e,t,n){let s=r.filter(a=>e&&e.length>=1&&a.toLowerCase().includes(e.toLowerCase())).slice(0,t);return n&&s.length===0&&(s=r.slice(0,t)),s}function el(r,e,t,n,i){let s=e[1];for(let a of t){let{displayText:o,appendText:u}=n(s,a);i.push({suggestionType:"match",displayText:o,appendText:u+r.postfix,insertAt:e.index,insertSkip:Am(e[0],r)})}}function ys(r,e){let t=e.line.matchAll(r),n=e.cursorPos;for(let i of t)if((i==null?void 0:i.index)&&i.index[i,0])),n=Object.fromEntries(e.map(([i,s])=>[s,i]));for(let i of r)i in t?t[i]++:i in n&&(t[n[i]]=Math.max(0,t[n[i]]-1));return Object.values(t).some(i=>i>0)}function CN(r,e){if(e.length===0)return null;let t=Object.fromEntries(e.map(([s,a])=>[s,0])),n=Object.fromEntries(e.map(([s,a])=>[a,s])),i=[];for(let s=0;s=1){for(let o=i.length-1;o>=0;o--)if(i[o].bracket==n[a]){i.splice(o,1);break}}t[n[a]]=Math.max(0,t[n[a]]-1)}}return i.length>0?i[i.length-1].bracket:null}function wv(r,e){return(t,n,i,s,a)=>MN(t.slice(0,n),e)?r(t,n,i,s,a):[]}function kv(r,e,t){let n=_e.getInstance().includedIn(r),i=AN(t,e,n);return typeof i=="boolean"?i:n&&PN(r,e.ch)}function AN(r,e,t){var n,i;return(i=(n=r==null?void 0:r.editorComponent)==null?void 0:n.showTasksPluginAutoSuggest)==null?void 0:i.call(n,e,r,t)}function PN(r,e){if(r.length===0)return!1;let t=ae.extractTaskComponents(r);if(!t)return!1;let n=t.indentation+t.listMarker+" ["+t.status.symbol+"] ";return e>=n.length}function Am(r,e){return e.dataviewMode?r.length+e.insertSkip:r.length}function Rr(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var Pm={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",cancelledDateSymbol:"cancelled::",recurrenceSymbol:"repeat::",onCompletionSymbol:"onCompletion::",idSymbol:"id::",dependsOnSymbol:"dependsOn::",TaskFormatRegularExpressions:{priorityRegex:Rr(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:Rr(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:Rr(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:Rr(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:Rr(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:Rr(/completion:: *(\d{4}-\d{2}-\d{2})/),cancelledDateRegex:Rr(/cancelled:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:Rr(/repeat:: *([a-zA-Z0-9, !]+)/),onCompletionRegex:Rr(/onCompletion:: *([a-zA-Z]+)/),dependsOnRegex:Rr(new RegExp("dependsOn:: *("+xm.source+")")),idRegex:Rr(new RegExp("id:: *("+Ei.source+")"))}},tl=class extends Si{constructor(){super(Pm)}parsePriority(e){switch(e){case"highest":return"0";case"high":return"1";case"medium":return"2";case"low":return"4";case"lowest":return"5";default:return"3"}}componentToString(e,t,n){let i=super.componentToString(e,t,n),s=["blockLink","description"];return i!==""&&!s.includes(n)?` [${i.trim()}]`:i}};var Et=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}get typeGroupText(){let e=this.type,t;switch(e){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return`%%${t}%%${e}`}constructor(e){this.configuration=e}static makeDone(){return new Et(new Ke("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new Et(new Ke("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new Et(new Ke(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new Et(new Ke("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new Et(new Ke("/","In Progress","x",!0,"IN_PROGRESS"))}static makeNonTask(){return new Et(new Ke("Q","Non-Task","A",!0,"NON_TASK"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return Nt[e]||"TODO"}static createUnknownStatus(e){return new Et(new Ke(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=Et.getTypeFromStatusTypeString(e[3]);return new Et(new Ke(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}isCancelled(){return this.type==="CANCELLED"}identicalTo(e){let t=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let n of t)if(this[n]!==e[n])return!1;return!0}previewText(){let e="";return Et.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},ne=Et;ne.DONE=Et.makeDone(),ne.EMPTY=Et.makeEmpty(),ne.TODO=Et.makeTodo();var rl=class{constructor(e=!1,t=!1,n=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t,this.recordTimings=n}};var Le=class{constructor(){this.coreStatuses=[ne.makeTodo().configuration,ne.makeDone().configuration],this.customStatuses=[ne.makeInProgress().configuration,ne.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let i=this.findStatusIndex(t,e);return i<=-1?!1:(e.splice(i,1,n),!0)}static findStatusIndex(e,t){let n=new ne(e);return t.findIndex(i=>new ne(i).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){Le.deleteAllCustomStatuses(e),new Le().customStatuses.forEach(n=>{Le.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(i=>{e.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?n.push(`The status ${i[1]} (${i[0]}) is already added.`):Le.addStatus(e.customStatuses,ne.createFromImportedValue(i))}),n}static allStatuses(e){return e.coreStatuses.concat(e.customStatuses)}static applyToStatusRegistry(e,t){t.clearStatuses(),Le.allStatuses(e).forEach(n=>{t.add(n)})}};var Ev=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var kn=class{constructor(e,t,n,i,s,a){this.internalName=e;this.index=t;this.description=n;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let e=[];return Ev.forEach(t=>{e=[...e,new kn(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return kn.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of kn.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var Mr={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new Si(yo),buildSuggestions:Mm(yo,Rm,!1)},dataview:{displayName:"Dataview",taskSerializer:new tl,buildSuggestions:wv(Mm(Pm,Rm,!0),[["(",")"],["[","]"]])}},Im={globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,setCancelledDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:20,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsScheduledDateFormat:"",filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new Le,features:kn.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new rl,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},En=K({},Im);function Nm(r,e){for(let t in r)e[t]===void 0&&(e[t]=r[t])}var X=()=>(Nm(kn.settingsFlags,En.features),Nm(Im.loggingOptions.minLevels,En.loggingOptions.minLevels),Nm(Im.debugSettings,En.debugSettings),En.statusSettings.customStatuses.forEach((r,e,t)=>{var i,s;let n=ne.getTypeFromStatusTypeString(r.type);t[e]=new Ke((i=r.symbol)!=null?i:" ",r.name,(s=r.nextStatusSymbol)!=null?s:"x",r.availableAsCommand,n)}),K({},En)),Ve=r=>(En=K(K({},En),r),X());var xi=(r,e)=>(En.generalSettings[r]=e,X()),Sv=r=>{var e;return(e=En.features[r])!=null?e:!1};function _o(){return Mr[X().taskFormat]}function nl(r){let t={"<":"<",">":">","&":"&",'"':"""}[r];return t!==void 0?t:r}function Ov(r){let e=[...r],t="";return e.forEach(n=>{t+=nl(n)}),t}var De=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}set(e){this.clearStatuses(),e.forEach(t=>{this.add(t)})}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==ne.EMPTY.symbol)}static getInstance(){return De.instance||(De.instance=new De),De.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof ne?this._registeredStatuses.push(e):this._registeredStatuses.push(new ne(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):ne.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):ne.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:ne.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return ne.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:ne.createUnknownStatus(e.nextStatusSymbol)}getNextRecurrenceStatusOrCreate(e){let t=this.getNextStatusOrCreate(e),n=this.getNextRecurrenceStatusOfType(t,"TODO");if(n)return n;let i=this.getNextRecurrenceStatusOfType(t,"IN_PROGRESS");return i||this.bySymbolOrCreate(" ")}getNextRecurrenceStatusOfType(e,t){if(e.type===t)return e;let n=e;for(let i=0;i!this.hasSymbol(s.symbol)),n=new De,i=[];return t.forEach(s=>{if(n.hasSymbol(s.symbol))return;let a=De.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),n.add(a)}),i.sort((s,a)=>s.symbol.localeCompare(a.symbol,void 0,{numeric:!0}))}static copyStatusWithNewName(e,t){let n=new Ke(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new ne(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[ne.makeTodo(),ne.makeInProgress(),ne.makeDone(),ne.makeCancelled()].forEach(t=>{this.add(t)})}mermaidDiagram(e=!1){let t=this.registeredStatuses,n="mermaid",i=[],s=[];return t.forEach((a,o)=>{let u=this.getMermaidNodeLabel(a,e);i.push(`${o+1}${u}`);let l=this.getNextStatus(a);if(this.addEdgeIfNotToInternal(t,l,s,o,!1),a.type==="DONE"){let c=this.getNextRecurrenceStatusOrCreate(a);c.symbol!==l.symbol&&this.addEdgeIfNotToInternal(t,c,s,o,!0)}}),` \`\`\`${n} flowchart LR @@ -146,8 +146,8 @@ ${s.join(` linkStyle default stroke:gray \`\`\` -`}addEdgeIfNotToInternal(e,t,n,i,s){let a=e.findIndex(l=>l.symbol===t.symbol),o=a!==-1,u=t.type!=="EMPTY";if(o&&u){let l;s?l='-. "\u{1F501}" .-> ':l=" --> ";let c=`${i+1}${l}${a+1}`;n.push(c)}}getMermaidNodeLabel(e,t){let n=Ov(e.name),i=e.type;if(t){let s=nl(e.symbol),a=nl(e.nextStatusSymbol),o=`[${s}] -> [${a}]`,u=`'${n}'`,l=`(${i})`;return`["${u}
${o}
${l}"]:::${i}`}else return`["${n}"]:::${i}`}};var Dv=require("obsidian");var Kr=class{constructor(e,t){this.name=e,this.sortOrder=t}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}};var It=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(J.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(J.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}get category(){let e=window.moment(),t=this.moment;return t?t.isBefore(e,"day")?new Kr("Overdue",1):t.isSame(e,"day")?new Kr("Today",2):t.isValid()?new Kr("Future",3):new Kr("Invalid date",0):new Kr("Undated",4)}get fromNow(){let e=this.moment;if(!e)return new Kr("",0);let t=this.fromNowOrder(e);return new Kr(e.fromNow(),t)}fromNowOrder(e){if(!e.isValid())return 0;let t=window.moment(),n=e.isSameOrBefore(t,"day"),i=this.fromNowStartDateOfGroup(e,n,t);return Number((n?1:3)+i.format("YYYYMMDD"))}fromNowStartDateOfGroup(e,t,n){let i=e.fromNow(!0).split(" "),s,a=Number(i[0]);isNaN(a)?s=1:s=a;let o=i[1];return t?n.subtract(s,o):n.add(s,o)}postpone(e="days",t=1){if(!this._date)throw new Dv.Notice("Cannot postpone a null date");let n=window.moment().startOf("day");return this._date.isSameOrAfter(n,"day")?this._date.clone().add(t,e):n.add(t,e)}};var Sn=class{static priorityNameUsingNone(e){let t="ERROR";switch(e){case"1":t="High";break;case"0":t="Highest";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break;case"5":t="Lowest";break}return t}static priorityNameUsingNormal(e){return Sn.priorityNameUsingNone(e).replace("None","Normal")}};var NN=require("obsidian"),Cv=oa(Mv());var Fm=class extends Cv.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,i)=>n+i,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",i="";for(let s in this.options.minLevels)t.startsWith(s)&&s.length>=i.length&&(n=this.options.minLevels[s],i=s);return new Lm(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},St=new Fm,Lm=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e){r.debug(`${e} ==> ${i+1} : ${n.toFileLineString()}`)})}var yt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=X();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),i=e.substring(t,n),{filenameAsScheduledDateFormat:s}=X();if(s!==""){let o=window.moment(i,s,!0);if(o.isValid())return o}let a=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(a||(a=/(\d{4})(\d{2})(\d{2})/.exec(i)),a){let o=window.moment([parseInt(a[1]),parseInt(a[2])-1,parseInt(a[3])]);if(o.isValid())return o}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let i=e.scheduledDate,s=e.scheduledDateIsInferred;return n===null?s&&(s=!1,i=null):s?i=n:this.canApplyFallback(e)&&(i=n,s=!0),new ae(he(K({},e),{taskLocation:t,scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(i=>(n!==null&&!n.isSame(i.scheduledDate,"day")&&(i=new ae(he(K({},i),{scheduledDateIsInferred:!1}))),i))}};var Cr=class{static calculate(e){var n,i,s;let t=0;if((n=e.dueDate)!=null&&n.isValid()){let a=window.moment().startOf("day"),o=Math.round(a.diff(e.dueDate)/Cr.milliSecondsPerDay),u;o>=7?u=1:o>=-14?u=(o+14)*.8/21+.2:u=.2,t+=u*Cr.dueCoefficient}switch((i=e.scheduledDate)!=null&&i.isValid()&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*Cr.scheduledCoefficient),(s=e.startDate)!=null&&s.isValid()&&window.moment().isBefore(e.startDate)&&(t+=1*Cr.startedCoefficient),e.priority){case"0":t+=1.5*Cr.priorityCoefficient;break;case"1":t+=1*Cr.priorityCoefficient;break;case"2":t+=.65*Cr.priorityCoefficient;break;case"3":t+=.325*Cr.priorityCoefficient;break;case"5":t-=.3*Cr.priorityCoefficient;break}return t}},On=Cr;On.dueCoefficient=12,On.scheduledCoefficient=5,On.startedCoefficient=-3,On.priorityCoefficient=6,On.milliSecondsPerDay=1e3*60*60*24;var ae=class extends Vi{constructor({status:t,description:n,taskLocation:i,indentation:s,listMarker:a,priority:o,createdDate:u,startDate:l,scheduledDate:c,dueDate:d,doneDate:p,cancelledDate:m,recurrence:y,onCompletion:_,dependsOn:b,id:E,blockLink:R,tags:S,originalMarkdown:F,scheduledDateIsInferred:q,parent:te=null}){super(F,te);this._urgency=null;this.status=t,this.description=n,this.indentation=s,this.listMarker=a,this.taskLocation=i,this.tags=S,this.priority=o,this.createdDate=u,this.startDate=l,this.scheduledDate=c,this.dueDate=d,this.doneDate=p,this.cancelledDate=m,this.recurrence=y,this.onCompletion=_,this.dependsOn=b,this.id=E,this.blockLink=R,this.scheduledDateIsInferred=q}static fromLine({line:t,taskLocation:n,fallbackDate:i}){let s=ae.extractTaskComponents(t);return s===null||!_e.getInstance().includedIn(s.body)?null:ae.parseTaskSignifiers(t,n,i)}static parseTaskSignifiers(t,n,i){let s=ae.extractTaskComponents(t);if(s===null)return null;let{taskSerializer:a}=_o(),o=a.deserialize(s.body),u=!1;return yt.canApplyFallback(o)&&i!==null&&(o.scheduledDate=i,u=!0),o.tags=o.tags.map(l=>l.trim()),o.tags=o.tags.filter(l=>!_e.getInstance().equals(l)),new ae(he(K(K({},s),o),{taskLocation:n,originalMarkdown:t,scheduledDateIsInferred:u}))}static extractTaskComponents(t){let n=t.match(J.taskRegex);if(n===null)return null;let i=n[1],s=n[2],a=n[3],o=De.getInstance().bySymbolOrCreate(a),u=n[4].trim(),l=u.match(J.blockLinkRegex),c=l!==null?l[0]:"";return c!==""&&(u=u.replace(J.blockLinkRegex,"").trim()),{indentation:i,listMarker:s,status:o,body:u,blockLink:c}}toString(){return _o().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let t=St.getLogger("tasks.Task"),n="toggle()";il(t,n,this);let i=De.getInstance().getNextStatusOrCreate(this.status),s=this.handleNewStatus(i);return sl(t,n,s),s}handleNewStatus(t,n=window.moment()){if(t.identicalTo(this.status))return[this];let{setDoneDate:i}=X(),s=this.newDate(t,"DONE",this.doneDate,i,n),{setCancelledDate:a}=X(),o=this.newDate(t,"CANCELLED",this.cancelledDate,a,n),u=new ae(he(K({},this),{status:t,doneDate:s,cancelledDate:o})),l=!t.isCompleted(),c=this.status.isCompleted(),d=this.recurrence===null;if(l||c||d)return[u];let m=this.recurrence.next(n);return m===null?[u]:[this.createNextOccurrence(t,m),u]}newDate(t,n,i,s,a){let o=null;return t.type===n&&(this.status.type!==n?s&&(o=a):o=i),o}createNextOccurrence(t,n){let{setCreatedDate:i}=X(),s=null;i&&(s=window.moment());let a=null,o=null,l=De.getInstance().getNextRecurrenceStatusOrCreate(t);return new ae(he(K(K({},this),n),{status:l,blockLink:"",id:"",dependsOn:[],createdDate:s,cancelledDate:a,doneDate:o}))}toggleWithRecurrenceInUsersOrder(){let t=this.toggle();return this.putRecurrenceInUsersOrder(t)}handleNewStatusWithRecurrenceInUsersOrder(t,n=window.moment()){St.getLogger("tasks.Task").debug(`changed task ${this.taskLocation.path} ${this.taskLocation.lineNumber} ${this.originalMarkdown} status to '${t.symbol}'`);let s=this.handleNewStatus(t,n);return this.putRecurrenceInUsersOrder(s)}putRecurrenceInUsersOrder(t){let n=mv(this,t),{recurrenceOnNextLine:i}=X();return i?n.reverse():n}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}isBlocked(t){if(this.dependsOn.length===0||this.isDone)return!1;for(let n of this.dependsOn)if(!!t.find(s=>s.id===n&&!s.isDone))return!0;return!1}isBlocking(t){return this.id===""||this.isDone?!1:t.some(n=>n.isDone?!1:n.dependsOn.includes(this.id))}get priorityNumber(){return Number.parseInt(this.priority)}get priorityNameGroupText(){let t=Sn.priorityNameUsingNormal(this.priority);return`%%${this.priority}%%${t} priority`}get descriptionWithoutTags(){return this.description.replace(J.hashTags,"").trim()}get priorityName(){return Sn.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=On.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get cancelled(){return new It(this.cancelledDate)}get created(){return new It(this.createdDate)}get done(){return new It(this.doneDate)}get due(){return new It(this.dueDate)}get scheduled(){return new It(this.scheduledDate)}get start(){return new It(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let t=this.happensDates,n=Array.from(t).sort(dr);for(let i of n)if(i!=null&&i.isValid())return new It(i);return new It(null)}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}get file(){return this.taskLocation.tasksFile}get filename(){let t=this.path.match(/([^/]+)\.md$/);return t!==null?t[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:t}){let n;return t?n=this.filename:n="/"+this.path,n===null?null:(this.precedingHeader!==null&&this.precedingHeader!==n&&(n=n+" > "+this.precedingHeader),n)}static tasksListsIdentical(t,n){return t.length!==n.length?!1:t.every((i,s)=>i.identicalTo(n[s]))}identicalTo(t){var i,s;let n=["description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred","id","dependsOn","onCompletion"];for(let a of n)if(((i=this[a])==null?void 0:i.toString())!==((s=t[a])==null?void 0:s.toString()))return!1;if(!this.status.identicalTo(t.status)||this.tags.length!==t.tags.length||!this.tags.every(function(a,o){return a===t.tags[o]}))return!1;n=ae.allDateFields();for(let a of n){let o=this[a],u=t[a];if(dr(o,u)!==0)return!1}return this.recurrenceIdenticalTo(t)?this.file.rawFrontmatterIdenticalTo(t.file):!1}recurrenceIdenticalTo(t){let n=this.recurrence,i=t.recurrence;return!(n===null&&i!==null||n!==null&&i===null||n&&i&&!n.identicalTo(i))}static allDateFields(){return["createdDate","startDate","scheduledDate","dueDate","doneDate","cancelledDate"]}static extractHashtags(t){var n,i;return(i=(n=t.match(J.hashTags))==null?void 0:n.map(s=>s.trim()))!=null?i:[]}};var vo=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var ft=class{constructor(e,t,n,i,s){this._tasksFile=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=i,this._precedingHeader=s}static fromUnknownPosition(e){return new ft(e,0,0,0,null)}fromRenamedFile(e){return new ft(e,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get tasksFile(){return this._tasksFile}get path(){return this._tasksFile.path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}get hasKnownPath(){return this.path!==""}};function IN(r,e,t,n,i,s){var y,_;let a=new at(r,i),o=[],u=e.split(` -`),l=u.length,c=new vo(()=>yt.fromPath(r)),d=null,p=0,m=new Map;for(let b of t)if(b.task!==void 0){let E=b.position.start.line;if(E>=l)return n.debug(`${r} Obsidian gave us a line number ${E} past the end of the file. ${l}.`),o;if((d===null||d.position.end.lineP(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:e}=X(),t=this.vault.on("create",s=>{s instanceof bs.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.indexFile(s)}))});this.vaultEventReferences.push(t);let n=this.vault.on("delete",s=>{s instanceof bs.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()}))});this.vaultEventReferences.push(n);let i=this.vault.on("rename",(s,a)=>{s instanceof bs.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{let o=this.metadataCache.getFileCache(s),u=new at(s.path,o!=null?o:void 0),l=new vo(()=>yt.fromPath(s.path));this.tasks=this.tasks.map(c=>{if(c.path!==a)return c;let d=c.taskLocation.fromRenamedFile(u);return e?yt.updateTaskPath(c,d,l.value):new ae(he(K({},c),{taskLocation:d}))}),this.notifySubscribers()}))});this.vaultEventReferences.push(i)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>P(this,null,function*(){this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),this.notifySubscribers()}))}indexFile(e){return P(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;if(!e.path.endsWith(".md")){this.logger.debug("indexFile: skipping non-markdown file: "+e.path);return}this.logger.debug("Cache.indexFile: "+e.path);let n=this.tasks.filter(a=>a.path===e.path),i=t.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(e);s=this.getTasksFromFileContent(a,i,t,e.path,this.reportTaskParsingErrorToUser,this.logger)}ae.tasksListsIdentical(n,s)||(this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...s),this.logger.debug("Cache.indexFile: "+e.path+`: read ${s.length} task(s)`),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,i,s,a){return IN(i,e,t,a,n,s)}reportTaskParsingErrorToUser(e,t,n,i){let s=`There was an error reading one of the tasks in this vault. +`}addEdgeIfNotToInternal(e,t,n,i,s){let a=e.findIndex(l=>l.symbol===t.symbol),o=a!==-1,u=t.type!=="EMPTY";if(o&&u){let l;s?l='-. "\u{1F501}" .-> ':l=" --> ";let c=`${i+1}${l}${a+1}`;n.push(c)}}getMermaidNodeLabel(e,t){let n=Ov(e.name),i=e.type;if(t){let s=nl(e.symbol),a=nl(e.nextStatusSymbol),o=`[${s}] -> [${a}]`,u=`'${n}'`,l=`(${i})`;return`["${u}
${o}
${l}"]:::${i}`}else return`["${n}"]:::${i}`}};var Dv=require("obsidian");var Kr=class{constructor(e,t){this.name=e,this.sortOrder=t}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}};var It=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(J.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(J.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}get category(){let e=window.moment(),t=this.moment;return t?t.isBefore(e,"day")?new Kr("Overdue",1):t.isSame(e,"day")?new Kr("Today",2):t.isValid()?new Kr("Future",3):new Kr("Invalid date",0):new Kr("Undated",4)}get fromNow(){let e=this.moment;if(!e)return new Kr("",0);let t=this.fromNowOrder(e);return new Kr(e.fromNow(),t)}fromNowOrder(e){if(!e.isValid())return 0;let t=window.moment(),n=e.isSameOrBefore(t,"day"),i=this.fromNowStartDateOfGroup(e,n,t);return Number((n?1:3)+i.format("YYYYMMDD"))}fromNowStartDateOfGroup(e,t,n){let i=e.fromNow(!0).split(" "),s,a=Number(i[0]);isNaN(a)?s=1:s=a;let o=i[1];return t?n.subtract(s,o):n.add(s,o)}postpone(e="days",t=1){if(!this._date)throw new Dv.Notice("Cannot postpone a null date");let n=window.moment().startOf("day");return this._date.isSameOrAfter(n,"day")?this._date.clone().add(t,e):n.add(t,e)}};var Sn=class{static priorityNameUsingNone(e){let t="ERROR";switch(e){case"1":t="High";break;case"0":t="Highest";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break;case"5":t="Lowest";break}return t}static priorityNameUsingNormal(e){return Sn.priorityNameUsingNone(e).replace("None","Normal")}};var IN=require("obsidian"),Cv=oa(Mv());var Fm=class extends Cv.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,i)=>n+i,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",i="";for(let s in this.options.minLevels)t.startsWith(s)&&s.length>=i.length&&(n=this.options.minLevels[s],i=s);return new Lm(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},St=new Fm,Lm=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e){r.debug(`${e} ==> ${i+1} : ${n.toFileLineString()}`)})}var yt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=X();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),i=e.substring(t,n),{filenameAsScheduledDateFormat:s}=X();if(s!==""){let o=window.moment(i,s,!0);if(o.isValid())return o}let a=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(a||(a=/(\d{4})(\d{2})(\d{2})/.exec(i)),a){let o=window.moment([parseInt(a[1]),parseInt(a[2])-1,parseInt(a[3])]);if(o.isValid())return o}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let i=e.scheduledDate,s=e.scheduledDateIsInferred;return n===null?s&&(s=!1,i=null):s?i=n:this.canApplyFallback(e)&&(i=n,s=!0),new ae(he(K({},e),{taskLocation:t,scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(i=>(n!==null&&!n.isSame(i.scheduledDate,"day")&&(i=new ae(he(K({},i),{scheduledDateIsInferred:!1}))),i))}};var Cr=class{static calculate(e){var n,i,s;let t=0;if((n=e.dueDate)!=null&&n.isValid()){let a=window.moment().startOf("day"),o=Math.round(a.diff(e.dueDate)/Cr.milliSecondsPerDay),u;o>=7?u=1:o>=-14?u=(o+14)*.8/21+.2:u=.2,t+=u*Cr.dueCoefficient}switch((i=e.scheduledDate)!=null&&i.isValid()&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*Cr.scheduledCoefficient),(s=e.startDate)!=null&&s.isValid()&&window.moment().isBefore(e.startDate)&&(t+=1*Cr.startedCoefficient),e.priority){case"0":t+=1.5*Cr.priorityCoefficient;break;case"1":t+=1*Cr.priorityCoefficient;break;case"2":t+=.65*Cr.priorityCoefficient;break;case"3":t+=.325*Cr.priorityCoefficient;break;case"5":t-=.3*Cr.priorityCoefficient;break}return t}},On=Cr;On.dueCoefficient=12,On.scheduledCoefficient=5,On.startedCoefficient=-3,On.priorityCoefficient=6,On.milliSecondsPerDay=1e3*60*60*24;var ae=class extends Vi{constructor({status:t,description:n,taskLocation:i,indentation:s,listMarker:a,priority:o,createdDate:u,startDate:l,scheduledDate:c,dueDate:d,doneDate:p,cancelledDate:m,recurrence:y,onCompletion:_,dependsOn:b,id:E,blockLink:R,tags:S,originalMarkdown:F,scheduledDateIsInferred:q,parent:te=null}){super(F,te);this._urgency=null;this.status=t,this.description=n,this.indentation=s,this.listMarker=a,this.taskLocation=i,this.tags=S,this.priority=o,this.createdDate=u,this.startDate=l,this.scheduledDate=c,this.dueDate=d,this.doneDate=p,this.cancelledDate=m,this.recurrence=y,this.onCompletion=_,this.dependsOn=b,this.id=E,this.blockLink=R,this.scheduledDateIsInferred=q}static fromLine({line:t,taskLocation:n,fallbackDate:i}){let s=ae.extractTaskComponents(t);return s===null||!_e.getInstance().includedIn(s.body)?null:ae.parseTaskSignifiers(t,n,i)}static parseTaskSignifiers(t,n,i){let s=ae.extractTaskComponents(t);if(s===null)return null;let{taskSerializer:a}=_o(),o=a.deserialize(s.body),u=!1;return yt.canApplyFallback(o)&&i!==null&&(o.scheduledDate=i,u=!0),o.tags=o.tags.map(l=>l.trim()),o.tags=o.tags.filter(l=>!_e.getInstance().equals(l)),new ae(he(K(K({},s),o),{taskLocation:n,originalMarkdown:t,scheduledDateIsInferred:u}))}static extractTaskComponents(t){let n=t.match(J.taskRegex);if(n===null)return null;let i=n[1],s=n[2],a=n[3],o=De.getInstance().bySymbolOrCreate(a),u=n[4].trim(),l=u.match(J.blockLinkRegex),c=l!==null?l[0]:"";return c!==""&&(u=u.replace(J.blockLinkRegex,"").trim()),{indentation:i,listMarker:s,status:o,body:u,blockLink:c}}toString(){return _o().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let t=St.getLogger("tasks.Task"),n="toggle()";il(t,n,this);let i=De.getInstance().getNextStatusOrCreate(this.status),s=this.handleNewStatus(i);return sl(t,n,s),s}handleNewStatus(t,n=window.moment()){if(t.identicalTo(this.status))return[this];let{setDoneDate:i}=X(),s=this.newDate(t,"DONE",this.doneDate,i,n),{setCancelledDate:a}=X(),o=this.newDate(t,"CANCELLED",this.cancelledDate,a,n),u=new ae(he(K({},this),{status:t,doneDate:s,cancelledDate:o})),l=!t.isCompleted(),c=this.status.isCompleted(),d=this.recurrence===null;if(l||c||d)return[u];let m=this.recurrence.next(n);return m===null?[u]:[this.createNextOccurrence(t,m),u]}newDate(t,n,i,s,a){let o=null;return t.type===n&&(this.status.type!==n?s&&(o=a):o=i),o}createNextOccurrence(t,n){let{setCreatedDate:i}=X(),s=null;i&&(s=window.moment());let a=null,o=null,l=De.getInstance().getNextRecurrenceStatusOrCreate(t);return new ae(he(K(K({},this),n),{status:l,blockLink:"",id:"",dependsOn:[],createdDate:s,cancelledDate:a,doneDate:o}))}toggleWithRecurrenceInUsersOrder(){let t=this.toggle();return this.putRecurrenceInUsersOrder(t)}handleNewStatusWithRecurrenceInUsersOrder(t,n=window.moment()){St.getLogger("tasks.Task").debug(`changed task ${this.taskLocation.path} ${this.taskLocation.lineNumber} ${this.originalMarkdown} status to '${t.symbol}'`);let s=this.handleNewStatus(t,n);return this.putRecurrenceInUsersOrder(s)}putRecurrenceInUsersOrder(t){let n=mv(this,t),{recurrenceOnNextLine:i}=X();return i?n.reverse():n}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}isBlocked(t){if(this.dependsOn.length===0||this.isDone)return!1;for(let n of this.dependsOn)if(!!t.find(s=>s.id===n&&!s.isDone))return!0;return!1}isBlocking(t){return this.id===""||this.isDone?!1:t.some(n=>n.isDone?!1:n.dependsOn.includes(this.id))}get priorityNumber(){return Number.parseInt(this.priority)}get priorityNameGroupText(){let t=Sn.priorityNameUsingNormal(this.priority);return`%%${this.priority}%%${t} priority`}get descriptionWithoutTags(){return this.description.replace(J.hashTags,"").trim()}get priorityName(){return Sn.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=On.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get cancelled(){return new It(this.cancelledDate)}get created(){return new It(this.createdDate)}get done(){return new It(this.doneDate)}get due(){return new It(this.dueDate)}get scheduled(){return new It(this.scheduledDate)}get start(){return new It(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let t=this.happensDates,n=Array.from(t).sort(dr);for(let i of n)if(i!=null&&i.isValid())return new It(i);return new It(null)}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}get file(){return this.taskLocation.tasksFile}get filename(){let t=this.path.match(/([^/]+)\.md$/);return t!==null?t[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:t}){let n;return t?n=this.filename:n="/"+this.path,n===null?null:(this.precedingHeader!==null&&this.precedingHeader!==n&&(n=n+" > "+this.precedingHeader),n)}static tasksListsIdentical(t,n){return t.length!==n.length?!1:t.every((i,s)=>i.identicalTo(n[s]))}identicalTo(t){var i,s;let n=["description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred","id","dependsOn","onCompletion"];for(let a of n)if(((i=this[a])==null?void 0:i.toString())!==((s=t[a])==null?void 0:s.toString()))return!1;if(!this.status.identicalTo(t.status)||this.tags.length!==t.tags.length||!this.tags.every(function(a,o){return a===t.tags[o]}))return!1;n=ae.allDateFields();for(let a of n){let o=this[a],u=t[a];if(dr(o,u)!==0)return!1}return this.recurrenceIdenticalTo(t)?this.file.rawFrontmatterIdenticalTo(t.file):!1}recurrenceIdenticalTo(t){let n=this.recurrence,i=t.recurrence;return!(n===null&&i!==null||n!==null&&i===null||n&&i&&!n.identicalTo(i))}static allDateFields(){return["createdDate","startDate","scheduledDate","dueDate","doneDate","cancelledDate"]}static extractHashtags(t){var n,i;return(i=(n=t.match(J.hashTags))==null?void 0:n.map(s=>s.trim()))!=null?i:[]}};var vo=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var ft=class{constructor(e,t,n,i,s){this._tasksFile=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=i,this._precedingHeader=s}static fromUnknownPosition(e){return new ft(e,0,0,0,null)}fromRenamedFile(e){return new ft(e,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get tasksFile(){return this._tasksFile}get path(){return this._tasksFile.path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}get hasKnownPath(){return this.path!==""}};function FN(r,e,t,n,i,s){var y,_;let a=new at(r,i),o=[],u=e.split(` +`),l=u.length,c=new vo(()=>yt.fromPath(r)),d=null,p=0,m=new Map;for(let b of t)if(b.task!==void 0){let E=b.position.start.line;if(E>=l)return n.debug(`${r} Obsidian gave us a line number ${E} past the end of the file. ${l}.`),o;if((d===null||d.position.end.lineP(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:e}=X(),t=this.vault.on("create",s=>{s instanceof bs.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.indexFile(s)}))});this.vaultEventReferences.push(t);let n=this.vault.on("delete",s=>{s instanceof bs.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()}))});this.vaultEventReferences.push(n);let i=this.vault.on("rename",(s,a)=>{s instanceof bs.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{let o=this.metadataCache.getFileCache(s),u=new at(s.path,o!=null?o:void 0),l=new vo(()=>yt.fromPath(s.path));this.tasks=this.tasks.map(c=>{if(c.path!==a)return c;let d=c.taskLocation.fromRenamedFile(u);return e?yt.updateTaskPath(c,d,l.value):new ae(he(K({},c),{taskLocation:d}))}),this.notifySubscribers()}))});this.vaultEventReferences.push(i)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>P(this,null,function*(){this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),this.notifySubscribers()}))}indexFile(e){return P(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;if(!e.path.endsWith(".md")){this.logger.debug("indexFile: skipping non-markdown file: "+e.path);return}this.logger.debug("Cache.indexFile: "+e.path);let n=this.tasks.filter(a=>a.path===e.path),i=t.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(e);s=this.getTasksFromFileContent(a,i,t,e.path,this.reportTaskParsingErrorToUser,this.logger)}ae.tasksListsIdentical(n,s)||(this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...s),this.logger.debug("Cache.indexFile: "+e.path+`: read ${s.length} task(s)`),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,i,s,a){return FN(i,e,t,a,n,s)}reportTaskParsingErrorToUser(e,t,n,i){let s=`There was an error reading one of the tasks in this vault. The following task has been ignored, to prevent Tasks queries getting stuck with 'Loading Tasks ...' Error: ${e} File: ${t} @@ -165,7 +165,7 @@ Include: The error popup will only be shown when Tasks is starting up, but if the error persists, it will be shown in the console every time this file is edited during the Obsidian session. -`;this.logger.error(s),e instanceof Error&&this.logger.error(e.stack?e.stack:"Cannot determine stack"),this.state==="Initializing"&&new bs.Notice(s,1e4)}static getSection(e,t){if(t===void 0)return null;for(let n of t)if(n.position.start.line<=e&&n.position.end.line>=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let i of t){if(i.position.start.line>e)return n;n=i.heading}return n}};var oh=require("obsidian");var Rw=require("obsidian");function Ue(){}function jm(r){return r()}function Av(){return Object.create(null)}function Ft(r){r.forEach(jm)}function ul(r){return typeof r=="function"}function Qr(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function Pv(r){return Object.keys(r).length===0}var Nv=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,ko=class{constructor(e){this.options=e,this._listeners="WeakMap"in Nv?new WeakMap:void 0}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!==null&&e!==void 0?e:this._observer=new ResizeObserver(t=>{var n;for(let i of t)ko.entries.set(i.target,i),(n=this._listeners.get(i.target))===null||n===void 0||n(i)})}};ko.entries="WeakMap"in Nv?new WeakMap:void 0;var Iv=!1;function FN(){Iv=!0}function LN(){Iv=!1}function U(r,e){r.appendChild(e)}function de(r,e,t){r.insertBefore(e,t||null)}function oe(r){r.parentNode&&r.parentNode.removeChild(r)}function Ci(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function Lv(r){return function(e){return e.preventDefault(),r.call(this,e)}}function W(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function Uv(r){let e;return{p(...t){e=t,e.forEach(n=>r.push(n))},r(){e.forEach(t=>r.splice(r.indexOf(t),1))}}}function WN(r){return Array.from(r.childNodes)}function Ar(r,e){e=""+e,r.data!==e&&(r.data=e)}function gr(r,e){r.value=e==null?"":e}function Gm(r,e,t){for(let n=0;n{a.source===n.contentWindow&&e()})):(n.src="about:blank",n.onload=()=>{s=xe(n.contentWindow,"resize",e),e()}),U(r,n),()=>{(i||s&&n.contentWindow)&&s(),oe(n)}}function Dn(r,e,t){r.classList[t?"add":"remove"](e)}var ks=class{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=UN(t.nodeName):this.e=Q(t.nodeType===11?"TEMPLATE":t.nodeName),this.t=t.tagName!=="TEMPLATE"?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;tr.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),ws=e}var ol=new Set,Ri;function jv(){Ri={r:0,c:[],p:Ri}}function Gv(){Ri.r||Ft(Ri.c),Ri=Ri.p}function Lt(r,e){r&&r.i&&(ol.delete(r),r.i(e))}function Qt(r,e,t,n){if(r&&r.o){if(ol.has(r))return;ol.add(r),Ri.c.push(()=>{ol.delete(r),n&&(t&&r.d(1),n())}),r.o(e)}else n&&n()}var HN=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],nG=new Set([...HN]);function Dt(r,e,t){let n=r.$$.props[e];n!==void 0&&(r.$$.bound[n]=t,t(r.$$.ctx[n]))}function Pr(r){r&&r.c()}function yr(r,e,t,n){let{fragment:i,after_update:s}=r.$$;i&&i.m(e,t),n||Mi(()=>{let a=r.$$.on_mount.map(jm).filter(ul);r.$$.on_destroy?r.$$.on_destroy.push(...a):Ft(a),r.$$.on_mount=[]}),s.forEach(Mi)}function Xt(r,e){let t=r.$$;t.fragment!==null&&(BN(t.after_update),Ft(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function VN(r,e){r.$$.dirty[0]===-1&&(vs.push(r),GN(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let y=m.length?m[0]:p;return l.ctx&&i(l.ctx[d],l.ctx[d]=y)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](y),c&&VN(r,d)),p}):[],l.update(),c=!0,Ft(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){FN();let d=WN(e.target);l.fragment&&l.fragment.l(d),d.forEach(oe)}else l.fragment&&l.fragment.c();e.intro&&Lt(r.$$.fragment),yr(r,e.target,e.anchor,e.customElement),LN(),$v()}wo(u)}var zN;typeof HTMLElement=="function"&&(zN=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(jm).filter(ul);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){Ft(this.$$.on_disconnect)}$destroy(){Xt(this,1),this.$destroy=Ue}$on(r,e){if(!ul(e))return Ue;let t=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return t.push(e),()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}$set(r){this.$$set&&!Pv(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var hr=class{$destroy(){Xt(this,1),this.$destroy=Ue}$on(e,t){if(!ul(t))return Ue;let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!Pv(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};function Yv(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})}function Es(r){return r.charAt(0).toUpperCase()+r.slice(1)}function pt(r,e){if(e===null)return Es(r);let t=r.toLowerCase().indexOf(e.toLowerCase());if(t===-1)return`${Es(r)} (${e.toLowerCase()})`;let n=r.substring(0,t);return n+='',t===0?n+=r.substring(t,t+1).toUpperCase():n+=r.substring(t,t+1),n+="",n+=r.substring(t+1),n=Es(n),n}function KN(r){let e,t=pt(r[2],r[4])+"",n,i,s,a,o,u,l,c,d;return{c(){e=Q("label"),n=ue(),i=Q("input"),s=ue(),a=Q("code"),o=Me(r[3]),u=ue(),l=new ks(!1),W(e,"for",r[2]),W(i,"id",r[2]),W(i,"type","text"),W(i,"class","tasks-modal-date-input"),W(i,"placeholder",QN),W(i,"accesskey",r[4]),Dn(i,"tasks-modal-error",!r[1]),l.a=null,W(a,"class","tasks-modal-parsed-date")},m(p,m){de(p,e,m),e.innerHTML=t,de(p,n,m),de(p,i,m),gr(i,r[0]),de(p,s,m),de(p,a,m),U(a,o),U(a,u),l.m(r[5],a),c||(d=xe(i,"input",r[7]),c=!0)},p(p,[m]){m&20&&t!==(t=pt(p[2],p[4])+"")&&(e.innerHTML=t),m&4&&W(e,"for",p[2]),m&4&&W(i,"id",p[2]),m&16&&W(i,"accesskey",p[4]),m&1&&i.value!==p[0]&&gr(i,p[0]),m&2&&Dn(i,"tasks-modal-error",!p[1]),m&8&&Ar(o,p[3]),m&32&&l.p(p[5])},i:Ue,o:Ue,d(p){p&&oe(e),p&&oe(n),p&&oe(i),p&&oe(s),p&&oe(a),c=!1,d()}}}var QN="Try 'Mon' or 'tm' then space";function XN(r,e,t){let{id:n}=e,{dateSymbol:i}=e,{date:s}=e,{isDateValid:a}=e,{forwardOnly:o}=e,{accesskey:u}=e,l;function c(){s=this.value,t(0,s),t(2,n),t(6,o),t(5,l)}return r.$$set=d=>{"id"in d&&t(2,n=d.id),"dateSymbol"in d&&t(3,i=d.dateSymbol),"date"in d&&t(0,s=d.date),"isDateValid"in d&&t(1,a=d.isDateValid),"forwardOnly"in d&&t(6,o=d.forwardOnly),"accesskey"in d&&t(4,u=d.accesskey)},r.$$.update=()=>{if(r.$$.dirty&101){e:t(0,s=$u(s)),t(5,l=D_(n,s,o)),t(1,a=!l.includes("invalid"))}},[s,a,n,i,u,l,o,c]}var Bm=class extends hr{constructor(e){super(),Xr(this,e,XN,KN,Qr,{id:2,dateSymbol:3,date:0,isDateValid:1,forwardOnly:6,accesskey:4})}},Ai=Bm;var Pi=Math.min,Ut=Math.max,Oo=Math.round;var xn=r=>({x:r,y:r}),ZN={left:"right",right:"left",bottom:"top",top:"bottom"},JN={start:"end",end:"start"};function Hm(r,e,t){return Ut(r,Pi(e,t))}function Ss(r,e){return typeof r=="function"?r(e):r}function Rn(r){return r.split("-")[0]}function Os(r){return r.split("-")[1]}function Vm(r){return r==="x"?"y":"x"}function zm(r){return r==="y"?"height":"width"}function Ds(r){return["top","bottom"].includes(Rn(r))?"y":"x"}function Km(r){return Vm(Ds(r))}function Bv(r,e,t){t===void 0&&(t=!1);let n=Os(r),i=Km(r),s=zm(i),a=i==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=So(a)),[a,So(a)]}function Hv(r){let e=So(r);return[ll(r),e,ll(e)]}function ll(r){return r.replace(/start|end/g,e=>JN[e])}function eI(r,e,t){let n=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(r){case"top":case"bottom":return t?e?i:n:e?n:i;case"left":case"right":return e?s:a;default:return[]}}function Vv(r,e,t,n){let i=Os(r),s=eI(Rn(r),t==="start",n);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(ll)))),s}function So(r){return r.replace(/left|right|bottom|top/g,e=>ZN[e])}function tI(r){return K({top:0,right:0,bottom:0,left:0},r)}function zv(r){return typeof r!="number"?tI(r):{top:r,right:r,bottom:r,left:r}}function Ni(r){return he(K({},r),{top:r.y,left:r.x,right:r.x+r.width,bottom:r.y+r.height})}function Kv(r,e,t){let{reference:n,floating:i}=r,s=Ds(e),a=Km(e),o=zm(a),u=Rn(e),l=s==="y",c=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[o]/2-i[o]/2,m;switch(u){case"top":m={x:c,y:n.y-i.height};break;case"bottom":m={x:c,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:d};break;case"left":m={x:n.x-i.width,y:d};break;default:m={x:n.x,y:n.y}}switch(Os(e)){case"start":m[a]-=p*(t&&l?-1:1);break;case"end":m[a]+=p*(t&&l?-1:1);break}return m}var Qv=(r,e,t)=>P(void 0,null,function*(){let{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:a}=t,o=s.filter(Boolean),u=yield a.isRTL==null?void 0:a.isRTL(e),l=yield a.getElementRects({reference:r,floating:e,strategy:i}),{x:c,y:d}=Kv(l,n,u),p=n,m={},y=0;for(let _=0;_B<=0)){var Pe,j;let B=(((Pe=a.flip)==null?void 0:Pe.index)||0)+1,I=te[B];if(I)return{data:{index:B,overflows:be},reset:{placement:I}};let Z=(j=be.filter(f=>f.overflows[0]<=0).sort((f,h)=>f.overflows[1]-h.overflows[1])[0])==null?void 0:j.placement;if(!Z)switch(y){case"bestFit":{var $;let f=($=be.map(h=>[h.placement,h.overflows.filter(g=>g>0).reduce((g,T)=>g+T,0)]).sort((h,g)=>h[1]-g[1])[0])==null?void 0:$[0];f&&(Z=f);break}case"initialPlacement":Z=u;break}if(s!==Z)return{reset:{placement:Z}}}return{}})}}};function rI(r,e){return P(this,null,function*(){let{placement:t,platform:n,elements:i}=r,s=yield n.isRTL==null?void 0:n.isRTL(i.floating),a=Rn(t),o=Os(t),u=Ds(t)==="y",l=["left","top"].includes(a)?-1:1,c=s&&u?-1:1,d=Ss(e,r),{mainAxis:p,crossAxis:m,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:K({mainAxis:0,crossAxis:0,alignmentAxis:null},d);return o&&typeof y=="number"&&(m=o==="end"?y*-1:y),u?{x:m*c,y:p*l}:{x:p*l,y:m*c}})}var dl=function(r){return r===void 0&&(r=0),{name:"offset",options:r,fn(t){return P(this,null,function*(){var n,i;let{x:s,y:a,placement:o,middlewareData:u}=t,l=yield rI(t,r);return o===((n=u.offset)==null?void 0:n.placement)&&(i=u.arrow)!=null&&i.alignmentOffset?{}:{x:s+l.x,y:a+l.y,data:he(K({},l),{placement:o})}})}}},fl=function(r){return r===void 0&&(r={}),{name:"shift",options:r,fn(t){return P(this,null,function*(){let{x:n,y:i,placement:s}=t,E=Ss(r,t),{mainAxis:a=!0,crossAxis:o=!1,limiter:u={fn:R=>{let{x:S,y:F}=R;return{x:S,y:F}}}}=E,l=Ho(E,["mainAxis","crossAxis","limiter"]),c={x:n,y:i},d=yield cl(t,l),p=Ds(Rn(s)),m=Vm(p),y=c[m],_=c[p];if(a){let R=m==="y"?"top":"left",S=m==="y"?"bottom":"right",F=y+d[R],q=y-d[S];y=Hm(F,y,q)}if(o){let R=p==="y"?"top":"left",S=p==="y"?"bottom":"right",F=_+d[R],q=_-d[S];_=Hm(F,_,q)}let b=u.fn(he(K({},t),{[m]:y,[p]:_}));return he(K({},b),{data:{x:b.x-n,y:b.y-i}})})}}};var Xm=function(r){return r===void 0&&(r={}),{name:"size",options:r,fn(t){return P(this,null,function*(){let{placement:n,rects:i,platform:s,elements:a}=t,G=Ss(r,t),{apply:o=()=>{}}=G,u=Ho(G,["apply"]),l=yield cl(t,u),c=Rn(n),d=Os(n),p=Ds(n)==="y",{width:m,height:y}=i.floating,_,b;c==="top"||c==="bottom"?(_=c,b=d===((yield s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=c,_=d==="end"?"top":"bottom");let E=y-l[_],R=m-l[b],S=!t.middlewareData.shift,F=E,q=R;if(p){let H=m-l.left-l.right;q=d||S?Pi(R,H):H}else{let H=y-l.top-l.bottom;F=d||S?Pi(E,H):H}if(S&&!d){let H=Ut(l.left,0),be=Ut(l.right,0),Pe=Ut(l.top,0),j=Ut(l.bottom,0);p?q=m-2*(H!==0||be!==0?H+be:Ut(l.left,l.right)):F=y-2*(Pe!==0||j!==0?Pe+j:Ut(l.top,l.bottom))}yield o(he(K({},t),{availableWidth:q,availableHeight:F}));let te=yield s.getDimensions(a.floating);return m!==te.width||y!==te.height?{reset:{rects:!0}}:{}})}}};function Mn(r){return Zv(r)?(r.nodeName||"").toLowerCase():"#document"}function Wt(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function Cn(r){var e;return(e=(Zv(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function Zv(r){return r instanceof Node||r instanceof Wt(r).Node}function Zr(r){return r instanceof Element||r instanceof Wt(r).Element}function Nr(r){return r instanceof HTMLElement||r instanceof Wt(r).HTMLElement}function Xv(r){return typeof ShadowRoot=="undefined"?!1:r instanceof ShadowRoot||r instanceof Wt(r).ShadowRoot}function xs(r){let{overflow:e,overflowX:t,overflowY:n,display:i}=Zt(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!["inline","contents"].includes(i)}function Jv(r){return["table","td","th"].includes(Mn(r))}function ml(r){let e=hl(),t=Zt(r);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(t.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(t.contain||"").includes(n))}function ew(r){let e=Ii(r);for(;Nr(e)&&!Do(e);){if(ml(e))return e;e=Ii(e)}return null}function hl(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Do(r){return["html","body","#document"].includes(Mn(r))}function Zt(r){return Wt(r).getComputedStyle(r)}function xo(r){return Zr(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function Ii(r){if(Mn(r)==="html")return r;let e=r.assignedSlot||r.parentNode||Xv(r)&&r.host||Cn(r);return Xv(e)?e.host:e}function tw(r){let e=Ii(r);return Do(e)?r.ownerDocument?r.ownerDocument.body:r.body:Nr(e)&&xs(e)?e:tw(e)}function pl(r,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);let i=tw(r),s=i===((n=r.ownerDocument)==null?void 0:n.body),a=Wt(i);return s?e.concat(a,a.visualViewport||[],xs(i)?i:[],a.frameElement&&t?pl(a.frameElement):[]):e.concat(i,pl(i,[],t))}function iw(r){let e=Zt(r),t=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=Nr(r),s=i?r.offsetWidth:t,a=i?r.offsetHeight:n,o=Oo(t)!==s||Oo(n)!==a;return o&&(t=s,n=a),{width:t,height:n,$:o}}function sw(r){return Zr(r)?r:r.contextElement}function Rs(r){let e=sw(r);if(!Nr(e))return xn(1);let t=e.getBoundingClientRect(),{width:n,height:i,$:s}=iw(e),a=(s?Oo(t.width):t.width)/n,o=(s?Oo(t.height):t.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}var nI=xn(0);function aw(r){let e=Wt(r);return!hl()||!e.visualViewport?nI:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function iI(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==Wt(r)?!1:e}function Ro(r,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);let i=r.getBoundingClientRect(),s=sw(r),a=xn(1);e&&(n?Zr(n)&&(a=Rs(n)):a=Rs(r));let o=iI(s,t,n)?aw(s):xn(0),u=(i.left+o.x)/a.x,l=(i.top+o.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(s){let p=Wt(s),m=n&&Zr(n)?Wt(n):n,y=p.frameElement;for(;y&&n&&m!==p;){let _=Rs(y),b=y.getBoundingClientRect(),E=Zt(y),R=b.left+(y.clientLeft+parseFloat(E.paddingLeft))*_.x,S=b.top+(y.clientTop+parseFloat(E.paddingTop))*_.y;u*=_.x,l*=_.y,c*=_.x,d*=_.y,u+=R,l+=S,y=Wt(y).frameElement}}return Ni({width:c,height:d,x:u,y:l})}function sI(r){let{rect:e,offsetParent:t,strategy:n}=r,i=Nr(t),s=Cn(t);if(t===s)return e;let a={scrollLeft:0,scrollTop:0},o=xn(1),u=xn(0);if((i||!i&&n!=="fixed")&&((Mn(t)!=="body"||xs(s))&&(a=xo(t)),Nr(t))){let l=Ro(t);o=Rs(t),u.x=l.x+t.clientLeft,u.y=l.y+t.clientTop}return{width:e.width*o.x,height:e.height*o.y,x:e.x*o.x-a.scrollLeft*o.x+u.x,y:e.y*o.y-a.scrollTop*o.y+u.y}}function aI(r){return Array.from(r.getClientRects())}function ow(r){return Ro(Cn(r)).left+xo(r).scrollLeft}function oI(r){let e=Cn(r),t=xo(r),n=r.ownerDocument.body,i=Ut(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Ut(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+ow(r),o=-t.scrollTop;return Zt(n).direction==="rtl"&&(a+=Ut(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:a,y:o}}function uI(r,e){let t=Wt(r),n=Cn(r),i=t.visualViewport,s=n.clientWidth,a=n.clientHeight,o=0,u=0;if(i){s=i.width,a=i.height;let l=hl();(!l||l&&e==="fixed")&&(o=i.offsetLeft,u=i.offsetTop)}return{width:s,height:a,x:o,y:u}}function lI(r,e){let t=Ro(r,!0,e==="fixed"),n=t.top+r.clientTop,i=t.left+r.clientLeft,s=Nr(r)?Rs(r):xn(1),a=r.clientWidth*s.x,o=r.clientHeight*s.y,u=i*s.x,l=n*s.y;return{width:a,height:o,x:u,y:l}}function rw(r,e,t){let n;if(e==="viewport")n=uI(r,t);else if(e==="document")n=oI(Cn(r));else if(Zr(e))n=lI(e,t);else{let i=aw(r);n=he(K({},e),{x:e.x-i.x,y:e.y-i.y})}return Ni(n)}function uw(r,e){let t=Ii(r);return t===e||!Zr(t)||Do(t)?!1:Zt(t).position==="fixed"||uw(t,e)}function cI(r,e){let t=e.get(r);if(t)return t;let n=pl(r,[],!1).filter(o=>Zr(o)&&Mn(o)!=="body"),i=null,s=Zt(r).position==="fixed",a=s?Ii(r):r;for(;Zr(a)&&!Do(a);){let o=Zt(a),u=ml(a);!u&&o.position==="fixed"&&(i=null),(s?!u&&!i:!u&&o.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||xs(a)&&!u&&uw(r,a))?n=n.filter(c=>c!==a):i=o,a=Ii(a)}return e.set(r,n),n}function dI(r){let{element:e,boundary:t,rootBoundary:n,strategy:i}=r,a=[...t==="clippingAncestors"?cI(e,this._c):[].concat(t),n],o=a[0],u=a.reduce((l,c)=>{let d=rw(e,c,i);return l.top=Ut(d.top,l.top),l.right=Pi(d.right,l.right),l.bottom=Pi(d.bottom,l.bottom),l.left=Ut(d.left,l.left),l},rw(e,o,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function fI(r){return iw(r)}function pI(r,e,t){let n=Nr(e),i=Cn(e),s=t==="fixed",a=Ro(r,!0,s,e),o={scrollLeft:0,scrollTop:0},u=xn(0);if(n||!n&&!s)if((Mn(e)!=="body"||xs(i))&&(o=xo(e)),n){let l=Ro(e,!0,s,e);u.x=l.x+e.clientLeft,u.y=l.y+e.clientTop}else i&&(u.x=ow(i));return{x:a.left+o.scrollLeft-u.x,y:a.top+o.scrollTop-u.y,width:a.width,height:a.height}}function nw(r,e){return!Nr(r)||Zt(r).position==="fixed"?null:e?e(r):r.offsetParent}function lw(r,e){let t=Wt(r);if(!Nr(r))return t;let n=nw(r,e);for(;n&&Jv(n)&&Zt(n).position==="static";)n=nw(n,e);return n&&(Mn(n)==="html"||Mn(n)==="body"&&Zt(n).position==="static"&&!ml(n))?t:n||ew(r)||t}var mI=function(r){return P(this,null,function*(){let{reference:e,floating:t,strategy:n}=r,i=this.getOffsetParent||lw,s=this.getDimensions;return{reference:pI(e,yield i(t),n),floating:K({x:0,y:0},yield s(t))}})};function hI(r){return Zt(r).direction==="rtl"}var gI={convertOffsetParentRelativeRectToViewportRelativeRect:sI,getDocumentElement:Cn,getClippingRect:dI,getOffsetParent:lw,getElementRects:mI,getClientRects:aI,getDimensions:fI,getScale:Rs,isElement:Zr,isRTL:hI};var Zm=(r,e,t)=>{let n=new Map,i=K({platform:gI},t),s=he(K({},i.platform),{_c:n});return Qv(r,e,he(K({},i),{platform:s}))};function cw(r,e,t){let n=r.slice();return n[5]=e[t],n}function dw(r,e,t){let n=r.slice();n[40]=e[t],n[43]=t;let i=n[17](n[40].taskLocation.path);return n[41]=i,n}function fw(r){let e,t,n,i=r[10],s=[];for(let a=0;a',d=ue(),W(t,"class","task-dependency-name"),W(c,"type","button"),W(c,"class","task-dependency-delete"),W(e,"class","task-dependency")},m(b,E){de(b,e,E),U(e,t),U(t,n),U(t,s),U(t,a),U(t,u),U(e,l),U(e,c),U(e,d),p||(m=[xe(c,"click",y),xe(e,"mouseenter",_)],p=!0)},p(b,E){r=b,E[0]&3&&i!==(i=r[5].status.symbol+"")&&Ar(s,i),E[0]&3&&o!==(o=Oi(r[5])+"")&&Ar(u,o)},d(b){b&&oe(e),p=!1,Ft(m)}}}function yI(r){let e,t=pt(r[2],r[3])+"",n,i,s,a,o,u,l,c,d,p=r[10]&&r[10].length!==0&&fw(r),m=r[0][r[1]].length!==0&&hw(r);return{c(){e=Q("label"),n=ue(),i=Q("span"),s=Q("input"),o=ue(),p&&p.c(),u=ue(),m&&m.c(),l=Fv(),W(e,"for",r[1]),W(s,"accesskey",r[3]),W(s,"id",r[1]),W(s,"class","tasks-modal-dependency-input"),W(s,"type","text"),W(s,"placeholder",r[4]),Mi(()=>r[26].call(i))},m(y,_){de(y,e,_),e.innerHTML=t,de(y,n,_),de(y,i,_),U(i,s),r[22](s),gr(s,r[6]),a=qv(i,r[26].bind(i)),de(y,o,_),p&&p.m(y,_),de(y,u,_),m&&m.m(y,_),de(y,l,_),c||(d=[xe(s,"input",r[23]),xe(s,"keydown",r[24]),xe(s,"focus",r[16]),xe(s,"blur",r[25])],c=!0)},p(y,_){_[0]&12&&t!==(t=pt(y[2],y[3])+"")&&(e.innerHTML=t),_[0]&2&&W(e,"for",y[1]),_[0]&8&&W(s,"accesskey",y[3]),_[0]&2&&W(s,"id",y[1]),_[0]&16&&W(s,"placeholder",y[4]),_[0]&64&&s.value!==y[6]&&gr(s,y[6]),y[10]&&y[10].length!==0?p?p.p(y,_):(p=fw(y),p.c(),p.m(u.parentNode,u)):p&&(p.d(1),p=null),y[0][y[1]].length!==0?m?m.p(y,_):(m=hw(y),m.c(),m.m(l.parentNode,l)):m&&(m.d(1),m=null)},i:Ue,o:Ue,d(y){y&&oe(e),y&&oe(n),y&&oe(i),r[22](null),a(),y&&oe(o),p&&p.d(y),y&&oe(u),m&&m.d(y),y&&oe(l),c=!1,Ft(d)}}}function bI(r,e,t){let{task:n}=e,{editableTask:i}=e,{allTasks:s}=e,{_onDescriptionKeyDown:a}=e,{type:o}=e,{labelText:u}=e,{accesskey:l}=e,{placeholder:c="Type to search..."}=e,d="",p=null,m=0,y,_=!1,b=!1,E,R;function S(v){t(0,i[o]=[...i[o],v],i),t(6,d=""),t(7,_=!1)}function F(v){t(0,i[o]=i[o].filter(x=>x!==v),i)}function q(v){var x;if(p!==null){switch(v.key){case"ArrowUp":v.preventDefault(),!!m&&m>0?t(11,m-=1):t(11,m=p.length-1);break;case"ArrowDown":v.preventDefault(),!!m&&m{x.style.left=`${N}px`,x.style.top=`${re}px`})}function be(v){return v===n.taskLocation.path?"":v}function Pe(v){return Oi(v)}function j(v,x){let N=v.createDiv();N.addClasses(["tooltip","pop-up"]),N.innerText=x,Zm(v,N,{placement:"top",middleware:[dl(-18),fl()]}).then(({x:re,y:le})=>{N.style.left=`${re}px`,N.style.top=`${le}px`}),v.addEventListener("mouseleave",()=>N.remove())}function $(v){je[v?"unshift":"push"](()=>{E=v,t(8,E)})}function D(){d=this.value,t(6,d)}let B=v=>q(v),I=()=>t(7,_=!1);function Z(){y=this.clientWidth,t(12,y)}let f=(v,x)=>j(x.currentTarget,Pe(v)),h=(v,x)=>j(x.currentTarget,v),g=v=>S(v),T=v=>t(11,m=v);function w(v){je[v?"unshift":"push"](()=>{R=v,t(9,R)})}let O=()=>t(11,m=null),M=v=>F(v),A=(v,x)=>j(x.currentTarget,Pe(v));return r.$$set=v=>{"task"in v&&t(5,n=v.task),"editableTask"in v&&t(0,i=v.editableTask),"allTasks"in v&&t(20,s=v.allTasks),"_onDescriptionKeyDown"in v&&t(21,a=v._onDescriptionKeyDown),"type"in v&&t(1,o=v.type),"labelText"in v&&t(2,u=v.labelText),"accesskey"in v&&t(3,l=v.accesskey),"placeholder"in v&&t(4,c=v.placeholder)},r.$$.update=()=>{if(r.$$.dirty[0]&768){e:H(E,R)}if(r.$$.dirty[0]&192){e:t(10,p=_?te(d):null)}},[i,o,u,l,c,n,d,_,E,R,p,m,y,S,F,q,G,be,Pe,j,s,a,$,D,B,I,Z,f,h,g,T,w,O,M,A]}var Jm=class extends hr{constructor(e){super(),Xr(this,e,bI,yI,Qr,{task:5,editableTask:0,allTasks:20,_onDescriptionKeyDown:21,type:1,labelText:2,accesskey:3,placeholder:4},null,[-1,-1])}},eh=Jm;var Co=require("obsidian");var Mo,th,rh,TI=["md"];function bl(){return St.getLogger("tasks.File")}var yw=({metadataCache:r,vault:e,workspace:t})=>{Mo=r,th=e,rh=t},br=t=>P(void 0,[t],function*({originalTask:r,newTasks:e}){if(th===void 0||Mo===void 0||rh===void 0){gl("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]);let n=bl(),i="replaceTaskWithTasks()";il(n,i,r),sl(n,i,e),yield Tw({originalTask:r,newTasks:e,vault:th,metadataCache:Mo,workspace:rh,previousTries:0})});function gl(r){console.error(r),new Co.Notice(r,15e3)}function bw(r){console.warn(r),new Co.Notice(r,1e4)}function _I(r){bl().debug(r)}var zn=class extends Error{},yl=class extends Error{},Tw=a=>P(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s}){let o=bl();o.debug(`tryRepetitive after ${s} previous tries`);let u=()=>P(void 0,null,function*(){if(s>10){let c=`Tasks: Could not find the correct task line to update. +`;this.logger.error(s),e instanceof Error&&this.logger.error(e.stack?e.stack:"Cannot determine stack"),this.state==="Initializing"&&new bs.Notice(s,1e4)}static getSection(e,t){if(t===void 0)return null;for(let n of t)if(n.position.start.line<=e&&n.position.end.line>=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let i of t){if(i.position.start.line>e)return n;n=i.heading}return n}};var oh=require("obsidian");var Rw=require("obsidian");function Ue(){}function jm(r){return r()}function Av(){return Object.create(null)}function Ft(r){r.forEach(jm)}function ul(r){return typeof r=="function"}function Qr(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function Pv(r){return Object.keys(r).length===0}var Nv=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,ko=class{constructor(e){this.options=e,this._listeners="WeakMap"in Nv?new WeakMap:void 0}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!==null&&e!==void 0?e:this._observer=new ResizeObserver(t=>{var n;for(let i of t)ko.entries.set(i.target,i),(n=this._listeners.get(i.target))===null||n===void 0||n(i)})}};ko.entries="WeakMap"in Nv?new WeakMap:void 0;var Iv=!1;function LN(){Iv=!0}function UN(){Iv=!1}function U(r,e){r.appendChild(e)}function de(r,e,t){r.insertBefore(e,t||null)}function oe(r){r.parentNode&&r.parentNode.removeChild(r)}function Ci(r,e){for(let t=0;tr.removeEventListener(e,t,n)}function Lv(r){return function(e){return e.preventDefault(),r.call(this,e)}}function W(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function Uv(r){let e;return{p(...t){e=t,e.forEach(n=>r.push(n))},r(){e.forEach(t=>r.splice(r.indexOf(t),1))}}}function qN(r){return Array.from(r.childNodes)}function Ar(r,e){e=""+e,r.data!==e&&(r.data=e)}function gr(r,e){r.value=e==null?"":e}function Gm(r,e,t){for(let n=0;n{a.source===n.contentWindow&&e()})):(n.src="about:blank",n.onload=()=>{s=xe(n.contentWindow,"resize",e),e()}),U(r,n),()=>{(i||s&&n.contentWindow)&&s(),oe(n)}}function Dn(r,e,t){r.classList[t?"add":"remove"](e)}var ks=class{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=WN(t.nodeName):this.e=Q(t.nodeType===11?"TEMPLATE":t.nodeName),this.t=t.tagName!=="TEMPLATE"?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;tr.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),ws=e}var ol=new Set,Ri;function jv(){Ri={r:0,c:[],p:Ri}}function Gv(){Ri.r||Ft(Ri.c),Ri=Ri.p}function Lt(r,e){r&&r.i&&(ol.delete(r),r.i(e))}function Qt(r,e,t,n){if(r&&r.o){if(ol.has(r))return;ol.add(r),Ri.c.push(()=>{ol.delete(r),n&&(t&&r.d(1),n())}),r.o(e)}else n&&n()}var VN=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],iG=new Set([...VN]);function Dt(r,e,t){let n=r.$$.props[e];n!==void 0&&(r.$$.bound[n]=t,t(r.$$.ctx[n]))}function Pr(r){r&&r.c()}function yr(r,e,t,n){let{fragment:i,after_update:s}=r.$$;i&&i.m(e,t),n||Mi(()=>{let a=r.$$.on_mount.map(jm).filter(ul);r.$$.on_destroy?r.$$.on_destroy.push(...a):Ft(a),r.$$.on_mount=[]}),s.forEach(Mi)}function Xt(r,e){let t=r.$$;t.fragment!==null&&(HN(t.after_update),Ft(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function zN(r,e){r.$$.dirty[0]===-1&&(vs.push(r),YN(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let y=m.length?m[0]:p;return l.ctx&&i(l.ctx[d],l.ctx[d]=y)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](y),c&&zN(r,d)),p}):[],l.update(),c=!0,Ft(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){LN();let d=qN(e.target);l.fragment&&l.fragment.l(d),d.forEach(oe)}else l.fragment&&l.fragment.c();e.intro&&Lt(r.$$.fragment),yr(r,e.target,e.anchor,e.customElement),UN(),$v()}wo(u)}var KN;typeof HTMLElement=="function"&&(KN=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(jm).filter(ul);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){Ft(this.$$.on_disconnect)}$destroy(){Xt(this,1),this.$destroy=Ue}$on(r,e){if(!ul(e))return Ue;let t=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return t.push(e),()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}$set(r){this.$$set&&!Pv(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var hr=class{$destroy(){Xt(this,1),this.$destroy=Ue}$on(e,t){if(!ul(t))return Ue;let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!Pv(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};function Yv(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function u(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})}function Es(r){return r.charAt(0).toUpperCase()+r.slice(1)}function pt(r,e){if(e===null)return Es(r);let t=r.toLowerCase().indexOf(e.toLowerCase());if(t===-1)return`${Es(r)} (${e.toLowerCase()})`;let n=r.substring(0,t);return n+='',t===0?n+=r.substring(t,t+1).toUpperCase():n+=r.substring(t,t+1),n+="",n+=r.substring(t+1),n=Es(n),n}function QN(r){let e,t=pt(r[2],r[4])+"",n,i,s,a,o,u,l,c,d;return{c(){e=Q("label"),n=ue(),i=Q("input"),s=ue(),a=Q("code"),o=Me(r[3]),u=ue(),l=new ks(!1),W(e,"for",r[2]),W(i,"id",r[2]),W(i,"type","text"),W(i,"class","tasks-modal-date-input"),W(i,"placeholder",XN),W(i,"accesskey",r[4]),Dn(i,"tasks-modal-error",!r[1]),l.a=null,W(a,"class","tasks-modal-parsed-date")},m(p,m){de(p,e,m),e.innerHTML=t,de(p,n,m),de(p,i,m),gr(i,r[0]),de(p,s,m),de(p,a,m),U(a,o),U(a,u),l.m(r[5],a),c||(d=xe(i,"input",r[7]),c=!0)},p(p,[m]){m&20&&t!==(t=pt(p[2],p[4])+"")&&(e.innerHTML=t),m&4&&W(e,"for",p[2]),m&4&&W(i,"id",p[2]),m&16&&W(i,"accesskey",p[4]),m&1&&i.value!==p[0]&&gr(i,p[0]),m&2&&Dn(i,"tasks-modal-error",!p[1]),m&8&&Ar(o,p[3]),m&32&&l.p(p[5])},i:Ue,o:Ue,d(p){p&&oe(e),p&&oe(n),p&&oe(i),p&&oe(s),p&&oe(a),c=!1,d()}}}var XN="Try 'Mon' or 'tm' then space";function ZN(r,e,t){let{id:n}=e,{dateSymbol:i}=e,{date:s}=e,{isDateValid:a}=e,{forwardOnly:o}=e,{accesskey:u}=e,l;function c(){s=this.value,t(0,s),t(2,n),t(6,o),t(5,l)}return r.$$set=d=>{"id"in d&&t(2,n=d.id),"dateSymbol"in d&&t(3,i=d.dateSymbol),"date"in d&&t(0,s=d.date),"isDateValid"in d&&t(1,a=d.isDateValid),"forwardOnly"in d&&t(6,o=d.forwardOnly),"accesskey"in d&&t(4,u=d.accesskey)},r.$$.update=()=>{if(r.$$.dirty&101){e:t(0,s=$u(s)),t(5,l=D_(n,s,o)),t(1,a=!l.includes("invalid"))}},[s,a,n,i,u,l,o,c]}var Bm=class extends hr{constructor(e){super(),Xr(this,e,ZN,QN,Qr,{id:2,dateSymbol:3,date:0,isDateValid:1,forwardOnly:6,accesskey:4})}},Ai=Bm;var Pi=Math.min,Ut=Math.max,Oo=Math.round;var xn=r=>({x:r,y:r}),JN={left:"right",right:"left",bottom:"top",top:"bottom"},eI={start:"end",end:"start"};function Hm(r,e,t){return Ut(r,Pi(e,t))}function Ss(r,e){return typeof r=="function"?r(e):r}function Rn(r){return r.split("-")[0]}function Os(r){return r.split("-")[1]}function Vm(r){return r==="x"?"y":"x"}function zm(r){return r==="y"?"height":"width"}function Ds(r){return["top","bottom"].includes(Rn(r))?"y":"x"}function Km(r){return Vm(Ds(r))}function Bv(r,e,t){t===void 0&&(t=!1);let n=Os(r),i=Km(r),s=zm(i),a=i==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=So(a)),[a,So(a)]}function Hv(r){let e=So(r);return[ll(r),e,ll(e)]}function ll(r){return r.replace(/start|end/g,e=>eI[e])}function tI(r,e,t){let n=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(r){case"top":case"bottom":return t?e?i:n:e?n:i;case"left":case"right":return e?s:a;default:return[]}}function Vv(r,e,t,n){let i=Os(r),s=tI(Rn(r),t==="start",n);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(ll)))),s}function So(r){return r.replace(/left|right|bottom|top/g,e=>JN[e])}function rI(r){return K({top:0,right:0,bottom:0,left:0},r)}function zv(r){return typeof r!="number"?rI(r):{top:r,right:r,bottom:r,left:r}}function Ni(r){return he(K({},r),{top:r.y,left:r.x,right:r.x+r.width,bottom:r.y+r.height})}function Kv(r,e,t){let{reference:n,floating:i}=r,s=Ds(e),a=Km(e),o=zm(a),u=Rn(e),l=s==="y",c=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[o]/2-i[o]/2,m;switch(u){case"top":m={x:c,y:n.y-i.height};break;case"bottom":m={x:c,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:d};break;case"left":m={x:n.x-i.width,y:d};break;default:m={x:n.x,y:n.y}}switch(Os(e)){case"start":m[a]-=p*(t&&l?-1:1);break;case"end":m[a]+=p*(t&&l?-1:1);break}return m}var Qv=(r,e,t)=>P(void 0,null,function*(){let{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:a}=t,o=s.filter(Boolean),u=yield a.isRTL==null?void 0:a.isRTL(e),l=yield a.getElementRects({reference:r,floating:e,strategy:i}),{x:c,y:d}=Kv(l,n,u),p=n,m={},y=0;for(let _=0;_B<=0)){var Pe,j;let B=(((Pe=a.flip)==null?void 0:Pe.index)||0)+1,I=te[B];if(I)return{data:{index:B,overflows:be},reset:{placement:I}};let Z=(j=be.filter(f=>f.overflows[0]<=0).sort((f,h)=>f.overflows[1]-h.overflows[1])[0])==null?void 0:j.placement;if(!Z)switch(y){case"bestFit":{var $;let f=($=be.map(h=>[h.placement,h.overflows.filter(g=>g>0).reduce((g,T)=>g+T,0)]).sort((h,g)=>h[1]-g[1])[0])==null?void 0:$[0];f&&(Z=f);break}case"initialPlacement":Z=u;break}if(s!==Z)return{reset:{placement:Z}}}return{}})}}};function nI(r,e){return P(this,null,function*(){let{placement:t,platform:n,elements:i}=r,s=yield n.isRTL==null?void 0:n.isRTL(i.floating),a=Rn(t),o=Os(t),u=Ds(t)==="y",l=["left","top"].includes(a)?-1:1,c=s&&u?-1:1,d=Ss(e,r),{mainAxis:p,crossAxis:m,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:K({mainAxis:0,crossAxis:0,alignmentAxis:null},d);return o&&typeof y=="number"&&(m=o==="end"?y*-1:y),u?{x:m*c,y:p*l}:{x:p*l,y:m*c}})}var dl=function(r){return r===void 0&&(r=0),{name:"offset",options:r,fn(t){return P(this,null,function*(){var n,i;let{x:s,y:a,placement:o,middlewareData:u}=t,l=yield nI(t,r);return o===((n=u.offset)==null?void 0:n.placement)&&(i=u.arrow)!=null&&i.alignmentOffset?{}:{x:s+l.x,y:a+l.y,data:he(K({},l),{placement:o})}})}}},fl=function(r){return r===void 0&&(r={}),{name:"shift",options:r,fn(t){return P(this,null,function*(){let{x:n,y:i,placement:s}=t,E=Ss(r,t),{mainAxis:a=!0,crossAxis:o=!1,limiter:u={fn:R=>{let{x:S,y:F}=R;return{x:S,y:F}}}}=E,l=Ho(E,["mainAxis","crossAxis","limiter"]),c={x:n,y:i},d=yield cl(t,l),p=Ds(Rn(s)),m=Vm(p),y=c[m],_=c[p];if(a){let R=m==="y"?"top":"left",S=m==="y"?"bottom":"right",F=y+d[R],q=y-d[S];y=Hm(F,y,q)}if(o){let R=p==="y"?"top":"left",S=p==="y"?"bottom":"right",F=_+d[R],q=_-d[S];_=Hm(F,_,q)}let b=u.fn(he(K({},t),{[m]:y,[p]:_}));return he(K({},b),{data:{x:b.x-n,y:b.y-i}})})}}};var Xm=function(r){return r===void 0&&(r={}),{name:"size",options:r,fn(t){return P(this,null,function*(){let{placement:n,rects:i,platform:s,elements:a}=t,G=Ss(r,t),{apply:o=()=>{}}=G,u=Ho(G,["apply"]),l=yield cl(t,u),c=Rn(n),d=Os(n),p=Ds(n)==="y",{width:m,height:y}=i.floating,_,b;c==="top"||c==="bottom"?(_=c,b=d===((yield s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=c,_=d==="end"?"top":"bottom");let E=y-l[_],R=m-l[b],S=!t.middlewareData.shift,F=E,q=R;if(p){let H=m-l.left-l.right;q=d||S?Pi(R,H):H}else{let H=y-l.top-l.bottom;F=d||S?Pi(E,H):H}if(S&&!d){let H=Ut(l.left,0),be=Ut(l.right,0),Pe=Ut(l.top,0),j=Ut(l.bottom,0);p?q=m-2*(H!==0||be!==0?H+be:Ut(l.left,l.right)):F=y-2*(Pe!==0||j!==0?Pe+j:Ut(l.top,l.bottom))}yield o(he(K({},t),{availableWidth:q,availableHeight:F}));let te=yield s.getDimensions(a.floating);return m!==te.width||y!==te.height?{reset:{rects:!0}}:{}})}}};function Mn(r){return Zv(r)?(r.nodeName||"").toLowerCase():"#document"}function Wt(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function Cn(r){var e;return(e=(Zv(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function Zv(r){return r instanceof Node||r instanceof Wt(r).Node}function Zr(r){return r instanceof Element||r instanceof Wt(r).Element}function Nr(r){return r instanceof HTMLElement||r instanceof Wt(r).HTMLElement}function Xv(r){return typeof ShadowRoot=="undefined"?!1:r instanceof ShadowRoot||r instanceof Wt(r).ShadowRoot}function xs(r){let{overflow:e,overflowX:t,overflowY:n,display:i}=Zt(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!["inline","contents"].includes(i)}function Jv(r){return["table","td","th"].includes(Mn(r))}function ml(r){let e=hl(),t=Zt(r);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(t.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(t.contain||"").includes(n))}function ew(r){let e=Ii(r);for(;Nr(e)&&!Do(e);){if(ml(e))return e;e=Ii(e)}return null}function hl(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Do(r){return["html","body","#document"].includes(Mn(r))}function Zt(r){return Wt(r).getComputedStyle(r)}function xo(r){return Zr(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function Ii(r){if(Mn(r)==="html")return r;let e=r.assignedSlot||r.parentNode||Xv(r)&&r.host||Cn(r);return Xv(e)?e.host:e}function tw(r){let e=Ii(r);return Do(e)?r.ownerDocument?r.ownerDocument.body:r.body:Nr(e)&&xs(e)?e:tw(e)}function pl(r,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);let i=tw(r),s=i===((n=r.ownerDocument)==null?void 0:n.body),a=Wt(i);return s?e.concat(a,a.visualViewport||[],xs(i)?i:[],a.frameElement&&t?pl(a.frameElement):[]):e.concat(i,pl(i,[],t))}function iw(r){let e=Zt(r),t=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=Nr(r),s=i?r.offsetWidth:t,a=i?r.offsetHeight:n,o=Oo(t)!==s||Oo(n)!==a;return o&&(t=s,n=a),{width:t,height:n,$:o}}function sw(r){return Zr(r)?r:r.contextElement}function Rs(r){let e=sw(r);if(!Nr(e))return xn(1);let t=e.getBoundingClientRect(),{width:n,height:i,$:s}=iw(e),a=(s?Oo(t.width):t.width)/n,o=(s?Oo(t.height):t.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}var iI=xn(0);function aw(r){let e=Wt(r);return!hl()||!e.visualViewport?iI:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function sI(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==Wt(r)?!1:e}function Ro(r,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);let i=r.getBoundingClientRect(),s=sw(r),a=xn(1);e&&(n?Zr(n)&&(a=Rs(n)):a=Rs(r));let o=sI(s,t,n)?aw(s):xn(0),u=(i.left+o.x)/a.x,l=(i.top+o.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(s){let p=Wt(s),m=n&&Zr(n)?Wt(n):n,y=p.frameElement;for(;y&&n&&m!==p;){let _=Rs(y),b=y.getBoundingClientRect(),E=Zt(y),R=b.left+(y.clientLeft+parseFloat(E.paddingLeft))*_.x,S=b.top+(y.clientTop+parseFloat(E.paddingTop))*_.y;u*=_.x,l*=_.y,c*=_.x,d*=_.y,u+=R,l+=S,y=Wt(y).frameElement}}return Ni({width:c,height:d,x:u,y:l})}function aI(r){let{rect:e,offsetParent:t,strategy:n}=r,i=Nr(t),s=Cn(t);if(t===s)return e;let a={scrollLeft:0,scrollTop:0},o=xn(1),u=xn(0);if((i||!i&&n!=="fixed")&&((Mn(t)!=="body"||xs(s))&&(a=xo(t)),Nr(t))){let l=Ro(t);o=Rs(t),u.x=l.x+t.clientLeft,u.y=l.y+t.clientTop}return{width:e.width*o.x,height:e.height*o.y,x:e.x*o.x-a.scrollLeft*o.x+u.x,y:e.y*o.y-a.scrollTop*o.y+u.y}}function oI(r){return Array.from(r.getClientRects())}function ow(r){return Ro(Cn(r)).left+xo(r).scrollLeft}function uI(r){let e=Cn(r),t=xo(r),n=r.ownerDocument.body,i=Ut(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Ut(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+ow(r),o=-t.scrollTop;return Zt(n).direction==="rtl"&&(a+=Ut(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:a,y:o}}function lI(r,e){let t=Wt(r),n=Cn(r),i=t.visualViewport,s=n.clientWidth,a=n.clientHeight,o=0,u=0;if(i){s=i.width,a=i.height;let l=hl();(!l||l&&e==="fixed")&&(o=i.offsetLeft,u=i.offsetTop)}return{width:s,height:a,x:o,y:u}}function cI(r,e){let t=Ro(r,!0,e==="fixed"),n=t.top+r.clientTop,i=t.left+r.clientLeft,s=Nr(r)?Rs(r):xn(1),a=r.clientWidth*s.x,o=r.clientHeight*s.y,u=i*s.x,l=n*s.y;return{width:a,height:o,x:u,y:l}}function rw(r,e,t){let n;if(e==="viewport")n=lI(r,t);else if(e==="document")n=uI(Cn(r));else if(Zr(e))n=cI(e,t);else{let i=aw(r);n=he(K({},e),{x:e.x-i.x,y:e.y-i.y})}return Ni(n)}function uw(r,e){let t=Ii(r);return t===e||!Zr(t)||Do(t)?!1:Zt(t).position==="fixed"||uw(t,e)}function dI(r,e){let t=e.get(r);if(t)return t;let n=pl(r,[],!1).filter(o=>Zr(o)&&Mn(o)!=="body"),i=null,s=Zt(r).position==="fixed",a=s?Ii(r):r;for(;Zr(a)&&!Do(a);){let o=Zt(a),u=ml(a);!u&&o.position==="fixed"&&(i=null),(s?!u&&!i:!u&&o.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||xs(a)&&!u&&uw(r,a))?n=n.filter(c=>c!==a):i=o,a=Ii(a)}return e.set(r,n),n}function fI(r){let{element:e,boundary:t,rootBoundary:n,strategy:i}=r,a=[...t==="clippingAncestors"?dI(e,this._c):[].concat(t),n],o=a[0],u=a.reduce((l,c)=>{let d=rw(e,c,i);return l.top=Ut(d.top,l.top),l.right=Pi(d.right,l.right),l.bottom=Pi(d.bottom,l.bottom),l.left=Ut(d.left,l.left),l},rw(e,o,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function pI(r){return iw(r)}function mI(r,e,t){let n=Nr(e),i=Cn(e),s=t==="fixed",a=Ro(r,!0,s,e),o={scrollLeft:0,scrollTop:0},u=xn(0);if(n||!n&&!s)if((Mn(e)!=="body"||xs(i))&&(o=xo(e)),n){let l=Ro(e,!0,s,e);u.x=l.x+e.clientLeft,u.y=l.y+e.clientTop}else i&&(u.x=ow(i));return{x:a.left+o.scrollLeft-u.x,y:a.top+o.scrollTop-u.y,width:a.width,height:a.height}}function nw(r,e){return!Nr(r)||Zt(r).position==="fixed"?null:e?e(r):r.offsetParent}function lw(r,e){let t=Wt(r);if(!Nr(r))return t;let n=nw(r,e);for(;n&&Jv(n)&&Zt(n).position==="static";)n=nw(n,e);return n&&(Mn(n)==="html"||Mn(n)==="body"&&Zt(n).position==="static"&&!ml(n))?t:n||ew(r)||t}var hI=function(r){return P(this,null,function*(){let{reference:e,floating:t,strategy:n}=r,i=this.getOffsetParent||lw,s=this.getDimensions;return{reference:mI(e,yield i(t),n),floating:K({x:0,y:0},yield s(t))}})};function gI(r){return Zt(r).direction==="rtl"}var yI={convertOffsetParentRelativeRectToViewportRelativeRect:aI,getDocumentElement:Cn,getClippingRect:fI,getOffsetParent:lw,getElementRects:hI,getClientRects:oI,getDimensions:pI,getScale:Rs,isElement:Zr,isRTL:gI};var Zm=(r,e,t)=>{let n=new Map,i=K({platform:yI},t),s=he(K({},i.platform),{_c:n});return Qv(r,e,he(K({},i),{platform:s}))};function cw(r,e,t){let n=r.slice();return n[5]=e[t],n}function dw(r,e,t){let n=r.slice();n[40]=e[t],n[43]=t;let i=n[17](n[40].taskLocation.path);return n[41]=i,n}function fw(r){let e,t,n,i=r[10],s=[];for(let a=0;a',d=ue(),W(t,"class","task-dependency-name"),W(c,"type","button"),W(c,"class","task-dependency-delete"),W(e,"class","task-dependency")},m(b,E){de(b,e,E),U(e,t),U(t,n),U(t,s),U(t,a),U(t,u),U(e,l),U(e,c),U(e,d),p||(m=[xe(c,"click",y),xe(e,"mouseenter",_)],p=!0)},p(b,E){r=b,E[0]&3&&i!==(i=r[5].status.symbol+"")&&Ar(s,i),E[0]&3&&o!==(o=Oi(r[5])+"")&&Ar(u,o)},d(b){b&&oe(e),p=!1,Ft(m)}}}function bI(r){let e,t=pt(r[2],r[3])+"",n,i,s,a,o,u,l,c,d,p=r[10]&&r[10].length!==0&&fw(r),m=r[0][r[1]].length!==0&&hw(r);return{c(){e=Q("label"),n=ue(),i=Q("span"),s=Q("input"),o=ue(),p&&p.c(),u=ue(),m&&m.c(),l=Fv(),W(e,"for",r[1]),W(s,"accesskey",r[3]),W(s,"id",r[1]),W(s,"class","tasks-modal-dependency-input"),W(s,"type","text"),W(s,"placeholder",r[4]),Mi(()=>r[26].call(i))},m(y,_){de(y,e,_),e.innerHTML=t,de(y,n,_),de(y,i,_),U(i,s),r[22](s),gr(s,r[6]),a=qv(i,r[26].bind(i)),de(y,o,_),p&&p.m(y,_),de(y,u,_),m&&m.m(y,_),de(y,l,_),c||(d=[xe(s,"input",r[23]),xe(s,"keydown",r[24]),xe(s,"focus",r[16]),xe(s,"blur",r[25])],c=!0)},p(y,_){_[0]&12&&t!==(t=pt(y[2],y[3])+"")&&(e.innerHTML=t),_[0]&2&&W(e,"for",y[1]),_[0]&8&&W(s,"accesskey",y[3]),_[0]&2&&W(s,"id",y[1]),_[0]&16&&W(s,"placeholder",y[4]),_[0]&64&&s.value!==y[6]&&gr(s,y[6]),y[10]&&y[10].length!==0?p?p.p(y,_):(p=fw(y),p.c(),p.m(u.parentNode,u)):p&&(p.d(1),p=null),y[0][y[1]].length!==0?m?m.p(y,_):(m=hw(y),m.c(),m.m(l.parentNode,l)):m&&(m.d(1),m=null)},i:Ue,o:Ue,d(y){y&&oe(e),y&&oe(n),y&&oe(i),r[22](null),a(),y&&oe(o),p&&p.d(y),y&&oe(u),m&&m.d(y),y&&oe(l),c=!1,Ft(d)}}}function TI(r,e,t){let{task:n}=e,{editableTask:i}=e,{allTasks:s}=e,{_onDescriptionKeyDown:a}=e,{type:o}=e,{labelText:u}=e,{accesskey:l}=e,{placeholder:c="Type to search..."}=e,d="",p=null,m=0,y,_=!1,b=!1,E,R;function S(v){t(0,i[o]=[...i[o],v],i),t(6,d=""),t(7,_=!1)}function F(v){t(0,i[o]=i[o].filter(x=>x!==v),i)}function q(v){var x;if(p!==null){switch(v.key){case"ArrowUp":v.preventDefault(),!!m&&m>0?t(11,m-=1):t(11,m=p.length-1);break;case"ArrowDown":v.preventDefault(),!!m&&m{x.style.left=`${N}px`,x.style.top=`${re}px`})}function be(v){return v===n.taskLocation.path?"":v}function Pe(v){return Oi(v)}function j(v,x){let N=v.createDiv();N.addClasses(["tooltip","pop-up"]),N.innerText=x,Zm(v,N,{placement:"top",middleware:[dl(-18),fl()]}).then(({x:re,y:le})=>{N.style.left=`${re}px`,N.style.top=`${le}px`}),v.addEventListener("mouseleave",()=>N.remove())}function $(v){je[v?"unshift":"push"](()=>{E=v,t(8,E)})}function D(){d=this.value,t(6,d)}let B=v=>q(v),I=()=>t(7,_=!1);function Z(){y=this.clientWidth,t(12,y)}let f=(v,x)=>j(x.currentTarget,Pe(v)),h=(v,x)=>j(x.currentTarget,v),g=v=>S(v),T=v=>t(11,m=v);function w(v){je[v?"unshift":"push"](()=>{R=v,t(9,R)})}let O=()=>t(11,m=null),M=v=>F(v),A=(v,x)=>j(x.currentTarget,Pe(v));return r.$$set=v=>{"task"in v&&t(5,n=v.task),"editableTask"in v&&t(0,i=v.editableTask),"allTasks"in v&&t(20,s=v.allTasks),"_onDescriptionKeyDown"in v&&t(21,a=v._onDescriptionKeyDown),"type"in v&&t(1,o=v.type),"labelText"in v&&t(2,u=v.labelText),"accesskey"in v&&t(3,l=v.accesskey),"placeholder"in v&&t(4,c=v.placeholder)},r.$$.update=()=>{if(r.$$.dirty[0]&768){e:H(E,R)}if(r.$$.dirty[0]&192){e:t(10,p=_?te(d):null)}},[i,o,u,l,c,n,d,_,E,R,p,m,y,S,F,q,G,be,Pe,j,s,a,$,D,B,I,Z,f,h,g,T,w,O,M,A]}var Jm=class extends hr{constructor(e){super(),Xr(this,e,TI,bI,Qr,{task:5,editableTask:0,allTasks:20,_onDescriptionKeyDown:21,type:1,labelText:2,accesskey:3,placeholder:4},null,[-1,-1])}},eh=Jm;var Co=require("obsidian");var Mo,th,rh,_I=["md"];function bl(){return St.getLogger("tasks.File")}var yw=({metadataCache:r,vault:e,workspace:t})=>{Mo=r,th=e,rh=t},br=t=>P(void 0,[t],function*({originalTask:r,newTasks:e}){if(th===void 0||Mo===void 0||rh===void 0){gl("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]);let n=bl(),i="replaceTaskWithTasks()";il(n,i,r),sl(n,i,e),yield Tw({originalTask:r,newTasks:e,vault:th,metadataCache:Mo,workspace:rh,previousTries:0})});function gl(r){console.error(r),new Co.Notice(r,15e3)}function bw(r){console.warn(r),new Co.Notice(r,1e4)}function vI(r){bl().debug(r)}var zn=class extends Error{},yl=class extends Error{},Tw=a=>P(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s}){let o=bl();o.debug(`tryRepetitive after ${s} previous tries`);let u=()=>P(void 0,null,function*(){if(s>10){let c=`Tasks: Could not find the correct task line to update. The task line not updated is: ${r.originalMarkdown} @@ -181,20 +181,20 @@ Recommendations: 2. Check for exactly identical copies of the task line, in this file, and see if you can make them different. `;gl(c);return}let l=Math.min(Math.pow(10,s),100);o.debug(`timeout = ${l}`),setTimeout(()=>P(void 0,null,function*(){yield Tw({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s+1})}),l)});try{let[l,c,d]=yield _w(r,t),p=[...d.slice(0,l),...e.map(m=>m.toFileLineString()),...d.slice(l+1)];yield t.modify(c,p.join(` -`))}catch(l){if(l instanceof zn){l.message&&bw(l.message),yield u();return}else if(l instanceof yl){yield u();return}else l instanceof Error&&gl(l.message)}});function _w(r,e){return P(this,null,function*(){if(Mo===void 0)throw new zn;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof Co.TFile))throw new zn(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!TI.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=Mo.getFileCache(t);if(n==null||n===null)throw new zn(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let i=n.listItems;if(i===void 0||i.length===0)throw new zn(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let a=(yield e.read(t)).split(` -`),o=vI(r,a,i,_I);if(o===void 0)throw new yl;return[o,t,a]})}function nh(r,e){return P(this,null,function*(){try{let[t,n,i]=yield _w(r,e);return[t,n]}catch(t){t instanceof zn?t.message&&bw(t.message):t instanceof Error&&gl(t.message)}})}function vw(r,e){return rc.id===u);!l||a.push(l)}let o=t.filter(u=>u.dependsOn.includes(e.id));return new Ms({addGlobalFilterOnSave:i,originalBlocking:o,description:n,status:e.status,priority:s,recurrenceRule:e.recurrence?e.recurrence.toText():"",onCompletion:e.onCompletion,createdDate:e.created.formatAsDate(),startDate:e.start.formatAsDate(),scheduledDate:e.scheduled.formatAsDate(),dueDate:e.due.formatAsDate(),doneDate:e.done.formatAsDate(),cancelledDate:e.cancelled.formatAsDate(),forwardOnly:!0,blockedBy:a,blocking:o})}applyEdits(e,t){return P(this,null,function*(){let n=this.description.trim();this.addGlobalFilterOnSave&&(n=_e.getInstance().prependTo(n));let i=Ti(this.startDate,this.forwardOnly),s=Ti(this.scheduledDate,this.forwardOnly),a=Ti(this.dueDate,this.forwardOnly),o=Ti(this.cancelledDate,this.forwardOnly),u=Ti(this.createdDate,this.forwardOnly),l=Ti(this.doneDate,this.forwardOnly),c=null;this.recurrenceRule&&(c=it.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new fr({startDate:i,scheduledDate:s,dueDate:a})}));let d;switch(this.priority){case"lowest":d="5";break;case"low":d="4";break;case"medium":d="2";break;case"high":d="1";break;case"highest":d="0";break;default:d="3"}let p=this.onCompletion,m=[];for(let S of this.blockedBy){let F=yield SI(S,t);m.push(F)}let y=e.id,_=[],b=[];(this.blocking.toString()!==this.originalBlocking.toString()||this.blocking.length!==0)&&(e.id===""&&(y=To(t.filter(S=>S.id!=="").map(S=>S.id))),_=this.originalBlocking.filter(S=>!this.blocking.includes(S)),b=this.blocking.filter(S=>!this.originalBlocking.includes(S)));let E=new ae(he(K({},e),{description:n,status:e.status,priority:d,onCompletion:p,recurrence:c,startDate:i,scheduledDate:s,dueDate:a,doneDate:l,createdDate:u,cancelledDate:o,dependsOn:m.map(S=>S.id),id:y}));for(let S of _){let F=yv(S,E);yield br({originalTask:S,newTasks:F})}for(let S of b){let F=gv(S,E);yield br({originalTask:S,newTasks:F})}let R=l||window.moment();return E.handleNewStatusWithRecurrenceInUsersOrder(this.status,R)})}parseAndValidateRecurrence(){var t;if(!this.recurrenceRule)return{parsedRecurrence:"not recurring",isRecurrenceValid:!0};let e=(t=it.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new fr({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:t.toText();return e?this.startDate||this.scheduledDate||this.dueDate?{parsedRecurrence:e,isRecurrenceValid:!0}:{parsedRecurrence:"due, scheduled or start date required",isRecurrenceValid:!1}:{parsedRecurrence:"invalid recurrence rule",isRecurrenceValid:!1}}};function SI(r,e){return P(this,null,function*(){if(r.id!=="")return r;let t=e.filter(i=>i.id!==""),n=Zu(r,t.map(i=>i.id));return yield br({originalTask:r,newTasks:n}),n})}function OI(r){let e,t=pt("Recurs",r[2])+"",n,i,s,a,o,u,l,c,d;return{c(){e=Q("label"),n=ue(),i=Q("input"),s=ue(),a=Q("code"),o=Me(r[4]),u=ue(),l=new ks(!1),W(e,"for","recurrence"),W(i,"id","recurrence"),W(i,"type","text"),W(i,"class","tasks-modal-date-input"),W(i,"placeholder","Try 'every day when done'"),W(i,"accesskey",r[2]),Dn(i,"tasks-modal-error",!r[1]),l.a=null,W(a,"class","tasks-modal-parsed-date")},m(p,m){de(p,e,m),e.innerHTML=t,de(p,n,m),de(p,i,m),gr(i,r[0].recurrenceRule),de(p,s,m),de(p,a,m),U(a,o),U(a,u),l.m(r[3],a),c||(d=xe(i,"input",r[5]),c=!0)},p(p,[m]){m&4&&t!==(t=pt("Recurs",p[2])+"")&&(e.innerHTML=t),m&4&&W(i,"accesskey",p[2]),m&1&&i.value!==p[0].recurrenceRule&&gr(i,p[0].recurrenceRule),m&2&&Dn(i,"tasks-modal-error",!p[1]),m&8&&l.p(p[3])},i:Ue,o:Ue,d(p){p&&oe(e),p&&oe(n),p&&oe(i),p&&oe(s),p&&oe(a),c=!1,d()}}}function DI(r,e,t){let{editableTask:n}=e,{isRecurrenceValid:i}=e,{accesskey:s}=e,a,{recurrenceSymbol:o}=Mr.tasksPluginEmoji.taskSerializer.symbols;function u(){n.recurrenceRule=this.value,t(0,n)}return r.$$set=l=>{"editableTask"in l&&t(0,n=l.editableTask),"isRecurrenceValid"in l&&t(1,i=l.isRecurrenceValid),"accesskey"in l&&t(2,s=l.accesskey)},r.$$.update=()=>{if(r.$$.dirty&1){e:t(3,{parsedRecurrence:a,isRecurrenceValid:i}=n.parseAndValidateRecurrence(),a,(t(1,i),t(0,n)))}},[n,i,s,a,o,u]}var ih=class extends hr{constructor(e){super(),Xr(this,e,DI,OI,Qr,{editableTask:0,isRecurrenceValid:1,accesskey:2})}},ww=ih;function kw(r,e,t){let n=r.slice();return n[7]=e[t],n}function Ew(r){let e,t=r[7].name+"",n,i,s=r[7].symbol+"",a,o,u;return{c(){e=Q("option"),n=Me(t),i=Me(" ["),a=Me(s),o=Me("]"),e.__value=u=r[7].symbol,e.value=e.__value},m(l,c){de(l,e,c),U(e,n),U(e,i),U(e,a),U(e,o)},p(l,c){c&1&&t!==(t=l[7].name+"")&&Ar(n,t),c&1&&s!==(s=l[7].symbol+"")&&Ar(a,s),c&1&&u!==(u=l[7].symbol)&&(e.__value=u,e.value=e.__value)},d(l){l&&oe(e)}}}function xI(r){let e,t=pt("Status",r[1])+"",n,i,s,a,o=r[0],u=[];for(let l=0;lr[6].call(i))},m(l,c){de(l,e,c),e.innerHTML=t,de(l,n,c),de(l,i,c);for(let d=0;d{let c=s.find(p=>p.symbol===o);if(c)t(4,i.status=c,i);else{console.log(`Error in EditTask: cannot find status with symbol ${o}`);return}let d=n.handleNewStatus(c).pop();d&&(t(4,i.doneDate=d.done.formatAsDate(),i),t(4,i.cancelledDate=d.cancelled.formatAsDate(),i))};function l(){o=Wv(this),t(2,o),t(0,s)}return r.$$set=c=>{"task"in c&&t(5,n=c.task),"editableTask"in c&&t(4,i=c.editableTask),"statusOptions"in c&&t(0,s=c.statusOptions),"accesskey"in c&&t(1,a=c.accesskey)},[s,a,o,u,i,n,l]}var sh=class extends hr{constructor(e){super(),Xr(this,e,RI,xI,Qr,{task:5,editableTask:4,statusOptions:0,accesskey:1})}},Sw=sh;function Ow(r,e,t){let n=r.slice();return n[49]=e[t].value,n[50]=e[t].label,n[51]=e[t].symbol,n[52]=e[t].accessKey,n[53]=e[t].accessKeyIndex,n}function MI(r){let e,t=r[50]+"",n;return{c(){e=Q("span"),n=Me(t)},m(i,s){de(i,e,s),U(e,n)},p:Ue,d(i){i&&oe(e)}}}function CI(r){let e,t=r[50].substring(0,r[53])+"",n,i,s=r[50].substring(r[53],r[53]+1)+"",a,o,u=r[50].substring(r[53]+1)+"",l;return{c(){e=Q("span"),n=Me(t),i=Q("span"),a=Me(s),o=Q("span"),l=Me(u),W(i,"class","accesskey")},m(c,d){de(c,e,d),U(e,n),de(c,i,d),U(i,a),de(c,o,d),U(o,l)},p:Ue,d(c){c&&oe(e),c&&oe(i),c&&oe(o)}}}function AI(r){let e,t=r[51]+"",n;return{c(){e=Q("span"),n=Me(t)},m(i,s){de(i,e,s),U(e,n)},p:Ue,d(i){i&&oe(e)}}}function Dw(r){let e,t,n,i,s,a,o,u,l=r[51]&&r[51].charCodeAt(0)>=256,c,d,p,m,y;function _(S,F){return S[11]?CI:MI}let b=_(r,[-1,-1]),E=b(r),R=l&&AI(r);return p=Uv(r[32][0]),{c(){e=Q("div"),t=Q("input"),a=ue(),o=Q("label"),E.c(),u=ue(),R&&R.c(),d=ue(),W(t,"type","radio"),W(t,"id",n="priority-"+r[49]),t.__value=i=r[49],t.value=t.__value,W(t,"accesskey",s=r[15](r[52])),W(o,"for",c="priority-"+r[49]),W(e,"class","task-modal-priority-option-container"),p.p(t)},m(S,F){de(S,e,F),U(e,t),t.checked=t.__value===r[3].priority,U(e,a),U(e,o),E.m(o,null),U(o,u),R&&R.m(o,null),U(e,d),m||(y=xe(t,"change",r[31]),m=!0)},p(S,F){F[0]&32768&&s!==(s=S[15](S[52]))&&W(t,"accesskey",s),F[0]&8&&(t.checked=t.__value===S[3].priority),b===(b=_(S,F))&&E?E.p(S,F):(E.d(1),E=b(S),E&&(E.c(),E.m(o,u))),l&&R.p(S,F)},d(S){S&&oe(e),E.d(),R&&R.d(),p.r(),m=!1,y()}}}function PI(r){let e;return{c(){e=Q("div"),e.innerHTML="Blocking and blocked by fields are disabled when vault tasks is empty"},m(t,n){de(t,e,n)},p:Ue,i:Ue,o:Ue,d(t){t&&oe(e)}}}function NI(r){let e,t,n,i;return e=new eh({props:{type:"blockedBy",labelText:"Before this",task:r[0],editableTask:r[3],allTasks:r[2],_onDescriptionKeyDown:r[24],accesskey:r[15]("b"),placeholder:"Search for tasks that the task being edited depends on..."}}),n=new eh({props:{type:"blocking",labelText:"After this",task:r[0],editableTask:r[3],allTasks:r[2],_onDescriptionKeyDown:r[24],accesskey:r[15]("e"),placeholder:"Search for tasks that depend on this task being done..."}}),{c(){Pr(e.$$.fragment),t=ue(),Pr(n.$$.fragment)},m(s,a){yr(e,s,a),de(s,t,a),yr(n,s,a),i=!0},p(s,a){let o={};a[0]&1&&(o.task=s[0]),a[0]&8&&(o.editableTask=s[3]),a[0]&4&&(o.allTasks=s[2]),a[0]&32768&&(o.accesskey=s[15]("b")),e.$set(o);let u={};a[0]&1&&(u.task=s[0]),a[0]&8&&(u.editableTask=s[3]),a[0]&4&&(u.allTasks=s[2]),a[0]&32768&&(u.accesskey=s[15]("e")),n.$set(u)},i(s){i||(Lt(e.$$.fragment,s),Lt(n.$$.fragment,s),i=!0)},o(s){Qt(e.$$.fragment,s),Qt(n.$$.fragment,s),i=!1},d(s){Xt(e,s),s&&oe(t),Xt(n,s)}}}function II(r){let e,t,n,i=pt("Description",r[15]("t"))+"",s,a,o,u,l,c,d,p,m,y,_,b,E,R,S,F,q,te,G,H,be,Pe,j,$,D,B,I,Z,f,h,g=pt("Only future dates:",r[15]("f"))+"",T,w,O,M,A,v,x,N,re,le,fe,Ne,Ce,Mt,an,Wr,Y,jt,Qe,Uh,on,pc,mc,Wh,un,hc,gc,qh,Bi,oi,$h,Yo,jh,Zs,qr,yc,Gh,Hi=r[22],vt=[];for(let C=0;CDt(R,"isRecurrenceValid",Yk));function Bk(C){r[34](C)}function Hk(C){r[35](C)}let bc={id:"due",dateSymbol:r[18],forwardOnly:r[3].forwardOnly,accesskey:r[15]("d")};r[3].dueDate!==void 0&&(bc.date=r[3].dueDate),r[7]!==void 0&&(bc.isDateValid=r[7]),q=new Ai({props:bc}),je.push(()=>Dt(q,"date",Bk)),je.push(()=>Dt(q,"isDateValid",Hk));function Vk(C){r[36](C)}function zk(C){r[37](C)}let Tc={id:"scheduled",dateSymbol:r[17],forwardOnly:r[3].forwardOnly,accesskey:r[15]("s")};r[3].scheduledDate!==void 0&&(Tc.date=r[3].scheduledDate),r[8]!==void 0&&(Tc.isDateValid=r[8]),be=new Ai({props:Tc}),je.push(()=>Dt(be,"date",Vk)),je.push(()=>Dt(be,"isDateValid",zk));function Kk(C){r[38](C)}function Qk(C){r[39](C)}let _c={id:"start",dateSymbol:r[16],forwardOnly:r[3].forwardOnly,accesskey:r[15]("a")};r[3].startDate!==void 0&&(_c.date=r[3].startDate),r[9]!==void 0&&(_c.isDateValid=r[9]),D=new Ai({props:_c}),je.push(()=>Dt(D,"date",Kk)),je.push(()=>Dt(D,"isDateValid",Qk));let Bh=[NI,PI],Fn=[];function Hh(C,ee){return C[2].length>0&&C[14]?0:1}N=Hh(r,[-1,-1]),re=Fn[N]=Bh[N](r);function Xk(C){r[41](C)}let Vh={task:r[0],statusOptions:r[1],accesskey:r[15]("u")};r[3]!==void 0&&(Vh.editableTask=r[3]),Mt=new Sw({props:Vh}),je.push(()=>Dt(Mt,"editableTask",Xk));function Zk(C){r[42](C)}function Jk(C){r[43](C)}let vc={id:"created",dateSymbol:r[20],forwardOnly:r[3].forwardOnly,accesskey:r[15]("c")};r[3].createdDate!==void 0&&(vc.date=r[3].createdDate),r[5]!==void 0&&(vc.isDateValid=r[5]),Y=new Ai({props:vc}),je.push(()=>Dt(Y,"date",Zk)),je.push(()=>Dt(Y,"isDateValid",Jk));function eE(C){r[44](C)}function tE(C){r[45](C)}let wc={id:"done",dateSymbol:r[21],forwardOnly:r[3].forwardOnly,accesskey:r[15]("x")};r[3].doneDate!==void 0&&(wc.date=r[3].doneDate),r[6]!==void 0&&(wc.isDateValid=r[6]),on=new Ai({props:wc}),je.push(()=>Dt(on,"date",eE)),je.push(()=>Dt(on,"isDateValid",tE));function rE(C){r[46](C)}function nE(C){r[47](C)}let kc={id:"cancelled",dateSymbol:r[19],forwardOnly:r[3].forwardOnly,accesskey:r[15]("-")};return r[3].cancelledDate!==void 0&&(kc.date=r[3].cancelledDate),r[4]!==void 0&&(kc.isDateValid=r[4]),un=new Ai({props:kc}),je.push(()=>Dt(un,"date",rE)),je.push(()=>Dt(un,"isDateValid",nE)),{c(){e=Q("form"),t=Q("section"),n=Q("label"),s=ue(),a=Q("textarea"),u=ue(),l=Q("section"),c=Q("label"),d=Me("Priority"),m=ue();for(let C=0;CS=!1)),R.$set(ln);let Js={};ee[0]&8&&(Js.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(Js.accesskey=C[15]("d")),!te&&ee[0]&8&&(te=!0,Js.date=C[3].dueDate,Ot(()=>te=!1)),!G&&ee[0]&128&&(G=!0,Js.isDateValid=C[7],Ot(()=>G=!1)),q.$set(Js);let ea={};ee[0]&8&&(ea.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(ea.accesskey=C[15]("s")),!Pe&&ee[0]&8&&(Pe=!0,ea.date=C[3].scheduledDate,Ot(()=>Pe=!1)),!j&&ee[0]&256&&(j=!0,ea.isDateValid=C[8],Ot(()=>j=!1)),be.$set(ea);let ta={};ee[0]&8&&(ta.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(ta.accesskey=C[15]("a")),!B&&ee[0]&8&&(B=!0,ta.date=C[3].startDate,Ot(()=>B=!1)),!I&&ee[0]&512&&(I=!0,ta.isDateValid=C[9],Ot(()=>I=!1)),D.$set(ta),(!qr||ee[0]&32768)&&g!==(g=pt("Only future dates:",C[15]("f"))+"")&&(h.innerHTML=g),(!qr||ee[0]&32768&&O!==(O=C[15]("f")))&&W(w,"accesskey",O),ee[0]&8&&(w.checked=C[3].forwardOnly);let Ec=N;N=Hh(C,ee),N===Ec?Fn[N].p(C,ee):(jv(),Qt(Fn[Ec],1,1,()=>{Fn[Ec]=null}),Gv(),re=Fn[N],re?re.p(C,ee):(re=Fn[N]=Bh[N](C),re.c()),Lt(re,1),re.m(x,null));let ra={};ee[0]&1&&(ra.task=C[0]),ee[0]&2&&(ra.statusOptions=C[1]),ee[0]&32768&&(ra.accesskey=C[15]("u")),!an&&ee[0]&8&&(an=!0,ra.editableTask=C[3],Ot(()=>an=!1)),Mt.$set(ra);let na={};ee[0]&8&&(na.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(na.accesskey=C[15]("c")),!jt&&ee[0]&8&&(jt=!0,na.date=C[3].createdDate,Ot(()=>jt=!1)),!Qe&&ee[0]&32&&(Qe=!0,na.isDateValid=C[5],Ot(()=>Qe=!1)),Y.$set(na);let ia={};ee[0]&8&&(ia.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(ia.accesskey=C[15]("x")),!pc&&ee[0]&8&&(pc=!0,ia.date=C[3].doneDate,Ot(()=>pc=!1)),!mc&&ee[0]&64&&(mc=!0,ia.isDateValid=C[6],Ot(()=>mc=!1)),on.$set(ia);let sa={};ee[0]&8&&(sa.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(sa.accesskey=C[15]("-")),!hc&&ee[0]&8&&(hc=!0,sa.date=C[3].cancelledDate,Ot(()=>hc=!1)),!gc&&ee[0]&16&&(gc=!0,sa.isDateValid=C[4],Ot(()=>gc=!1)),un.$set(sa),(!qr||ee[0]&8192&&Yo!==(Yo=!C[13]))&&(oi.disabled=Yo)},i(C){qr||(Lt(R.$$.fragment,C),Lt(q.$$.fragment,C),Lt(be.$$.fragment,C),Lt(D.$$.fragment,C),Lt(re),Lt(Mt.$$.fragment,C),Lt(Y.$$.fragment,C),Lt(on.$$.fragment,C),Lt(un.$$.fragment,C),qr=!0)},o(C){Qt(R.$$.fragment,C),Qt(q.$$.fragment,C),Qt(be.$$.fragment,C),Qt(D.$$.fragment,C),Qt(re),Qt(Mt.$$.fragment,C),Qt(Y.$$.fragment,C),Qt(on.$$.fragment,C),Qt(un.$$.fragment,C),qr=!1},d(C){C&&oe(e),r[30](null),Ci(vt,C),Xt(R),Xt(q),Xt(be),Xt(D),Fn[N].d(),Xt(Mt),Xt(Y),Xt(on),Xt(un),yc=!1,Ft(Gh)}}}function FI(r,e,t){let n,{task:i}=e,{onSubmit:s}=e,{statusOptions:a}=e,{allTasks:o}=e,{prioritySymbols:u,startDateSymbol:l,scheduledDateSymbol:c,dueDateSymbol:d,cancelledDateSymbol:p,createdDateSymbol:m,doneDateSymbol:y}=Mr.tasksPluginEmoji.taskSerializer.symbols,_,b=Ms.fromTask(i,o),E=!0,R=!0,S=!0,F=!0,q=!0,te=!0,G=!0,H=!0,be=!0,Pe=!0,j=!1,$=[{value:"lowest",label:"Lowest",symbol:u.Lowest,accessKey:"o",accessKeyIndex:1},{value:"low",label:"Low",symbol:u.Low,accessKey:"l",accessKeyIndex:0},{value:"none",label:"Normal",symbol:u.None,accessKey:"n",accessKeyIndex:0},{value:"medium",label:"Medium",symbol:u.Medium,accessKey:"m",accessKeyIndex:0},{value:"high",label:"High",symbol:u.High,accessKey:"h",accessKeyIndex:0},{value:"highest",label:"Highest",symbol:u.Highest,accessKey:"i",accessKeyIndex:1}];Ym(()=>{let{provideAccessKeys:Y}=X();t(11,be=Y),t(14,j=!0),setTimeout(()=>{_.focus()},10)});let D=()=>{s([])},B=Y=>{Y.key==="Enter"&&(Y.preventDefault(),Pe&&Z())},I=()=>{setTimeout(()=>{t(3,b.description=b.description.replace(/[\r\n]+/g," "),b)},0)},Z=()=>Yv(void 0,void 0,void 0,function*(){let Y=yield b.applyEdits(i,o);s(Y)}),f=[[]];function h(){b.description=this.value,t(3,b)}function g(Y){je[Y?"unshift":"push"](()=>{_=Y,t(12,_)})}function T(){b.priority=this.__value,t(3,b)}function w(Y){H=Y,t(10,H)}function O(Y){r.$$.not_equal(b.dueDate,Y)&&(b.dueDate=Y,t(3,b))}function M(Y){q=Y,t(7,q)}function A(Y){r.$$.not_equal(b.scheduledDate,Y)&&(b.scheduledDate=Y,t(3,b))}function v(Y){te=Y,t(8,te)}function x(Y){r.$$.not_equal(b.startDate,Y)&&(b.startDate=Y,t(3,b))}function N(Y){G=Y,t(9,G)}function re(){b.forwardOnly=this.checked,t(3,b)}function le(Y){b=Y,t(3,b)}function fe(Y){r.$$.not_equal(b.createdDate,Y)&&(b.createdDate=Y,t(3,b))}function Ne(Y){S=Y,t(5,S)}function Ce(Y){r.$$.not_equal(b.doneDate,Y)&&(b.doneDate=Y,t(3,b))}function Mt(Y){F=Y,t(6,F)}function an(Y){r.$$.not_equal(b.cancelledDate,Y)&&(b.cancelledDate=Y,t(3,b))}function Wr(Y){R=Y,t(4,R)}return r.$$set=Y=>{"task"in Y&&t(0,i=Y.task),"onSubmit"in Y&&t(27,s=Y.onSubmit),"statusOptions"in Y&&t(1,a=Y.statusOptions),"allTasks"in Y&&t(2,o=Y.allTasks)},r.$$.update=()=>{if(r.$$.dirty[0]&2048){e:t(15,n=Y=>be?Y:null)}if(r.$$.dirty[0]&8){e:t(28,E=b.description.trim()!=="")}if(r.$$.dirty[0]&268437488){e:t(13,Pe=q&&H&&te&&G&&E&&R&&S&&F)}},[i,a,o,b,R,S,F,q,te,G,H,be,_,Pe,j,n,l,c,d,p,m,y,$,D,B,I,Z,s,E,h,g,T,f,w,O,M,A,v,x,N,re,le,fe,Ne,Ce,Mt,an,Wr]}var ah=class extends hr{constructor(e){super(),Xr(this,e,FI,II,Qr,{task:0,onSubmit:27,statusOptions:1,allTasks:2},null,[-1,-1])}},xw=ah;var Kn=class extends Rw.Modal{constructor({app:t,task:n,onSubmit:i,allTasks:s}){super(t);this.task=n,this.allTasks=s,this.onSubmit=a=>{a.length&&i(a),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task"),this.modalEl.style.paddingBottom="0";let{contentEl:t}=this;this.contentEl.style.paddingBottom="0";let n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new xw({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit,allTasks:this.allTasks}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=De.getInstance().registeredStatuses;return De.getInstance().bySymbol(this.task.status.symbol)===ne.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};function LI(){let{setCreatedDate:r}=X();return r?window.moment():null}function UI(r){let{setCreatedDate:e}=X();if(!e||r.createdDate!==null)return!1;let t=r.description==="",n=!_e.getInstance().isEmpty(),i=!_e.getInstance().includedIn(r.description);return t||n&&i}var Tl=({line:r,path:e})=>{var p,m;let t=ae.parseTaskSignifiers(r,ft.fromUnknownPosition(new at(e)),yt.fromPath(e)),n=LI();if(t!==null)return UI(t)?new ae(he(K({},t),{createdDate:n})):t;let i=r.match(J.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new ae({status:ne.TODO,description:"",taskLocation:ft.fromUnknownPosition(new at(e)),indentation:"",listMarker:"-",priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,onCompletion:"",dependsOn:[],id:"",blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(p=i[2])!=null?p:"-",o=(m=i[4])!=null?m:" ",u=De.getInstance().bySymbolOrCreate(o),l=i[5],c=r.match(J.blockLinkRegex),d=c!==null?c[0]:"";return d!==""&&(l=l.replace(J.blockLinkRegex,"")),new ae({status:u,description:l,taskLocation:ft.fromUnknownPosition(new at(e)),indentation:s,listMarker:a,blockLink:d,priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,onCompletion:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1,id:"",dependsOn:[]})};var Mw=(r,e,t,n,i)=>{var p;if(r)return t instanceof oh.MarkdownView;if(!(t instanceof oh.MarkdownView))return;let s=(p=t.file)==null?void 0:p.path;if(s===void 0)return;let o=e.getCursor().line,u=e.getLine(o),l=Tl({line:u,path:s}),c=m=>{let y=yt.removeInferredStatusIfNeeded(l,m).map(_=>_.toFileLineString()).join(` -`);e.setLine(o,y)};new Kn({app:n,task:l,onSubmit:c,allTasks:i}).open()};var uh=require("obsidian");var Cw=(r,e,t)=>{var u;if(r)return t instanceof uh.MarkdownView;if(!(t instanceof uh.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let i=e.getCursor(),s=i.line,a=e.getLine(s),o=lh(a,n);e.setLine(s,o.text),e.setCursor(WI(i,o))},lh=(r,e)=>{let t=ae.fromLine({line:r,taskLocation:ft.fromUnknownPosition(new at(e)),fallbackDate:null});if(t!==null){let n=t.toggleWithRecurrenceInUsersOrder().map(i=>i.toFileLineString());return{text:n.join(` -`),moveTo:{line:n.length-1}}}else{let n=r.match(J.taskRegex);if(n!==null){let i=n[3],a=De.getInstance().bySymbol(i).nextStatusSymbol;return{text:r.replace(J.taskRegex,`$1- [${a}] $4`)}}else if(J.listItemRegex.test(r)){let i=r.replace(J.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=r.replace(J.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},WI=(r,e)=>{var s;let t={line:0,ch:r.ch},n=K(K({},t),(s=e.moveTo)!=null?s:{}),i=e.text.split(` +${u}`);return}break}s++}}return i}var Ms=class{constructor(e){this.addGlobalFilterOnSave=e.addGlobalFilterOnSave,this.originalBlocking=e.originalBlocking,this.description=e.description,this.status=e.status,this.priority=e.priority,this.onCompletion=e.onCompletion,this.recurrenceRule=e.recurrenceRule,this.createdDate=e.createdDate,this.startDate=e.startDate,this.scheduledDate=e.scheduledDate,this.dueDate=e.dueDate,this.doneDate=e.doneDate,this.cancelledDate=e.cancelledDate,this.forwardOnly=e.forwardOnly,this.blockedBy=e.blockedBy,this.blocking=e.blocking}static fromTask(e,t){let n=_e.getInstance().removeAsWordFrom(e.description),i=n!=e.description||!_e.getInstance().includedIn(e.description),s="none";e.priority==="5"?s="lowest":e.priority==="4"?s="low":e.priority==="2"?s="medium":e.priority==="1"?s="high":e.priority==="0"&&(s="highest");let a=[];for(let u of e.dependsOn){let l=t.find(c=>c.id===u);!l||a.push(l)}let o=t.filter(u=>u.dependsOn.includes(e.id));return new Ms({addGlobalFilterOnSave:i,originalBlocking:o,description:n,status:e.status,priority:s,recurrenceRule:e.recurrence?e.recurrence.toText():"",onCompletion:e.onCompletion,createdDate:e.created.formatAsDate(),startDate:e.start.formatAsDate(),scheduledDate:e.scheduled.formatAsDate(),dueDate:e.due.formatAsDate(),doneDate:e.done.formatAsDate(),cancelledDate:e.cancelled.formatAsDate(),forwardOnly:!0,blockedBy:a,blocking:o})}applyEdits(e,t){return P(this,null,function*(){let n=this.description.trim();this.addGlobalFilterOnSave&&(n=_e.getInstance().prependTo(n));let i=Ti(this.startDate,this.forwardOnly),s=Ti(this.scheduledDate,this.forwardOnly),a=Ti(this.dueDate,this.forwardOnly),o=Ti(this.cancelledDate,this.forwardOnly),u=Ti(this.createdDate,this.forwardOnly),l=Ti(this.doneDate,this.forwardOnly),c=null;this.recurrenceRule&&(c=it.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new fr({startDate:i,scheduledDate:s,dueDate:a})}));let d;switch(this.priority){case"lowest":d="5";break;case"low":d="4";break;case"medium":d="2";break;case"high":d="1";break;case"highest":d="0";break;default:d="3"}let p=this.onCompletion,m=[];for(let S of this.blockedBy){let F=yield OI(S,t);m.push(F)}let y=e.id,_=[],b=[];(this.blocking.toString()!==this.originalBlocking.toString()||this.blocking.length!==0)&&(e.id===""&&(y=To(t.filter(S=>S.id!=="").map(S=>S.id))),_=this.originalBlocking.filter(S=>!this.blocking.includes(S)),b=this.blocking.filter(S=>!this.originalBlocking.includes(S)));let E=new ae(he(K({},e),{description:n,status:e.status,priority:d,onCompletion:p,recurrence:c,startDate:i,scheduledDate:s,dueDate:a,doneDate:l,createdDate:u,cancelledDate:o,dependsOn:m.map(S=>S.id),id:y}));for(let S of _){let F=yv(S,E);yield br({originalTask:S,newTasks:F})}for(let S of b){let F=gv(S,E);yield br({originalTask:S,newTasks:F})}let R=l||window.moment();return E.handleNewStatusWithRecurrenceInUsersOrder(this.status,R)})}parseAndValidateRecurrence(){var t;if(!this.recurrenceRule)return{parsedRecurrence:"not recurring",isRecurrenceValid:!0};let e=(t=it.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new fr({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:t.toText();return e?this.startDate||this.scheduledDate||this.dueDate?{parsedRecurrence:e,isRecurrenceValid:!0}:{parsedRecurrence:"due, scheduled or start date required",isRecurrenceValid:!1}:{parsedRecurrence:"invalid recurrence rule",isRecurrenceValid:!1}}};function OI(r,e){return P(this,null,function*(){if(r.id!=="")return r;let t=e.filter(i=>i.id!==""),n=Zu(r,t.map(i=>i.id));return yield br({originalTask:r,newTasks:n}),n})}function DI(r){let e,t=pt("Recurs",r[2])+"",n,i,s,a,o,u,l,c,d;return{c(){e=Q("label"),n=ue(),i=Q("input"),s=ue(),a=Q("code"),o=Me(r[4]),u=ue(),l=new ks(!1),W(e,"for","recurrence"),W(i,"id","recurrence"),W(i,"type","text"),W(i,"class","tasks-modal-date-input"),W(i,"placeholder","Try 'every day when done'"),W(i,"accesskey",r[2]),Dn(i,"tasks-modal-error",!r[1]),l.a=null,W(a,"class","tasks-modal-parsed-date")},m(p,m){de(p,e,m),e.innerHTML=t,de(p,n,m),de(p,i,m),gr(i,r[0].recurrenceRule),de(p,s,m),de(p,a,m),U(a,o),U(a,u),l.m(r[3],a),c||(d=xe(i,"input",r[5]),c=!0)},p(p,[m]){m&4&&t!==(t=pt("Recurs",p[2])+"")&&(e.innerHTML=t),m&4&&W(i,"accesskey",p[2]),m&1&&i.value!==p[0].recurrenceRule&&gr(i,p[0].recurrenceRule),m&2&&Dn(i,"tasks-modal-error",!p[1]),m&8&&l.p(p[3])},i:Ue,o:Ue,d(p){p&&oe(e),p&&oe(n),p&&oe(i),p&&oe(s),p&&oe(a),c=!1,d()}}}function xI(r,e,t){let{editableTask:n}=e,{isRecurrenceValid:i}=e,{accesskey:s}=e,a,{recurrenceSymbol:o}=Mr.tasksPluginEmoji.taskSerializer.symbols;function u(){n.recurrenceRule=this.value,t(0,n)}return r.$$set=l=>{"editableTask"in l&&t(0,n=l.editableTask),"isRecurrenceValid"in l&&t(1,i=l.isRecurrenceValid),"accesskey"in l&&t(2,s=l.accesskey)},r.$$.update=()=>{if(r.$$.dirty&1){e:t(3,{parsedRecurrence:a,isRecurrenceValid:i}=n.parseAndValidateRecurrence(),a,(t(1,i),t(0,n)))}},[n,i,s,a,o,u]}var ih=class extends hr{constructor(e){super(),Xr(this,e,xI,DI,Qr,{editableTask:0,isRecurrenceValid:1,accesskey:2})}},ww=ih;function kw(r,e,t){let n=r.slice();return n[7]=e[t],n}function Ew(r){let e,t=r[7].name+"",n,i,s=r[7].symbol+"",a,o,u;return{c(){e=Q("option"),n=Me(t),i=Me(" ["),a=Me(s),o=Me("]"),e.__value=u=r[7].symbol,e.value=e.__value},m(l,c){de(l,e,c),U(e,n),U(e,i),U(e,a),U(e,o)},p(l,c){c&1&&t!==(t=l[7].name+"")&&Ar(n,t),c&1&&s!==(s=l[7].symbol+"")&&Ar(a,s),c&1&&u!==(u=l[7].symbol)&&(e.__value=u,e.value=e.__value)},d(l){l&&oe(e)}}}function RI(r){let e,t=pt("Status",r[1])+"",n,i,s,a,o=r[0],u=[];for(let l=0;lr[6].call(i))},m(l,c){de(l,e,c),e.innerHTML=t,de(l,n,c),de(l,i,c);for(let d=0;d{let c=s.find(p=>p.symbol===o);if(c)t(4,i.status=c,i);else{console.log(`Error in EditTask: cannot find status with symbol ${o}`);return}let d=n.handleNewStatus(c).pop();d&&(t(4,i.doneDate=d.done.formatAsDate(),i),t(4,i.cancelledDate=d.cancelled.formatAsDate(),i))};function l(){o=Wv(this),t(2,o),t(0,s)}return r.$$set=c=>{"task"in c&&t(5,n=c.task),"editableTask"in c&&t(4,i=c.editableTask),"statusOptions"in c&&t(0,s=c.statusOptions),"accesskey"in c&&t(1,a=c.accesskey)},[s,a,o,u,i,n,l]}var sh=class extends hr{constructor(e){super(),Xr(this,e,MI,RI,Qr,{task:5,editableTask:4,statusOptions:0,accesskey:1})}},Sw=sh;function Ow(r,e,t){let n=r.slice();return n[49]=e[t].value,n[50]=e[t].label,n[51]=e[t].symbol,n[52]=e[t].accessKey,n[53]=e[t].accessKeyIndex,n}function CI(r){let e,t=r[50]+"",n;return{c(){e=Q("span"),n=Me(t)},m(i,s){de(i,e,s),U(e,n)},p:Ue,d(i){i&&oe(e)}}}function AI(r){let e,t=r[50].substring(0,r[53])+"",n,i,s=r[50].substring(r[53],r[53]+1)+"",a,o,u=r[50].substring(r[53]+1)+"",l;return{c(){e=Q("span"),n=Me(t),i=Q("span"),a=Me(s),o=Q("span"),l=Me(u),W(i,"class","accesskey")},m(c,d){de(c,e,d),U(e,n),de(c,i,d),U(i,a),de(c,o,d),U(o,l)},p:Ue,d(c){c&&oe(e),c&&oe(i),c&&oe(o)}}}function PI(r){let e,t=r[51]+"",n;return{c(){e=Q("span"),n=Me(t)},m(i,s){de(i,e,s),U(e,n)},p:Ue,d(i){i&&oe(e)}}}function Dw(r){let e,t,n,i,s,a,o,u,l=r[51]&&r[51].charCodeAt(0)>=256,c,d,p,m,y;function _(S,F){return S[11]?AI:CI}let b=_(r,[-1,-1]),E=b(r),R=l&&PI(r);return p=Uv(r[32][0]),{c(){e=Q("div"),t=Q("input"),a=ue(),o=Q("label"),E.c(),u=ue(),R&&R.c(),d=ue(),W(t,"type","radio"),W(t,"id",n="priority-"+r[49]),t.__value=i=r[49],t.value=t.__value,W(t,"accesskey",s=r[15](r[52])),W(o,"for",c="priority-"+r[49]),W(e,"class","task-modal-priority-option-container"),p.p(t)},m(S,F){de(S,e,F),U(e,t),t.checked=t.__value===r[3].priority,U(e,a),U(e,o),E.m(o,null),U(o,u),R&&R.m(o,null),U(e,d),m||(y=xe(t,"change",r[31]),m=!0)},p(S,F){F[0]&32768&&s!==(s=S[15](S[52]))&&W(t,"accesskey",s),F[0]&8&&(t.checked=t.__value===S[3].priority),b===(b=_(S,F))&&E?E.p(S,F):(E.d(1),E=b(S),E&&(E.c(),E.m(o,u))),l&&R.p(S,F)},d(S){S&&oe(e),E.d(),R&&R.d(),p.r(),m=!1,y()}}}function NI(r){let e;return{c(){e=Q("div"),e.innerHTML="Blocking and blocked by fields are disabled when vault tasks is empty"},m(t,n){de(t,e,n)},p:Ue,i:Ue,o:Ue,d(t){t&&oe(e)}}}function II(r){let e,t,n,i;return e=new eh({props:{type:"blockedBy",labelText:"Before this",task:r[0],editableTask:r[3],allTasks:r[2],_onDescriptionKeyDown:r[24],accesskey:r[15]("b"),placeholder:"Search for tasks that the task being edited depends on..."}}),n=new eh({props:{type:"blocking",labelText:"After this",task:r[0],editableTask:r[3],allTasks:r[2],_onDescriptionKeyDown:r[24],accesskey:r[15]("e"),placeholder:"Search for tasks that depend on this task being done..."}}),{c(){Pr(e.$$.fragment),t=ue(),Pr(n.$$.fragment)},m(s,a){yr(e,s,a),de(s,t,a),yr(n,s,a),i=!0},p(s,a){let o={};a[0]&1&&(o.task=s[0]),a[0]&8&&(o.editableTask=s[3]),a[0]&4&&(o.allTasks=s[2]),a[0]&32768&&(o.accesskey=s[15]("b")),e.$set(o);let u={};a[0]&1&&(u.task=s[0]),a[0]&8&&(u.editableTask=s[3]),a[0]&4&&(u.allTasks=s[2]),a[0]&32768&&(u.accesskey=s[15]("e")),n.$set(u)},i(s){i||(Lt(e.$$.fragment,s),Lt(n.$$.fragment,s),i=!0)},o(s){Qt(e.$$.fragment,s),Qt(n.$$.fragment,s),i=!1},d(s){Xt(e,s),s&&oe(t),Xt(n,s)}}}function FI(r){let e,t,n,i=pt("Description",r[15]("t"))+"",s,a,o,u,l,c,d,p,m,y,_,b,E,R,S,F,q,te,G,H,be,Pe,j,$,D,B,I,Z,f,h,g=pt("Only future dates:",r[15]("f"))+"",T,w,O,M,A,v,x,N,re,le,fe,Ne,Ce,Mt,an,Wr,Y,jt,Qe,Uh,on,pc,mc,Wh,un,hc,gc,qh,Bi,oi,$h,Yo,jh,Zs,qr,yc,Gh,Hi=r[22],vt=[];for(let C=0;CDt(R,"isRecurrenceValid",Bk));function Hk(C){r[34](C)}function Vk(C){r[35](C)}let bc={id:"due",dateSymbol:r[18],forwardOnly:r[3].forwardOnly,accesskey:r[15]("d")};r[3].dueDate!==void 0&&(bc.date=r[3].dueDate),r[7]!==void 0&&(bc.isDateValid=r[7]),q=new Ai({props:bc}),je.push(()=>Dt(q,"date",Hk)),je.push(()=>Dt(q,"isDateValid",Vk));function zk(C){r[36](C)}function Kk(C){r[37](C)}let Tc={id:"scheduled",dateSymbol:r[17],forwardOnly:r[3].forwardOnly,accesskey:r[15]("s")};r[3].scheduledDate!==void 0&&(Tc.date=r[3].scheduledDate),r[8]!==void 0&&(Tc.isDateValid=r[8]),be=new Ai({props:Tc}),je.push(()=>Dt(be,"date",zk)),je.push(()=>Dt(be,"isDateValid",Kk));function Qk(C){r[38](C)}function Xk(C){r[39](C)}let _c={id:"start",dateSymbol:r[16],forwardOnly:r[3].forwardOnly,accesskey:r[15]("a")};r[3].startDate!==void 0&&(_c.date=r[3].startDate),r[9]!==void 0&&(_c.isDateValid=r[9]),D=new Ai({props:_c}),je.push(()=>Dt(D,"date",Qk)),je.push(()=>Dt(D,"isDateValid",Xk));let Bh=[II,NI],Fn=[];function Hh(C,ee){return C[2].length>0&&C[14]?0:1}N=Hh(r,[-1,-1]),re=Fn[N]=Bh[N](r);function Zk(C){r[41](C)}let Vh={task:r[0],statusOptions:r[1],accesskey:r[15]("u")};r[3]!==void 0&&(Vh.editableTask=r[3]),Mt=new Sw({props:Vh}),je.push(()=>Dt(Mt,"editableTask",Zk));function Jk(C){r[42](C)}function eE(C){r[43](C)}let vc={id:"created",dateSymbol:r[20],forwardOnly:r[3].forwardOnly,accesskey:r[15]("c")};r[3].createdDate!==void 0&&(vc.date=r[3].createdDate),r[5]!==void 0&&(vc.isDateValid=r[5]),Y=new Ai({props:vc}),je.push(()=>Dt(Y,"date",Jk)),je.push(()=>Dt(Y,"isDateValid",eE));function tE(C){r[44](C)}function rE(C){r[45](C)}let wc={id:"done",dateSymbol:r[21],forwardOnly:r[3].forwardOnly,accesskey:r[15]("x")};r[3].doneDate!==void 0&&(wc.date=r[3].doneDate),r[6]!==void 0&&(wc.isDateValid=r[6]),on=new Ai({props:wc}),je.push(()=>Dt(on,"date",tE)),je.push(()=>Dt(on,"isDateValid",rE));function nE(C){r[46](C)}function iE(C){r[47](C)}let kc={id:"cancelled",dateSymbol:r[19],forwardOnly:r[3].forwardOnly,accesskey:r[15]("-")};return r[3].cancelledDate!==void 0&&(kc.date=r[3].cancelledDate),r[4]!==void 0&&(kc.isDateValid=r[4]),un=new Ai({props:kc}),je.push(()=>Dt(un,"date",nE)),je.push(()=>Dt(un,"isDateValid",iE)),{c(){e=Q("form"),t=Q("section"),n=Q("label"),s=ue(),a=Q("textarea"),u=ue(),l=Q("section"),c=Q("label"),d=Me("Priority"),m=ue();for(let C=0;CS=!1)),R.$set(ln);let Js={};ee[0]&8&&(Js.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(Js.accesskey=C[15]("d")),!te&&ee[0]&8&&(te=!0,Js.date=C[3].dueDate,Ot(()=>te=!1)),!G&&ee[0]&128&&(G=!0,Js.isDateValid=C[7],Ot(()=>G=!1)),q.$set(Js);let ea={};ee[0]&8&&(ea.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(ea.accesskey=C[15]("s")),!Pe&&ee[0]&8&&(Pe=!0,ea.date=C[3].scheduledDate,Ot(()=>Pe=!1)),!j&&ee[0]&256&&(j=!0,ea.isDateValid=C[8],Ot(()=>j=!1)),be.$set(ea);let ta={};ee[0]&8&&(ta.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(ta.accesskey=C[15]("a")),!B&&ee[0]&8&&(B=!0,ta.date=C[3].startDate,Ot(()=>B=!1)),!I&&ee[0]&512&&(I=!0,ta.isDateValid=C[9],Ot(()=>I=!1)),D.$set(ta),(!qr||ee[0]&32768)&&g!==(g=pt("Only future dates:",C[15]("f"))+"")&&(h.innerHTML=g),(!qr||ee[0]&32768&&O!==(O=C[15]("f")))&&W(w,"accesskey",O),ee[0]&8&&(w.checked=C[3].forwardOnly);let Ec=N;N=Hh(C,ee),N===Ec?Fn[N].p(C,ee):(jv(),Qt(Fn[Ec],1,1,()=>{Fn[Ec]=null}),Gv(),re=Fn[N],re?re.p(C,ee):(re=Fn[N]=Bh[N](C),re.c()),Lt(re,1),re.m(x,null));let ra={};ee[0]&1&&(ra.task=C[0]),ee[0]&2&&(ra.statusOptions=C[1]),ee[0]&32768&&(ra.accesskey=C[15]("u")),!an&&ee[0]&8&&(an=!0,ra.editableTask=C[3],Ot(()=>an=!1)),Mt.$set(ra);let na={};ee[0]&8&&(na.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(na.accesskey=C[15]("c")),!jt&&ee[0]&8&&(jt=!0,na.date=C[3].createdDate,Ot(()=>jt=!1)),!Qe&&ee[0]&32&&(Qe=!0,na.isDateValid=C[5],Ot(()=>Qe=!1)),Y.$set(na);let ia={};ee[0]&8&&(ia.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(ia.accesskey=C[15]("x")),!pc&&ee[0]&8&&(pc=!0,ia.date=C[3].doneDate,Ot(()=>pc=!1)),!mc&&ee[0]&64&&(mc=!0,ia.isDateValid=C[6],Ot(()=>mc=!1)),on.$set(ia);let sa={};ee[0]&8&&(sa.forwardOnly=C[3].forwardOnly),ee[0]&32768&&(sa.accesskey=C[15]("-")),!hc&&ee[0]&8&&(hc=!0,sa.date=C[3].cancelledDate,Ot(()=>hc=!1)),!gc&&ee[0]&16&&(gc=!0,sa.isDateValid=C[4],Ot(()=>gc=!1)),un.$set(sa),(!qr||ee[0]&8192&&Yo!==(Yo=!C[13]))&&(oi.disabled=Yo)},i(C){qr||(Lt(R.$$.fragment,C),Lt(q.$$.fragment,C),Lt(be.$$.fragment,C),Lt(D.$$.fragment,C),Lt(re),Lt(Mt.$$.fragment,C),Lt(Y.$$.fragment,C),Lt(on.$$.fragment,C),Lt(un.$$.fragment,C),qr=!0)},o(C){Qt(R.$$.fragment,C),Qt(q.$$.fragment,C),Qt(be.$$.fragment,C),Qt(D.$$.fragment,C),Qt(re),Qt(Mt.$$.fragment,C),Qt(Y.$$.fragment,C),Qt(on.$$.fragment,C),Qt(un.$$.fragment,C),qr=!1},d(C){C&&oe(e),r[30](null),Ci(vt,C),Xt(R),Xt(q),Xt(be),Xt(D),Fn[N].d(),Xt(Mt),Xt(Y),Xt(on),Xt(un),yc=!1,Ft(Gh)}}}function LI(r,e,t){let n,{task:i}=e,{onSubmit:s}=e,{statusOptions:a}=e,{allTasks:o}=e,{prioritySymbols:u,startDateSymbol:l,scheduledDateSymbol:c,dueDateSymbol:d,cancelledDateSymbol:p,createdDateSymbol:m,doneDateSymbol:y}=Mr.tasksPluginEmoji.taskSerializer.symbols,_,b=Ms.fromTask(i,o),E=!0,R=!0,S=!0,F=!0,q=!0,te=!0,G=!0,H=!0,be=!0,Pe=!0,j=!1,$=[{value:"lowest",label:"Lowest",symbol:u.Lowest,accessKey:"o",accessKeyIndex:1},{value:"low",label:"Low",symbol:u.Low,accessKey:"l",accessKeyIndex:0},{value:"none",label:"Normal",symbol:u.None,accessKey:"n",accessKeyIndex:0},{value:"medium",label:"Medium",symbol:u.Medium,accessKey:"m",accessKeyIndex:0},{value:"high",label:"High",symbol:u.High,accessKey:"h",accessKeyIndex:0},{value:"highest",label:"Highest",symbol:u.Highest,accessKey:"i",accessKeyIndex:1}];Ym(()=>{let{provideAccessKeys:Y}=X();t(11,be=Y),t(14,j=!0),setTimeout(()=>{_.focus()},10)});let D=()=>{s([])},B=Y=>{Y.key==="Enter"&&(Y.preventDefault(),Pe&&Z())},I=()=>{setTimeout(()=>{t(3,b.description=b.description.replace(/[\r\n]+/g," "),b)},0)},Z=()=>Yv(void 0,void 0,void 0,function*(){let Y=yield b.applyEdits(i,o);s(Y)}),f=[[]];function h(){b.description=this.value,t(3,b)}function g(Y){je[Y?"unshift":"push"](()=>{_=Y,t(12,_)})}function T(){b.priority=this.__value,t(3,b)}function w(Y){H=Y,t(10,H)}function O(Y){r.$$.not_equal(b.dueDate,Y)&&(b.dueDate=Y,t(3,b))}function M(Y){q=Y,t(7,q)}function A(Y){r.$$.not_equal(b.scheduledDate,Y)&&(b.scheduledDate=Y,t(3,b))}function v(Y){te=Y,t(8,te)}function x(Y){r.$$.not_equal(b.startDate,Y)&&(b.startDate=Y,t(3,b))}function N(Y){G=Y,t(9,G)}function re(){b.forwardOnly=this.checked,t(3,b)}function le(Y){b=Y,t(3,b)}function fe(Y){r.$$.not_equal(b.createdDate,Y)&&(b.createdDate=Y,t(3,b))}function Ne(Y){S=Y,t(5,S)}function Ce(Y){r.$$.not_equal(b.doneDate,Y)&&(b.doneDate=Y,t(3,b))}function Mt(Y){F=Y,t(6,F)}function an(Y){r.$$.not_equal(b.cancelledDate,Y)&&(b.cancelledDate=Y,t(3,b))}function Wr(Y){R=Y,t(4,R)}return r.$$set=Y=>{"task"in Y&&t(0,i=Y.task),"onSubmit"in Y&&t(27,s=Y.onSubmit),"statusOptions"in Y&&t(1,a=Y.statusOptions),"allTasks"in Y&&t(2,o=Y.allTasks)},r.$$.update=()=>{if(r.$$.dirty[0]&2048){e:t(15,n=Y=>be?Y:null)}if(r.$$.dirty[0]&8){e:t(28,E=b.description.trim()!=="")}if(r.$$.dirty[0]&268437488){e:t(13,Pe=q&&H&&te&&G&&E&&R&&S&&F)}},[i,a,o,b,R,S,F,q,te,G,H,be,_,Pe,j,n,l,c,d,p,m,y,$,D,B,I,Z,s,E,h,g,T,f,w,O,M,A,v,x,N,re,le,fe,Ne,Ce,Mt,an,Wr]}var ah=class extends hr{constructor(e){super(),Xr(this,e,LI,FI,Qr,{task:0,onSubmit:27,statusOptions:1,allTasks:2},null,[-1,-1])}},xw=ah;var Kn=class extends Rw.Modal{constructor({app:t,task:n,onSubmit:i,allTasks:s}){super(t);this.task=n,this.allTasks=s,this.onSubmit=a=>{a.length&&i(a),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task"),this.modalEl.style.paddingBottom="0";let{contentEl:t}=this;this.contentEl.style.paddingBottom="0";let n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new xw({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit,allTasks:this.allTasks}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=De.getInstance().registeredStatuses;return De.getInstance().bySymbol(this.task.status.symbol)===ne.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};function UI(){let{setCreatedDate:r}=X();return r?window.moment():null}function WI(r){let{setCreatedDate:e}=X();if(!e||r.createdDate!==null)return!1;let t=r.description==="",n=!_e.getInstance().isEmpty(),i=!_e.getInstance().includedIn(r.description);return t||n&&i}var Tl=({line:r,path:e})=>{var p,m;let t=ae.parseTaskSignifiers(r,ft.fromUnknownPosition(new at(e)),yt.fromPath(e)),n=UI();if(t!==null)return WI(t)?new ae(he(K({},t),{createdDate:n})):t;let i=r.match(J.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new ae({status:ne.TODO,description:"",taskLocation:ft.fromUnknownPosition(new at(e)),indentation:"",listMarker:"-",priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,onCompletion:"",dependsOn:[],id:"",blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(p=i[2])!=null?p:"-",o=(m=i[4])!=null?m:" ",u=De.getInstance().bySymbolOrCreate(o),l=i[5],c=r.match(J.blockLinkRegex),d=c!==null?c[0]:"";return d!==""&&(l=l.replace(J.blockLinkRegex,"")),new ae({status:u,description:l,taskLocation:ft.fromUnknownPosition(new at(e)),indentation:s,listMarker:a,blockLink:d,priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,onCompletion:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1,id:"",dependsOn:[]})};var Mw=(r,e,t,n,i)=>{var p;if(r)return t instanceof oh.MarkdownView;if(!(t instanceof oh.MarkdownView))return;let s=(p=t.file)==null?void 0:p.path;if(s===void 0)return;let o=e.getCursor().line,u=e.getLine(o),l=Tl({line:u,path:s}),c=m=>{let y=yt.removeInferredStatusIfNeeded(l,m).map(_=>_.toFileLineString()).join(` +`);e.setLine(o,y)};new Kn({app:n,task:l,onSubmit:c,allTasks:i}).open()};var uh=require("obsidian");var Cw=(r,e,t)=>{var u;if(r)return t instanceof uh.MarkdownView;if(!(t instanceof uh.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let i=e.getCursor(),s=i.line,a=e.getLine(s),o=lh(a,n);e.setLine(s,o.text),e.setCursor(qI(i,o))},lh=(r,e)=>{let t=ae.fromLine({line:r,taskLocation:ft.fromUnknownPosition(new at(e)),fallbackDate:null});if(t!==null){let n=t.toggleWithRecurrenceInUsersOrder().map(i=>i.toFileLineString());return{text:n.join(` +`),moveTo:{line:n.length-1}}}else{let n=r.match(J.taskRegex);if(n!==null){let i=n[3],a=De.getInstance().bySymbol(i).nextStatusSymbol;return{text:r.replace(J.taskRegex,`$1- [${a}] $4`)}}else if(J.listItemRegex.test(r)){let i=r.replace(J.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=r.replace(J.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},qI=(r,e)=>{var s;let t={line:0,ch:r.ch},n=K(K({},t),(s=e.moveTo)!=null?s:{}),i=e.text.split(` `)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,i)}};var _l=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,n,i)=>Mw(t,n,i,this.app,this.plugin.getTasks())}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Cw})}};var Qn=class{constructor(){this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}};function Fi(r,e){let t=`Error: ${r}. The error message was: - `,n="";return e instanceof Error?n+=e:n+="Unknown error",`${t}"${n}"`}var qI=Object.prototype.toString,As=Array.isArray||function(e){return qI.call(e)==="[object Array]"};function dh(r){return typeof r=="function"}function $I(r){return As(r)?"array":typeof r}function ch(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Aw(r,e){return r!=null&&typeof r=="object"&&e in r}function jI(r,e){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(e)}var GI=RegExp.prototype.test;function YI(r,e){return GI.call(r,e)}var BI=/\S/;function HI(r){return!YI(BI,r)}var VI={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function zI(r){return String(r).replace(/[&<>"'`=\/]/g,function(t){return VI[t]})}var KI=/\s*/,QI=/\s+/,Pw=/\s*=/,XI=/\s*\}/,ZI=/#|\^|\/|>|\{|&|=|!/;function JI(r,e){if(!r)return[];var t=!1,n=[],i=[],s=[],a=!1,o=!1,u="",l=0;function c(){if(a&&!o)for(;s.length;)delete i[s.pop()];else s=[];a=!1,o=!1}var d,p,m;function y(H){if(typeof H=="string"&&(H=H.split(QI,2)),!As(H)||H.length!==2)throw new Error("Invalid tags: "+H);d=new RegExp(ch(H[0])+"\\s*"),p=new RegExp("\\s*"+ch(H[1])),m=new RegExp("\\s*"+ch("}"+H[1]))}y(e||Tr.tags);for(var _=new Po(r),b,E,R,S,F,q;!_.eos();){if(b=_.pos,R=_.scanUntil(d),R)for(var te=0,G=R.length;te"?F=[E,R,b,_.pos,u,l,t]:F=[E,R,b,_.pos],l++,i.push(F),E==="#"||E==="^")n.push(F);else if(E==="/"){if(q=n.pop(),!q)throw new Error('Unopened section "'+R+'" at '+b);if(q[1]!==R)throw new Error('Unclosed section "'+q[1]+'" at '+b)}else E==="name"||E==="{"||E==="&"?o=!0:E==="="&&y(R)}if(c(),q=n.pop(),q)throw new Error('Unclosed section "'+q[1]+'" at '+_.pos);return tF(eF(i))}function eF(r){for(var e=[],t,n,i=0,s=r.length;i0?n[n.length-1][4]:e;break;default:t.push(i)}return e}function Po(r){this.string=r,this.tail=r,this.pos=0}Po.prototype.eos=function(){return this.tail===""};Po.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};Po.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function Cs(r,e){this.view=r,this.cache={".":this.view},this.parent=e}Cs.prototype.push=function(e){return new Cs(e,this)};Cs.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var i=this,s,a,o,u=!1;i;){if(e.indexOf(".")>0)for(s=i.view,a=e.split("."),o=0;s!=null&&o"?l=this.renderPartial(o,t,n,s):u==="&"?l=this.unescapedValue(o,t):u==="name"?l=this.escapedValue(o,t,s):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};xt.prototype.renderSection=function(e,t,n,i,s){var a=this,o="",u=t.lookup(e[1]);function l(p){return a.render(p,t,n,s)}if(!!u){if(As(u))for(var c=0,d=u.length;c":">",'"':""","'":"'","/":"/","`":"`","=":"="};function KI(r){return String(r).replace(/[&<>"'`=\/]/g,function(t){return zI[t]})}var QI=/\s*/,XI=/\s+/,Pw=/\s*=/,ZI=/\s*\}/,JI=/#|\^|\/|>|\{|&|=|!/;function eF(r,e){if(!r)return[];var t=!1,n=[],i=[],s=[],a=!1,o=!1,u="",l=0;function c(){if(a&&!o)for(;s.length;)delete i[s.pop()];else s=[];a=!1,o=!1}var d,p,m;function y(H){if(typeof H=="string"&&(H=H.split(XI,2)),!As(H)||H.length!==2)throw new Error("Invalid tags: "+H);d=new RegExp(ch(H[0])+"\\s*"),p=new RegExp("\\s*"+ch(H[1])),m=new RegExp("\\s*"+ch("}"+H[1]))}y(e||Tr.tags);for(var _=new Po(r),b,E,R,S,F,q;!_.eos();){if(b=_.pos,R=_.scanUntil(d),R)for(var te=0,G=R.length;te"?F=[E,R,b,_.pos,u,l,t]:F=[E,R,b,_.pos],l++,i.push(F),E==="#"||E==="^")n.push(F);else if(E==="/"){if(q=n.pop(),!q)throw new Error('Unopened section "'+R+'" at '+b);if(q[1]!==R)throw new Error('Unclosed section "'+q[1]+'" at '+b)}else E==="name"||E==="{"||E==="&"?o=!0:E==="="&&y(R)}if(c(),q=n.pop(),q)throw new Error('Unclosed section "'+q[1]+'" at '+_.pos);return rF(tF(i))}function tF(r){for(var e=[],t,n,i=0,s=r.length;i0?n[n.length-1][4]:e;break;default:t.push(i)}return e}function Po(r){this.string=r,this.tail=r,this.pos=0}Po.prototype.eos=function(){return this.tail===""};Po.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};Po.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function Cs(r,e){this.view=r,this.cache={".":this.view},this.parent=e}Cs.prototype.push=function(e){return new Cs(e,this)};Cs.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var i=this,s,a,o,u=!1;i;){if(e.indexOf(".")>0)for(s=i.view,a=e.split("."),o=0;s!=null&&o"?l=this.renderPartial(o,t,n,s):u==="&"?l=this.unescapedValue(o,t):u==="name"?l=this.escapedValue(o,t,s):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};xt.prototype.renderSection=function(e,t,n,i,s){var a=this,o="",u=t.lookup(e[1]);function l(p){return a.render(p,t,n,s)}if(!!u){if(As(u))for(var c=0,d=u.length;c0||!n)&&(s[a]=i+s[a]);return s.join(` -`)};xt.prototype.renderPartial=function(e,t,n,i){if(!!n){var s=this.getConfigTags(i),a=dh(n)?n(e[1]):n[e[1]];if(a!=null){var o=e[6],u=e[5],l=e[4],c=a;u==0&&l&&(c=this.indentPartial(a,l,o));var d=this.parse(c,s);return this.renderTokens(d,t,n,c,i)}}};xt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};xt.prototype.escapedValue=function(e,t,n){var i=this.getConfigEscape(n)||Tr.escape,s=t.lookup(e[1]);if(s!=null)return typeof s=="number"&&i===Tr.escape?String(s):i(s)};xt.prototype.rawValue=function(e){return e[1]};xt.prototype.getConfigTags=function(e){return As(e)?e:e&&typeof e=="object"?e.tags:void 0};xt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!As(e))return e.escape};var Tr={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(r){Ao.templateCache=r},get templateCache(){return Ao.templateCache}},Ao=new xt;Tr.clearCache=function(){return Ao.clearCache()};Tr.parse=function(e,t){return Ao.parse(e,t)};Tr.render=function(e,t,n,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+$I(e)+'" was given as the first argument for mustache#render(template, view, partials)');return Ao.render(e,t,n,i)};Tr.escape=zI;Tr.Scanner=Po;Tr.Context=Cs;Tr.Writer=xt;var fh=Tr;var Uw=oa(Lw());function Ww(r,e){fh.escape=function(t){return t};try{return fh.render(r,(0,Uw.default)(e))}catch(t){let n="";throw t instanceof Error?n=`There was an error expanding one or more placeholders. +`)};xt.prototype.renderPartial=function(e,t,n,i){if(!!n){var s=this.getConfigTags(i),a=dh(n)?n(e[1]):n[e[1]];if(a!=null){var o=e[6],u=e[5],l=e[4],c=a;u==0&&l&&(c=this.indentPartial(a,l,o));var d=this.parse(c,s);return this.renderTokens(d,t,n,c,i)}}};xt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};xt.prototype.escapedValue=function(e,t,n){var i=this.getConfigEscape(n)||Tr.escape,s=t.lookup(e[1]);if(s!=null)return typeof s=="number"&&i===Tr.escape?String(s):i(s)};xt.prototype.rawValue=function(e){return e[1]};xt.prototype.getConfigTags=function(e){return As(e)?e:e&&typeof e=="object"?e.tags:void 0};xt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!As(e))return e.escape};var Tr={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(r){Ao.templateCache=r},get templateCache(){return Ao.templateCache}},Ao=new xt;Tr.clearCache=function(){return Ao.clearCache()};Tr.parse=function(e,t){return Ao.parse(e,t)};Tr.render=function(e,t,n,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+jI(e)+'" was given as the first argument for mustache#render(template, view, partials)');return Ao.render(e,t,n,i)};Tr.escape=KI;Tr.Scanner=Po;Tr.Context=Cs;Tr.Writer=xt;var fh=Tr;var Uw=oa(Lw());function Ww(r,e){fh.escape=function(t){return t};try{return fh.render(r,(0,Uw.default)(e))}catch(t){let n="";throw t instanceof Error?n=`There was an error expanding one or more placeholders. The error message was: ${t.message.replace(/ > /g,".").replace("Missing Mustache data property","Unknown property")}`:n="Unknown error expanding placeholders.",n+=` @@ -240,7 +240,7 @@ to find them literally, you must add a \ before them: CAUTION! Regular expression (or 'regex') searching is a powerful but advanced feature that requires thorough knowledge in order to use successfully, and not miss intended search results. -`}explanation(t){let i=rF(t,"using regex: ",this.regexAsString());return new Se(i)}regexAsString(){let t=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:t+="no flags";break;case 1:t+=`flag '${this.regex.flags}'`;break;default:t+=`flags '${this.regex.flags}'`;break}return t}};function rF(r,e,t){var o;let n=r.match(/\//);if(!n)return"Error explaining instruction. Could not find a slash character";let i=2,s=((o=n.index)!=null?o:i)-i;return`${e.padEnd(s)}${t}`}var Ir=class{constructor(e,t,n,i){this.instruction=e,this.property=t,this.comparator=Ir.maybeReverse(i,n)}static maybeReverse(e,t){return e?Ir.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n,i)=>e(t,n,i)*-1}};var Zn=class{constructor(e,t,n,i){this.instruction=e,this.property=t,this.grouper=n,this.reverse=i}};var Ee=class{canCreateFilterForLine(e){return Ee.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return Hn(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=Ee.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(e){let t=`sort by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new Ir(this.sorterInstruction(e),this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(e){if(!this.supportsGrouping())return null;let t=Ee.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(e){return new Zn(this.grouperInstruction(e),this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var An=class{constructor(e,t){this._rawInstruction=e,this._anyContinuationLinesRemoved=t.trim(),this._anyPlaceholdersExpanded=this._anyContinuationLinesRemoved}recordExpandedPlaceholders(e){this._anyPlaceholdersExpanded=e}get rawInstruction(){return this._rawInstruction}get anyContinuationLinesRemoved(){return this._anyContinuationLinesRemoved}get anyPlaceholdersExpanded(){return this._anyPlaceholdersExpanded}explainStatement(e){function t(a,o){o!==a&&(s+=` => +`}explanation(t){let i=nF(t,"using regex: ",this.regexAsString());return new Se(i)}regexAsString(){let t=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:t+="no flags";break;case 1:t+=`flag '${this.regex.flags}'`;break;default:t+=`flags '${this.regex.flags}'`;break}return t}};function nF(r,e,t){var o;let n=r.match(/\//);if(!n)return"Error explaining instruction. Could not find a slash character";let i=2,s=((o=n.index)!=null?o:i)-i;return`${e.padEnd(s)}${t}`}var Ir=class{constructor(e,t,n,i){this.instruction=e,this.property=t,this.comparator=Ir.maybeReverse(i,n)}static maybeReverse(e,t){return e?Ir.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n,i)=>e(t,n,i)*-1}};var Zn=class{constructor(e,t,n,i){this.instruction=e,this.property=t,this.grouper=n,this.reverse=i}};var Ee=class{canCreateFilterForLine(e){return Ee.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return Hn(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=Ee.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(e){let t=`sort by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new Ir(this.sorterInstruction(e),this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(e){if(!this.supportsGrouping())return null;let t=Ee.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(e){return new Zn(this.grouperInstruction(e),this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var An=class{constructor(e,t){this._rawInstruction=e,this._anyContinuationLinesRemoved=t.trim(),this._anyPlaceholdersExpanded=this._anyContinuationLinesRemoved}recordExpandedPlaceholders(e){this._anyPlaceholdersExpanded=e}get rawInstruction(){return this._rawInstruction}get anyContinuationLinesRemoved(){return this._anyContinuationLinesRemoved}get anyPlaceholdersExpanded(){return this._anyPlaceholdersExpanded}explainStatement(e){function t(a,o){o!==a&&(s+=` => ${e}${o}`)}let n=this._rawInstruction.trim(),i=n.split(` `).join(` `+e),s=`${e}${i}`;return this._rawInstruction.includes(` @@ -263,7 +263,7 @@ Possible causes: instead of in to a template file. See: https://publish.obsidian.md/tasks/Advanced/Instruction+contains+unexpanded+template+text -`}};var wl=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(e){return this.canCreateFilterForLine(e)?ie.fromFilter(new bt(e,this._filter,new Se(e))):ie.fromError(e,`do not understand filter: ${e}`)}};var qt=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new wl(e,t))}canCreateFilterForLine(e){return this._filters.some(t=>t.canCreateFilterForLine(e))}createFilterOrErrorMessage(e){for(let t of this._filters){let n=t.createFilterOrErrorMessage(e);if(n.isValid())return n}return ie.fromError(e,`do not understand filter: ${e}`)}};var st=class extends Ee{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new qt,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let i=this.date(n);return i!==null&&!i.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){var p;let n=this.checkForUnexpandedTemplateText(t);if(n)return ie.fromError(t,n);let i=this.filterInstructions.createFilterOrErrorMessage(t);if(i.isValid())return i;let s=Ee.getMatch(this.filterRegExp(),t);if(s===null)return ie.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let a=s[1],o=(p=s[2])==null?void 0:p.toLowerCase(),u=s[3],l=Ht.parseDateRange(u);if(!l.isValid()){let m=Ht.parseDate(a);m.isValid()&&(l=new kt(m,m))}if(!l.isValid())return ie.fromError(t,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,l),d=st.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);return ie.fromFilter(new bt(t,c,d))}buildFilterFunction(t,n){let i;switch(t){case"before":i=s=>s?s.isBefore(n.start):this.filterResultIfFieldMissing();break;case"after":i=s=>s?s.isAfter(n.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":i=s=>s?s.isSameOrBefore(n.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":i=s=>s?s.isSameOrAfter(n.start):this.filterResultIfFieldMissing();break;default:i=s=>s?s.isSameOrAfter(n.start)&&s.isSameOrBefore(n.end):this.filterResultIfFieldMissing()}return this.getFilter(i)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`,"i")}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,i,s){let a=n,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":case"on or after":u=s.start.format(o);break;case"after":case"on or before":u=s.end.format(o);break;case"in or before":a="on or before",u=s.end.format(o);break;case"in or after":a="on or after",u=s.start.format(o);break;default:if(!s.start.isSame(s.end)){let c=`${t} date is between:`,d=[new Se(`${s.start.format(o)} and`),new Se(`${s.end.format(o)} inclusive`)];return i&&d.push(new Se(`OR no ${t} date`)),new Se(c,d)}a="on",u=s.start.format(o);break}let l=`${t} date is ${a} ${u}`;return i&&(l+=` OR no ${t} date`),new Se(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>dr(this.date(t),this.date(n))}supportsGrouping(){return!0}grouper(){return t=>{let n=this.date(t);return n===null?["No "+this.fieldName()+" date"]:n.isValid()?[n.format("YYYY-MM-DD dddd")]:["%%0%% Invalid "+this.fieldName()+" date"]}}checkForUnexpandedTemplateText(t){return new vl().findUnexpandedDateText(t)}};var kl=class extends st{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var El=class extends st{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Fs=class extends st{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var en=class extends Ee{constructor(){super(...arguments);this._filters=new qt}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var Sl=class extends en{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};var No=class extends Jr{};function hh(r,e){let t=r.map(([n])=>n);try{let n=e.includes("return")?e:`return ${e}`,i=e&&new Function(...t,n);return i instanceof Function?No.fromObject(e,i):No.fromError(e,"Error parsing group function")}catch(n){return No.fromError(e,Fi(`Failed parsing expression "${e}"`,n))}}function gh(r,e){let t=e.map(([n,i])=>i);return r(...t)}function yh(r,e,t){try{return gh(r,e)}catch(n){return Fi(`Failed calculating expression "${t}"`,n)}}function Ol(r,e){return[["task",r],["query",e?e.query:null]]}function $w(r,e,t){let n=Ol(r,t||null),i=hh(n,e);return i.error?i.error:yh(i.queryComponent,n,e)}var Io=class{constructor(e){this.line=e,this.functionOrError=hh(Ol(null,null),e)}isValid(){return this.functionOrError.isValid()}get parseError(){return this.functionOrError.error}evaluate(e,t){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return gh(this.functionOrError.queryComponent,Ol(e,t||null))}evaluateOrCatch(e,t){return this.isValid()?yh(this.functionOrError.queryComponent,Ol(e,t),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};function bh(r){if(r===null)return"null";let e=typeof r;return e==="object"?r.constructor.name:e}var Dl=class extends Ee{createFilterOrErrorMessage(e){let t=Ee.getMatch(this.filterRegExp(),e);if(t===null)return ie.fromError(e,"Unable to parse line");let n=t[1],i=new Io(n);return i.isValid()?ie.fromFilter(new bt(e,nF(i),new Se(e))):ie.fromError(e,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`,"i")}supportsSorting(){return!0}sorterRegExp(){return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}createSorterFromLine(e){let t=Ee.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1],i=t[2],s=new Io(i);if(!s.isValid())throw new Error(s.parseError);let a=(o,u,l)=>{try{let c=l.queryContext(),d=this.validateTaskSortKey(s.evaluate(o,c)),p=this.validateTaskSortKey(s.evaluate(u,c));return this.compareTaskSortKeys(d,p)}catch(c){throw c instanceof Error&&(c.message+=`: while evaluating instruction '${e}'`),c}};return new Ir(e,this.fieldNameSingular(),a,n)}validateTaskSortKey(e){function t(n){throw new Error(`"${n}" is not a valid sort key`)}return e===void 0&&t("undefined"),Number.isNaN(e)&&t("NaN (Not a Number)"),Array.isArray(e)&&t("array"),e}compareTaskSortKeys(e,t){let n=bh(e),i=bh(t),s=this.compareTaskSortKeysIfOptionalMoment(e,t,n,i);if(s!==void 0)return s;let a=this.compareTaskSortKeysIfEitherIsNull(e,t);if(a!==void 0)return a;if(n!==i)throw new Error(`Unable to compare two different sort key types '${n}' and '${i}' order`);if(n==="string")return e.localeCompare(t,void 0,{numeric:!0});if(n==="TasksDate")return dr(e.moment,t.moment);if(n==="boolean")return Number(t)-Number(e);let o=Number(e)-Number(t);if(isNaN(o))throw new Error(`Unable to determine sort order for sort key types '${n}' and '${i}'`);return o}compareTaskSortKeysIfOptionalMoment(e,t,n,i){let s=n==="Moment",a=i==="Moment";if(s&&a||s&&t===null||a&&e===null)return dr(e,t)}compareTaskSortKeysIfEitherIsNull(e,t){if(e===null&&t===null)return 0;if(e===null&&t!==null)return-1;if(e!==null&&t===null)return 1}supportsGrouping(){return!0}createGrouperFromLine(e){let t=Ee.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1],i=t[2];return new Zn(e,"function",sF(i),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function nF(r){return(e,t)=>{let n=t.queryContext();return iF(r,e,n)}}function iF(r,e,t){let n=r.evaluate(e,t);if(typeof n=="boolean")return n;throw Error(`filtering function must return true or false. This returned "${n}".`)}function sF(r){return(e,t)=>{let n=t.queryContext();return aF(e,r,n)}}function aF(r,e,t){try{let n=$w(r,e,t);return Array.isArray(n)?n.map(s=>s.toString()):n===null?[]:[n.toString()]}catch(n){let i=`Error: Failed calculating expression "${e}". The error message was: `;return n instanceof Error?[i+n.message]:[i+"Unknown error"]}}var xl=class extends Ie{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}};var Ls=class extends Ie{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[Ie.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var Th=class extends Ee{createFilterOrErrorMessage(e){var n;let t=Ee.getMatch(this.filterRegExp(),e);if(t!==null){let i=t[5],s=null;switch(i.toLowerCase()){case"lowest":s="5";break;case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break;case"highest":s="0";break}if(s===null)return ie.fromError(e,"do not understand priority");let a=e,o;switch((n=t[3])==null?void 0:n.toLowerCase()){case"above":o=u=>u.priority.localeCompare(s)<0;break;case"below":o=u=>u.priority.localeCompare(s)>0;break;case"not":o=u=>u.priority!==s;break;default:o=u=>u.priority===s,a=`${this.fieldName()} is ${i}`}return ie.fromFilter(new bt(e,o,new Se(a)))}else return ie.fromError(e,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return Th.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>[e.priorityNameGroupText]}},Ui=Th;Ui.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/i;var Rl=class extends st{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var Ml=class extends st{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Cl=class extends st{constructor(){let e=new qt;e.add("has happens date",t=>this.dates(t).some(n=>n!==null)),e.add("no happens date",t=>!this.dates(t).some(n=>n!==null)),super(e)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(e){return this.earliestDate(e)}dates(e){return e.happensDates}earliestDate(e){return e.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var Al=class extends en{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(e,t)=>e.recurrence!==null&&t.recurrence===null?-1:e.recurrence===null&&t.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?["Recurring"]:["Not Recurring"]}};var Jn=class extends en{constructor(){super(),this._filters.add("done",e=>e.isDone),this._filters.add("not done",e=>!e.isDone)}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Jn.oldStatusName(e),i=Jn.oldStatusName(t);return ni?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[Jn.oldStatusName(e)]}};var Pl=class extends Ie{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let i=e.matchesAnyOf(this.values(n));return t?!i:i}}createGrouper(e){return new Zn(this.grouperInstruction(e),this.fieldNamePlural(),this.grouper(),e)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNamePlural()}`;return e&&(t+=" reverse"),t}};var Wi=class extends Pl{constructor(){super();this.filterInstructions=new qt,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.isValid()?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let i=!!n[1],s=isNaN(+n[2])?1:+n[2],a=Wi.makeCompareByTagComparator(s);return new Ir(t,this.fieldNameSingular(),a,i)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/i}comparator(){return Wi.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,i)=>{if(n.tags.length===0&&i.tags.length===0)return 0;if(n.tags.length===0)return 1;if(i.tags.length===0)return-1;let s=t-1;if(n.tags.length=t)return 1;if(i.tags.length=t)return-1;if(n.tags.lengtht.tags.length==0?["(No tags)"]:t.tags}};var tk=oa(ek());function ei(r){return new RegExp("["+Hn(r)+"]").source}var Rh=[["(",")"],["[","]"],["{","}"],['"','"']],Pn=class{constructor(e,t,n){this.openFilterChars=e,this.closeFilterChars=t,this.openAndCloseFilterChars=n,this.openFilter=ei(this.openFilterChars),this.closeFilter=ei(this.closeFilterChars)}static allSupportedDelimiters(){let e="",t="",n="";for(let[i,s]of Rh)e+=i,t+=s,n+=Pn.openAndClosing(i,s);return new Pn(e,t,n)}static fromInstructionLine(e){let t=e.trim(),i=/^[A-Z ]*\s*(.*)/.exec(t);if(i){let a=i[1],o=a[0],u=a.slice(-1);for(let[l,c]of Rh)if(o===l&&u===c){let d=this.openAndClosing(l,c);return new Pn(l,c,d)}}let s="All filters in a Boolean instruction must be inside one of these pairs of delimiter characters: "+Rh.map(([a,o])=>a+"..."+o).join(" or ")+". Combinations of those delimiters are no longer supported.";throw new Error(s)}static openAndClosing(e,t){let n=e;return t!=e&&(n+=t),n}};var ti=class{static preprocessExpression(e,t){let n=ti.splitLine(e,t);return ti.getFiltersAndSimplifiedLine(n,t)}static splitLine(e,t){let n=new RegExp("("+t.closeFilter+"\\s*(?:AND|OR|AND +NOT|OR +NOT|XOR)\\s*"+t.openFilter+")"),i=e.split(n),s=new RegExp("(NOT\\s*"+t.openFilter+")"),a=i.flatMap(l=>l.split(s)).filter(l=>l!==""),o=new RegExp("(^"+ei(t.openFilterChars+" ")+"*)"),u=new RegExp("("+ei(t.closeFilterChars+" ")+"*$)");return a.flatMap(l=>l.split(o)).flatMap(l=>l.split(u)).filter(l=>l!=="")}static getFiltersAndSimplifiedLine(e,t){let n="",i=1,s={};e.forEach(l=>{if(!ti.isAFilter(l,t))n+=`${l}`;else{let c=`f${i}`;s[c]=l,n+=c,i++}});let a=new RegExp(`(${t.closeFilter})([A-Z])`,"g");n=n.replace(a,"$1 $2");let o=new RegExp(`([A-Z])(${t.openFilter})`,"g");n=n.replace(o,"$1 $2");let u=t.openFilterChars;if(u!='"'&&u!="("){let l=new RegExp(ei(u),"g");n=n.replace(l,"(");let c=t.closeFilterChars,d=new RegExp(ei(c),"g");n=n.replace(d,")")}return{simplifiedLine:n,filters:s}}static isAFilter(e,t){let n=new RegExp("^"+ei(" "+t.openAndCloseFilterChars)+"+$"),i=new RegExp("^ *"+t.closeFilter+" *(AND|OR|XOR) *"+t.openFilter+" *$"),s=new RegExp("^(AND|OR|XOR|NOT) *"+t.openFilter+"$"),a=new RegExp("^"+t.closeFilter+" *(AND|OR|XOR)$");return![n,i,s,a,/^(AND|OR|XOR|NOT)$/].some(u=>RegExp(u).exec(e))}};var Ul=class extends Ee{constructor(){super();this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={};let t=Pn.allSupportedDelimiters();this.basicBooleanRegexp=new RegExp("(.*(AND|OR|XOR|NOT)\\s*"+t.openFilter+".*|"+t.openFilter+".+"+t.closeFilter+")","g")}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){if(t.length===0)return ie.fromError(t,"empty line");let n;try{n=Pn.fromInstructionLine(t)}catch(o){let u=o instanceof Error?o.message:"unknown error type";return ie.fromError(t,this.helpMessageFromSimpleError(t,u))}let i=ti.preprocessExpression(t,n),s=i.simplifiedLine,a=i.filters;try{let o=(0,tk.parse)(s);for(let c of o)if(c.name==="IDENTIFIER"&&c.value){let d=c.value.trim(),p=a[d];if(c.value=p,!(p in this.subFields)){let m=Lo(p);if(m===null)return this.helpMessage(t,`couldn't parse sub-expression '${p}'`,i);if(m.error)return this.helpMessage(t,`couldn't parse sub-expression '${p}': ${m.error}`,i);m.filter&&(this.subFields[p]=m.filter)}}else if(c.name==="OPERATOR"){if(c.value==null)return this.helpMessage(t,"empty operator in boolean query",i);if(!this.supportedOperators.includes(c.value))return this.helpMessage(t,`unknown boolean operator '${c.value}'`,i)}let u=(c,d)=>this.filterTaskWithParsedQuery(c,o,d),l=this.constructExplanation(o);return ie.fromFilter(new bt(t,u,l))}catch(o){let u=o instanceof Error?o.message:"unknown error type";return this.helpMessage(t,`malformed boolean query -- ${u} (check the documentation for guidelines)`,i)}}filterTaskWithParsedQuery(t,n,i){let s=u=>u==="true",a=u=>u?"true":"false",o=[];for(let u of n)if(u.name==="IDENTIFIER"){if(u.value==null)throw Error("null token value");let c=this.subFields[u.value.trim()].filterFunction(t,i);o.push(a(c))}else if(u.name==="OPERATOR")if(u.value==="NOT"){let l=s(o.pop());o.push(a(!l))}else if(u.value==="OR"){let l=s(o.pop()),c=s(o.pop());o.push(a(l||c))}else if(u.value==="AND"){let l=s(o.pop()),c=s(o.pop());o.push(a(l&&c))}else if(u.value==="XOR"){let l=s(o.pop()),c=s(o.pop());o.push(a(l&&!c||!l&&c))}else throw Error("Unsupported operator: "+u.value);else throw Error("Unsupported token type: "+u);return s(o[0])}constructExplanation(t){let n=[];for(let i of t)if(i.name==="IDENTIFIER")this.explainExpression(i,n);else if(i.name==="OPERATOR")this.explainOperator(i,n);else throw Error("Unsupported token type: "+i.name);return n[0]}explainExpression(t,n){if(t.value==null)throw Error("null token value");let i=this.subFields[t.value.trim()],s=this.simulateExplainFilter(i);n.push(s)}simulateExplainFilter(t){return t.simulateExplainFilter()}explainOperator(t,n){if(t.value==="NOT"){let i=n.pop();n.push(Se.booleanNot([i]))}else if(t.value==="OR"){let i=n.pop(),s=n.pop();n.push(Se.booleanOr([s,i]))}else if(t.value==="AND"){let i=n.pop(),s=n.pop();n.push(Se.booleanAnd([s,i]))}else if(t.value==="XOR"){let i=n.pop(),s=n.pop();n.push(Se.booleanXor([s,i]))}else throw Error("Unsupported operator: "+t.value)}helpMessage(t,n,i){let s=i.filters,a=this.stringifySubExpressionsForErrorMessage(s),u=`${this.helpMessageFromSimpleError(t,n)} +`}};var wl=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(e){return this.canCreateFilterForLine(e)?ie.fromFilter(new bt(e,this._filter,new Se(e))):ie.fromError(e,`do not understand filter: ${e}`)}};var qt=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new wl(e,t))}canCreateFilterForLine(e){return this._filters.some(t=>t.canCreateFilterForLine(e))}createFilterOrErrorMessage(e){for(let t of this._filters){let n=t.createFilterOrErrorMessage(e);if(n.isValid())return n}return ie.fromError(e,`do not understand filter: ${e}`)}};var st=class extends Ee{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new qt,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let i=this.date(n);return i!==null&&!i.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){var p;let n=this.checkForUnexpandedTemplateText(t);if(n)return ie.fromError(t,n);let i=this.filterInstructions.createFilterOrErrorMessage(t);if(i.isValid())return i;let s=Ee.getMatch(this.filterRegExp(),t);if(s===null)return ie.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let a=s[1],o=(p=s[2])==null?void 0:p.toLowerCase(),u=s[3],l=Ht.parseDateRange(u);if(!l.isValid()){let m=Ht.parseDate(a);m.isValid()&&(l=new kt(m,m))}if(!l.isValid())return ie.fromError(t,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,l),d=st.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);return ie.fromFilter(new bt(t,c,d))}buildFilterFunction(t,n){let i;switch(t){case"before":i=s=>s?s.isBefore(n.start):this.filterResultIfFieldMissing();break;case"after":i=s=>s?s.isAfter(n.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":i=s=>s?s.isSameOrBefore(n.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":i=s=>s?s.isSameOrAfter(n.start):this.filterResultIfFieldMissing();break;default:i=s=>s?s.isSameOrAfter(n.start)&&s.isSameOrBefore(n.end):this.filterResultIfFieldMissing()}return this.getFilter(i)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`,"i")}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,i,s){let a=n,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":case"on or after":u=s.start.format(o);break;case"after":case"on or before":u=s.end.format(o);break;case"in or before":a="on or before",u=s.end.format(o);break;case"in or after":a="on or after",u=s.start.format(o);break;default:if(!s.start.isSame(s.end)){let c=`${t} date is between:`,d=[new Se(`${s.start.format(o)} and`),new Se(`${s.end.format(o)} inclusive`)];return i&&d.push(new Se(`OR no ${t} date`)),new Se(c,d)}a="on",u=s.start.format(o);break}let l=`${t} date is ${a} ${u}`;return i&&(l+=` OR no ${t} date`),new Se(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>dr(this.date(t),this.date(n))}supportsGrouping(){return!0}grouper(){return t=>{let n=this.date(t);return n===null?["No "+this.fieldName()+" date"]:n.isValid()?[n.format("YYYY-MM-DD dddd")]:["%%0%% Invalid "+this.fieldName()+" date"]}}checkForUnexpandedTemplateText(t){return new vl().findUnexpandedDateText(t)}};var kl=class extends st{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var El=class extends st{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Fs=class extends st{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var en=class extends Ee{constructor(){super(...arguments);this._filters=new qt}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var Sl=class extends en{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};var No=class extends Jr{};function hh(r,e){let t=r.map(([n])=>n);try{let n=e.includes("return")?e:`return ${e}`,i=e&&new Function(...t,n);return i instanceof Function?No.fromObject(e,i):No.fromError(e,"Error parsing group function")}catch(n){return No.fromError(e,Fi(`Failed parsing expression "${e}"`,n))}}function gh(r,e){let t=e.map(([n,i])=>i);return r(...t)}function yh(r,e,t){try{return gh(r,e)}catch(n){return Fi(`Failed calculating expression "${t}"`,n)}}function Ol(r,e){return[["task",r],["query",e?e.query:null]]}function $w(r,e,t){let n=Ol(r,t||null),i=hh(n,e);return i.error?i.error:yh(i.queryComponent,n,e)}var Io=class{constructor(e){this.line=e,this.functionOrError=hh(Ol(null,null),e)}isValid(){return this.functionOrError.isValid()}get parseError(){return this.functionOrError.error}evaluate(e,t){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return gh(this.functionOrError.queryComponent,Ol(e,t||null))}evaluateOrCatch(e,t){return this.isValid()?yh(this.functionOrError.queryComponent,Ol(e,t),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};function bh(r){if(r===null)return"null";let e=typeof r;return e==="object"?r.constructor.name:e}var Dl=class extends Ee{createFilterOrErrorMessage(e){let t=Ee.getMatch(this.filterRegExp(),e);if(t===null)return ie.fromError(e,"Unable to parse line");let n=t[1],i=new Io(n);return i.isValid()?ie.fromFilter(new bt(e,iF(i),new Se(e))):ie.fromError(e,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`,"i")}supportsSorting(){return!0}sorterRegExp(){return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}createSorterFromLine(e){let t=Ee.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1],i=t[2],s=new Io(i);if(!s.isValid())throw new Error(s.parseError);let a=(o,u,l)=>{try{let c=l.queryContext(),d=this.validateTaskSortKey(s.evaluate(o,c)),p=this.validateTaskSortKey(s.evaluate(u,c));return this.compareTaskSortKeys(d,p)}catch(c){throw c instanceof Error&&(c.message+=`: while evaluating instruction '${e}'`),c}};return new Ir(e,this.fieldNameSingular(),a,n)}validateTaskSortKey(e){function t(n){throw new Error(`"${n}" is not a valid sort key`)}return e===void 0&&t("undefined"),Number.isNaN(e)&&t("NaN (Not a Number)"),Array.isArray(e)&&t("array"),e}compareTaskSortKeys(e,t){let n=bh(e),i=bh(t),s=this.compareTaskSortKeysIfOptionalMoment(e,t,n,i);if(s!==void 0)return s;let a=this.compareTaskSortKeysIfEitherIsNull(e,t);if(a!==void 0)return a;if(n!==i)throw new Error(`Unable to compare two different sort key types '${n}' and '${i}' order`);if(n==="string")return e.localeCompare(t,void 0,{numeric:!0});if(n==="TasksDate")return dr(e.moment,t.moment);if(n==="boolean")return Number(t)-Number(e);let o=Number(e)-Number(t);if(isNaN(o))throw new Error(`Unable to determine sort order for sort key types '${n}' and '${i}'`);return o}compareTaskSortKeysIfOptionalMoment(e,t,n,i){let s=n==="Moment",a=i==="Moment";if(s&&a||s&&t===null||a&&e===null)return dr(e,t)}compareTaskSortKeysIfEitherIsNull(e,t){if(e===null&&t===null)return 0;if(e===null&&t!==null)return-1;if(e!==null&&t===null)return 1}supportsGrouping(){return!0}createGrouperFromLine(e){let t=Ee.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1],i=t[2];return new Zn(e,"function",aF(i),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function iF(r){return(e,t)=>{let n=t.queryContext();return sF(r,e,n)}}function sF(r,e,t){let n=r.evaluate(e,t);if(typeof n=="boolean")return n;throw Error(`filtering function must return true or false. This returned "${n}".`)}function aF(r){return(e,t)=>{let n=t.queryContext();return oF(e,r,n)}}function oF(r,e,t){try{let n=$w(r,e,t);return Array.isArray(n)?n.map(s=>s.toString()):n===null?[]:[n.toString()]}catch(n){let i=`Error: Failed calculating expression "${e}". The error message was: `;return n instanceof Error?[i+n.message]:[i+"Unknown error"]}}var xl=class extends Ie{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}};var Ls=class extends Ie{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[Ie.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var Th=class extends Ee{createFilterOrErrorMessage(e){var n;let t=Ee.getMatch(this.filterRegExp(),e);if(t!==null){let i=t[5],s=null;switch(i.toLowerCase()){case"lowest":s="5";break;case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break;case"highest":s="0";break}if(s===null)return ie.fromError(e,"do not understand priority");let a=e,o;switch((n=t[3])==null?void 0:n.toLowerCase()){case"above":o=u=>u.priority.localeCompare(s)<0;break;case"below":o=u=>u.priority.localeCompare(s)>0;break;case"not":o=u=>u.priority!==s;break;default:o=u=>u.priority===s,a=`${this.fieldName()} is ${i}`}return ie.fromFilter(new bt(e,o,new Se(a)))}else return ie.fromError(e,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return Th.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>[e.priorityNameGroupText]}},Ui=Th;Ui.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/i;var Rl=class extends st{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var Ml=class extends st{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Cl=class extends st{constructor(){let e=new qt;e.add("has happens date",t=>this.dates(t).some(n=>n!==null)),e.add("no happens date",t=>!this.dates(t).some(n=>n!==null)),super(e)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(e){return this.earliestDate(e)}dates(e){return e.happensDates}earliestDate(e){return e.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var Al=class extends en{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(e,t)=>e.recurrence!==null&&t.recurrence===null?-1:e.recurrence===null&&t.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?["Recurring"]:["Not Recurring"]}};var Jn=class extends en{constructor(){super(),this._filters.add("done",e=>e.isDone),this._filters.add("not done",e=>!e.isDone)}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Jn.oldStatusName(e),i=Jn.oldStatusName(t);return ni?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[Jn.oldStatusName(e)]}};var Pl=class extends Ie{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let i=e.matchesAnyOf(this.values(n));return t?!i:i}}createGrouper(e){return new Zn(this.grouperInstruction(e),this.fieldNamePlural(),this.grouper(),e)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNamePlural()}`;return e&&(t+=" reverse"),t}};var Wi=class extends Pl{constructor(){super();this.filterInstructions=new qt,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.isValid()?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let i=!!n[1],s=isNaN(+n[2])?1:+n[2],a=Wi.makeCompareByTagComparator(s);return new Ir(t,this.fieldNameSingular(),a,i)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/i}comparator(){return Wi.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,i)=>{if(n.tags.length===0&&i.tags.length===0)return 0;if(n.tags.length===0)return 1;if(i.tags.length===0)return-1;let s=t-1;if(n.tags.length=t)return 1;if(i.tags.length=t)return-1;if(n.tags.lengtht.tags.length==0?["(No tags)"]:t.tags}};var tk=oa(ek());function ei(r){return new RegExp("["+Hn(r)+"]").source}var Rh=[["(",")"],["[","]"],["{","}"],['"','"']],Pn=class{constructor(e,t,n){this.openFilterChars=e,this.closeFilterChars=t,this.openAndCloseFilterChars=n,this.openFilter=ei(this.openFilterChars),this.closeFilter=ei(this.closeFilterChars)}static allSupportedDelimiters(){let e="",t="",n="";for(let[i,s]of Rh)e+=i,t+=s,n+=Pn.openAndClosing(i,s);return new Pn(e,t,n)}static fromInstructionLine(e){let t=e.trim(),i=/^[A-Z ]*\s*(.*)/.exec(t);if(i){let a=i[1],o=a[0],u=a.slice(-1);for(let[l,c]of Rh)if(o===l&&u===c){let d=this.openAndClosing(l,c);return new Pn(l,c,d)}}let s="All filters in a Boolean instruction must be inside one of these pairs of delimiter characters: "+Rh.map(([a,o])=>a+"..."+o).join(" or ")+". Combinations of those delimiters are no longer supported.";throw new Error(s)}static openAndClosing(e,t){let n=e;return t!=e&&(n+=t),n}};var ti=class{static preprocessExpression(e,t){let n=ti.splitLine(e,t);return ti.getFiltersAndSimplifiedLine(n,t)}static splitLine(e,t){let n=new RegExp("("+t.closeFilter+"\\s*(?:AND|OR|AND +NOT|OR +NOT|XOR)\\s*"+t.openFilter+")"),i=e.split(n),s=new RegExp("(NOT\\s*"+t.openFilter+")"),a=i.flatMap(l=>l.split(s)).filter(l=>l!==""),o=new RegExp("(^"+ei(t.openFilterChars+" ")+"*)"),u=new RegExp("("+ei(t.closeFilterChars+" ")+"*$)");return a.flatMap(l=>l.split(o)).flatMap(l=>l.split(u)).filter(l=>l!=="")}static getFiltersAndSimplifiedLine(e,t){let n="",i=1,s={};e.forEach(l=>{if(!ti.isAFilter(l,t))n+=`${l}`;else{let c=`f${i}`;s[c]=l,n+=c,i++}});let a=new RegExp(`(${t.closeFilter})([A-Z])`,"g");n=n.replace(a,"$1 $2");let o=new RegExp(`([A-Z])(${t.openFilter})`,"g");n=n.replace(o,"$1 $2");let u=t.openFilterChars;if(u!='"'&&u!="("){let l=new RegExp(ei(u),"g");n=n.replace(l,"(");let c=t.closeFilterChars,d=new RegExp(ei(c),"g");n=n.replace(d,")")}return{simplifiedLine:n,filters:s}}static isAFilter(e,t){let n=new RegExp("^"+ei(" "+t.openAndCloseFilterChars)+"+$"),i=new RegExp("^ *"+t.closeFilter+" *(AND|OR|XOR) *"+t.openFilter+" *$"),s=new RegExp("^(AND|OR|XOR|NOT) *"+t.openFilter+"$"),a=new RegExp("^"+t.closeFilter+" *(AND|OR|XOR)$");return![n,i,s,a,/^(AND|OR|XOR|NOT)$/].some(u=>RegExp(u).exec(e))}};var Ul=class extends Ee{constructor(){super();this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={};let t=Pn.allSupportedDelimiters();this.basicBooleanRegexp=new RegExp("(.*(AND|OR|XOR|NOT)\\s*"+t.openFilter+".*|"+t.openFilter+".+"+t.closeFilter+")","g")}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){if(t.length===0)return ie.fromError(t,"empty line");let n;try{n=Pn.fromInstructionLine(t)}catch(o){let u=o instanceof Error?o.message:"unknown error type";return ie.fromError(t,this.helpMessageFromSimpleError(t,u))}let i=ti.preprocessExpression(t,n),s=i.simplifiedLine,a=i.filters;try{let o=(0,tk.parse)(s);for(let c of o)if(c.name==="IDENTIFIER"&&c.value){let d=c.value.trim(),p=a[d];if(c.value=p,!(p in this.subFields)){let m=Lo(p);if(m===null)return this.helpMessage(t,`couldn't parse sub-expression '${p}'`,i);if(m.error)return this.helpMessage(t,`couldn't parse sub-expression '${p}': ${m.error}`,i);m.filter&&(this.subFields[p]=m.filter)}}else if(c.name==="OPERATOR"){if(c.value==null)return this.helpMessage(t,"empty operator in boolean query",i);if(!this.supportedOperators.includes(c.value))return this.helpMessage(t,`unknown boolean operator '${c.value}'`,i)}let u=(c,d)=>this.filterTaskWithParsedQuery(c,o,d),l=this.constructExplanation(o);return ie.fromFilter(new bt(t,u,l))}catch(o){let u=o instanceof Error?o.message:"unknown error type";return this.helpMessage(t,`malformed boolean query -- ${u} (check the documentation for guidelines)`,i)}}filterTaskWithParsedQuery(t,n,i){let s=u=>u==="true",a=u=>u?"true":"false",o=[];for(let u of n)if(u.name==="IDENTIFIER"){if(u.value==null)throw Error("null token value");let c=this.subFields[u.value.trim()].filterFunction(t,i);o.push(a(c))}else if(u.name==="OPERATOR")if(u.value==="NOT"){let l=s(o.pop());o.push(a(!l))}else if(u.value==="OR"){let l=s(o.pop()),c=s(o.pop());o.push(a(l||c))}else if(u.value==="AND"){let l=s(o.pop()),c=s(o.pop());o.push(a(l&&c))}else if(u.value==="XOR"){let l=s(o.pop()),c=s(o.pop());o.push(a(l&&!c||!l&&c))}else throw Error("Unsupported operator: "+u.value);else throw Error("Unsupported token type: "+u);return s(o[0])}constructExplanation(t){let n=[];for(let i of t)if(i.name==="IDENTIFIER")this.explainExpression(i,n);else if(i.name==="OPERATOR")this.explainOperator(i,n);else throw Error("Unsupported token type: "+i.name);return n[0]}explainExpression(t,n){if(t.value==null)throw Error("null token value");let i=this.subFields[t.value.trim()],s=this.simulateExplainFilter(i);n.push(s)}simulateExplainFilter(t){return t.simulateExplainFilter()}explainOperator(t,n){if(t.value==="NOT"){let i=n.pop();n.push(Se.booleanNot([i]))}else if(t.value==="OR"){let i=n.pop(),s=n.pop();n.push(Se.booleanOr([s,i]))}else if(t.value==="AND"){let i=n.pop(),s=n.pop();n.push(Se.booleanAnd([s,i]))}else if(t.value==="XOR"){let i=n.pop(),s=n.pop();n.push(Se.booleanXor([s,i]))}else throw Error("Unsupported operator: "+t.value)}helpMessage(t,n,i){let s=i.filters,a=this.stringifySubExpressionsForErrorMessage(s),u=`${this.helpMessageFromSimpleError(t,n)} The instruction was converted to the following simplified line: ${i.simplifiedLine} @@ -298,9 +298,9 @@ The error message is: --- `;return e+=` ${this.totalTasksCount()} tasks -`,e}addTaskGroups(e){for(let[t,n]of e){let i=new ec(t,n);this.addTaskGroup(i)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let i=t.groups,s=n.groups;for(let a=0;a{t.applyTaskLimit(e)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let e=[];this._groups.forEach(n=>{e=[...e,...n.tasks]});let t=[...new Set(e)];this._totalTaskCount=t.length}};var ri=class{constructor(e,t){this.tasksFile=e,this.allTasks=[...t]}static fromAllTasks(e){return new ri(void 0,e)}get queryPath(){var e,t;return(t=(e=this.tasksFile)==null?void 0:e.path)!=null?t:void 0}queryContext(){return this.tasksFile?mh(this.tasksFile,this.allTasks):void 0}};function ik(r){return`task${r!==1?"s":""}`}var ji=class{constructor(e,t){this.totalTasksCountBeforeLimit=0;this._searchErrorMessage=void 0;this.taskGroups=e,this.totalTasksCountBeforeLimit=t}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(e){this._searchErrorMessage=e}get totalTasksCount(){return this.taskGroups.totalTasksCount()}totalTasksCountDisplayText(){let e=this.totalTasksCount,t=this.totalTasksCountBeforeLimit;return e===t?`${e} ${ik(e)}`:`${e} of ${t} ${ik(t)}`}get groups(){return this.taskGroups.groups}static fromError(e){let t=new ji(new Hs([],[],ri.fromAllTasks([])),0);return t._searchErrorMessage=e,t}};function sk(r){return r.endsWith("\\")}function ak(r){return r.endsWith("\\\\")}function NF(r){return r.replace(/^[ \t]*/,"")}function IF(r){return r.replace(/[ \t]*\\$/,"")}function FF(r,e){let t=r;return e&&(t=NF(r)),ak(t)?t=t.slice(0,-1):sk(r)&&(t=IF(t)),t}function ok(r){let e=[],t=!1,n="",i="";for(let s of r.split(` -`)){let a=FF(s,t);t?(n+=` -`+s,i+=" "+a):(n=s,i=a),ak(s)?t=!1:t=sk(s),t||(i.trim()!==""&&e.push(new An(n,i)),n="",i="")}return e}var Vs=class{static by(e,t,n){let i=this.defaultSorters().map(a=>a.comparator),s=[];for(let a of e)s.push(a.comparator);return t.sort(Vs.makeCompositeComparator([...s,...i],n))}static defaultSorters(){return[new sn().createNormalSorter(),new Bs().createNormalSorter(),new Fs().createNormalSorter(),new Ui().createNormalSorter(),new Ls().createNormalSorter()]}static makeCompositeComparator(e,t){return(n,i)=>{for(let s of e){let a=s(n,i,t);if(a!==0)return a}return 0}}};var Nn=class{constructor(e,t=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._taskLayoutOptions=new zr;this._queryLayoutOptions=new Qn;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this._ignoreGlobalQuery=!1;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|cancelled date|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|postpone button|urgency|tags|depends on|id)/i;this.shortModeRegexp=/^short/i;this.fullModeRegexp=/^full/i;this.explainQueryRegexp=/^explain/i;this.ignoreGlobalQueryRegexp=/^ignore global query/i;this.logger=St.getLogger("tasks.Query");this._queryId="";this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/i;this.commentRegexp=/^#.*/;this._queryId=this.generateQueryId(10),this.source=e,this.tasksFile=t,this.debug(`Creating query: ${this.formatQueryForLogging()}`),ok(e).forEach(n=>{let i=this.expandPlaceholders(n,t);if(this.error===void 0)try{this.parseLine(i,n)}catch(s){let a;s instanceof Error?a=s.message:a="Unknown error",this.setError(a,n);return}})}get filePath(){var e,t;return(t=(e=this.tasksFile)==null?void 0:e.path)!=null?t:void 0}get queryId(){return this._queryId}parseLine(e,t){switch(!0){case this.shortModeRegexp.test(e):this._queryLayoutOptions.shortMode=!0;break;case this.fullModeRegexp.test(e):this._queryLayoutOptions.shortMode=!1;break;case this.explainQueryRegexp.test(e):this._queryLayoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(e):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(e):this.parseLimit(e);break;case this.parseSortBy(e):break;case this.parseGroupBy(e):break;case this.hideOptionsRegexp.test(e):this.parseHideOptions(e);break;case this.commentRegexp.test(e):break;case this.parseFilter(e,t):break;default:this.setError("do not understand query",t)}}formatQueryForLogging(){return`[${this.source.split(` +`,e}addTaskGroups(e){for(let[t,n]of e){let i=new ec(t,n);this.addTaskGroup(i)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let i=t.groups,s=n.groups;for(let a=0;a{t.applyTaskLimit(e)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let e=[];this._groups.forEach(n=>{e=[...e,...n.tasks]});let t=[...new Set(e)];this._totalTaskCount=t.length}};var ri=class{constructor(e,t){this.tasksFile=e,this.allTasks=[...t]}static fromAllTasks(e){return new ri(void 0,e)}get queryPath(){var e,t;return(t=(e=this.tasksFile)==null?void 0:e.path)!=null?t:void 0}queryContext(){return this.tasksFile?mh(this.tasksFile,this.allTasks):void 0}};function ik(r){return`task${r!==1?"s":""}`}var ji=class{constructor(e,t){this.totalTasksCountBeforeLimit=0;this._searchErrorMessage=void 0;this.taskGroups=e,this.totalTasksCountBeforeLimit=t}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(e){this._searchErrorMessage=e}get totalTasksCount(){return this.taskGroups.totalTasksCount()}totalTasksCountDisplayText(){let e=this.totalTasksCount,t=this.totalTasksCountBeforeLimit;return e===t?`${e} ${ik(e)}`:`${e} of ${t} ${ik(t)}`}get groups(){return this.taskGroups.groups}static fromError(e){let t=new ji(new Hs([],[],ri.fromAllTasks([])),0);return t._searchErrorMessage=e,t}};function sk(r){return r.endsWith("\\")}function ak(r){return r.endsWith("\\\\")}function IF(r){return r.replace(/^[ \t]*/,"")}function FF(r){return r.replace(/[ \t]*\\$/,"")}function LF(r,e){let t=r;return e&&(t=IF(r)),ak(t)?t=t.slice(0,-1):sk(r)&&(t=FF(t)),t}function ok(r){let e=[],t=!1,n="",i="";for(let s of r.split(` +`)){let a=LF(s,t);t?(n+=` +`+s,i+=" "+a):(n=s,i=a),ak(s)?t=!1:t=sk(s),t||(i.trim()!==""&&e.push(new An(n,i)),n="",i="")}return e}var Vs=class{static by(e,t,n){let i=this.defaultSorters().map(a=>a.comparator),s=[];for(let a of e)s.push(a.comparator);return t.sort(Vs.makeCompositeComparator([...s,...i],n))}static defaultSorters(){return[new sn().createNormalSorter(),new Bs().createNormalSorter(),new Fs().createNormalSorter(),new Ui().createNormalSorter(),new Ls().createNormalSorter()]}static makeCompositeComparator(e,t){return(n,i)=>{for(let s of e){let a=s(n,i,t);if(a!==0)return a}return 0}}};var Nn=class{constructor(e,t=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._taskLayoutOptions=new zr;this._queryLayoutOptions=new Qn;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this._ignoreGlobalQuery=!1;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|cancelled date|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|postpone button|urgency|tags|depends on|id|on completion)/i;this.shortModeRegexp=/^short/i;this.fullModeRegexp=/^full/i;this.explainQueryRegexp=/^explain/i;this.ignoreGlobalQueryRegexp=/^ignore global query/i;this.logger=St.getLogger("tasks.Query");this._queryId="";this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/i;this.commentRegexp=/^#.*/;this._queryId=this.generateQueryId(10),this.source=e,this.tasksFile=t,this.debug(`Creating query: ${this.formatQueryForLogging()}`),ok(e).forEach(n=>{let i=this.expandPlaceholders(n,t);if(this.error===void 0)try{this.parseLine(i,n)}catch(s){let a;s instanceof Error?a=s.message:a="Unknown error",this.setError(a,n);return}})}get filePath(){var e,t;return(t=(e=this.tasksFile)==null?void 0:e.path)!=null?t:void 0}get queryId(){return this._queryId}parseLine(e,t){switch(!0){case this.shortModeRegexp.test(e):this._queryLayoutOptions.shortMode=!0;break;case this.fullModeRegexp.test(e):this._queryLayoutOptions.shortMode=!1;break;case this.explainQueryRegexp.test(e):this._queryLayoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(e):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(e):this.parseLimit(e);break;case this.parseSortBy(e):break;case this.parseGroupBy(e):break;case this.hideOptionsRegexp.test(e):this.parseHideOptions(e);break;case this.commentRegexp.test(e):break;case this.parseFilter(e,t):break;default:this.setError("do not understand query",t)}}formatQueryForLogging(){return`[${this.source.split(` `).join(" ; ")}]`}expandPlaceholders(e,t){let n=e.anyContinuationLinesRemoved;if(n.includes("{{")&&n.includes("}}")&&this.tasksFile===void 0)return this._error=`The query looks like it contains a placeholder, with "{{" and "}}" but no file path has been supplied, so cannot expand placeholder values. The query is: @@ -309,7 +309,7 @@ ${e.source}`,this.tasksFile)}explainQuery(){return new Ps().explainQuery(this)}g Problem line: "${t.rawInstruction}"`:this._error=`${e} Problem statement: ${t.explainStatement(" ")} -`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){this.debug(`Executing query: ${this.formatQueryForLogging()}`);let t=new ri(this.tasksFile,e);try{this.filters.forEach(o=>{e=e.filter(u=>o.filterFunction(u,t))});let{debugSettings:n}=X(),i=n.ignoreSortInstructions?e:Vs.by(this.sorting,e,t),s=i.slice(0,this.limit),a=new Hs(this.grouping,s,t);return this._taskGroupLimit!==void 0&&a.applyTaskLimit(this._taskGroupLimit),new ji(a,i.length)}catch(n){let i="Search failed";return ji.fromError(Fi(i,n))}}parseHideOptions(e){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1].toLowerCase()==="hide";switch(t[2].toLowerCase()){case"task count":this._queryLayoutOptions.hideTaskCount=n;break;case"backlink":this._queryLayoutOptions.hideBacklinks=n;break;case"postpone button":this._queryLayoutOptions.hidePostponeButton=n;break;case"priority":this._taskLayoutOptions.setVisibility("priority",!n);break;case"cancelled date":this._taskLayoutOptions.setVisibility("cancelledDate",!n);break;case"created date":this._taskLayoutOptions.setVisibility("createdDate",!n);break;case"start date":this._taskLayoutOptions.setVisibility("startDate",!n);break;case"scheduled date":this._taskLayoutOptions.setVisibility("scheduledDate",!n);break;case"due date":this._taskLayoutOptions.setVisibility("dueDate",!n);break;case"done date":this._taskLayoutOptions.setVisibility("doneDate",!n);break;case"recurrence rule":this._taskLayoutOptions.setVisibility("recurrenceRule",!n);break;case"edit button":this._queryLayoutOptions.hideEditButton=n;break;case"urgency":this._queryLayoutOptions.hideUrgency=n;break;case"tags":this._taskLayoutOptions.setTagsVisibility(!n);break;case"id":this._taskLayoutOptions.setVisibility("id",!n);break;case"depends on":this._taskLayoutOptions.setVisibility("dependsOn",!n);break;default:this.setError("do not understand hide/show option",new An(e,e))}}}parseFilter(e,t){var i;let n=Lo(e);return n!=null?(n.filter?(n.filter.setStatement(t),this._filters.push(n.filter)):this.setError((i=n.error)!=null?i:"Unknown error",t),!0):!1}parseLimit(e){let t=e.match(this.limitRegexp);if(t===null){this.setError("do not understand query limit",new An(e,e));return}let n=Number.parseInt(t[3],10);t[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy(e){let t=rk(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy(e){let t=nk(e);return t?(this._grouping.push(t),!0):!1}generateQueryId(e){let t="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";return Array.from({length:e},()=>t[Math.floor(Math.random()*t.length)]).join("")}debug(e,t){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${e}`,t)}};var ni=class{constructor(e=ni.empty){this._source=e}static getInstance(){return ni.instance||(ni.instance=new ni),ni.instance}set(e){this._source=e}query(e=void 0){return new Nn(this._source,e)}hasInstructions(){return this._source.trim()!==ni.empty}},tr=ni;tr.empty="";var tc=class{constructor({obsidianEvents:e}){this.logger=St.getLogger("tasks.Events");this.obsidianEvents=e}onCacheUpdate(e){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(e)}};var dk=require("obsidian");var ck=require("obsidian");var Ch=class{constructor(e){this.newStatus=e}apply(e){return this.isCheckedForTask(e)?[e]:e.handleNewStatusWithRecurrenceInUsersOrder(this.newStatus)}instructionDisplayName(){return`Change status to: [${this.newStatus.symbol}] ${this.newStatus.name}`}isCheckedForTask(e){return this.newStatus.symbol===e.status.symbol}};function uk(r){let e=[],t=new Le().coreStatuses.map(n=>n.symbol);for(let n of[!0,!1])for(let i of r.registeredStatuses)t.includes(i.symbol)===n&&e.push(new Ch(i));return e}var lk=require("obsidian");function Uo(r,e){return P(this,null,function*(){yield br({originalTask:r,newTasks:e})})}var zs=class extends lk.Menu{constructor(t){super();this.taskSaver=t}addItemsForInstructions(t,n){for(let i of t)this.addItemForInstruction(n,i)}addItemForInstruction(t,n){this.addItem(i=>this.getMenuItemCallback(t,i,n))}getMenuItemCallback(t,n,i){n.setTitle(i.instructionDisplayName()).setChecked(i.isCheckedForTask(t)).onClick(()=>P(this,null,function*(){let s=i.apply(t);(s.length!==1||!Object.is(s[0],t))&&(yield this.taskSaver(t,s))}))}};var rc=class extends zs{constructor(e,t,n=Uo){super(n);let i=uk(e);this.addItemsForInstructions(i,t)}};var nc=class{constructor(){this.data=LF}addDataAttribute(e,t,n){this.data[n].addDataAttribute(e,t,n)}addClassName(e,t){let n=this.data[t].className;e.classList.add(n)}},Ah=class{constructor(e,t,n){if(e==="")throw Error("Developer note: CSS class cannot be an empty string, please specify one.");this.className=e,this.attributeName=t,this.attributeValueCalculator=n}addDataAttribute(e,t,n){if(this.attributeName===Ah.noAttributeName)return;let i=this.attributeValueCalculator(n,t);i!==""&&(e.dataset[this.attributeName]=i)}},Lr=Ah;Lr.noAttributeName="",Lr.noAttributeValueCalculator=()=>"",Lr.dateAttributeCalculator=(e,t)=>{let i="far";function s(o){let l=window.moment().startOf("day").diff(o,"days");if(isNaN(l))return null;if(l===0)return"today";let c="";return l>0?c+="past-":l<0&&(c+="future-"),Math.abs(l)<=7?c+=Math.abs(l).toString()+"d":c+=i,c}let a=t[e];if(!Array.isArray(a)&&a instanceof window.moment){let o=s(a);if(o)return o}return""};function Ks(r){return new Lr(r,Lr.noAttributeName,Lr.noAttributeValueCalculator)}function Qs(r,e){return new Lr(r,e,Lr.dateAttributeCalculator)}var LF={createdDate:Qs("task-created","taskCreated"),dueDate:Qs("task-due","taskDue"),startDate:Qs("task-start","taskStart"),scheduledDate:Qs("task-scheduled","taskScheduled"),doneDate:Qs("task-done","taskDone"),cancelledDate:Qs("task-cancelled","taskCancelled"),priority:new Lr("task-priority","taskPriority",(r,e)=>Sn.priorityNameUsingNormal(e.priority).toLocaleLowerCase()),description:Ks("task-description"),recurrenceRule:Ks("task-recurring"),onCompletion:Ks("task-onCompletion"),dependsOn:Ks("task-dependsOn"),id:Ks("task-id"),blockLink:Ks("task-block-link")};function $t(r,e){let t=document.createElement(r);return e.appendChild(t),t}var ii=class{static obsidianMarkdownRenderer(e,t,n,i){return P(this,null,function*(){if(!i)throw new Error("Must call the Obsidian renderer with an Obsidian Component object");yield ck.MarkdownRenderer.renderMarkdown(e,t,n,i)})}constructor({textRenderer:e=ii.obsidianMarkdownRenderer,obsidianComponent:t,parentUlElement:n,taskLayoutOptions:i,queryLayoutOptions:s}){this.textRenderer=e,this.obsidianComponent=t,this.parentUlElement=n,this.taskLayoutOptions=i,this.queryLayoutOptions=s}renderTaskLine(e,t,n){return P(this,null,function*(){let i=$t("li",this.parentUlElement);i.classList.add("task-list-item","plugin-tasks-list-item");let s=$t("span",i);s.classList.add("tasks-list-text"),yield this.taskToHtml(e,s,i);let a=$t("input",i);return a.classList.add("task-list-item-checkbox"),a.type="checkbox",e.status.symbol!==" "&&(a.checked=!0,i.classList.add("is-checked")),e.taskLocation.hasKnownPath&&(a.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),a.disabled=!0;let l=e.toggleWithRecurrenceInUsersOrder();br({originalTask:e,newTasks:l})}),a.addEventListener("contextmenu",u=>{new rc(De.getInstance(),e).showAtPosition({x:u.clientX,y:u.clientY})}),a.setAttribute("title","Right-click for options")),i.prepend(a),i.setAttribute("data-task",e.status.symbol.trim()),i.setAttribute("data-line",t.toString()),i.setAttribute("data-task-status-name",e.status.name),i.setAttribute("data-task-status-type",e.status.type),a.setAttribute("data-line",t.toString()),this.queryLayoutOptions.shortMode&&this.addTooltip(e,s,n),i})}taskToHtml(e,t,n){return P(this,null,function*(){let i=new nc,s=Mr.tasksPluginEmoji.taskSerializer;for(let a of this.taskLayoutOptions.shownComponents){let o=s.componentToString(e,this.queryLayoutOptions.shortMode,a);if(o){let u=$t("span",t),l=$t("span",u);yield this.renderComponentText(l,o,a,e),this.addInternalClasses(a,l),i.addClassName(u,a),i.addDataAttribute(u,e,a),i.addDataAttribute(n,e,a)}}for(let a of this.taskLayoutOptions.hiddenComponents)i.addDataAttribute(n,e,a);n.dataset.taskPriority===void 0&&i.addDataAttribute(n,e,"priority")})}renderComponentText(e,t,n,i){return P(this,null,function*(){if(n==="description"){t=_e.getInstance().removeAsWordFromDependingOnSettings(t);let{debugSettings:s}=X();s.showTaskHiddenData&&(t+=`
\u{1F41B} ${i.lineNumber} . ${i.sectionStart} . ${i.sectionIndex} . '${i.originalMarkdown}'
'${i.path}' > '${i.precedingHeader}'
`),yield this.textRenderer(t,e,i.path,this.obsidianComponent);let a=e.querySelector("blockquote"),o=a!=null?a:e,u=o.querySelector("p");if(u!==null){for(;u.firstChild;)o.insertBefore(u.firstChild,u);u.remove()}e.querySelectorAll("p").forEach(l=>{l.hasChildNodes()||l.remove()}),e.querySelectorAll(".footnotes").forEach(l=>{l.remove()})}else e.innerHTML=t})}addInternalClasses(e,t){function n(i){let s=/["&\x00\r\n]/g,a=i.replace(s,"-");return a=a.replace(/^[-_]+/,""),a.length>0?a:null}if(e==="description"){let i=t.getElementsByClassName("tag");for(let s=0;s{function d(_,b,E){b&&_.createDiv().setText(p({signifier:E,date:b}))}function p({signifier:_,date:b}){return`${_} ${b.format(J.dateFormat)} (${b.from(window.moment().startOf("day"))})`}let m=t.createDiv();m.addClasses(["tooltip","pop-up"]),e.recurrence&&m.createDiv().setText(`${i} ${e.recurrence.toText()}`),d(m,e.createdDate,a),d(m,e.startDate,s),d(m,e.scheduledDate,o),d(m,e.dueDate,u),d(m,e.cancelledDate,l),d(m,e.doneDate,c);let y=e.getLinkText({isFilenameUnique:n});y&&m.createDiv().setText(`\u{1F517} ${y}`),t.addEventListener("mouseleave",()=>{m.remove()})})}};var ic=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return P(this,null,function*(){var d;let n=new dk.MarkdownRenderChild(e);t.addChild(n);let i=e.findAll(".task-list-item").filter(p=>{var _;let m=(_=p.textContent)==null?void 0:_.split(` +`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){this.debug(`Executing query: ${this.formatQueryForLogging()}`);let t=new ri(this.tasksFile,e);try{this.filters.forEach(o=>{e=e.filter(u=>o.filterFunction(u,t))});let{debugSettings:n}=X(),i=n.ignoreSortInstructions?e:Vs.by(this.sorting,e,t),s=i.slice(0,this.limit),a=new Hs(this.grouping,s,t);return this._taskGroupLimit!==void 0&&a.applyTaskLimit(this._taskGroupLimit),new ji(a,i.length)}catch(n){let i="Search failed";return ji.fromError(Fi(i,n))}}parseHideOptions(e){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1].toLowerCase()==="hide";switch(t[2].toLowerCase()){case"task count":this._queryLayoutOptions.hideTaskCount=n;break;case"backlink":this._queryLayoutOptions.hideBacklinks=n;break;case"postpone button":this._queryLayoutOptions.hidePostponeButton=n;break;case"priority":this._taskLayoutOptions.setVisibility("priority",!n);break;case"cancelled date":this._taskLayoutOptions.setVisibility("cancelledDate",!n);break;case"created date":this._taskLayoutOptions.setVisibility("createdDate",!n);break;case"start date":this._taskLayoutOptions.setVisibility("startDate",!n);break;case"scheduled date":this._taskLayoutOptions.setVisibility("scheduledDate",!n);break;case"due date":this._taskLayoutOptions.setVisibility("dueDate",!n);break;case"done date":this._taskLayoutOptions.setVisibility("doneDate",!n);break;case"recurrence rule":this._taskLayoutOptions.setVisibility("recurrenceRule",!n);break;case"edit button":this._queryLayoutOptions.hideEditButton=n;break;case"urgency":this._queryLayoutOptions.hideUrgency=n;break;case"tags":this._taskLayoutOptions.setTagsVisibility(!n);break;case"id":this._taskLayoutOptions.setVisibility("id",!n);break;case"depends on":this._taskLayoutOptions.setVisibility("dependsOn",!n);break;case"on completion":this._taskLayoutOptions.setVisibility("onCompletion",!n);break;default:this.setError("do not understand hide/show option",new An(e,e))}}}parseFilter(e,t){var i;let n=Lo(e);return n!=null?(n.filter?(n.filter.setStatement(t),this._filters.push(n.filter)):this.setError((i=n.error)!=null?i:"Unknown error",t),!0):!1}parseLimit(e){let t=e.match(this.limitRegexp);if(t===null){this.setError("do not understand query limit",new An(e,e));return}let n=Number.parseInt(t[3],10);t[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy(e){let t=rk(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy(e){let t=nk(e);return t?(this._grouping.push(t),!0):!1}generateQueryId(e){let t="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";return Array.from({length:e},()=>t[Math.floor(Math.random()*t.length)]).join("")}debug(e,t){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${e}`,t)}};var ni=class{constructor(e=ni.empty){this._source=e}static getInstance(){return ni.instance||(ni.instance=new ni),ni.instance}set(e){this._source=e}query(e=void 0){return new Nn(this._source,e)}hasInstructions(){return this._source.trim()!==ni.empty}},tr=ni;tr.empty="";var tc=class{constructor({obsidianEvents:e}){this.logger=St.getLogger("tasks.Events");this.obsidianEvents=e}onCacheUpdate(e){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(e)}};var dk=require("obsidian");var ck=require("obsidian");var Ch=class{constructor(e){this.newStatus=e}apply(e){return this.isCheckedForTask(e)?[e]:e.handleNewStatusWithRecurrenceInUsersOrder(this.newStatus)}instructionDisplayName(){return`Change status to: [${this.newStatus.symbol}] ${this.newStatus.name}`}isCheckedForTask(e){return this.newStatus.symbol===e.status.symbol}};function uk(r){let e=[],t=new Le().coreStatuses.map(n=>n.symbol);for(let n of[!0,!1])for(let i of r.registeredStatuses)t.includes(i.symbol)===n&&e.push(new Ch(i));return e}var lk=require("obsidian");function Uo(r,e){return P(this,null,function*(){yield br({originalTask:r,newTasks:e})})}var zs=class extends lk.Menu{constructor(t){super();this.taskSaver=t}addItemsForInstructions(t,n){for(let i of t)this.addItemForInstruction(n,i)}addItemForInstruction(t,n){this.addItem(i=>this.getMenuItemCallback(t,i,n))}getMenuItemCallback(t,n,i){n.setTitle(i.instructionDisplayName()).setChecked(i.isCheckedForTask(t)).onClick(()=>P(this,null,function*(){let s=i.apply(t);(s.length!==1||!Object.is(s[0],t))&&(yield this.taskSaver(t,s))}))}};var rc=class extends zs{constructor(e,t,n=Uo){super(n);let i=uk(e);this.addItemsForInstructions(i,t)}};var nc=class{constructor(){this.data=UF}addDataAttribute(e,t,n){this.data[n].addDataAttribute(e,t,n)}addClassName(e,t){let n=this.data[t].className;e.classList.add(n)}},Ah=class{constructor(e,t,n){if(e==="")throw Error("Developer note: CSS class cannot be an empty string, please specify one.");this.className=e,this.attributeName=t,this.attributeValueCalculator=n}addDataAttribute(e,t,n){if(this.attributeName===Ah.noAttributeName)return;let i=this.attributeValueCalculator(n,t);i!==""&&(e.dataset[this.attributeName]=i)}},Lr=Ah;Lr.noAttributeName="",Lr.noAttributeValueCalculator=()=>"",Lr.dateAttributeCalculator=(e,t)=>{let i="far";function s(o){let l=window.moment().startOf("day").diff(o,"days");if(isNaN(l))return null;if(l===0)return"today";let c="";return l>0?c+="past-":l<0&&(c+="future-"),Math.abs(l)<=7?c+=Math.abs(l).toString()+"d":c+=i,c}let a=t[e];if(!Array.isArray(a)&&a instanceof window.moment){let o=s(a);if(o)return o}return""};function Ks(r){return new Lr(r,Lr.noAttributeName,Lr.noAttributeValueCalculator)}function Qs(r,e){return new Lr(r,e,Lr.dateAttributeCalculator)}var UF={createdDate:Qs("task-created","taskCreated"),dueDate:Qs("task-due","taskDue"),startDate:Qs("task-start","taskStart"),scheduledDate:Qs("task-scheduled","taskScheduled"),doneDate:Qs("task-done","taskDone"),cancelledDate:Qs("task-cancelled","taskCancelled"),priority:new Lr("task-priority","taskPriority",(r,e)=>Sn.priorityNameUsingNormal(e.priority).toLocaleLowerCase()),description:Ks("task-description"),recurrenceRule:Ks("task-recurring"),onCompletion:Ks("task-onCompletion"),dependsOn:Ks("task-dependsOn"),id:Ks("task-id"),blockLink:Ks("task-block-link")};function $t(r,e){let t=document.createElement(r);return e.appendChild(t),t}var ii=class{static obsidianMarkdownRenderer(e,t,n,i){return P(this,null,function*(){if(!i)throw new Error("Must call the Obsidian renderer with an Obsidian Component object");yield ck.MarkdownRenderer.renderMarkdown(e,t,n,i)})}constructor({textRenderer:e=ii.obsidianMarkdownRenderer,obsidianComponent:t,parentUlElement:n,taskLayoutOptions:i,queryLayoutOptions:s}){this.textRenderer=e,this.obsidianComponent=t,this.parentUlElement=n,this.taskLayoutOptions=i,this.queryLayoutOptions=s}renderTaskLine(e,t,n){return P(this,null,function*(){let i=$t("li",this.parentUlElement);i.classList.add("task-list-item","plugin-tasks-list-item");let s=$t("span",i);s.classList.add("tasks-list-text"),yield this.taskToHtml(e,s,i);let a=$t("input",i);return a.classList.add("task-list-item-checkbox"),a.type="checkbox",e.status.symbol!==" "&&(a.checked=!0,i.classList.add("is-checked")),e.taskLocation.hasKnownPath&&(a.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),a.disabled=!0;let l=e.toggleWithRecurrenceInUsersOrder();br({originalTask:e,newTasks:l})}),a.addEventListener("contextmenu",u=>{new rc(De.getInstance(),e).showAtPosition({x:u.clientX,y:u.clientY})}),a.setAttribute("title","Right-click for options")),i.prepend(a),i.setAttribute("data-task",e.status.symbol.trim()),i.setAttribute("data-line",t.toString()),i.setAttribute("data-task-status-name",e.status.name),i.setAttribute("data-task-status-type",e.status.type),a.setAttribute("data-line",t.toString()),this.queryLayoutOptions.shortMode&&this.addTooltip(e,s,n),i})}taskToHtml(e,t,n){return P(this,null,function*(){let i=new nc,s=Mr.tasksPluginEmoji.taskSerializer;for(let a of this.taskLayoutOptions.shownComponents){let o=s.componentToString(e,this.queryLayoutOptions.shortMode,a);if(o){let u=$t("span",t),l=$t("span",u);yield this.renderComponentText(l,o,a,e),this.addInternalClasses(a,l),i.addClassName(u,a),i.addDataAttribute(u,e,a),i.addDataAttribute(n,e,a)}}for(let a of this.taskLayoutOptions.hiddenComponents)i.addDataAttribute(n,e,a);n.dataset.taskPriority===void 0&&i.addDataAttribute(n,e,"priority")})}renderComponentText(e,t,n,i){return P(this,null,function*(){if(n==="description"){t=_e.getInstance().removeAsWordFromDependingOnSettings(t);let{debugSettings:s}=X();s.showTaskHiddenData&&(t+=`
\u{1F41B} ${i.lineNumber} . ${i.sectionStart} . ${i.sectionIndex} . '${i.originalMarkdown}'
'${i.path}' > '${i.precedingHeader}'
`),yield this.textRenderer(t,e,i.path,this.obsidianComponent);let a=e.querySelector("blockquote"),o=a!=null?a:e,u=o.querySelector("p");if(u!==null){for(;u.firstChild;)o.insertBefore(u.firstChild,u);u.remove()}e.querySelectorAll("p").forEach(l=>{l.hasChildNodes()||l.remove()}),e.querySelectorAll(".footnotes").forEach(l=>{l.remove()})}else e.innerHTML=t})}addInternalClasses(e,t){function n(i){let s=/["&\x00\r\n]/g,a=i.replace(s,"-");return a=a.replace(/^[-_]+/,""),a.length>0?a:null}if(e==="description"){let i=t.getElementsByClassName("tag");for(let s=0;s{function d(_,b,E){b&&_.createDiv().setText(p({signifier:E,date:b}))}function p({signifier:_,date:b}){return`${_} ${b.format(J.dateFormat)} (${b.from(window.moment().startOf("day"))})`}let m=t.createDiv();m.addClasses(["tooltip","pop-up"]),e.recurrence&&m.createDiv().setText(`${i} ${e.recurrence.toText()}`),d(m,e.createdDate,a),d(m,e.startDate,s),d(m,e.scheduledDate,o),d(m,e.dueDate,u),d(m,e.cancelledDate,l),d(m,e.doneDate,c);let y=e.getLinkText({isFilenameUnique:n});y&&m.createDiv().setText(`\u{1F517} ${y}`),t.addEventListener("mouseleave",()=>{m.remove()})})}};var ic=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return P(this,null,function*(){var d;let n=new dk.MarkdownRenderChild(e);t.addChild(n);let i=e.findAll(".task-list-item").filter(p=>{var _;let m=(_=p.textContent)==null?void 0:_.split(` `);if(m===void 0)return!1;let y=null;for(let b=0;bfk.ViewPlugin.fromClass(Ph),Ph=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let p=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(p),new pk.Notice(p,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=ae.fromLine({line:a.text,taskLocation:ft.fromUnknownPosition(new at("")),fallbackDate:null});if(o===null)return!1;e.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder().map(p=>p.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let d=t.checked;return setTimeout(()=>{t.checked=d},1),!0}};var lc=require("obsidian"),Dk=require("obsidian");function hk(r,e,t,n=void 0){let i="";e.isEmpty()||(i+=`Only tasks containing the global filter '${e.get()}'. @@ -319,11 +319,11 @@ If you wanted Tasks to do these things, please undo your change, then either cli ${s.explainQuery(o)} `}return i+=`Explanation of this Tasks code block query: -${s.explainQuery(a)}`,i}function Wo(r,e,t){let n=new Nn(r,t);return n.ignoreGlobalQuery?n:e.query(t).append(n)}function qo(r,e,t){e&&r.push(UF(t))}function UF(r){return`tasks-layout-hide-${r}`}var sc=class{constructor(e){e?this.queryLayoutOptions=e:this.queryLayoutOptions=new Qn}getHiddenClasses(){let e=[],t=[[this.queryLayoutOptions.hideUrgency,"urgency"],[this.queryLayoutOptions.hideBacklinks,"backlinks"],[this.queryLayoutOptions.hideEditButton,"edit-button"],[this.queryLayoutOptions.hidePostponeButton,"postpone-button"]];for(let[n,i]of t)qo(e,n,i);return this.queryLayoutOptions.shortMode&&e.push("tasks-layout-short-mode"),e}};var ac=class{constructor(e){e?this.taskLayoutOptions=e:this.taskLayoutOptions=new zr}generateHiddenClasses(){let e=[];return this.taskLayoutOptions.toggleableComponents.forEach(t=>{qo(e,!this.taskLayoutOptions.isShown(t),t)}),qo(e,!this.taskLayoutOptions.areTagsShown(),"tags"),e}};var $o=class{constructor(e){this.label=e,this.start()}start(){!this.recordTimings()||performance.mark(this.labelForStart())}finish(){!this.recordTimings()||(performance.mark(this.labelForEnd()),performance.measure(this.label,this.labelForStart(),this.labelForEnd()),this.printDuration())}printDuration(){let e=performance.getEntriesByName(this.label),t=e[e.length-1];t?console.log(this.label+":",t.duration.toFixed(2),"milliseconds"):console.log(`Measurement for ${this.label} not found`)}labelForStart(){return`${this.label} - start`}labelForEnd(){return`${this.label} - end`}recordTimings(){let{debugSettings:e}=X();return e.recordTimings}};function gk(r){for(let t of ae.allDateFields()){let n=r[t];if(n&&!n.isValid())return!1}let e=r.happensDates.some(t=>!!(t!=null&&t.isValid()));return!r.isDone&&e}function jo(r){return r.dueDate?"dueDate":r.scheduledDate?"scheduledDate":r.startDate?"startDate":null}function Nh(r,e,t,n){let i=r[e];return Tk(i,r,e,t,n)}function yk(r,e,t,n){let i=window.moment();return Tk(i,r,e,t,n)}function bk(r,e,t,n){return _k(r,e,null)}function Tk(r,e,t,n,i){let s=new It(r).postpone(n,i);return _k(e,t,s)}function _k(r,e,t){let n=yt.removeInferredStatusIfNeeded(r,[new ae(he(K({},r),{[e]:t}))])[0];return{postponedDate:t,postponedTask:n}}function vk(r,e){if(r){let t=r==null?void 0:r.format("DD MMM YYYY");return`Task's ${e} changed to ${t}`}else return`Task's ${e} removed`}function wk(r,e,t){return`\u2139\uFE0F ${Ih(r,e,t)} (right-click for more options)`}function Ih(r,e,t){let n=jo(r),i=r[n];return Ok(n,i,e,t)}function kk(r,e,t){let n=jo(r),i=window.moment().startOf("day");return Ok(n,i,e,t)}function Ek(r,e,t){let n=jo(r);return n==="scheduledDate"&&r.scheduledDateIsInferred?"Cannot remove inferred scheduled date":`Remove ${Sk(n)}`}function WF(r){return Es(r.replace("Date",""))}function Sk(r){return r.replace("Date"," date")}function Ok(r,e,t,n){let s=new It(e).postpone(n,t).format("ddd Do MMM"),a=t!=1?t:"a";return e.isSameOrBefore(window.moment(),"day")?`${WF(r)} in ${a} ${n}, on ${s}`.replace(" in 0 days"," today").replace("in a day","tomorrow"):`Postpone ${Sk(r)} by ${a} ${n}, to ${s}`}var Fh=require("obsidian");var si=class extends zs{constructor(e,t,n=Uo){super(n);let i=(l,c,d,p,m,y)=>{let _=m(t,p,d);c.setTitle(_).onClick(()=>si.postponeOnClickCallback(l,t,p,d,y,n))},s=kk,a=yk;this.addItem(l=>i(e,l,"days",0,s,a)),this.addItem(l=>i(e,l,"day",1,s,a)),this.addSeparator();let o=Ih,u=Nh;this.addItem(l=>i(e,l,"days",2,o,u)),this.addItem(l=>i(e,l,"days",3,o,u)),this.addItem(l=>i(e,l,"days",4,o,u)),this.addItem(l=>i(e,l,"days",5,o,u)),this.addItem(l=>i(e,l,"days",6,o,u)),this.addSeparator(),this.addItem(l=>i(e,l,"week",1,o,u)),this.addItem(l=>i(e,l,"weeks",2,o,u)),this.addItem(l=>i(e,l,"weeks",3,o,u)),this.addItem(l=>i(e,l,"month",1,o,u)),this.addSeparator(),this.addItem(l=>i(e,l,"days",2,Ek,bk))}static postponeOnClickCallback(o,u,l,c){return P(this,arguments,function*(e,t,n,i,s=Nh,a=Uo){let d=jo(t);if(d===null){let y="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new Fh.Notice(y,1e4)}let{postponedDate:p,postponedTask:m}=s(t,d,i,n);yield a(t,m),si.postponeSuccessCallback(e,d,p)})}static postponeSuccessCallback(e,t,n){e.style.pointerEvents="none";let i=vk(n,t);new Fh.Notice(i,2e3)}};var oc=class{constructor(e,t,n,i,s){switch(this.source=t,this.tasksFile=n,this.renderMarkdown=i,this.obsidianComponent=s,e){case"block-language-tasks":this.query=Wo(this.source,tr.getInstance(),this.tasksFile),this.queryType="tasks";break;default:this.query=Wo(this.source,tr.getInstance(),this.tasksFile),this.queryType="tasks";break}}get filePath(){var e,t;return(t=(e=this.tasksFile)==null?void 0:e.path)!=null?t:void 0}render2(e,t,n,i){return P(this,null,function*(){e==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(t,e,n,i):this.query.error!==void 0?this.renderErrorMessage(n,this.query.error):this.renderLoadingMessage(n)})}renderQuerySearchResults(e,t,n,i){return P(this,null,function*(){let s=this.explainAndPerformSearch(t,e,n);if(s.searchErrorMessage!==void 0){this.renderErrorMessage(n,s.searchErrorMessage);return}yield this.renderSearchResults(s,n,i)})}explainAndPerformSearch(e,t,n){let i=new $o(`Search: ${this.query.queryId} - ${this.filePath}`);i.start(),this.query.debug(`[render] Render called: plugin state: ${e}; searching ${t.length} tasks`),this.query.queryLayoutOptions.explainQuery&&this.createExplanation(n);let s=this.query.applyQueryToTasks(t);return i.finish(),s}renderSearchResults(e,t,n){return P(this,null,function*(){let i=new $o(`Render: ${this.query.queryId} - ${this.filePath}`);i.start(),yield this.addAllTaskGroups(e.taskGroups,t,n);let s=e.totalTasksCount;this.addTaskCount(t,e),this.query.debug(`[render] ${s} tasks displayed`),i.finish()})}renderErrorMessage(e,t){e.createDiv().innerHTML=`
Tasks query: ${t.replace(/\n/g,"
")}
`}renderLoadingMessage(e){e.setText("Loading Tasks ...")}createExplanation(e){let t=hk(this.source,_e.getInstance(),tr.getInstance(),this.tasksFile),n=$t("pre",e);n.addClasses(["plugin-tasks-query-explanation"]),n.setText(t),e.appendChild(n)}addAllTaskGroups(e,t,n){return P(this,null,function*(){for(let i of e.groups)yield this.addGroupHeadings(t,i.groupHeadings),yield this.createTaskList(i.tasks,t,n)})}createTaskList(e,t,n){return P(this,null,function*(){let i=$t("ul",t);i.addClasses(["contains-task-list","plugin-tasks-query-result"]);let s=new ac(this.query.taskLayoutOptions);i.addClasses(s.generateHiddenClasses());let a=new sc(this.query.queryLayoutOptions);i.addClasses(a.getHiddenClasses());let o=this.getGroupingAttribute();o&&o.length>0&&(i.dataset.taskGroupBy=o);let u=new ii({obsidianComponent:this.obsidianComponent,parentUlElement:i,taskLayoutOptions:this.query.taskLayoutOptions,queryLayoutOptions:this.query.queryLayoutOptions});for(let[l,c]of e.entries())yield this.addTask(i,u,c,l,n);t.appendChild(i)})}addTask(e,t,n,i,s){return P(this,null,function*(){let a=this.isFilenameUnique({task:n},s.allMarkdownFiles),o=yield t.renderTaskLine(n,i,a);o.querySelectorAll("[data-footnote-id]").forEach(d=>d.remove());let l=o.createSpan("task-extras");this.query.queryLayoutOptions.hideUrgency||this.addUrgency(l,n);let c=this.query.queryLayoutOptions.shortMode;this.query.queryLayoutOptions.hideBacklinks||this.addBacklinks(l,n,c,a,s),this.query.queryLayoutOptions.hideEditButton||this.addEditButton(l,n,s),!this.query.queryLayoutOptions.hidePostponeButton&&gk(n)&&this.addPostponeButton(l,n,c),e.appendChild(o)})}addEditButton(e,t,n){let i=$t("a",e);i.addClass("tasks-edit"),i.title="Edit task",i.href="#",i.onClickEvent(s=>{n.editTaskPencilClickHandler(s,t,n.allTasks)})}addUrgency(e,t){let n=new Intl.NumberFormat().format(t.urgency);e.createSpan({text:n,cls:"tasks-urgency"})}addGroupHeadings(e,t){return P(this,null,function*(){for(let n of t)yield this.addGroupHeading(e,n)})}addGroupHeading(e,t){return P(this,null,function*(){let n="h6";t.nestingLevel===0?n="h4":t.nestingLevel===1&&(n="h5");let i=$t(n,e);i.addClass("tasks-group-heading"),yield this.renderMarkdown(t.displayName,i,this.tasksFile.path,this.obsidianComponent)})}addBacklinks(e,t,n,i,s){var l;let a=e.createSpan({cls:"tasks-backlink"});n||a.append(" (");let o=$t("a",a);o.rel="noopener",o.target="_blank",o.addClass("internal-link"),n&&o.addClass("internal-link-short-mode");let u;n?u=" \u{1F517}":u=(l=t.getLinkText({isFilenameUnique:i}))!=null?l:"",o.setText(u),o.addEventListener("click",c=>P(this,null,function*(){yield s.backlinksClickHandler(c,t)})),o.addEventListener("mousedown",c=>P(this,null,function*(){yield s.backlinksMousedownHandler(c,t)})),n||a.append(")")}addPostponeButton(e,t,n){let s="day",a=wk(t,1,s),o=$t("a",e);o.addClass("tasks-postpone"),n&&o.addClass("tasks-postpone-short-mode"),o.title=a,o.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),si.postponeOnClickCallback(o,t,1,s)}),o.addEventListener("contextmenu",u=>P(this,null,function*(){u.preventDefault(),u.stopPropagation(),new si(o,t).showAtPosition({x:u.clientX,y:u.clientY})}))}addTaskCount(e,t){this.query.queryLayoutOptions.hideTaskCount||e.createDiv({text:t.totalTasksCountDisplayText(),cls:"tasks-count"})}isFilenameUnique({task:e},t){let n=e.path.match(/([^/]*)\..+$/i);if(n===null)return;let i=n[1];return t.filter(a=>{if(a.basename===i)return!0}).length<2}getGroupingAttribute(){let e=[];for(let t of this.query.grouping)e.push(t.property);return e.join(",")}};var uc=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.plugin=e,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return P(this,null,function*(){let i=new Lh({app:this.app,plugin:this.plugin,events:this.events,container:t,source:e,tasksFile:new at(n.sourcePath)});n.addChild(i),i.load()})}},Lh=class extends lc.MarkdownRenderChild{constructor({app:t,plugin:n,events:i,container:s,source:a,tasksFile:o}){super(s);this.queryResultsRenderer=new oc(this.containerEl.className,a,o,lc.MarkdownRenderer.renderMarkdown,this),this.app=t,this.plugin=n,this.events=i}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,i=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.queryResultsRenderer.query=Wo(this.queryResultsRenderer.source,tr.getInstance(),this.queryResultsRenderer.tasksFile),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return P(this,arguments,function*({tasks:t,state:n}){var a;let s=$t("div",this.containerEl);yield this.queryResultsRenderer.render2(n,t,s,{allTasks:this.plugin.getTasks(),allMarkdownFiles:this.app.vault.getMarkdownFiles(),backlinksClickHandler:$F,backlinksMousedownHandler:jF,editTaskPencilClickHandler:qF}),(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}};function qF(r,e,t){r.preventDefault();let n=s=>P(this,null,function*(){yield br({originalTask:e,newTasks:yt.removeInferredStatusIfNeeded(e,s)})});new Kn({app,task:e,onSubmit:n,allTasks:t}).open()}function $F(r,e){return P(this,null,function*(){let t=yield nh(e,app.vault);if(t){let[n,i]=t,s=app.workspace.getLeaf(Dk.Keymap.isModEvent(r));r.preventDefault(),yield s.openFile(i,{eState:{line:n}})}})}function jF(r,e){return P(this,null,function*(){if(r.button===1){let t=yield nh(e,app.vault);if(t){let[n,i]=t,s=app.workspace.getLeaf("tab");r.preventDefault(),yield s.openFile(i,{eState:{line:n}})}}})}var ve=require("obsidian");var cc=class{constructor(e){this._markdown="";this.columnNames=e,this.addTitleRow()}get markdown(){return this._markdown}addTitleRow(){let e="|",t="|";this.columnNames.forEach(n=>{e+=` ${n} |`,t+=" ----- |"}),this._markdown+=`${e} +${s.explainQuery(a)}`,i}function Wo(r,e,t){let n=new Nn(r,t);return n.ignoreGlobalQuery?n:e.query(t).append(n)}function qo(r,e,t){e&&r.push(WF(t))}function WF(r){return`tasks-layout-hide-${r}`}var sc=class{constructor(e){e?this.queryLayoutOptions=e:this.queryLayoutOptions=new Qn}getHiddenClasses(){let e=[],t=[[this.queryLayoutOptions.hideUrgency,"urgency"],[this.queryLayoutOptions.hideBacklinks,"backlinks"],[this.queryLayoutOptions.hideEditButton,"edit-button"],[this.queryLayoutOptions.hidePostponeButton,"postpone-button"]];for(let[n,i]of t)qo(e,n,i);return this.queryLayoutOptions.shortMode&&e.push("tasks-layout-short-mode"),e}};var ac=class{constructor(e){e?this.taskLayoutOptions=e:this.taskLayoutOptions=new zr}generateHiddenClasses(){let e=[];return this.taskLayoutOptions.toggleableComponents.forEach(t=>{qo(e,!this.taskLayoutOptions.isShown(t),t)}),qo(e,!this.taskLayoutOptions.areTagsShown(),"tags"),e}};var $o=class{constructor(e){this.label=e,this.start()}start(){!this.recordTimings()||performance.mark(this.labelForStart())}finish(){!this.recordTimings()||(performance.mark(this.labelForEnd()),performance.measure(this.label,this.labelForStart(),this.labelForEnd()),this.printDuration())}printDuration(){let e=performance.getEntriesByName(this.label),t=e[e.length-1];t?console.log(this.label+":",t.duration.toFixed(2),"milliseconds"):console.log(`Measurement for ${this.label} not found`)}labelForStart(){return`${this.label} - start`}labelForEnd(){return`${this.label} - end`}recordTimings(){let{debugSettings:e}=X();return e.recordTimings}};function gk(r){for(let t of ae.allDateFields()){let n=r[t];if(n&&!n.isValid())return!1}let e=r.happensDates.some(t=>!!(t!=null&&t.isValid()));return!r.isDone&&e}function jo(r){return r.dueDate?"dueDate":r.scheduledDate?"scheduledDate":r.startDate?"startDate":null}function Nh(r,e,t,n){let i=r[e];return Tk(i,r,e,t,n)}function yk(r,e,t,n){let i=window.moment();return Tk(i,r,e,t,n)}function bk(r,e,t,n){return _k(r,e,null)}function Tk(r,e,t,n,i){let s=new It(r).postpone(n,i);return _k(e,t,s)}function _k(r,e,t){let n=yt.removeInferredStatusIfNeeded(r,[new ae(he(K({},r),{[e]:t}))])[0];return{postponedDate:t,postponedTask:n}}function vk(r,e){if(r){let t=r==null?void 0:r.format("DD MMM YYYY");return`Task's ${e} changed to ${t}`}else return`Task's ${e} removed`}function wk(r,e,t){return`\u2139\uFE0F ${Ih(r,e,t)} (right-click for more options)`}function Ih(r,e,t){let n=jo(r),i=r[n];return Ok(n,i,e,t)}function kk(r,e,t){let n=jo(r),i=window.moment().startOf("day");return Ok(n,i,e,t)}function Ek(r,e,t){let n=jo(r);return n==="scheduledDate"&&r.scheduledDateIsInferred?"Cannot remove inferred scheduled date":`Remove ${Sk(n)}`}function qF(r){return Es(r.replace("Date",""))}function Sk(r){return r.replace("Date"," date")}function Ok(r,e,t,n){let s=new It(e).postpone(n,t).format("ddd Do MMM"),a=t!=1?t:"a";return e.isSameOrBefore(window.moment(),"day")?`${qF(r)} in ${a} ${n}, on ${s}`.replace(" in 0 days"," today").replace("in a day","tomorrow"):`Postpone ${Sk(r)} by ${a} ${n}, to ${s}`}var Fh=require("obsidian");var si=class extends zs{constructor(e,t,n=Uo){super(n);let i=(l,c,d,p,m,y)=>{let _=m(t,p,d);c.setTitle(_).onClick(()=>si.postponeOnClickCallback(l,t,p,d,y,n))},s=kk,a=yk;this.addItem(l=>i(e,l,"days",0,s,a)),this.addItem(l=>i(e,l,"day",1,s,a)),this.addSeparator();let o=Ih,u=Nh;this.addItem(l=>i(e,l,"days",2,o,u)),this.addItem(l=>i(e,l,"days",3,o,u)),this.addItem(l=>i(e,l,"days",4,o,u)),this.addItem(l=>i(e,l,"days",5,o,u)),this.addItem(l=>i(e,l,"days",6,o,u)),this.addSeparator(),this.addItem(l=>i(e,l,"week",1,o,u)),this.addItem(l=>i(e,l,"weeks",2,o,u)),this.addItem(l=>i(e,l,"weeks",3,o,u)),this.addItem(l=>i(e,l,"month",1,o,u)),this.addSeparator(),this.addItem(l=>i(e,l,"days",2,Ek,bk))}static postponeOnClickCallback(o,u,l,c){return P(this,arguments,function*(e,t,n,i,s=Nh,a=Uo){let d=jo(t);if(d===null){let y="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new Fh.Notice(y,1e4)}let{postponedDate:p,postponedTask:m}=s(t,d,i,n);yield a(t,m),si.postponeSuccessCallback(e,d,p)})}static postponeSuccessCallback(e,t,n){e.style.pointerEvents="none";let i=vk(n,t);new Fh.Notice(i,2e3)}};var oc=class{constructor(e,t,n,i,s){switch(this.source=t,this.tasksFile=n,this.renderMarkdown=i,this.obsidianComponent=s,e){case"block-language-tasks":this.query=Wo(this.source,tr.getInstance(),this.tasksFile),this.queryType="tasks";break;default:this.query=Wo(this.source,tr.getInstance(),this.tasksFile),this.queryType="tasks";break}}get filePath(){var e,t;return(t=(e=this.tasksFile)==null?void 0:e.path)!=null?t:void 0}render2(e,t,n,i){return P(this,null,function*(){e==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(t,e,n,i):this.query.error!==void 0?this.renderErrorMessage(n,this.query.error):this.renderLoadingMessage(n)})}renderQuerySearchResults(e,t,n,i){return P(this,null,function*(){let s=this.explainAndPerformSearch(t,e,n);if(s.searchErrorMessage!==void 0){this.renderErrorMessage(n,s.searchErrorMessage);return}yield this.renderSearchResults(s,n,i)})}explainAndPerformSearch(e,t,n){let i=new $o(`Search: ${this.query.queryId} - ${this.filePath}`);i.start(),this.query.debug(`[render] Render called: plugin state: ${e}; searching ${t.length} tasks`),this.query.queryLayoutOptions.explainQuery&&this.createExplanation(n);let s=this.query.applyQueryToTasks(t);return i.finish(),s}renderSearchResults(e,t,n){return P(this,null,function*(){let i=new $o(`Render: ${this.query.queryId} - ${this.filePath}`);i.start(),yield this.addAllTaskGroups(e.taskGroups,t,n);let s=e.totalTasksCount;this.addTaskCount(t,e),this.query.debug(`[render] ${s} tasks displayed`),i.finish()})}renderErrorMessage(e,t){e.createDiv().innerHTML=`
Tasks query: ${t.replace(/\n/g,"
")}
`}renderLoadingMessage(e){e.setText("Loading Tasks ...")}createExplanation(e){let t=hk(this.source,_e.getInstance(),tr.getInstance(),this.tasksFile),n=$t("pre",e);n.addClasses(["plugin-tasks-query-explanation"]),n.setText(t),e.appendChild(n)}addAllTaskGroups(e,t,n){return P(this,null,function*(){for(let i of e.groups)yield this.addGroupHeadings(t,i.groupHeadings),yield this.createTaskList(i.tasks,t,n)})}createTaskList(e,t,n){return P(this,null,function*(){let i=$t("ul",t);i.addClasses(["contains-task-list","plugin-tasks-query-result"]);let s=new ac(this.query.taskLayoutOptions);i.addClasses(s.generateHiddenClasses());let a=new sc(this.query.queryLayoutOptions);i.addClasses(a.getHiddenClasses());let o=this.getGroupingAttribute();o&&o.length>0&&(i.dataset.taskGroupBy=o);let u=new ii({obsidianComponent:this.obsidianComponent,parentUlElement:i,taskLayoutOptions:this.query.taskLayoutOptions,queryLayoutOptions:this.query.queryLayoutOptions});for(let[l,c]of e.entries())yield this.addTask(i,u,c,l,n);t.appendChild(i)})}addTask(e,t,n,i,s){return P(this,null,function*(){let a=this.isFilenameUnique({task:n},s.allMarkdownFiles),o=yield t.renderTaskLine(n,i,a);o.querySelectorAll("[data-footnote-id]").forEach(d=>d.remove());let l=o.createSpan("task-extras");this.query.queryLayoutOptions.hideUrgency||this.addUrgency(l,n);let c=this.query.queryLayoutOptions.shortMode;this.query.queryLayoutOptions.hideBacklinks||this.addBacklinks(l,n,c,a,s),this.query.queryLayoutOptions.hideEditButton||this.addEditButton(l,n,s),!this.query.queryLayoutOptions.hidePostponeButton&&gk(n)&&this.addPostponeButton(l,n,c),e.appendChild(o)})}addEditButton(e,t,n){let i=$t("a",e);i.addClass("tasks-edit"),i.title="Edit task",i.href="#",i.onClickEvent(s=>{n.editTaskPencilClickHandler(s,t,n.allTasks)})}addUrgency(e,t){let n=new Intl.NumberFormat().format(t.urgency);e.createSpan({text:n,cls:"tasks-urgency"})}addGroupHeadings(e,t){return P(this,null,function*(){for(let n of t)yield this.addGroupHeading(e,n)})}addGroupHeading(e,t){return P(this,null,function*(){let n="h6";t.nestingLevel===0?n="h4":t.nestingLevel===1&&(n="h5");let i=$t(n,e);i.addClass("tasks-group-heading"),yield this.renderMarkdown(t.displayName,i,this.tasksFile.path,this.obsidianComponent)})}addBacklinks(e,t,n,i,s){var l;let a=e.createSpan({cls:"tasks-backlink"});n||a.append(" (");let o=$t("a",a);o.rel="noopener",o.target="_blank",o.addClass("internal-link"),n&&o.addClass("internal-link-short-mode");let u;n?u=" \u{1F517}":u=(l=t.getLinkText({isFilenameUnique:i}))!=null?l:"",o.setText(u),o.addEventListener("click",c=>P(this,null,function*(){yield s.backlinksClickHandler(c,t)})),o.addEventListener("mousedown",c=>P(this,null,function*(){yield s.backlinksMousedownHandler(c,t)})),n||a.append(")")}addPostponeButton(e,t,n){let s="day",a=wk(t,1,s),o=$t("a",e);o.addClass("tasks-postpone"),n&&o.addClass("tasks-postpone-short-mode"),o.title=a,o.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),si.postponeOnClickCallback(o,t,1,s)}),o.addEventListener("contextmenu",u=>P(this,null,function*(){u.preventDefault(),u.stopPropagation(),new si(o,t).showAtPosition({x:u.clientX,y:u.clientY})}))}addTaskCount(e,t){this.query.queryLayoutOptions.hideTaskCount||e.createDiv({text:t.totalTasksCountDisplayText(),cls:"tasks-count"})}isFilenameUnique({task:e},t){let n=e.path.match(/([^/]*)\..+$/i);if(n===null)return;let i=n[1];return t.filter(a=>{if(a.basename===i)return!0}).length<2}getGroupingAttribute(){let e=[];for(let t of this.query.grouping)e.push(t.property);return e.join(",")}};var uc=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.plugin=e,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return P(this,null,function*(){let i=new Lh({app:this.app,plugin:this.plugin,events:this.events,container:t,source:e,tasksFile:new at(n.sourcePath)});n.addChild(i),i.load()})}},Lh=class extends lc.MarkdownRenderChild{constructor({app:t,plugin:n,events:i,container:s,source:a,tasksFile:o}){super(s);this.queryResultsRenderer=new oc(this.containerEl.className,a,o,lc.MarkdownRenderer.renderMarkdown,this),this.app=t,this.plugin=n,this.events=i}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,i=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.queryResultsRenderer.query=Wo(this.queryResultsRenderer.source,tr.getInstance(),this.queryResultsRenderer.tasksFile),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return P(this,arguments,function*({tasks:t,state:n}){var a;let s=$t("div",this.containerEl);yield this.queryResultsRenderer.render2(n,t,s,{allTasks:this.plugin.getTasks(),allMarkdownFiles:this.app.vault.getMarkdownFiles(),backlinksClickHandler:jF,backlinksMousedownHandler:GF,editTaskPencilClickHandler:$F}),(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}};function $F(r,e,t){r.preventDefault();let n=s=>P(this,null,function*(){yield br({originalTask:e,newTasks:yt.removeInferredStatusIfNeeded(e,s)})});new Kn({app,task:e,onSubmit:n,allTasks:t}).open()}function jF(r,e){return P(this,null,function*(){let t=yield nh(e,app.vault);if(t){let[n,i]=t,s=app.workspace.getLeaf(Dk.Keymap.isModEvent(r));r.preventDefault(),yield s.openFile(i,{eState:{line:n}})}})}function GF(r,e){return P(this,null,function*(){if(r.button===1){let t=yield nh(e,app.vault);if(t){let[n,i]=t,s=app.workspace.getLeaf("tab");r.preventDefault(),yield s.openFile(i,{eState:{line:n}})}}})}var ve=require("obsidian");var cc=class{constructor(e){this._markdown="";this.columnNames=e,this.addTitleRow()}get markdown(){return this._markdown}addTitleRow(){let e="|",t="|";this.columnNames.forEach(n=>{e+=` ${n} |`,t+=" ----- |"}),this._markdown+=`${e} `,this._markdown+=`${t} `}addRow(e){let t=this.makeRowText(e);this._markdown+=`${t} `}addRowIfNew(e){let t=this.makeRowText(e);this._markdown.includes(t)||(this._markdown+=`${t} -`)}makeRowText(e){let t="|";return e.forEach(n=>{t+=` ${n} |`}),t}};function xk(r,e){return r.findIndex(t=>t.symbol===e)}function In(r){return r===""?r:"`"+(r!==" "?r:"space")+"`"}function GF(r,e){let t=ne.getTypeForUnknownSymbol(r.symbol);r.type!==t&&(t==="TODO"&&r.symbol!==" "||e.push(`For information, the conventional type for status symbol ${In(r.symbol)} is ${In(t)}: you may wish to review this type.`))}function YF(r,e,t){let n=xk(r,e.nextStatusSymbol);if(n===-1){t.push(`Next symbol ${In(e.nextStatusSymbol)} is unknown: create a status with symbol ${In(e.nextStatusSymbol)}.`);return}if(e.type!=="DONE")return;let i=r[n];if(i){if(i.type!=="TODO"&&i.type!=="IN_PROGRESS"){let s="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses",a=[`This \`DONE\` status is followed by ${In(i.type)}, not \`TODO\` or \`IN_PROGRESS\`.`,"If used to complete a recurring task, it will instead be followed by `TODO` or `IN_PROGRESS`, to ensure the next task matches the `not done` filter.",`See [Recurring Tasks and Custom Statuses](${s}).`].join("
");t.push(a)}}else t.push("Unexpected failure to find the next status.")}function BF(r,e,t){let n=[];return e.symbol===ne.EMPTY.symbol?(n.push("Empty symbol: this status will be ignored."),n):xk(r,e.symbol)!=t?(n.push(`Duplicate symbol '${In(e.symbol)}': this status will be ignored.`),n):(GF(e,n),YF(r,e,n),n)}function Rk(r){let e=new cc(["Status Symbol","Next Status Symbol","Status Name","Status Type","Problems (if any)"]),t=Le.allStatuses(r);return t.forEach((n,i)=>{e.addRow([In(n.symbol),In(n.nextStatusSymbol),n.name,In(n.type),BF(t,n,i).join("
")])}),e.markdown}function Mk(r,e,t,n){let s=Rk(r),a=e.mermaidDiagram(!0);return`# ${t} +`)}makeRowText(e){let t="|";return e.forEach(n=>{t+=` ${n} |`}),t}};function xk(r,e){return r.findIndex(t=>t.symbol===e)}function In(r){return r===""?r:"`"+(r!==" "?r:"space")+"`"}function YF(r,e){let t=ne.getTypeForUnknownSymbol(r.symbol);r.type!==t&&(t==="TODO"&&r.symbol!==" "||e.push(`For information, the conventional type for status symbol ${In(r.symbol)} is ${In(t)}: you may wish to review this type.`))}function BF(r,e,t){let n=xk(r,e.nextStatusSymbol);if(n===-1){t.push(`Next symbol ${In(e.nextStatusSymbol)} is unknown: create a status with symbol ${In(e.nextStatusSymbol)}.`);return}if(e.type!=="DONE")return;let i=r[n];if(i){if(i.type!=="TODO"&&i.type!=="IN_PROGRESS"){let s="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses",a=[`This \`DONE\` status is followed by ${In(i.type)}, not \`TODO\` or \`IN_PROGRESS\`.`,"If used to complete a recurring task, it will instead be followed by `TODO` or `IN_PROGRESS`, to ensure the next task matches the `not done` filter.",`See [Recurring Tasks and Custom Statuses](${s}).`].join("
");t.push(a)}}else t.push("Unexpected failure to find the next status.")}function HF(r,e,t){let n=[];return e.symbol===ne.EMPTY.symbol?(n.push("Empty symbol: this status will be ignored."),n):xk(r,e.symbol)!=t?(n.push(`Duplicate symbol '${In(e.symbol)}': this status will be ignored.`),n):(YF(e,n),BF(r,e,n),n)}function Rk(r){let e=new cc(["Status Symbol","Next Status Symbol","Status Name","Status Type","Problems (if any)"]),t=Le.allStatuses(r);return t.forEach((n,i)=>{e.addRow([In(n.symbol),In(n.nextStatusSymbol),n.name,In(n.type),HF(t,n,i).join("
")])}),e.markdown}function Mk(r,e,t,n){let s=Rk(r),a=e.mermaidDiagram(!0);return`# ${t} ## About this file @@ -352,13 +352,13 @@ ${s} These are the settings actually used by Tasks. -${a}`}function Ck(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function Ak(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function Pk(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function Nk(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function Ik(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],["f","Fire","x","TODO"],["k","Key","x","TODO"],["w","Win","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function Fk(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function Lk(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}var Uk=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"

These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.

You can add edit and add your own custom statuses in the section below.

"},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertTaskCoreStatusSettings",featureFlag:"",notice:null}]},{text:"Custom Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:`

You should first select and install a CSS Snippet or Theme to style custom checkboxes.

Then, use the buttons below to set up your custom statuses, to match your chosen CSS checkboxes.

Note Any statuses with the same symbol as any earlier statuses will be ignored. You can confirm the actually loaded statuses by running the 'Create or edit task' command and looking at the Status drop-down.

See the documentation to get started!

`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}];var Ur=require("obsidian");var Gi=class{validate(e){let t=[];return t.push(...this.validateSymbol(e)),t.push(...this.validateName(e)),t.push(...this.validateNextSymbol(e)),t}validateStatusCollectionEntry(e){let[t,n,i,s]=e,a=[];if(a.push(...this.validateType(s)),t===i&&s!=="NON_TASK"&&a.push(`Status symbol '${t}' toggles to itself`),a.length>0)return a;let o=ne.createFromImportedValue(e).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(e){return Gi.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return Gi.validateOneSymbol(e.nextStatusSymbol,"Task Next Status Symbol")}validateName(e){let t=[];return e.name.length===0&&t.push("Task Status Name cannot be empty."),t}validateType(e){let t=Nt[e],n=[];return t||n.push(`Status Type "${e}" is not a valid type`),t=="EMPTY"&&n.push('Status Type "EMPTY" is not permitted in user data'),n}validateSymbolTypeConventions(e){let t=[],n=e.symbol,i=new De,s=n==="X"?"x":n,a=i.bySymbol(s);return a.type!=="EMPTY"&&(e.nextStatusSymbol!==a.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${a.nextStatusSymbol}'`),e.type!==a.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${a.type}'`)),t}static validateOneSymbol(e,t){let n=[];return e.length===0&&n.push(`${t} cannot be empty.`),e.length>1&&n.push(`${t} ("${e}") must be a single character.`),n}};var Yi=new Gi,rr=class extends Ur.Modal{constructor(t,n,i){super(t.app);this.plugin=t;this.saved=!1;this.error=!1;this.statusSymbol=n.symbol,this.statusName=n.name,this.statusNextSymbol=n.nextStatusSymbol,this.statusAvailableAsCommand=n.availableAsCommand,this.type=n.type,this.isCoreStatus=i}statusConfiguration(){return new Ke(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return P(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),i;new Ur.Setting(n).setName("Task Status Symbol").setDesc("This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)").addText(l=>{i=l,l.setValue(this.statusSymbol).onChange(c=>{this.statusSymbol=c,rr.setValid(l,Yi.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(l=>{rr.setValid(i,Yi.validateSymbol(this.statusConfiguration()))});let s;new Ur.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(l=>{s=l,l.setValue(this.statusName).onChange(c=>{this.statusName=c,rr.setValid(l,Yi.validateName(this.statusConfiguration()))})}).then(l=>{rr.setValid(s,Yi.validateName(this.statusConfiguration()))});let a;new Ur.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(l=>{a=l,l.setValue(this.statusNextSymbol).onChange(c=>{this.statusNextSymbol=c,rr.setValid(l,Yi.validateNextSymbol(this.statusConfiguration()))})}).then(l=>{rr.setValid(a,Yi.validateNextSymbol(this.statusConfiguration()))}),new Ur.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(l=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(d=>{l.addOption(d,d)}),l.setValue(this.type).onChange(d=>{this.type=ne.getTypeFromStatusTypeString(d)})}),ne.tasksPluginCanCreateCommandsForStatuses()&&new Ur.Setting(n).setName("Available as command").setDesc("If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.").addToggle(l=>{l.setValue(this.statusAvailableAsCommand).onChange(c=>P(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=t.createDiv(),u=new Ur.Setting(o);u.addButton(l=>(l.setTooltip("Save").setIcon("checkmark").onClick(()=>P(this,null,function*(){let c=Yi.validate(this.statusConfiguration());if(c.length>0){let d=c.join(` +${a}`}function Ck(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function Ak(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function Pk(){return[[" ","To Do","x","TODO"],["/","In Progress","x","IN_PROGRESS"],["x","Done"," ","DONE"],["-","Cancelled"," ","CANCELLED"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["i","Infomation","x","TODO"],["S","Amount","x","TODO"],["*","Star","x","TODO"],["b","Bookmark","x","TODO"],["\u201C","Quote","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["I","Idea","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function Nk(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function Ik(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function Fk(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],["f","Fire","x","TODO"],["k","Key","x","TODO"],["w","Win","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function Lk(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function Uk(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}var Wk=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"

These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.

You can add edit and add your own custom statuses in the section below.

"},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertTaskCoreStatusSettings",featureFlag:"",notice:null}]},{text:"Custom Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:`

You should first select and install a CSS Snippet or Theme to style custom checkboxes.

Then, use the buttons below to set up your custom statuses, to match your chosen CSS checkboxes.

Note Any statuses with the same symbol as any earlier statuses will be ignored. You can confirm the actually loaded statuses by running the 'Create or edit task' command and looking at the Status drop-down.

See the documentation to get started!

`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}];var Ur=require("obsidian");var Gi=class{validate(e){let t=[];return t.push(...this.validateSymbol(e)),t.push(...this.validateName(e)),t.push(...this.validateNextSymbol(e)),t}validateStatusCollectionEntry(e){let[t,n,i,s]=e,a=[];if(a.push(...this.validateType(s)),t===i&&s!=="NON_TASK"&&a.push(`Status symbol '${t}' toggles to itself`),a.length>0)return a;let o=ne.createFromImportedValue(e).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(e){return Gi.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return Gi.validateOneSymbol(e.nextStatusSymbol,"Task Next Status Symbol")}validateName(e){let t=[];return e.name.length===0&&t.push("Task Status Name cannot be empty."),t}validateType(e){let t=Nt[e],n=[];return t||n.push(`Status Type "${e}" is not a valid type`),t=="EMPTY"&&n.push('Status Type "EMPTY" is not permitted in user data'),n}validateSymbolTypeConventions(e){let t=[],n=e.symbol,i=new De,s=n==="X"?"x":n,a=i.bySymbol(s);return a.type!=="EMPTY"&&(e.nextStatusSymbol!==a.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${a.nextStatusSymbol}'`),e.type!==a.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${a.type}'`)),t}static validateOneSymbol(e,t){let n=[];return e.length===0&&n.push(`${t} cannot be empty.`),e.length>1&&n.push(`${t} ("${e}") must be a single character.`),n}};var Yi=new Gi,rr=class extends Ur.Modal{constructor(t,n,i){super(t.app);this.plugin=t;this.saved=!1;this.error=!1;this.statusSymbol=n.symbol,this.statusName=n.name,this.statusNextSymbol=n.nextStatusSymbol,this.statusAvailableAsCommand=n.availableAsCommand,this.type=n.type,this.isCoreStatus=i}statusConfiguration(){return new Ke(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return P(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),i;new Ur.Setting(n).setName("Task Status Symbol").setDesc("This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)").addText(l=>{i=l,l.setValue(this.statusSymbol).onChange(c=>{this.statusSymbol=c,rr.setValid(l,Yi.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(l=>{rr.setValid(i,Yi.validateSymbol(this.statusConfiguration()))});let s;new Ur.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(l=>{s=l,l.setValue(this.statusName).onChange(c=>{this.statusName=c,rr.setValid(l,Yi.validateName(this.statusConfiguration()))})}).then(l=>{rr.setValid(s,Yi.validateName(this.statusConfiguration()))});let a;new Ur.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(l=>{a=l,l.setValue(this.statusNextSymbol).onChange(c=>{this.statusNextSymbol=c,rr.setValid(l,Yi.validateNextSymbol(this.statusConfiguration()))})}).then(l=>{rr.setValid(a,Yi.validateNextSymbol(this.statusConfiguration()))}),new Ur.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(l=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(d=>{l.addOption(d,d)}),l.setValue(this.type).onChange(d=>{this.type=ne.getTypeFromStatusTypeString(d)})}),ne.tasksPluginCanCreateCommandsForStatuses()&&new Ur.Setting(n).setName("Available as command").setDesc("If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.").addToggle(l=>{l.setValue(this.statusAvailableAsCommand).onChange(c=>P(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=t.createDiv(),u=new Ur.Setting(o);u.addButton(l=>(l.setTooltip("Save").setIcon("checkmark").onClick(()=>P(this,null,function*(){let c=Yi.validate(this.statusConfiguration());if(c.length>0){let d=c.join(` `)+` -Fix errors before saving.`;new Ur.Notice(d);return}this.saved=!0,this.close()})),l)),u.addExtraButton(l=>(l.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),l))})}onOpen(){this.display()}static setValidationError(t){t.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(t){t.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(t,n){n.length===0?rr.removeValidationError(t):rr.setValidationError(t)}};var Rt=class extends ve.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return P(this,null,function*(){yield this.plugin.saveSettings(),t&&this.display()})}display(){let{containerEl:t}=this;t.empty(),this.containerEl.addClass("tasks-settings"),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Task Format Settings"}),new ve.Setting(t).setName("Task Format").setDesc(Rt.createFragmentWithHTML('

The format that Tasks uses to read and write tasks.

Important: Tasks currently only supports one format at a time. Selecting Dataview will currently stop Tasks reading its own emoji signifiers.

See the documentation.

')).addDropdown(i=>{for(let s of Object.keys(Mr))i.addOption(s,Mr[s].displayName);i.setValue(X().taskFormat).onChange(s=>P(this,null,function*(){Ve({taskFormat:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global filter Settings"}),new ve.Setting(t).setName("Global task filter").setDesc(Rt.createFragmentWithHTML('

Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.

Use a global filter if you want Tasks to only act on a subset of your "- [ ]" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.

For example, if you set the global filter to #task, the Tasks plugin will only handle checklist items tagged with #task.
Other checklist items will remain normal checklist items and not appear in queries or get a done date set.

See the documentation.

')).addText(i=>{i.setPlaceholder("e.g. #task or TODO").setValue(_e.getInstance().get()).onChange(s=>P(this,null,function*(){Ve({globalFilter:s}),_e.getInstance().set(s),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(i=>{let s=X();i.setValue(s.removeGlobalFilter).onChange(a=>P(this,null,function*(){Ve({removeGlobalFilter:a}),_e.getInstance().setRemoveGlobalFilter(a),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global Query"}),KF(new ve.Setting(t).setDesc(Rt.createFragmentWithHTML('

A query that is automatically included at the start of every Tasks block in the vault. Useful for adding default filters, or layout options.

See the documentation.

')).addTextArea(i=>{let s=X();i.inputEl.rows=4,i.setPlaceholder(`# For example... +Fix errors before saving.`;new Ur.Notice(d);return}this.saved=!0,this.close()})),l)),u.addExtraButton(l=>(l.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),l))})}onOpen(){this.display()}static setValidationError(t){t.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(t){t.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(t,n){n.length===0?rr.removeValidationError(t):rr.setValidationError(t)}};var Rt=class extends ve.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return P(this,null,function*(){yield this.plugin.saveSettings(),t&&this.display()})}display(){let{containerEl:t}=this;t.empty(),this.containerEl.addClass("tasks-settings"),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Task Format Settings"}),new ve.Setting(t).setName("Task Format").setDesc(Rt.createFragmentWithHTML('

The format that Tasks uses to read and write tasks.

Important: Tasks currently only supports one format at a time. Selecting Dataview will currently stop Tasks reading its own emoji signifiers.

See the documentation.

')).addDropdown(i=>{for(let s of Object.keys(Mr))i.addOption(s,Mr[s].displayName);i.setValue(X().taskFormat).onChange(s=>P(this,null,function*(){Ve({taskFormat:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global filter Settings"}),new ve.Setting(t).setName("Global task filter").setDesc(Rt.createFragmentWithHTML('

Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.

Use a global filter if you want Tasks to only act on a subset of your "- [ ]" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.

For example, if you set the global filter to #task, the Tasks plugin will only handle checklist items tagged with #task.
Other checklist items will remain normal checklist items and not appear in queries or get a done date set.

See the documentation.

')).addText(i=>{i.setPlaceholder("e.g. #task or TODO").setValue(_e.getInstance().get()).onChange(s=>P(this,null,function*(){Ve({globalFilter:s}),_e.getInstance().set(s),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(i=>{let s=X();i.setValue(s.removeGlobalFilter).onChange(a=>P(this,null,function*(){Ve({removeGlobalFilter:a}),_e.getInstance().setRemoveGlobalFilter(a),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global Query"}),QF(new ve.Setting(t).setDesc(Rt.createFragmentWithHTML('

A query that is automatically included at the start of every Tasks block in the vault. Useful for adding default filters, or layout options.

See the documentation.

')).addTextArea(i=>{let s=X();i.inputEl.rows=4,i.setPlaceholder(`# For example... path does not include _templates/ limit 300 -show urgency`).setValue(s.globalQuery).onChange(a=>P(this,null,function*(){Ve({globalQuery:a}),tr.getInstance().set(a),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=X();Uk.forEach(i=>{this.addOneSettingsBlock(t,i,n)}),t.createEl("h4",{text:"Date Settings"}),new ve.Setting(t).setName("Set created date on every added task").setDesc(Rt.createFragmentWithHTML(`Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.

See the documentation.

`)).addToggle(i=>{let s=X();i.setValue(s.setCreatedDate).onChange(a=>P(this,null,function*(){Ve({setCreatedDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Set done date on every completed task").setDesc(Rt.createFragmentWithHTML('Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.setDoneDate).onChange(a=>P(this,null,function*(){Ve({setDoneDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Set cancelled date on every cancelled task").setDesc(Rt.createFragmentWithHTML('Enabling this will add a timestamp \u274C YYYY-MM-DD at the end when a task is toggled to cancelled.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.setCancelledDate).onChange(a=>P(this,null,function*(){Ve({setCancelledDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Rt.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.
If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.
By default, Tasks plugin will match both YYYY-MM-DD and YYYYMMDD date formats.
Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.useFilenameAsScheduledDate).onChange(a=>P(this,null,function*(){Ve({useFilenameAsScheduledDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Additional filename date format as Scheduled date for undated tasks").setDesc(Rt.createFragmentWithHTML('An additional date format that Tasks plugin will recogize when using the file name as the Scheduled date for undated tasks.

Syntax Reference

')).addText(i=>{let s=X();i.setPlaceholder("example: MMM DD YYYY").setValue(s.filenameAsScheduledDateFormat).onChange(a=>P(this,null,function*(){Ve({filenameAsScheduledDateFormat:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(i=>P(this,null,function*(){let s=X();yield this.plugin.saveSettings(),i.setValue(Rt.renderFolderArray(s.filenameAsDateFolders)).onChange(a=>P(this,null,function*(){let o=Rt.parseCommaSeparatedFolders(a);Ve({filenameAsDateFolders:o}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Recurring task Settings"}),new ve.Setting(t).setName("Next recurrence appears on the line below").setDesc(Rt.createFragmentWithHTML('Enabling this will make the next recurrence of a task appear on the line below the completed task. Otherwise the next recurrence will appear before the completed one.

See the documentation.

')).addToggle(i=>{let{recurrenceOnNextLine:s}=X();i.setValue(s).onChange(a=>P(this,null,function*(){Ve({recurrenceOnNextLine:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Auto-suggest Settings"}),new ve.Setting(t).setName("Auto-suggest task content").setDesc(Rt.createFragmentWithHTML('Enabling this will open an intelligent suggest menu while typing inside a recognized task line.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.autoSuggestInEditor).onChange(a=>P(this,null,function*(){Ve({autoSuggestInEditor:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(i=>{let s=X();i.setLimits(0,3,1).setValue(s.autoSuggestMinMatch).setDynamicTooltip().onChange(a=>P(this,null,function*(){Ve({autoSuggestMinMatch:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(i=>{let s=X();i.setLimits(3,20,1).setValue(s.autoSuggestMaxItems).setDynamicTooltip().onChange(a=>P(this,null,function*(){Ve({autoSuggestMaxItems:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new ve.Setting(t).setName("Provide access keys in dialogs").setDesc(Rt.createFragmentWithHTML('If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.provideAccessKeys).onChange(a=>P(this,null,function*(){Ve({provideAccessKeys:a}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,i){let s=t.createEl("details",{cls:"tasks-nested-settings",attr:K({},n.open||i[n.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[n.text]=s.open,Ve({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");if(new ve.Setting(a).setHeading().setName(n.text),a.createDiv("collapser").createDiv("handle"),n.notice!==null){let o=s.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&o.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!Sv(o.featureFlag))&&(o.type==="checkbox"?new ve.Setting(s).setName(o.name).setDesc(o.description).addToggle(u=>{let l=X();l.generalSettings[o.settingName]||xi(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>P(this,null,function*(){xi(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new ve.Setting(s).setName(o.name).setDesc(o.description).addText(u=>{let l=X();l.generalSettings[o.settingName]||xi(o.settingName,o.initialValue);let c=d=>P(this,null,function*(){xi(o.settingName,d),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,ve.debounce)(c,500,!0))}):o.type==="textarea"?new ve.Setting(s).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=X();l.generalSettings[o.settingName]||xi(o.settingName,o.initialValue);let c=d=>P(this,null,function*(){xi(o.settingName,d),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,ve.debounce)(c,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](s,this),o.notice!==null)){let u=s.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&u.insertAdjacentHTML("beforeend",o.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:i}=X();i.coreStatuses.forEach(a=>{Wk(t,a,i.coreStatuses,i,n,n.plugin,!0)}),new ve.Setting(t).addButton(a=>{let o="Review and check your Statuses";a.setButtonText(o).setCta().onClick(()=>P(this,null,function*(){let l=window.moment().format("YYYY-MM-DD HH-mm-ss"),c=`Tasks Plugin - ${o} ${l}.md`,d=this.plugin.manifest.version,p=De.getInstance(),m=Mk(i,p,o,d),y=yield app.vault.create(c,m);yield this.app.workspace.getLeaf(!0).openFile(y)})),a.setTooltip("Create a new file in the root of the vault, containing a Mermaid diagram of the current status settings.")}).infoEl.remove()}insertCustomTaskStatusSettings(t,n){let{statusSettings:i}=X();i.customStatuses.forEach(l=>{Wk(t,l,i.customStatuses,i,n,n.plugin,!1)}),t.createEl("div"),new ve.Setting(t).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>P(this,null,function*(){Le.addStatus(i.customStatuses,new Ke("","","",!1,"TODO")),yield Xs(i,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",Ck()],["Aura Theme",Ak()],["Ebullientworks Theme",Pk()],["ITS Theme & SlRvb Checkboxes",Nk()],["Minimal Theme",Fk()],["Things Theme",Lk()],["LYT Mode Theme (Dark mode only)",Ik()]];for(let[l,c]of a)new ve.Setting(t).addButton(p=>{let m=`${l}: Add ${c.length} supported Statuses`;p.setButtonText(m).onClick(()=>P(this,null,function*(){yield zF(c,i,n)}))}).infoEl.remove();new ve.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>P(this,null,function*(){let d=this.plugin.getTasks().map(m=>m.status),p=De.getInstance().findUnknownStatuses(d);p.length!==0&&(p.forEach(m=>{Le.addStatus(i.customStatuses,m)}),yield Xs(i,n))}))}).infoEl.remove(),new ve.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>P(this,null,function*(){Le.resetAllCustomStatuses(i),yield Xs(i,n)}))}).infoEl.remove()}},Go=Rt;Go.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function Wk(r,e,t,n,i,s,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new ne(e).previewText();let u=new ve.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>P(this,null,function*(){Le.deleteStatus(t,e)&&(yield Xs(n,i))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>P(this,null,function*(){let c=new rr(s,e,a);c.onClose=()=>P(this,null,function*(){c.saved&&Le.replaceStatus(t,e,c.statusConfiguration())&&(yield Xs(n,i))}),c.open()}))}),u.infoEl.remove()}function zF(r,e,t){return P(this,null,function*(){Le.bulkAddStatusCollection(e,r).forEach(i=>{new ve.Notice(i)}),yield Xs(e,t)})}function Xs(r,e){return P(this,null,function*(){Ve({statusSettings:r}),Le.applyToStatusRegistry(r,De.getInstance()),yield e.saveSettings(!0)})}function KF(r){let{settingEl:e,infoEl:t,controlEl:n}=r,i=n.querySelector("textarea");i!==null&&(e.style.display="block",t.style.marginRight="0px",i.style.minWidth="-webkit-fill-available")}var ai=require("obsidian");function QF(r){console.error(r),new ai.Notice(r+` +show urgency`).setValue(s.globalQuery).onChange(a=>P(this,null,function*(){Ve({globalQuery:a}),tr.getInstance().set(a),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=X();Wk.forEach(i=>{this.addOneSettingsBlock(t,i,n)}),t.createEl("h4",{text:"Date Settings"}),new ve.Setting(t).setName("Set created date on every added task").setDesc(Rt.createFragmentWithHTML(`Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.

See the documentation.

`)).addToggle(i=>{let s=X();i.setValue(s.setCreatedDate).onChange(a=>P(this,null,function*(){Ve({setCreatedDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Set done date on every completed task").setDesc(Rt.createFragmentWithHTML('Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.setDoneDate).onChange(a=>P(this,null,function*(){Ve({setDoneDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Set cancelled date on every cancelled task").setDesc(Rt.createFragmentWithHTML('Enabling this will add a timestamp \u274C YYYY-MM-DD at the end when a task is toggled to cancelled.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.setCancelledDate).onChange(a=>P(this,null,function*(){Ve({setCancelledDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Rt.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.
If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.
By default, Tasks plugin will match both YYYY-MM-DD and YYYYMMDD date formats.
Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.useFilenameAsScheduledDate).onChange(a=>P(this,null,function*(){Ve({useFilenameAsScheduledDate:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Additional filename date format as Scheduled date for undated tasks").setDesc(Rt.createFragmentWithHTML('An additional date format that Tasks plugin will recogize when using the file name as the Scheduled date for undated tasks.

Syntax Reference

')).addText(i=>{let s=X();i.setPlaceholder("example: MMM DD YYYY").setValue(s.filenameAsScheduledDateFormat).onChange(a=>P(this,null,function*(){Ve({filenameAsScheduledDateFormat:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(i=>P(this,null,function*(){let s=X();yield this.plugin.saveSettings(),i.setValue(Rt.renderFolderArray(s.filenameAsDateFolders)).onChange(a=>P(this,null,function*(){let o=Rt.parseCommaSeparatedFolders(a);Ve({filenameAsDateFolders:o}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Recurring task Settings"}),new ve.Setting(t).setName("Next recurrence appears on the line below").setDesc(Rt.createFragmentWithHTML('Enabling this will make the next recurrence of a task appear on the line below the completed task. Otherwise the next recurrence will appear before the completed one.

See the documentation.

')).addToggle(i=>{let{recurrenceOnNextLine:s}=X();i.setValue(s).onChange(a=>P(this,null,function*(){Ve({recurrenceOnNextLine:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Auto-suggest Settings"}),new ve.Setting(t).setName("Auto-suggest task content").setDesc(Rt.createFragmentWithHTML('Enabling this will open an intelligent suggest menu while typing inside a recognized task line.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.autoSuggestInEditor).onChange(a=>P(this,null,function*(){Ve({autoSuggestInEditor:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(i=>{let s=X();i.setLimits(0,3,1).setValue(s.autoSuggestMinMatch).setDynamicTooltip().onChange(a=>P(this,null,function*(){Ve({autoSuggestMinMatch:a}),yield this.plugin.saveSettings()}))}),new ve.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(i=>{let s=X();i.setLimits(3,20,1).setValue(s.autoSuggestMaxItems).setDynamicTooltip().onChange(a=>P(this,null,function*(){Ve({autoSuggestMaxItems:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new ve.Setting(t).setName("Provide access keys in dialogs").setDesc(Rt.createFragmentWithHTML('If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.

See the documentation.

')).addToggle(i=>{let s=X();i.setValue(s.provideAccessKeys).onChange(a=>P(this,null,function*(){Ve({provideAccessKeys:a}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,i){let s=t.createEl("details",{cls:"tasks-nested-settings",attr:K({},n.open||i[n.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[n.text]=s.open,Ve({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");if(new ve.Setting(a).setHeading().setName(n.text),a.createDiv("collapser").createDiv("handle"),n.notice!==null){let o=s.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&o.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!Sv(o.featureFlag))&&(o.type==="checkbox"?new ve.Setting(s).setName(o.name).setDesc(o.description).addToggle(u=>{let l=X();l.generalSettings[o.settingName]||xi(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>P(this,null,function*(){xi(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new ve.Setting(s).setName(o.name).setDesc(o.description).addText(u=>{let l=X();l.generalSettings[o.settingName]||xi(o.settingName,o.initialValue);let c=d=>P(this,null,function*(){xi(o.settingName,d),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,ve.debounce)(c,500,!0))}):o.type==="textarea"?new ve.Setting(s).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=X();l.generalSettings[o.settingName]||xi(o.settingName,o.initialValue);let c=d=>P(this,null,function*(){xi(o.settingName,d),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,ve.debounce)(c,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](s,this),o.notice!==null)){let u=s.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&u.insertAdjacentHTML("beforeend",o.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:i}=X();i.coreStatuses.forEach(a=>{qk(t,a,i.coreStatuses,i,n,n.plugin,!0)}),new ve.Setting(t).addButton(a=>{let o="Review and check your Statuses";a.setButtonText(o).setCta().onClick(()=>P(this,null,function*(){let l=window.moment().format("YYYY-MM-DD HH-mm-ss"),c=`Tasks Plugin - ${o} ${l}.md`,d=this.plugin.manifest.version,p=De.getInstance(),m=Mk(i,p,o,d),y=yield app.vault.create(c,m);yield this.app.workspace.getLeaf(!0).openFile(y)})),a.setTooltip("Create a new file in the root of the vault, containing a Mermaid diagram of the current status settings.")}).infoEl.remove()}insertCustomTaskStatusSettings(t,n){let{statusSettings:i}=X();i.customStatuses.forEach(l=>{qk(t,l,i.customStatuses,i,n,n.plugin,!1)}),t.createEl("div"),new ve.Setting(t).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>P(this,null,function*(){Le.addStatus(i.customStatuses,new Ke("","","",!1,"TODO")),yield Xs(i,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",Ck()],["Aura Theme",Ak()],["Border Theme",Pk()],["Ebullientworks Theme",Nk()],["ITS Theme & SlRvb Checkboxes",Ik()],["Minimal Theme",Lk()],["Things Theme",Uk()],["LYT Mode Theme (Dark mode only)",Fk()]];for(let[l,c]of a)new ve.Setting(t).addButton(p=>{let m=`${l}: Add ${c.length} supported Statuses`;p.setButtonText(m).onClick(()=>P(this,null,function*(){yield KF(c,i,n)}))}).infoEl.remove();new ve.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>P(this,null,function*(){let d=this.plugin.getTasks().map(m=>m.status),p=De.getInstance().findUnknownStatuses(d);p.length!==0&&(p.forEach(m=>{Le.addStatus(i.customStatuses,m)}),yield Xs(i,n))}))}).infoEl.remove(),new ve.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>P(this,null,function*(){Le.resetAllCustomStatuses(i),yield Xs(i,n)}))}).infoEl.remove()}},Go=Rt;Go.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function qk(r,e,t,n,i,s,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new ne(e).previewText();let u=new ve.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>P(this,null,function*(){Le.deleteStatus(t,e)&&(yield Xs(n,i))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>P(this,null,function*(){let c=new rr(s,e,a);c.onClose=()=>P(this,null,function*(){c.saved&&Le.replaceStatus(t,e,c.statusConfiguration())&&(yield Xs(n,i))}),c.open()}))}),u.infoEl.remove()}function KF(r,e,t){return P(this,null,function*(){Le.bulkAddStatusCollection(e,r).forEach(i=>{new ve.Notice(i)}),yield Xs(e,t)})}function Xs(r,e){return P(this,null,function*(){Ve({statusSettings:r}),Le.applyToStatusRegistry(r,De.getInstance()),yield e.saveSettings(!0)})}function QF(r){let{settingEl:e,infoEl:t,controlEl:n}=r,i=n.querySelector("textarea");i!==null&&(e.style.display="block",t.style.marginRight="0px",i.style.minWidth="-webkit-fill-available")}var ai=require("obsidian");function XF(r){console.error(r),new ai.Notice(r+` This message has been written to the console. `,1e4)}var dc=class extends ai.EditorSuggest{constructor(t,n,i){super(t);this.settings=n,this.plugin=i,t.scope.register([],"Tab",()=>{var a;let s=(a=this.context)==null?void 0:a.editor;return s?(s.exec("indentMore"),!1):!0})}onTrigger(t,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(t.line);return kv(s,t,n)?{start:{line:t.line,ch:0},end:{line:t.line,ch:s.length},query:s}:null}getSuggestions(t){var c,d,p;let n=t.query,i=t.editor.getCursor(),s=this.plugin.getTasks(),a=s.find(m=>m.taskLocation.path==t.file.path&&m.taskLocation.lineNumber==i.line),o=this.getMarkdownFileInfo(t),u=this.canSaveEdits(o);return((p=(d=(c=_o()).buildSuggestions)==null?void 0:d.call(c,n,i.ch,this.settings,s,u,a))!=null?p:[]).map(m=>he(K({},m),{context:t}))}getMarkdownFileInfo(t){return t.editor.cm.state.field(ai.editorInfoField)}canSaveEdits(t){return t instanceof ai.MarkdownView}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){return P(this,null,function*(){var l,c,d;let i=t.context.editor;if(t.suggestionType==="empty"){this.close();let p=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(c=(l=i==null?void 0:i.cm)==null?void 0:l.contentDOM)==null||c.dispatchEvent(p);return}if(t.taskItDependsOn!=null){let p=Zu(t.taskItDependsOn,this.plugin.getTasks().map(m=>m.id));if(t.appendText+=` ${p.id}`,t.taskItDependsOn!==p)if(t.context.file.path==p.path){let m=t.taskItDependsOn.originalMarkdown,y={line:t.taskItDependsOn.lineNumber,ch:0},_={line:t.taskItDependsOn.lineNumber,ch:m.length},b=t.context.editor.getRange(y,_);if(b!==m){let E=`Error adding new ID, due to mismatched data in Tasks memory and the editor: @@ -367,8 +367,8 @@ task line in memory: '${t.taskItDependsOn.originalMarkdown}' task line in editor: '${b}' file: '${p.path}' -`;QF(E);return}t.context.editor.replaceRange(p.toFileLineString(),y,_)}else br({originalTask:t.taskItDependsOn,newTasks:p})}let s=t.context.editor.getCursor(),a={line:s.line,ch:(d=t.insertAt)!=null?d:s.ch},o=t.insertSkip?{line:s.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:s.line,ch:a.ch+t.appendText.length});let u=this.getMarkdownFileInfo(t.context);this.canSaveEdits(u)&&(yield u.save())})}};var qk=(r,e)=>{let t,n=new Promise((a,o)=>{t=a});return e(r,a=>{let o=a.map(u=>u.toFileLineString()).join(` -`);t(o)}).open(),n};var $k=(r,e)=>{let t=Tl({line:"",path:""});return new Kn({app:r,task:t,onSubmit:e,allTasks:[]})};var jk=r=>({createTaskLineModal:()=>qk(r,$k),executeToggleTaskDoneCommand:(e,t)=>lh(e,t).text});var fc=class extends Gk.Plugin{get apiV1(){return jk(app)}onload(){return P(this,null,function*(){St.registerConsoleLogger(),Um("info",`loading plugin "${this.manifest.name}" v${this.manifest.version}`),yield this.loadSettings();let{loggingOptions:t}=X();St.configure(t),this.addSettingTab(new Go({plugin:this})),yw({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let n=new tc({obsidianEvents:this.app.workspace});this.cache=new Ts({metadataCache:this.app.metadataCache,vault:this.app.vault,events:n}),this.inlineRenderer=new ic({plugin:this}),this.queryRenderer=new uc({plugin:this,events:n}),this.registerEditorExtension(mk()),this.registerEditorSuggest(new dc(this.app,X(),this)),new _l({plugin:this})})}loadTaskStatuses(){return P(this,null,function*(){let{statusSettings:t}=X();Le.applyToStatusRegistry(t,De.getInstance())})}onunload(){var t;Um("info",`unloading plugin "${this.manifest.name}" v${this.manifest.version}`),(t=this.cache)==null||t.unload()}loadSettings(){return P(this,null,function*(){let t=yield this.loadData();Ve(t),t=X(),_e.getInstance().set(t.globalFilter),_e.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),tr.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return P(this,null,function*(){yield this.saveData(X())})}getTasks(){return this.cache===void 0?[]:this.cache.getTasks()}}; +`;XF(E);return}t.context.editor.replaceRange(p.toFileLineString(),y,_)}else br({originalTask:t.taskItDependsOn,newTasks:p})}let s=t.context.editor.getCursor(),a={line:s.line,ch:(d=t.insertAt)!=null?d:s.ch},o=t.insertSkip?{line:s.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:s.line,ch:a.ch+t.appendText.length});let u=this.getMarkdownFileInfo(t.context);this.canSaveEdits(u)&&(yield u.save())})}};var $k=(r,e)=>{let t,n=new Promise((a,o)=>{t=a});return e(r,a=>{let o=a.map(u=>u.toFileLineString()).join(` +`);t(o)}).open(),n};var jk=(r,e)=>{let t=Tl({line:"",path:""});return new Kn({app:r,task:t,onSubmit:e,allTasks:[]})};var Gk=r=>({createTaskLineModal:()=>$k(r,jk),executeToggleTaskDoneCommand:(e,t)=>lh(e,t).text});var fc=class extends Yk.Plugin{get apiV1(){return Gk(app)}onload(){return P(this,null,function*(){St.registerConsoleLogger(),Um("info",`loading plugin "${this.manifest.name}" v${this.manifest.version}`),yield this.loadSettings();let{loggingOptions:t}=X();St.configure(t),this.addSettingTab(new Go({plugin:this})),yw({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let n=new tc({obsidianEvents:this.app.workspace});this.cache=new Ts({metadataCache:this.app.metadataCache,vault:this.app.vault,events:n}),this.inlineRenderer=new ic({plugin:this}),this.queryRenderer=new uc({plugin:this,events:n}),this.registerEditorExtension(mk()),this.registerEditorSuggest(new dc(this.app,X(),this)),new _l({plugin:this})})}loadTaskStatuses(){return P(this,null,function*(){let{statusSettings:t}=X();Le.applyToStatusRegistry(t,De.getInstance())})}onunload(){var t;Um("info",`unloading plugin "${this.manifest.name}" v${this.manifest.version}`),(t=this.cache)==null||t.unload()}loadSettings(){return P(this,null,function*(){let t=yield this.loadData();Ve(t),t=X(),_e.getInstance().set(t.globalFilter),_e.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),tr.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return P(this,null,function*(){yield this.saveData(X())})}getTasks(){return this.cache===void 0?[]:this.cache.getTasks()}}; /*! * EventEmitter2 * https://github.com/hij1nx/EventEmitter2 diff --git a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json index 7a514e0e..ea305bf9 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +++ b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-tasks-plugin", "name": "Tasks", - "version": "7.8.0", + "version": "7.9.0", "minAppVersion": "1.1.1", "description": "Track tasks across your vault. Supports due dates, recurring tasks, done dates, sub-set of checklist items, and filtering.", "helpUrl": "https://publish.obsidian.md/tasks/", diff --git a/.obsidian/plugins/recent-files-obsidian/data.json b/.obsidian/plugins/recent-files-obsidian/data.json index f0ee2ab9..53090dd9 100644 --- a/.obsidian/plugins/recent-files-obsidian/data.json +++ b/.obsidian/plugins/recent-files-obsidian/data.json @@ -1,5 +1,13 @@ { "recentFiles": [ + { + "basename": "Уроки от English Galaxy", + "path": "_inbox/Уроки от English Galaxy.md" + }, + { + "basename": "Home", + "path": "Home.md" + }, { "basename": "Утилита ngrok", "path": "_inbox/Утилита ngrok.md" @@ -36,10 +44,6 @@ "basename": "Ментальное здоровье", "path": "knowledge/human/Ментальное здоровье.md" }, - { - "basename": "Home", - "path": "Home.md" - }, { "basename": "Без названия 4", "path": "Без названия 4.md" @@ -64,10 +68,6 @@ "basename": "Диагностика HDD c использованием S.M.A.R.T.", "path": "_inbox/Диагностика HDD c использованием S.M.A.R.T..md" }, - { - "basename": "Уроки от English Galaxy", - "path": "_inbox/Уроки от English Galaxy.md" - }, { "basename": "Полезные фразы", "path": "knowledge/english/Полезные фразы.md" diff --git a/.obsidian/plugins/templater-obsidian/main.js b/.obsidian/plugins/templater-obsidian/main.js index 2309914d..beb14e9b 100644 --- a/.obsidian/plugins/templater-obsidian/main.js +++ b/.obsidian/plugins/templater-obsidian/main.js @@ -2607,7 +2607,7 @@ var InternalModuleWeb = class extends InternalModule { generate_random_picture() { return async (size, query, include_size = false) => { try { - const response = await this.getRequest(`https://templater-unsplash.fly.dev/${query ? "?q=" + query : ""}`).then((res) => res.json()); + const response = await this.getRequest(`https://templater-unsplash-2.fly.dev/${query ? "?q=" + query : ""}`).then((res) => res.json()); let url = response.full; if (size && !include_size) { if (size.includes("x")) { diff --git a/.obsidian/plugins/templater-obsidian/manifest.json b/.obsidian/plugins/templater-obsidian/manifest.json index 2c43dad1..f7772032 100644 --- a/.obsidian/plugins/templater-obsidian/manifest.json +++ b/.obsidian/plugins/templater-obsidian/manifest.json @@ -1,7 +1,7 @@ { "id": "templater-obsidian", "name": "Templater", - "version": "2.4.1", + "version": "2.4.2", "description": "Create and use templates", "minAppVersion": "1.5.0", "author": "SilentVoid",