151 lines
250 KiB
JavaScript
151 lines
250 KiB
JavaScript
/*
|
|
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
if you want to view the source, please visit the github repository of this plugin
|
|
*/
|
|
|
|
(function initCjs() {
|
|
const globalThisRecord = globalThis;
|
|
globalThisRecord["__name"] ??= name;
|
|
const originalRequire = require;
|
|
if (originalRequire && !originalRequire.__isPatched) {
|
|
require = Object.assign(
|
|
(id) => requirePatched(id),
|
|
originalRequire,
|
|
{
|
|
__isPatched: true
|
|
}
|
|
);
|
|
}
|
|
const newFuncs = {
|
|
__extractDefault: () => extractDefault,
|
|
process: () => {
|
|
const browserProcess = {
|
|
browser: true,
|
|
cwd: () => "/",
|
|
env: {},
|
|
platform: "android"
|
|
};
|
|
return browserProcess;
|
|
}
|
|
};
|
|
for (const key of Object.keys(newFuncs)) {
|
|
globalThisRecord[key] ??= newFuncs[key]?.();
|
|
}
|
|
function name(obj) {
|
|
return obj;
|
|
}
|
|
function extractDefault(module2) {
|
|
return module2 && module2.__esModule && module2.default ? module2.default : module2;
|
|
}
|
|
function requirePatched(id) {
|
|
const module2 = originalRequire?.(id);
|
|
if (module2) {
|
|
return extractDefault(module2);
|
|
}
|
|
if (id === "process" || id === "node:process") {
|
|
console.error(`Module not found: ${id}. Fake process object is returned instead.`);
|
|
return globalThis.process;
|
|
}
|
|
console.error(`Module not found: ${id}. Empty object is returned instead.`);
|
|
return {};
|
|
}
|
|
})();
|
|
|
|
"use strict";var pp=Object.create;var ri=Object.defineProperty;var gp=Object.getOwnPropertyDescriptor;var wp=Object.getOwnPropertyNames;var kp=Object.getPrototypeOf,yp=Object.prototype.hasOwnProperty;var Xe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),bl=(e,t)=>{for(var n in t)ri(e,n,{get:t[n],enumerable:!0})},vl=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of wp(t))!yp.call(e,o)&&o!==n&&ri(e,o,{get:()=>t[o],enumerable:!(i=gp(t,o))||i.enumerable});return e};var je=(e,t,n)=>(n=e!=null?pp(kp(e)):{},vl(t||!e||!e.__esModule?ri(n,"default",{value:e,enumerable:!0}):n,e)),xp=e=>vl(ri({},"__esModule",{value:!0}),e);var Al=Xe((cy,Tl)=>{"use strict";function kt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function El(e,t){for(var n="",i=0,o=-1,s=0,l,u=0;u<=e.length;++u){if(u<e.length)l=e.charCodeAt(u);else{if(l===47)break;l=47}if(l===47){if(!(o===u-1||s===1))if(o!==u-1&&s===2){if(n.length<2||i!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var f=n.lastIndexOf("/");if(f!==n.length-1){f===-1?(n="",i=0):(n=n.slice(0,f),i=n.length-1-n.lastIndexOf("/")),o=u,s=0;continue}}else if(n.length===2||n.length===1){n="",i=0,o=u,s=0;continue}}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),i=u-o-1;o=u,s=0}else l===46&&s!==-1?++s:s=-1}return n}function Sp(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+e+i:i}var Mn={resolve:function(){for(var t="",n=!1,i,o=arguments.length-1;o>=-1&&!n;o--){var s;o>=0?s=arguments[o]:(i===void 0&&(i=process.cwd()),s=i),kt(s),s.length!==0&&(t=s+"/"+t,n=s.charCodeAt(0)===47)}return t=El(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(kt(t),t.length===0)return".";var n=t.charCodeAt(0)===47,i=t.charCodeAt(t.length-1)===47;return t=El(t,!n),t.length===0&&!n&&(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return kt(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,n=0;n<arguments.length;++n){var i=arguments[n];kt(i),i.length>0&&(t===void 0?t=i:t+="/"+i)}return t===void 0?".":Mn.normalize(t)},relative:function(t,n){if(kt(t),kt(n),t===n||(t=Mn.resolve(t),n=Mn.resolve(n),t===n))return"";for(var i=1;i<t.length&&t.charCodeAt(i)===47;++i);for(var o=t.length,s=o-i,l=1;l<n.length&&n.charCodeAt(l)===47;++l);for(var u=n.length,f=u-l,m=s<f?s:f,h=-1,p=0;p<=m;++p){if(p===m){if(f>m){if(n.charCodeAt(l+p)===47)return n.slice(l+p+1);if(p===0)return n.slice(l+p)}else s>m&&(t.charCodeAt(i+p)===47?h=p:p===0&&(h=0));break}var w=t.charCodeAt(i+p),k=n.charCodeAt(l+p);if(w!==k)break;w===47&&(h=p)}var v="";for(p=i+h+1;p<=o;++p)(p===o||t.charCodeAt(p)===47)&&(v.length===0?v+="..":v+="/..");return v.length>0?v+n.slice(l+h):(l+=h,n.charCodeAt(l)===47&&++l,n.slice(l))},_makeLong:function(t){return t},dirname:function(t){if(kt(t),t.length===0)return".";for(var n=t.charCodeAt(0),i=n===47,o=-1,s=!0,l=t.length-1;l>=1;--l)if(n=t.charCodeAt(l),n===47){if(!s){o=l;break}}else s=!1;return o===-1?i?"/":".":i&&o===1?"//":t.slice(0,o)},basename:function(t,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');kt(t);var i=0,o=-1,s=!0,l;if(n!==void 0&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var u=n.length-1,f=-1;for(l=t.length-1;l>=0;--l){var m=t.charCodeAt(l);if(m===47){if(!s){i=l+1;break}}else f===-1&&(s=!1,f=l+1),u>=0&&(m===n.charCodeAt(u)?--u===-1&&(o=l):(u=-1,o=f))}return i===o?o=f:o===-1&&(o=t.length),t.slice(i,o)}else{for(l=t.length-1;l>=0;--l)if(t.charCodeAt(l)===47){if(!s){i=l+1;break}}else o===-1&&(s=!1,o=l+1);return o===-1?"":t.slice(i,o)}},extname:function(t){kt(t);for(var n=-1,i=0,o=-1,s=!0,l=0,u=t.length-1;u>=0;--u){var f=t.charCodeAt(u);if(f===47){if(!s){i=u+1;break}continue}o===-1&&(s=!1,o=u+1),f===46?n===-1?n=u:l!==1&&(l=1):n!==-1&&(l=-1)}return n===-1||o===-1||l===0||l===1&&n===o-1&&n===i+1?"":t.slice(n,o)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return Sp("/",t)},parse:function(t){kt(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return n;var i=t.charCodeAt(0),o=i===47,s;o?(n.root="/",s=1):s=0;for(var l=-1,u=0,f=-1,m=!0,h=t.length-1,p=0;h>=s;--h){if(i=t.charCodeAt(h),i===47){if(!m){u=h+1;break}continue}f===-1&&(m=!1,f=h+1),i===46?l===-1?l=h:p!==1&&(p=1):l!==-1&&(p=-1)}return l===-1||f===-1||p===0||p===1&&l===f-1&&l===u+1?f!==-1&&(u===0&&o?n.base=n.name=t.slice(1,f):n.base=n.name=t.slice(u,f)):(u===0&&o?(n.name=t.slice(1,l),n.base=t.slice(1,f)):(n.name=t.slice(u,l),n.base=t.slice(u,f)),n.ext=t.slice(l,f)),u>0?n.dir=t.slice(0,u-1):o&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};Mn.posix=Mn;Tl.exports=Mn});var Pl=Xe((fy,os)=>{"use strict";var _p=Object.prototype.hasOwnProperty,De="~";function dr(){}Object.create&&(dr.prototype=Object.create(null),new dr().__proto__||(De=!1));function Ep(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function Fl(e,t,n,i,o){if(typeof n!="function")throw new TypeError("The listener must be a function");var s=new Ep(n,i||e,o),l=De?De+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function oi(e,t){--e._eventsCount===0?e._events=new dr:delete e._events[t]}function Ae(){this._events=new dr,this._eventsCount=0}Ae.prototype.eventNames=function(){var t=[],n,i;if(this._eventsCount===0)return t;for(i in n=this._events)_p.call(n,i)&&t.push(De?i.slice(1):i);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t};Ae.prototype.listeners=function(t){var n=De?De+t:t,i=this._events[n];if(!i)return[];if(i.fn)return[i.fn];for(var o=0,s=i.length,l=new Array(s);o<s;o++)l[o]=i[o].fn;return l};Ae.prototype.listenerCount=function(t){var n=De?De+t:t,i=this._events[n];return i?i.fn?1:i.length:0};Ae.prototype.emit=function(t,n,i,o,s,l){var u=De?De+t:t;if(!this._events[u])return!1;var f=this._events[u],m=arguments.length,h,p;if(f.fn){switch(f.once&&this.removeListener(t,f.fn,void 0,!0),m){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,n),!0;case 3:return f.fn.call(f.context,n,i),!0;case 4:return f.fn.call(f.context,n,i,o),!0;case 5:return f.fn.call(f.context,n,i,o,s),!0;case 6:return f.fn.call(f.context,n,i,o,s,l),!0}for(p=1,h=new Array(m-1);p<m;p++)h[p-1]=arguments[p];f.fn.apply(f.context,h)}else{var w=f.length,k;for(p=0;p<w;p++)switch(f[p].once&&this.removeListener(t,f[p].fn,void 0,!0),m){case 1:f[p].fn.call(f[p].context);break;case 2:f[p].fn.call(f[p].context,n);break;case 3:f[p].fn.call(f[p].context,n,i);break;case 4:f[p].fn.call(f[p].context,n,i,o);break;default:if(!h)for(k=1,h=new Array(m-1);k<m;k++)h[k-1]=arguments[k];f[p].fn.apply(f[p].context,h)}}return!0};Ae.prototype.on=function(t,n,i){return Fl(this,t,n,i,!1)};Ae.prototype.once=function(t,n,i){return Fl(this,t,n,i,!0)};Ae.prototype.removeListener=function(t,n,i,o){var s=De?De+t:t;if(!this._events[s])return this;if(!n)return oi(this,s),this;var l=this._events[s];if(l.fn)l.fn===n&&(!o||l.once)&&(!i||l.context===i)&&oi(this,s);else{for(var u=0,f=[],m=l.length;u<m;u++)(l[u].fn!==n||o&&!l[u].once||i&&l[u].context!==i)&&f.push(l[u]);f.length?this._events[s]=f.length===1?f[0]:f:oi(this,s)}return this};Ae.prototype.removeAllListeners=function(t){var n;return t?(n=De?De+t:t,this._events[n]&&oi(this,n)):(this._events=new dr,this._eventsCount=0),this};Ae.prototype.off=Ae.prototype.removeListener;Ae.prototype.addListener=Ae.prototype.on;Ae.prefixed=De;Ae.EventEmitter=Ae;typeof os<"u"&&(os.exports=Ae)});var jl=Xe((Ly,$l)=>{var On=1e3,Dn=On*60,Rn=Dn*60,fn=Rn*24,Dp=fn*7,Rp=fn*365.25;$l.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Np(e);if(n==="number"&&isFinite(e))return t.long?Wp(e):Yp(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Np(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),i=(t[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return n*Rp;case"weeks":case"week":case"w":return n*Dp;case"days":case"day":case"d":return n*fn;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Rn;case"minutes":case"minute":case"mins":case"min":case"m":return n*Dn;case"seconds":case"second":case"secs":case"sec":case"s":return n*On;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Yp(e){var t=Math.abs(e);return t>=fn?Math.round(e/fn)+"d":t>=Rn?Math.round(e/Rn)+"h":t>=Dn?Math.round(e/Dn)+"m":t>=On?Math.round(e/On)+"s":e+"ms"}function Wp(e){var t=Math.abs(e);return t>=fn?ci(e,t,fn,"day"):t>=Rn?ci(e,t,Rn,"hour"):t>=Dn?ci(e,t,Dn,"minute"):t>=On?ci(e,t,On,"second"):e+" ms"}function ci(e,t,n,i){var o=t>=n*1.5;return Math.round(e/n)+" "+i+(o?"s":"")}});var cs=Xe((Oy,Gl)=>{function zp(e){n.debug=n,n.default=n,n.coerce=f,n.disable=l,n.enable=o,n.enabled=u,n.humanize=jl(),n.destroy=m,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let p=0;for(let w=0;w<h.length;w++)p=(p<<5)-p+h.charCodeAt(w),p|=0;return n.colors[Math.abs(p)%n.colors.length]}n.selectColor=t;function n(h){let p,w=null,k,v;function F(...T){if(!F.enabled)return;let C=F,A=Number(new Date),P=A-(p||A);C.diff=P,C.prev=p,C.curr=A,p=A,T[0]=n.coerce(T[0]),typeof T[0]!="string"&&T.unshift("%O");let Y=0;T[0]=T[0].replace(/%([a-zA-Z%])/g,(_,J)=>{if(_==="%%")return"%";Y++;let j=n.formatters[J];if(typeof j=="function"){let G=T[Y];_=j.call(C,G),T.splice(Y,1),Y--}return _}),n.formatArgs.call(C,T),(C.log||n.log).apply(C,T)}return F.namespace=h,F.useColors=n.useColors(),F.color=n.selectColor(h),F.extend=i,F.destroy=n.destroy,Object.defineProperty(F,"enabled",{enumerable:!0,configurable:!1,get:()=>w!==null?w:(k!==n.namespaces&&(k=n.namespaces,v=n.enabled(h)),v),set:T=>{w=T}}),typeof n.init=="function"&&n.init(F),F}function i(h,p){let w=n(this.namespace+(typeof p>"u"?":":p)+h);return w.log=this.log,w}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let p=(typeof h=="string"?h:"").trim().replace(" ",",").split(",").filter(Boolean);for(let w of p)w[0]==="-"?n.skips.push(w.slice(1)):n.names.push(w)}function s(h,p){let w=0,k=0,v=-1,F=0;for(;w<h.length;)if(k<p.length&&(p[k]===h[w]||p[k]==="*"))p[k]==="*"?(v=k,F=w,k++):(w++,k++);else if(v!==-1)k=v+1,F++,w=F;else return!1;for(;k<p.length&&p[k]==="*";)k++;return k===p.length}function l(){let h=[...n.names,...n.skips.map(p=>"-"+p)].join(",");return n.enable(""),h}function u(h){for(let p of n.skips)if(s(h,p))return!1;for(let p of n.names)if(s(h,p))return!0;return!1}function f(h){return h instanceof Error?h.stack||h.message:h}function m(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}Gl.exports=zp});var ql=Xe((Ge,fi)=>{Ge.formatArgs=Hp;Ge.save=Up;Ge.load=Vp;Ge.useColors=Bp;Ge.storage=$p();Ge.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ge.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Bp(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Hp(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+fi.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(i=n))}),e.splice(i,0,t)}Ge.log=console.debug||console.log||(()=>{});function Up(e){try{e?Ge.storage.setItem("debug",e):Ge.storage.removeItem("debug")}catch{}}function Vp(){let e;try{e=Ge.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function $p(){try{return localStorage}catch{}}fi.exports=cs()(Ge);var{formatters:jp}=fi.exports;jp.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Ql=Xe((Dy,Zl)=>{"use strict";Zl.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",i=t.indexOf(n+e),o=t.indexOf("--");return i!==-1&&(o===-1||i<o)}});var Xl=Xe((Ry,Kl)=>{"use strict";var Gp=require("os"),Jl=require("tty"),nt=Ql(),{env:xe}=process,$t;nt("no-color")||nt("no-colors")||nt("color=false")||nt("color=never")?$t=0:(nt("color")||nt("colors")||nt("color=true")||nt("color=always"))&&($t=1);"FORCE_COLOR"in xe&&(xe.FORCE_COLOR==="true"?$t=1:xe.FORCE_COLOR==="false"?$t=0:$t=xe.FORCE_COLOR.length===0?1:Math.min(parseInt(xe.FORCE_COLOR,10),3));function fs(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ds(e,t){if($t===0)return 0;if(nt("color=16m")||nt("color=full")||nt("color=truecolor"))return 3;if(nt("color=256"))return 2;if(e&&!t&&$t===void 0)return 0;let n=$t||0;if(xe.TERM==="dumb")return n;if(process.platform==="win32"){let i=Gp.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in xe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(i=>i in xe)||xe.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in xe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(xe.TEAMCITY_VERSION)?1:0;if(xe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in xe){let i=parseInt((xe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(xe.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(xe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(xe.TERM)||"COLORTERM"in xe?1:n}function qp(e){let t=ds(e,e&&e.isTTY);return fs(t)}Kl.exports={supportsColor:qp,stdout:fs(ds(!0,Jl.isatty(1))),stderr:fs(ds(!0,Jl.isatty(2)))}});var tu=Xe((be,hi)=>{var Zp=require("tty"),di=require("util");be.init=ng;be.log=Xp;be.formatArgs=Jp;be.save=eg;be.load=tg;be.useColors=Qp;be.destroy=di.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");be.colors=[6,2,3,4,5,1];try{let e=Xl();e&&(e.stderr||e).level>=2&&(be.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}be.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),i=process.env[t];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),e[n]=i,e},{});function Qp(){return"colors"in be.inspectOpts?!!be.inspectOpts.colors:Zp.isatty(process.stderr.fd)}function Jp(e){let{namespace:t,useColors:n}=this;if(n){let i=this.color,o="\x1B[3"+(i<8?i:"8;5;"+i),s=` ${o};1m${t} \x1B[0m`;e[0]=s+e[0].split(`
|
|
`).join(`
|
|
`+s),e.push(o+"m+"+hi.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Kp()+t+" "+e[0]}function Kp(){return be.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Xp(...e){return process.stderr.write(di.formatWithOptions(be.inspectOpts,...e)+`
|
|
`)}function eg(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function tg(){return process.env.DEBUG}function ng(e){e.inspectOpts={};let t=Object.keys(be.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=be.inspectOpts[t[n]]}hi.exports=cs()(be);var{formatters:eu}=hi.exports;eu.o=function(e){return this.inspectOpts.colors=this.useColors,di.inspect(e,this.inspectOpts).split(`
|
|
`).map(t=>t.trim()).join(" ")};eu.O=function(e){return this.inspectOpts.colors=this.useColors,di.inspect(e,this.inspectOpts)}});var nu=Xe((Ny,hs)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?hs.exports=ql():hs.exports=tu()});var gu=Xe((xi,pu)=>{(function(e,t){typeof xi=="object"&&typeof pu<"u"?t(xi):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.compareVersions={}))})(xi,function(e){"use strict";let t=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,n=T=>{if(typeof T!="string")throw new TypeError("Invalid argument expected string");let C=T.match(t);if(!C)throw new Error(`Invalid argument not valid semver ('${T}' received)`);return C.shift(),C},i=T=>T==="*"||T==="x"||T==="X",o=T=>{let C=parseInt(T,10);return isNaN(C)?T:C},s=(T,C)=>typeof T!=typeof C?[String(T),String(C)]:[T,C],l=(T,C)=>{if(i(T)||i(C))return 0;let[A,P]=s(o(T),o(C));return A>P?1:A<P?-1:0},u=(T,C)=>{for(let A=0;A<Math.max(T.length,C.length);A++){let P=l(T[A]||"0",C[A]||"0");if(P!==0)return P}return 0},f=(T,C)=>{let A=n(T),P=n(C),Y=A.pop(),B=P.pop(),_=u(A,P);return _!==0?_:Y&&B?u(Y.split("."),B.split(".")):Y||B?Y?-1:1:0},m=(T,C,A)=>{w(A);let P=f(T,C);return h[A].includes(P)},h={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},p=Object.keys(h),w=T=>{if(typeof T!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof T}`);if(p.indexOf(T)===-1)throw new Error(`Invalid operator, expected one of ${p.join("|")}`)},k=(T,C)=>{if(C=C.replace(/([><=]+)\s+/g,"$1"),C.includes("||"))return C.split("||").some(ee=>k(T,ee));if(C.includes(" - ")){let[ee,ue]=C.split(" - ",2);return k(T,`>=${ee} <=${ue}`)}else if(C.includes(" "))return C.trim().replace(/\s{2,}/g," ").split(" ").every(ee=>k(T,ee));let A=C.match(/^([<>=~^]+)/),P=A?A[1]:"=";if(P!=="^"&&P!=="~")return m(T,C,P);let[Y,B,_,,J]=n(T),[j,G,ne,,oe]=n(C),X=[Y,B,_],N=[j,G??"x",ne??"x"];if(oe&&(!J||u(X,N)!==0||u(J.split("."),oe.split("."))===-1))return!1;let H=N.findIndex(ee=>ee!=="0")+1,W=P==="~"?2:H>1?H:1;return!(u(X.slice(0,W),N.slice(0,W))!==0||u(X.slice(W),N.slice(W))===-1)},v=T=>typeof T=="string"&&/^[v\d]/.test(T)&&t.test(T),F=T=>typeof T=="string"&&/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test(T);e.compare=m,e.compareVersions=f,e.satisfies=k,e.validate=v,e.validateStrict=F})});var jc=Xe((L1,$c)=>{"use strict";var $i=Object.prototype.hasOwnProperty,Vc=Object.prototype.toString,Yc=Object.defineProperty,Wc=Object.getOwnPropertyDescriptor,zc=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Vc.call(t)==="[object Array]"},Bc=function(t){if(!t||Vc.call(t)!=="[object Object]")return!1;var n=$i.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&$i.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!i)return!1;var o;for(o in t);return typeof o>"u"||$i.call(t,o)},Hc=function(t,n){Yc&&n.name==="__proto__"?Yc(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Uc=function(t,n){if(n==="__proto__")if($i.call(t,n)){if(Wc)return Wc(t,n).value}else return;return t[n]};$c.exports=function e(){var t,n,i,o,s,l,u=arguments[0],f=1,m=arguments.length,h=!1;for(typeof u=="boolean"&&(h=u,u=arguments[1]||{},f=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});f<m;++f)if(t=arguments[f],t!=null)for(n in t)i=Uc(u,n),o=Uc(t,n),u!==o&&(h&&o&&(Bc(o)||(s=zc(o)))?(s?(s=!1,l=i&&zc(i)?i:[]):l=i&&Bc(i)?i:{},Hc(u,{name:n,newValue:e(h,l,o)})):typeof o<"u"&&Hc(u,{name:n,newValue:o}));return u}});var bn=Xe((Pa,er)=>{(function(e,t){typeof Pa=="object"&&typeof er<"u"?er.exports=t():typeof define=="function"&&define.amd?define(t):e.moment=t()})(Pa,function(){"use strict";var e;function t(){return e.apply(null,arguments)}function n(r){e=r}function i(r){return r instanceof Array||Object.prototype.toString.call(r)==="[object Array]"}function o(r){return r!=null&&Object.prototype.toString.call(r)==="[object Object]"}function s(r,a){return Object.prototype.hasOwnProperty.call(r,a)}function l(r){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(r).length===0;var a;for(a in r)if(s(r,a))return!1;return!0}function u(r){return r===void 0}function f(r){return typeof r=="number"||Object.prototype.toString.call(r)==="[object Number]"}function m(r){return r instanceof Date||Object.prototype.toString.call(r)==="[object Date]"}function h(r,a){var c=[],d,g=r.length;for(d=0;d<g;++d)c.push(a(r[d],d));return c}function p(r,a){for(var c in a)s(a,c)&&(r[c]=a[c]);return s(a,"toString")&&(r.toString=a.toString),s(a,"valueOf")&&(r.valueOf=a.valueOf),r}function w(r,a,c,d){return Ka(r,a,c,d,!0).utc()}function k(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function v(r){return r._pf==null&&(r._pf=k()),r._pf}var F;Array.prototype.some?F=Array.prototype.some:F=function(r){var a=Object(this),c=a.length>>>0,d;for(d=0;d<c;d++)if(d in a&&r.call(this,a[d],d,a))return!0;return!1};function T(r){var a=null,c=!1,d=r._d&&!isNaN(r._d.getTime());if(d&&(a=v(r),c=F.call(a.parsedDateParts,function(g){return g!=null}),d=a.overflow<0&&!a.empty&&!a.invalidEra&&!a.invalidMonth&&!a.invalidWeekday&&!a.weekdayMismatch&&!a.nullInput&&!a.invalidFormat&&!a.userInvalidated&&(!a.meridiem||a.meridiem&&c),r._strict&&(d=d&&a.charsLeftOver===0&&a.unusedTokens.length===0&&a.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(r))r._isValid=d;else return d;return r._isValid}function C(r){var a=w(NaN);return r!=null?p(v(a),r):v(a).userInvalidated=!0,a}var A=t.momentProperties=[],P=!1;function Y(r,a){var c,d,g,x=A.length;if(u(a._isAMomentObject)||(r._isAMomentObject=a._isAMomentObject),u(a._i)||(r._i=a._i),u(a._f)||(r._f=a._f),u(a._l)||(r._l=a._l),u(a._strict)||(r._strict=a._strict),u(a._tzm)||(r._tzm=a._tzm),u(a._isUTC)||(r._isUTC=a._isUTC),u(a._offset)||(r._offset=a._offset),u(a._pf)||(r._pf=v(a)),u(a._locale)||(r._locale=a._locale),x>0)for(c=0;c<x;c++)d=A[c],g=a[d],u(g)||(r[d]=g);return r}function B(r){Y(this,r),this._d=new Date(r._d!=null?r._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),P===!1&&(P=!0,t.updateOffset(this),P=!1)}function _(r){return r instanceof B||r!=null&&r._isAMomentObject!=null}function J(r){t.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+r)}function j(r,a){var c=!0;return p(function(){if(t.deprecationHandler!=null&&t.deprecationHandler(null,r),c){var d=[],g,x,S,O=arguments.length;for(x=0;x<O;x++){if(g="",typeof arguments[x]=="object"){g+=`
|
|
[`+x+"] ";for(S in arguments[0])s(arguments[0],S)&&(g+=S+": "+arguments[0][S]+", ");g=g.slice(0,-2)}else g=arguments[x];d.push(g)}J(r+`
|
|
Arguments: `+Array.prototype.slice.call(d).join("")+`
|
|
`+new Error().stack),c=!1}return a.apply(this,arguments)},a)}var G={};function ne(r,a){t.deprecationHandler!=null&&t.deprecationHandler(r,a),G[r]||(J(a),G[r]=!0)}t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;function oe(r){return typeof Function<"u"&&r instanceof Function||Object.prototype.toString.call(r)==="[object Function]"}function X(r){var a,c;for(c in r)s(r,c)&&(a=r[c],oe(a)?this[c]=a:this["_"+c]=a);this._config=r,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function N(r,a){var c=p({},r),d;for(d in a)s(a,d)&&(o(r[d])&&o(a[d])?(c[d]={},p(c[d],r[d]),p(c[d],a[d])):a[d]!=null?c[d]=a[d]:delete c[d]);for(d in r)s(r,d)&&!s(a,d)&&o(r[d])&&(c[d]=p({},c[d]));return c}function H(r){r!=null&&this.set(r)}var W;Object.keys?W=Object.keys:W=function(r){var a,c=[];for(a in r)s(r,a)&&c.push(a);return c};var ee={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function ue(r,a,c){var d=this._calendar[r]||this._calendar.sameElse;return oe(d)?d.call(a,c):d}function fe(r,a,c){var d=""+Math.abs(r),g=a-d.length,x=r>=0;return(x?c?"+":"":"-")+Math.pow(10,Math.max(0,g)).toString().substr(1)+d}var ze=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,b=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Se={},_e={};function y(r,a,c,d){var g=d;typeof d=="string"&&(g=function(){return this[d]()}),r&&(_e[r]=g),a&&(_e[a[0]]=function(){return fe(g.apply(this,arguments),a[1],a[2])}),c&&(_e[c]=function(){return this.localeData().ordinal(g.apply(this,arguments),r)})}function Pe(r){return r.match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"")}function Ct(r){var a=r.match(ze),c,d;for(c=0,d=a.length;c<d;c++)_e[a[c]]?a[c]=_e[a[c]]:a[c]=Pe(a[c]);return function(g){var x="",S;for(S=0;S<d;S++)x+=oe(a[S])?a[S].call(g,r):a[S];return x}}function Wt(r,a){return r.isValid()?(a=tn(a,r.localeData()),Se[a]=Se[a]||Ct(a),Se[a](r)):r.localeData().invalidDate()}function tn(r,a){var c=5;function d(g){return a.longDateFormat(g)||g}for(b.lastIndex=0;c>=0&&b.test(r);)r=r.replace(b,d),b.lastIndex=0,c-=1;return r}var pe={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function nn(r){var a=this._longDateFormat[r],c=this._longDateFormat[r.toUpperCase()];return a||!c?a:(this._longDateFormat[r]=c.match(ze).map(function(d){return d==="MMMM"||d==="MM"||d==="DD"||d==="dddd"?d.slice(1):d}).join(""),this._longDateFormat[r])}var st="Invalid date";function St(){return this._invalidDate}var zt="%d",tr=/\d{1,2}/;function Do(r){return this._ordinal.replace("%d",r)}var Yr={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Wr(r,a,c,d){var g=this._relativeTime[c];return oe(g)?g(r,a,c,d):g.replace(/%d/i,r)}function zr(r,a){var c=this._relativeTime[r>0?"future":"past"];return oe(c)?c(a):c.replace(/%s/i,a)}var Br={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Me(r){return typeof r=="string"?Br[r]||Br[r.toLowerCase()]:void 0}function Cn(r){var a={},c,d;for(d in r)s(r,d)&&(c=Me(d),c&&(a[c]=r[d]));return a}var Ro={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function No(r){var a=[],c;for(c in r)s(r,c)&&a.push({unit:c,priority:Ro[c]});return a.sort(function(d,g){return d.priority-g.priority}),a}var Hr=/\d/,Ie=/\d\d/,Ur=/\d{3}/,E=/\d{4}/,I=/[+-]?\d{6}/,L=/\d\d?/,q=/\d\d\d\d?/,re=/\d\d\d\d\d\d?/,Ee=/\d{1,3}/,at=/\d{1,4}/,Be=/[+-]?\d{1,6}/,Je=/\d+/,pt=/[+-]?\d+/,Le=/Z|[+-]\d\d:?\d\d/gi,lt=/Z|[+-]\d\d(?::?\d\d)?/gi,ut=/[+-]?\d+(\.\d{1,3})?/,nr=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Sn=/^[1-9]\d?/,Yo=/^([1-9]\d|\d)/,Vr;Vr={};function D(r,a,c){Vr[r]=oe(a)?a:function(d,g){return d&&c?c:a}}function Rf(r,a){return s(Vr,r)?Vr[r](a._strict,a._locale):new RegExp(Nf(r))}function Nf(r){return _t(r.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,c,d,g,x){return c||d||g||x}))}function _t(r){return r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ke(r){return r<0?Math.ceil(r)||0:Math.floor(r)}function Z(r){var a=+r,c=0;return a!==0&&isFinite(a)&&(c=Ke(a)),c}var Wo={};function ie(r,a){var c,d=a,g;for(typeof r=="string"&&(r=[r]),f(a)&&(d=function(x,S){S[a]=Z(x)}),g=r.length,c=0;c<g;c++)Wo[r[c]]=d}function rr(r,a){ie(r,function(c,d,g,x){g._w=g._w||{},a(c,g._w,g,x)})}function Yf(r,a,c){a!=null&&s(Wo,r)&&Wo[r](a,c._a,c,r)}function $r(r){return r%4===0&&r%100!==0||r%400===0}var Te=0,Et=1,gt=2,ge=3,ct=4,Tt=5,rn=6,Wf=7,zf=8;y("Y",0,0,function(){var r=this.year();return r<=9999?fe(r,4):"+"+r}),y(0,["YY",2],0,function(){return this.year()%100}),y(0,["YYYY",4],0,"year"),y(0,["YYYYY",5],0,"year"),y(0,["YYYYYY",6,!0],0,"year"),D("Y",pt),D("YY",L,Ie),D("YYYY",at,E),D("YYYYY",Be,I),D("YYYYYY",Be,I),ie(["YYYYY","YYYYYY"],Te),ie("YYYY",function(r,a){a[Te]=r.length===2?t.parseTwoDigitYear(r):Z(r)}),ie("YY",function(r,a){a[Te]=t.parseTwoDigitYear(r)}),ie("Y",function(r,a){a[Te]=parseInt(r,10)});function ir(r){return $r(r)?366:365}t.parseTwoDigitYear=function(r){return Z(r)+(Z(r)>68?1900:2e3)};var Ra=_n("FullYear",!0);function Bf(){return $r(this.year())}function _n(r,a){return function(c){return c!=null?(Na(this,r,c),t.updateOffset(this,a),this):or(this,r)}}function or(r,a){if(!r.isValid())return NaN;var c=r._d,d=r._isUTC;switch(a){case"Milliseconds":return d?c.getUTCMilliseconds():c.getMilliseconds();case"Seconds":return d?c.getUTCSeconds():c.getSeconds();case"Minutes":return d?c.getUTCMinutes():c.getMinutes();case"Hours":return d?c.getUTCHours():c.getHours();case"Date":return d?c.getUTCDate():c.getDate();case"Day":return d?c.getUTCDay():c.getDay();case"Month":return d?c.getUTCMonth():c.getMonth();case"FullYear":return d?c.getUTCFullYear():c.getFullYear();default:return NaN}}function Na(r,a,c){var d,g,x,S,O;if(!(!r.isValid()||isNaN(c))){switch(d=r._d,g=r._isUTC,a){case"Milliseconds":return void(g?d.setUTCMilliseconds(c):d.setMilliseconds(c));case"Seconds":return void(g?d.setUTCSeconds(c):d.setSeconds(c));case"Minutes":return void(g?d.setUTCMinutes(c):d.setMinutes(c));case"Hours":return void(g?d.setUTCHours(c):d.setHours(c));case"Date":return void(g?d.setUTCDate(c):d.setDate(c));case"FullYear":break;default:return}x=c,S=r.month(),O=r.date(),O=O===29&&S===1&&!$r(x)?28:O,g?d.setUTCFullYear(x,S,O):d.setFullYear(x,S,O)}}function Hf(r){return r=Me(r),oe(this[r])?this[r]():this}function Uf(r,a){if(typeof r=="object"){r=Cn(r);var c=No(r),d,g=c.length;for(d=0;d<g;d++)this[c[d].unit](r[c[d].unit])}else if(r=Me(r),oe(this[r]))return this[r](a);return this}function Vf(r,a){return(r%a+a)%a}var de;Array.prototype.indexOf?de=Array.prototype.indexOf:de=function(r){var a;for(a=0;a<this.length;++a)if(this[a]===r)return a;return-1};function zo(r,a){if(isNaN(r)||isNaN(a))return NaN;var c=Vf(a,12);return r+=(a-c)/12,c===1?$r(r)?29:28:31-c%7%2}y("M",["MM",2],"Mo",function(){return this.month()+1}),y("MMM",0,0,function(r){return this.localeData().monthsShort(this,r)}),y("MMMM",0,0,function(r){return this.localeData().months(this,r)}),D("M",L,Sn),D("MM",L,Ie),D("MMM",function(r,a){return a.monthsShortRegex(r)}),D("MMMM",function(r,a){return a.monthsRegex(r)}),ie(["M","MM"],function(r,a){a[Et]=Z(r)-1}),ie(["MMM","MMMM"],function(r,a,c,d){var g=c._locale.monthsParse(r,d,c._strict);g!=null?a[Et]=g:v(c).invalidMonth=r});var $f="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ya="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Wa=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,jf=nr,Gf=nr;function qf(r,a){return r?i(this._months)?this._months[r.month()]:this._months[(this._months.isFormat||Wa).test(a)?"format":"standalone"][r.month()]:i(this._months)?this._months:this._months.standalone}function Zf(r,a){return r?i(this._monthsShort)?this._monthsShort[r.month()]:this._monthsShort[Wa.test(a)?"format":"standalone"][r.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Qf(r,a,c){var d,g,x,S=r.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],d=0;d<12;++d)x=w([2e3,d]),this._shortMonthsParse[d]=this.monthsShort(x,"").toLocaleLowerCase(),this._longMonthsParse[d]=this.months(x,"").toLocaleLowerCase();return c?a==="MMM"?(g=de.call(this._shortMonthsParse,S),g!==-1?g:null):(g=de.call(this._longMonthsParse,S),g!==-1?g:null):a==="MMM"?(g=de.call(this._shortMonthsParse,S),g!==-1?g:(g=de.call(this._longMonthsParse,S),g!==-1?g:null)):(g=de.call(this._longMonthsParse,S),g!==-1?g:(g=de.call(this._shortMonthsParse,S),g!==-1?g:null))}function Jf(r,a,c){var d,g,x;if(this._monthsParseExact)return Qf.call(this,r,a,c);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;d<12;d++){if(g=w([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(g,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(g,"").replace(".","")+"$","i")),!c&&!this._monthsParse[d]&&(x="^"+this.months(g,"")+"|^"+this.monthsShort(g,""),this._monthsParse[d]=new RegExp(x.replace(".",""),"i")),c&&a==="MMMM"&&this._longMonthsParse[d].test(r))return d;if(c&&a==="MMM"&&this._shortMonthsParse[d].test(r))return d;if(!c&&this._monthsParse[d].test(r))return d}}function za(r,a){if(!r.isValid())return r;if(typeof a=="string"){if(/^\d+$/.test(a))a=Z(a);else if(a=r.localeData().monthsParse(a),!f(a))return r}var c=a,d=r.date();return d=d<29?d:Math.min(d,zo(r.year(),c)),r._isUTC?r._d.setUTCMonth(c,d):r._d.setMonth(c,d),r}function Ba(r){return r!=null?(za(this,r),t.updateOffset(this,!0),this):or(this,"Month")}function Kf(){return zo(this.year(),this.month())}function Xf(r){return this._monthsParseExact?(s(this,"_monthsRegex")||Ha.call(this),r?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=jf),this._monthsShortStrictRegex&&r?this._monthsShortStrictRegex:this._monthsShortRegex)}function ed(r){return this._monthsParseExact?(s(this,"_monthsRegex")||Ha.call(this),r?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=Gf),this._monthsStrictRegex&&r?this._monthsStrictRegex:this._monthsRegex)}function Ha(){function r(z,Q){return Q.length-z.length}var a=[],c=[],d=[],g,x,S,O;for(g=0;g<12;g++)x=w([2e3,g]),S=_t(this.monthsShort(x,"")),O=_t(this.months(x,"")),a.push(S),c.push(O),d.push(O),d.push(S);a.sort(r),c.sort(r),d.sort(r),this._monthsRegex=new RegExp("^("+d.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+a.join("|")+")","i")}function td(r,a,c,d,g,x,S){var O;return r<100&&r>=0?(O=new Date(r+400,a,c,d,g,x,S),isFinite(O.getFullYear())&&O.setFullYear(r)):O=new Date(r,a,c,d,g,x,S),O}function sr(r){var a,c;return r<100&&r>=0?(c=Array.prototype.slice.call(arguments),c[0]=r+400,a=new Date(Date.UTC.apply(null,c)),isFinite(a.getUTCFullYear())&&a.setUTCFullYear(r)):a=new Date(Date.UTC.apply(null,arguments)),a}function jr(r,a,c){var d=7+a-c,g=(7+sr(r,0,d).getUTCDay()-a)%7;return-g+d-1}function Ua(r,a,c,d,g){var x=(7+c-d)%7,S=jr(r,d,g),O=1+7*(a-1)+x+S,z,Q;return O<=0?(z=r-1,Q=ir(z)+O):O>ir(r)?(z=r+1,Q=O-ir(r)):(z=r,Q=O),{year:z,dayOfYear:Q}}function ar(r,a,c){var d=jr(r.year(),a,c),g=Math.floor((r.dayOfYear()-d-1)/7)+1,x,S;return g<1?(S=r.year()-1,x=g+At(S,a,c)):g>At(r.year(),a,c)?(x=g-At(r.year(),a,c),S=r.year()+1):(S=r.year(),x=g),{week:x,year:S}}function At(r,a,c){var d=jr(r,a,c),g=jr(r+1,a,c);return(ir(r)-d+g)/7}y("w",["ww",2],"wo","week"),y("W",["WW",2],"Wo","isoWeek"),D("w",L,Sn),D("ww",L,Ie),D("W",L,Sn),D("WW",L,Ie),rr(["w","ww","W","WW"],function(r,a,c,d){a[d.substr(0,1)]=Z(r)});function nd(r){return ar(r,this._week.dow,this._week.doy).week}var rd={dow:0,doy:6};function id(){return this._week.dow}function od(){return this._week.doy}function sd(r){var a=this.localeData().week(this);return r==null?a:this.add((r-a)*7,"d")}function ad(r){var a=ar(this,1,4).week;return r==null?a:this.add((r-a)*7,"d")}y("d",0,"do","day"),y("dd",0,0,function(r){return this.localeData().weekdaysMin(this,r)}),y("ddd",0,0,function(r){return this.localeData().weekdaysShort(this,r)}),y("dddd",0,0,function(r){return this.localeData().weekdays(this,r)}),y("e",0,0,"weekday"),y("E",0,0,"isoWeekday"),D("d",L),D("e",L),D("E",L),D("dd",function(r,a){return a.weekdaysMinRegex(r)}),D("ddd",function(r,a){return a.weekdaysShortRegex(r)}),D("dddd",function(r,a){return a.weekdaysRegex(r)}),rr(["dd","ddd","dddd"],function(r,a,c,d){var g=c._locale.weekdaysParse(r,d,c._strict);g!=null?a.d=g:v(c).invalidWeekday=r}),rr(["d","e","E"],function(r,a,c,d){a[d]=Z(r)});function ld(r,a){return typeof r!="string"?r:isNaN(r)?(r=a.weekdaysParse(r),typeof r=="number"?r:null):parseInt(r,10)}function ud(r,a){return typeof r=="string"?a.weekdaysParse(r)%7||7:isNaN(r)?null:r}function Bo(r,a){return r.slice(a,7).concat(r.slice(0,a))}var cd="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Va="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),fd="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),dd=nr,hd=nr,md=nr;function pd(r,a){var c=i(this._weekdays)?this._weekdays:this._weekdays[r&&r!==!0&&this._weekdays.isFormat.test(a)?"format":"standalone"];return r===!0?Bo(c,this._week.dow):r?c[r.day()]:c}function gd(r){return r===!0?Bo(this._weekdaysShort,this._week.dow):r?this._weekdaysShort[r.day()]:this._weekdaysShort}function wd(r){return r===!0?Bo(this._weekdaysMin,this._week.dow):r?this._weekdaysMin[r.day()]:this._weekdaysMin}function kd(r,a,c){var d,g,x,S=r.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;d<7;++d)x=w([2e3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(x,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(x,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(x,"").toLocaleLowerCase();return c?a==="dddd"?(g=de.call(this._weekdaysParse,S),g!==-1?g:null):a==="ddd"?(g=de.call(this._shortWeekdaysParse,S),g!==-1?g:null):(g=de.call(this._minWeekdaysParse,S),g!==-1?g:null):a==="dddd"?(g=de.call(this._weekdaysParse,S),g!==-1||(g=de.call(this._shortWeekdaysParse,S),g!==-1)?g:(g=de.call(this._minWeekdaysParse,S),g!==-1?g:null)):a==="ddd"?(g=de.call(this._shortWeekdaysParse,S),g!==-1||(g=de.call(this._weekdaysParse,S),g!==-1)?g:(g=de.call(this._minWeekdaysParse,S),g!==-1?g:null)):(g=de.call(this._minWeekdaysParse,S),g!==-1||(g=de.call(this._weekdaysParse,S),g!==-1)?g:(g=de.call(this._shortWeekdaysParse,S),g!==-1?g:null))}function yd(r,a,c){var d,g,x;if(this._weekdaysParseExact)return kd.call(this,r,a,c);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;d<7;d++){if(g=w([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(g,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(g,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(g,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[d]||(x="^"+this.weekdays(g,"")+"|^"+this.weekdaysShort(g,"")+"|^"+this.weekdaysMin(g,""),this._weekdaysParse[d]=new RegExp(x.replace(".",""),"i")),c&&a==="dddd"&&this._fullWeekdaysParse[d].test(r))return d;if(c&&a==="ddd"&&this._shortWeekdaysParse[d].test(r))return d;if(c&&a==="dd"&&this._minWeekdaysParse[d].test(r))return d;if(!c&&this._weekdaysParse[d].test(r))return d}}function xd(r){if(!this.isValid())return r!=null?this:NaN;var a=or(this,"Day");return r!=null?(r=ld(r,this.localeData()),this.add(r-a,"d")):a}function bd(r){if(!this.isValid())return r!=null?this:NaN;var a=(this.day()+7-this.localeData()._week.dow)%7;return r==null?a:this.add(r-a,"d")}function vd(r){if(!this.isValid())return r!=null?this:NaN;if(r!=null){var a=ud(r,this.localeData());return this.day(this.day()%7?a:a-7)}else return this.day()||7}function Cd(r){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ho.call(this),r?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=dd),this._weekdaysStrictRegex&&r?this._weekdaysStrictRegex:this._weekdaysRegex)}function Sd(r){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ho.call(this),r?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=hd),this._weekdaysShortStrictRegex&&r?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function _d(r){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ho.call(this),r?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=md),this._weekdaysMinStrictRegex&&r?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ho(){function r(Oe,Lt){return Lt.length-Oe.length}var a=[],c=[],d=[],g=[],x,S,O,z,Q;for(x=0;x<7;x++)S=w([2e3,1]).day(x),O=_t(this.weekdaysMin(S,"")),z=_t(this.weekdaysShort(S,"")),Q=_t(this.weekdays(S,"")),a.push(O),c.push(z),d.push(Q),g.push(O),g.push(z),g.push(Q);a.sort(r),c.sort(r),d.sort(r),g.sort(r),this._weekdaysRegex=new RegExp("^("+g.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Uo(){return this.hours()%12||12}function Ed(){return this.hours()||24}y("H",["HH",2],0,"hour"),y("h",["hh",2],0,Uo),y("k",["kk",2],0,Ed),y("hmm",0,0,function(){return""+Uo.apply(this)+fe(this.minutes(),2)}),y("hmmss",0,0,function(){return""+Uo.apply(this)+fe(this.minutes(),2)+fe(this.seconds(),2)}),y("Hmm",0,0,function(){return""+this.hours()+fe(this.minutes(),2)}),y("Hmmss",0,0,function(){return""+this.hours()+fe(this.minutes(),2)+fe(this.seconds(),2)});function $a(r,a){y(r,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)})}$a("a",!0),$a("A",!1);function ja(r,a){return a._meridiemParse}D("a",ja),D("A",ja),D("H",L,Yo),D("h",L,Sn),D("k",L,Sn),D("HH",L,Ie),D("hh",L,Ie),D("kk",L,Ie),D("hmm",q),D("hmmss",re),D("Hmm",q),D("Hmmss",re),ie(["H","HH"],ge),ie(["k","kk"],function(r,a,c){var d=Z(r);a[ge]=d===24?0:d}),ie(["a","A"],function(r,a,c){c._isPm=c._locale.isPM(r),c._meridiem=r}),ie(["h","hh"],function(r,a,c){a[ge]=Z(r),v(c).bigHour=!0}),ie("hmm",function(r,a,c){var d=r.length-2;a[ge]=Z(r.substr(0,d)),a[ct]=Z(r.substr(d)),v(c).bigHour=!0}),ie("hmmss",function(r,a,c){var d=r.length-4,g=r.length-2;a[ge]=Z(r.substr(0,d)),a[ct]=Z(r.substr(d,2)),a[Tt]=Z(r.substr(g)),v(c).bigHour=!0}),ie("Hmm",function(r,a,c){var d=r.length-2;a[ge]=Z(r.substr(0,d)),a[ct]=Z(r.substr(d))}),ie("Hmmss",function(r,a,c){var d=r.length-4,g=r.length-2;a[ge]=Z(r.substr(0,d)),a[ct]=Z(r.substr(d,2)),a[Tt]=Z(r.substr(g))});function Td(r){return(r+"").toLowerCase().charAt(0)==="p"}var Ad=/[ap]\.?m?\.?/i,Fd=_n("Hours",!0);function Pd(r,a,c){return r>11?c?"pm":"PM":c?"am":"AM"}var Ga={calendar:ee,longDateFormat:pe,invalidDate:st,ordinal:zt,dayOfMonthOrdinalParse:tr,relativeTime:Yr,months:$f,monthsShort:Ya,week:rd,weekdays:cd,weekdaysMin:fd,weekdaysShort:Va,meridiemParse:Ad},le={},lr={},ur;function Md(r,a){var c,d=Math.min(r.length,a.length);for(c=0;c<d;c+=1)if(r[c]!==a[c])return c;return d}function qa(r){return r&&r.toLowerCase().replace("_","-")}function Id(r){for(var a=0,c,d,g,x;a<r.length;){for(x=qa(r[a]).split("-"),c=x.length,d=qa(r[a+1]),d=d?d.split("-"):null;c>0;){if(g=Gr(x.slice(0,c).join("-")),g)return g;if(d&&d.length>=c&&Md(x,d)>=c-1)break;c--}a++}return ur}function Ld(r){return!!(r&&r.match("^[^/\\\\]*$"))}function Gr(r){var a=null,c;if(le[r]===void 0&&typeof er<"u"&&er&&er.exports&&Ld(r))try{a=ur._abbr,c=require,c("./locale/"+r),Bt(a)}catch{le[r]=null}return le[r]}function Bt(r,a){var c;return r&&(u(a)?c=Ft(r):c=Vo(r,a),c?ur=c:typeof console<"u"&&console.warn&&console.warn("Locale "+r+" not found. Did you forget to load it?")),ur._abbr}function Vo(r,a){if(a!==null){var c,d=Ga;if(a.abbr=r,le[r]!=null)ne("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),d=le[r]._config;else if(a.parentLocale!=null)if(le[a.parentLocale]!=null)d=le[a.parentLocale]._config;else if(c=Gr(a.parentLocale),c!=null)d=c._config;else return lr[a.parentLocale]||(lr[a.parentLocale]=[]),lr[a.parentLocale].push({name:r,config:a}),null;return le[r]=new H(N(d,a)),lr[r]&&lr[r].forEach(function(g){Vo(g.name,g.config)}),Bt(r),le[r]}else return delete le[r],null}function Od(r,a){if(a!=null){var c,d,g=Ga;le[r]!=null&&le[r].parentLocale!=null?le[r].set(N(le[r]._config,a)):(d=Gr(r),d!=null&&(g=d._config),a=N(g,a),d==null&&(a.abbr=r),c=new H(a),c.parentLocale=le[r],le[r]=c),Bt(r)}else le[r]!=null&&(le[r].parentLocale!=null?(le[r]=le[r].parentLocale,r===Bt()&&Bt(r)):le[r]!=null&&delete le[r]);return le[r]}function Ft(r){var a;if(r&&r._locale&&r._locale._abbr&&(r=r._locale._abbr),!r)return ur;if(!i(r)){if(a=Gr(r),a)return a;r=[r]}return Id(r)}function Dd(){return W(le)}function $o(r){var a,c=r._a;return c&&v(r).overflow===-2&&(a=c[Et]<0||c[Et]>11?Et:c[gt]<1||c[gt]>zo(c[Te],c[Et])?gt:c[ge]<0||c[ge]>24||c[ge]===24&&(c[ct]!==0||c[Tt]!==0||c[rn]!==0)?ge:c[ct]<0||c[ct]>59?ct:c[Tt]<0||c[Tt]>59?Tt:c[rn]<0||c[rn]>999?rn:-1,v(r)._overflowDayOfYear&&(a<Te||a>gt)&&(a=gt),v(r)._overflowWeeks&&a===-1&&(a=Wf),v(r)._overflowWeekday&&a===-1&&(a=zf),v(r).overflow=a),r}var Rd=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Nd=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Yd=/Z|[+-]\d\d(?::?\d\d)?/,qr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],jo=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Wd=/^\/?Date\((-?\d+)/i,zd=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Bd={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Za(r){var a,c,d=r._i,g=Rd.exec(d)||Nd.exec(d),x,S,O,z,Q=qr.length,Oe=jo.length;if(g){for(v(r).iso=!0,a=0,c=Q;a<c;a++)if(qr[a][1].exec(g[1])){S=qr[a][0],x=qr[a][2]!==!1;break}if(S==null){r._isValid=!1;return}if(g[3]){for(a=0,c=Oe;a<c;a++)if(jo[a][1].exec(g[3])){O=(g[2]||" ")+jo[a][0];break}if(O==null){r._isValid=!1;return}}if(!x&&O!=null){r._isValid=!1;return}if(g[4])if(Yd.exec(g[4]))z="Z";else{r._isValid=!1;return}r._f=S+(O||"")+(z||""),qo(r)}else r._isValid=!1}function Hd(r,a,c,d,g,x){var S=[Ud(r),Ya.indexOf(a),parseInt(c,10),parseInt(d,10),parseInt(g,10)];return x&&S.push(parseInt(x,10)),S}function Ud(r){var a=parseInt(r,10);return a<=49?2e3+a:a<=999?1900+a:a}function Vd(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function $d(r,a,c){if(r){var d=Va.indexOf(r),g=new Date(a[0],a[1],a[2]).getDay();if(d!==g)return v(c).weekdayMismatch=!0,c._isValid=!1,!1}return!0}function jd(r,a,c){if(r)return Bd[r];if(a)return 0;var d=parseInt(c,10),g=d%100,x=(d-g)/100;return x*60+g}function Qa(r){var a=zd.exec(Vd(r._i)),c;if(a){if(c=Hd(a[4],a[3],a[2],a[5],a[6],a[7]),!$d(a[1],c,r))return;r._a=c,r._tzm=jd(a[8],a[9],a[10]),r._d=sr.apply(null,r._a),r._d.setUTCMinutes(r._d.getUTCMinutes()-r._tzm),v(r).rfc2822=!0}else r._isValid=!1}function Gd(r){var a=Wd.exec(r._i);if(a!==null){r._d=new Date(+a[1]);return}if(Za(r),r._isValid===!1)delete r._isValid;else return;if(Qa(r),r._isValid===!1)delete r._isValid;else return;r._strict?r._isValid=!1:t.createFromInputFallback(r)}t.createFromInputFallback=j("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(r){r._d=new Date(r._i+(r._useUTC?" UTC":""))});function En(r,a,c){return r??a??c}function qd(r){var a=new Date(t.now());return r._useUTC?[a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()]:[a.getFullYear(),a.getMonth(),a.getDate()]}function Go(r){var a,c,d=[],g,x,S;if(!r._d){for(g=qd(r),r._w&&r._a[gt]==null&&r._a[Et]==null&&Zd(r),r._dayOfYear!=null&&(S=En(r._a[Te],g[Te]),(r._dayOfYear>ir(S)||r._dayOfYear===0)&&(v(r)._overflowDayOfYear=!0),c=sr(S,0,r._dayOfYear),r._a[Et]=c.getUTCMonth(),r._a[gt]=c.getUTCDate()),a=0;a<3&&r._a[a]==null;++a)r._a[a]=d[a]=g[a];for(;a<7;a++)r._a[a]=d[a]=r._a[a]==null?a===2?1:0:r._a[a];r._a[ge]===24&&r._a[ct]===0&&r._a[Tt]===0&&r._a[rn]===0&&(r._nextDay=!0,r._a[ge]=0),r._d=(r._useUTC?sr:td).apply(null,d),x=r._useUTC?r._d.getUTCDay():r._d.getDay(),r._tzm!=null&&r._d.setUTCMinutes(r._d.getUTCMinutes()-r._tzm),r._nextDay&&(r._a[ge]=24),r._w&&typeof r._w.d<"u"&&r._w.d!==x&&(v(r).weekdayMismatch=!0)}}function Zd(r){var a,c,d,g,x,S,O,z,Q;a=r._w,a.GG!=null||a.W!=null||a.E!=null?(x=1,S=4,c=En(a.GG,r._a[Te],ar(ae(),1,4).year),d=En(a.W,1),g=En(a.E,1),(g<1||g>7)&&(z=!0)):(x=r._locale._week.dow,S=r._locale._week.doy,Q=ar(ae(),x,S),c=En(a.gg,r._a[Te],Q.year),d=En(a.w,Q.week),a.d!=null?(g=a.d,(g<0||g>6)&&(z=!0)):a.e!=null?(g=a.e+x,(a.e<0||a.e>6)&&(z=!0)):g=x),d<1||d>At(c,x,S)?v(r)._overflowWeeks=!0:z!=null?v(r)._overflowWeekday=!0:(O=Ua(c,d,g,x,S),r._a[Te]=O.year,r._dayOfYear=O.dayOfYear)}t.ISO_8601=function(){},t.RFC_2822=function(){};function qo(r){if(r._f===t.ISO_8601){Za(r);return}if(r._f===t.RFC_2822){Qa(r);return}r._a=[],v(r).empty=!0;var a=""+r._i,c,d,g,x,S,O=a.length,z=0,Q,Oe;for(g=tn(r._f,r._locale).match(ze)||[],Oe=g.length,c=0;c<Oe;c++)x=g[c],d=(a.match(Rf(x,r))||[])[0],d&&(S=a.substr(0,a.indexOf(d)),S.length>0&&v(r).unusedInput.push(S),a=a.slice(a.indexOf(d)+d.length),z+=d.length),_e[x]?(d?v(r).empty=!1:v(r).unusedTokens.push(x),Yf(x,d,r)):r._strict&&!d&&v(r).unusedTokens.push(x);v(r).charsLeftOver=O-z,a.length>0&&v(r).unusedInput.push(a),r._a[ge]<=12&&v(r).bigHour===!0&&r._a[ge]>0&&(v(r).bigHour=void 0),v(r).parsedDateParts=r._a.slice(0),v(r).meridiem=r._meridiem,r._a[ge]=Qd(r._locale,r._a[ge],r._meridiem),Q=v(r).era,Q!==null&&(r._a[Te]=r._locale.erasConvertYear(Q,r._a[Te])),Go(r),$o(r)}function Qd(r,a,c){var d;return c==null?a:r.meridiemHour!=null?r.meridiemHour(a,c):(r.isPM!=null&&(d=r.isPM(c),d&&a<12&&(a+=12),!d&&a===12&&(a=0)),a)}function Jd(r){var a,c,d,g,x,S,O=!1,z=r._f.length;if(z===0){v(r).invalidFormat=!0,r._d=new Date(NaN);return}for(g=0;g<z;g++)x=0,S=!1,a=Y({},r),r._useUTC!=null&&(a._useUTC=r._useUTC),a._f=r._f[g],qo(a),T(a)&&(S=!0),x+=v(a).charsLeftOver,x+=v(a).unusedTokens.length*10,v(a).score=x,O?x<d&&(d=x,c=a):(d==null||x<d||S)&&(d=x,c=a,S&&(O=!0));p(r,c||a)}function Kd(r){if(!r._d){var a=Cn(r._i),c=a.day===void 0?a.date:a.day;r._a=h([a.year,a.month,c,a.hour,a.minute,a.second,a.millisecond],function(d){return d&&parseInt(d,10)}),Go(r)}}function Xd(r){var a=new B($o(Ja(r)));return a._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function Ja(r){var a=r._i,c=r._f;return r._locale=r._locale||Ft(r._l),a===null||c===void 0&&a===""?C({nullInput:!0}):(typeof a=="string"&&(r._i=a=r._locale.preparse(a)),_(a)?new B($o(a)):(m(a)?r._d=a:i(c)?Jd(r):c?qo(r):eh(r),T(r)||(r._d=null),r))}function eh(r){var a=r._i;u(a)?r._d=new Date(t.now()):m(a)?r._d=new Date(a.valueOf()):typeof a=="string"?Gd(r):i(a)?(r._a=h(a.slice(0),function(c){return parseInt(c,10)}),Go(r)):o(a)?Kd(r):f(a)?r._d=new Date(a):t.createFromInputFallback(r)}function Ka(r,a,c,d,g){var x={};return(a===!0||a===!1)&&(d=a,a=void 0),(c===!0||c===!1)&&(d=c,c=void 0),(o(r)&&l(r)||i(r)&&r.length===0)&&(r=void 0),x._isAMomentObject=!0,x._useUTC=x._isUTC=g,x._l=c,x._i=r,x._f=a,x._strict=d,Xd(x)}function ae(r,a,c,d){return Ka(r,a,c,d,!1)}var th=j("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var r=ae.apply(null,arguments);return this.isValid()&&r.isValid()?r<this?this:r:C()}),nh=j("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var r=ae.apply(null,arguments);return this.isValid()&&r.isValid()?r>this?this:r:C()});function Xa(r,a){var c,d;if(a.length===1&&i(a[0])&&(a=a[0]),!a.length)return ae();for(c=a[0],d=1;d<a.length;++d)(!a[d].isValid()||a[d][r](c))&&(c=a[d]);return c}function rh(){var r=[].slice.call(arguments,0);return Xa("isBefore",r)}function ih(){var r=[].slice.call(arguments,0);return Xa("isAfter",r)}var oh=function(){return Date.now?Date.now():+new Date},cr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function sh(r){var a,c=!1,d,g=cr.length;for(a in r)if(s(r,a)&&!(de.call(cr,a)!==-1&&(r[a]==null||!isNaN(r[a]))))return!1;for(d=0;d<g;++d)if(r[cr[d]]){if(c)return!1;parseFloat(r[cr[d]])!==Z(r[cr[d]])&&(c=!0)}return!0}function ah(){return this._isValid}function lh(){return ft(NaN)}function Zr(r){var a=Cn(r),c=a.year||0,d=a.quarter||0,g=a.month||0,x=a.week||a.isoWeek||0,S=a.day||0,O=a.hour||0,z=a.minute||0,Q=a.second||0,Oe=a.millisecond||0;this._isValid=sh(a),this._milliseconds=+Oe+Q*1e3+z*6e4+O*1e3*60*60,this._days=+S+x*7,this._months=+g+d*3+c*12,this._data={},this._locale=Ft(),this._bubble()}function Qr(r){return r instanceof Zr}function Zo(r){return r<0?Math.round(-1*r)*-1:Math.round(r)}function uh(r,a,c){var d=Math.min(r.length,a.length),g=Math.abs(r.length-a.length),x=0,S;for(S=0;S<d;S++)(c&&r[S]!==a[S]||!c&&Z(r[S])!==Z(a[S]))&&x++;return x+g}function el(r,a){y(r,0,0,function(){var c=this.utcOffset(),d="+";return c<0&&(c=-c,d="-"),d+fe(~~(c/60),2)+a+fe(~~c%60,2)})}el("Z",":"),el("ZZ",""),D("Z",lt),D("ZZ",lt),ie(["Z","ZZ"],function(r,a,c){c._useUTC=!0,c._tzm=Qo(lt,r)});var ch=/([\+\-]|\d\d)/gi;function Qo(r,a){var c=(a||"").match(r),d,g,x;return c===null?null:(d=c[c.length-1]||[],g=(d+"").match(ch)||["-",0,0],x=+(g[1]*60)+Z(g[2]),x===0?0:g[0]==="+"?x:-x)}function Jo(r,a){var c,d;return a._isUTC?(c=a.clone(),d=(_(r)||m(r)?r.valueOf():ae(r).valueOf())-c.valueOf(),c._d.setTime(c._d.valueOf()+d),t.updateOffset(c,!1),c):ae(r).local()}function Ko(r){return-Math.round(r._d.getTimezoneOffset())}t.updateOffset=function(){};function fh(r,a,c){var d=this._offset||0,g;if(!this.isValid())return r!=null?this:NaN;if(r!=null){if(typeof r=="string"){if(r=Qo(lt,r),r===null)return this}else Math.abs(r)<16&&!c&&(r=r*60);return!this._isUTC&&a&&(g=Ko(this)),this._offset=r,this._isUTC=!0,g!=null&&this.add(g,"m"),d!==r&&(!a||this._changeInProgress?il(this,ft(r-d,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?d:Ko(this)}function dh(r,a){return r!=null?(typeof r!="string"&&(r=-r),this.utcOffset(r,a),this):-this.utcOffset()}function hh(r){return this.utcOffset(0,r)}function mh(r){return this._isUTC&&(this.utcOffset(0,r),this._isUTC=!1,r&&this.subtract(Ko(this),"m")),this}function ph(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var r=Qo(Le,this._i);r!=null?this.utcOffset(r):this.utcOffset(0,!0)}return this}function gh(r){return this.isValid()?(r=r?ae(r).utcOffset():0,(this.utcOffset()-r)%60===0):!1}function wh(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function kh(){if(!u(this._isDSTShifted))return this._isDSTShifted;var r={},a;return Y(r,this),r=Ja(r),r._a?(a=r._isUTC?w(r._a):ae(r._a),this._isDSTShifted=this.isValid()&&uh(r._a,a.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function yh(){return this.isValid()?!this._isUTC:!1}function xh(){return this.isValid()?this._isUTC:!1}function tl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var bh=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,vh=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ft(r,a){var c=r,d=null,g,x,S;return Qr(r)?c={ms:r._milliseconds,d:r._days,M:r._months}:f(r)||!isNaN(+r)?(c={},a?c[a]=+r:c.milliseconds=+r):(d=bh.exec(r))?(g=d[1]==="-"?-1:1,c={y:0,d:Z(d[gt])*g,h:Z(d[ge])*g,m:Z(d[ct])*g,s:Z(d[Tt])*g,ms:Z(Zo(d[rn]*1e3))*g}):(d=vh.exec(r))?(g=d[1]==="-"?-1:1,c={y:on(d[2],g),M:on(d[3],g),w:on(d[4],g),d:on(d[5],g),h:on(d[6],g),m:on(d[7],g),s:on(d[8],g)}):c==null?c={}:typeof c=="object"&&("from"in c||"to"in c)&&(S=Ch(ae(c.from),ae(c.to)),c={},c.ms=S.milliseconds,c.M=S.months),x=new Zr(c),Qr(r)&&s(r,"_locale")&&(x._locale=r._locale),Qr(r)&&s(r,"_isValid")&&(x._isValid=r._isValid),x}ft.fn=Zr.prototype,ft.invalid=lh;function on(r,a){var c=r&&parseFloat(r.replace(",","."));return(isNaN(c)?0:c)*a}function nl(r,a){var c={};return c.months=a.month()-r.month()+(a.year()-r.year())*12,r.clone().add(c.months,"M").isAfter(a)&&--c.months,c.milliseconds=+a-+r.clone().add(c.months,"M"),c}function Ch(r,a){var c;return r.isValid()&&a.isValid()?(a=Jo(a,r),r.isBefore(a)?c=nl(r,a):(c=nl(a,r),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}function rl(r,a){return function(c,d){var g,x;return d!==null&&!isNaN(+d)&&(ne(a,"moment()."+a+"(period, number) is deprecated. Please use moment()."+a+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),x=c,c=d,d=x),g=ft(c,d),il(this,g,r),this}}function il(r,a,c,d){var g=a._milliseconds,x=Zo(a._days),S=Zo(a._months);r.isValid()&&(d=d??!0,S&&za(r,or(r,"Month")+S*c),x&&Na(r,"Date",or(r,"Date")+x*c),g&&r._d.setTime(r._d.valueOf()+g*c),d&&t.updateOffset(r,x||S))}var Sh=rl(1,"add"),_h=rl(-1,"subtract");function ol(r){return typeof r=="string"||r instanceof String}function Eh(r){return _(r)||m(r)||ol(r)||f(r)||Ah(r)||Th(r)||r===null||r===void 0}function Th(r){var a=o(r)&&!l(r),c=!1,d=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],g,x,S=d.length;for(g=0;g<S;g+=1)x=d[g],c=c||s(r,x);return a&&c}function Ah(r){var a=i(r),c=!1;return a&&(c=r.filter(function(d){return!f(d)&&ol(r)}).length===0),a&&c}function Fh(r){var a=o(r)&&!l(r),c=!1,d=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],g,x;for(g=0;g<d.length;g+=1)x=d[g],c=c||s(r,x);return a&&c}function Ph(r,a){var c=r.diff(a,"days",!0);return c<-6?"sameElse":c<-1?"lastWeek":c<0?"lastDay":c<1?"sameDay":c<2?"nextDay":c<7?"nextWeek":"sameElse"}function Mh(r,a){arguments.length===1&&(arguments[0]?Eh(arguments[0])?(r=arguments[0],a=void 0):Fh(arguments[0])&&(a=arguments[0],r=void 0):(r=void 0,a=void 0));var c=r||ae(),d=Jo(c,this).startOf("day"),g=t.calendarFormat(this,d)||"sameElse",x=a&&(oe(a[g])?a[g].call(this,c):a[g]);return this.format(x||this.localeData().calendar(g,this,ae(c)))}function Ih(){return new B(this)}function Lh(r,a){var c=_(r)?r:ae(r);return this.isValid()&&c.isValid()?(a=Me(a)||"millisecond",a==="millisecond"?this.valueOf()>c.valueOf():c.valueOf()<this.clone().startOf(a).valueOf()):!1}function Oh(r,a){var c=_(r)?r:ae(r);return this.isValid()&&c.isValid()?(a=Me(a)||"millisecond",a==="millisecond"?this.valueOf()<c.valueOf():this.clone().endOf(a).valueOf()<c.valueOf()):!1}function Dh(r,a,c,d){var g=_(r)?r:ae(r),x=_(a)?a:ae(a);return this.isValid()&&g.isValid()&&x.isValid()?(d=d||"()",(d[0]==="("?this.isAfter(g,c):!this.isBefore(g,c))&&(d[1]===")"?this.isBefore(x,c):!this.isAfter(x,c))):!1}function Rh(r,a){var c=_(r)?r:ae(r),d;return this.isValid()&&c.isValid()?(a=Me(a)||"millisecond",a==="millisecond"?this.valueOf()===c.valueOf():(d=c.valueOf(),this.clone().startOf(a).valueOf()<=d&&d<=this.clone().endOf(a).valueOf())):!1}function Nh(r,a){return this.isSame(r,a)||this.isAfter(r,a)}function Yh(r,a){return this.isSame(r,a)||this.isBefore(r,a)}function Wh(r,a,c){var d,g,x;if(!this.isValid())return NaN;if(d=Jo(r,this),!d.isValid())return NaN;switch(g=(d.utcOffset()-this.utcOffset())*6e4,a=Me(a),a){case"year":x=Jr(this,d)/12;break;case"month":x=Jr(this,d);break;case"quarter":x=Jr(this,d)/3;break;case"second":x=(this-d)/1e3;break;case"minute":x=(this-d)/6e4;break;case"hour":x=(this-d)/36e5;break;case"day":x=(this-d-g)/864e5;break;case"week":x=(this-d-g)/6048e5;break;default:x=this-d}return c?x:Ke(x)}function Jr(r,a){if(r.date()<a.date())return-Jr(a,r);var c=(a.year()-r.year())*12+(a.month()-r.month()),d=r.clone().add(c,"months"),g,x;return a-d<0?(g=r.clone().add(c-1,"months"),x=(a-d)/(d-g)):(g=r.clone().add(c+1,"months"),x=(a-d)/(g-d)),-(c+x)||0}t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function zh(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Bh(r){if(!this.isValid())return null;var a=r!==!0,c=a?this.clone().utc():this;return c.year()<0||c.year()>9999?Wt(c,a?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):oe(Date.prototype.toISOString)?a?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Wt(c,"Z")):Wt(c,a?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Hh(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var r="moment",a="",c,d,g,x;return this.isLocal()||(r=this.utcOffset()===0?"moment.utc":"moment.parseZone",a="Z"),c="["+r+'("]',d=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",g="-MM-DD[T]HH:mm:ss.SSS",x=a+'[")]',this.format(c+d+g+x)}function Uh(r){r||(r=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var a=Wt(this,r);return this.localeData().postformat(a)}function Vh(r,a){return this.isValid()&&(_(r)&&r.isValid()||ae(r).isValid())?ft({to:this,from:r}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function $h(r){return this.from(ae(),r)}function jh(r,a){return this.isValid()&&(_(r)&&r.isValid()||ae(r).isValid())?ft({from:this,to:r}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function Gh(r){return this.to(ae(),r)}function sl(r){var a;return r===void 0?this._locale._abbr:(a=Ft(r),a!=null&&(this._locale=a),this)}var al=j("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(r){return r===void 0?this.localeData():this.locale(r)});function ll(){return this._locale}var Kr=1e3,Tn=60*Kr,Xr=60*Tn,ul=(365*400+97)*24*Xr;function An(r,a){return(r%a+a)%a}function cl(r,a,c){return r<100&&r>=0?new Date(r+400,a,c)-ul:new Date(r,a,c).valueOf()}function fl(r,a,c){return r<100&&r>=0?Date.UTC(r+400,a,c)-ul:Date.UTC(r,a,c)}function qh(r){var a,c;if(r=Me(r),r===void 0||r==="millisecond"||!this.isValid())return this;switch(c=this._isUTC?fl:cl,r){case"year":a=c(this.year(),0,1);break;case"quarter":a=c(this.year(),this.month()-this.month()%3,1);break;case"month":a=c(this.year(),this.month(),1);break;case"week":a=c(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":a=c(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":a=c(this.year(),this.month(),this.date());break;case"hour":a=this._d.valueOf(),a-=An(a+(this._isUTC?0:this.utcOffset()*Tn),Xr);break;case"minute":a=this._d.valueOf(),a-=An(a,Tn);break;case"second":a=this._d.valueOf(),a-=An(a,Kr);break}return this._d.setTime(a),t.updateOffset(this,!0),this}function Zh(r){var a,c;if(r=Me(r),r===void 0||r==="millisecond"||!this.isValid())return this;switch(c=this._isUTC?fl:cl,r){case"year":a=c(this.year()+1,0,1)-1;break;case"quarter":a=c(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":a=c(this.year(),this.month()+1,1)-1;break;case"week":a=c(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":a=c(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":a=c(this.year(),this.month(),this.date()+1)-1;break;case"hour":a=this._d.valueOf(),a+=Xr-An(a+(this._isUTC?0:this.utcOffset()*Tn),Xr)-1;break;case"minute":a=this._d.valueOf(),a+=Tn-An(a,Tn)-1;break;case"second":a=this._d.valueOf(),a+=Kr-An(a,Kr)-1;break}return this._d.setTime(a),t.updateOffset(this,!0),this}function Qh(){return this._d.valueOf()-(this._offset||0)*6e4}function Jh(){return Math.floor(this.valueOf()/1e3)}function Kh(){return new Date(this.valueOf())}function Xh(){var r=this;return[r.year(),r.month(),r.date(),r.hour(),r.minute(),r.second(),r.millisecond()]}function em(){var r=this;return{years:r.year(),months:r.month(),date:r.date(),hours:r.hours(),minutes:r.minutes(),seconds:r.seconds(),milliseconds:r.milliseconds()}}function tm(){return this.isValid()?this.toISOString():null}function nm(){return T(this)}function rm(){return p({},v(this))}function im(){return v(this).overflow}function om(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}y("N",0,0,"eraAbbr"),y("NN",0,0,"eraAbbr"),y("NNN",0,0,"eraAbbr"),y("NNNN",0,0,"eraName"),y("NNNNN",0,0,"eraNarrow"),y("y",["y",1],"yo","eraYear"),y("y",["yy",2],0,"eraYear"),y("y",["yyy",3],0,"eraYear"),y("y",["yyyy",4],0,"eraYear"),D("N",Xo),D("NN",Xo),D("NNN",Xo),D("NNNN",gm),D("NNNNN",wm),ie(["N","NN","NNN","NNNN","NNNNN"],function(r,a,c,d){var g=c._locale.erasParse(r,d,c._strict);g?v(c).era=g:v(c).invalidEra=r}),D("y",Je),D("yy",Je),D("yyy",Je),D("yyyy",Je),D("yo",km),ie(["y","yy","yyy","yyyy"],Te),ie(["yo"],function(r,a,c,d){var g;c._locale._eraYearOrdinalRegex&&(g=r.match(c._locale._eraYearOrdinalRegex)),c._locale.eraYearOrdinalParse?a[Te]=c._locale.eraYearOrdinalParse(r,g):a[Te]=parseInt(r,10)});function sm(r,a){var c,d,g,x=this._eras||Ft("en")._eras;for(c=0,d=x.length;c<d;++c){switch(typeof x[c].since){case"string":g=t(x[c].since).startOf("day"),x[c].since=g.valueOf();break}switch(typeof x[c].until){case"undefined":x[c].until=1/0;break;case"string":g=t(x[c].until).startOf("day").valueOf(),x[c].until=g.valueOf();break}}return x}function am(r,a,c){var d,g,x=this.eras(),S,O,z;for(r=r.toUpperCase(),d=0,g=x.length;d<g;++d)if(S=x[d].name.toUpperCase(),O=x[d].abbr.toUpperCase(),z=x[d].narrow.toUpperCase(),c)switch(a){case"N":case"NN":case"NNN":if(O===r)return x[d];break;case"NNNN":if(S===r)return x[d];break;case"NNNNN":if(z===r)return x[d];break}else if([S,O,z].indexOf(r)>=0)return x[d]}function lm(r,a){var c=r.since<=r.until?1:-1;return a===void 0?t(r.since).year():t(r.since).year()+(a-r.offset)*c}function um(){var r,a,c,d=this.localeData().eras();for(r=0,a=d.length;r<a;++r)if(c=this.clone().startOf("day").valueOf(),d[r].since<=c&&c<=d[r].until||d[r].until<=c&&c<=d[r].since)return d[r].name;return""}function cm(){var r,a,c,d=this.localeData().eras();for(r=0,a=d.length;r<a;++r)if(c=this.clone().startOf("day").valueOf(),d[r].since<=c&&c<=d[r].until||d[r].until<=c&&c<=d[r].since)return d[r].narrow;return""}function fm(){var r,a,c,d=this.localeData().eras();for(r=0,a=d.length;r<a;++r)if(c=this.clone().startOf("day").valueOf(),d[r].since<=c&&c<=d[r].until||d[r].until<=c&&c<=d[r].since)return d[r].abbr;return""}function dm(){var r,a,c,d,g=this.localeData().eras();for(r=0,a=g.length;r<a;++r)if(c=g[r].since<=g[r].until?1:-1,d=this.clone().startOf("day").valueOf(),g[r].since<=d&&d<=g[r].until||g[r].until<=d&&d<=g[r].since)return(this.year()-t(g[r].since).year())*c+g[r].offset;return this.year()}function hm(r){return s(this,"_erasNameRegex")||es.call(this),r?this._erasNameRegex:this._erasRegex}function mm(r){return s(this,"_erasAbbrRegex")||es.call(this),r?this._erasAbbrRegex:this._erasRegex}function pm(r){return s(this,"_erasNarrowRegex")||es.call(this),r?this._erasNarrowRegex:this._erasRegex}function Xo(r,a){return a.erasAbbrRegex(r)}function gm(r,a){return a.erasNameRegex(r)}function wm(r,a){return a.erasNarrowRegex(r)}function km(r,a){return a._eraYearOrdinalRegex||Je}function es(){var r=[],a=[],c=[],d=[],g,x,S,O,z,Q=this.eras();for(g=0,x=Q.length;g<x;++g)S=_t(Q[g].name),O=_t(Q[g].abbr),z=_t(Q[g].narrow),a.push(S),r.push(O),c.push(z),d.push(S),d.push(O),d.push(z);this._erasRegex=new RegExp("^("+d.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+c.join("|")+")","i")}y(0,["gg",2],0,function(){return this.weekYear()%100}),y(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ei(r,a){y(0,[r,r.length],0,a)}ei("gggg","weekYear"),ei("ggggg","weekYear"),ei("GGGG","isoWeekYear"),ei("GGGGG","isoWeekYear"),D("G",pt),D("g",pt),D("GG",L,Ie),D("gg",L,Ie),D("GGGG",at,E),D("gggg",at,E),D("GGGGG",Be,I),D("ggggg",Be,I),rr(["gggg","ggggg","GGGG","GGGGG"],function(r,a,c,d){a[d.substr(0,2)]=Z(r)}),rr(["gg","GG"],function(r,a,c,d){a[d]=t.parseTwoDigitYear(r)});function ym(r){return dl.call(this,r,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function xm(r){return dl.call(this,r,this.isoWeek(),this.isoWeekday(),1,4)}function bm(){return At(this.year(),1,4)}function vm(){return At(this.isoWeekYear(),1,4)}function Cm(){var r=this.localeData()._week;return At(this.year(),r.dow,r.doy)}function Sm(){var r=this.localeData()._week;return At(this.weekYear(),r.dow,r.doy)}function dl(r,a,c,d,g){var x;return r==null?ar(this,d,g).year:(x=At(r,d,g),a>x&&(a=x),_m.call(this,r,a,c,d,g))}function _m(r,a,c,d,g){var x=Ua(r,a,c,d,g),S=sr(x.year,0,x.dayOfYear);return this.year(S.getUTCFullYear()),this.month(S.getUTCMonth()),this.date(S.getUTCDate()),this}y("Q",0,"Qo","quarter"),D("Q",Hr),ie("Q",function(r,a){a[Et]=(Z(r)-1)*3});function Em(r){return r==null?Math.ceil((this.month()+1)/3):this.month((r-1)*3+this.month()%3)}y("D",["DD",2],"Do","date"),D("D",L,Sn),D("DD",L,Ie),D("Do",function(r,a){return r?a._dayOfMonthOrdinalParse||a._ordinalParse:a._dayOfMonthOrdinalParseLenient}),ie(["D","DD"],gt),ie("Do",function(r,a){a[gt]=Z(r.match(L)[0])});var hl=_n("Date",!0);y("DDD",["DDDD",3],"DDDo","dayOfYear"),D("DDD",Ee),D("DDDD",Ur),ie(["DDD","DDDD"],function(r,a,c){c._dayOfYear=Z(r)});function Tm(r){var a=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return r==null?a:this.add(r-a,"d")}y("m",["mm",2],0,"minute"),D("m",L,Yo),D("mm",L,Ie),ie(["m","mm"],ct);var Am=_n("Minutes",!1);y("s",["ss",2],0,"second"),D("s",L,Yo),D("ss",L,Ie),ie(["s","ss"],Tt);var Fm=_n("Seconds",!1);y("S",0,0,function(){return~~(this.millisecond()/100)}),y(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),y(0,["SSS",3],0,"millisecond"),y(0,["SSSS",4],0,function(){return this.millisecond()*10}),y(0,["SSSSS",5],0,function(){return this.millisecond()*100}),y(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),y(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),y(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),y(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),D("S",Ee,Hr),D("SS",Ee,Ie),D("SSS",Ee,Ur);var Ht,ml;for(Ht="SSSS";Ht.length<=9;Ht+="S")D(Ht,Je);function Pm(r,a){a[rn]=Z(("0."+r)*1e3)}for(Ht="S";Ht.length<=9;Ht+="S")ie(Ht,Pm);ml=_n("Milliseconds",!1),y("z",0,0,"zoneAbbr"),y("zz",0,0,"zoneName");function Mm(){return this._isUTC?"UTC":""}function Im(){return this._isUTC?"Coordinated Universal Time":""}var M=B.prototype;M.add=Sh,M.calendar=Mh,M.clone=Ih,M.diff=Wh,M.endOf=Zh,M.format=Uh,M.from=Vh,M.fromNow=$h,M.to=jh,M.toNow=Gh,M.get=Hf,M.invalidAt=im,M.isAfter=Lh,M.isBefore=Oh,M.isBetween=Dh,M.isSame=Rh,M.isSameOrAfter=Nh,M.isSameOrBefore=Yh,M.isValid=nm,M.lang=al,M.locale=sl,M.localeData=ll,M.max=nh,M.min=th,M.parsingFlags=rm,M.set=Uf,M.startOf=qh,M.subtract=_h,M.toArray=Xh,M.toObject=em,M.toDate=Kh,M.toISOString=Bh,M.inspect=Hh,typeof Symbol<"u"&&Symbol.for!=null&&(M[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),M.toJSON=tm,M.toString=zh,M.unix=Jh,M.valueOf=Qh,M.creationData=om,M.eraName=um,M.eraNarrow=cm,M.eraAbbr=fm,M.eraYear=dm,M.year=Ra,M.isLeapYear=Bf,M.weekYear=ym,M.isoWeekYear=xm,M.quarter=M.quarters=Em,M.month=Ba,M.daysInMonth=Kf,M.week=M.weeks=sd,M.isoWeek=M.isoWeeks=ad,M.weeksInYear=Cm,M.weeksInWeekYear=Sm,M.isoWeeksInYear=bm,M.isoWeeksInISOWeekYear=vm,M.date=hl,M.day=M.days=xd,M.weekday=bd,M.isoWeekday=vd,M.dayOfYear=Tm,M.hour=M.hours=Fd,M.minute=M.minutes=Am,M.second=M.seconds=Fm,M.millisecond=M.milliseconds=ml,M.utcOffset=fh,M.utc=hh,M.local=mh,M.parseZone=ph,M.hasAlignedHourOffset=gh,M.isDST=wh,M.isLocal=yh,M.isUtcOffset=xh,M.isUtc=tl,M.isUTC=tl,M.zoneAbbr=Mm,M.zoneName=Im,M.dates=j("dates accessor is deprecated. Use date instead.",hl),M.months=j("months accessor is deprecated. Use month instead",Ba),M.years=j("years accessor is deprecated. Use year instead",Ra),M.zone=j("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",dh),M.isDSTShifted=j("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",kh);function Lm(r){return ae(r*1e3)}function Om(){return ae.apply(null,arguments).parseZone()}function pl(r){return r}var te=H.prototype;te.calendar=ue,te.longDateFormat=nn,te.invalidDate=St,te.ordinal=Do,te.preparse=pl,te.postformat=pl,te.relativeTime=Wr,te.pastFuture=zr,te.set=X,te.eras=sm,te.erasParse=am,te.erasConvertYear=lm,te.erasAbbrRegex=mm,te.erasNameRegex=hm,te.erasNarrowRegex=pm,te.months=qf,te.monthsShort=Zf,te.monthsParse=Jf,te.monthsRegex=ed,te.monthsShortRegex=Xf,te.week=nd,te.firstDayOfYear=od,te.firstDayOfWeek=id,te.weekdays=pd,te.weekdaysMin=wd,te.weekdaysShort=gd,te.weekdaysParse=yd,te.weekdaysRegex=Cd,te.weekdaysShortRegex=Sd,te.weekdaysMinRegex=_d,te.isPM=Td,te.meridiem=Pd;function ti(r,a,c,d){var g=Ft(),x=w().set(d,a);return g[c](x,r)}function gl(r,a,c){if(f(r)&&(a=r,r=void 0),r=r||"",a!=null)return ti(r,a,c,"month");var d,g=[];for(d=0;d<12;d++)g[d]=ti(r,d,c,"month");return g}function ts(r,a,c,d){typeof r=="boolean"?(f(a)&&(c=a,a=void 0),a=a||""):(a=r,c=a,r=!1,f(a)&&(c=a,a=void 0),a=a||"");var g=Ft(),x=r?g._week.dow:0,S,O=[];if(c!=null)return ti(a,(c+x)%7,d,"day");for(S=0;S<7;S++)O[S]=ti(a,(S+x)%7,d,"day");return O}function Dm(r,a){return gl(r,a,"months")}function Rm(r,a){return gl(r,a,"monthsShort")}function Nm(r,a,c){return ts(r,a,c,"weekdays")}function Ym(r,a,c){return ts(r,a,c,"weekdaysShort")}function Wm(r,a,c){return ts(r,a,c,"weekdaysMin")}Bt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(r){var a=r%10,c=Z(r%100/10)===1?"th":a===1?"st":a===2?"nd":a===3?"rd":"th";return r+c}}),t.lang=j("moment.lang is deprecated. Use moment.locale instead.",Bt),t.langData=j("moment.langData is deprecated. Use moment.localeData instead.",Ft);var Pt=Math.abs;function zm(){var r=this._data;return this._milliseconds=Pt(this._milliseconds),this._days=Pt(this._days),this._months=Pt(this._months),r.milliseconds=Pt(r.milliseconds),r.seconds=Pt(r.seconds),r.minutes=Pt(r.minutes),r.hours=Pt(r.hours),r.months=Pt(r.months),r.years=Pt(r.years),this}function wl(r,a,c,d){var g=ft(a,c);return r._milliseconds+=d*g._milliseconds,r._days+=d*g._days,r._months+=d*g._months,r._bubble()}function Bm(r,a){return wl(this,r,a,1)}function Hm(r,a){return wl(this,r,a,-1)}function kl(r){return r<0?Math.floor(r):Math.ceil(r)}function Um(){var r=this._milliseconds,a=this._days,c=this._months,d=this._data,g,x,S,O,z;return r>=0&&a>=0&&c>=0||r<=0&&a<=0&&c<=0||(r+=kl(ns(c)+a)*864e5,a=0,c=0),d.milliseconds=r%1e3,g=Ke(r/1e3),d.seconds=g%60,x=Ke(g/60),d.minutes=x%60,S=Ke(x/60),d.hours=S%24,a+=Ke(S/24),z=Ke(yl(a)),c+=z,a-=kl(ns(z)),O=Ke(c/12),c%=12,d.days=a,d.months=c,d.years=O,this}function yl(r){return r*4800/146097}function ns(r){return r*146097/4800}function Vm(r){if(!this.isValid())return NaN;var a,c,d=this._milliseconds;if(r=Me(r),r==="month"||r==="quarter"||r==="year")switch(a=this._days+d/864e5,c=this._months+yl(a),r){case"month":return c;case"quarter":return c/3;case"year":return c/12}else switch(a=this._days+Math.round(ns(this._months)),r){case"week":return a/7+d/6048e5;case"day":return a+d/864e5;case"hour":return a*24+d/36e5;case"minute":return a*1440+d/6e4;case"second":return a*86400+d/1e3;case"millisecond":return Math.floor(a*864e5)+d;default:throw new Error("Unknown unit "+r)}}function Mt(r){return function(){return this.as(r)}}var xl=Mt("ms"),$m=Mt("s"),jm=Mt("m"),Gm=Mt("h"),qm=Mt("d"),Zm=Mt("w"),Qm=Mt("M"),Jm=Mt("Q"),Km=Mt("y"),Xm=xl;function ep(){return ft(this)}function tp(r){return r=Me(r),this.isValid()?this[r+"s"]():NaN}function sn(r){return function(){return this.isValid()?this._data[r]:NaN}}var np=sn("milliseconds"),rp=sn("seconds"),ip=sn("minutes"),op=sn("hours"),sp=sn("days"),ap=sn("months"),lp=sn("years");function up(){return Ke(this.days()/7)}var It=Math.round,Fn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function cp(r,a,c,d,g){return g.relativeTime(a||1,!!c,r,d)}function fp(r,a,c,d){var g=ft(r).abs(),x=It(g.as("s")),S=It(g.as("m")),O=It(g.as("h")),z=It(g.as("d")),Q=It(g.as("M")),Oe=It(g.as("w")),Lt=It(g.as("y")),Ut=x<=c.ss&&["s",x]||x<c.s&&["ss",x]||S<=1&&["m"]||S<c.m&&["mm",S]||O<=1&&["h"]||O<c.h&&["hh",O]||z<=1&&["d"]||z<c.d&&["dd",z];return c.w!=null&&(Ut=Ut||Oe<=1&&["w"]||Oe<c.w&&["ww",Oe]),Ut=Ut||Q<=1&&["M"]||Q<c.M&&["MM",Q]||Lt<=1&&["y"]||["yy",Lt],Ut[2]=a,Ut[3]=+r>0,Ut[4]=d,cp.apply(null,Ut)}function dp(r){return r===void 0?It:typeof r=="function"?(It=r,!0):!1}function hp(r,a){return Fn[r]===void 0?!1:a===void 0?Fn[r]:(Fn[r]=a,r==="s"&&(Fn.ss=a-1),!0)}function mp(r,a){if(!this.isValid())return this.localeData().invalidDate();var c=!1,d=Fn,g,x;return typeof r=="object"&&(a=r,r=!1),typeof r=="boolean"&&(c=r),typeof a=="object"&&(d=Object.assign({},Fn,a),a.s!=null&&a.ss==null&&(d.ss=a.s-1)),g=this.localeData(),x=fp(this,!c,d,g),c&&(x=g.pastFuture(+this,x)),g.postformat(x)}var rs=Math.abs;function Pn(r){return(r>0)-(r<0)||+r}function ni(){if(!this.isValid())return this.localeData().invalidDate();var r=rs(this._milliseconds)/1e3,a=rs(this._days),c=rs(this._months),d,g,x,S,O=this.asSeconds(),z,Q,Oe,Lt;return O?(d=Ke(r/60),g=Ke(d/60),r%=60,d%=60,x=Ke(c/12),c%=12,S=r?r.toFixed(3).replace(/\.?0+$/,""):"",z=O<0?"-":"",Q=Pn(this._months)!==Pn(O)?"-":"",Oe=Pn(this._days)!==Pn(O)?"-":"",Lt=Pn(this._milliseconds)!==Pn(O)?"-":"",z+"P"+(x?Q+x+"Y":"")+(c?Q+c+"M":"")+(a?Oe+a+"D":"")+(g||d||r?"T":"")+(g?Lt+g+"H":"")+(d?Lt+d+"M":"")+(r?Lt+S+"S":"")):"P0D"}var K=Zr.prototype;K.isValid=ah,K.abs=zm,K.add=Bm,K.subtract=Hm,K.as=Vm,K.asMilliseconds=xl,K.asSeconds=$m,K.asMinutes=jm,K.asHours=Gm,K.asDays=qm,K.asWeeks=Zm,K.asMonths=Qm,K.asQuarters=Jm,K.asYears=Km,K.valueOf=Xm,K._bubble=Um,K.clone=ep,K.get=tp,K.milliseconds=np,K.seconds=rp,K.minutes=ip,K.hours=op,K.days=sp,K.weeks=up,K.months=ap,K.years=lp,K.humanize=mp,K.toISOString=ni,K.toString=ni,K.toJSON=ni,K.locale=sl,K.localeData=ll,K.toIsoString=j("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ni),K.lang=al,y("X",0,0,"unix"),y("x",0,0,"valueOf"),D("x",pt),D("X",ut),ie("X",function(r,a,c){c._d=new Date(parseFloat(r)*1e3)}),ie("x",function(r,a,c){c._d=new Date(Z(r))});return t.version="2.30.1",n(ae),t.fn=M,t.min=rh,t.max=ih,t.now=oh,t.utc=w,t.unix=Lm,t.months=Dm,t.isDate=m,t.locale=Bt,t.invalid=C,t.duration=ft,t.isMoment=_,t.weekdays=Nm,t.parseZone=Om,t.localeData=Ft,t.isDuration=Qr,t.monthsShort=Rm,t.weekdaysMin=Wm,t.defineLocale=Vo,t.updateLocale=Od,t.locales=Dd,t.weekdaysShort=Ym,t.normalizeUnits=Me,t.relativeTimeRounding=dp,t.relativeTimeThreshold=hp,t.calendarFormat=Ph,t.prototype=M,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t})});var ry={};bl(ry,{default:()=>ny});module.exports=xp(ry);var ye=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function wt(){}async function is(){}function fr(e){return async(...t)=>{await e(...t)}}var xt=require("obsidian");var bp=require("obsidian"),Cl=require("obsidian"),Sl=require("obsidian"),ay=require("obsidian"),ly=require("obsidian");var an={AudioRecorder:"audio-recorder",Backlink:"backlink",Bookmarks:"bookmarks",Browser:"browser",Canvas:"canvas",CommandPalette:"command-palette",DailyNotes:"daily-notes",EditorStatus:"editor-status",FileExplorer:"file-explorer",FileRecovery:"file-recovery",GlobalSearch:"global-search",Graph:"graph",MarkdownImporter:"markdown-importer",NoteComposer:"note-composer",OutgoingLink:"outgoing-link",Outline:"outline",PagePreview:"page-preview",Properties:"properties",Publish:"publish",RandomNote:"random-note",SlashCommand:"slash-command",Slides:"slides",Switcher:"switcher",Sync:"sync",TagPane:"tag-pane",Templates:"templates",WordCount:"word-count",Workspaces:"workspaces",ZkPrefixer:"zk-prefixer"},sy={AllProperties:"all-properties",Audio:"audio",Backlink:an.Backlink,Bookmarks:an.Bookmarks,Browser:"browser",BrowserHistory:"browser-history",Canvas:an.Canvas,Empty:"empty",FileExplorer:an.FileExplorer,FileProperties:"file-properties",Graph:an.Graph,Image:"image",LocalGraph:"localgraph",Markdown:"markdown",OutgoingLink:an.OutgoingLink,Outline:an.Outline,Pdf:"pdf",ReleaseNotes:"release-notes",Search:"search",Sync:"sync",Tag:"tag",Video:"video"};function vp(){return Cl.TFile}function Cp(){return Sl.TFolder}function dt(e){return e.replace(/\/?[^\/]*$/,"")||"/"}function ii(e,t){let n=e.vault.getFolderByPath(t);return n||(n=new(Cp())(e.vault,t),n.parent=ii(e,dt(t)),n.deleted=!0,n)}function _l(e,t){let n=e.vault.getFileByPath(t);return n||(n=new(vp())(e.vault,t),n.parent=ii(e,dt(t)),n.deleted=!0,n)}function Vt(e){return!!e.position}function Ot(e){return!!e.key}var us=je(Al(),1);var ss=je(Pl(),1);(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var si="asyncError",ai=new ss.default;ai.on(si,Tp);function li(e){ai.emit(si,e)}function Ml(e){return as(e).map(t=>" ".repeat(t.level)+t.message).join(`
|
|
`)}function ln(e=0){return(new Error().stack??"").split(`
|
|
`).slice(e+2).join(`
|
|
`)}function hr(e,t){t??=globalThis.console;let n=as(e);for(let i of n)i.shouldClearAnsiSequence?t.error(`\x1B[0m${i.message}\x1B[0m`):t.error(i.message)}function Il(e){return ai.on(si,e),()=>ai.off(si,e)}function un(e){throw e}function Tp(e){hr(new Error("An unhandled error occurred executing async operation",{cause:e}))}function as(e,t=0,n=[]){if(e===void 0)return n;if(!(e instanceof Error)){let o;return e===null?o="(null)":typeof e=="string"?o=e:o=JSON.stringify(e)??"undefined",n.push({level:t,message:o}),n}let i=`${e.name}: ${e.message}`;if(n.push({level:t,message:i,shouldClearAnsiSequence:!0}),e.stack){let o=e.stack.startsWith(i)?e.stack.slice(i.length+1):e.stack;n.push({level:t,message:`Error stack:
|
|
${o}`})}return e.cause!==void 0&&(n.push({level:t,message:"Caused by:"}),as(e.cause,t+1,n)),n}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function ls(e){return e.replaceAll(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ll(e){try{return new RegExp(e),!0}catch{return!1}}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();async function mr(e,...t){return Ap(e)?await e(...t):e}function Ap(e){return typeof e=="function"}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Fp={"\n":"\\n","\r":"\\r"," ":"\\t","\b":"\\b","\f":"\\f","'":"\\'",'"':'\\"',"\\":"\\\\"},Pp={};for(let[e,t]of Object.entries(Fp))Pp[t]=e;function Ol(e,t,n,i){return i??=n,e.slice(0,n)+t+e.slice(i)}function pr(e){return He(e,/\u00A0|\u202F/g," ").normalize("NFC")}function He(e,t,n){return typeof n>"u"?e:(t instanceof RegExp&&!t.global&&(t=new RegExp(t.source,`${t.flags}g`)),typeof n=="string"?e.replaceAll(t,n):e.replaceAll(t,(i,...o)=>{let l=typeof o.at(-1)=="object",u=l?o.length-2:o.length-1,f={groups:l?o.at(-1):void 0,offset:o.at(u-1),source:o.at(u),substring:i},m=o.slice(0,u-1);return n(f,...m)??f.substring}))}function Dl(e,t,n){if(e.endsWith(t))return e.slice(0,-t.length);if(n)throw new Error(`String ${e} does not end with suffix ${t}`);return e}function Dt(e,t,n){if(e.startsWith(t))return e.slice(t.length);if(n)throw new Error(`String ${e} does not start with prefix ${t}`);return e}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Mp=/[a-zA-Z]:\/[^:]*$/,yt=us.default.posix,Cy=yt.delimiter,Sy=us.default.posix.sep,Re=yt.basename,se=yt.dirname,et=yt.extname,_y=yt.format;var we=yt.join,Ey=yt.normalize,Ty=yt.parse,In=yt.relative;function Rl(e,t){return t?`${e}.${t}`:e}function Nl(...e){let t=yt.resolve(...e);return t=Ip(t),Mp.exec(t)?.[0]??t}function Ip(e){return He(e,"\\","/")}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var ui="md",Lp="canvas";function Wl(e,t,n){if(tt(t))return t.extension===n;if(typeof t=="string"){let i=ce(e,t);return i?i.extension===n:et(t).slice(1)===n}return!1}function gr(e,t,n){if(t===null)return null;if(Hl(t))return t;let i=Yl(e,t,n);if(i)return i;let o=Vl(t);return o===t?null:Yl(e,o,n)}function Ne(e,t,n,i){let o=ce(e,t,i);if(!o)if(n)o=_l(e,t);else throw new Error(`File not found: ${t}`);return o}function ce(e,t,n){let i=gr(e,t,n);return tt(i)?i:null}function Ln(e,t,n,i){let o=ht(e,t,i);if(!o)if(n)o=ii(e,t);else throw new Error(`Folder not found: ${t}`);return o}function ht(e,t,n){let i=gr(e,t,n);return wr(i)?i:null}function zl(e,t,n){let i=Ln(e,t),o=[];return n?xt.Vault.recurseChildren(i,s=>{ke(e,s)&&o.push(s)}):o=i.children.filter(s=>ke(e,s)),o=o.sort((s,l)=>s.path.localeCompare(l.path)),o}async function Bl(e,t){let n=ce(e,t);if(n)return n;let i=dt(t);return await Op(e,i),await e.vault.create(t,"")}async function Op(e,t){let n=ht(e,t);return n||await e.vault.createFolder(t)}function he(e,t){if(Hl(t))return t.path;let n=gr(e,t);return n?n.path:Vl(t)}function Hl(e){return e instanceof xt.TAbstractFile}function cn(e,t){return Wl(e,t,Lp)}function tt(e){return e instanceof xt.TFile}function wr(e){return e instanceof xt.TFolder}function ke(e,t){return Wl(e,t,ui)}function Rt(e,t){return ke(e,t)||cn(e,t)}function Ul(e,t){return ke(e,t)?Dl(t.path,`.${ui}`):t.path}function Yl(e,t,n){return n?e.vault.getAbstractFileByPathInsensitive(t):e.vault.getAbstractFileByPath(t)}function Vl(e){return(0,xt.normalizePath)(Nl("/",e))}var ws=je(nu(),1);(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var ms="19.6.0",mi="obsidian-dev-utils",ru=`.obsidian-dev-utils :invalid {
|
|
box-shadow: 0 0 0 2px var(--text-error);
|
|
}
|
|
.obsidian-dev-utils.modal-container .ok-button {
|
|
margin-right: 10px;
|
|
margin-top: 20px;
|
|
}
|
|
.obsidian-dev-utils .multiple-dropdown-component select,
|
|
.obsidian-dev-utils .multiple-dropdown-component select:focus,
|
|
.obsidian-dev-utils .multiple-dropdown-component .dropdown {
|
|
height: auto;
|
|
}
|
|
.obsidian-dev-utils .multiple-dropdown-component select option:checked,
|
|
.obsidian-dev-utils .multiple-dropdown-component select:focus option:checked,
|
|
.obsidian-dev-utils .multiple-dropdown-component .dropdown option:checked {
|
|
background-color: #1967d2;
|
|
color: #fff;
|
|
}
|
|
.obsidian-dev-utils.prompt-modal .text-box {
|
|
width: 100%;
|
|
}
|
|
|
|
/*# sourceMappingURL=data:application/json;charset=utf-8,%7B%22version%22:3,%22sourceRoot%22:%22%22,%22sources%22:%5B%22../src/styles/main.scss%22%5D,%22names%22:%5B%5D,%22mappings%22:%22AACE;EACE;;AAIA;EACE;EACA;;AAKF;AAAA;AAAA;EAGE;;AAEA;AAAA;AAAA;EACE;EACA;;AAMJ;EACE%22,%22file%22:%22styles.css%22,%22sourcesContent%22:%5B%22.obsidian-dev-utils%20%7B%5Cn%20%20:invalid%20%7B%5Cn%20%20%20%20box-shadow:%200%200%200%202px%20var(--text-error);%5Cn%20%20%7D%5Cn%5Cn%20%20&.modal-container%20%7B%5Cn%20%20%20%20.ok-button%20%7B%5Cn%20%20%20%20%20%20margin-right:%2010px;%5Cn%20%20%20%20%20%20margin-top:%2020px;%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%5Cn%20%20.multiple-dropdown-component%20%7B%5Cn%20%20%20%20select,%5Cn%20%20%20%20select:focus,%5Cn%20%20%20%20.dropdown%20%7B%5Cn%20%20%20%20%20%20height:%20auto;%5Cn%5Cn%20%20%20%20%20%20option:checked%20%7B%5Cn%20%20%20%20%20%20%20%20background-color:%20%231967d2;%5Cn%20%20%20%20%20%20%20%20color:%20%23fff;%5Cn%20%20%20%20%20%20%7D%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%5Cn%20%20&.prompt-modal%20%7B%5Cn%20%20%20%20.text-box%20%7B%5Cn%20%20%20%20%20%20width:%20100%25;%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%7D%5Cn%22%5D%7D */
|
|
`;(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var ps=class{constructor(t){this.value=t}};function iu(){try{return globalThis.require("obsidian/app")}catch{return globalThis.app??un(new Error("Obsidian app not found"))}}function jt(e,t,n){let i=e;return i.obsidianDevUtilsState??={},i.obsidianDevUtilsState[t]??=new ps(n)}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var gs="__no-plugin-id-initialized__",ou=gs;function rt(){return ou}function su(e){e&&(ou=e)}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var au=",",pi="-";function lu(){return{disable:rg,enable:ig,get:wi,set:kr}}function gi(e,t=0){let n=Nn()(e);return n.log=(i,...o)=>{og(e,t,i,...o)},n.printStackTrace=(i,o)=>{fu(e,i,o)},n}function Ue(e){let t=rt(),n=t===gs?"":`${t}:`;return gi(`${n}${mi}:${e}`)}function uu(e){let t=Nn().enabled(e),n=t?"enabled":"disabled",i=t?"disable":"enable",o=wi();kr(e),gi(e)(`Debug messages for plugin ${e} are ${n}. See https://github.com/mnaoumov/obsidian-dev-utils/?tab=readme-ov-file#debugging how to ${i} them.`),kr(o)}function rg(e){let t=new Set(wi());for(let n of yr(e)){if(n.startsWith(pi))continue;let i=pi+n;t.has(n)&&t.delete(n),t.add(i)}kr(Array.from(t))}function ig(e){let t=new Set(wi());for(let n of yr(e)){if(!n.startsWith(pi)){let i=pi+n;t.has(i)&&t.delete(i)}t.add(n)}kr(Array.from(t))}function wi(){return yr(Nn().load()??"")}function Nn(){if(typeof window>"u")return ws.default;let e=iu();return jt(e,"debug",ws.default).value}function cu(){return typeof window<"u"}function og(e,t,n,...i){if(!Nn().enabled(e))return;let l=(new Error().stack?.split(`
|
|
`)??[])[4+t]??"";console.debug(n,...i),cu()&&fu(e,l,"Debug message caller")}function fu(e,t,n){let i=Nn()(e);if(!i.enabled)return;t||(t="(unavailable)"),n||(n="Caller stack trace"),i(n);let o=cu()?`StackTraceFakeError
|
|
`:"";console.debug(`${o}${t}`)}function kr(e){Nn().enable(yr(e).join(au))}function yr(e){return typeof e=="string"?e.split(au).filter(Boolean):e.flatMap(yr)}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();async function dn(e){let t=e.items,n=0,i=new Notice("",0);for(let o of t){if(e.abortSignal?.aborted){i.hide();return}n++;let s=`# ${n.toString()} / ${t.length.toString()}`,l=e.buildNoticeMessage(o,s);i.setMessage(l),Ue("Loop")(l);try{await e.processItem(o)}catch(u){if(e.shouldContinueOnError)throw i.hide(),u;li(u)}}i.hide()}var mu=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var $=(e=>(e.AlertModal="alert-modal",e.CancelButton="cancel-button",e.ConfirmModal="confirm-modal",e.DateComponent="date-component",e.DateTimeComponent="datetime-component",e.EmailComponent="email-component",e.FileComponent="file-component",e.LibraryName="obsidian-dev-utils",e.MonthComponent="month-component",e.MultipleDropdownComponent="multiple-dropdown-component",e.MultipleEmailComponent="multiple-email-component",e.MultipleFileComponent="multiple-file-component",e.MultipleTextComponent="multiple-text-component",e.NumberComponent="number-component",e.OkButton="ok-button",e.PluginSettingsTab="plugin-settings-tab",e.PromptModal="prompt-modal",e.SelectItemModal="select-item-modal",e.TextBox="text-box",e.TimeComponent="time-component",e.UrlComponent="url-component",e.WeekComponent="week-component",e))($||{});var du=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var ki=class extends du.Modal{constructor(t,n,i){super(t.app),this.resolve=n,this.containerEl.addClass($.LibraryName,rt(),i),t.cssClass&&this.containerEl.addClass(t.cssClass)}};async function hu(e){return await new Promise(t=>{e(t).open()})}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var ks=class extends ki{options;constructor(t,n){super(t,n,$.AlertModal);let i={app:t.app,cssClass:"",message:t.message,okButtonText:"OK",title:""};this.options={...i,...t}}onClose(){this.resolve()}onOpen(){this.titleEl.setText(this.options.title),this.contentEl.createEl("p",{text:this.options.message});let t=new mu.ButtonComponent(this.contentEl);t.setButtonText(this.options.okButtonText),t.setCta(),t.onClick(this.close.bind(this)),t.setClass($.OkButton)}};async function yi(e){await hu(t=>new ks(e,t))}var vi=require("obsidian");var ku=je(gu(),1);(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var wu=`${mi}-styles`;function yu(e,t){su(t),uu(t);let n=jt(e,"lastLibraryVersion","0.0.0");if((0,ku.compareVersions)(ms,n.value)<=0)return;n.value=ms;let i=sg();i.DEBUG=lu(),document.head.querySelector(`#${wu}`)?.remove(),document.head.createEl("style",{attr:{id:wu},text:ru})}function sg(){return window}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var bi=class extends vi.Plugin{get abortSignal(){return this._abortSignal}get settings(){return this._settings}get settingsClone(){return this.createPluginSettings(this.settings.toJSON())}_abortSignal;_settings;notice;consoleDebug(t,...n){gi(this.manifest.id,1)(t,...n)}async onExternalSettingsChange(){await this.loadSettings()}async onload(){yu(this.app,this.manifest.id),this.register(Il(()=>{this.showNotice("An unhandled error occurred. Please check the console for more information.")})),await this.loadSettings();let t=this.createPluginSettingsTab();t&&this.addSettingTab(t);let n=new AbortController;this._abortSignal=n.signal,this.register(()=>{n.abort()}),await this.onloadComplete(),setTimeout(()=>{this.app.workspace.onLayoutReady(this.onLayoutReady.bind(this))},0)}async saveSettings(t){let n=t.toJSON();this._settings=this.createPluginSettings(n),await this.saveData(n)}onLayoutReady(){}onloadComplete(){}showNotice(t){this.notice&&this.notice.hide(),this.notice=new vi.Notice(`${this.manifest.name}
|
|
${t}`)}async loadSettings(){let t=await this.loadData();this._settings=this.createPluginSettings(t),this.settings.shouldSaveAfterLoad&&await this.saveSettings(this._settings)}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();async function ys(e){try{await e()}catch(t){li(t)}}function xs(e){return(...t)=>{xr(()=>e(...t))}}function xr(e){ys(e)}async function br(e,t,n){let i=Ue("Async:retryWithTimeout");n??=ln(1);let s={...{retryDelayInMilliseconds:100,shouldRetryOnError:!1,timeoutInMilliseconds:5e3},...t};await bs(s.timeoutInMilliseconds,async()=>{let l=0;for(;;){s.abortSignal?.throwIfAborted(),l++;let u;try{u=await e()}catch(f){if(!s.shouldRetryOnError||f.__terminateRetry)throw f;hr(f),u=!1}if(u){l>1&&(i(`Retry completed successfully after ${l.toString()} attempts`),i.printStackTrace(n));return}i(`Retry attempt ${l.toString()} completed unsuccessfully. Trying again in ${s.retryDelayInMilliseconds.toString()} milliseconds`,{fn:e}),i.printStackTrace(n),await xu(s.retryDelayInMilliseconds)}})}async function bs(e,t){let n=!0,i=null,o=performance.now();if(await Promise.race([s(),l()]),n)throw new Error("Timed out");return i;async function s(){i=await t(),n=!1;let u=performance.now()-o;Ue("Async:runWithTimeout")(`Execution time: ${u.toString()} milliseconds`,{fn:t})}async function l(){if(!n||(await xu(e),!n))return;let u=performance.now()-o;console.warn(`Timed out in ${u.toString()} milliseconds`,{fn:t});let f=Ue("Async:runWithTimeout:timeout");f.enabled&&(f(`The execution is not terminated because debugger ${f.namespace} is enabled. See https://github.com/mnaoumov/obsidian-dev-utils/?tab=readme-ov-file#debugging for more information`),await l())}}async function xu(e){await new Promise(t=>{setTimeout(t,e)})}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();async function bu(e,t,n){let i=Ue("Logger:invokeAsyncAndLog"),o=performance.now();n??=ln(1),i(`${e}:start`,{fn:t,timestampStart:o}),i.printStackTrace(n);try{await t();let s=performance.now();i(`${e}:end`,{duration:s-o,fn:t,timestampEnd:s,timestampStart:o}),i.printStackTrace(n)}catch(s){let l=performance.now();throw i(`${e}:error`,{duration:l-o,error:s,fn:t,timestampEnd:l,timestampStart:o}),i.printStackTrace(n),s}}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function it(e,t,n,i){i??=ln(1),xr(()=>ag(e,t,n,i))}async function ag(e,t,n,i){n??=6e4,i??=ln(1);let s=vu(e).value;s.items.push({fn:t,stackTrace:i,timeoutInMilliseconds:n}),s.promise=s.promise.then(()=>Cu(e)),await s.promise}function vu(e){return jt(e,"queue",{items:[],promise:Promise.resolve()})}async function Cu(e){let t=vu(e).value,n=t.items[0];n&&(await ys(()=>bs(n.timeoutInMilliseconds,()=>bu(Cu.name,n.fn,n.stackTrace))),t.items.shift())}function Su(e,t){let n=Object.keys(t).map(i=>lg(e,i,t[i]));return n.length===1?n[0]:function(){n.forEach(i=>i())}}function lg(e,t,n){let i=e[t],o=e.hasOwnProperty(t),s=o?i:function(){return Object.getPrototypeOf(e)[t].apply(this,arguments)},l=n(s);return i&&Object.setPrototypeOf(l,i),Object.setPrototypeOf(u,l),e[t]=u,f;function u(...m){return l===s&&e[t]===u&&f(),l.apply(this,m)}function f(){e[t]===u&&(o?e[t]=s:delete e[t]),l!==s&&(l=s,Object.setPrototypeOf(u,i||Function))}}var kf=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var _u=".";function Cs(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e===null||t===null)return!1;let n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;let o=e,s=t;for(let l of n)if(!i.includes(l)||!Cs(o[l],s[l]))return!1;return!0}function Ci(e,t){let n=e,i=t.split(_u);for(let o of i){if(n===void 0)return;n=n[o]}return n}function Eu(e,t,n){let i=new Error(`Property path ${t} not found`),o=e,s=t.split(_u);for(let u of s.slice(0,-1)){if(o===void 0)throw i;o=o[u]}let l=s.at(-1);if(o===void 0||l===void 0)throw i;o[l]=n}function Si(e,t={}){let n={functionHandlingMode:"exclude",maxDepth:-1,shouldCatchToJSONErrors:!1,shouldHandleCircularReferences:!1,shouldHandleErrors:!1,shouldHandleUndefined:!1,shouldSortKeys:!1,space:2,tokenSubstitutions:{circularReference:vs("CircularReference"),maxDepthLimitReached:vs("MaxDepthLimitReached"),toJSONFailed:vs("ToJSONFailed")}},i={...n,...t,tokenSubstitutions:{...n.tokenSubstitutions,...t.tokenSubstitutions}};i.maxDepth===-1&&(i.maxDepth=1/0);let o=[],l=_i(e,"",0,!0,i,o,new WeakSet),u=JSON.stringify(l,null,i.space)??"";return u=He(u,/"\[\[(?<Key>[A-Za-z]+)(?<Index>\d*)\]\]"/g,(f,m,h)=>ug({functionTexts:o,index:h?parseInt(h,10):0,key:m,substitutions:i.tokenSubstitutions})),u}function ug(e){switch(e.key){case"CircularReference":return e.substitutions.circularReference;case"Function":return e.functionTexts[e.index]??un(new Error(`Function with index ${e.index.toString()} not found`));case"MaxDepthLimitReached":return e.substitutions.maxDepthLimitReached;case"MaxDepthLimitReachedArray":return`Array(${e.index.toString()})`;case"ToJSONFailed":return e.substitutions.toJSONFailed;case"Undefined":return"undefined";default:break}}function cg(e,t,n,i,o,s){return t>i.maxDepth?Yn("MaxDepthLimitReachedArray",e.length):e.map((l,u)=>_i(l,u.toString(),t+1,n,i,o,s))}function fg(e,t,n){if(n.shouldHandleCircularReferences)return Yn("CircularReference");let i=e.constructor.name||"Object";throw new TypeError(`Converting circular structure to JSON
|
|
--> starting at object with constructor '${i}'
|
|
--- property '${t}' closes the circle`)}function dg(e,t,n){if(n.functionHandlingMode==="exclude")return;let i=t.length,o=n.functionHandlingMode==="full"?e.toString():`function ${e.name||"anonymous"}() { /* ... */ }`;return t.push(o),Yn("Function",i)}function hg(e,t,n,i,o,s,l){if(l.has(e))return fg(e,t,o);if(l.add(e),i){let u=pg(e,t,n,o,s,l);if(u!==void 0)return u}return Array.isArray(e)?cg(e,n,i,o,s,l):n>o.maxDepth?Yn("MaxDepthLimitReached"):e instanceof Error&&o.shouldHandleErrors?Ml(e):mg(e,n,i,o,s,l)}function mg(e,t,n,i,o,s){let l=Object.entries(e);return i.shouldSortKeys&&l.sort(([u],[f])=>u.localeCompare(f)),Object.fromEntries(l.map(([u,f])=>[u,_i(f,u,t+1,n,i,o,s)]))}function vs(e){return`{ "[[${e}]]": null }`}function Yn(e,t){return`[[${e}${t?.toString()??""}]]`}function _i(e,t,n,i,o,s,l){return e===void 0?n===0||o.shouldHandleUndefined?Yn("Undefined"):void 0:typeof e=="function"?dg(e,s,o):typeof e!="object"||e===null?e:hg(e,t,n,i,o,s,l)}function pg(e,t,n,i,o,s){let l=e.toJSON;if(typeof l=="function")try{let u=l.call(e,t);return _i(u,t,n,!1,i,o,s)}catch(u){if(i.shouldCatchToJSONErrors)return Yn("ToJSONFailed");throw u}}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();async function Ss(e,t,n){let i=he(e,t),o=he(e,n),s=Ne(e,o,!0),l=et(i),u=Re(i,l),f=e.vault.getAvailablePathForAttachments;return f.isExtended?f(u,l.slice(1),s,!0):await gg(e,u,l.slice(1),s,!0)}async function Wn(e,t){return dt(await Ss(e,"DUMMY_FILE.pdf",t))}async function gg(e,t,n,i,o){let s=e.vault.getConfig("attachmentFolderPath"),l=s==="."||s==="./",u=null;s.startsWith("./")&&(u=Dt(s,"./")),l?s=i?i.parent?.path??"":"":u&&(s=(i?i.parent?.getParentPrefix()??"":"")+u),s=pr(Tu(s)),t=pr(Tu(t));let f=ht(e,s,!0);!f&&u&&(o?f=Ln(e,s,!0):f=await e.vault.createFolder(s));let m=f?.getParentPrefix()??"";return e.vault.getAvailablePath(m+t,n)}async function _s(e,t){let n=await Wn(e,t),i=await Wn(e,we(se(t),"DUMMY_FILE.md"));return n!==i}function Tu(e){return e=He(e,/(?:[\\/])+/g,"/"),e=He(e,/^\/+|\/+$/g,""),e||"/"}var to=require("obsidian");var wg={};function hn(e,t){let n=t||wg,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Fu(e,i,o)}function Fu(e,t,n){if(kg(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Au(e.children,t,n)}return Array.isArray(e)?Au(e,t,n):""}function Au(e,t,n){let i=[],o=-1;for(;++o<e.length;)i[o]=Fu(e[o],t,n);return i.join("")}function kg(e){return!!(e&&typeof e=="object")}var Pu=document.createElement("i");function zn(e){let t="&"+e+";";Pu.innerHTML=t;let n=Pu.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ce(e,t,n,i){let o=e.length,s=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,i.length<1e4)l=Array.from(i),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);s<i.length;)l=i.slice(s,s+1e4),l.unshift(t,0),e.splice(...l),s+=1e4,t+=1e4}function Ye(e,t){return e.length>0?(Ce(e,e.length,0,t),e):t}var Mu={}.hasOwnProperty;function Iu(e){let t={},n=-1;for(;++n<e.length;)yg(t,e[n]);return t}function yg(e,t){let n;for(n in t){let o=(Mu.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n],l;if(s)for(l in s){Mu.call(o,l)||(o[l]=[]);let u=s[l];xg(o[l],Array.isArray(u)?u:u?[u]:[])}}}function xg(e,t){let n=-1,i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);Ce(e,0,0,i)}function Ei(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}function Nt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var qe=Gt(/[A-Za-z]/),We=Gt(/[\dA-Za-z]/),Lu=Gt(/[#-'*+\--9=?A-Z^-~]/);function vr(e){return e!==null&&(e<32||e===127)}var Cr=Gt(/\d/),Ou=Gt(/[\dA-Fa-f]/),Du=Gt(/[!-/:-@[-`{-~]/);function R(e){return e!==null&&e<-2}function me(e){return e!==null&&(e<0||e===32)}function U(e){return e===-2||e===-1||e===32}var Ru=Gt(/\p{P}|\p{S}/u),Nu=Gt(/\s/);function Gt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function V(e,t,n,i){let o=i?i-1:Number.POSITIVE_INFINITY,s=0;return l;function l(f){return U(f)?(e.enter(n),u(f)):t(f)}function u(f){return U(f)&&s++<o?(e.consume(f),u):(e.exit(n),t(f))}}var Yu={tokenize:bg};function bg(e){let t=e.attempt(this.parser.constructs.contentInitial,i,o),n;return t;function i(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),V(e,t,"linePrefix")}function o(u){return e.enter("paragraph"),s(u)}function s(u){let f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return R(u)?(e.consume(u),e.exit("chunkText"),s):(e.consume(u),l)}}var zu={tokenize:vg},Wu={tokenize:Cg};function vg(e){let t=this,n=[],i=0,o,s,l;return u;function u(P){if(i<n.length){let Y=n[i];return t.containerState=Y[1],e.attempt(Y[0].continuation,f,m)(P)}return m(P)}function f(P){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&A();let Y=t.events.length,B=Y,_;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){_=t.events[B][1].end;break}C(i);let J=Y;for(;J<t.events.length;)t.events[J][1].end={..._},J++;return Ce(t.events,B+1,0,t.events.slice(Y)),t.events.length=J,m(P)}return u(P)}function m(P){if(i===n.length){if(!o)return w(P);if(o.currentConstruct&&o.currentConstruct.concrete)return v(P);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Wu,h,p)(P)}function h(P){return o&&A(),C(i),w(P)}function p(P){return t.parser.lazy[t.now().line]=i!==n.length,l=t.now().offset,v(P)}function w(P){return t.containerState={},e.attempt(Wu,k,v)(P)}function k(P){return i++,n.push([t.currentConstruct,t.containerState]),w(P)}function v(P){if(P===null){o&&A(),C(0),e.consume(P);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),F(P)}function F(P){if(P===null){T(e.exit("chunkFlow"),!0),C(0),e.consume(P);return}return R(P)?(e.consume(P),T(e.exit("chunkFlow")),i=0,t.interrupt=void 0,u):(e.consume(P),F)}function T(P,Y){let B=t.sliceStream(P);if(Y&&B.push(null),P.previous=s,s&&(s.next=P),s=P,o.defineSkip(P.start),o.write(B),t.parser.lazy[P.start.line]){let _=o.events.length;for(;_--;)if(o.events[_][1].start.offset<l&&(!o.events[_][1].end||o.events[_][1].end.offset>l))return;let J=t.events.length,j=J,G,ne;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(G){ne=t.events[j][1].end;break}G=!0}for(C(i),_=J;_<t.events.length;)t.events[_][1].end={...ne},_++;Ce(t.events,j+1,0,t.events.slice(J)),t.events.length=_}}function C(P){let Y=n.length;for(;Y-- >P;){let B=n[Y];t.containerState=B[1],B[0].exit.call(t,e)}n.length=P}function A(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Cg(e,t,n){return V(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Bn(e){if(e===null||me(e)||Nu(e))return 1;if(Ru(e))return 2}function Hn(e,t,n){let i=[],o=-1;for(;++o<e.length;){let s=e[o].resolveAll;s&&!i.includes(s)&&(t=s(t,n),i.push(s))}return t}var Sr={name:"attention",resolveAll:Sg,tokenize:_g};function Sg(e,t){let n=-1,i,o,s,l,u,f,m,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let p={...e[i][1].end},w={...e[n][1].start};Bu(p,-f),Bu(w,f),l={type:f>1?"strongSequence":"emphasisSequence",start:p,end:{...e[i][1].end}},u={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:w},s={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},o={type:f>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[i][1].end={...l.start},e[n][1].start={...u.end},m=[],e[i][1].end.offset-e[i][1].start.offset&&(m=Ye(m,[["enter",e[i][1],t],["exit",e[i][1],t]])),m=Ye(m,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",s,t]]),m=Ye(m,Hn(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),m=Ye(m,[["exit",s,t],["enter",u,t],["exit",u,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,m=Ye(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Ce(e,i-1,n-i+3,m),n=i+m.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function _g(e,t){let n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=Bn(i),s;return l;function l(f){return s=f,e.enter("attentionSequence"),u(f)}function u(f){if(f===s)return e.consume(f),u;let m=e.exit("attentionSequence"),h=Bn(f),p=!h||h===2&&o||n.includes(f),w=!o||o===2&&h||n.includes(i);return m._open=!!(s===42?p:p&&(o||!w)),m._close=!!(s===42?w:w&&(h||!p)),t(f)}}function Bu(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Es={name:"autolink",tokenize:Eg};function Eg(e,t,n){let i=0;return o;function o(k){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(k),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(k){return qe(k)?(e.consume(k),l):k===64?n(k):m(k)}function l(k){return k===43||k===45||k===46||We(k)?(i=1,u(k)):m(k)}function u(k){return k===58?(e.consume(k),i=0,f):(k===43||k===45||k===46||We(k))&&i++<32?(e.consume(k),u):(i=0,m(k))}function f(k){return k===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(k),e.exit("autolinkMarker"),e.exit("autolink"),t):k===null||k===32||k===60||vr(k)?n(k):(e.consume(k),f)}function m(k){return k===64?(e.consume(k),h):Lu(k)?(e.consume(k),m):n(k)}function h(k){return We(k)?p(k):n(k)}function p(k){return k===46?(e.consume(k),i=0,h):k===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(k),e.exit("autolinkMarker"),e.exit("autolink"),t):w(k)}function w(k){if((k===45||We(k))&&i++<63){let v=k===45?w:p;return e.consume(k),v}return n(k)}}var qt={partial:!0,tokenize:Tg};function Tg(e,t,n){return i;function i(s){return U(s)?V(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||R(s)?t(s):n(s)}}var Ti={continuation:{tokenize:Fg},exit:Pg,name:"blockQuote",tokenize:Ag};function Ag(e,t,n){let i=this;return o;function o(l){if(l===62){let u=i.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),s}return n(l)}function s(l){return U(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Fg(e,t,n){let i=this;return o;function o(l){return U(l)?V(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):s(l)}function s(l){return e.attempt(Ti,t,n)(l)}}function Pg(e){e.exit("blockQuote")}var Ai={name:"characterEscape",tokenize:Mg};function Mg(e,t,n){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return Du(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}var Fi={name:"characterReference",tokenize:Ig};function Ig(e,t,n){let i=this,o=0,s,l;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),f}function f(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),s=31,l=We,h(p))}function m(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,l=Ou,h):(e.enter("characterReferenceValue"),s=7,l=Cr,h(p))}function h(p){if(p===59&&o){let w=e.exit("characterReferenceValue");return l===We&&!zn(i.sliceSerialize(w))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(p)&&o++<s?(e.consume(p),h):n(p)}}var Hu={partial:!0,tokenize:Og},Pi={concrete:!0,name:"codeFenced",tokenize:Lg};function Lg(e,t,n){let i=this,o={partial:!0,tokenize:B},s=0,l=0,u;return f;function f(_){return m(_)}function m(_){let J=i.events[i.events.length-1];return s=J&&J[1].type==="linePrefix"?J[2].sliceSerialize(J[1],!0).length:0,u=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(_)}function h(_){return _===u?(l++,e.consume(_),h):l<3?n(_):(e.exit("codeFencedFenceSequence"),U(_)?V(e,p,"whitespace")(_):p(_))}function p(_){return _===null||R(_)?(e.exit("codeFencedFence"),i.interrupt?t(_):e.check(Hu,F,Y)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),w(_))}function w(_){return _===null||R(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(_)):U(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),V(e,k,"whitespace")(_)):_===96&&_===u?n(_):(e.consume(_),w)}function k(_){return _===null||R(_)?p(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===null||R(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(_)):_===96&&_===u?n(_):(e.consume(_),v)}function F(_){return e.attempt(o,Y,T)(_)}function T(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),C}function C(_){return s>0&&U(_)?V(e,A,"linePrefix",s+1)(_):A(_)}function A(_){return _===null||R(_)?e.check(Hu,F,Y)(_):(e.enter("codeFlowValue"),P(_))}function P(_){return _===null||R(_)?(e.exit("codeFlowValue"),A(_)):(e.consume(_),P)}function Y(_){return e.exit("codeFenced"),t(_)}function B(_,J,j){let G=0;return ne;function ne(W){return _.enter("lineEnding"),_.consume(W),_.exit("lineEnding"),oe}function oe(W){return _.enter("codeFencedFence"),U(W)?V(_,X,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):X(W)}function X(W){return W===u?(_.enter("codeFencedFenceSequence"),N(W)):j(W)}function N(W){return W===u?(G++,_.consume(W),N):G>=l?(_.exit("codeFencedFenceSequence"),U(W)?V(_,H,"whitespace")(W):H(W)):j(W)}function H(W){return W===null||R(W)?(_.exit("codeFencedFence"),J(W)):j(W)}}}function Og(e,t,n){let i=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s)}function s(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}var _r={name:"codeIndented",tokenize:Rg},Dg={partial:!0,tokenize:Ng};function Rg(e,t,n){let i=this;return o;function o(m){return e.enter("codeIndented"),V(e,s,"linePrefix",5)(m)}function s(m){let h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(m):n(m)}function l(m){return m===null?f(m):R(m)?e.attempt(Dg,l,f)(m):(e.enter("codeFlowValue"),u(m))}function u(m){return m===null||R(m)?(e.exit("codeFlowValue"),l(m)):(e.consume(m),u)}function f(m){return e.exit("codeIndented"),t(m)}}function Ng(e,t,n){let i=this;return o;function o(l){return i.parser.lazy[i.now().line]?n(l):R(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):V(e,s,"linePrefix",5)(l)}function s(l){let u=i.events[i.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):R(l)?o(l):n(l)}}var Ts={name:"codeText",previous:Wg,resolve:Yg,tokenize:zg};function Yg(e){let t=e.length-4,n=3,i,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)o===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(o=i):(i===t||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),t-=i-o-2,i=o+2),o=void 0);return e}function Wg(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function zg(e,t,n){let i=this,o=0,s,l;return u;function u(w){return e.enter("codeText"),e.enter("codeTextSequence"),f(w)}function f(w){return w===96?(e.consume(w),o++,f):(e.exit("codeTextSequence"),m(w))}function m(w){return w===null?n(w):w===32?(e.enter("space"),e.consume(w),e.exit("space"),m):w===96?(l=e.enter("codeTextSequence"),s=0,p(w)):R(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),m):(e.enter("codeTextData"),h(w))}function h(w){return w===null||w===32||w===96||R(w)?(e.exit("codeTextData"),m(w)):(e.consume(w),h)}function p(w){return w===96?(e.consume(w),s++,p):s===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(w)):(l.type="codeTextData",h(w))}}var Mi=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){let i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){let o=n||0;this.setCursor(Math.trunc(t));let s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&Er(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Er(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Er(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let n=this.left.splice(t,Number.POSITIVE_INFINITY);Er(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Er(this.left,n.reverse())}}};function Er(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ii(e){let t={},n=-1,i,o,s,l,u,f,m,h=new Mi(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(i=h.get(n),n&&i[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,s=0,s<f.length&&f[s][1].type==="lineEndingBlank"&&(s+=2),s<f.length&&f[s][1].type==="content"))for(;++s<f.length&&f[s][1].type!=="content";)f[s][1].type==="chunkText"&&(f[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,Bg(h,n)),n=t[n],m=!0);else if(i[1]._container){for(s=n,o=void 0;s--&&(l=h.get(s),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank");)l[0]==="enter"&&(o&&(h.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=s);o&&(i[1].end={...h.get(o)[1].start},u=h.slice(o,n),u.unshift(i),h.splice(o,n-o+1,u))}}return Ce(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!m}function Bg(e,t){let n=e.get(t)[1],i=e.get(t)[2],o=t-1,s=[],l=n._tokenizer||i.parser[n.contentType](n.start),u=l.events,f=[],m={},h,p,w=-1,k=n,v=0,F=0,T=[F];for(;k;){for(;e.get(++o)[1]!==k;);s.push(o),k._tokenizer||(h=i.sliceStream(k),k.next||h.push(null),p&&l.defineSkip(k.start),k._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(h),k._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),p=k,k=k.next}for(k=n;++w<u.length;)u[w][0]==="exit"&&u[w-1][0]==="enter"&&u[w][1].type===u[w-1][1].type&&u[w][1].start.line!==u[w][1].end.line&&(F=w+1,T.push(F),k._tokenizer=void 0,k.previous=void 0,k=k.next);for(l.events=[],k?(k._tokenizer=void 0,k.previous=void 0):T.pop(),w=T.length;w--;){let C=u.slice(T[w],T[w+1]),A=s.pop();f.push([A,A+C.length-1]),e.splice(A,2,C)}for(f.reverse(),w=-1;++w<f.length;)m[v+f[w][0]]=v+f[w][1],v+=f[w][1]-f[w][0]-1;return m}var As={resolve:Ug,tokenize:Vg},Hg={partial:!0,tokenize:$g};function Ug(e){return Ii(e),e}function Vg(e,t){let n;return i;function i(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(u)}function o(u){return u===null?s(u):R(u)?e.check(Hg,l,s)(u):(e.consume(u),o)}function s(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function $g(e,t,n){let i=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),V(e,s,"linePrefix")}function s(l){if(l===null||R(l))return n(l);let u=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(i.parser.constructs.flow,n,t)(l)}}function Li(e,t,n,i,o,s,l,u,f){let m=f||Number.POSITIVE_INFINITY,h=0;return p;function p(C){return C===60?(e.enter(i),e.enter(o),e.enter(s),e.consume(C),e.exit(s),w):C===null||C===32||C===41||vr(C)?n(C):(e.enter(i),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),F(C))}function w(C){return C===62?(e.enter(s),e.consume(C),e.exit(s),e.exit(o),e.exit(i),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),k(C))}function k(C){return C===62?(e.exit("chunkString"),e.exit(u),w(C)):C===null||C===60||R(C)?n(C):(e.consume(C),C===92?v:k)}function v(C){return C===60||C===62||C===92?(e.consume(C),k):k(C)}function F(C){return!h&&(C===null||C===41||me(C))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(i),t(C)):h<m&&C===40?(e.consume(C),h++,F):C===41?(e.consume(C),h--,F):C===null||C===32||C===40||vr(C)?n(C):(e.consume(C),C===92?T:F)}function T(C){return C===40||C===41||C===92?(e.consume(C),F):F(C)}}function Oi(e,t,n,i,o,s){let l=this,u=0,f;return m;function m(k){return e.enter(i),e.enter(o),e.consume(k),e.exit(o),e.enter(s),h}function h(k){return u>999||k===null||k===91||k===93&&!f||k===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(k):k===93?(e.exit(s),e.enter(o),e.consume(k),e.exit(o),e.exit(i),t):R(k)?(e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||k===91||k===93||R(k)||u++>999?(e.exit("chunkString"),h(k)):(e.consume(k),f||(f=!U(k)),k===92?w:p)}function w(k){return k===91||k===92||k===93?(e.consume(k),u++,p):p(k)}}function Di(e,t,n,i,o,s){let l;return u;function u(w){return w===34||w===39||w===40?(e.enter(i),e.enter(o),e.consume(w),e.exit(o),l=w===40?41:w,f):n(w)}function f(w){return w===l?(e.enter(o),e.consume(w),e.exit(o),e.exit(i),t):(e.enter(s),m(w))}function m(w){return w===l?(e.exit(s),f(l)):w===null?n(w):R(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),V(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(w))}function h(w){return w===l||w===null||R(w)?(e.exit("chunkString"),m(w)):(e.consume(w),w===92?p:h)}function p(w){return w===l||w===92?(e.consume(w),h):h(w)}}function mn(e,t){let n;return i;function i(o){return R(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):U(o)?V(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}var Fs={name:"definition",tokenize:Gg},jg={partial:!0,tokenize:qg};function Gg(e,t,n){let i=this,o;return s;function s(k){return e.enter("definition"),l(k)}function l(k){return Oi.call(i,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(k)}function u(k){return o=Nt(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),f):n(k)}function f(k){return me(k)?mn(e,m)(k):m(k)}function m(k){return Li(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(k)}function h(k){return e.attempt(jg,p,p)(k)}function p(k){return U(k)?V(e,w,"whitespace")(k):w(k)}function w(k){return k===null||R(k)?(e.exit("definition"),i.parser.defined.push(o),t(k)):n(k)}}function qg(e,t,n){return i;function i(u){return me(u)?mn(e,o)(u):n(u)}function o(u){return Di(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function s(u){return U(u)?V(e,l,"whitespace")(u):l(u)}function l(u){return u===null||R(u)?t(u):n(u)}}var Ps={name:"hardBreakEscape",tokenize:Zg};function Zg(e,t,n){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return R(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}var Ms={name:"headingAtx",resolve:Qg,tokenize:Jg};function Qg(e,t){let n=e.length-2,i=3,o,s;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},s={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Ce(e,i,n-i+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function Jg(e,t,n){let i=0;return o;function o(h){return e.enter("atxHeading"),s(h)}function s(h){return e.enter("atxHeadingSequence"),l(h)}function l(h){return h===35&&i++<6?(e.consume(h),l):h===null||me(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||R(h)?(e.exit("atxHeading"),t(h)):U(h)?V(e,u,"whitespace")(h):(e.enter("atxHeadingText"),m(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),u(h))}function m(h){return h===null||h===35||me(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),m)}}var Uu=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Is=["pre","script","style","textarea"];var Ls={concrete:!0,name:"htmlFlow",resolveTo:ew,tokenize:tw},Kg={partial:!0,tokenize:rw},Xg={partial:!0,tokenize:nw};function ew(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function tw(e,t,n){let i=this,o,s,l,u,f;return m;function m(y){return h(y)}function h(y){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(y),p}function p(y){return y===33?(e.consume(y),w):y===47?(e.consume(y),s=!0,F):y===63?(e.consume(y),o=3,i.interrupt?t:b):qe(y)?(e.consume(y),l=String.fromCharCode(y),T):n(y)}function w(y){return y===45?(e.consume(y),o=2,k):y===91?(e.consume(y),o=5,u=0,v):qe(y)?(e.consume(y),o=4,i.interrupt?t:b):n(y)}function k(y){return y===45?(e.consume(y),i.interrupt?t:b):n(y)}function v(y){let Pe="CDATA[";return y===Pe.charCodeAt(u++)?(e.consume(y),u===Pe.length?i.interrupt?t:X:v):n(y)}function F(y){return qe(y)?(e.consume(y),l=String.fromCharCode(y),T):n(y)}function T(y){if(y===null||y===47||y===62||me(y)){let Pe=y===47,Ct=l.toLowerCase();return!Pe&&!s&&Is.includes(Ct)?(o=1,i.interrupt?t(y):X(y)):Uu.includes(l.toLowerCase())?(o=6,Pe?(e.consume(y),C):i.interrupt?t(y):X(y)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(y):s?A(y):P(y))}return y===45||We(y)?(e.consume(y),l+=String.fromCharCode(y),T):n(y)}function C(y){return y===62?(e.consume(y),i.interrupt?t:X):n(y)}function A(y){return U(y)?(e.consume(y),A):ne(y)}function P(y){return y===47?(e.consume(y),ne):y===58||y===95||qe(y)?(e.consume(y),Y):U(y)?(e.consume(y),P):ne(y)}function Y(y){return y===45||y===46||y===58||y===95||We(y)?(e.consume(y),Y):B(y)}function B(y){return y===61?(e.consume(y),_):U(y)?(e.consume(y),B):P(y)}function _(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),f=y,J):U(y)?(e.consume(y),_):j(y)}function J(y){return y===f?(e.consume(y),f=null,G):y===null||R(y)?n(y):(e.consume(y),J)}function j(y){return y===null||y===34||y===39||y===47||y===60||y===61||y===62||y===96||me(y)?B(y):(e.consume(y),j)}function G(y){return y===47||y===62||U(y)?P(y):n(y)}function ne(y){return y===62?(e.consume(y),oe):n(y)}function oe(y){return y===null||R(y)?X(y):U(y)?(e.consume(y),oe):n(y)}function X(y){return y===45&&o===2?(e.consume(y),ee):y===60&&o===1?(e.consume(y),ue):y===62&&o===4?(e.consume(y),Se):y===63&&o===3?(e.consume(y),b):y===93&&o===5?(e.consume(y),ze):R(y)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Kg,_e,N)(y)):y===null||R(y)?(e.exit("htmlFlowData"),N(y)):(e.consume(y),X)}function N(y){return e.check(Xg,H,_e)(y)}function H(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),W}function W(y){return y===null||R(y)?N(y):(e.enter("htmlFlowData"),X(y))}function ee(y){return y===45?(e.consume(y),b):X(y)}function ue(y){return y===47?(e.consume(y),l="",fe):X(y)}function fe(y){if(y===62){let Pe=l.toLowerCase();return Is.includes(Pe)?(e.consume(y),Se):X(y)}return qe(y)&&l.length<8?(e.consume(y),l+=String.fromCharCode(y),fe):X(y)}function ze(y){return y===93?(e.consume(y),b):X(y)}function b(y){return y===62?(e.consume(y),Se):y===45&&o===2?(e.consume(y),b):X(y)}function Se(y){return y===null||R(y)?(e.exit("htmlFlowData"),_e(y)):(e.consume(y),Se)}function _e(y){return e.exit("htmlFlow"),t(y)}}function nw(e,t,n){let i=this;return o;function o(l){return R(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):n(l)}function s(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}function rw(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(qt,t,n)}}var Os={name:"htmlText",tokenize:iw};function iw(e,t,n){let i=this,o,s,l;return u;function u(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),f}function f(b){return b===33?(e.consume(b),m):b===47?(e.consume(b),B):b===63?(e.consume(b),P):qe(b)?(e.consume(b),j):n(b)}function m(b){return b===45?(e.consume(b),h):b===91?(e.consume(b),s=0,v):qe(b)?(e.consume(b),A):n(b)}function h(b){return b===45?(e.consume(b),k):n(b)}function p(b){return b===null?n(b):b===45?(e.consume(b),w):R(b)?(l=p,ue(b)):(e.consume(b),p)}function w(b){return b===45?(e.consume(b),k):p(b)}function k(b){return b===62?ee(b):b===45?w(b):p(b)}function v(b){let Se="CDATA[";return b===Se.charCodeAt(s++)?(e.consume(b),s===Se.length?F:v):n(b)}function F(b){return b===null?n(b):b===93?(e.consume(b),T):R(b)?(l=F,ue(b)):(e.consume(b),F)}function T(b){return b===93?(e.consume(b),C):F(b)}function C(b){return b===62?ee(b):b===93?(e.consume(b),C):F(b)}function A(b){return b===null||b===62?ee(b):R(b)?(l=A,ue(b)):(e.consume(b),A)}function P(b){return b===null?n(b):b===63?(e.consume(b),Y):R(b)?(l=P,ue(b)):(e.consume(b),P)}function Y(b){return b===62?ee(b):P(b)}function B(b){return qe(b)?(e.consume(b),_):n(b)}function _(b){return b===45||We(b)?(e.consume(b),_):J(b)}function J(b){return R(b)?(l=J,ue(b)):U(b)?(e.consume(b),J):ee(b)}function j(b){return b===45||We(b)?(e.consume(b),j):b===47||b===62||me(b)?G(b):n(b)}function G(b){return b===47?(e.consume(b),ee):b===58||b===95||qe(b)?(e.consume(b),ne):R(b)?(l=G,ue(b)):U(b)?(e.consume(b),G):ee(b)}function ne(b){return b===45||b===46||b===58||b===95||We(b)?(e.consume(b),ne):oe(b)}function oe(b){return b===61?(e.consume(b),X):R(b)?(l=oe,ue(b)):U(b)?(e.consume(b),oe):G(b)}function X(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),o=b,N):R(b)?(l=X,ue(b)):U(b)?(e.consume(b),X):(e.consume(b),H)}function N(b){return b===o?(e.consume(b),o=void 0,W):b===null?n(b):R(b)?(l=N,ue(b)):(e.consume(b),N)}function H(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===47||b===62||me(b)?G(b):(e.consume(b),H)}function W(b){return b===47||b===62||me(b)?G(b):n(b)}function ee(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):n(b)}function ue(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),fe}function fe(b){return U(b)?V(e,ze,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):ze(b)}function ze(b){return e.enter("htmlTextData"),l(b)}}var pn={name:"labelEnd",resolveAll:lw,resolveTo:uw,tokenize:cw},ow={tokenize:fw},sw={tokenize:dw},aw={tokenize:hw};function lw(e){let t=-1,n=[];for(;++t<e.length;){let i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){let o=i.type==="labelImage"?4:2;i.type="data",t+=o}}return e.length!==n.length&&Ce(e,0,e.length,n),e}function uw(e,t){let n=e.length,i=0,o,s,l,u;for(;n--;)if(o=e[n][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=n,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(l=n);let f={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[s][1].start},end:{...e[l][1].end}},h={type:"labelText",start:{...e[s+i+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",f,t],["enter",m,t]],u=Ye(u,e.slice(s+1,s+i+3)),u=Ye(u,[["enter",h,t]]),u=Ye(u,Hn(t.parser.constructs.insideSpan.null,e.slice(s+i+4,l-3),t)),u=Ye(u,[["exit",h,t],e[l-2],e[l-1],["exit",m,t]]),u=Ye(u,e.slice(l+1)),u=Ye(u,[["exit",f,t]]),Ce(e,s,e.length,u),e}function cw(e,t,n){let i=this,o=i.events.length,s,l;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){s=i.events[o][1];break}return u;function u(w){return s?s._inactive?p(w):(l=i.parser.defined.includes(Nt(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(w),e.exit("labelMarker"),e.exit("labelEnd"),f):n(w)}function f(w){return w===40?e.attempt(ow,h,l?h:p)(w):w===91?e.attempt(sw,h,l?m:p)(w):l?h(w):p(w)}function m(w){return e.attempt(aw,h,p)(w)}function h(w){return t(w)}function p(w){return s._balanced=!0,n(w)}}function fw(e,t,n){return i;function i(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),o}function o(p){return me(p)?mn(e,s)(p):s(p)}function s(p){return p===41?h(p):Li(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return me(p)?mn(e,f)(p):h(p)}function u(p){return n(p)}function f(p){return p===34||p===39||p===40?Di(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):h(p)}function m(p){return me(p)?mn(e,h)(p):h(p)}function h(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function dw(e,t,n){let i=this;return o;function o(u){return Oi.call(i,e,s,l,"reference","referenceMarker","referenceString")(u)}function s(u){return i.parser.defined.includes(Nt(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function hw(e,t,n){return i;function i(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}var Ds={name:"labelStartImage",resolveAll:pn.resolveAll,tokenize:mw};function mw(e,t,n){let i=this;return o;function o(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),s}function s(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(u):t(u)}}var Rs={name:"labelStartLink",resolveAll:pn.resolveAll,tokenize:pw};function pw(e,t,n){let i=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):t(l)}}var Tr={name:"lineEnding",tokenize:gw};function gw(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),V(e,t,"linePrefix")}}var gn={name:"thematicBreak",tokenize:ww};function ww(e,t,n){let i=0,o;return s;function s(m){return e.enter("thematicBreak"),l(m)}function l(m){return o=m,u(m)}function u(m){return m===o?(e.enter("thematicBreakSequence"),f(m)):i>=3&&(m===null||R(m))?(e.exit("thematicBreak"),t(m)):n(m)}function f(m){return m===o?(e.consume(m),i++,f):(e.exit("thematicBreakSequence"),U(m)?V(e,u,"whitespace")(m):u(m))}}var Fe={continuation:{tokenize:bw},exit:Cw,name:"list",tokenize:xw},kw={partial:!0,tokenize:Sw},yw={partial:!0,tokenize:vw};function xw(e,t,n){let i=this,o=i.events[i.events.length-1],s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return u;function u(k){let v=i.containerState.type||(k===42||k===43||k===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!i.containerState.marker||k===i.containerState.marker:Cr(k)){if(i.containerState.type||(i.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),k===42||k===45?e.check(gn,n,m)(k):m(k);if(!i.interrupt||k===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(k)}return n(k)}function f(k){return Cr(k)&&++l<10?(e.consume(k),f):(!i.interrupt||l<2)&&(i.containerState.marker?k===i.containerState.marker:k===41||k===46)?(e.exit("listItemValue"),m(k)):n(k)}function m(k){return e.enter("listItemMarker"),e.consume(k),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||k,e.check(qt,i.interrupt?n:h,e.attempt(kw,w,p))}function h(k){return i.containerState.initialBlankLine=!0,s++,w(k)}function p(k){return U(k)?(e.enter("listItemPrefixWhitespace"),e.consume(k),e.exit("listItemPrefixWhitespace"),w):n(k)}function w(k){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(k)}}function bw(e,t,n){let i=this;return i.containerState._closeFlow=void 0,e.check(qt,o,s);function o(u){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,V(e,t,"listItemIndent",i.containerState.size+1)(u)}function s(u){return i.containerState.furtherBlankLines||!U(u)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,l(u)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(yw,t,l)(u))}function l(u){return i.containerState._closeFlow=!0,i.interrupt=void 0,V(e,e.attempt(Fe,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function vw(e,t,n){let i=this;return V(e,o,"listItemIndent",i.containerState.size+1);function o(s){let l=i.events[i.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===i.containerState.size?t(s):n(s)}}function Cw(e){e.exit(this.containerState.type)}function Sw(e,t,n){let i=this;return V(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){let l=i.events[i.events.length-1];return!U(s)&&l&&l[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}var Ri={name:"setextUnderline",resolveTo:_w,tokenize:Ew};function _w(e,t){let n=e.length,i,o,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);let l={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",l,t]),e.splice(s+1,0,["exit",e[i][1],t]),e[i][1].end={...e[s][1].end}):e[i][1]=l,e.push(["exit",l,t]),e}function Ew(e,t,n){let i=this,o;return s;function s(m){let h=i.events.length,p;for(;h--;)if(i.events[h][1].type!=="lineEnding"&&i.events[h][1].type!=="linePrefix"&&i.events[h][1].type!=="content"){p=i.events[h][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||p)?(e.enter("setextHeadingLine"),o=m,l(m)):n(m)}function l(m){return e.enter("setextHeadingLineSequence"),u(m)}function u(m){return m===o?(e.consume(m),u):(e.exit("setextHeadingLineSequence"),U(m)?V(e,f,"lineSuffix")(m):f(m))}function f(m){return m===null||R(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}var Vu={tokenize:Tw};function Tw(e){let t=this,n=e.attempt(qt,i,e.attempt(this.parser.constructs.flowInitial,o,V(e,e.attempt(this.parser.constructs.flow,o,e.attempt(As,o)),"linePrefix")));return n;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var $u={resolveAll:Zu()},ju=qu("string"),Gu=qu("text");function qu(e){return{resolveAll:Zu(e==="text"?Aw:void 0),tokenize:t};function t(n){let i=this,o=this.parser.constructs[e],s=n.attempt(o,l,u);return l;function l(h){return m(h)?s(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),f}function f(h){return m(h)?(n.exit("data"),s(h)):(n.consume(h),f)}function m(h){if(h===null)return!0;let p=o[h],w=-1;if(p)for(;++w<p.length;){let k=p[w];if(!k.previous||k.previous.call(i,i.previous))return!0}return!1}}}function Zu(e){return t;function t(n,i){let o=-1,s;for(;++o<=n.length;)s===void 0?n[o]&&n[o][1].type==="data"&&(s=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==s+2&&(n[s][1].end=n[o-1][1].end,n.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(n,i):n}}function Aw(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){let i=e[n-1][1],o=t.sliceStream(i),s=o.length,l=-1,u=0,f;for(;s--;){let m=o[s];if(typeof m=="string"){for(l=m.length;m.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(m===-2)f=!0,u++;else if(m!==-1){s++;break}}if(u){let m={type:n===e.length||f||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-u,offset:i.end.offset-u},end:{...i.end}};i.end={...m.start},i.start.offset===i.end.offset?Object.assign(i,m):(e.splice(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}var Ns={};bl(Ns,{attentionMarkers:()=>Rw,contentInitial:()=>Pw,disable:()=>Nw,document:()=>Fw,flow:()=>Iw,flowInitial:()=>Mw,insideSpan:()=>Dw,string:()=>Lw,text:()=>Ow});var Fw={42:Fe,43:Fe,45:Fe,48:Fe,49:Fe,50:Fe,51:Fe,52:Fe,53:Fe,54:Fe,55:Fe,56:Fe,57:Fe,62:Ti},Pw={91:Fs},Mw={[-2]:_r,[-1]:_r,32:_r},Iw={35:Ms,42:gn,45:[Ri,gn],60:Ls,61:Ri,95:gn,96:Pi,126:Pi},Lw={38:Fi,92:Ai},Ow={[-5]:Tr,[-4]:Tr,[-3]:Tr,33:Ds,38:Fi,42:Sr,60:[Es,Os],91:Rs,92:[Ps,Ai],93:pn,95:Sr,96:Ts},Dw={null:[Sr,$u]},Rw={null:[42,95]},Nw={null:[]};function Qu(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},o={},s=[],l=[],u=[],f=!0,m={attempt:G(J),check:G(j),consume:Y,enter:B,exit:_,interrupt:G(j,{interrupt:!0})},h={code:null,containerState:{},defineSkip:C,events:[],now:T,parser:e,previous:null,sliceSerialize:v,sliceStream:F,write:k},p=t.tokenize.call(h,m),w;return t.resolveAll&&s.push(t),h;function k(N){return l=Ye(l,N),A(),l[l.length-1]!==null?[]:(ne(t,0),h.events=Hn(s,h.events,h),h.events)}function v(N,H){return Ww(F(N),H)}function F(N){return Yw(l,N)}function T(){let{_bufferIndex:N,_index:H,line:W,column:ee,offset:ue}=i;return{_bufferIndex:N,_index:H,line:W,column:ee,offset:ue}}function C(N){o[N.line]=N.column,X()}function A(){let N;for(;i._index<l.length;){let H=l[i._index];if(typeof H=="string")for(N=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===N&&i._bufferIndex<H.length;)P(H.charCodeAt(i._bufferIndex));else P(H)}}function P(N){f=void 0,w=N,p=p(N)}function Y(N){R(N)?(i.line++,i.column=1,i.offset+=N===-3?2:1,X()):N!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===l[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=N,f=!0}function B(N,H){let W=H||{};return W.type=N,W.start=T(),h.events.push(["enter",W,h]),u.push(W),W}function _(N){let H=u.pop();return H.end=T(),h.events.push(["exit",H,h]),H}function J(N,H){ne(N,H.from)}function j(N,H){H.restore()}function G(N,H){return W;function W(ee,ue,fe){let ze,b,Se,_e;return Array.isArray(ee)?Pe(ee):"tokenize"in ee?Pe([ee]):y(ee);function y(pe){return nn;function nn(st){let St=st!==null&&pe[st],zt=st!==null&&pe.null,tr=[...Array.isArray(St)?St:St?[St]:[],...Array.isArray(zt)?zt:zt?[zt]:[]];return Pe(tr)(st)}}function Pe(pe){return ze=pe,b=0,pe.length===0?fe:Ct(pe[b])}function Ct(pe){return nn;function nn(st){return _e=oe(),Se=pe,pe.partial||(h.currentConstruct=pe),pe.name&&h.parser.constructs.disable.null.includes(pe.name)?tn(st):pe.tokenize.call(H?Object.assign(Object.create(h),H):h,m,Wt,tn)(st)}}function Wt(pe){return f=!0,N(Se,_e),ue}function tn(pe){return f=!0,_e.restore(),++b<ze.length?Ct(ze[b]):fe}}}function ne(N,H){N.resolveAll&&!s.includes(N)&&s.push(N),N.resolve&&Ce(h.events,H,h.events.length-H,N.resolve(h.events.slice(H),h)),N.resolveTo&&(h.events=N.resolveTo(h.events,h))}function oe(){let N=T(),H=h.previous,W=h.currentConstruct,ee=h.events.length,ue=Array.from(u);return{from:ee,restore:fe};function fe(){i=N,h.previous=H,h.currentConstruct=W,h.events.length=ee,u=ue,X()}}function X(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function Yw(e,t){let n=t.start._index,i=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex,l;if(n===o)l=[e[n].slice(i,s)];else{if(l=e.slice(n,o),i>-1){let u=l[0];typeof u=="string"?l[0]=u.slice(i):l.shift()}s>0&&l.push(e[o].slice(0,s))}return l}function Ww(e,t){let n=-1,i=[],o;for(;++n<e.length;){let s=e[n],l;if(typeof s=="string")l=s;else switch(s){case-5:{l="\r";break}case-4:{l=`
|
|
`;break}case-3:{l=`\r
|
|
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(s)}o=s===-2,i.push(l)}return i.join("")}function Ys(e){let i={constructs:Iu([Ns,...(e||{}).extensions||[]]),content:o(Yu),defined:[],document:o(zu),flow:o(Vu),lazy:{},string:o(ju),text:o(Gu)};return i;function o(s){return l;function l(u){return Qu(i,s,u)}}}function Ws(e){for(;!Ii(e););return e}var Ju=/[\0\t\n\r]/g;function zs(){let e=1,t="",n=!0,i;return o;function o(s,l,u){let f=[],m,h,p,w,k;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(l||void 0).decode(s)),p=0,t="",n&&(s.charCodeAt(0)===65279&&p++,n=void 0);p<s.length;){if(Ju.lastIndex=p,m=Ju.exec(s),w=m&&m.index!==void 0?m.index:s.length,k=s.charCodeAt(w),!m){t=s.slice(p);break}if(k===10&&p===w&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),p<w&&(f.push(s.slice(p,w)),e+=w-p),k){case 0:{f.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,f.push(-2);e++<h;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}p=w+1}return u&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}var zw=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ni(e){return e.replace(zw,Bw)}function Bw(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let o=n.charCodeAt(1),s=o===120||o===88;return Ei(n.slice(s?2:1),s?16:10)}return zn(n)||e}function Zt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ku(e.position):"start"in e||"end"in e?Ku(e):"line"in e||"column"in e?Bs(e):""}function Bs(e){return Xu(e&&e.line)+":"+Xu(e&&e.column)}function Ku(e){return Bs(e&&e.start)+"-"+Bs(e&&e.end)}function Xu(e){return e&&typeof e=="number"?e:1}var tc={}.hasOwnProperty;function Hs(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Hw(n)(Ws(Ys(n).document().write(zs()(e,t,!0))))}function Hw(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Me),autolinkProtocol:G,autolinkEmail:G,atxHeading:s(Yr),blockQuote:s(st),characterEscape:G,characterReference:G,codeFenced:s(St),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(St,l),codeText:s(zt,l),codeTextData:G,data:G,codeFlowValue:G,definition:s(tr),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(Do),hardBreakEscape:s(Wr),hardBreakTrailing:s(Wr),htmlFlow:s(zr,l),htmlFlowData:G,htmlText:s(zr,l),htmlTextData:G,image:s(Br),label:l,link:s(Me),listItem:s(Ro),listItemValue:w,listOrdered:s(Cn,p),listUnordered:s(Cn),paragraph:s(No),reference:y,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(Yr),strong:s(Hr),thematicBreak:s(Ur)},exit:{atxHeading:f(),atxHeadingSequence:B,autolink:f(),autolinkEmail:nn,autolinkProtocol:pe,blockQuote:f(),characterEscapeValue:ne,characterReferenceMarkerHexadecimal:Ct,characterReferenceMarkerNumeric:Ct,characterReferenceValue:Wt,characterReference:tn,codeFenced:f(T),codeFencedFence:F,codeFencedFenceInfo:k,codeFencedFenceMeta:v,codeFlowValue:ne,codeIndented:f(C),codeText:f(W),codeTextData:ne,data:ne,definition:f(),definitionDestinationString:Y,definitionLabelString:A,definitionTitleString:P,emphasis:f(),hardBreakEscape:f(X),hardBreakTrailing:f(X),htmlFlow:f(N),htmlFlowData:ne,htmlText:f(H),htmlTextData:ne,image:f(ue),label:ze,labelText:fe,lineEnding:oe,link:f(ee),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:Pe,resourceDestinationString:b,resourceTitleString:Se,resource:_e,setextHeading:f(j),setextHeadingLineSequence:J,setextHeadingText:_,strong:f(),thematicBreak:f()}};nc(t,(e||{}).mdastExtensions||[]);let n={};return i;function i(E){let I={type:"root",children:[]},L={stack:[I],tokenStack:[],config:t,enter:u,exit:m,buffer:l,resume:h,data:n},q=[],re=-1;for(;++re<E.length;)if(E[re][1].type==="listOrdered"||E[re][1].type==="listUnordered")if(E[re][0]==="enter")q.push(re);else{let Ee=q.pop();re=o(E,Ee,re)}for(re=-1;++re<E.length;){let Ee=t[E[re][0]];tc.call(Ee,E[re][1].type)&&Ee[E[re][1].type].call(Object.assign({sliceSerialize:E[re][2].sliceSerialize},L),E[re][1])}if(L.tokenStack.length>0){let Ee=L.tokenStack[L.tokenStack.length-1];(Ee[1]||ec).call(L,void 0,Ee[0])}for(I.position={start:Qt(E.length>0?E[0][1].start:{line:1,column:1,offset:0}),end:Qt(E.length>0?E[E.length-2][1].end:{line:1,column:1,offset:0})},re=-1;++re<t.transforms.length;)I=t.transforms[re](I)||I;return I}function o(E,I,L){let q=I-1,re=-1,Ee=!1,at,Be,Je,pt;for(;++q<=L;){let Le=E[q];switch(Le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Le[0]==="enter"?re++:re--,pt=void 0;break}case"lineEndingBlank":{Le[0]==="enter"&&(at&&!pt&&!re&&!Je&&(Je=q),pt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:pt=void 0}if(!re&&Le[0]==="enter"&&Le[1].type==="listItemPrefix"||re===-1&&Le[0]==="exit"&&(Le[1].type==="listUnordered"||Le[1].type==="listOrdered")){if(at){let lt=q;for(Be=void 0;lt--;){let ut=E[lt];if(ut[1].type==="lineEnding"||ut[1].type==="lineEndingBlank"){if(ut[0]==="exit")continue;Be&&(E[Be][1].type="lineEndingBlank",Ee=!0),ut[1].type="lineEnding",Be=lt}else if(!(ut[1].type==="linePrefix"||ut[1].type==="blockQuotePrefix"||ut[1].type==="blockQuotePrefixWhitespace"||ut[1].type==="blockQuoteMarker"||ut[1].type==="listItemIndent"))break}Je&&(!Be||Je<Be)&&(at._spread=!0),at.end=Object.assign({},Be?E[Be][1].start:Le[1].end),E.splice(Be||q,0,["exit",at,Le[2]]),q++,L++}if(Le[1].type==="listItemPrefix"){let lt={type:"listItem",_spread:!1,start:Object.assign({},Le[1].start),end:void 0};at=lt,E.splice(q,0,["enter",lt,Le[2]]),q++,L++,Je=void 0,pt=!0}}}return E[I][1]._spread=Ee,L}function s(E,I){return L;function L(q){u.call(this,E(q),q),I&&I.call(this,q)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(E,I,L){this.stack[this.stack.length-1].children.push(E),this.stack.push(E),this.tokenStack.push([I,L||void 0]),E.position={start:Qt(I.start),end:void 0}}function f(E){return I;function I(L){E&&E.call(this,L),m.call(this,L)}}function m(E,I){let L=this.stack.pop(),q=this.tokenStack.pop();if(q)q[0].type!==E.type&&(I?I.call(this,E,q[0]):(q[1]||ec).call(this,E,q[0]));else throw new Error("Cannot close `"+E.type+"` ("+Zt({start:E.start,end:E.end})+"): it\u2019s not open");L.position.end=Qt(E.end)}function h(){return hn(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function w(E){if(this.data.expectingFirstListItemValue){let I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(E),10),this.data.expectingFirstListItemValue=void 0}}function k(){let E=this.resume(),I=this.stack[this.stack.length-1];I.lang=E}function v(){let E=this.resume(),I=this.stack[this.stack.length-1];I.meta=E}function F(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E.replace(/(\r?\n|\r)$/g,"")}function A(E){let I=this.resume(),L=this.stack[this.stack.length-1];L.label=I,L.identifier=Nt(this.sliceSerialize(E)).toLowerCase()}function P(){let E=this.resume(),I=this.stack[this.stack.length-1];I.title=E}function Y(){let E=this.resume(),I=this.stack[this.stack.length-1];I.url=E}function B(E){let I=this.stack[this.stack.length-1];if(!I.depth){let L=this.sliceSerialize(E).length;I.depth=L}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function J(E){let I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(E).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function G(E){let L=this.stack[this.stack.length-1].children,q=L[L.length-1];(!q||q.type!=="text")&&(q=Ie(),q.position={start:Qt(E.start),end:void 0},L.push(q)),this.stack.push(q)}function ne(E){let I=this.stack.pop();I.value+=this.sliceSerialize(E),I.position.end=Qt(E.end)}function oe(E){let I=this.stack[this.stack.length-1];if(this.data.atHardBreak){let L=I.children[I.children.length-1];L.position.end=Qt(E.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&(G.call(this,E),ne.call(this,E))}function X(){this.data.atHardBreak=!0}function N(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E}function H(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E}function W(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E}function ee(){let E=this.stack[this.stack.length-1];if(this.data.inReference){let I=this.data.referenceType||"shortcut";E.type+="Reference",E.referenceType=I,delete E.url,delete E.title}else delete E.identifier,delete E.label;this.data.referenceType=void 0}function ue(){let E=this.stack[this.stack.length-1];if(this.data.inReference){let I=this.data.referenceType||"shortcut";E.type+="Reference",E.referenceType=I,delete E.url,delete E.title}else delete E.identifier,delete E.label;this.data.referenceType=void 0}function fe(E){let I=this.sliceSerialize(E),L=this.stack[this.stack.length-2];L.label=Ni(I),L.identifier=Nt(I).toLowerCase()}function ze(){let E=this.stack[this.stack.length-1],I=this.resume(),L=this.stack[this.stack.length-1];if(this.data.inReference=!0,L.type==="link"){let q=E.children;L.children=q}else L.alt=I}function b(){let E=this.resume(),I=this.stack[this.stack.length-1];I.url=E}function Se(){let E=this.resume(),I=this.stack[this.stack.length-1];I.title=E}function _e(){this.data.inReference=void 0}function y(){this.data.referenceType="collapsed"}function Pe(E){let I=this.resume(),L=this.stack[this.stack.length-1];L.label=I,L.identifier=Nt(this.sliceSerialize(E)).toLowerCase(),this.data.referenceType="full"}function Ct(E){this.data.characterReferenceType=E.type}function Wt(E){let I=this.sliceSerialize(E),L=this.data.characterReferenceType,q;L?(q=Ei(I,L==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):q=zn(I);let re=this.stack[this.stack.length-1];re.value+=q}function tn(E){let I=this.stack.pop();I.position.end=Qt(E.end)}function pe(E){ne.call(this,E);let I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(E)}function nn(E){ne.call(this,E);let I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(E)}function st(){return{type:"blockquote",children:[]}}function St(){return{type:"code",lang:null,meta:null,value:""}}function zt(){return{type:"inlineCode",value:""}}function tr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Do(){return{type:"emphasis",children:[]}}function Yr(){return{type:"heading",depth:0,children:[]}}function Wr(){return{type:"break"}}function zr(){return{type:"html",value:""}}function Br(){return{type:"image",title:null,url:"",alt:null}}function Me(){return{type:"link",title:null,url:"",children:[]}}function Cn(E){return{type:"list",ordered:E.type==="listOrdered",start:null,spread:E._spread,children:[]}}function Ro(E){return{type:"listItem",spread:E._spread,checked:null,children:[]}}function No(){return{type:"paragraph",children:[]}}function Hr(){return{type:"strong",children:[]}}function Ie(){return{type:"text",value:""}}function Ur(){return{type:"thematicBreak"}}}function Qt(e){return{line:e.line,column:e.column,offset:e.offset}}function nc(e,t){let n=-1;for(;++n<t.length;){let i=t[n];Array.isArray(i)?nc(e,i):Uw(e,i)}}function Uw(e,t){let n;for(n in t)if(tc.call(t,n))switch(n){case"canContainEols":{let i=t[n];i&&e[n].push(...i);break}case"transforms":{let i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{let i=t[n];i&&Object.assign(e[n],i);break}}}function ec(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Zt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Zt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Zt({start:t.start,end:t.end})+") is still open")}function Un(e){let t=this;t.parser=n;function n(i){return Hs(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}var rc={}.hasOwnProperty;function ic(e,t){let n=t||{};function i(o,...s){let l=i.invalid,u=i.handlers;if(o&&rc.call(o,e)){let f=String(o[e]);l=rc.call(u,f)?u[f]:i.unknown}if(l)return l.call(this,o,...s)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}var Vw={}.hasOwnProperty;function Us(e,t){let n=-1,i;if(t.extensions)for(;++n<t.extensions.length;)Us(e,t.extensions[n]);for(i in t)if(Vw.call(t,i))switch(i){case"extensions":break;case"unsafe":{oc(e[i],t[i]);break}case"join":{oc(e[i],t[i]);break}case"handlers":{$w(e[i],t[i]);break}default:e.options[i]=t[i]}return e}function oc(e,t){t&&e.push(...t)}function $w(e,t){t&&Object.assign(e,t)}function sc(e,t,n,i){let o=n.enter("blockquote"),s=n.createTracker(i);s.move("> "),s.shift(2);let l=n.indentLines(n.containerFlow(e,s.current()),jw);return o(),l}function jw(e,t,n){return">"+(n?"":" ")+e}function Yi(e,t){return ac(e,t.inConstruct,!0)&&!ac(e,t.notInConstruct,!1)}function ac(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function Vs(e,t,n,i){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
`&&Yi(n.stack,n.unsafe[o]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
`}function lc(e,t){let n=String(e),i=n.indexOf(t),o=i,s=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===o?++s>l&&(l=s):s=1,o=i+t.length,i=n.indexOf(t,o);return l}function Ar(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function uc(e){let t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function cc(e,t,n,i){let o=uc(n),s=e.value||"",l=o==="`"?"GraveAccent":"Tilde";if(Ar(e,n)){let p=n.enter("codeIndented"),w=n.indentLines(s,Gw);return p(),w}let u=n.createTracker(i),f=o.repeat(Math.max(lc(s,o)+1,3)),m=n.enter("codeFenced"),h=u.move(f);if(e.lang){let p=n.enter(`codeFencedLang${l}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),p()}if(e.lang&&e.meta){let p=n.enter(`codeFencedMeta${l}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
|
|
`,encode:["`"],...u.current()})),p()}return h+=u.move(`
|
|
`),s&&(h+=u.move(s+`
|
|
`)),h+=u.move(f),m(),h}function Gw(e,t,n){return(n?"":" ")+e}function Vn(e){let t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function fc(e,t,n,i){let o=Vn(n),s=o==='"'?"Quote":"Apostrophe",l=n.enter("definition"),u=n.enter("label"),f=n.createTracker(i),m=f.move("[");return m+=f.move(n.safe(n.associationId(e),{before:m,after:"]",...f.current()})),m+=f.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),m+=f.move("<"),m+=f.move(n.safe(e.url,{before:m,after:">",...f.current()})),m+=f.move(">")):(u=n.enter("destinationRaw"),m+=f.move(n.safe(e.url,{before:m,after:e.title?" ":`
|
|
`,...f.current()}))),u(),e.title&&(u=n.enter(`title${s}`),m+=f.move(" "+o),m+=f.move(n.safe(e.title,{before:m,after:o,...f.current()})),m+=f.move(o),u()),l(),m}function dc(e){let t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ze(e){return"&#x"+e.toString(16).toUpperCase()+";"}function $n(e,t,n){let i=Bn(e),o=Bn(t);return i===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}$s.peek=qw;function $s(e,t,n,i){let o=dc(n),s=n.enter("emphasis"),l=n.createTracker(i),u=l.move(o),f=l.move(n.containerPhrasing(e,{after:o,before:u,...l.current()})),m=f.charCodeAt(0),h=$n(i.before.charCodeAt(i.before.length-1),m,o);h.inside&&(f=Ze(m)+f.slice(1));let p=f.charCodeAt(f.length-1),w=$n(i.after.charCodeAt(0),p,o);w.inside&&(f=f.slice(0,-1)+Ze(p));let k=l.move(o);return s(),n.attentionEncodeSurroundingInfo={after:w.outside,before:h.outside},u+f+k}function qw(e,t,n){return n.options.emphasis||"*"}var jn=function(e){if(e==null)return Kw;if(typeof e=="function")return Wi(e);if(typeof e=="object")return Array.isArray(e)?Zw(e):Qw(e);if(typeof e=="string")return Jw(e);throw new Error("Expected function, string, or object as test")};function Zw(e){let t=[],n=-1;for(;++n<e.length;)t[n]=jn(e[n]);return Wi(i);function i(...o){let s=-1;for(;++s<t.length;)if(t[s].apply(this,o))return!0;return!1}}function Qw(e){let t=e;return Wi(n);function n(i){let o=i,s;for(s in e)if(o[s]!==t[s])return!1;return!0}}function Jw(e){return Wi(t);function t(n){return n&&n.type===e}}function Wi(e){return t;function t(n,i,o){return!!(Xw(n)&&e.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function Kw(){return!0}function Xw(e){return e!==null&&typeof e=="object"&&"type"in e}function hc(e){return"\x1B[33m"+e+"\x1B[39m"}var mc=[],zi=!0,wn=!1,Bi="skip";function js(e,t,n,i){let o;typeof t=="function"&&typeof n!="function"?(i=n,n=t):o=t;let s=jn(o),l=i?-1:1;u(e,void 0,[])();function u(f,m,h){let p=f&&typeof f=="object"?f:{};if(typeof p.type=="string"){let k=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(w,"name",{value:"node ("+hc(f.type+(k?"<"+k+">":""))+")"})}return w;function w(){let k=mc,v,F,T;if((!t||s(f,m,h[h.length-1]||void 0))&&(k=ek(n(f,h)),k[0]===wn))return k;if("children"in f&&f.children){let C=f;if(C.children&&k[0]!==Bi)for(F=(i?C.children.length:-1)+l,T=h.concat(C);F>-1&&F<C.children.length;){let A=C.children[F];if(v=u(A,F,T)(),v[0]===wn)return v;F=typeof v[1]=="number"?v[1]:F+l}}return k}}}function ek(e){return Array.isArray(e)?e:typeof e=="number"?[zi,e]:e==null?mc:[e]}function Gs(e,t,n,i){let o,s,l;typeof t=="function"&&typeof n!="function"?(s=void 0,l=t,o=n):(s=t,l=n,o=i),js(e,s,u,o);function u(f,m){let h=m[m.length-1],p=h?h.children.indexOf(f):void 0;return l(f,p,h)}}function Hi(e,t){let n=!1;return Gs(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,wn}),!!((!e.depth||e.depth<3)&&hn(e)&&(t.options.setext||n))}function pc(e,t,n,i){let o=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(i);if(Hi(e,n)){let h=n.enter("headingSetext"),p=n.enter("phrasing"),w=n.containerPhrasing(e,{...s.current(),before:`
|
|
`,after:`
|
|
`});return p(),h(),w+`
|
|
`+(o===1?"=":"-").repeat(w.length-(Math.max(w.lastIndexOf("\r"),w.lastIndexOf(`
|
|
`))+1))}let l="#".repeat(o),u=n.enter("headingAtx"),f=n.enter("phrasing");s.move(l+" ");let m=n.containerPhrasing(e,{before:"# ",after:`
|
|
`,...s.current()});return/^[\t ]/.test(m)&&(m=Ze(m.charCodeAt(0))+m.slice(1)),m=m?l+" "+m:l,n.options.closeAtx&&(m+=" "+l),f(),u(),m}qs.peek=tk;function qs(e){return e.value||""}function tk(){return"<"}Zs.peek=nk;function Zs(e,t,n,i){let o=Vn(n),s=o==='"'?"Quote":"Apostrophe",l=n.enter("image"),u=n.enter("label"),f=n.createTracker(i),m=f.move("![");return m+=f.move(n.safe(e.alt,{before:m,after:"]",...f.current()})),m+=f.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),m+=f.move("<"),m+=f.move(n.safe(e.url,{before:m,after:">",...f.current()})),m+=f.move(">")):(u=n.enter("destinationRaw"),m+=f.move(n.safe(e.url,{before:m,after:e.title?" ":")",...f.current()}))),u(),e.title&&(u=n.enter(`title${s}`),m+=f.move(" "+o),m+=f.move(n.safe(e.title,{before:m,after:o,...f.current()})),m+=f.move(o),u()),m+=f.move(")"),l(),m}function nk(){return"!"}Qs.peek=rk;function Qs(e,t,n,i){let o=e.referenceType,s=n.enter("imageReference"),l=n.enter("label"),u=n.createTracker(i),f=u.move("!["),m=n.safe(e.alt,{before:f,after:"]",...u.current()});f+=u.move(m+"]["),l();let h=n.stack;n.stack=[],l=n.enter("reference");let p=n.safe(n.associationId(e),{before:f,after:"]",...u.current()});return l(),n.stack=h,s(),o==="full"||!m||m!==p?f+=u.move(p+"]"):o==="shortcut"?f=f.slice(0,-1):f+=u.move("]"),f}function rk(){return"!"}Js.peek=ik;function Js(e,t,n){let i=e.value||"",o="`",s=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(i);)o+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s<n.unsafe.length;){let l=n.unsafe[s],u=n.compilePattern(l),f;if(l.atBreak)for(;f=u.exec(i);){let m=f.index;i.charCodeAt(m)===10&&i.charCodeAt(m-1)===13&&m--,i=i.slice(0,m)+" "+i.slice(f.index+1)}}return o+i+o}function ik(){return"`"}function Ks(e,t){let n=hn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Xs.peek=ok;function Xs(e,t,n,i){let o=Vn(n),s=o==='"'?"Quote":"Apostrophe",l=n.createTracker(i),u,f;if(Ks(e,n)){let h=n.stack;n.stack=[],u=n.enter("autolink");let p=l.move("<");return p+=l.move(n.containerPhrasing(e,{before:p,after:">",...l.current()})),p+=l.move(">"),u(),n.stack=h,p}u=n.enter("link"),f=n.enter("label");let m=l.move("[");return m+=l.move(n.containerPhrasing(e,{before:m,after:"](",...l.current()})),m+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=l.move("<"),m+=l.move(n.safe(e.url,{before:m,after:">",...l.current()})),m+=l.move(">")):(f=n.enter("destinationRaw"),m+=l.move(n.safe(e.url,{before:m,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${s}`),m+=l.move(" "+o),m+=l.move(n.safe(e.title,{before:m,after:o,...l.current()})),m+=l.move(o),f()),m+=l.move(")"),u(),m}function ok(e,t,n){return Ks(e,n)?"<":"["}ea.peek=sk;function ea(e,t,n,i){let o=e.referenceType,s=n.enter("linkReference"),l=n.enter("label"),u=n.createTracker(i),f=u.move("["),m=n.containerPhrasing(e,{before:f,after:"]",...u.current()});f+=u.move(m+"]["),l();let h=n.stack;n.stack=[],l=n.enter("reference");let p=n.safe(n.associationId(e),{before:f,after:"]",...u.current()});return l(),n.stack=h,s(),o==="full"||!m||m!==p?f+=u.move(p+"]"):o==="shortcut"?f=f.slice(0,-1):f+=u.move("]"),f}function sk(){return"["}function Gn(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function gc(e){let t=Gn(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function wc(e){let t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ui(e){let t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function kc(e,t,n,i){let o=n.enter("list"),s=n.bulletCurrent,l=e.ordered?wc(n):Gn(n),u=e.ordered?l==="."?")":".":gc(n),f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){let h=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),Ui(n)===l&&h){let p=-1;for(;++p<e.children.length;){let w=e.children[p];if(w&&w.type==="listItem"&&w.children&&w.children[0]&&w.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=u),n.bulletCurrent=l;let m=n.containerFlow(e,i);return n.bulletLastUsed=l,n.bulletCurrent=s,o(),m}function yc(e){let t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function xc(e,t,n,i){let o=yc(n),s=n.bulletCurrent||Gn(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let l=s.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);let u=n.createTracker(i);u.move(s+" ".repeat(l-s.length)),u.shift(l);let f=n.enter("listItem"),m=n.indentLines(n.containerFlow(e,u.current()),h);return f(),m;function h(p,w,k){return w?(k?"":" ".repeat(l))+p:(k?s:s+" ".repeat(l-s.length))+p}}function bc(e,t,n,i){let o=n.enter("paragraph"),s=n.enter("phrasing"),l=n.containerPhrasing(e,i);return s(),o(),l}var ta=jn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function vc(e,t,n,i){return(e.children.some(function(l){return ta(l)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function Cc(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}na.peek=ak;function na(e,t,n,i){let o=Cc(n),s=n.enter("strong"),l=n.createTracker(i),u=l.move(o+o),f=l.move(n.containerPhrasing(e,{after:o,before:u,...l.current()})),m=f.charCodeAt(0),h=$n(i.before.charCodeAt(i.before.length-1),m,o);h.inside&&(f=Ze(m)+f.slice(1));let p=f.charCodeAt(f.length-1),w=$n(i.after.charCodeAt(0),p,o);w.inside&&(f=f.slice(0,-1)+Ze(p));let k=l.move(o+o);return s(),n.attentionEncodeSurroundingInfo={after:w.outside,before:h.outside},u+f+k}function ak(e,t,n){return n.options.strong||"*"}function Sc(e,t,n,i){return n.safe(e.value,i)}function _c(e){let t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Ec(e,t,n){let i=(Ui(n)+(n.options.ruleSpaces?" ":"")).repeat(_c(n));return n.options.ruleSpaces?i.slice(0,-1):i}var Tc={blockquote:sc,break:Vs,code:cc,definition:fc,emphasis:$s,hardBreak:Vs,heading:pc,html:qs,image:Zs,imageReference:Qs,inlineCode:Js,link:Xs,linkReference:ea,list:kc,listItem:xc,paragraph:bc,root:vc,strong:na,text:Sc,thematicBreak:Ec};var Ac=[lk];function lk(e,t,n,i){if(t.type==="code"&&Ar(t,i)&&(e.type==="list"||e.type===t.type&&Ar(e,i)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&Hi(t,i))?void 0:n.spread?1:0}var kn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Fc=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
|
|
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:kn},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
|
|
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:kn},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
|
|
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:kn},{atBreak:!0,character:"+",after:`(?:[ \r
|
|
])`},{atBreak:!0,character:"-",after:`(?:[ \r
|
|
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
|
|
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:kn},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:kn},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:kn},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:kn},{atBreak:!0,character:"~"}];function Pc(e){return e.label||!e.identifier?e.label||"":Ni(e.identifier)}function Mc(e){if(!e._compiled){let t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function Ic(e,t,n){let i=t.indexStack,o=e.children||[],s=[],l=-1,u=n.before,f;i.push(-1);let m=t.createTracker(n);for(;++l<o.length;){let h=o[l],p;if(i[i.length-1]=l,l+1<o.length){let v=t.handle.handlers[o[l+1].type];v&&v.peek&&(v=v.peek),p=v?v(o[l+1],e,t,{before:"",after:"",...m.current()}).charAt(0):""}else p=n.after;s.length>0&&(u==="\r"||u===`
|
|
`)&&h.type==="html"&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),u=" ",m=t.createTracker(n),m.move(s.join("")));let w=t.handle(h,e,t,{...m.current(),after:p,before:u});f&&f===w.slice(0,1)&&(w=Ze(f.charCodeAt(0))+w.slice(1));let k=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,f=void 0,k&&(s.length>0&&k.before&&u===s[s.length-1].slice(-1)&&(s[s.length-1]=s[s.length-1].slice(0,-1)+Ze(u.charCodeAt(0))),k.after&&(f=p)),m.move(w),s.push(w),u=w.slice(-1)}return i.pop(),s.join("")}function Lc(e,t,n){let i=t.indexStack,o=e.children||[],s=t.createTracker(n),l=[],u=-1;for(i.push(-1);++u<o.length;){let f=o[u];i[i.length-1]=u,l.push(s.move(t.handle(f,e,t,{before:`
|
|
`,after:`
|
|
`,...s.current()}))),f.type!=="list"&&(t.bulletLastUsed=void 0),u<o.length-1&&l.push(s.move(uk(f,o[u+1],e,t)))}return i.pop(),l.join("")}function uk(e,t,n,i){let o=i.join.length;for(;o--;){let s=i.join[o](e,t,n,i);if(s===!0||s===1)break;if(typeof s=="number")return`
|
|
`.repeat(1+s);if(s===!1)return`
|
|
|
|
<!---->
|
|
|
|
`}return`
|
|
|
|
`}var ck=/\r?\n|\r/g;function Oc(e,t){let n=[],i=0,o=0,s;for(;s=ck.exec(e);)l(e.slice(i,s.index)),n.push(s[0]),i=s.index+s[0].length,o++;return l(e.slice(i)),n.join("");function l(u){n.push(t(u,o,!u))}}function Rc(e,t,n){let i=(n.before||"")+(t||"")+(n.after||""),o=[],s=[],l={},u=-1;for(;++u<e.unsafe.length;){let h=e.unsafe[u];if(!Yi(e.stack,h))continue;let p=e.compilePattern(h),w;for(;w=p.exec(i);){let k="before"in h||!!h.atBreak,v="after"in h,F=w.index+(k?w[1].length:0);o.includes(F)?(l[F].before&&!k&&(l[F].before=!1),l[F].after&&!v&&(l[F].after=!1)):(o.push(F),l[F]={before:k,after:v})}}o.sort(fk);let f=n.before?n.before.length:0,m=i.length-(n.after?n.after.length:0);for(u=-1;++u<o.length;){let h=o[u];h<f||h>=m||h+1<m&&o[u+1]===h+1&&l[h].after&&!l[h+1].before&&!l[h+1].after||o[u-1]===h-1&&l[h].before&&!l[h-1].before&&!l[h-1].after||(f!==h&&s.push(Dc(i.slice(f,h),"\\")),f=h,/[!-/:-@[-`{-~]/.test(i.charAt(h))&&(!n.encode||!n.encode.includes(i.charAt(h)))?s.push("\\"):(s.push(Ze(i.charCodeAt(h))),f++))}return s.push(Dc(i.slice(f,m),n.after)),s.join("")}function fk(e,t){return e-t}function Dc(e,t){let n=/\\(?=[!-/:-@[-`{-~])/g,i=[],o=[],s=e+t,l=-1,u=0,f;for(;f=n.exec(s);)i.push(f.index);for(;++l<i.length;)u!==i[l]&&o.push(e.slice(u,i[l])),o.push("\\"),u=i[l];return o.push(e.slice(u)),o.join("")}function Nc(e){let t=e||{},n=t.now||{},i=t.lineShift||0,o=n.line||1,s=n.column||1;return{move:f,current:l,shift:u};function l(){return{now:{line:o,column:s},lineShift:i}}function u(m){i+=m}function f(m){let h=m||"",p=h.split(/\r?\n|\r/g),w=p[p.length-1];return o+=p.length-1,s=p.length===1?s+w.length:1+w.length+i,h}}function ra(e,t){let n=t||{},i={associationId:Pc,containerPhrasing:pk,containerFlow:gk,createTracker:Nc,compilePattern:Mc,enter:s,handlers:{...Tc},handle:void 0,indentLines:Oc,indexStack:[],join:[...Ac],options:{},safe:wk,stack:[],unsafe:[...Fc]};Us(i,n),i.options.tightDefinitions&&i.join.push(mk),i.handle=ic("type",{invalid:dk,unknown:hk,handlers:i.handlers});let o=i.handle(e,void 0,i,{before:`
|
|
`,after:`
|
|
`,now:{line:1,column:1},lineShift:0});return o&&o.charCodeAt(o.length-1)!==10&&o.charCodeAt(o.length-1)!==13&&(o+=`
|
|
`),o;function s(l){return i.stack.push(l),u;function u(){i.stack.pop()}}}function dk(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function hk(e){let t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function mk(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function pk(e,t){return Ic(e,this,t)}function gk(e,t){return Lc(e,this,t)}function wk(e,t){return Rc(this,e,t)}function Vi(e){let t=this;t.compiler=n;function n(i){return ra(i,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function ia(e){if(e)throw e}var qi=je(jc(),1);function Fr(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function oa(){let e=[],t={run:n,use:i};return t;function n(...o){let s=-1,l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...o);function u(f,...m){let h=e[++s],p=-1;if(f){l(f);return}for(;++p<o.length;)(m[p]===null||m[p]===void 0)&&(m[p]=o[p]);o=m,h?Gc(h,u)(...m):l(null,...m)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function Gc(e,t){let n;return i;function i(...l){let u=e.length>l.length,f;u&&l.push(o);try{f=e.apply(this,l)}catch(m){let h=m;if(u&&n)throw h;return o(h)}u||(f&&f.then&&typeof f.then=="function"?f.then(s,o):f instanceof Error?o(f):s(f))}function o(l,...u){n||(n=!0,t(l,...u))}function s(l){o(null,l)}}var ve=class extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",s={},l=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?o=t:!s.cause&&t&&(l=!0,o=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof i=="string"){let f=i.indexOf(":");f===-1?s.ruleId=i:(s.source=i.slice(0,f),s.ruleId=i.slice(f+1))}if(!s.place&&s.ancestors&&s.ancestors){let f=s.ancestors[s.ancestors.length-1];f&&(s.place=f.position)}let u=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=u?u.line:void 0,this.name=Zt(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=l&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}};ve.prototype.file="";ve.prototype.name="";ve.prototype.reason="";ve.prototype.message="";ve.prototype.stack="";ve.prototype.column=void 0;ve.prototype.line=void 0;ve.prototype.ancestors=void 0;ve.prototype.cause=void 0;ve.prototype.fatal=void 0;ve.prototype.place=void 0;ve.prototype.ruleId=void 0;ve.prototype.source=void 0;var ot=je(require("node:path"),1);var sa=je(require("node:process"),1);var aa=require("node:url");function ji(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var la=["history","path","basename","stem","extname","dirname"],Pr=class{constructor(t){let n;t?ji(t)?n={path:t}:typeof t=="string"||kk(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":sa.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<la.length;){let s=la[i];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let o;for(o in n)la.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?ot.default.basename(this.path):void 0}set basename(t){ca(t,"basename"),ua(t,"basename"),this.path=ot.default.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ot.default.dirname(this.path):void 0}set dirname(t){qc(this.basename,"dirname"),this.path=ot.default.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ot.default.extname(this.path):void 0}set extname(t){if(ua(t,"extname"),qc(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ot.default.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ji(t)&&(t=(0,aa.fileURLToPath)(t)),ca(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ot.default.basename(this.path,this.extname):void 0}set stem(t){ca(t,"stem"),ua(t,"stem"),this.path=ot.default.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){let o=this.message(t,n,i);throw o.fatal=!0,o}info(t,n,i){let o=this.message(t,n,i);return o.fatal=void 0,o}message(t,n,i){let o=new ve(t,n,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}};function ua(e,t){if(e&&e.includes(ot.default.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ot.default.sep+"`")}function ca(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function qc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function kk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Zc=function(e){let i=this.constructor.prototype,o=i[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,i),s};var yk={}.hasOwnProperty,ma=class e extends Zc{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=oa()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let i=this.attachers[n];t.use(...i)}return t.data((0,qi.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ha("data",this.frozen),this.namespace[t]=n,this):yk.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ha("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);let o=n.call(t,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let n=Gi(t),i=this.parser||this.Parser;return fa("parse",i),i(String(n),n)}process(t,n){let i=this;return this.freeze(),fa("process",this.parser||this.Parser),da("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(s,l){let u=Gi(t),f=i.parse(u);i.run(f,u,function(h,p,w){if(h||!p||!w)return m(h);let k=p,v=i.stringify(k,w);bk(v)?w.value=v:w.result=v,m(h,w)});function m(h,p){h||!p?l(h):s?s(p):n(void 0,p)}}}processSync(t){let n=!1,i;return this.freeze(),fa("processSync",this.parser||this.Parser),da("processSync",this.compiler||this.Compiler),this.process(t,o),Jc("processSync","process",n),i;function o(s,l){n=!0,ia(s),i=l}}run(t,n,i){Qc(t),this.freeze();let o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?s(void 0,i):new Promise(s);function s(l,u){let f=Gi(n);o.run(t,f,m);function m(h,p,w){let k=p||t;h?u(h):l?l(k):i(void 0,k,w)}}}runSync(t,n){let i=!1,o;return this.run(t,n,s),Jc("runSync","run",i),o;function s(l,u){ia(l),o=u,i=!0}}stringify(t,n){this.freeze();let i=Gi(n),o=this.compiler||this.Compiler;return da("stringify",o),Qc(t),o(t,i)}use(t,...n){let i=this.attachers,o=this.namespace;if(ha("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(m){if(typeof m=="function")f(m,[]);else if(typeof m=="object")if(Array.isArray(m)){let[h,...p]=m;f(h,p)}else l(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function l(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(m.plugins),m.settings&&(o.settings=(0,qi.default)(!0,o.settings,m.settings))}function u(m){let h=-1;if(m!=null)if(Array.isArray(m))for(;++h<m.length;){let p=m[h];s(p)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function f(m,h){let p=-1,w=-1;for(;++p<i.length;)if(i[p][0]===m){w=p;break}if(w===-1)i.push([m,...h]);else if(h.length>0){let[k,...v]=h,F=i[w][1];Fr(F)&&Fr(k)&&(k=(0,qi.default)(!0,F,k)),i[w]=[m,k,...v]}}}},pa=new ma().freeze();function fa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function da(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ha(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Qc(e){if(!Fr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Jc(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Gi(e){return xk(e)?e:new Pr(e)}function xk(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function bk(e){return typeof e=="string"||vk(e)}function vk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Kc=pa().use(Un).use(Vi).freeze();var wa={d:(e,t)=>{for(var n in t)wa.o(t,n)&&!wa.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},ka={};wa.d(ka,{Z:()=>Ek,$:()=>nf});var qn={horizontalTab:-2,virtualSpace:-1,nul:0,eof:null,space:32};function Xc(e){return e<qn.nul||e===qn.space}function ga(e){return e<qn.horizontalTab}var Ck={553:e=>{e.exports=function(t){var n,i;return t._compiled||(n=t.before?"(?:"+t.before+")":"",i=t.after?"(?:"+t.after+")":"",t.atBreak&&(n="[\\r\\n][\\t ]*"+n),t._compiled=new RegExp((n?"("+n+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(i||""),"g")),t._compiled}},112:e=>{function t(n,i,o){var s;if(!i)return o;for(typeof i=="string"&&(i=[i]),s=-1;++s<i.length;)if(n.indexOf(i[s])!==-1)return!0;return!1}e.exports=function(n,i){return t(n,i.inConstruct,!0)&&!t(n,i.notInConstruct)}},113:(e,t,n)=>{e.exports=function(u,f,m){for(var h,p,w,k,v,F,T,C,A=(m.before||"")+(f||"")+(m.after||""),P=[],Y=[],B={},_=-1;++_<u.unsafe.length;)if(k=u.unsafe[_],o(u.stack,k))for(v=i(k);F=v.exec(A);)h="before"in k||k.atBreak,p="after"in k,w=F.index+(h?F[1].length:0),P.indexOf(w)===-1?(P.push(w),B[w]={before:h,after:p}):(B[w].before&&!h&&(B[w].before=!1),B[w].after&&!p&&(B[w].after=!1));for(P.sort(s),T=m.before?m.before.length:0,C=A.length-(m.after?m.after.length:0),_=-1;++_<P.length;)(w=P[_])<T||w>=C||w+1<C&&P[_+1]===w+1&&B[w].after&&!B[w+1].before&&!B[w+1].after||(T!==w&&Y.push(l(A.slice(T,w),"\\")),T=w,!/[!-/:-@[-`{-~]/.test(A.charAt(w))||m.encode&&m.encode.indexOf(A.charAt(w))!==-1?(Y.push("&#x"+A.charCodeAt(w).toString(16).toUpperCase()+";"),T++):Y.push("\\"));return Y.push(l(A.slice(T,C),m.after)),Y.join("")};var i=n(553),o=n(112);function s(u,f){return u-f}function l(u,f){for(var m,h=/\\(?=[!-/:-@[-`{-~])/g,p=[],w=[],k=-1,v=0,F=u+f;m=h.exec(F);)p.push(m.index);for(;++k<p.length;)v!==p[k]&&w.push(u.slice(v,p[k])),w.push("\\"),v=p[k];return w.push(u.slice(v)),w.join("")}}},ef={};function bt(e){var t=ef[e];if(t!==void 0)return t.exports;var n=ef[e]={exports:{}};return Ck[e](n,n.exports,bt),n.exports}bt.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return bt.d(t,{a:t}),t},bt.d=(e,t)=>{for(var n in t)bt.o(t,n)&&!bt.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},bt.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var ya={};(()=>{function e(o={}){let s=o.permalinks||[],l=o.pageResolver||(w=>[w.replace(/ /g,"_").toLowerCase()]),u=o.newClassName||"new",f=o.wikiLinkClassName||"internal",m=o.hrefTemplate||(w=>`#/page/${w}`),h;function p(w){return w[w.length-1]}return{enter:{wikiLink:function(w){h={type:"wikiLink",value:null,data:{alias:null,permalink:null,exists:null}},this.enter(h,w)}},exit:{wikiLinkTarget:function(w){let k=this.sliceSerialize(w);p(this.stack).value=k},wikiLinkAlias:function(w){let k=this.sliceSerialize(w);p(this.stack).data.alias=k},wikiLink:function(w){this.exit(w);let k=h,v=l(k.value),F=v.find(Y=>s.indexOf(Y)!==-1),T=F!==void 0,C;C=T?F:v[0]||"";let A=k.value;k.data.alias&&(A=k.data.alias);let P=f;T||(P+=" "+u),k.data.alias=A,k.data.permalink=C,k.data.exists=T,k.data.hName="a",k.data.hProperties={className:P,href:m(C)},k.data.hChildren=[{type:"text",value:A}]}}}}bt.d(ya,{V:()=>e,x:()=>i});var t=bt(113),n=bt.n(t);function i(o={}){let s=o.aliasDivider||":";return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]},{character:"]",inConstruct:["label","reference"]}],handlers:{wikiLink:function(l,u,f){let m=f.enter("wikiLink"),h=n()(f,l.value,{before:"[",after:"]"}),p=n()(f,l.data.alias,{before:"[",after:"]"}),w;return w=p!==h?`[[${h}${s}${p}]]`:`[[${h}]]`,m(),w}}}}})();var Sk=ya.V,_k=ya.x,tf=!1;function nf(e={}){let t=this.data();function n(i,o){t[i]?t[i].push(o):t[i]=[o]}!tf&&(this.Parser&&this.Parser.prototype&&this.Parser.prototype.blockTokenizers||this.Compiler&&this.Compiler.prototype&&this.Compiler.prototype.visitors)&&(tf=!0,console.warn("[remark-wiki-link] Warning: please upgrade to remark 13 to use this plugin")),n("micromarkExtensions",function(){var i=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).aliasDivider||":",o="]]";return{text:{91:{tokenize:function(s,l,u){var f,m,h=0,p=0,w=0;return function(A){return A!=="[[".charCodeAt(p)?u(A):(s.enter("wikiLink"),s.enter("wikiLinkMarker"),k(A))};function k(A){return p===2?(s.exit("wikiLinkMarker"),function(P){return ga(P)||P===qn.eof?u(P):(s.enter("wikiLinkData"),s.enter("wikiLinkTarget"),v(P))}(A)):A!=="[[".charCodeAt(p)?u(A):(s.consume(A),p++,k)}function v(A){return A===i.charCodeAt(h)?f?(s.exit("wikiLinkTarget"),s.enter("wikiLinkAliasMarker"),F(A)):u(A):A===o.charCodeAt(w)?f?(s.exit("wikiLinkTarget"),s.exit("wikiLinkData"),s.enter("wikiLinkMarker"),C(A)):u(A):ga(A)||A===qn.eof?u(A):(Xc(A)||(f=!0),s.consume(A),v)}function F(A){return h===i.length?(s.exit("wikiLinkAliasMarker"),s.enter("wikiLinkAlias"),T(A)):A!==i.charCodeAt(h)?u(A):(s.consume(A),h++,F)}function T(A){return A===o.charCodeAt(w)?m?(s.exit("wikiLinkAlias"),s.exit("wikiLinkData"),s.enter("wikiLinkMarker"),C(A)):u(A):ga(A)||A===qn.eof?u(A):(Xc(A)||(m=!0),s.consume(A),T)}function C(A){return w===2?(s.exit("wikiLinkMarker"),s.exit("wikiLink"),l(A)):A!==o.charCodeAt(w)?u(A):(s.consume(A),w++,C)}}}}}}(e)),n("fromMarkdownExtensions",Sk(e)),n("toMarkdownExtensions",_k(e))}var Ek=nf,h_=ka.Z,rf=ka.$;(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function xa(e){try{return!e.includes("://")||e.trim()!==e?!1:(new URL(e),!0)}catch{return!1}}var yn=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function Zi(e){let t=(0,yn.getFrontMatterInfo)(e);return(0,yn.parseYaml)(t.frontmatter)??{}}function of(e,t){let n=(0,yn.getFrontMatterInfo)(e);if(Object.keys(t).length===0)return e.slice(n.contentStart);let i=(0,yn.stringifyYaml)(t);return n.exists?Ol(e,i,n.from,n.to):`---
|
|
${i}---
|
|
${e}`}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();async function sf(e,t,n){let i=Ne(e,t),o=dt(n);await Zn(e,o);let s=Qi(e,n);try{await e.vault.copy(i,s)}catch(l){if(!await e.vault.exists(s))throw l}return s}async function Zn(e,t){if(await e.vault.adapter.exists(t))return!1;try{return await e.vault.createFolder(t),!0}catch(n){if(!await e.vault.exists(t))throw n;return!0}}function Qi(e,t){let n=et(t);return e.vault.getAvailablePath(we(se(t),Re(t,n)),n.slice(1))}function Qn(e){return e.vault.getMarkdownFiles().sort((t,n)=>t.path.localeCompare(n.path))}function ba(e,t,n){let i=he(e,t);if(e.vault.adapter.insensitive){let o=se(n),s=Re(n),l;for(;l=ht(e,o,!0),!l;)s=we(Re(o),s),o=se(o);n=we(l.getParentPrefix(),s)}return i.toLowerCase()===n.toLowerCase()?n:Qi(e,n)}async function va(e,t){let n=await Jn(e,he(e,t));return n.files.length===0&&n.folders.length===0}async function Jn(e,t){let n=he(e,t),i={files:[],folders:[]};if((await e.vault.adapter.stat(n))?.type!=="folder")return i;try{return await e.vault.adapter.list(n)}catch(o){if(await e.vault.exists(n))throw o;return i}}async function af(e,t,n,i={}){let s={...{shouldFailOnMissingFile:!0},...i};await br(async()=>{let l=await Ca(e,t);if(l===null)return h();let u=await mr(n,l);if(u===null)return!1;let f=!0;if(!await lf(e,t,async p=>{await e.vault.process(p,w=>w!==l?(console.warn("Content has changed since it was read. Retrying...",{actualContent:w,expectedContent:l,path:p.path}),f=!1,w):u)}))return h();return f;function h(){if(s.shouldFailOnMissingFile){let p=he(e,t);throw new Error(`File '${p}' not found`)}return!0}},s)}async function Ca(e,t){let n=null;return await lf(e,t,async i=>{n=await e.vault.read(i)}),n}async function Ji(e,t,n){let i=Ne(e,t,!1,!0),o=ba(e,t,n);if(i.path.toLowerCase()===o.toLowerCase())return i.path!==n&&await e.vault.rename(i,o),o;let s=dt(o);await Zn(e,s);try{await e.vault.rename(i,o)}catch(l){if(!await e.vault.exists(o)||await e.vault.exists(i.path))throw l}return o}async function lf(e,t,n){let i=he(e,t),o=ce(e,i);if(!o||o.deleted)return!1;try{return await n(o),!0}catch(s){if(o=ce(e,i),!o||o.deleted)return!1;throw s}}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();async function Mr(e,t,n,i={}){await af(e,t,async o=>{let s=await mr(n),l=cn(e,t)?Tk(o):Zi(o);for(let h of s)if(xn(h)){let p=o.slice(h.startIndex,h.endIndex);if(p!==h.oldContent)return console.warn("Content mismatch",{actualContent:p,endIndex:h.endIndex,expectedContent:h.oldContent,path:he(e,t),startIndex:h.startIndex}),null}else if(Ki(h)){let p=Ci(l,h.frontmatterKey);if(p!==h.oldContent)return console.warn("Content mismatch",{actualContent:p,expectedContent:h.oldContent,frontmatterKey:h.frontmatterKey,path:he(e,t)}),null}s.sort((h,p)=>xn(h)&&xn(p)?h.startIndex-p.startIndex:Ki(h)&&Ki(p)?h.frontmatterKey.localeCompare(p.frontmatterKey):xn(h)?-1:1),s=s.filter((h,p)=>h.oldContent===h.newContent?!1:p===0?!0:!Cs(h,s[p-1]));for(let h=1;h<s.length;h++){let p=s[h];if(!p)continue;let w=s[h-1];if(w&&xn(w)&&xn(p)&&w.endIndex&&p.startIndex&&w.endIndex>p.startIndex)return console.warn("Overlapping changes",{change:p,previousChange:w}),null}let u="",f=0,m=!1;for(let h of s)xn(h)?(u+=o.slice(f,h.startIndex),u+=h.newContent,f=h.endIndex):Ki(h)&&(Eu(l,h.frontmatterKey,h.newContent),m=!0);return cn(e,t)?u=JSON.stringify(l,null," "):(u+=o.slice(f),m&&(u=of(u,l))),u},i)}function xn(e){return e.startIndex!==void 0}function Ki(e){return e.frontmatterKey!==void 0}function Tk(e){let t;try{t=JSON.parse(e)}catch{t=null}return(t===null||typeof t!="object")&&(t={}),t}var cf=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function Xi(e,t){if(Vt(e))return{endIndex:e.position.end.offset,newContent:t,oldContent:e.original,startIndex:e.position.start.offset};if(Ot(e))return{frontmatterKey:e.key,newContent:t,oldContent:e.original};throw new Error("Unknown link type")}function uf(e){return e.sort((t,n)=>Ot(t)&&Ot(n)?t.key.localeCompare(n.key):Vt(t)&&Vt(n)?t.position.start.offset-n.position.start.offset:Ot(t)?1:-1)}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();async function Ak(e){for(let[t,n]of Object.entries(e.metadataCache.fileCache))n.hash&&(e.metadataCache.metadataCache[n.hash]||await mt(e,t))}function vt(e){let t=[];return e.links&&t.push(...e.links),e.embeds&&t.push(...e.embeds),e.frontmatterLinks&&t.push(...e.frontmatterLinks),uf(t),t=t.filter((n,i)=>{if(i===0)return!0;let o=t[i-1];return o?Vt(n)&&Vt(o)?n.position.start.offset!==o.position.start.offset:Ot(n)&&Ot(o)?n.key!==o.key:!0:!0}),t}function eo(e,t){let n=Ne(e,t,!0);return Sa(e,n,()=>e.metadataCache.getBacklinksForFile(n))}async function Jt(e,t,n={}){let i=e.metadataCache.getBacklinksForFile.safe;if(i)return i(t);let o=null;return await br(async()=>{let s=Ne(e,t);await Ak(e),o=eo(e,s);for(let l of o.keys()){let u=ce(e,l);if(!u)return!1;await ff(e,u);let f=await Ca(e,u);if(!f)return!1;let m=Zi(f),h=o.get(l);if(!h)return!1;for(let p of h){let w;if(Vt(p))w=f.slice(p.position.start.offset,p.position.end.offset);else if(Ot(p)){let k=Ci(m,p.key);if(typeof k!="string")return!1;w=k}else return!0;if(w!==p.original)return!1}}return!0},n),o}async function mt(e,t,n={}){let i=Ue("MetadataCache:getCacheSafe"),o=null;return await br(async()=>{let s=ce(e,t);if(!s||s.deleted)return o=null,!0;await ff(e,s);let l=e.metadataCache.getFileInfo(s.path),u=await e.vault.adapter.stat(s.path);return l?u?s.stat.mtime<u.mtime?(e.vault.onChange("modified",s.path,void 0,u),i(`Cached timestamp for ${s.path} is from ${new Date(s.stat.mtime).toString()} which is older than the file system modification timestamp ${new Date(u.mtime).toString()}`),!1):l.mtime<u.mtime?(i(`File cache info for ${s.path} is from ${new Date(l.mtime).toString()} which is older than the file modification timestamp ${new Date(u.mtime).toString()}`),!1):(o=e.metadataCache.getFileCache(s),o?!0:(i(`File cache for ${s.path} is missing`),!1)):(i(`File stat for ${s.path} is missing`),!1):(i(`File cache info for ${s.path} is missing`),!1)},n),o}function Fk(e,t){if(!t.deleted)return wt;let n=[],i=t;for(;i.deleted;)n.push(i.path),e.vault.fileMap[i.path]=i,i=i.parent??Ln(e,dt(i.path),!0);return tt(t)&&e.metadataCache.uniqueFileLookup.add(t.name.toLowerCase(),t),()=>{for(let o of n)delete e.vault.fileMap[o];tt(t)&&e.metadataCache.uniqueFileLookup.remove(t.name.toLowerCase(),t)}}function Sa(e,t,n){let i=Fk(e,t);try{return n()}finally{i()}}async function ff(e,t){if(!ke(e,t))return;let n=he(e,t);for(let i of e.workspace.getLeavesOfType("markdown"))i.view instanceof cf.MarkdownView&&i.view.file?.path===n&&await i.view.save()}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function df(e){return e.vault.getConfig("newLinkFormat")==="relative"}function hf(e){return!e.vault.getConfig("useMarkdownLinks")}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Pk=/[\\\x00\x08\x0B\x0C\x0E-\x1F ]/g,Mk=/[\\[\]<>_*~=`$]/g,pf="|";function Ik(e){let t=Yt(e.app,e.link,e.oldSourcePathOrFile??e.newSourcePathOrFile);return t?Ea({app:e.app,link:e.link,newSourcePathOrFile:e.newSourcePathOrFile,newTargetPathOrFile:t,oldSourcePathOrFile:e.oldSourcePathOrFile,shouldForceMarkdownLinks:e.shouldForceMarkdownLinks,shouldUpdateFilenameAlias:e.shouldUpdateFilenameAlias}):e.link.original}async function _a(e,t,n,i={}){await Mr(e,t,async()=>{let o=await mt(e,t);if(!o)return[];let s=[];for(let l of vt(o)){let u=await n(l);u!==void 0&&s.push(Xi(l,u))}return s},i)}function Yt(e,t,n){let{linkPath:i}=Kt(t.link);return e.metadataCache.getFirstLinkpathDest(i,he(e,n))}function no(e){let{app:t}=e,i=(t.fileManager.generateMarkdownLink.defaultOptionsFn??(()=>({})))();e={...{isEmptyEmbedAliasAllowed:!0},...i,...e};let s=Ne(t,e.targetPathOrFile,e.isNonExistingFileAllowed);return Sa(t,s,()=>Nk(e))}function Ir(e){let t=Hk(e);if(t)return t;let n="!",i=e.startsWith(n);i&&(e=Dt(e,n));let s=Kc().use(Un).use(rf,{aliasDivider:pf}).parse(e);if(s.children.length!==1)return null;let l=s.children[0];if(l?.type!=="paragraph"||l.children.length!==1)return null;let u=l.children[0];if(u?.position?.start.offset!==0||u.position.end.offset!==e.length)return null;switch(u.type){case"link":return Bk(u,e,i);case"wikiLink":return Uk(u,e,i);default:return null}}function Lk(e){let{app:t,displayText:n,isWikilink:i,newSourcePathOrFile:o,oldSourcePathOrFile:s,oldTargetPath:l,targetPathOrFile:u}=e;if(i===!1)return!1;if(!n)return!0;let f=Ne(t,u,!0),m=he(t,o),h=he(t,s??o),p=se(m),w=se(h),k=new Set;for(let F of[f.path,l]){if(!F)continue;let T=he(t,F);k.add(T),k.add(Re(T)),k.add(In(p,T)),k.add(In(w,T))}for(let F of[h,m])k.add(t.metadataCache.fileToLinktext(f,F,!1));let v=He((0,to.normalizePath)(n.split(" > ")[0]??""),/^\.\//g,"").toLowerCase();for(let F of k){if(F.toLowerCase()===v)return!0;let T=se(F),C=Re(F,et(F));if(we(T,C).toLowerCase()===v)return!0}return!1}function Kt(e){let t=(0,to.parseLinktext)(pr(e));return{linkPath:t.path,subpath:t.subpath}}function Ok(e){return Ir(e)?.hasAngleBrackets??!1}function ro(e){return Ir(e)?.isEmbed??!1}function Dk(e){return Ir(e)?.url.startsWith("./")??!1}function Kn(e){return Ir(e)?.isWikilink??!1}function Ea(e){let{app:t,link:n,newSourcePathOrFile:i,newTargetPathOrFile:o,oldSourcePathOrFile:s,oldTargetPathOrFile:l,shouldForceMarkdownLinks:u,shouldUpdateFilenameAlias:f}=e;if(!o)return n.original;let m=Ne(t,o,!0),h=he(t,l??o),p=Kn(n.original)&&u!==!0,{subpath:w}=Kt(n.link),k=!f;if(cn(t,i))return m.path+w;let v;if(p){let T=Ir(n.original);T?.alias&&(v=T.alias,k=!0)}return v??=Lk({app:t,displayText:n.displayText,isWikilink:p,newSourcePathOrFile:i,oldSourcePathOrFile:s,oldTargetPath:h,targetPathOrFile:m})?void 0:n.displayText,k||(v===Re(h,et(h))?v=m.basename:v===Re(h)&&(v=m.name)),no({alias:v,app:t,isWikilink:u?!1:void 0,originalLink:n.original,sourcePathOrFile:i,subpath:w,targetPathOrFile:m})}async function io(e){let{app:t,newSourcePathOrFile:n,oldSourcePathOrFile:i,shouldForceMarkdownLinks:o,shouldUpdateEmbedOnlyLinks:s,shouldUpdateFilenameAlias:l}=e;cn(t,n)&&!t.internalPlugins.getEnabledPluginById("canvas")||await _a(t,n,u=>{let f=ro(u.original);if(!(s!==void 0&&s!==f))return Ik({app:t,link:u,newSourcePathOrFile:n,oldSourcePathOrFile:i,shouldForceMarkdownLinks:o,shouldUpdateFilenameAlias:l})},e)}function Rk(e,t,n,i,o){let s;return t.path===n&&i?s=i:o.shouldForceRelativePath?s=In(se(n),o.isWikilink?Ul(e,t):t.path)+i:s=e.metadataCache.fileToLinktext(t,n,o.isWikilink)+i,o.shouldForceRelativePath&&o.shouldUseLeadingDot&&!s.startsWith(".")&&!s.startsWith("#")&&(s=`./${s}`),s}function Nk(e){let{app:t}=e,n=Ne(t,e.targetPathOrFile,e.isNonExistingFileAllowed),i=he(t,e.sourcePathOrFile),o=e.subpath??"",s=zk(e,n),l=Rk(t,n,i,o,s);return s.isWikilink?Wk(l,e.alias,s.isEmbed):Yk(l,n,e,s)}function Yk(e,t,n,i){let{app:o}=n,s=i.isEmbed?"!":"",l=i.shouldUseAngleBrackets?`<${e}>`:He(e,Pk,({substring:m})=>encodeURIComponent(m)),u=n.alias??"";!u&&(!i.isEmbed||!n.isEmptyEmbedAliasAllowed)&&(u=!n.shouldIncludeAttachmentExtensionToEmbedAlias||ke(o,t)?t.basename:t.name);let f=He(u,Mk,"\\$&");return`${s}[${f}](${l})`}function Wk(e,t,n){let i=n?"!":"",o=t??"";if(o&&o.toLowerCase()===e.toLowerCase())return`${i}[[${o}]]`;let s=o?`|${o}`:"";return`${i}[[${e}${s}]]`}function zk(e,t){let{app:n}=e;return{isEmbed:e.isEmbed??(e.originalLink?ro(e.originalLink):void 0)??!ke(n,t),isWikilink:e.isWikilink??(e.originalLink?Kn(e.originalLink):void 0)??hf(n),shouldForceRelativePath:e.shouldForceRelativePath??df(n),shouldUseAngleBrackets:e.shouldUseAngleBrackets??(e.originalLink?Ok(e.originalLink):void 0)??!1,shouldUseLeadingDot:e.shouldUseLeadingDot??(e.originalLink?Dk(e.originalLink):void 0)??!1}}function Bk(e,t,n){let i="<",o="](",s=")",l=e.children[0],u=t.slice((l?.position?.end.offset??1)+o.length,(e.position?.end.offset??0)-s.length),f=t.startsWith(i)||u.startsWith(i),m=xa(e.url),h=e.url;if(!m&&!f)try{h=decodeURIComponent(h)}catch(p){console.error(`Failed to decode URL ${h}`,p)}return{alias:l?.value,hasAngleBrackets:f,isEmbed:n,isExternal:m,isWikilink:!1,title:e.title??void 0,url:h}}function Hk(e){return xa(e)?{isEmbed:!1,isExternal:!0,isWikilink:!1,url:e}:null}function Uk(e,t,n){return{alias:t.includes(pf)?e.data.alias:void 0,isEmbed:n,isExternal:!1,isWikilink:!0,url:e.value}}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();async function oo(e,t){let n=ht(e,t);for(;n;){if(!await va(e,n))return;let i=n.parent;await Lr(e,n.path),n=i}}async function Lr(e,t,n,i,o){let s=gr(e,t);if(!s)return!1;let l=tt(s)||(o??!0);if(tt(s)){let u=await Jt(e,s);n&&u.clear(n),u.count()!==0&&(i&&new Notice(`Attachment ${s.path} is still used by other notes. It will not be deleted.`),l=!1)}else if(wr(s)){let u=await Jn(e,s);for(let f of[...u.files,...u.folders])l&&=await Lr(e,f,n,i);l&&=await va(e,s)}if(l)try{await e.fileManager.trashFile(s)}catch(u){await e.vault.exists(s.path)&&(hr(new Error(`Failed to delete ${s.path}`,{cause:u})),l=!1)}return l}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Ta=new Map,Or=new Set,so=new Map;function yf(e,t){let n=ao(e.app),i=e.manifest.id;n.set(i,t),wf(e.app),e.register(()=>{n.delete(i),wf(e.app)});let o=e.app;e.registerEvent(o.vault.on("delete",s=>{qk(e,s)})),e.registerEvent(o.vault.on("rename",(s,l)=>{Kk(e,s,l)})),e.registerEvent(o.metadataCache.on("deleted",(s,l)=>{Qk(e,s,l)}))}async function Vk(e,t,n,i,o){let s=so.get(t);if(s){so.delete(t);for(let l of s)await Aa(e,l.oldPath,n,i,o,l.combinedBacklinksMap)}}async function $k(e,t,n,i,o){if(i.set(t,n),!Rt(e,t))return;let s=Dr(e),l=await Wn(e,t),u=s.shouldRenameAttachmentFolder?await Wn(e,n):l,f=ht(e,l);if(!f||l===u&&!s.shouldRenameAttachmentFiles)return;let m=[];if(await _s(e,t))kf.Vault.recurseChildren(f,w=>{tt(w)&&m.push(w)});else for(let w of o){let k=Yt(e,w,t);k&&k.path.startsWith(l)&&(await Jt(e,k)).keys().length===1&&m.push(k)}let h=Re(t,et(t)),p=Re(n,et(n));for(let w of m){if(Rt(e,w))continue;let k=In(l,w.path),v=we(u,se(k)),F=s.shouldRenameAttachmentFiles?He(w.basename,h,p):w.basename,T=we(v,Rl(F,w.extension));if(w.path!==T){if(s.shouldDeleteConflictingAttachments){let C=ce(e,T);C&&await e.fileManager.trashFile(C)}else T=e.vault.getAvailablePath(we(v,F),w.extension);i.set(w.path,T)}}}function ao(e){return jt(e,"renameDeleteHandlersMap",new Map).value}function Dr(e){let t=ao(e),n=Array.from(t.values()).reverse(),i={};for(let o of n){let s=o();i.shouldDeleteConflictingAttachments||=s.shouldDeleteConflictingAttachments??!1,i.shouldDeleteEmptyFolders||=s.shouldDeleteEmptyFolders??!1,i.shouldHandleDeletions||=s.shouldHandleDeletions??!1,i.shouldHandleRenames||=s.shouldHandleRenames??!1,i.shouldRenameAttachmentFiles||=s.shouldRenameAttachmentFiles??!1,i.shouldRenameAttachmentFolder||=s.shouldRenameAttachmentFolder??!1,i.shouldUpdateFilenameAliases||=s.shouldUpdateFilenameAliases??!1;let l=i.isPathIgnored;i.isPathIgnored=u=>l?.(u)??s.isPathIgnored?.(u)??!1}return i}async function jk(e,t,n,i,o){if(!e.vault.adapter.insensitive||t.toLowerCase()!==n.toLowerCase())return!1;let s=we(se(n),`__temp__${Re(n)}`);return await bf(e,n,s),await Aa(e,t,s,i,o),await e.vault.rename(Ne(e,s),n),!0}async function Gk(e,t){if(Ue("RenameDeleteHandler:handleDelete")(`Handle Delete ${t}`),!Rt(e,t))return;let n=Dr(e);if(!n.shouldHandleDeletions||n.isPathIgnored?.(t))return;let i=Ta.get(t);if(Ta.delete(t),i){let l=vt(i);for(let u of l){let f=Yt(e,u,t);f&&(Rt(e,f)||await Lr(e,f,t,n.shouldDeleteEmptyFolders))}}let o=await Wn(e,t),s=ht(e,o);s&&await _s(e,t)&&await Lr(e,s,t,!1,n.shouldDeleteEmptyFolders)}function qk(e,t){let n=e.app;if(!Fa(e))return;let i=t.path;it(n,()=>Gk(n,i))}function Zk(e,t,n){let i=Dr(e);i.isPathIgnored?.(t.path)||i.shouldHandleDeletions&&ke(e,t)&&n&&Ta.set(t.path,n)}function Qk(e,t,n){Fa(e)&&Zk(e.app,t,n)}function Jk(e,t,n){let i=xf(t,n);if(Ue("RenameDeleteHandler:handleRename")(`Handle Rename ${i}`),Or.has(i)){Or.delete(i);return}let o=Dr(e);if(!o.shouldHandleRenames||o.isPathIgnored?.(t)||o.isPathIgnored?.(n))return;let s=e.metadataCache.getCache(t)??e.metadataCache.getCache(n),l=s?vt(s):[],u=eo(e,t).data;it(e,()=>Aa(e,t,n,u,l))}async function Aa(e,t,n,i,o,s){if(await Vk(e,t,n,i,o),Xk(e,t,n,i,o),await jk(e,t,n,i,o))return;let l=Su(e.fileManager,{updateAllLinks:()=>is});try{let u=new Map;await $k(e,t,n,u,o);let f=new Map;gf(i,u,f,t);for(let p of u.keys()){if(p===t)continue;let w=(await Jt(e,p)).data;gf(w,u,f,p)}let m=new Set;for(let[p,w]of u.entries()){if(p===t)continue;let k=await bf(e,p,w);u.set(p,k),m.add(se(p))}let h=Dr(e);if(h.shouldDeleteEmptyFolders)for(let p of m)await oo(e,p);for(let[p,w]of Array.from(f.entries()).concat(Array.from(s?.entries()??[])))await _a(e,p,k=>{let v=w.get(Si(k));if(!v)return;let F=u.get(v);if(F)return Ea({app:e,link:k,newSourcePathOrFile:p,newTargetPathOrFile:F,oldTargetPathOrFile:v,shouldUpdateFilenameAlias:h.shouldUpdateFilenameAliases})},{shouldFailOnMissingFile:!1});if(Rt(e,n)&&await io({app:e,newSourcePathOrFile:n,oldSourcePathOrFile:t,shouldFailOnMissingFile:!1,shouldUpdateFilenameAlias:h.shouldUpdateFilenameAliases}),!ce(e,n)){let p=so.get(n);p||(p=[],so.set(n,p)),p.push({combinedBacklinksMap:f,oldPath:t})}}finally{l();let u=Array.from(Or);it(e,()=>{for(let f of u)Or.delete(f)})}}function Kk(e,t,n){if(!Fa(e)||!tt(t))return;let i=t.path;Jk(e.app,n,i)}function gf(e,t,n,i){for(let[o,s]of e.entries()){let l=t.get(o)??o,u=n.get(l)??new Map;n.set(l,u);for(let f of s)u.set(Si(f),i)}}function wf(e){let t=ao(e);Ue("RenameDeleteHandler:logRegisteredHandlers")(`Plugins with registered rename/delete handlers: ${JSON.stringify(Array.from(t.keys()))}`)}function xf(e,t){return`${e} -> ${t}`}function Xk(e,t,n,i,o){let s=e.metadataCache.getCache(t)??e.metadataCache.getCache(n),l=s?vt(s):[],u=eo(e,t).data;for(let f of l)o.includes(f)||o.push(f);for(let[f,m]of u.entries()){let h=i.get(f);h||(h=[],i.set(f,h));for(let p of m)h.includes(p)||h.push(p)}}async function bf(e,t,n){if(n=ba(e,t,n),t===n)return n;let i=xf(t,n);return Or.add(i),n=await Ji(e,t,n),n}function Fa(e){let t=e.app,n=e.manifest.id,i=ao(t);return Array.from(i.keys())[0]===n}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Xt=class{getTransformer(t){if(t===this.id)return this;throw new Error(`Transformer with id ${t} not found`)}transformObjectRecursively(t){return this.transformValueRecursively(t,"")}getTransformerId(t,n){return this.canTransform(t,n)?this.id:null}transformValueRecursively(t,n){let i=this.getTransformerId(t,n);if(i){let s=this.transformValue(t,n);return s===void 0?void 0:{__transformerId:i,transformedValue:s}}if(t===null)return null;if(typeof t!="object")return t;if(Array.isArray(t))return t.map((s,l)=>this.transformValueRecursively(s,l.toString()));let o=t;return o.__transformerId?this.getTransformer(o.__transformerId).restoreValue(o.transformedValue,n):Object.fromEntries(Object.entries(t).map(([s,l])=>[s,this.transformValueRecursively(l,s)]))}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Xn=class extends Xt{};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var lo=class extends Xn{get id(){return"date"}canTransform(t){return t instanceof Date}restoreValue(t){return new Date(t)}transformValue(t){return t.toISOString()}};var vf=je(bn(),1);(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var uo=class extends Xn{get id(){return"duration"}canTransform(t){let n=t;return!!n.asHours&&!!n.asMinutes&&!!n.asSeconds&&!!n.asMilliseconds}restoreValue(t){return(0,vf.duration)(t)}transformValue(t){return t.toISOString()}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var co=class extends Xt{constructor(t){super(),this.transformers=t}get id(){return"group"}canTransform(t,n){return this.getFirstTransformerThatCanTransform(t,n)!==null}getTransformer(t){return this.transformers.find(n=>n.id===t)??un(`No transformer with id ${t} found`)}transformValue(t,n){let i=this.getFirstTransformerThatCanTransform(t,n);if(i===null)throw new Error("No transformer can transform the value");return i.transformValue(t,n)}getTransformerId(t,n){let i=this.getFirstTransformerThatCanTransform(t,n);return i===null?null:i.id}restoreValue(){throw new Error("GroupTransformer does not support restoring values")}getFirstTransformerThatCanTransform(t,n){return this.transformers.find(i=>i.canTransform(t,n))??null}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var ey="_",fo=class extends Xt{get id(){return"skip-private-property"}canTransform(t,n){return n.startsWith(ey)}transformValue(){}restoreValue(){throw new Error("SkipPrivatePropertyTransformer does not support restoring values")}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var ty=new co([new fo,new lo,new uo]),ho=class{get shouldSaveAfterLoad(){return this._shouldSaveAfterLoad}_shouldSaveAfterLoad=!1;init(t){if(t!=null){if(typeof t!="object"||Array.isArray(t)){let n=Array.isArray(t)?"Array":typeof t;console.error(`Invalid data type. Expected Object, got: ${n}`);return}this.initFromRecord(t)}}toJSON(){return this.getTransformer().transformObjectRecursively(this)}getTransformer(){return ty}initFromRecord(t){t=this.getTransformer().transformObjectRecursively(t);for(let[n,i]of Object.entries(t)){if(!(n in this)){console.warn(`Unknown property: ${n}`);continue}this[n]=i}}};var Cf=/(?:)/,Sf=/$./,mo=class extends ho{autoCollectAttachments=!1;changeNoteBacklinksAlt=!0;consistencyReportFile="consistency-report.md";deleteAttachmentsWithNote=!1;deleteEmptyFolders=!0;deleteExistFilesWhenMoveNote=!1;moveAttachmentsWithNote=!1;showBackupWarning=!0;updateLinks=!0;get excludePaths(){return this._excludePaths}set excludePaths(t){this._excludePaths=t.filter(Boolean),this._excludePathsRegExp=_f(this._excludePaths,Sf)}get hadDangerousSettingsReverted(){return this._hadDangerousSettingsReverted}get includePaths(){return this._includePaths}set includePaths(t){this._includePaths=t.filter(Boolean),this._includePathsRegExp=_f(this._includePaths,Cf)}_excludePaths=[];_excludePathsRegExp=Sf;_hadDangerousSettingsReverted=!1;_includePaths=[];_includePathsRegExp=Cf;constructor(t){super(),this.excludePaths=["/consistency-report\\.md$/"],this.init(t)}initFromRecord(t){let n=t;if(n.ignoreFiles||n.ignoreFolders){let i=n.excludePaths??[];for(let o of n.ignoreFiles??[])i.push(`/${o}$/`);for(let o of n.ignoreFolders??[])i.push(o);i.length>0&&(n.excludePaths=i),delete n.ignoreFiles,delete n.ignoreFolders}super.initFromRecord(n),this.showBackupWarning&&(this._hadDangerousSettingsReverted=this.deleteAttachmentsWithNote||this.deleteExistFilesWhenMoveNote||this.moveAttachmentsWithNote||this.autoCollectAttachments,this.deleteAttachmentsWithNote=!1,this.deleteExistFilesWhenMoveNote=!1,this.moveAttachmentsWithNote=!1,this.autoCollectAttachments=!1)}isPathIgnored(t){return!this._includePathsRegExp.test(t)||this._excludePathsRegExp.test(t)}toJSON(){return{...super.toJSON(),excludePaths:this.excludePaths,includePaths:this.includePaths}}};function _f(e,t){if(e.length===0)return t;let n=e.map(i=>i.startsWith("/")&&i.endsWith("/")?i.slice(1,-1):`^${ls(i)}`).map(i=>`(${i})`).join("|");return new RegExp(n)}var Of=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function Ma(e,t){e.createEl("strong",{cls:"markdown-rendered code"},n=>{n.createEl("code",{text:t})})}var Tf=require("obsidian");var en=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function Ef(e){let t=e;return t.validatorEl?t:e instanceof en.DropdownComponent?{get validatorEl(){return e.selectEl}}:e instanceof en.SliderComponent?{get validatorEl(){return e.sliderEl}}:e instanceof en.TextAreaComponent?{get validatorEl(){return e.inputEl}}:e instanceof en.TextComponent?{get validatorEl(){return e.inputEl}}:null}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var po=class extends Tf.PluginSettingTab{constructor(t){super(t.app,t),this.plugin=t,this.containerEl.addClass($.LibraryName,rt(),$.PluginSettingsTab)}validatorsMap=new WeakMap;bind(t,n,i){let s={...{componentToPluginSettingsValueConverter:m=>m,onChanged:wt,pluginSettings:void 0,pluginSettingsToComponentValueConverter:m=>m,shouldAutoSave:!0,shouldShowValidationMessage:!0,valueValidator:wt},...i},l=()=>s.pluginSettings??this.plugin.settingsClone,u=Ef(t)?.validatorEl,f=async m=>{m??=t.getValue();let h=await s.valueValidator(m);return u&&(h||(u.setCustomValidity(""),u.checkValidity(),h=u.validationMessage),u.setCustomValidity(h),u.title=h,u.isActiveElement()&&s.shouldShowValidationMessage&&u.reportValidity()),!h};return t.setValue(s.pluginSettingsToComponentValueConverter(l()[n])).onChange(async m=>{if(!await f(m))return;let h=l();h[n]=s.componentToPluginSettingsValueConverter(m),s.shouldAutoSave&&await this.plugin.saveSettings(h),await s.onChanged()}),u?.addEventListener("focus",xs(()=>f())),u?.addEventListener("blur",xs(()=>f())),this.validatorsMap.set(t,()=>f()),xr(()=>f()),t}async revalidate(t){let n=this.validatorsMap.get(t);return n?await n():!0}};var If=require("obsidian");var Ia=je(bn(),1);var go=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Ve=class extends go.ValueComponent{inputEl;get validatorEl(){return this.inputEl}textComponent;constructor(t,n,i){super(),this.textComponent=new go.TextComponent(t),this.inputEl=this.textComponent.inputEl,this.inputEl.type=n,t.addClass($.LibraryName,rt(),i)}getValue(){return this.valueFromString(this.inputEl.value)}onChange(t){return this.textComponent.onChange(()=>t(this.getValue())),this}onChanged(){this.textComponent.onChanged()}setDisabled(t){return this.textComponent.setDisabled(t),this.disabled=t,this}setPlaceholder(t){return this.textComponent.setPlaceholder(t),this}setValue(t){return this.inputEl.value=this.valueToString(t),this}valueToString(t){return String(t)}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var $e=class extends Ve{setMax(t){return this.inputEl.max=this.valueToString(t),this}setMin(t){return this.inputEl.min=this.valueToString(t),this}setStep(t){return this.inputEl.step=t.toString(),this}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Af="YYYY-MM-DD",wo=class extends $e{constructor(t){super(t,"date",$.DateComponent)}valueFromString(t){return(0,Ia.default)(t,Af).toDate()}valueToString(t){return(0,Ia.default)(t).format(Af)}};var La=je(bn(),1);(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Ff="YYYY-MM-DDTHH:mm",ko=class extends $e{constructor(t){super(t,"datetime-local",$.DateTimeComponent)}valueFromString(t){return(0,La.default)(t,Ff).toDate()}valueToString(t){return(0,La.default)(t).format(Ff)}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var yo=class extends Ve{constructor(t){super(t,"email",$.EmailComponent)}valueFromString(t){return t}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var xo=class extends Ve{constructor(t){super(t,"file",$.FileComponent)}getValue(){return this.inputEl.files?.[0]??null}valueFromString(){return this.getValue()}valueToString(t){return t?.name??""}};var Oa=je(bn(),1);(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Pf="YYYY-MM",bo=class extends $e{constructor(t){super(t,"month",$.MonthComponent)}valueFromString(t){let n=(0,Oa.default)(t,Pf);if(!n.isValid())throw new Error("Invalid month");return{month:n.month()+1,year:n.year()}}valueToString(t){return(0,Oa.default)().year(t.year).month(t.month-1).format(Pf)}};var Co=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var vo=class extends Co.ValueComponent{get validatorEl(){return this.dropdownComponent.selectEl}dropdownComponent;constructor(t){super(),this.dropdownComponent=new Co.DropdownComponent(t),this.dropdownComponent.selectEl.multiple=!0,t.addClass($.LibraryName,rt(),$.MultipleDropdownComponent)}addOption(t,n){return this.dropdownComponent.addOption(t,n),this}addOptions(t){return this.dropdownComponent.addOptions(t),this}getValue(){return Array.from(this.dropdownComponent.selectEl.selectedOptions).map(t=>t.value)}onChange(t){return this.dropdownComponent.onChange(()=>t(this.getValue())),this}setDisabled(t){return this.dropdownComponent.setDisabled(t),this.disabled=t,this}setValue(t){for(let n of Array.from(this.dropdownComponent.selectEl.options))n.selected=t.includes(n.value);return this}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var So=class extends Ve{constructor(t){super(t,"email",$.MultipleEmailComponent),this.inputEl.multiple=!0}valueFromString(t){return t.split(",").map(n=>n.trim())}valueToString(t){return t.join(", ")}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var _o=class extends Ve{constructor(t){super(t,"file",$.MultipleFileComponent),this.inputEl.multiple=!0}getValue(){return Array.from(this.inputEl.files??[])}valueFromString(){return this.getValue()}valueToString(t){return t[0]?.name??""}};var To=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Eo=class extends To.ValueComponent{get validatorEl(){return this.textAreaComponent.inputEl}textAreaComponent;constructor(t){super(),this.textAreaComponent=new To.TextAreaComponent(t),t.addClass($.LibraryName,rt(),$.MultipleTextComponent)}getValue(){return this.textAreaComponent.getValue().split(`
|
|
`)}onChange(t){return this.textAreaComponent.onChange(()=>t(this.getValue())),this}setDisabled(t){return this.textAreaComponent.setDisabled(t),this.disabled=t,this}setPlaceholder(t){return this.textAreaComponent.setPlaceholder(t),this}setValue(t){return this.textAreaComponent.setValue(t.join(`
|
|
`)),this}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Ao=class extends $e{constructor(t){super(t,"number",$.NumberComponent)}valueFromString(t){return parseInt(t,10)}};var Po=je(bn(),1);(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Fo=class extends $e{constructor(t){super(t,"time",$.TimeComponent)}valueFromString(t){return(0,Po.duration)(t)}valueToString(t){let n;return t.milliseconds()>0?n="HH:mm:ss.SSS":t.seconds()>0?n="HH:mm:ss":n="HH:mm",(0,Po.utc)(t.asMilliseconds()).format(n)}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Mo=class extends Ve{constructor(t){super(t,"url",$.UrlComponent)}valueFromString(t){return t}};var Da=je(bn(),1);(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Mf="YYYY-[W]WW",Io=class extends $e{constructor(t){super(t,"week",$.WeekComponent)}valueFromString(t){let n=(0,Da.default)(t,Mf);if(!n.isValid())throw new Error("Invalid week");return{weekNumber:n.isoWeek(),year:n.year()}}valueToString(t){return(0,Da.default)().year(t.year).isoWeek(t.weekNumber).format(Mf)}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Qe=class extends If.Setting{addComponent(t,n){let i=new t(this.controlEl);return this.components.push(i),n(i),this}addDate(t){return this.addComponent(wo,t)}addDateTime(t){return this.addComponent(ko,t)}addEmail(t){return this.addComponent(yo,t)}addFile(t){return this.addComponent(xo,t)}addMonth(t){return this.addComponent(bo,t)}addMultipleDropdown(t){return this.addComponent(vo,t)}addMultipleEmail(t){return this.addComponent(So,t)}addMultipleFile(t){return this.addComponent(_o,t)}addMultipleText(t){return this.addComponent(Eo,t)}addNumber(t){return this.addComponent(Ao,t)}addTime(t){return this.addComponent(Fo,t)}addUrl(t){return this.addComponent(Mo,t)}addWeek(t){return this.addComponent(Io,t)}};var Lo=class extends po{display(){this.containerEl.empty();let t="Move Attachments with Note";new Qe(this.containerEl).setName(t).setDesc("Automatically move attachments when a note is relocated. This includes attachments located in the same folder or any of its subfolders.").addToggle(s=>this.bind(s,"moveAttachmentsWithNote",{onChanged:async()=>{await this.checkDangerousSetting("moveAttachmentsWithNote",t)}}));let n="Delete Unused Attachments with Note";new Qe(this.containerEl).setName(n).setDesc("Automatically remove attachments that are no longer referenced in other notes when the note is deleted.").addToggle(s=>this.bind(s,"deleteAttachmentsWithNote",{onChanged:async()=>{await this.checkDangerousSetting("deleteAttachmentsWithNote",n)}})),new Qe(this.containerEl).setName("Update Links").setDesc("Automatically update links to attachments and other notes when moving notes or attachments.").addToggle(s=>this.bind(s,"updateLinks")),new Qe(this.containerEl).setName("Delete Empty Folders").setDesc("Automatically remove empty folders after moving notes with attachments.").addToggle(s=>this.bind(s,"deleteEmptyFolders"));let i="Delete Duplicate Attachments on Note Move";new Qe(this.containerEl).setName(i).setDesc("Automatically delete attachments when moving a note if a file with the same name exists in the destination folder. If disabled, the file will be renamed and moved.").addToggle(s=>this.bind(s,"deleteExistFilesWhenMoveNote",{onChanged:async()=>{await this.checkDangerousSetting("deleteExistFilesWhenMoveNote",i)}})),new Qe(this.containerEl).setName("Update Backlink Text on Note Rename").setDesc("When a note is renamed, its linked references are automatically updated. If this option is enabled, the text of backlinks to this note will also be modified.").addToggle(s=>this.bind(s,"changeNoteBacklinksAlt")),new Qe(this.containerEl).setName("Consistency Report Filename").setDesc("Specify the name of the file for the consistency report.").addText(s=>this.bind(s,"consistencyReportFile").setPlaceholder("Example: consistency-report.md"));let o="Auto Collect Attachments";new Qe(this.containerEl).setName(o).setDesc("Automatically collect attachments when the note is edited.").addToggle(s=>this.bind(s,"autoCollectAttachments",{onChanged:async()=>{await this.checkDangerousSetting("autoCollectAttachments",o)}})),new Qe(this.containerEl).setName("Include paths").setDesc(createFragment(s=>{s.appendText("Include notes from the following paths"),s.createEl("br"),s.appendText("Insert each path on a new line"),s.createEl("br"),s.appendText("You can use path string or "),Ma(s,"/regular expression/"),s.createEl("br"),s.appendText("If the setting is empty, all notes are included")})).addMultipleText(s=>{this.bind(s,"includePaths",{valueValidator:Lf})}),new Qe(this.containerEl).setName("Exclude paths").setDesc(createFragment(s=>{s.appendText("Exclude notes from the following paths"),s.createEl("br"),s.appendText("Insert each path on a new line"),s.createEl("br"),s.appendText("You can use path string or "),Ma(s,"/regular expression/"),s.createEl("br"),s.appendText("If the setting is empty, no notes are excluded")})).addMultipleText(s=>{this.bind(s,"excludePaths",{valueValidator:Lf})})}async checkDangerousSetting(t,n){this.plugin.settings[t]&&await yi({app:this.app,message:createFragment(i=>{i.createDiv({cls:"community-modal-readme"},o=>{o.appendText("You enabled "),o.createEl("strong",{cls:"markdown-rendered-code",text:n}),o.appendText(" setting. Without proper configuration it might lead to inconvenient attachment rearrangements or even data loss in your vault."),o.createEl("br"),o.appendText("It is "),o.createEl("strong",{text:"STRONGLY"}),o.appendText(" recommended to backup your vault before using the plugin."),o.createEl("br"),o.createEl("a",{href:"https://github.com/dy-sh/obsidian-consistent-attachments-and-links?tab=readme-ov-file",text:"Read more"}),o.appendText(" about how to use the plugin.")})}),title:createFragment(i=>{(0,Of.setIcon)(i.createSpan(),"triangle-alert"),i.appendText(" Consistent Attachments and Links")})})}};function Lf(e){for(let t of e)if(t.startsWith("/")&&t.endsWith("/")){let n=t.slice(1,-1);if(!Ll(n))return`Invalid regular expression ${t}`}}var yA=require("obsidian");var Df=require("obsidian");var vn=class extends Map{constructor(n){super();this.title=n}add(n,i){this.has(n)||this.set(n,[]);let o=this.get(n);o&&o.push(i)}toString(n,i){if(this.size>0){let o=`# ${this.title} (${this.size.toString()} files)
|
|
`;for(let s of this.keys()){let l=ce(n,s);if(!l)continue;let u=no({app:n,sourcePathOrFile:i,targetPathOrFile:l});o+=`${u}:
|
|
`;for(let f of this.get(s)??[])o+=`- (line ${(f.position.start.line+1).toString()}): \`${f.link}\`
|
|
`;o+=`
|
|
|
|
`}return o}return`# ${this.title}
|
|
No problems found
|
|
|
|
`}},Rr=class{constructor(t){this.plugin=t;}async checkConsistency(t,n,i,o,s){if(this.plugin.settings.isPathIgnored(t.path))return;let l=await mt(this.plugin.app,t.path);if(!l)return;let u=l.links??[],f=l.embeds??[];for(let m of u)await this.isValidLink(m,t.path)||n.add(t.path,m),Kn(m.original)&&o.add(t.path,m);for(let m of f)await this.isValidLink(m,t.path)||i.add(t.path,m),Kn(m.original)&&s.add(t.path,m)}async convertAllNoteEmbedsPathsToRelative(t){return await this.convertAllNoteRefPathsToRelative(t,!0)}async convertAllNoteLinksPathsToRelative(t){return await this.convertAllNoteRefPathsToRelative(t,!1)}async getCachedNotesThatHaveLinkToFile(t){let n=ce(this.plugin.app,t);return n?(await Jt(this.plugin.app,n)).keys():[]}getFullPathForLink(t,n){({linkPath:t}=Kt(t));let i=se(n);return we(i,t)}async replaceAllNoteWikilinksWithMarkdownLinks(t,n){if(this.plugin.settings.isPathIgnored(t))return 0;let i=ce(this.plugin.app,t);if(!i)return console.warn(`can't update wikilinks in note, file not found: ${t}`),0;let o=await mt(this.plugin.app,i);if(!o)return 0;let l=((n?o.embeds:o.links)??[]).filter(u=>Kn(u.original)).length;return await io({app:this.plugin.app,newSourcePathOrFile:i,shouldForceMarkdownLinks:!0,shouldUpdateEmbedOnlyLinks:n}),l}async updateChangedPathsInNote(t,n){if(this.plugin.settings.isPathIgnored(t))return;let i=ce(this.plugin.app,t);if(!i){console.warn(`can't update links in note, file not found: ${t}`);return}let o=new Map;for(let s of n)o.set(s.oldPath,s.newPath);await this.updateLinks(i,i.path,o)}async convertAllNoteRefPathsToRelative(t,n){if(this.plugin.settings.isPathIgnored(t))return[];let i=ce(this.plugin.app,t);if(!i)return[];let o=[];return await Mr(this.plugin.app,i,async()=>{let s=await mt(this.plugin.app,i);if(!s)return[];let l=(n?s.embeds:s.links)??[],u=[];for(let f of l){let m={endIndex:f.position.end.offset,newContent:this.convertLink({forceRelativePath:!0,link:f,note:i,oldNotePath:t}),oldContent:f.original,startIndex:f.position.start.offset};u.push(m),o.push({newLink:m.newContent,old:f})}return u}),o}convertLink({forceRelativePath:t,link:n,note:i,oldNotePath:o,pathChangeMap:s}){let{linkPath:l,subpath:u}=Kt(n.link),f=Yt(this.plugin.app,n,o)?.path??we(se(o),l),m=s?s.get(f):Yt(this.plugin.app,n,i.path)?.path??we(se(i.path),l);if(!m)return n.original;let h=ce(this.plugin.app,m)??ce(this.plugin.app,f);if(!h)return n.original;let p=n.displayText&&we(i.parent?.path??"",n.displayText)===f?void 0:n.displayText;return no({alias:p,app:this.plugin.app,originalLink:n.original,shouldForceRelativePath:t,sourcePathOrFile:i.path,subpath:u,targetPathOrFile:h})}async isValidLink(t,n){let{linkPath:i,subpath:o}=Kt(t.link),s;i?i.startsWith("/")?s=(0,Df.normalizePath)(i):s=we(se(n),i):s=n;let l=ce(this.plugin.app,s);if(!l)return!1;if(!o)return!0;let u=l.extension.toLocaleLowerCase();if(u==="pdf")return o.startsWith("#page=");if(u!==ui)return!1;let f=await mt(this.plugin.app,l);if(!f)return!1;let m="#^";if(o.startsWith(m))return Object.keys(f.blocks??{}).includes(Dt(o,m));let h="#";return(f.headings??[]).map(p=>p.heading.replaceAll(h," ")).includes(Dt(o,h))}async updateLinks(t,n,i){await Mr(this.plugin.app,t,async()=>{let o=await mt(this.plugin.app,t);return o?vt(o).map(l=>Xi(l,this.convertLink({link:l,note:t,oldNotePath:n,pathChangeMap:i}))):[]})}};var Nr=class{constructor(t,n){this.plugin=t;this.lh=n;}async collectAttachmentsForCachedNote(t,n,i){if(this.plugin.settings.isPathIgnored(t))return{movedAttachments:[]};let o={movedAttachments:[]},s=await mt(this.plugin.app,t);if(!s)return o;for(let l of vt(s)){let{linkPath:u}=Kt(l.link);if(!u)continue;let f=this.lh.getFullPathForLink(u,t);if(o.movedAttachments.findIndex(w=>w.oldPath===f)!==-1)continue;let m=Yt(this.plugin.app,l,t);if(!m){let w=ro(l.original)?"embed":"link";console.warn(`${t} has bad ${w} (file does not exist): ${u}`);continue}if(!this.isAttachment(m))continue;let h=await Ss(this.plugin.app,m.path,t);if(se(h)===se(m.path))continue;let p=await this.moveAttachment(m,h,[t],n,i);o.movedAttachments=o.movedAttachments.concat(p.movedAttachments)}return o}async deleteEmptyFolders(t){if(this.plugin.settings.isPathIgnored(t))return;t=Dt(t,"./");let n=await Jn(this.plugin.app,t);for(let i of n.folders)await this.deleteEmptyFolders(i);if(n=await Jn(this.plugin.app,t),n.files.length===0&&n.folders.length===0&&(this.plugin.consoleDebug(`delete empty folder:
|
|
${t}`),await this.plugin.app.vault.exists(t)))try{await this.plugin.app.vault.adapter.rmdir(t,!1)}catch(i){if(await this.plugin.app.vault.adapter.exists(t))throw i}}async createFolderForAttachmentFromPath(t){await Zn(this.plugin.app,se(t))}async deleteFile(t,n){if(await this.plugin.app.fileManager.trashFile(t),n){let i=t.parent;for(;i&&i.children.length===0;)await this.plugin.app.fileManager.trashFile(i),i=i.parent}}isAttachment(t){return!Rt(this.plugin.app,t)}async moveAttachment(t,n,i,o,s){let l=t.path,u={movedAttachments:[]};if(this.plugin.settings.isPathIgnored(l)||!this.isAttachment(t))return u;if(l===n)return console.warn("Can't move file. Source and destination path the same."),u;await this.createFolderForAttachmentFromPath(n);let f=await this.lh.getCachedNotesThatHaveLinkToFile(l);for(let w of i)f.remove(w);if(l!==t.path)return console.warn("File was moved already"),await this.moveAttachment(t,n,i,o,s);let m=t.parent,h=f.length===0,p=ce(this.plugin.app,n);return p&&(o?(this.plugin.consoleDebug(`delete: ${n}`),await this.deleteFile(p,s)):n=Qi(this.plugin.app,n)),this.plugin.consoleDebug(`${h?"move":"copy"}
|
|
from: ${l}
|
|
to: ${n}`),u.movedAttachments.push({newPath:n,oldPath:l}),h?await Ji(this.plugin.app,t,n):await sf(this.plugin.app,t,n),this.plugin.settings.deleteEmptyFolders&&await oo(this.plugin.app,m),u}};var Oo=class extends bi{deletedNoteCache=new Map;fh;lh;async saveSettings(t){await super.saveSettings(t),this.lh=new Rr(this),this.fh=new Nr(this,this.lh)}createPluginSettings(t){return new mo(t)}createPluginSettingsTab(){return new Lo(this)}async onLayoutReady(){await this.showBackupWarning()}onloadComplete(){this.registerEvent(this.app.metadataCache.on("deleted",(t,n)=>{n&&this.handleDeletedMetadata(t,n)})),yf(this,()=>({isPathIgnored:n=>this.settings.isPathIgnored(n),shouldDeleteConflictingAttachments:this.settings.deleteExistFilesWhenMoveNote,shouldDeleteEmptyFolders:this.settings.deleteEmptyFolders,shouldHandleDeletions:this.settings.deleteAttachmentsWithNote,shouldHandleRenames:this.settings.updateLinks,shouldRenameAttachmentFolder:this.settings.moveAttachmentsWithNote,shouldUpdateFilenameAliases:this.settings.changeNoteBacklinksAlt})),this.addCommand({callback:()=>this.collectAllAttachments(),id:"collect-all-attachments",name:"Collect All Attachments"}),this.addCommand({checkCallback:t=>this.collectAttachmentsCurrentFolder(t),id:"collect-attachments-current-folder",name:"Collect Attachments in Current Folder"}),this.addCommand({checkCallback:this.collectAttachmentsCurrentNote.bind(this),id:"collect-attachments-current-note",name:"Collect Attachments in Current Note"}),this.addCommand({callback:()=>this.deleteEmptyFolders(),id:"delete-empty-folders",name:"Delete Empty Folders"}),this.addCommand({callback:()=>this.convertAllLinkPathsToRelative(),id:"convert-all-link-paths-to-relative",name:"Convert All Link Paths to Relative"}),this.addCommand({checkCallback:this.convertAllLinkPathsToRelativeCurrentNote.bind(this),id:"convert-all-link-paths-to-relative-current-note",name:"Convert All Link Paths to Relative in Current Note"}),this.addCommand({callback:()=>this.convertAllEmbedsPathsToRelative(),id:"convert-all-embed-paths-to-relative",name:"Convert All Embed Paths to Relative"}),this.addCommand({checkCallback:this.convertAllEmbedsPathsToRelativeCurrentNote.bind(this),id:"convert-all-embed-paths-to-relative-current-note",name:"Convert All Embed Paths to Relative in Current Note"}),this.addCommand({callback:()=>this.replaceAllWikilinksWithMarkdownLinks(),id:"replace-all-wikilinks-with-markdown-links",name:"Replace All Wiki Links with Markdown Links"}),this.addCommand({checkCallback:this.replaceAllWikilinksWithMarkdownLinksCurrentNote.bind(this),id:"replace-all-wikilinks-with-markdown-links-current-note",name:"Replace All Wiki Links with Markdown Links in Current Note"}),this.addCommand({callback:()=>this.replaceAllWikiEmbedsWithMarkdownEmbeds(),id:"replace-all-wiki-embeds-with-markdown-embeds",name:"Replace All Wiki Embeds with Markdown Embeds"}),this.addCommand({checkCallback:this.replaceAllWikiEmbedsWithMarkdownEmbedsCurrentNote.bind(this),id:"replace-all-wiki-embeds-with-markdown-embeds-current-note",name:"Replace All Wiki Embeds with Markdown Embeds in Current Note"}),this.addCommand({callback:()=>this.reorganizeVault(),id:"reorganize-vault",name:"Reorganize Vault"}),this.addCommand({callback:()=>this.checkConsistency(),id:"check-consistency",name:"Check Vault consistency"}),this.registerEvent(this.app.metadataCache.on("changed",t=>{it(this.app,()=>this.handleMetadataCacheChanged(t))})),this.registerEvent(this.app.workspace.on("file-menu",(t,n)=>{this.handleFileMenu(t,n)})),this.lh=new Rr(this),this.fh=new Nr(this,this.lh)}async checkConsistency(){await this.saveAllOpenNotes();let t=new vn("Bad links"),n=new vn("Bad embeds"),i=new vn("Wiki links"),o=new vn("Wiki embeds");await dn({abortSignal:this.abortSignal,buildNoticeMessage:(m,h)=>`Checking note ${h} - ${m.path}`,items:Qn(this.app),processItem:async m=>{await this.lh.checkConsistency(m,t,n,i,o)},shouldContinueOnError:!0});let s=this.settings.consistencyReportFile,l=t.toString(this.app,s)+n.toString(this.app,s)+i.toString(this.app,s)+o.toString(this.app,s);await Zn(this.app,se(s));let u=await Bl(this.app,s);await this.app.vault.modify(u,l);let f=!1;this.app.workspace.iterateAllLeaves(m=>{m.getDisplayText()!==""&&s.startsWith(m.getDisplayText())&&(f=!0)}),f||await this.app.workspace.openLinkText(s,"/",!1)}async collectAllAttachments(){await this.collectAttachmentsInFolder("/")}async collectAttachments(t,n=!0){if(this.settings.isPathIgnored(t.path)){new ye.Notice("Note path is ignored");return}await this.saveAllOpenNotes();let i=await this.fh.collectAttachmentsForCachedNote(t.path,this.settings.deleteExistFilesWhenMoveNote,this.settings.deleteEmptyFolders);i.movedAttachments.length>0&&await this.lh.updateChangedPathsInNote(t.path,i.movedAttachments),i.movedAttachments.length===0?n&&new ye.Notice("No files found that need to be moved"):new ye.Notice(`Moved ${i.movedAttachments.length.toString()} attachment${i.movedAttachments.length>1?"s":""}`)}collectAttachmentsCurrentFolder(t){let n=this.app.workspace.getActiveFile();return!n||!ke(this.app,n)?!1:(t||it(this.app,()=>this.collectAttachmentsInFolder(n.parent?.path??"/")),!0)}collectAttachmentsCurrentNote(t){let n=this.app.workspace.getActiveFile();return!n||!ke(this.app,n)?!1:(t||it(this.app,()=>this.collectAttachments(n)),!0)}async collectAttachmentsInFolder(t){let n=0,i=0;await this.saveAllOpenNotes(),await dn({abortSignal:this.abortSignal,buildNoticeMessage:(o,s)=>`Collecting attachments ${s} - ${o.path}`,items:zl(this.app,t,!0),processItem:async o=>{if(this.settings.isPathIgnored(o.path))return;let s=await this.fh.collectAttachmentsForCachedNote(o.path,this.settings.deleteExistFilesWhenMoveNote,this.settings.deleteEmptyFolders);s.movedAttachments.length>0&&(await this.lh.updateChangedPathsInNote(o.path,s.movedAttachments),n+=s.movedAttachments.length,i++)},shouldContinueOnError:!0}),n===0?new ye.Notice("No files found that need to be moved"):new ye.Notice(`Moved ${n.toString()} attachment${n>1?"s":""} from ${i.toString()} note${i>1?"s":""}`)}async convertAllEmbedsPathsToRelative(){await this.saveAllOpenNotes();let t=0,n=0;await dn({abortSignal:this.abortSignal,buildNoticeMessage:(i,o)=>`Converting embed paths to relative ${o} - ${i.path}`,items:Qn(this.app),processItem:async i=>{if(this.settings.isPathIgnored(i.path))return;let o=await this.lh.convertAllNoteEmbedsPathsToRelative(i.path);o.length>0&&(t+=o.length,n++)},shouldContinueOnError:!0}),t===0?new ye.Notice("No embeds found that need to be converted"):new ye.Notice(`Converted ${t.toString()} embed${t>1?"s":""} from ${n.toString()} note${n>1?"s":""}`)}convertAllEmbedsPathsToRelativeCurrentNote(t){let n=this.app.workspace.getActiveFile();return!n||!ke(this.app,n)?!1:(t||it(this.app,fr(()=>this.lh.convertAllNoteEmbedsPathsToRelative(n.path))),!0)}async convertAllLinkPathsToRelative(){await this.saveAllOpenNotes();let t=0,n=0;await dn({abortSignal:this.abortSignal,buildNoticeMessage:(i,o)=>`Converting link paths to relative ${o} - ${i.path}`,items:Qn(this.app),processItem:async i=>{if(this.settings.isPathIgnored(i.path))return;let o=await this.lh.convertAllNoteLinksPathsToRelative(i.path);o.length>0&&(t+=o.length,n++)},shouldContinueOnError:!0}),t===0?new ye.Notice("No links found that need to be converted"):new ye.Notice(`Converted ${t.toString()} link${t>1?"s":""} from ${n.toString()} note${n>1?"s":""}`)}convertAllLinkPathsToRelativeCurrentNote(t){let n=this.app.workspace.getActiveFile();return!n||!ke(this.app,n)?!1:(t||it(this.app,fr(()=>this.lh.convertAllNoteLinksPathsToRelative(n.path))),!0)}async deleteEmptyFolders(){await this.fh.deleteEmptyFolders("/")}handleDeletedMetadata(t,n){!this.settings.deleteAttachmentsWithNote||this.settings.isPathIgnored(t.path)||!ke(this.app,t)||this.deletedNoteCache.set(t.path,n)}handleFileMenu(t,n){wr(n)&&t.addItem(i=>{i.setTitle("Collect attachments in folder").setIcon("download").onClick(()=>this.collectAttachmentsInFolder(n.path))})}async handleMetadataCacheChanged(t){if(!this.settings.autoCollectAttachments)return;let n=document.querySelector(".suggestion-container");n&&n.style.display!=="none"||await this.collectAttachments(t,!1)}async reorganizeVault(){await this.saveAllOpenNotes(),await this.replaceAllWikilinksWithMarkdownLinks(),await this.replaceAllWikiEmbedsWithMarkdownEmbeds(),await this.convertAllEmbedsPathsToRelative(),await this.convertAllLinkPathsToRelative(),await this.collectAllAttachments(),await this.deleteEmptyFolders(),new ye.Notice("Reorganization of the vault completed")}async replaceAllWikiEmbedsWithMarkdownEmbeds(){await this.saveAllOpenNotes();let t=0,n=0;await dn({abortSignal:this.abortSignal,buildNoticeMessage:(i,o)=>`Replacing wiki embeds with markdown embeds ${o} - ${i.path}`,items:Qn(this.app),processItem:async i=>{if(this.settings.isPathIgnored(i.path))return;let o=await this.lh.replaceAllNoteWikilinksWithMarkdownLinks(i.path,!0);t+=o,n++},shouldContinueOnError:!0}),t===0?new ye.Notice("No wiki embeds found that need to be replaced"):new ye.Notice(`Replaced ${t.toString()} wiki embed${t>1?"s":""} from ${n.toString()} note${n>1?"s":""}`)}replaceAllWikiEmbedsWithMarkdownEmbedsCurrentNote(t){let n=this.app.workspace.getActiveFile();return!n||!ke(this.app,n)?!1:(t||it(this.app,fr(()=>this.lh.replaceAllNoteWikilinksWithMarkdownLinks(n.path,!0))),!0)}async replaceAllWikilinksWithMarkdownLinks(){await this.saveAllOpenNotes();let t=0,n=0;await dn({abortSignal:this.abortSignal,buildNoticeMessage:(i,o)=>`Replacing wikilinks with markdown links ${o} - ${i.path}`,items:Qn(this.app),processItem:async i=>{if(this.settings.isPathIgnored(i.path))return;let o=await this.lh.replaceAllNoteWikilinksWithMarkdownLinks(i.path,!1);t+=o,n++},shouldContinueOnError:!0}),t===0?new ye.Notice("No wiki links found that need to be replaced"):new ye.Notice(`Replaced ${t.toString()} wikilink${t>1?"s":""} from ${n.toString()} note${n>1?"s":""}`)}replaceAllWikilinksWithMarkdownLinksCurrentNote(t){let n=this.app.workspace.getActiveFile();return!n||!ke(this.app,n)?!1:(t||it(this.app,fr(()=>this.lh.replaceAllNoteWikilinksWithMarkdownLinks(n.path,!1))),!0)}async saveAllOpenNotes(){for(let t of this.app.workspace.getLeavesOfType("markdown"))t.view instanceof ye.MarkdownView&&await t.view.save()}async showBackupWarning(){if(!this.settings.showBackupWarning)return;await yi({app:this.app,message:createFragment(n=>{n.createDiv({cls:"community-modal-readme"},i=>{i.appendText("Using 'Consistent Attachments and Links' plugin without proper configuration might lead to inconvenient attachment rearrangements or even data loss in your vault."),i.createEl("br"),i.appendText("It is "),i.createEl("strong",{text:"STRONGLY"}),i.appendText(" recommended to backup your vault before using the plugin."),i.createEl("br"),this.settings.hadDangerousSettingsReverted&&(i.appendText("Some of your plugin settings has been changed to their safe values."),i.createEl("br")),i.createEl("a",{href:"https://github.com/dy-sh/obsidian-consistent-attachments-and-links?tab=readme-ov-file",text:"Read more"}),i.appendText(" about how to use the plugin."),i.createEl("br"),i.appendText("This warning will not appear again.")})}),title:createFragment(n=>{(0,ye.setIcon)(n.createSpan(),"triangle-alert"),n.appendText(" Consistent Attachments and Links")})});let t=this.settingsClone;t.showBackupWarning=!1,await this.saveSettings(t)}};var ny=Oo;
|
|
/*! Bundled license information:
|
|
|
|
moment/moment.js:
|
|
(*! moment.js *)
|
|
(*! version : 2.30.1 *)
|
|
(*! authors : Tim Wood, Iskren Chernev, Moment.js contributors *)
|
|
(*! license : MIT *)
|
|
(*! momentjs.com *)
|
|
*/
|
|
|
|
/* nosourcemap */ |