/* 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 Th=Object.create;var hr=Object.defineProperty;var Mh=Object.getOwnPropertyDescriptor;var Ph=Object.getOwnPropertyNames;var Dh=Object.getPrototypeOf,Fh=Object.prototype.hasOwnProperty;var qe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ks=(e,t)=>{for(var n in t)hr(e,n,{get:t[n],enumerable:!0})},Zs=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ph(t))!Fh.call(e,s)&&s!==n&&hr(e,s,{get:()=>t[s],enumerable:!(i=Mh(t,s))||i.enumerable});return e};var Nt=(e,t,n)=>(n=e!=null?Th(Dh(e)):{},Zs(t||!e||!e.__esModule?hr(n,"default",{value:e,enumerable:!0}):n,e)),Lh=e=>Zs(hr({},"__esModule",{value:!0}),e);var Qs=qe((k0,Js)=>{var nn=1e3,rn=nn*60,on=rn*60,Yt=on*24,Ih=Yt*7,Oh=Yt*365.25;Js.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Rh(e);if(n==="number"&&isFinite(e))return t.long?Bh(e):Nh(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Rh(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*Oh;case"weeks":case"week":case"w":return n*Ih;case"days":case"day":case"d":return n*Yt;case"hours":case"hour":case"hrs":case"hr":case"h":return n*on;case"minutes":case"minute":case"mins":case"min":case"m":return n*rn;case"seconds":case"second":case"secs":case"sec":case"s":return n*nn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Nh(e){var t=Math.abs(e);return t>=Yt?Math.round(e/Yt)+"d":t>=on?Math.round(e/on)+"h":t>=rn?Math.round(e/rn)+"m":t>=nn?Math.round(e/nn)+"s":e+"ms"}function Bh(e){var t=Math.abs(e);return t>=Yt?pr(e,t,Yt,"day"):t>=on?pr(e,t,on,"hour"):t>=rn?pr(e,t,rn,"minute"):t>=nn?pr(e,t,nn,"second"):e+" ms"}function pr(e,t,n,i){var s=t>=n*1.5;return Math.round(e/n)+" "+i+(s?"s":"")}});var qi=qe((w0,Xs)=>{function Yh(e){n.debug=n,n.default=n,n.coerce=d,n.disable=u,n.enable=s,n.enabled=c,n.humanize=Qs(),n.destroy=p,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let y=0;for(let g=0;g{if(S==="%%")return"%";B++;let j=n.formatters[Z];if(typeof j=="function"){let $=T[B];S=j.call(v,$),T.splice(B,1),B--}return S}),n.formatArgs.call(v,T),(v.log||n.log).apply(v,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:()=>g!==null?g:(k!==n.namespaces&&(k=n.namespaces,A=n.enabled(h)),A),set:T=>{g=T}}),typeof n.init=="function"&&n.init(F),F}function i(h,y){let g=n(this.namespace+(typeof y>"u"?":":y)+h);return g.log=this.log,g}function s(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let y=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let g of y)g[0]==="-"?n.skips.push(g.slice(1)):n.names.push(g)}function a(h,y){let g=0,k=0,A=-1,F=0;for(;g"-"+y)].join(",");return n.enable(""),h}function c(h){for(let y of n.skips)if(a(h,y))return!1;for(let y of n.names)if(a(h,y))return!0;return!1}function d(h){return h instanceof Error?h.stack||h.message:h}function p(){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}Xs.exports=Yh});var ea=qe((Fe,mr)=>{Fe.formatArgs=zh;Fe.save=Vh;Fe.load=Uh;Fe.useColors=Wh;Fe.storage=Hh();Fe.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`."))}})();Fe.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 Wh(){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 zh(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+mr.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,s=>{s!=="%%"&&(n++,s==="%c"&&(i=n))}),e.splice(i,0,t)}Fe.log=console.debug||console.log||(()=>{});function Vh(e){try{e?Fe.storage.setItem("debug",e):Fe.storage.removeItem("debug")}catch{}}function Uh(){let e;try{e=Fe.storage.getItem("debug")||Fe.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Hh(){try{return localStorage}catch{}}mr.exports=qi()(Fe);var{formatters:jh}=mr.exports;jh.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var na=qe((b0,ta)=>{"use strict";ta.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",i=t.indexOf(n+e),s=t.indexOf("--");return i!==-1&&(s===-1||i{"use strict";var $h=require("os"),ra=require("tty"),Ye=na(),{env:he}=process,vt;Ye("no-color")||Ye("no-colors")||Ye("color=false")||Ye("color=never")?vt=0:(Ye("color")||Ye("colors")||Ye("color=true")||Ye("color=always"))&&(vt=1);"FORCE_COLOR"in he&&(he.FORCE_COLOR==="true"?vt=1:he.FORCE_COLOR==="false"?vt=0:vt=he.FORCE_COLOR.length===0?1:Math.min(parseInt(he.FORCE_COLOR,10),3));function Ki(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Zi(e,t){if(vt===0)return 0;if(Ye("color=16m")||Ye("color=full")||Ye("color=truecolor"))return 3;if(Ye("color=256"))return 2;if(e&&!t&&vt===void 0)return 0;let n=vt||0;if(he.TERM==="dumb")return n;if(process.platform==="win32"){let i=$h.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in he)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(i=>i in he)||he.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in he)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(he.TEAMCITY_VERSION)?1:0;if(he.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in he){let i=parseInt((he.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(he.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(he.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(he.TERM)||"COLORTERM"in he?1:n}function Gh(e){let t=Zi(e,e&&e.isTTY);return Ki(t)}ia.exports={supportsColor:Gh,stdout:Ki(Zi(!0,ra.isatty(1))),stderr:Ki(Zi(!0,ra.isatty(2)))}});var aa=qe((pe,yr)=>{var qh=require("tty"),gr=require("util");pe.init=tp;pe.log=Qh;pe.formatArgs=Zh;pe.save=Xh;pe.load=ep;pe.useColors=Kh;pe.destroy=gr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");pe.colors=[6,2,3,4,5,1];try{let e=oa();e&&(e.stderr||e).level>=2&&(pe.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{}pe.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(s,a)=>a.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 Kh(){return"colors"in pe.inspectOpts?!!pe.inspectOpts.colors:qh.isatty(process.stderr.fd)}function Zh(e){let{namespace:t,useColors:n}=this;if(n){let i=this.color,s="\x1B[3"+(i<8?i:"8;5;"+i),a=` ${s};1m${t} \x1B[0m`;e[0]=a+e[0].split(` `).join(` `+a),e.push(s+"m+"+yr.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Jh()+t+" "+e[0]}function Jh(){return pe.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Qh(...e){return process.stderr.write(gr.formatWithOptions(pe.inspectOpts,...e)+` `)}function Xh(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function ep(){return process.env.DEBUG}function tp(e){e.inspectOpts={};let t=Object.keys(pe.inspectOpts);for(let n=0;nt.trim()).join(" ")};sa.O=function(e){return this.inspectOpts.colors=this.useColors,gr.inspect(e,this.inspectOpts)}});var la=qe((v0,Ji)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ji.exports=ea():Ji.exports=aa()});var Ul=qe((Hx,Vl)=>{"use strict";var jr=Object.prototype.hasOwnProperty,zl=Object.prototype.toString,Ol=Object.defineProperty,Rl=Object.getOwnPropertyDescriptor,Nl=function(t){return typeof Array.isArray=="function"?Array.isArray(t):zl.call(t)==="[object Array]"},Bl=function(t){if(!t||zl.call(t)!=="[object Object]")return!1;var n=jr.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&jr.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!i)return!1;var s;for(s in t);return typeof s>"u"||jr.call(t,s)},Yl=function(t,n){Ol&&n.name==="__proto__"?Ol(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Wl=function(t,n){if(n==="__proto__")if(jr.call(t,n)){if(Rl)return Rl(t,n).value}else return;return t[n]};Vl.exports=function e(){var t,n,i,s,a,u,c=arguments[0],d=1,p=arguments.length,h=!1;for(typeof c=="boolean"&&(h=c,c=arguments[1]||{},d=2),(c==null||typeof c!="object"&&typeof c!="function")&&(c={});d{"use strict";function nt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function ru(e,t){for(var n="",i=0,s=-1,a=0,u,c=0;c<=e.length;++c){if(c2){var d=n.lastIndexOf("/");if(d!==n.length-1){d===-1?(n="",i=0):(n=n.slice(0,d),i=n.length-1-n.lastIndexOf("/")),s=c,a=0;continue}}else if(n.length===2||n.length===1){n="",i=0,s=c,a=0;continue}}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(s+1,c):n=e.slice(s+1,c),i=c-s-1;s=c,a=0}else u===46&&a!==-1?++a:a=-1}return n}function Fg(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 kn={resolve:function(){for(var t="",n=!1,i,s=arguments.length-1;s>=-1&&!n;s--){var a;s>=0?a=arguments[s]:(i===void 0&&(i=process.cwd()),a=i),nt(a),a.length!==0&&(t=a+"/"+t,n=a.charCodeAt(0)===47)}return t=ru(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(nt(t),t.length===0)return".";var n=t.charCodeAt(0)===47,i=t.charCodeAt(t.length-1)===47;return t=ru(t,!n),t.length===0&&!n&&(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return nt(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,n=0;n0&&(t===void 0?t=i:t+="/"+i)}return t===void 0?".":kn.normalize(t)},relative:function(t,n){if(nt(t),nt(n),t===n||(t=kn.resolve(t),n=kn.resolve(n),t===n))return"";for(var i=1;ip){if(n.charCodeAt(u+y)===47)return n.slice(u+y+1);if(y===0)return n.slice(u+y)}else a>p&&(t.charCodeAt(i+y)===47?h=y:y===0&&(h=0));break}var g=t.charCodeAt(i+y),k=n.charCodeAt(u+y);if(g!==k)break;g===47&&(h=y)}var A="";for(y=i+h+1;y<=s;++y)(y===s||t.charCodeAt(y)===47)&&(A.length===0?A+="..":A+="/..");return A.length>0?A+n.slice(u+h):(u+=h,n.charCodeAt(u)===47&&++u,n.slice(u))},_makeLong:function(t){return t},dirname:function(t){if(nt(t),t.length===0)return".";for(var n=t.charCodeAt(0),i=n===47,s=-1,a=!0,u=t.length-1;u>=1;--u)if(n=t.charCodeAt(u),n===47){if(!a){s=u;break}}else a=!1;return s===-1?i?"/":".":i&&s===1?"//":t.slice(0,s)},basename:function(t,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');nt(t);var i=0,s=-1,a=!0,u;if(n!==void 0&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var c=n.length-1,d=-1;for(u=t.length-1;u>=0;--u){var p=t.charCodeAt(u);if(p===47){if(!a){i=u+1;break}}else d===-1&&(a=!1,d=u+1),c>=0&&(p===n.charCodeAt(c)?--c===-1&&(s=u):(c=-1,s=d))}return i===s?s=d:s===-1&&(s=t.length),t.slice(i,s)}else{for(u=t.length-1;u>=0;--u)if(t.charCodeAt(u)===47){if(!a){i=u+1;break}}else s===-1&&(a=!1,s=u+1);return s===-1?"":t.slice(i,s)}},extname:function(t){nt(t);for(var n=-1,i=0,s=-1,a=!0,u=0,c=t.length-1;c>=0;--c){var d=t.charCodeAt(c);if(d===47){if(!a){i=c+1;break}continue}s===-1&&(a=!1,s=c+1),d===46?n===-1?n=c:u!==1&&(u=1):n!==-1&&(u=-1)}return n===-1||s===-1||u===0||u===1&&n===s-1&&n===i+1?"":t.slice(n,s)},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 Fg("/",t)},parse:function(t){nt(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return n;var i=t.charCodeAt(0),s=i===47,a;s?(n.root="/",a=1):a=0;for(var u=-1,c=0,d=-1,p=!0,h=t.length-1,y=0;h>=a;--h){if(i=t.charCodeAt(h),i===47){if(!p){c=h+1;break}continue}d===-1&&(p=!1,d=h+1),i===46?u===-1?u=h:y!==1&&(y=1):u!==-1&&(y=-1)}return u===-1||d===-1||y===0||y===1&&u===d-1&&u===c+1?d!==-1&&(c===0&&s?n.base=n.name=t.slice(1,d):n.base=n.name=t.slice(c,d)):(c===0&&s?(n.name=t.slice(1,u),n.base=t.slice(1,d)):(n.name=t.slice(c,u),n.base=t.slice(c,d)),n.ext=t.slice(u,d)),c>0?n.dir=t.slice(0,c-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};kn.posix=kn;iu.exports=kn});var Su=qe((ni,Au)=>{(function(e,t){typeof ni=="object"&&typeof Au<"u"?t(ni):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.compareVersions={}))})(ni,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 v=T.match(t);if(!v)throw new Error(`Invalid argument not valid semver ('${T}' received)`);return v.shift(),v},i=T=>T==="*"||T==="x"||T==="X",s=T=>{let v=parseInt(T,10);return isNaN(v)?T:v},a=(T,v)=>typeof T!=typeof v?[String(T),String(v)]:[T,v],u=(T,v)=>{if(i(T)||i(v))return 0;let[_,M]=a(s(T),s(v));return _>M?1:_{for(let _=0;_{let _=n(T),M=n(v),B=_.pop(),Y=M.pop(),S=c(_,M);return S!==0?S:B&&Y?c(B.split("."),Y.split(".")):B||Y?B?-1:1:0},p=(T,v,_)=>{g(_);let M=d(T,v);return h[_].includes(M)},h={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},y=Object.keys(h),g=T=>{if(typeof T!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof T}`);if(y.indexOf(T)===-1)throw new Error(`Invalid operator, expected one of ${y.join("|")}`)},k=(T,v)=>{if(v=v.replace(/([><=]+)\s+/g,"$1"),v.includes("||"))return v.split("||").some(X=>k(T,X));if(v.includes(" - ")){let[X,ae]=v.split(" - ",2);return k(T,`>=${X} <=${ae}`)}else if(v.includes(" "))return v.trim().replace(/\s{2,}/g," ").split(" ").every(X=>k(T,X));let _=v.match(/^([<>=~^]+)/),M=_?_[1]:"=";if(M!=="^"&&M!=="~")return p(T,v,M);let[B,Y,S,,Z]=n(T),[j,$,te,,ie]=n(v),Q=[B,Y,S],N=[j,$??"x",te??"x"];if(ie&&(!Z||c(Q,N)!==0||c(Z.split("."),ie.split("."))===-1))return!1;let V=N.findIndex(X=>X!=="0")+1,W=M==="~"?2:V>1?V:1;return!(c(Q.slice(0,W),N.slice(0,W))!==0||c(Q.slice(W),N.slice(W))===-1)},A=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=p,e.compareVersions=d,e.satisfies=k,e.validate=A,e.validateStrict=F})});var Bu=qe((as,bn)=>{(function(e,t){typeof as=="object"&&typeof bn<"u"?bn.exports=t():typeof define=="function"&&define.amd?define(t):e.moment=t()})(as,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 s(r){return r!=null&&Object.prototype.toString.call(r)==="[object Object]"}function a(r,o){return Object.prototype.hasOwnProperty.call(r,o)}function u(r){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(r).length===0;var o;for(o in r)if(a(r,o))return!1;return!0}function c(r){return r===void 0}function d(r){return typeof r=="number"||Object.prototype.toString.call(r)==="[object Number]"}function p(r){return r instanceof Date||Object.prototype.toString.call(r)==="[object Date]"}function h(r,o){var l=[],f,m=r.length;for(f=0;f>>0,f;for(f=0;f0)for(l=0;l=0;return(b?l?"+":"":"-")+Math.pow(10,Math.max(0,m)).toString().substr(1)+f}var Pe=/(\[[^\[]*\])|(\\)?([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,x=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ye={},ke={};function w(r,o,l,f){var m=f;typeof f=="string"&&(m=function(){return this[f]()}),r&&(ke[r]=m),o&&(ke[o[0]]=function(){return le(m.apply(this,arguments),o[1],o[2])}),l&&(ke[l]=function(){return this.localeData().ordinal(m.apply(this,arguments),r)})}function Ce(r){return r.match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"")}function it(r){var o=r.match(Pe),l,f;for(l=0,f=o.length;l=0&&x.test(r);)r=r.replace(x,f),x.lastIndex=0,l-=1;return r}var fe={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 Lt(r){var o=this._longDateFormat[r],l=this._longDateFormat[r.toUpperCase()];return o||!l?o:(this._longDateFormat[r]=l.match(Pe).map(function(f){return f==="MMMM"||f==="MM"||f==="DD"||f==="dddd"?f.slice(1):f}).join(""),this._longDateFormat[r])}var Ve="Invalid date";function ot(){return this._invalidDate}var kt="%d",xn=/\d{1,2}/;function Si(r){return this._ordinal.replace("%d",r)}var qn={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 Kn(r,o,l,f){var m=this._relativeTime[l];return ie(m)?m(r,o,l,f):m.replace(/%d/i,r)}function Zn(r,o){var l=this._relativeTime[r>0?"future":"past"];return ie(l)?l(o):l.replace(/%s/i,o)}var Jn={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 Ae(r){return typeof r=="string"?Jn[r]||Jn[r.toLowerCase()]:void 0}function qt(r){var o={},l,f;for(f in r)a(r,f)&&(l=Ae(f),l&&(o[l]=r[f]));return o}var Ei={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 _i(r){var o=[],l;for(l in r)a(r,l)&&o.push({unit:l,priority:Ei[l]});return o.sort(function(f,m){return f.priority-m.priority}),o}var Qn=/\d/,Se=/\d\d/,Xn=/\d{3}/,E=/\d{4}/,D=/[+-]?\d{6}/,L=/\d\d?/,G=/\d\d\d\d?/,ne=/\d\d\d\d\d\d?/,we=/\d{1,3}/,Ue=/\d{1,4}/,De=/[+-]?\d{1,6}/,Ne=/\d+/,Je=/[+-]?\d+/,Ee=/Z|[+-]\d\d:?\d\d/gi,He=/Z|[+-]\d\d(?::?\d\d)?/gi,je=/[+-]?\d+(\.\d{1,3})?/,vn=/[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,Kt=/^[1-9]\d?/,Ti=/^([1-9]\d|\d)/,er;er={};function O(r,o,l){er[r]=ie(o)?o:function(f,m){return f&&l?l:o}}function qu(r,o){return a(er,r)?er[r](o._strict,o._locale):new RegExp(Ku(r))}function Ku(r){return st(r.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(o,l,f,m,b){return l||f||m||b}))}function st(r){return r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Be(r){return r<0?Math.ceil(r)||0:Math.floor(r)}function q(r){var o=+r,l=0;return o!==0&&isFinite(o)&&(l=Be(o)),l}var Mi={};function re(r,o){var l,f=o,m;for(typeof r=="string"&&(r=[r]),d(o)&&(f=function(b,C){C[o]=q(b)}),m=r.length,l=0;l68?1900:2e3)};var cs=Zt("FullYear",!0);function Xu(){return tr(this.year())}function Zt(r,o){return function(l){return l!=null?(fs(this,r,l),t.updateOffset(this,o),this):Sn(this,r)}}function Sn(r,o){if(!r.isValid())return NaN;var l=r._d,f=r._isUTC;switch(o){case"Milliseconds":return f?l.getUTCMilliseconds():l.getMilliseconds();case"Seconds":return f?l.getUTCSeconds():l.getSeconds();case"Minutes":return f?l.getUTCMinutes():l.getMinutes();case"Hours":return f?l.getUTCHours():l.getHours();case"Date":return f?l.getUTCDate():l.getDate();case"Day":return f?l.getUTCDay():l.getDay();case"Month":return f?l.getUTCMonth():l.getMonth();case"FullYear":return f?l.getUTCFullYear():l.getFullYear();default:return NaN}}function fs(r,o,l){var f,m,b,C,I;if(!(!r.isValid()||isNaN(l))){switch(f=r._d,m=r._isUTC,o){case"Milliseconds":return void(m?f.setUTCMilliseconds(l):f.setMilliseconds(l));case"Seconds":return void(m?f.setUTCSeconds(l):f.setSeconds(l));case"Minutes":return void(m?f.setUTCMinutes(l):f.setMinutes(l));case"Hours":return void(m?f.setUTCHours(l):f.setHours(l));case"Date":return void(m?f.setUTCDate(l):f.setDate(l));case"FullYear":break;default:return}b=l,C=r.month(),I=r.date(),I=I===29&&C===1&&!tr(b)?28:I,m?f.setUTCFullYear(b,C,I):f.setFullYear(b,C,I)}}function ec(r){return r=Ae(r),ie(this[r])?this[r]():this}function tc(r,o){if(typeof r=="object"){r=qt(r);var l=_i(r),f,m=l.length;for(f=0;f=0?(I=new Date(r+400,o,l,f,m,b,C),isFinite(I.getFullYear())&&I.setFullYear(r)):I=new Date(r,o,l,f,m,b,C),I}function En(r){var o,l;return r<100&&r>=0?(l=Array.prototype.slice.call(arguments),l[0]=r+400,o=new Date(Date.UTC.apply(null,l)),isFinite(o.getUTCFullYear())&&o.setUTCFullYear(r)):o=new Date(Date.UTC.apply(null,arguments)),o}function nr(r,o,l){var f=7+o-l,m=(7+En(r,0,f).getUTCDay()-o)%7;return-m+f-1}function ys(r,o,l,f,m){var b=(7+l-f)%7,C=nr(r,f,m),I=1+7*(o-1)+b+C,z,K;return I<=0?(z=r-1,K=An(z)+I):I>An(r)?(z=r+1,K=I-An(r)):(z=r,K=I),{year:z,dayOfYear:K}}function _n(r,o,l){var f=nr(r.year(),o,l),m=Math.floor((r.dayOfYear()-f-1)/7)+1,b,C;return m<1?(C=r.year()-1,b=m+ut(C,o,l)):m>ut(r.year(),o,l)?(b=m-ut(r.year(),o,l),C=r.year()+1):(C=r.year(),b=m),{week:b,year:C}}function ut(r,o,l){var f=nr(r,o,l),m=nr(r+1,o,l);return(An(r)-f+m)/7}w("w",["ww",2],"wo","week"),w("W",["WW",2],"Wo","isoWeek"),O("w",L,Kt),O("ww",L,Se),O("W",L,Kt),O("WW",L,Se),Cn(["w","ww","W","WW"],function(r,o,l,f){o[f.substr(0,1)]=q(r)});function pc(r){return _n(r,this._week.dow,this._week.doy).week}var mc={dow:0,doy:6};function gc(){return this._week.dow}function yc(){return this._week.doy}function kc(r){var o=this.localeData().week(this);return r==null?o:this.add((r-o)*7,"d")}function wc(r){var o=_n(this,1,4).week;return r==null?o:this.add((r-o)*7,"d")}w("d",0,"do","day"),w("dd",0,0,function(r){return this.localeData().weekdaysMin(this,r)}),w("ddd",0,0,function(r){return this.localeData().weekdaysShort(this,r)}),w("dddd",0,0,function(r){return this.localeData().weekdays(this,r)}),w("e",0,0,"weekday"),w("E",0,0,"isoWeekday"),O("d",L),O("e",L),O("E",L),O("dd",function(r,o){return o.weekdaysMinRegex(r)}),O("ddd",function(r,o){return o.weekdaysShortRegex(r)}),O("dddd",function(r,o){return o.weekdaysRegex(r)}),Cn(["dd","ddd","dddd"],function(r,o,l,f){var m=l._locale.weekdaysParse(r,f,l._strict);m!=null?o.d=m:A(l).invalidWeekday=r}),Cn(["d","e","E"],function(r,o,l,f){o[f]=q(r)});function bc(r,o){return typeof r!="string"?r:isNaN(r)?(r=o.weekdaysParse(r),typeof r=="number"?r:null):parseInt(r,10)}function xc(r,o){return typeof r=="string"?o.weekdaysParse(r)%7||7:isNaN(r)?null:r}function Di(r,o){return r.slice(o,7).concat(r.slice(0,o))}var vc="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ks="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Cc="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ac=vn,Sc=vn,Ec=vn;function _c(r,o){var l=i(this._weekdays)?this._weekdays:this._weekdays[r&&r!==!0&&this._weekdays.isFormat.test(o)?"format":"standalone"];return r===!0?Di(l,this._week.dow):r?l[r.day()]:l}function Tc(r){return r===!0?Di(this._weekdaysShort,this._week.dow):r?this._weekdaysShort[r.day()]:this._weekdaysShort}function Mc(r){return r===!0?Di(this._weekdaysMin,this._week.dow):r?this._weekdaysMin[r.day()]:this._weekdaysMin}function Pc(r,o,l){var f,m,b,C=r.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)b=g([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(b,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(b,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(b,"").toLocaleLowerCase();return l?o==="dddd"?(m=ue.call(this._weekdaysParse,C),m!==-1?m:null):o==="ddd"?(m=ue.call(this._shortWeekdaysParse,C),m!==-1?m:null):(m=ue.call(this._minWeekdaysParse,C),m!==-1?m:null):o==="dddd"?(m=ue.call(this._weekdaysParse,C),m!==-1||(m=ue.call(this._shortWeekdaysParse,C),m!==-1)?m:(m=ue.call(this._minWeekdaysParse,C),m!==-1?m:null)):o==="ddd"?(m=ue.call(this._shortWeekdaysParse,C),m!==-1||(m=ue.call(this._weekdaysParse,C),m!==-1)?m:(m=ue.call(this._minWeekdaysParse,C),m!==-1?m:null)):(m=ue.call(this._minWeekdaysParse,C),m!==-1||(m=ue.call(this._weekdaysParse,C),m!==-1)?m:(m=ue.call(this._shortWeekdaysParse,C),m!==-1?m:null))}function Dc(r,o,l){var f,m,b;if(this._weekdaysParseExact)return Pc.call(this,r,o,l);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),f=0;f<7;f++){if(m=g([2e3,1]).day(f),l&&!this._fullWeekdaysParse[f]&&(this._fullWeekdaysParse[f]=new RegExp("^"+this.weekdays(m,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[f]=new RegExp("^"+this.weekdaysShort(m,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[f]=new RegExp("^"+this.weekdaysMin(m,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[f]||(b="^"+this.weekdays(m,"")+"|^"+this.weekdaysShort(m,"")+"|^"+this.weekdaysMin(m,""),this._weekdaysParse[f]=new RegExp(b.replace(".",""),"i")),l&&o==="dddd"&&this._fullWeekdaysParse[f].test(r))return f;if(l&&o==="ddd"&&this._shortWeekdaysParse[f].test(r))return f;if(l&&o==="dd"&&this._minWeekdaysParse[f].test(r))return f;if(!l&&this._weekdaysParse[f].test(r))return f}}function Fc(r){if(!this.isValid())return r!=null?this:NaN;var o=Sn(this,"Day");return r!=null?(r=bc(r,this.localeData()),this.add(r-o,"d")):o}function Lc(r){if(!this.isValid())return r!=null?this:NaN;var o=(this.day()+7-this.localeData()._week.dow)%7;return r==null?o:this.add(r-o,"d")}function Ic(r){if(!this.isValid())return r!=null?this:NaN;if(r!=null){var o=xc(r,this.localeData());return this.day(this.day()%7?o:o-7)}else return this.day()||7}function Oc(r){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Fi.call(this),r?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Ac),this._weekdaysStrictRegex&&r?this._weekdaysStrictRegex:this._weekdaysRegex)}function Rc(r){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Fi.call(this),r?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Sc),this._weekdaysShortStrictRegex&&r?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Nc(r){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Fi.call(this),r?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ec),this._weekdaysMinStrictRegex&&r?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Fi(){function r(_e,pt){return pt.length-_e.length}var o=[],l=[],f=[],m=[],b,C,I,z,K;for(b=0;b<7;b++)C=g([2e3,1]).day(b),I=st(this.weekdaysMin(C,"")),z=st(this.weekdaysShort(C,"")),K=st(this.weekdays(C,"")),o.push(I),l.push(z),f.push(K),m.push(I),m.push(z),m.push(K);o.sort(r),l.sort(r),f.sort(r),m.sort(r),this._weekdaysRegex=new RegExp("^("+m.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Li(){return this.hours()%12||12}function Bc(){return this.hours()||24}w("H",["HH",2],0,"hour"),w("h",["hh",2],0,Li),w("k",["kk",2],0,Bc),w("hmm",0,0,function(){return""+Li.apply(this)+le(this.minutes(),2)}),w("hmmss",0,0,function(){return""+Li.apply(this)+le(this.minutes(),2)+le(this.seconds(),2)}),w("Hmm",0,0,function(){return""+this.hours()+le(this.minutes(),2)}),w("Hmmss",0,0,function(){return""+this.hours()+le(this.minutes(),2)+le(this.seconds(),2)});function ws(r,o){w(r,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),o)})}ws("a",!0),ws("A",!1);function bs(r,o){return o._meridiemParse}O("a",bs),O("A",bs),O("H",L,Ti),O("h",L,Kt),O("k",L,Kt),O("HH",L,Se),O("hh",L,Se),O("kk",L,Se),O("hmm",G),O("hmmss",ne),O("Hmm",G),O("Hmmss",ne),re(["H","HH"],de),re(["k","kk"],function(r,o,l){var f=q(r);o[de]=f===24?0:f}),re(["a","A"],function(r,o,l){l._isPm=l._locale.isPM(r),l._meridiem=r}),re(["h","hh"],function(r,o,l){o[de]=q(r),A(l).bigHour=!0}),re("hmm",function(r,o,l){var f=r.length-2;o[de]=q(r.substr(0,f)),o[$e]=q(r.substr(f)),A(l).bigHour=!0}),re("hmmss",function(r,o,l){var f=r.length-4,m=r.length-2;o[de]=q(r.substr(0,f)),o[$e]=q(r.substr(f,2)),o[lt]=q(r.substr(m)),A(l).bigHour=!0}),re("Hmm",function(r,o,l){var f=r.length-2;o[de]=q(r.substr(0,f)),o[$e]=q(r.substr(f))}),re("Hmmss",function(r,o,l){var f=r.length-4,m=r.length-2;o[de]=q(r.substr(0,f)),o[$e]=q(r.substr(f,2)),o[lt]=q(r.substr(m))});function Yc(r){return(r+"").toLowerCase().charAt(0)==="p"}var Wc=/[ap]\.?m?\.?/i,zc=Zt("Hours",!0);function Vc(r,o,l){return r>11?l?"pm":"PM":l?"am":"AM"}var xs={calendar:X,longDateFormat:fe,invalidDate:Ve,ordinal:kt,dayOfMonthOrdinalParse:xn,relativeTime:qn,months:rc,monthsShort:ds,week:mc,weekdays:vc,weekdaysMin:Cc,weekdaysShort:ks,meridiemParse:Wc},se={},Tn={},Mn;function Uc(r,o){var l,f=Math.min(r.length,o.length);for(l=0;l0;){if(m=rr(b.slice(0,l).join("-")),m)return m;if(f&&f.length>=l&&Uc(b,f)>=l-1)break;l--}o++}return Mn}function jc(r){return!!(r&&r.match("^[^/\\\\]*$"))}function rr(r){var o=null,l;if(se[r]===void 0&&typeof bn<"u"&&bn&&bn.exports&&jc(r))try{o=Mn._abbr,l=require,l("./locale/"+r),wt(o)}catch{se[r]=null}return se[r]}function wt(r,o){var l;return r&&(c(o)?l=ct(r):l=Ii(r,o),l?Mn=l:typeof console<"u"&&console.warn&&console.warn("Locale "+r+" not found. Did you forget to load it?")),Mn._abbr}function Ii(r,o){if(o!==null){var l,f=xs;if(o.abbr=r,se[r]!=null)te("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."),f=se[r]._config;else if(o.parentLocale!=null)if(se[o.parentLocale]!=null)f=se[o.parentLocale]._config;else if(l=rr(o.parentLocale),l!=null)f=l._config;else return Tn[o.parentLocale]||(Tn[o.parentLocale]=[]),Tn[o.parentLocale].push({name:r,config:o}),null;return se[r]=new V(N(f,o)),Tn[r]&&Tn[r].forEach(function(m){Ii(m.name,m.config)}),wt(r),se[r]}else return delete se[r],null}function $c(r,o){if(o!=null){var l,f,m=xs;se[r]!=null&&se[r].parentLocale!=null?se[r].set(N(se[r]._config,o)):(f=rr(r),f!=null&&(m=f._config),o=N(m,o),f==null&&(o.abbr=r),l=new V(o),l.parentLocale=se[r],se[r]=l),wt(r)}else se[r]!=null&&(se[r].parentLocale!=null?(se[r]=se[r].parentLocale,r===wt()&&wt(r)):se[r]!=null&&delete se[r]);return se[r]}function ct(r){var o;if(r&&r._locale&&r._locale._abbr&&(r=r._locale._abbr),!r)return Mn;if(!i(r)){if(o=rr(r),o)return o;r=[r]}return Hc(r)}function Gc(){return W(se)}function Oi(r){var o,l=r._a;return l&&A(r).overflow===-2&&(o=l[at]<0||l[at]>11?at:l[Qe]<1||l[Qe]>Pi(l[be],l[at])?Qe:l[de]<0||l[de]>24||l[de]===24&&(l[$e]!==0||l[lt]!==0||l[It]!==0)?de:l[$e]<0||l[$e]>59?$e:l[lt]<0||l[lt]>59?lt:l[It]<0||l[It]>999?It:-1,A(r)._overflowDayOfYear&&(oQe)&&(o=Qe),A(r)._overflowWeeks&&o===-1&&(o=Ju),A(r)._overflowWeekday&&o===-1&&(o=Qu),A(r).overflow=o),r}var qc=/^\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)?)?$/,Kc=/^\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)?)?$/,Zc=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["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]],Ri=[["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/]],Jc=/^\/?Date\((-?\d+)/i,Qc=/^(?:(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}))$/,Xc={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 Cs(r){var o,l,f=r._i,m=qc.exec(f)||Kc.exec(f),b,C,I,z,K=ir.length,_e=Ri.length;if(m){for(A(r).iso=!0,o=0,l=K;oAn(C)||r._dayOfYear===0)&&(A(r)._overflowDayOfYear=!0),l=En(C,0,r._dayOfYear),r._a[at]=l.getUTCMonth(),r._a[Qe]=l.getUTCDate()),o=0;o<3&&r._a[o]==null;++o)r._a[o]=f[o]=m[o];for(;o<7;o++)r._a[o]=f[o]=r._a[o]==null?o===2?1:0:r._a[o];r._a[de]===24&&r._a[$e]===0&&r._a[lt]===0&&r._a[It]===0&&(r._nextDay=!0,r._a[de]=0),r._d=(r._useUTC?En:hc).apply(null,f),b=r._useUTC?r._d.getUTCDay():r._d.getDay(),r._tzm!=null&&r._d.setUTCMinutes(r._d.getUTCMinutes()-r._tzm),r._nextDay&&(r._a[de]=24),r._w&&typeof r._w.d<"u"&&r._w.d!==b&&(A(r).weekdayMismatch=!0)}}function lf(r){var o,l,f,m,b,C,I,z,K;o=r._w,o.GG!=null||o.W!=null||o.E!=null?(b=1,C=4,l=Jt(o.GG,r._a[be],_n(oe(),1,4).year),f=Jt(o.W,1),m=Jt(o.E,1),(m<1||m>7)&&(z=!0)):(b=r._locale._week.dow,C=r._locale._week.doy,K=_n(oe(),b,C),l=Jt(o.gg,r._a[be],K.year),f=Jt(o.w,K.week),o.d!=null?(m=o.d,(m<0||m>6)&&(z=!0)):o.e!=null?(m=o.e+b,(o.e<0||o.e>6)&&(z=!0)):m=b),f<1||f>ut(l,b,C)?A(r)._overflowWeeks=!0:z!=null?A(r)._overflowWeekday=!0:(I=ys(l,f,m,b,C),r._a[be]=I.year,r._dayOfYear=I.dayOfYear)}t.ISO_8601=function(){},t.RFC_2822=function(){};function Bi(r){if(r._f===t.ISO_8601){Cs(r);return}if(r._f===t.RFC_2822){As(r);return}r._a=[],A(r).empty=!0;var o=""+r._i,l,f,m,b,C,I=o.length,z=0,K,_e;for(m=Ft(r._f,r._locale).match(Pe)||[],_e=m.length,l=0;l<_e;l++)b=m[l],f=(o.match(qu(b,r))||[])[0],f&&(C=o.substr(0,o.indexOf(f)),C.length>0&&A(r).unusedInput.push(C),o=o.slice(o.indexOf(f)+f.length),z+=f.length),ke[b]?(f?A(r).empty=!1:A(r).unusedTokens.push(b),Zu(b,f,r)):r._strict&&!f&&A(r).unusedTokens.push(b);A(r).charsLeftOver=I-z,o.length>0&&A(r).unusedInput.push(o),r._a[de]<=12&&A(r).bigHour===!0&&r._a[de]>0&&(A(r).bigHour=void 0),A(r).parsedDateParts=r._a.slice(0),A(r).meridiem=r._meridiem,r._a[de]=uf(r._locale,r._a[de],r._meridiem),K=A(r).era,K!==null&&(r._a[be]=r._locale.erasConvertYear(K,r._a[be])),Ni(r),Oi(r)}function uf(r,o,l){var f;return l==null?o:r.meridiemHour!=null?r.meridiemHour(o,l):(r.isPM!=null&&(f=r.isPM(l),f&&o<12&&(o+=12),!f&&o===12&&(o=0)),o)}function cf(r){var o,l,f,m,b,C,I=!1,z=r._f.length;if(z===0){A(r).invalidFormat=!0,r._d=new Date(NaN);return}for(m=0;mthis?this:r:v()});function _s(r,o){var l,f;if(o.length===1&&i(o[0])&&(o=o[0]),!o.length)return oe();for(l=o[0],f=1;fthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Df(){if(!c(this._isDSTShifted))return this._isDSTShifted;var r={},o;return B(r,this),r=Ss(r),r._a?(o=r._isUTC?g(r._a):oe(r._a),this._isDSTShifted=this.isValid()&&vf(r._a,o.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Ff(){return this.isValid()?!this._isUTC:!1}function Lf(){return this.isValid()?this._isUTC:!1}function Ms(){return this.isValid()?this._isUTC&&this._offset===0:!1}var If=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Of=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ge(r,o){var l=r,f=null,m,b,C;return sr(r)?l={ms:r._milliseconds,d:r._days,M:r._months}:d(r)||!isNaN(+r)?(l={},o?l[o]=+r:l.milliseconds=+r):(f=If.exec(r))?(m=f[1]==="-"?-1:1,l={y:0,d:q(f[Qe])*m,h:q(f[de])*m,m:q(f[$e])*m,s:q(f[lt])*m,ms:q(Yi(f[It]*1e3))*m}):(f=Of.exec(r))?(m=f[1]==="-"?-1:1,l={y:Ot(f[2],m),M:Ot(f[3],m),w:Ot(f[4],m),d:Ot(f[5],m),h:Ot(f[6],m),m:Ot(f[7],m),s:Ot(f[8],m)}):l==null?l={}:typeof l=="object"&&("from"in l||"to"in l)&&(C=Rf(oe(l.from),oe(l.to)),l={},l.ms=C.milliseconds,l.M=C.months),b=new or(l),sr(r)&&a(r,"_locale")&&(b._locale=r._locale),sr(r)&&a(r,"_isValid")&&(b._isValid=r._isValid),b}Ge.fn=or.prototype,Ge.invalid=xf;function Ot(r,o){var l=r&&parseFloat(r.replace(",","."));return(isNaN(l)?0:l)*o}function Ps(r,o){var l={};return l.months=o.month()-r.month()+(o.year()-r.year())*12,r.clone().add(l.months,"M").isAfter(o)&&--l.months,l.milliseconds=+o-+r.clone().add(l.months,"M"),l}function Rf(r,o){var l;return r.isValid()&&o.isValid()?(o=zi(o,r),r.isBefore(o)?l=Ps(r,o):(l=Ps(o,r),l.milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0}}function Ds(r,o){return function(l,f){var m,b;return f!==null&&!isNaN(+f)&&(te(o,"moment()."+o+"(period, number) is deprecated. Please use moment()."+o+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),b=l,l=f,f=b),m=Ge(l,f),Fs(this,m,r),this}}function Fs(r,o,l,f){var m=o._milliseconds,b=Yi(o._days),C=Yi(o._months);r.isValid()&&(f=f??!0,C&&ps(r,Sn(r,"Month")+C*l),b&&fs(r,"Date",Sn(r,"Date")+b*l),m&&r._d.setTime(r._d.valueOf()+m*l),f&&t.updateOffset(r,b||C))}var Nf=Ds(1,"add"),Bf=Ds(-1,"subtract");function Ls(r){return typeof r=="string"||r instanceof String}function Yf(r){return S(r)||p(r)||Ls(r)||d(r)||zf(r)||Wf(r)||r===null||r===void 0}function Wf(r){var o=s(r)&&!u(r),l=!1,f=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],m,b,C=f.length;for(m=0;ml.valueOf():l.valueOf()9999?yt(l,o?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ie(Date.prototype.toISOString)?o?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",yt(l,"Z")):yt(l,o?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function td(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var r="moment",o="",l,f,m,b;return this.isLocal()||(r=this.utcOffset()===0?"moment.utc":"moment.parseZone",o="Z"),l="["+r+'("]',f=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",m="-MM-DD[T]HH:mm:ss.SSS",b=o+'[")]',this.format(l+f+m+b)}function nd(r){r||(r=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var o=yt(this,r);return this.localeData().postformat(o)}function rd(r,o){return this.isValid()&&(S(r)&&r.isValid()||oe(r).isValid())?Ge({to:this,from:r}).locale(this.locale()).humanize(!o):this.localeData().invalidDate()}function id(r){return this.from(oe(),r)}function od(r,o){return this.isValid()&&(S(r)&&r.isValid()||oe(r).isValid())?Ge({from:this,to:r}).locale(this.locale()).humanize(!o):this.localeData().invalidDate()}function sd(r){return this.to(oe(),r)}function Is(r){var o;return r===void 0?this._locale._abbr:(o=ct(r),o!=null&&(this._locale=o),this)}var Os=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 Rs(){return this._locale}var lr=1e3,Qt=60*lr,ur=60*Qt,Ns=(365*400+97)*24*ur;function Xt(r,o){return(r%o+o)%o}function Bs(r,o,l){return r<100&&r>=0?new Date(r+400,o,l)-Ns:new Date(r,o,l).valueOf()}function Ys(r,o,l){return r<100&&r>=0?Date.UTC(r+400,o,l)-Ns:Date.UTC(r,o,l)}function ad(r){var o,l;if(r=Ae(r),r===void 0||r==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Ys:Bs,r){case"year":o=l(this.year(),0,1);break;case"quarter":o=l(this.year(),this.month()-this.month()%3,1);break;case"month":o=l(this.year(),this.month(),1);break;case"week":o=l(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":o=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":o=l(this.year(),this.month(),this.date());break;case"hour":o=this._d.valueOf(),o-=Xt(o+(this._isUTC?0:this.utcOffset()*Qt),ur);break;case"minute":o=this._d.valueOf(),o-=Xt(o,Qt);break;case"second":o=this._d.valueOf(),o-=Xt(o,lr);break}return this._d.setTime(o),t.updateOffset(this,!0),this}function ld(r){var o,l;if(r=Ae(r),r===void 0||r==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Ys:Bs,r){case"year":o=l(this.year()+1,0,1)-1;break;case"quarter":o=l(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":o=l(this.year(),this.month()+1,1)-1;break;case"week":o=l(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":o=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":o=l(this.year(),this.month(),this.date()+1)-1;break;case"hour":o=this._d.valueOf(),o+=ur-Xt(o+(this._isUTC?0:this.utcOffset()*Qt),ur)-1;break;case"minute":o=this._d.valueOf(),o+=Qt-Xt(o,Qt)-1;break;case"second":o=this._d.valueOf(),o+=lr-Xt(o,lr)-1;break}return this._d.setTime(o),t.updateOffset(this,!0),this}function ud(){return this._d.valueOf()-(this._offset||0)*6e4}function cd(){return Math.floor(this.valueOf()/1e3)}function fd(){return new Date(this.valueOf())}function dd(){var r=this;return[r.year(),r.month(),r.date(),r.hour(),r.minute(),r.second(),r.millisecond()]}function hd(){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 pd(){return this.isValid()?this.toISOString():null}function md(){return T(this)}function gd(){return y({},A(this))}function yd(){return A(this).overflow}function kd(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}w("N",0,0,"eraAbbr"),w("NN",0,0,"eraAbbr"),w("NNN",0,0,"eraAbbr"),w("NNNN",0,0,"eraName"),w("NNNNN",0,0,"eraNarrow"),w("y",["y",1],"yo","eraYear"),w("y",["yy",2],0,"eraYear"),w("y",["yyy",3],0,"eraYear"),w("y",["yyyy",4],0,"eraYear"),O("N",Ui),O("NN",Ui),O("NNN",Ui),O("NNNN",Md),O("NNNNN",Pd),re(["N","NN","NNN","NNNN","NNNNN"],function(r,o,l,f){var m=l._locale.erasParse(r,f,l._strict);m?A(l).era=m:A(l).invalidEra=r}),O("y",Ne),O("yy",Ne),O("yyy",Ne),O("yyyy",Ne),O("yo",Dd),re(["y","yy","yyy","yyyy"],be),re(["yo"],function(r,o,l,f){var m;l._locale._eraYearOrdinalRegex&&(m=r.match(l._locale._eraYearOrdinalRegex)),l._locale.eraYearOrdinalParse?o[be]=l._locale.eraYearOrdinalParse(r,m):o[be]=parseInt(r,10)});function wd(r,o){var l,f,m,b=this._eras||ct("en")._eras;for(l=0,f=b.length;l=0)return b[f]}function xd(r,o){var l=r.since<=r.until?1:-1;return o===void 0?t(r.since).year():t(r.since).year()+(o-r.offset)*l}function vd(){var r,o,l,f=this.localeData().eras();for(r=0,o=f.length;rb&&(o=b),Bd.call(this,r,o,l,f,m))}function Bd(r,o,l,f,m){var b=ys(r,o,l,f,m),C=En(b.year,0,b.dayOfYear);return this.year(C.getUTCFullYear()),this.month(C.getUTCMonth()),this.date(C.getUTCDate()),this}w("Q",0,"Qo","quarter"),O("Q",Qn),re("Q",function(r,o){o[at]=(q(r)-1)*3});function Yd(r){return r==null?Math.ceil((this.month()+1)/3):this.month((r-1)*3+this.month()%3)}w("D",["DD",2],"Do","date"),O("D",L,Kt),O("DD",L,Se),O("Do",function(r,o){return r?o._dayOfMonthOrdinalParse||o._ordinalParse:o._dayOfMonthOrdinalParseLenient}),re(["D","DD"],Qe),re("Do",function(r,o){o[Qe]=q(r.match(L)[0])});var zs=Zt("Date",!0);w("DDD",["DDDD",3],"DDDo","dayOfYear"),O("DDD",we),O("DDDD",Xn),re(["DDD","DDDD"],function(r,o,l){l._dayOfYear=q(r)});function Wd(r){var o=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return r==null?o:this.add(r-o,"d")}w("m",["mm",2],0,"minute"),O("m",L,Ti),O("mm",L,Se),re(["m","mm"],$e);var zd=Zt("Minutes",!1);w("s",["ss",2],0,"second"),O("s",L,Ti),O("ss",L,Se),re(["s","ss"],lt);var Vd=Zt("Seconds",!1);w("S",0,0,function(){return~~(this.millisecond()/100)}),w(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),w(0,["SSS",3],0,"millisecond"),w(0,["SSSS",4],0,function(){return this.millisecond()*10}),w(0,["SSSSS",5],0,function(){return this.millisecond()*100}),w(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),w(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),w(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),w(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),O("S",we,Qn),O("SS",we,Se),O("SSS",we,Xn);var bt,Vs;for(bt="SSSS";bt.length<=9;bt+="S")O(bt,Ne);function Ud(r,o){o[It]=q(("0."+r)*1e3)}for(bt="S";bt.length<=9;bt+="S")re(bt,Ud);Vs=Zt("Milliseconds",!1),w("z",0,0,"zoneAbbr"),w("zz",0,0,"zoneName");function Hd(){return this._isUTC?"UTC":""}function jd(){return this._isUTC?"Coordinated Universal Time":""}var P=Y.prototype;P.add=Nf,P.calendar=Hf,P.clone=jf,P.diff=Qf,P.endOf=ld,P.format=nd,P.from=rd,P.fromNow=id,P.to=od,P.toNow=sd,P.get=ec,P.invalidAt=yd,P.isAfter=$f,P.isBefore=Gf,P.isBetween=qf,P.isSame=Kf,P.isSameOrAfter=Zf,P.isSameOrBefore=Jf,P.isValid=md,P.lang=Os,P.locale=Is,P.localeData=Rs,P.max=mf,P.min=pf,P.parsingFlags=gd,P.set=tc,P.startOf=ad,P.subtract=Bf,P.toArray=dd,P.toObject=hd,P.toDate=fd,P.toISOString=ed,P.inspect=td,typeof Symbol<"u"&&Symbol.for!=null&&(P[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),P.toJSON=pd,P.toString=Xf,P.unix=cd,P.valueOf=ud,P.creationData=kd,P.eraName=vd,P.eraNarrow=Cd,P.eraAbbr=Ad,P.eraYear=Sd,P.year=cs,P.isLeapYear=Xu,P.weekYear=Fd,P.isoWeekYear=Ld,P.quarter=P.quarters=Yd,P.month=ms,P.daysInMonth=cc,P.week=P.weeks=kc,P.isoWeek=P.isoWeeks=wc,P.weeksInYear=Rd,P.weeksInWeekYear=Nd,P.isoWeeksInYear=Id,P.isoWeeksInISOWeekYear=Od,P.date=zs,P.day=P.days=Fc,P.weekday=Lc,P.isoWeekday=Ic,P.dayOfYear=Wd,P.hour=P.hours=zc,P.minute=P.minutes=zd,P.second=P.seconds=Vd,P.millisecond=P.milliseconds=Vs,P.utcOffset=Af,P.utc=Ef,P.local=_f,P.parseZone=Tf,P.hasAlignedHourOffset=Mf,P.isDST=Pf,P.isLocal=Ff,P.isUtcOffset=Lf,P.isUtc=Ms,P.isUTC=Ms,P.zoneAbbr=Hd,P.zoneName=jd,P.dates=j("dates accessor is deprecated. Use date instead.",zs),P.months=j("months accessor is deprecated. Use month instead",ms),P.years=j("years accessor is deprecated. Use year instead",cs),P.zone=j("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Sf),P.isDSTShifted=j("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Df);function $d(r){return oe(r*1e3)}function Gd(){return oe.apply(null,arguments).parseZone()}function Us(r){return r}var ee=V.prototype;ee.calendar=ae,ee.longDateFormat=Lt,ee.invalidDate=ot,ee.ordinal=Si,ee.preparse=Us,ee.postformat=Us,ee.relativeTime=Kn,ee.pastFuture=Zn,ee.set=Q,ee.eras=wd,ee.erasParse=bd,ee.erasConvertYear=xd,ee.erasAbbrRegex=_d,ee.erasNameRegex=Ed,ee.erasNarrowRegex=Td,ee.months=sc,ee.monthsShort=ac,ee.monthsParse=uc,ee.monthsRegex=dc,ee.monthsShortRegex=fc,ee.week=pc,ee.firstDayOfYear=yc,ee.firstDayOfWeek=gc,ee.weekdays=_c,ee.weekdaysMin=Mc,ee.weekdaysShort=Tc,ee.weekdaysParse=Dc,ee.weekdaysRegex=Oc,ee.weekdaysShortRegex=Rc,ee.weekdaysMinRegex=Nc,ee.isPM=Yc,ee.meridiem=Vc;function fr(r,o,l,f){var m=ct(),b=g().set(f,o);return m[l](b,r)}function Hs(r,o,l){if(d(r)&&(o=r,r=void 0),r=r||"",o!=null)return fr(r,o,l,"month");var f,m=[];for(f=0;f<12;f++)m[f]=fr(r,f,l,"month");return m}function ji(r,o,l,f){typeof r=="boolean"?(d(o)&&(l=o,o=void 0),o=o||""):(o=r,l=o,r=!1,d(o)&&(l=o,o=void 0),o=o||"");var m=ct(),b=r?m._week.dow:0,C,I=[];if(l!=null)return fr(o,(l+b)%7,f,"day");for(C=0;C<7;C++)I[C]=fr(o,(C+b)%7,f,"day");return I}function qd(r,o){return Hs(r,o,"months")}function Kd(r,o){return Hs(r,o,"monthsShort")}function Zd(r,o,l){return ji(r,o,l,"weekdays")}function Jd(r,o,l){return ji(r,o,l,"weekdaysShort")}function Qd(r,o,l){return ji(r,o,l,"weekdaysMin")}wt("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 o=r%10,l=q(r%100/10)===1?"th":o===1?"st":o===2?"nd":o===3?"rd":"th";return r+l}}),t.lang=j("moment.lang is deprecated. Use moment.locale instead.",wt),t.langData=j("moment.langData is deprecated. Use moment.localeData instead.",ct);var ft=Math.abs;function Xd(){var r=this._data;return this._milliseconds=ft(this._milliseconds),this._days=ft(this._days),this._months=ft(this._months),r.milliseconds=ft(r.milliseconds),r.seconds=ft(r.seconds),r.minutes=ft(r.minutes),r.hours=ft(r.hours),r.months=ft(r.months),r.years=ft(r.years),this}function js(r,o,l,f){var m=Ge(o,l);return r._milliseconds+=f*m._milliseconds,r._days+=f*m._days,r._months+=f*m._months,r._bubble()}function eh(r,o){return js(this,r,o,1)}function th(r,o){return js(this,r,o,-1)}function $s(r){return r<0?Math.floor(r):Math.ceil(r)}function nh(){var r=this._milliseconds,o=this._days,l=this._months,f=this._data,m,b,C,I,z;return r>=0&&o>=0&&l>=0||r<=0&&o<=0&&l<=0||(r+=$s($i(l)+o)*864e5,o=0,l=0),f.milliseconds=r%1e3,m=Be(r/1e3),f.seconds=m%60,b=Be(m/60),f.minutes=b%60,C=Be(b/60),f.hours=C%24,o+=Be(C/24),z=Be(Gs(o)),l+=z,o-=$s($i(z)),I=Be(l/12),l%=12,f.days=o,f.months=l,f.years=I,this}function Gs(r){return r*4800/146097}function $i(r){return r*146097/4800}function rh(r){if(!this.isValid())return NaN;var o,l,f=this._milliseconds;if(r=Ae(r),r==="month"||r==="quarter"||r==="year")switch(o=this._days+f/864e5,l=this._months+Gs(o),r){case"month":return l;case"quarter":return l/3;case"year":return l/12}else switch(o=this._days+Math.round($i(this._months)),r){case"week":return o/7+f/6048e5;case"day":return o+f/864e5;case"hour":return o*24+f/36e5;case"minute":return o*1440+f/6e4;case"second":return o*86400+f/1e3;case"millisecond":return Math.floor(o*864e5)+f;default:throw new Error("Unknown unit "+r)}}function dt(r){return function(){return this.as(r)}}var qs=dt("ms"),ih=dt("s"),oh=dt("m"),sh=dt("h"),ah=dt("d"),lh=dt("w"),uh=dt("M"),ch=dt("Q"),fh=dt("y"),dh=qs;function hh(){return Ge(this)}function ph(r){return r=Ae(r),this.isValid()?this[r+"s"]():NaN}function Rt(r){return function(){return this.isValid()?this._data[r]:NaN}}var mh=Rt("milliseconds"),gh=Rt("seconds"),yh=Rt("minutes"),kh=Rt("hours"),wh=Rt("days"),bh=Rt("months"),xh=Rt("years");function vh(){return Be(this.days()/7)}var ht=Math.round,en={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Ch(r,o,l,f,m){return m.relativeTime(o||1,!!l,r,f)}function Ah(r,o,l,f){var m=Ge(r).abs(),b=ht(m.as("s")),C=ht(m.as("m")),I=ht(m.as("h")),z=ht(m.as("d")),K=ht(m.as("M")),_e=ht(m.as("w")),pt=ht(m.as("y")),xt=b<=l.ss&&["s",b]||b0,xt[4]=f,Ch.apply(null,xt)}function Sh(r){return r===void 0?ht:typeof r=="function"?(ht=r,!0):!1}function Eh(r,o){return en[r]===void 0?!1:o===void 0?en[r]:(en[r]=o,r==="s"&&(en.ss=o-1),!0)}function _h(r,o){if(!this.isValid())return this.localeData().invalidDate();var l=!1,f=en,m,b;return typeof r=="object"&&(o=r,r=!1),typeof r=="boolean"&&(l=r),typeof o=="object"&&(f=Object.assign({},en,o),o.s!=null&&o.ss==null&&(f.ss=o.s-1)),m=this.localeData(),b=Ah(this,!l,f,m),l&&(b=m.pastFuture(+this,b)),m.postformat(b)}var Gi=Math.abs;function tn(r){return(r>0)-(r<0)||+r}function dr(){if(!this.isValid())return this.localeData().invalidDate();var r=Gi(this._milliseconds)/1e3,o=Gi(this._days),l=Gi(this._months),f,m,b,C,I=this.asSeconds(),z,K,_e,pt;return I?(f=Be(r/60),m=Be(f/60),r%=60,f%=60,b=Be(l/12),l%=12,C=r?r.toFixed(3).replace(/\.?0+$/,""):"",z=I<0?"-":"",K=tn(this._months)!==tn(I)?"-":"",_e=tn(this._days)!==tn(I)?"-":"",pt=tn(this._milliseconds)!==tn(I)?"-":"",z+"P"+(b?K+b+"Y":"")+(l?K+l+"M":"")+(o?_e+o+"D":"")+(m||f||r?"T":"")+(m?pt+m+"H":"")+(f?pt+f+"M":"")+(r?pt+C+"S":"")):"P0D"}var J=or.prototype;J.isValid=bf,J.abs=Xd,J.add=eh,J.subtract=th,J.as=rh,J.asMilliseconds=qs,J.asSeconds=ih,J.asMinutes=oh,J.asHours=sh,J.asDays=ah,J.asWeeks=lh,J.asMonths=uh,J.asQuarters=ch,J.asYears=fh,J.valueOf=dh,J._bubble=nh,J.clone=hh,J.get=ph,J.milliseconds=mh,J.seconds=gh,J.minutes=yh,J.hours=kh,J.days=wh,J.weeks=vh,J.months=bh,J.years=xh,J.humanize=_h,J.toISOString=dr,J.toString=dr,J.toJSON=dr,J.locale=Is,J.localeData=Rs,J.toIsoString=j("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",dr),J.lang=Os,w("X",0,0,"unix"),w("x",0,0,"valueOf"),O("x",Je),O("X",je),re("X",function(r,o,l){l._d=new Date(parseFloat(r)*1e3)}),re("x",function(r,o,l){l._d=new Date(q(r))});return t.version="2.30.1",n(oe),t.fn=P,t.min=gf,t.max=yf,t.now=kf,t.utc=g,t.unix=$d,t.months=qd,t.isDate=p,t.locale=wt,t.invalid=v,t.duration=Ge,t.isMoment=S,t.weekdays=Zd,t.parseZone=Gd,t.localeData=ct,t.isDuration=sr,t.monthsShort=Kd,t.weekdaysMin=Qd,t.defineLocale=Ii,t.updateLocale=$c,t.locales=Gc,t.weekdaysShort=Jd,t.normalizeUnits=Ae,t.relativeTimeRounding=Sh,t.relativeTimeThreshold=Eh,t.calendarFormat=Uf,t.prototype=P,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 m0={};Ks(m0,{default:()=>p0});module.exports=Lh(m0);var Re=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function Bt(e,t){let n=0;for(let i=0;i"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Qi="27.1.0",kr="obsidian-dev-utils",ua=`.obsidian-dev-utils.code-highlighter-component textarea, .obsidian-dev-utils.code-highlighter-component pre, .obsidian-dev-utils.code-highlighter-component code { font-family: var(--font-monospace); line-height: var(--line-height-normal); margin: 0; } .obsidian-dev-utils.code-highlighter-component textarea, .obsidian-dev-utils.code-highlighter-component code { font-size: var(--code-size); } .obsidian-dev-utils.code-highlighter-component textarea { background: transparent; color: transparent; z-index: 2; width: 20em; height: 10em; } .obsidian-dev-utils.code-highlighter-component pre { position: absolute; pointer-events: none; border: var(--input-border-width) solid transparent; overflow: auto; inset: 0; padding: var(--size-4-1) var(--size-4-2); z-index: 1; } .obsidian-dev-utils.code-highlighter-component pre.is-placeholder { opacity: 0.6; } .obsidian-dev-utils.code-highlighter-component code { display: block; padding: 0; } .obsidian-dev-utils input[type=url] { height: var(--input-height); } .obsidian-dev-utils input[type=month], .obsidian-dev-utils input[type=tel], .obsidian-dev-utils input[type=time], .obsidian-dev-utils input[type=url], .obsidian-dev-utils input[type=week] { -webkit-app-region: no-drag; background: var(--background-modifier-form-field); border: var(--input-border-width) solid var(--background-modifier-border); color: var(--text-normal); font-family: inherit; padding: var(--size-4-1) var(--size-4-2); font-size: var(--font-ui-small); border-radius: var(--input-radius); outline: none; } @media (hover: hover) { .obsidian-dev-utils input[type=month]:hover, .obsidian-dev-utils input[type=tel]:hover, .obsidian-dev-utils input[type=time]:hover, .obsidian-dev-utils input[type=url]:hover, .obsidian-dev-utils input[type=week]:hover { border-color: var(--background-modifier-border-hover); transition: box-shadow 0.15s ease-in-out, border 0.15s ease-in-out; } } .obsidian-dev-utils input[type=month]:active, .obsidian-dev-utils input[type=month]:focus, .obsidian-dev-utils input[type=tel]:active, .obsidian-dev-utils input[type=tel]:focus, .obsidian-dev-utils input[type=time]:active, .obsidian-dev-utils input[type=time]:focus, .obsidian-dev-utils input[type=url]:active, .obsidian-dev-utils input[type=url]:focus, .obsidian-dev-utils input[type=week]:active, .obsidian-dev-utils input[type=week]:focus { border-color: var(--background-modifier-border-focus); transition: box-shadow 0.15s ease-in-out, border 0.15s ease-in-out; } .obsidian-dev-utils input[type=month]:active, .obsidian-dev-utils input[type=month]:focus, .obsidian-dev-utils input[type=month]:focus-visible, .obsidian-dev-utils input[type=tel]:active, .obsidian-dev-utils input[type=tel]:focus, .obsidian-dev-utils input[type=tel]:focus-visible, .obsidian-dev-utils input[type=time]:active, .obsidian-dev-utils input[type=time]:focus, .obsidian-dev-utils input[type=time]:focus-visible, .obsidian-dev-utils input[type=url]:active, .obsidian-dev-utils input[type=url]:focus, .obsidian-dev-utils input[type=url]:focus-visible, .obsidian-dev-utils input[type=week]:active, .obsidian-dev-utils input[type=week]:focus, .obsidian-dev-utils input[type=week]:focus-visible { box-shadow: 0 0 0 2px var(--background-modifier-border-focus); } .obsidian-dev-utils input[type=month]::placeholder, .obsidian-dev-utils input[type=tel]::placeholder, .obsidian-dev-utils input[type=time]::placeholder, .obsidian-dev-utils input[type=url]::placeholder, .obsidian-dev-utils input[type=week]::placeholder { color: var(--text-faint); } .mod-rtl input[type=month], .mod-rtl input[type=time], .mod-rtl input[type=week], .is-rtl input[type=month], .is-rtl input[type=time], .is-rtl input[type=week], .rtl input[type=month], .rtl input[type=time], .rtl input[type=week] { direction: rtl; } .mod-rtl input[type=month]::-webkit-calendar-picker-indicator, .mod-rtl input[type=time]::-webkit-calendar-picker-indicator, .mod-rtl input[type=week]::-webkit-calendar-picker-indicator, .is-rtl input[type=month]::-webkit-calendar-picker-indicator, .is-rtl input[type=time]::-webkit-calendar-picker-indicator, .is-rtl input[type=week]::-webkit-calendar-picker-indicator, .rtl input[type=month]::-webkit-calendar-picker-indicator, .rtl input[type=time]::-webkit-calendar-picker-indicator, .rtl input[type=week]::-webkit-calendar-picker-indicator { right: var(--size-4-1); left: auto; } .obsidian-dev-utils input[type=month], .obsidian-dev-utils input[type=time], .obsidian-dev-utils input[type=week] { font-variant-numeric: tabular-nums; position: relative; } .obsidian-dev-utils input[type=month]::-webkit-datetime-edit-text, .obsidian-dev-utils input[type=time]::-webkit-datetime-edit-text, .obsidian-dev-utils input[type=week]::-webkit-datetime-edit-text { color: var(--text-faint); padding-inline-end: 0; } .obsidian-dev-utils input[type=month]::-webkit-calendar-picker-indicator, .obsidian-dev-utils input[type=time]::-webkit-calendar-picker-indicator, .obsidian-dev-utils input[type=week]::-webkit-calendar-picker-indicator { position: absolute; left: var(--size-4-1); right: auto; opacity: 0.5; } .obsidian-dev-utils input[type=month]::-webkit-datetime-edit-month-field:active, .obsidian-dev-utils input[type=month]::-webkit-datetime-edit-month-field:focus, .obsidian-dev-utils input[type=month]::-webkit-datetime-edit-day-field:active, .obsidian-dev-utils input[type=month]::-webkit-datetime-edit-day-field:focus, .obsidian-dev-utils input[type=month]::-webkit-datetime-edit-year-field:active, .obsidian-dev-utils input[type=month]::-webkit-datetime-edit-year-field:focus, .obsidian-dev-utils input[type=time]::-webkit-datetime-edit-month-field:active, .obsidian-dev-utils input[type=time]::-webkit-datetime-edit-month-field:focus, .obsidian-dev-utils input[type=time]::-webkit-datetime-edit-day-field:active, .obsidian-dev-utils input[type=time]::-webkit-datetime-edit-day-field:focus, .obsidian-dev-utils input[type=time]::-webkit-datetime-edit-year-field:active, .obsidian-dev-utils input[type=time]::-webkit-datetime-edit-year-field:focus, .obsidian-dev-utils input[type=week]::-webkit-datetime-edit-month-field:active, .obsidian-dev-utils input[type=week]::-webkit-datetime-edit-month-field:focus, .obsidian-dev-utils input[type=week]::-webkit-datetime-edit-day-field:active, .obsidian-dev-utils input[type=week]::-webkit-datetime-edit-day-field:focus, .obsidian-dev-utils input[type=week]::-webkit-datetime-edit-year-field:active, .obsidian-dev-utils input[type=week]::-webkit-datetime-edit-year-field:focus { background-color: var(--text-selection); color: var(--text-normal); cursor: text; } .mod-rtl .obsidian-dev-utils input[type=month], .is-rtl .obsidian-dev-utils input[type=month], .rtl .obsidian-dev-utils input[type=month], .mod-rtl .obsidian-dev-utils input[type=time], .is-rtl .obsidian-dev-utils input[type=time], .rtl .obsidian-dev-utils input[type=time], .mod-rtl .obsidian-dev-utils input[type=week], .is-rtl .obsidian-dev-utils input[type=week], .rtl .obsidian-dev-utils input[type=week] { direction: rtl; } .mod-rtl .obsidian-dev-utils input[type=month]::-webkit-calendar-picker-indicator, .is-rtl .obsidian-dev-utils input[type=month]::-webkit-calendar-picker-indicator, .rtl .obsidian-dev-utils input[type=month]::-webkit-calendar-picker-indicator, .mod-rtl .obsidian-dev-utils input[type=time]::-webkit-calendar-picker-indicator, .is-rtl .obsidian-dev-utils input[type=time]::-webkit-calendar-picker-indicator, .rtl .obsidian-dev-utils input[type=time]::-webkit-calendar-picker-indicator, .mod-rtl .obsidian-dev-utils input[type=week]::-webkit-calendar-picker-indicator, .is-rtl .obsidian-dev-utils input[type=week]::-webkit-calendar-picker-indicator, .rtl .obsidian-dev-utils input[type=week]::-webkit-calendar-picker-indicator { left: auto; right: var(--size-4-1); } body:not(.is-ios):not(.is-android) .obsidian-dev-utils input[type=month], body:not(.is-ios):not(.is-android) .obsidian-dev-utils input[type=time], body:not(.is-ios):not(.is-android) .obsidian-dev-utils input[type=week] { padding-inline-start: var(--size-4-6); } .obsidian-dev-utils input[type=time]::-webkit-calendar-picker-indicator { margin-inline-start: 0; } .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; padding-top: 3px; } .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%; } .obsidian-dev-utils.tri-state-checkbox-component input[type=checkbox]:indeterminate { appearance: checkbox; } .obsidian-dev-utils :invalid { box-shadow: 0 0 0 2px var(--text-error); } .obsidian-dev-utils input.metadata-input-text:active:invalid, .obsidian-dev-utils input.metadata-input-text:focus-visible:invalid, .obsidian-dev-utils input.metadata-input-text:focus:invalid, .obsidian-dev-utils input[type=date]:active:invalid, .obsidian-dev-utils input[type=date]:focus-visible:invalid, .obsidian-dev-utils input[type=date]:focus:invalid, .obsidian-dev-utils input[type=datetime-local]:active:invalid, .obsidian-dev-utils input[type=datetime-local]:focus-visible:invalid, .obsidian-dev-utils input[type=datetime-local]:focus:invalid, .obsidian-dev-utils input[type=email]:active:invalid, .obsidian-dev-utils input[type=email]:focus-visible:invalid, .obsidian-dev-utils input[type=email]:focus:invalid, .obsidian-dev-utils input[type=number]:active:invalid, .obsidian-dev-utils input[type=number]:focus-visible:invalid, .obsidian-dev-utils input[type=number]:focus:invalid, .obsidian-dev-utils input[type=password]:active:invalid, .obsidian-dev-utils input[type=password]:focus-visible:invalid, .obsidian-dev-utils input[type=password]:focus:invalid, .obsidian-dev-utils input[type=search]:active:invalid, .obsidian-dev-utils input[type=search]:focus-visible:invalid, .obsidian-dev-utils input[type=search]:focus:invalid, .obsidian-dev-utils input[type=text]:active:invalid, .obsidian-dev-utils input[type=text]:focus-visible:invalid, .obsidian-dev-utils input[type=text]:focus:invalid, .obsidian-dev-utils textarea:active:invalid, .obsidian-dev-utils textarea:focus-visible:invalid, .obsidian-dev-utils textarea:focus:invalid { box-shadow: 0 0 0 2px var(--text-error); } .obsidian-dev-utils.setting-component-wrapper { position: relative; display: inline-flex; } .obsidian-dev-utils.overlay-validator { caret-color: transparent; cursor: default; position: absolute; background-color: transparent; border: none; outline: none; pointer-events: none; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; } .obsidian-dev-utils.tooltip.tooltip-validator { position: absolute; top: calc(100% + 8px); width: max-content; } /*# sourceMappingURL=data:application/json;charset=utf-8,%7B%22version%22:3,%22sourceRoot%22:%22%22,%22sources%22:%5B%22../src/styles/code-highlighter-component.scss%22,%22../src/styles/input.scss%22,%22../src/styles/input-time.scss%22,%22../src/styles/modal-container.scss%22,%22../src/styles/multiple-dropdown-component.scss%22,%22../src/styles/prompt-modal.scss%22,%22../src/styles/tri-state-checkbox-component.scss%22,%22../src/styles/validation.scss%22%5D,%22names%22:%5B%5D,%22mappings%22:%22AAEI;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;;ACnCJ;EACE;;AAGF;AAAA;AAAA;AAAA;AAAA;EAKE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGE;EACE;AAAA;AAAA;AAAA;AAAA;IACE;IACA,YACE;;;AAMR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAEE;EACA,YACE;;AAIJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAGE;;AAGF;AAAA;AAAA;AAAA;AAAA;EACE;;AASE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAGE;;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE;EACA;;;AC7DV;AAAA;AAAA;EAGE;EACA;;AAEA;AAAA;AAAA;EACE;EACA;;AAGF;AAAA;AAAA;EACE;EACA;EACA;EACA;;AAMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAEE;EACA;EACA;;AAIK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAGP;;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE;EACA;;;AAKF;AAAA;AAAA;EACE;;;AAMJ;EACE;;;AChDF;EACE;EACA;;;ACFF;AAAA;AAAA;EAGE;EACA;;AAEA;AAAA;AAAA;EACE;EACA;;;ACRJ;EACE;;;ACDF;EACE;;;ACEJ;EAJA;;AAoBI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EApBJ;;AA0BA;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA%22,%22file%22:%22styles.css%22,%22sourcesContent%22:%5B%22.obsidian-dev-utils%20%7B%5Cn%20%20&.code-highlighter-component%20%7B%5Cn%20%20%20%20textarea,%20pre,%20code%20%7B%5Cn%20%20%20%20%20%20font-family:%20var(--font-monospace);%5Cn%20%20%20%20%20%20line-height:%20var(--line-height-normal);%5Cn%20%20%20%20%20%20margin:%200;%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20textarea,%20code%20%7B%5Cn%20%20%20%20%20%20font-size:%20var(--code-size);%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20textarea%20%7B%5Cn%20%20%20%20%20%20background:%20transparent;%5Cn%20%20%20%20%20%20color:%20transparent;%5Cn%20%20%20%20%20%20z-index:%202;%5Cn%20%20%20%20%20%20width:%2020em;%5Cn%20%20%20%20%20%20height:%2010em;%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20pre%20%7B%5Cn%20%20%20%20%20%20position:%20absolute;%5Cn%20%20%20%20%20%20pointer-events:%20none;%5Cn%20%20%20%20%20%20border:%20var(--input-border-width)%20solid%20transparent;%5Cn%20%20%20%20%20%20overflow:%20auto;%5Cn%20%20%20%20%20%20inset:%200;%5Cn%20%20%20%20%20%20padding:%20var(--size-4-1)%20var(--size-4-2);%5Cn%20%20%20%20%20%20z-index:%201;%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20pre.is-placeholder%20%7B%5Cn%20%20%20%20%20%20opacity:%200.6;%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20code%20%7B%5Cn%20%20%20%20%20%20display:%20block;%5Cn%20%20%20%20%20%20padding:%200;%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%7D%5Cn%22,%22.obsidian-dev-utils%20%7B%5Cn%20%20input%5Btype='url'%5D%20%7B%5Cn%20%20%20%20height:%20var(--input-height)%5Cn%20%20%7D%5Cn%5Cn%20%20input%5Btype='month'%5D,%5Cn%20%20input%5Btype='tel'%5D,%5Cn%20%20input%5Btype='time'%5D,%5Cn%20%20input%5Btype='url'%5D,%5Cn%20%20input%5Btype='week'%5D%20%7B%5Cn%20%20%20%20-webkit-app-region:%20no-drag;%5Cn%20%20%20%20background:%20var(--background-modifier-form-field);%5Cn%20%20%20%20border:%20var(--input-border-width)%20solid%20var(--background-modifier-border);%5Cn%20%20%20%20color:%20var(--text-normal);%5Cn%20%20%20%20font-family:%20inherit;%5Cn%20%20%20%20padding:%20var(--size-4-1)%20var(--size-4-2);%5Cn%20%20%20%20font-size:%20var(--font-ui-small);%5Cn%20%20%20%20border-radius:%20var(--input-radius);%5Cn%20%20%20%20outline:%20none;%5Cn%5Cn%20%20%20%20@at-root%20%7B%5Cn%20%20%20%20%20%20@media%20(hover:%20hover)%20%7B%5Cn%20%20%20%20%20%20%20%20&:hover%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20border-color:%20var(--background-modifier-border-hover);%5Cn%20%20%20%20%20%20%20%20%20%20transition:%5Cn%20%20%20%20%20%20%20%20%20%20%20%20box-shadow%200.15s%20ease-in-out,%5Cn%20%20%20%20%20%20%20%20%20%20%20%20border%200.15s%20ease-in-out;%5Cn%20%20%20%20%20%20%20%20%7D%5Cn%20%20%20%20%20%20%7D%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20&:active,%5Cn%20%20%20%20&:focus%20%7B%5Cn%20%20%20%20%20%20border-color:%20var(--background-modifier-border-focus);%5Cn%20%20%20%20%20%20transition:%5Cn%20%20%20%20%20%20%20%20box-shadow%200.15s%20ease-in-out,%5Cn%20%20%20%20%20%20%20%20border%200.15s%20ease-in-out;%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20&:active,%5Cn%20%20%20%20&:focus,%5Cn%20%20%20%20&:focus-visible%20%7B%5Cn%20%20%20%20%20%20box-shadow:%200%200%200%202px%20var(--background-modifier-border-focus);%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20&::placeholder%20%7B%5Cn%20%20%20%20%20%20color:%20var(--text-faint);%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%5Cn%20%20@at-root%20%7B%5Cn%20%20%20%20.mod-rtl,%5Cn%20%20%20%20.is-rtl,%5Cn%20%20%20%20.rtl%20%7B%5Cn%20%20%20%20%20%20&%20%7B%5Cn%20%20%20%20%20%20%20%20input%5Btype='month'%5D,%5Cn%20%20%20%20%20%20%20%20input%5Btype='time'%5D,%5Cn%20%20%20%20%20%20%20%20input%5Btype='week'%5D%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20direction:%20rtl;%5Cn%5Cn%20%20%20%20%20%20%20%20%20%20&::-webkit-calendar-picker-indicator%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20%20%20right:%20var(--size-4-1);%5Cn%20%20%20%20%20%20%20%20%20%20%20%20left:%20auto;%5Cn%20%20%20%20%20%20%20%20%20%20%7D%5Cn%20%20%20%20%20%20%20%20%7D%5Cn%20%20%20%20%20%20%7D%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%7D%5Cn%22,%22.obsidian-dev-utils%20%7B%5Cn%20%20input%5Btype='month'%5D,%5Cn%20%20input%5Btype='time'%5D,%5Cn%20%20input%5Btype='week'%5D%20%7B%5Cn%20%20%20%20font-variant-numeric:%20tabular-nums;%5Cn%20%20%20%20position:%20relative;%5Cn%5Cn%20%20%20%20&::-webkit-datetime-edit-text%20%7B%5Cn%20%20%20%20%20%20color:%20var(--text-faint);%5Cn%20%20%20%20%20%20padding-inline-end:%200;%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20&::-webkit-calendar-picker-indicator%20%7B%5Cn%20%20%20%20%20%20position:%20absolute;%5Cn%20%20%20%20%20%20left:%20var(--size-4-1);%5Cn%20%20%20%20%20%20right:%20auto;%5Cn%20%20%20%20%20%20opacity:%200.5;%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20&::-webkit-datetime-edit-month-field,%5Cn%20%20%20%20&::-webkit-datetime-edit-day-field,%5Cn%20%20%20%20&::-webkit-datetime-edit-year-field%20%7B%5Cn%20%20%20%20%20%20&:active,%5Cn%20%20%20%20%20%20&:focus%20%7B%5Cn%20%20%20%20%20%20%20%20background-color:%20var(--text-selection);%5Cn%20%20%20%20%20%20%20%20color:%20var(--text-normal);%5Cn%20%20%20%20%20%20%20%20cursor:%20text;%5Cn%20%20%20%20%20%20%7D%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20@at-root%20.mod-rtl%20&,%5Cn%20%20%20%20%20%20.is-rtl%20&,%5Cn%20%20%20%20%20%20.rtl%20&%20%7B%5Cn%20%20%20%20%20%20direction:%20rtl;%5Cn%5Cn%20%20%20%20%20%20&::-webkit-calendar-picker-indicator%20%7B%5Cn%20%20%20%20%20%20%20%20left:%20auto;%5Cn%20%20%20%20%20%20%20%20right:%20var(--size-4-1);%5Cn%20%20%20%20%20%20%7D%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20@at-root%20%7B%5Cn%20%20%20%20%20%20body:not(.is-ios):not(.is-android)%20&%20%7B%5Cn%20%20%20%20%20%20%20%20padding-inline-start:%20var(--size-4-6);%5Cn%20%20%20%20%20%20%7D%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%5Cn%20%20input%5Btype='time'%5D%20%7B%5Cn%20%20%20%20&::-webkit-calendar-picker-indicator%20%7B%5Cn%20%20%20%20%20%20margin-inline-start:%200;%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%7D%5Cn%22,%22.obsidian-dev-utils%20%7B%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%7D%5Cn%22,%22.obsidian-dev-utils%20%7B%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%20%20%20%20%20%20padding-top:%203px;%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%7D%5Cn%22,%22.obsidian-dev-utils%20%7B%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,%22.obsidian-dev-utils%20%7B%5Cr%5Cn%20%20&.tri-state-checkbox-component%20%7B%5Cr%5Cn%20%20%20%20input%5Btype='checkbox'%5D:indeterminate%20%7B%5Cr%5Cn%20%20%20%20%20%20appearance:%20checkbox;%5Cr%5Cn%20%20%20%20%7D%5Cr%5Cn%20%20%7D%5Cr%5Cn%7D%5Cr%5Cn%22,%22@mixin%20invalid%20%7B%5Cn%20%20box-shadow:%200%200%200%202px%20var(--text-error);%5Cn%7D%5Cn%5Cn.obsidian-dev-utils%20%7B%5Cn%20%20:invalid%20%7B%5Cn%20%20%20%20@include%20invalid;%5Cn%20%20%7D%5Cn%5Cn%20%20input.metadata-input-text,%5Cn%20%20input%5Btype='date'%5D,%5Cn%20%20input%5Btype='datetime-local'%5D,%5Cn%20%20input%5Btype='email'%5D,%5Cn%20%20input%5Btype='number'%5D,%5Cn%20%20input%5Btype='password'%5D,%5Cn%20%20input%5Btype='search'%5D,%5Cn%20%20input%5Btype='text'%5D,%5Cn%20%20textarea%20%7B%5Cn%20%20%20%20&:active,%5Cn%20%20%20%20&:focus-visible,%5Cn%20%20%20%20&:focus%20%7B%5Cn%20%20%20%20%20%20&:invalid%20%7B%5Cn%20%20%20%20%20%20%20%20@include%20invalid;%5Cn%20%20%20%20%20%20%7D%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%5Cn%20%20&.setting-component-wrapper%20%7B%5Cn%20%20%20%20position:%20relative;%5Cn%20%20%20%20display:%20inline-flex;%5Cn%20%20%7D%5Cn%5Cn%20%20&.overlay-validator%20%7B%5Cn%20%20%20%20caret-color:%20transparent;%5Cn%20%20%20%20cursor:%20default;%5Cn%20%20%20%20position:%20absolute;%5Cn%20%20%20%20background-color:%20transparent;%5Cn%20%20%20%20border:%20none;%5Cn%20%20%20%20outline:%20none;%5Cn%20%20%20%20pointer-events:%20none;%5Cn%20%20%20%20z-index:%209999;%5Cn%20%20%20%20left:%200;%5Cn%20%20%20%20top:%200;%5Cn%20%20%20%20width:%20100%25;%5Cn%20%20%20%20height:%20100%25;%5Cn%20%20%7D%5Cn%5Cn%20%20&.tooltip.tooltip-validator%20%7B%5Cn%20%20%20%20position:%20absolute;%5Cn%20%20%20%20top:%20calc(100%25%20+%208px);%5Cn%20%20%20%20width:%20max-content;%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 Xe=class{eventRefsMap=new Map;off(t,n){let i=this.eventRefsMap.get(t);i&&(Bt(i,s=>s.callback!==n),i.length===0&&this.eventRefsMap.delete(t))}offref(t){let n=this.eventRefsMap.get(t.name);n&&(Bt(n,i=>i!==t),n.length===0&&this.eventRefsMap.delete(t.name))}on(t,n,i){let s=this.eventRefsMap.get(t);s||(s=[],this.eventRefsMap.set(t,s));let a={asyncEvents:this,callback:n,name:t,thisArg:i};return s.push(a),a}once(t,n,i){let s=this.on(t,n,i),a=this.on(t,()=>{this.offref(s),this.offref(a)});return s}trigger(t,...n){let i=this.eventRefsMap.get(t)??[];for(let s of i.slice())this.tryTrigger(s,n)}async triggerAsync(t,...n){let i=this.eventRefsMap.get(t)??[];for(let s of i.slice())await this.tryTriggerAsync(s,n)}tryTrigger(t,n){try{t.callback.apply(t.thisArg,n)}catch(i){setTimeout(()=>{throw i},0)}}async tryTriggerAsync(t,n){try{await t.callback.call(t.thisArg,...n)}catch(i){setTimeout(()=>{throw i},0)}}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Xi="asyncError",np=`Error stack: `,br="An unhandled error occurred executing async operation",wr=new Xe;wr.on(Xi,rp);function xr(e){wr.trigger(Xi,e)}function ca(e,t){t??=globalThis.console;let n=da(e);for(let i of n)i.shouldClearAnsiSequence?t.error(`\x1B[0m${i.message}\x1B[0m`):t.error(i.message)}function fa(e){let t=wr.on(Xi,e);return()=>{wr.offref(t)}}function sn(e){throw e}function rp(e){ca(e)}function da(e,t=0,n=[]){if(e===void 0)return n;if(!(e instanceof Error)){let s;return e===null?s="(null)":typeof e=="string"?s=e:s=JSON.stringify(e)??"undefined",n.push({level:t,message:s}),n}let i=`${e.name}: ${e.message}`;if(n.push({level:t,message:i,shouldClearAnsiSequence:!0}),e.stack){let s=e.stack.startsWith(i)?e.stack.slice(i.length+1):e.stack;n.push({level:t,message:`${np}${s}`})}return e.cause!==void 0&&(n.push({level:t,message:"Caused by:"}),da(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 Wt(){}async function Ke(){}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var eo=class{constructor(t){this.value=t}};function ip(){try{return globalThis.require("obsidian/app")}catch{return globalThis.app??sn(new Error("Obsidian app not found"))}}function Dn(e,t,n){let s=e??op()??globalThis;return s.obsidianDevUtilsState??={},s.obsidianDevUtilsState[t]??=new eo(n)}function op(){return typeof window>"u"?null:ip()}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var to="__no-plugin-id-initialized__",ha=to;function vr(){return ha}function pa(e){e&&(ha=e)}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var ma=",",Cr="-";function ga(){return{disable:sp,enable:ap,get:Sr,set:Fn}}function Ar(e,t=0){let n=`${e}:${t.toString()}`,i=Dn(null,"debuggers",new Map).value,s=i.get(n);return s||(s=an()(e),s.log=(a,...u)=>{lp(e,t,a,...u)},s.printStackTrace=(a,u)=>{wa(e,a,u)},i.set(n,s)),s}function ro(e){let t=vr(),n=t===to?"":`${t}:`;return Ar(`${n}${kr}:${e}`)}function ya(e){let t=an().enabled(e),n=t?"enabled":"disabled",i=t?"disable":"enable",s=Sr();Fn(e),Ar(e)(`Debug messages for plugin ${e} are ${n}. See https://github.com/mnaoumov/obsidian-dev-utils/blob/main/docs/debugging.md how to ${i} them.`),Fn(s)}function sp(e){let t=new Set(Sr());for(let n of Ln(e)){if(n.startsWith(Cr))continue;let i=Cr+n;t.has(n)&&t.delete(n),t.add(i)}Fn(Array.from(t))}function ap(e){let t=new Set(Sr());for(let n of Ln(e)){if(!n.startsWith(Cr)){let i=Cr+n;t.has(i)&&t.delete(i)}t.add(n)}Fn(Array.from(t))}function Sr(){return Ln(an().load()??"")}function an(){return typeof window>"u"?no.default:Dn(null,"debug",no.default).value}function ka(){return typeof window<"u"}function lp(e,t,n,...i){if(!an().enabled(e))return;let u=(new Error().stack?.split(` `)??[])[4+t]??"";console.debug(n,...i),ka()&&wa(e,u,"Debug message caller")}function wa(e,t,n){let i=an()(e);if(!i.enabled)return;t||(t="(unavailable)"),(n??"")||(n="Caller stack trace"),i(n);let s=ka()?`StackTraceFakeError `:"";console.debug(`${s}${t}`)}function Fn(e){an().enable(Ln(e).join(ma))}function Ln(e){return typeof e=="string"?e.split(ma).filter(Boolean):e.flatMap(Ln)}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();async function up(e){let t=new Error(br);try{await e()}catch(n){t.cause=n,xr(t)}}function In(e){return(...t)=>{et(()=>e(...t))}}function et(e){up(e)}function ba(e,t=0){setTimeout(In(async()=>await e()),t)}async function xa(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();async function io(e){if(!va(e)){if(e instanceof HTMLBodyElement||e instanceof HTMLImageElement||e instanceof HTMLIFrameElement||e instanceof HTMLEmbedElement||e instanceof HTMLLinkElement||e instanceof HTMLObjectElement||e instanceof HTMLStyleElement||e instanceof HTMLTrackElement){await new Promise(t=>{e.addEventListener("load",t),e.addEventListener("error",t)});return}await Promise.all(Ca(e).map(io))}}function va(e){return e instanceof HTMLBodyElement?document.readyState==="complete"||document.readyState==="interactive":e instanceof HTMLImageElement?e.complete&&e.naturalWidth>0:e instanceof HTMLIFrameElement?!!e.contentDocument:e instanceof HTMLEmbedElement?!!e.getSVGDocument():e instanceof HTMLLinkElement?e.rel==="stylesheet"?e.sheet!==null:!0:e instanceof HTMLObjectElement?!!e.contentDocument||!!e.getSVGDocument():e instanceof HTMLScriptElement?!0:e instanceof HTMLStyleElement?!!e.sheet:e instanceof HTMLTrackElement?e.readyState===2:Ca(e).every(va)}function Ca(e){return Array.from(e.querySelectorAll("body, img, iframe, embed, link, object, script, style, track"))}var ku=require("obsidian");var cp=require("obsidian"),fp=require("obsidian"),dp=require("obsidian"),V0=require("obsidian"),U0=require("obsidian");var Ct={AudioRecorder:"audio-recorder",Backlink:"backlink",Bases:"bases",Bookmarks:"bookmarks",Canvas:"canvas",CommandPalette:"command-palette",DailyNotes:"daily-notes",EditorStatus:"editor-status",FileExplorer:"file-explorer",FileRecovery:"file-recovery",Footnotes:"footnotes",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",Webviewer:"webviewer",WordCount:"word-count",Workspaces:"workspaces",ZkPrefixer:"zk-prefixer"},Aa={AllProperties:"all-properties",Audio:"audio",Backlink:Ct.Backlink,Bookmarks:Ct.Bookmarks,Canvas:Ct.Canvas,Empty:"empty",FileExplorer:Ct.FileExplorer,FileProperties:"file-properties",Graph:Ct.Graph,Image:"image",LocalGraph:"localgraph",Markdown:"markdown",OutgoingLink:Ct.OutgoingLink,Outline:Ct.Outline,Pdf:"pdf",ReleaseNotes:"release-notes",Search:"search",Sync:"sync",Table:"table",Tag:"tag",Video:"video",Webviewer:"webviewer",WebviewerHistory:"webviewer-history"};var hp={};function zt(e,t){let n=t||hp,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ea(e,i,s)}function Ea(e,t,n){if(pp(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 Sa(e.children,t,n)}return Array.isArray(e)?Sa(e,t,n):""}function Sa(e,t,n){let i=[],s=-1;for(;++ss?0:s+t:t=t>s?s:t,n=n>0?n:0,i.length<1e4)u=Array.from(i),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a0?(ge(e,e.length,0,t),e):t}var Ta={}.hasOwnProperty;function Ma(e){let t={},n=-1;for(;++n13&&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 mt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Le=At(/[A-Za-z]/),Me=At(/[\dA-Za-z]/),Pa=At(/[#-'*+\--9=?A-Z^-~]/);function On(e){return e!==null&&(e<32||e===127)}var Rn=At(/\d/),Da=At(/[\dA-Fa-f]/),Fa=At(/[!-/:-@[-`{-~]/);function R(e){return e!==null&&e<-2}function ce(e){return e!==null&&(e<0||e===32)}function U(e){return e===-2||e===-1||e===32}var La=At(/\p{P}|\p{S}/u),Ia=At(/\s/);function At(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function H(e,t,n,i){let s=i?i-1:Number.POSITIVE_INFINITY,a=0;return u;function u(d){return U(d)?(e.enter(n),c(d)):t(d)}function c(d){return U(d)&&a++u))return;let Z=t.events.length,j=Z,$,te;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if($){te=t.events[j][1].end;break}$=!0}for(v(i),S=Z;SM;){let Y=n[B];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=M}function _(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function wp(e,t,n){return H(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function un(e){if(e===null||ce(e)||Ia(e))return 1;if(La(e))return 2}function cn(e,t,n){let i=[],s=-1;for(;++s1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let y={...e[i][1].end},g={...e[n][1].start};Ba(y,-d),Ba(g,d),u={type:d>1?"strongSequence":"emphasisSequence",start:y,end:{...e[i][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},a={type:d>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...u.start},end:{...c.end}},e[i][1].end={...u.start},e[n][1].start={...c.end},p=[],e[i][1].end.offset-e[i][1].start.offset&&(p=Te(p,[["enter",e[i][1],t],["exit",e[i][1],t]])),p=Te(p,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),p=Te(p,cn(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),p=Te(p,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,p=Te(p,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,ge(e,i-1,n-i+3,p),n=i+p.length-h-2;break}}for(n=-1;++n0&&U(S)?H(e,_,"linePrefix",a+1)(S):_(S)}function _(S){return S===null||R(S)?e.check(Ya,F,B)(S):(e.enter("codeFlowValue"),M(S))}function M(S){return S===null||R(S)?(e.exit("codeFlowValue"),_(S)):(e.consume(S),M)}function B(S){return e.exit("codeFenced"),t(S)}function Y(S,Z,j){let $=0;return te;function te(W){return S.enter("lineEnding"),S.consume(W),S.exit("lineEnding"),ie}function ie(W){return S.enter("codeFencedFence"),U(W)?H(S,Q,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):Q(W)}function Q(W){return W===c?(S.enter("codeFencedFenceSequence"),N(W)):j(W)}function N(W){return W===c?($++,S.consume(W),N):$>=u?(S.exit("codeFencedFenceSequence"),U(W)?H(S,V,"whitespace")(W):V(W)):j(W)}function V(W){return W===null||R(W)?(S.exit("codeFencedFence"),Z(W)):j(W)}}}function Pp(e,t,n){let i=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return i.parser.lazy[i.now().line]?n(u):t(u)}}var Bn={name:"codeIndented",tokenize:Fp},Dp={partial:!0,tokenize:Lp};function Fp(e,t,n){let i=this;return s;function s(p){return e.enter("codeIndented"),H(e,a,"linePrefix",5)(p)}function a(p){let h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?u(p):n(p)}function u(p){return p===null?d(p):R(p)?e.attempt(Dp,u,d)(p):(e.enter("codeFlowValue"),c(p))}function c(p){return p===null||R(p)?(e.exit("codeFlowValue"),u(p)):(e.consume(p),c)}function d(p){return e.exit("codeIndented"),t(p)}}function Lp(e,t,n){let i=this;return s;function s(u){return i.parser.lazy[i.now().line]?n(u):R(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):H(e,a,"linePrefix",5)(u)}function a(u){let c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):R(u)?s(u):n(u)}}var so={name:"codeText",previous:Op,resolve:Ip,tokenize:Rp};function Ip(e){let t=e.length-4,n=3,i,s;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=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 tthis.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 s=n||0;this.setCursor(Math.trunc(t));let a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&Yn(this.left,i),a.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),Yn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Yn(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=4?t(u):e.interrupt(i.parser.constructs.flow,n,t)(u)}}function Lr(e,t,n,i,s,a,u,c,d){let p=d||Number.POSITIVE_INFINITY,h=0;return y;function y(v){return v===60?(e.enter(i),e.enter(s),e.enter(a),e.consume(v),e.exit(a),g):v===null||v===32||v===41||On(v)?n(v):(e.enter(i),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),F(v))}function g(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(s),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),k(v))}function k(v){return v===62?(e.exit("chunkString"),e.exit(c),g(v)):v===null||v===60||R(v)?n(v):(e.consume(v),v===92?A:k)}function A(v){return v===60||v===62||v===92?(e.consume(v),k):k(v)}function F(v){return!h&&(v===null||v===41||ce(v))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(i),t(v)):h999||k===null||k===91||k===93&&!d||k===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(k):k===93?(e.exit(a),e.enter(s),e.consume(k),e.exit(s),e.exit(i),t):R(k)?(e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),y(k))}function y(k){return k===null||k===91||k===93||R(k)||c++>999?(e.exit("chunkString"),h(k)):(e.consume(k),d||(d=!U(k)),k===92?g:y)}function g(k){return k===91||k===92||k===93?(e.consume(k),c++,y):y(k)}}function Or(e,t,n,i,s,a){let u;return c;function c(g){return g===34||g===39||g===40?(e.enter(i),e.enter(s),e.consume(g),e.exit(s),u=g===40?41:g,d):n(g)}function d(g){return g===u?(e.enter(s),e.consume(g),e.exit(s),e.exit(i),t):(e.enter(a),p(g))}function p(g){return g===u?(e.exit(a),d(u)):g===null?n(g):R(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),H(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===u||g===null||R(g)?(e.exit("chunkString"),p(g)):(e.consume(g),g===92?y:h)}function y(g){return g===u||g===92?(e.consume(g),h):h(g)}}function Vt(e,t){let n;return i;function i(s){return R(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,i):U(s)?H(e,i,n?"linePrefix":"lineSuffix")(s):t(s)}}var lo={name:"definition",tokenize:Up},Vp={partial:!0,tokenize:Hp};function Up(e,t,n){let i=this,s;return a;function a(k){return e.enter("definition"),u(k)}function u(k){return Ir.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(k)}function c(k){return s=mt(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),d):n(k)}function d(k){return ce(k)?Vt(e,p)(k):p(k)}function p(k){return Lr(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(k)}function h(k){return e.attempt(Vp,y,y)(k)}function y(k){return U(k)?H(e,g,"whitespace")(k):g(k)}function g(k){return k===null||R(k)?(e.exit("definition"),i.parser.defined.push(s),t(k)):n(k)}}function Hp(e,t,n){return i;function i(c){return ce(c)?Vt(e,s)(c):n(c)}function s(c){return Or(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return U(c)?H(e,u,"whitespace")(c):u(c)}function u(c){return c===null||R(c)?t(c):n(c)}}var uo={name:"hardBreakEscape",tokenize:jp};function jp(e,t,n){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return R(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}var co={name:"headingAtx",resolve:$p,tokenize:Gp};function $p(e,t){let n=e.length-2,i=3,s,a;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&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},a={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},ge(e,i,n-i+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function Gp(e,t,n){let i=0;return s;function s(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),u(h)}function u(h){return h===35&&i++<6?(e.consume(h),u):h===null||ce(h)?(e.exit("atxHeadingSequence"),c(h)):n(h)}function c(h){return h===35?(e.enter("atxHeadingSequence"),d(h)):h===null||R(h)?(e.exit("atxHeading"),t(h)):U(h)?H(e,c,"whitespace")(h):(e.enter("atxHeadingText"),p(h))}function d(h){return h===35?(e.consume(h),d):(e.exit("atxHeadingSequence"),c(h))}function p(h){return h===null||h===35||ce(h)?(e.exit("atxHeadingText"),c(h)):(e.consume(h),p)}}var Wa=["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"],fo=["pre","script","style","textarea"];var ho={concrete:!0,name:"htmlFlow",resolveTo:Zp,tokenize:Jp},qp={partial:!0,tokenize:Xp},Kp={partial:!0,tokenize:Qp};function Zp(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 Jp(e,t,n){let i=this,s,a,u,c,d;return p;function p(w){return h(w)}function h(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),y}function y(w){return w===33?(e.consume(w),g):w===47?(e.consume(w),a=!0,F):w===63?(e.consume(w),s=3,i.interrupt?t:x):Le(w)?(e.consume(w),u=String.fromCharCode(w),T):n(w)}function g(w){return w===45?(e.consume(w),s=2,k):w===91?(e.consume(w),s=5,c=0,A):Le(w)?(e.consume(w),s=4,i.interrupt?t:x):n(w)}function k(w){return w===45?(e.consume(w),i.interrupt?t:x):n(w)}function A(w){let Ce="CDATA[";return w===Ce.charCodeAt(c++)?(e.consume(w),c===Ce.length?i.interrupt?t:Q:A):n(w)}function F(w){return Le(w)?(e.consume(w),u=String.fromCharCode(w),T):n(w)}function T(w){if(w===null||w===47||w===62||ce(w)){let Ce=w===47,it=u.toLowerCase();return!Ce&&!a&&fo.includes(it)?(s=1,i.interrupt?t(w):Q(w)):Wa.includes(u.toLowerCase())?(s=6,Ce?(e.consume(w),v):i.interrupt?t(w):Q(w)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(w):a?_(w):M(w))}return w===45||Me(w)?(e.consume(w),u+=String.fromCharCode(w),T):n(w)}function v(w){return w===62?(e.consume(w),i.interrupt?t:Q):n(w)}function _(w){return U(w)?(e.consume(w),_):te(w)}function M(w){return w===47?(e.consume(w),te):w===58||w===95||Le(w)?(e.consume(w),B):U(w)?(e.consume(w),M):te(w)}function B(w){return w===45||w===46||w===58||w===95||Me(w)?(e.consume(w),B):Y(w)}function Y(w){return w===61?(e.consume(w),S):U(w)?(e.consume(w),Y):M(w)}function S(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),d=w,Z):U(w)?(e.consume(w),S):j(w)}function Z(w){return w===d?(e.consume(w),d=null,$):w===null||R(w)?n(w):(e.consume(w),Z)}function j(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||ce(w)?Y(w):(e.consume(w),j)}function $(w){return w===47||w===62||U(w)?M(w):n(w)}function te(w){return w===62?(e.consume(w),ie):n(w)}function ie(w){return w===null||R(w)?Q(w):U(w)?(e.consume(w),ie):n(w)}function Q(w){return w===45&&s===2?(e.consume(w),X):w===60&&s===1?(e.consume(w),ae):w===62&&s===4?(e.consume(w),ye):w===63&&s===3?(e.consume(w),x):w===93&&s===5?(e.consume(w),Pe):R(w)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(qp,ke,N)(w)):w===null||R(w)?(e.exit("htmlFlowData"),N(w)):(e.consume(w),Q)}function N(w){return e.check(Kp,V,ke)(w)}function V(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),W}function W(w){return w===null||R(w)?N(w):(e.enter("htmlFlowData"),Q(w))}function X(w){return w===45?(e.consume(w),x):Q(w)}function ae(w){return w===47?(e.consume(w),u="",le):Q(w)}function le(w){if(w===62){let Ce=u.toLowerCase();return fo.includes(Ce)?(e.consume(w),ye):Q(w)}return Le(w)&&u.length<8?(e.consume(w),u+=String.fromCharCode(w),le):Q(w)}function Pe(w){return w===93?(e.consume(w),x):Q(w)}function x(w){return w===62?(e.consume(w),ye):w===45&&s===2?(e.consume(w),x):Q(w)}function ye(w){return w===null||R(w)?(e.exit("htmlFlowData"),ke(w)):(e.consume(w),ye)}function ke(w){return e.exit("htmlFlow"),t(w)}}function Qp(e,t,n){let i=this;return s;function s(u){return R(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return i.parser.lazy[i.now().line]?n(u):t(u)}}function Xp(e,t,n){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(St,t,n)}}var po={name:"htmlText",tokenize:em};function em(e,t,n){let i=this,s,a,u;return c;function c(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),d}function d(x){return x===33?(e.consume(x),p):x===47?(e.consume(x),Y):x===63?(e.consume(x),M):Le(x)?(e.consume(x),j):n(x)}function p(x){return x===45?(e.consume(x),h):x===91?(e.consume(x),a=0,A):Le(x)?(e.consume(x),_):n(x)}function h(x){return x===45?(e.consume(x),k):n(x)}function y(x){return x===null?n(x):x===45?(e.consume(x),g):R(x)?(u=y,ae(x)):(e.consume(x),y)}function g(x){return x===45?(e.consume(x),k):y(x)}function k(x){return x===62?X(x):x===45?g(x):y(x)}function A(x){let ye="CDATA[";return x===ye.charCodeAt(a++)?(e.consume(x),a===ye.length?F:A):n(x)}function F(x){return x===null?n(x):x===93?(e.consume(x),T):R(x)?(u=F,ae(x)):(e.consume(x),F)}function T(x){return x===93?(e.consume(x),v):F(x)}function v(x){return x===62?X(x):x===93?(e.consume(x),v):F(x)}function _(x){return x===null||x===62?X(x):R(x)?(u=_,ae(x)):(e.consume(x),_)}function M(x){return x===null?n(x):x===63?(e.consume(x),B):R(x)?(u=M,ae(x)):(e.consume(x),M)}function B(x){return x===62?X(x):M(x)}function Y(x){return Le(x)?(e.consume(x),S):n(x)}function S(x){return x===45||Me(x)?(e.consume(x),S):Z(x)}function Z(x){return R(x)?(u=Z,ae(x)):U(x)?(e.consume(x),Z):X(x)}function j(x){return x===45||Me(x)?(e.consume(x),j):x===47||x===62||ce(x)?$(x):n(x)}function $(x){return x===47?(e.consume(x),X):x===58||x===95||Le(x)?(e.consume(x),te):R(x)?(u=$,ae(x)):U(x)?(e.consume(x),$):X(x)}function te(x){return x===45||x===46||x===58||x===95||Me(x)?(e.consume(x),te):ie(x)}function ie(x){return x===61?(e.consume(x),Q):R(x)?(u=ie,ae(x)):U(x)?(e.consume(x),ie):$(x)}function Q(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),s=x,N):R(x)?(u=Q,ae(x)):U(x)?(e.consume(x),Q):(e.consume(x),V)}function N(x){return x===s?(e.consume(x),s=void 0,W):x===null?n(x):R(x)?(u=N,ae(x)):(e.consume(x),N)}function V(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||ce(x)?$(x):(e.consume(x),V)}function W(x){return x===47||x===62||ce(x)?$(x):n(x)}function X(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function ae(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),le}function le(x){return U(x)?H(e,Pe,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):Pe(x)}function Pe(x){return e.enter("htmlTextData"),u(x)}}var Ut={name:"labelEnd",resolveAll:im,resolveTo:om,tokenize:sm},tm={tokenize:am},nm={tokenize:lm},rm={tokenize:um};function im(e){let t=-1,n=[];for(;++t=3&&(p===null||R(p))?(e.exit("thematicBreak"),t(p)):n(p)}function d(p){return p===s?(e.consume(p),i++,d):(e.exit("thematicBreakSequence"),U(p)?H(e,c,"whitespace")(p):c(p))}}var xe={continuation:{tokenize:ym},exit:wm,name:"list",tokenize:gm},pm={partial:!0,tokenize:bm},mm={partial:!0,tokenize:km};function gm(e,t,n){let i=this,s=i.events[i.events.length-1],a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return c;function c(k){let A=i.containerState.type||(k===42||k===43||k===45?"listUnordered":"listOrdered");if(A==="listUnordered"?!i.containerState.marker||k===i.containerState.marker:Rn(k)){if(i.containerState.type||(i.containerState.type=A,e.enter(A,{_container:!0})),A==="listUnordered")return e.enter("listItemPrefix"),k===42||k===45?e.check(Ht,n,p)(k):p(k);if(!i.interrupt||k===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(k)}return n(k)}function d(k){return Rn(k)&&++u<10?(e.consume(k),d):(!i.interrupt||u<2)&&(i.containerState.marker?k===i.containerState.marker:k===41||k===46)?(e.exit("listItemValue"),p(k)):n(k)}function p(k){return e.enter("listItemMarker"),e.consume(k),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||k,e.check(St,i.interrupt?n:h,e.attempt(pm,g,y))}function h(k){return i.containerState.initialBlankLine=!0,a++,g(k)}function y(k){return U(k)?(e.enter("listItemPrefixWhitespace"),e.consume(k),e.exit("listItemPrefixWhitespace"),g):n(k)}function g(k){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(k)}}function ym(e,t,n){let i=this;return i.containerState._closeFlow=void 0,e.check(St,s,a);function s(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,H(e,t,"listItemIndent",i.containerState.size+1)(c)}function a(c){return i.containerState.furtherBlankLines||!U(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,u(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(mm,t,u)(c))}function u(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,H(e,e.attempt(xe,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function km(e,t,n){let i=this;return H(e,s,"listItemIndent",i.containerState.size+1);function s(a){let u=i.events[i.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===i.containerState.size?t(a):n(a)}}function wm(e){e.exit(this.containerState.type)}function bm(e,t,n){let i=this;return H(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){let u=i.events[i.events.length-1];return!U(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}var Rr={name:"setextUnderline",resolveTo:xm,tokenize:vm};function xm(e,t){let n=e.length,i,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);let u={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",u,t]),e.splice(a+1,0,["exit",e[i][1],t]),e[i][1].end={...e[a][1].end}):e[i][1]=u,e.push(["exit",u,t]),e}function vm(e,t,n){let i=this,s;return a;function a(p){let h=i.events.length,y;for(;h--;)if(i.events[h][1].type!=="lineEnding"&&i.events[h][1].type!=="linePrefix"&&i.events[h][1].type!=="content"){y=i.events[h][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||y)?(e.enter("setextHeadingLine"),s=p,u(p)):n(p)}function u(p){return e.enter("setextHeadingLineSequence"),c(p)}function c(p){return p===s?(e.consume(p),c):(e.exit("setextHeadingLineSequence"),U(p)?H(e,d,"lineSuffix")(p):d(p))}function d(p){return p===null||R(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}var za={tokenize:Cm};function Cm(e){let t=this,n=e.attempt(St,i,e.attempt(this.parser.constructs.flowInitial,s,H(e,e.attempt(this.parser.constructs.flow,s,e.attempt(ao,s)),"linePrefix")));return n;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var Va={resolveAll:$a()},Ua=ja("string"),Ha=ja("text");function ja(e){return{resolveAll:$a(e==="text"?Am:void 0),tokenize:t};function t(n){let i=this,s=this.parser.constructs[e],a=n.attempt(s,u,c);return u;function u(h){return p(h)?a(h):c(h)}function c(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),d}function d(h){return p(h)?(n.exit("data"),a(h)):(n.consume(h),d)}function p(h){if(h===null)return!0;let y=s[h],g=-1;if(y)for(;++gFm,contentInitial:()=>Em,disable:()=>Lm,document:()=>Sm,flow:()=>Tm,flowInitial:()=>_m,insideSpan:()=>Dm,string:()=>Mm,text:()=>Pm});var Sm={42:xe,43:xe,45:xe,48:xe,49:xe,50:xe,51:xe,52:xe,53:xe,54:xe,55:xe,56:xe,57:xe,62:_r},Em={91:lo},_m={[-2]:Bn,[-1]:Bn,32:Bn},Tm={35:co,42:Ht,45:[Rr,Ht],60:ho,61:Rr,95:Ht,96:Pr,126:Pr},Mm={38:Mr,92:Tr},Pm={[-5]:Wn,[-4]:Wn,[-3]:Wn,33:mo,38:Mr,42:Nn,60:[oo,po],91:go,92:[uo,Tr],93:Ut,95:Nn,96:so},Dm={null:[Nn,Va]},Fm={null:[42,95]},Lm={null:[]};function Ga(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},s={},a=[],u=[],c=[],d=!0,p={attempt:$(Z),check:$(j),consume:B,enter:Y,exit:S,interrupt:$(j,{interrupt:!0})},h={code:null,containerState:{},defineSkip:v,events:[],now:T,parser:e,previous:null,sliceSerialize:A,sliceStream:F,write:k},y=t.tokenize.call(h,p),g;return t.resolveAll&&a.push(t),h;function k(N){return u=Te(u,N),_(),u[u.length-1]!==null?[]:(te(t,0),h.events=cn(a,h.events,h),h.events)}function A(N,V){return Om(F(N),V)}function F(N){return Im(u,N)}function T(){let{_bufferIndex:N,_index:V,line:W,column:X,offset:ae}=i;return{_bufferIndex:N,_index:V,line:W,column:X,offset:ae}}function v(N){s[N.line]=N.column,Q()}function _(){let N;for(;i._index-1){let c=u[0];typeof c=="string"?u[0]=c.slice(i):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function Om(e,t){let n=-1,i=[],s;for(;++n0){let we=L.tokenStack[L.tokenStack.length-1];(we[1]||Ja).call(L,void 0,we[0])}for(D.position={start:_t(E.length>0?E[0][1].start:{line:1,column:1,offset:0}),end:_t(E.length>0?E[E.length-2][1].end:{line:1,column:1,offset:0})},ne=-1;++ne "),a.shift(2);let u=n.indentLines(n.containerFlow(e,a.current()),Vm);return s(),u}function Vm(e,t,n){return">"+(n?"":" ")+e}function Br(e,t){return il(e,t.inConstruct,!0)&&!il(e,t.notInConstruct,!1)}function il(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++iu&&(u=a):a=1,s=i+t.length,i=n.indexOf(t,s);return u}function zn(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 sl(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 al(e,t,n,i){let s=sl(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(zn(e,n)){let y=n.enter("codeIndented"),g=n.indentLines(a,Um);return y(),g}let c=n.createTracker(i),d=s.repeat(Math.max(ol(a,s)+1,3)),p=n.enter("codeFenced"),h=c.move(d);if(e.lang){let y=n.enter(`codeFencedLang${u}`);h+=c.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...c.current()})),y()}if(e.lang&&e.meta){let y=n.enter(`codeFencedMeta${u}`);h+=c.move(" "),h+=c.move(n.safe(e.meta,{before:h,after:` `,encode:["`"],...c.current()})),y()}return h+=c.move(` `),a&&(h+=c.move(a+` `)),h+=c.move(d),p(),h}function Um(e,t,n){return(n?"":" ")+e}function dn(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 ll(e,t,n,i){let s=dn(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition"),c=n.enter("label"),d=n.createTracker(i),p=d.move("[");return p+=d.move(n.safe(n.associationId(e),{before:p,after:"]",...d.current()})),p+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),p+=d.move("<"),p+=d.move(n.safe(e.url,{before:p,after:">",...d.current()})),p+=d.move(">")):(c=n.enter("destinationRaw"),p+=d.move(n.safe(e.url,{before:p,after:e.title?" ":` `,...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),p+=d.move(" "+s),p+=d.move(n.safe(e.title,{before:p,after:s,...d.current()})),p+=d.move(s),c()),u(),p}function ul(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 Ie(e){return"&#x"+e.toString(16).toUpperCase()+";"}function hn(e,t,n){let i=un(e),s=un(t);return i===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}So.peek=Hm;function So(e,t,n,i){let s=ul(n),a=n.enter("emphasis"),u=n.createTracker(i),c=u.move(s),d=u.move(n.containerPhrasing(e,{after:s,before:c,...u.current()})),p=d.charCodeAt(0),h=hn(i.before.charCodeAt(i.before.length-1),p,s);h.inside&&(d=Ie(p)+d.slice(1));let y=d.charCodeAt(d.length-1),g=hn(i.after.charCodeAt(0),y,s);g.inside&&(d=d.slice(0,-1)+Ie(y));let k=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},c+d+k}function Hm(e,t,n){return n.options.emphasis||"*"}var pn=function(e){if(e==null)return qm;if(typeof e=="function")return Yr(e);if(typeof e=="object")return Array.isArray(e)?jm(e):$m(e);if(typeof e=="string")return Gm(e);throw new Error("Expected function, string, or object as test")};function jm(e){let t=[],n=-1;for(;++n":""))+")"})}return g;function g(){let k=fl,A,F,T;if((!t||a(d,p,h[h.length-1]||void 0))&&(k=Zm(n(d,h)),k[0]===jt))return k;if("children"in d&&d.children){let v=d;if(v.children&&k[0]!==zr)for(F=(i?v.children.length:-1)+u,T=h.concat(v);F>-1&&F",...d.current()})),p+=d.move(">")):(c=n.enter("destinationRaw"),p+=d.move(n.safe(e.url,{before:p,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),p+=d.move(" "+s),p+=d.move(n.safe(e.title,{before:p,after:s,...d.current()})),p+=d.move(s),c()),p+=d.move(")"),u(),p}function Qm(){return"!"}Po.peek=Xm;function Po(e,t,n,i){let s=e.referenceType,a=n.enter("imageReference"),u=n.enter("label"),c=n.createTracker(i),d=c.move("!["),p=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(p+"]["),u();let h=n.stack;n.stack=[],u=n.enter("reference");let y=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return u(),n.stack=h,a(),s==="full"||!p||p!==y?d+=c.move(y+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function Xm(){return"!"}Do.peek=eg;function Do(e,t,n){let i=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a\u007F]/.test(e.url))}Lo.peek=tg;function Lo(e,t,n,i){let s=dn(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(i),c,d;if(Fo(e,n)){let h=n.stack;n.stack=[],c=n.enter("autolink");let y=u.move("<");return y+=u.move(n.containerPhrasing(e,{before:y,after:">",...u.current()})),y+=u.move(">"),c(),n.stack=h,y}c=n.enter("link"),d=n.enter("label");let p=u.move("[");return p+=u.move(n.containerPhrasing(e,{before:p,after:"](",...u.current()})),p+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(n.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(d=n.enter("destinationRaw"),p+=u.move(n.safe(e.url,{before:p,after:e.title?" ":")",...u.current()}))),d(),e.title&&(d=n.enter(`title${a}`),p+=u.move(" "+s),p+=u.move(n.safe(e.title,{before:p,after:s,...u.current()})),p+=u.move(s),d()),p+=u.move(")"),c(),p}function tg(e,t,n){return Fo(e,n)?"<":"["}Io.peek=ng;function Io(e,t,n,i){let s=e.referenceType,a=n.enter("linkReference"),u=n.enter("label"),c=n.createTracker(i),d=c.move("["),p=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(p+"]["),u();let h=n.stack;n.stack=[],u=n.enter("reference");let y=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return u(),n.stack=h,a(),s==="full"||!p||p!==y?d+=c.move(y+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function ng(){return"["}function mn(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 hl(e){let t=mn(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 pl(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 Ur(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 ml(e,t,n,i){let s=n.enter("list"),a=n.bulletCurrent,u=e.ordered?pl(n):mn(n),c=e.ordered?u==="."?")":".":hl(n),d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){let h=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&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&&(d=!0),Ur(n)===u&&h){let y=-1;for(;++y-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);let c=n.createTracker(i);c.move(a+" ".repeat(u-a.length)),c.shift(u);let d=n.enter("listItem"),p=n.indentLines(n.containerFlow(e,c.current()),h);return d(),p;function h(y,g,k){return g?(k?"":" ".repeat(u))+y:(k?a:a+" ".repeat(u-a.length))+y}}function kl(e,t,n,i){let s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,i);return a(),s(),u}var Oo=pn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function wl(e,t,n,i){return(e.children.some(function(u){return Oo(u)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function bl(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ro.peek=rg;function Ro(e,t,n,i){let s=bl(n),a=n.enter("strong"),u=n.createTracker(i),c=u.move(s+s),d=u.move(n.containerPhrasing(e,{after:s,before:c,...u.current()})),p=d.charCodeAt(0),h=hn(i.before.charCodeAt(i.before.length-1),p,s);h.inside&&(d=Ie(p)+d.slice(1));let y=d.charCodeAt(d.length-1),g=hn(i.after.charCodeAt(0),y,s);g.inside&&(d=d.slice(0,-1)+Ie(y));let k=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},c+d+k}function rg(e,t,n){return n.options.strong||"*"}function xl(e,t,n,i){return n.safe(e.value,i)}function vl(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 Cl(e,t,n){let i=(Ur(n)+(n.options.ruleSpaces?" ":"")).repeat(vl(n));return n.options.ruleSpaces?i.slice(0,-1):i}var Al={blockquote:rl,break:Ao,code:al,definition:ll,emphasis:So,hardBreak:Ao,heading:dl,html:To,image:Mo,imageReference:Po,inlineCode:Do,link:Lo,linkReference:Io,list:ml,listItem:yl,paragraph:kl,root:wl,strong:Ro,text:xl,thematicBreak:Cl};var Sl=[ig];function ig(e,t,n,i){if(t.type==="code"&&zn(t,i)&&(e.type==="list"||e.type===t.type&&zn(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"&&Vr(t,i))?void 0:n.spread?1:0}var $t=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],El=[{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:$t},{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:$t},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r *])`},{character:"*",inConstruct:"phrasing",notInConstruct:$t},{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:$t},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:$t},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:$t},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:$t},{atBreak:!0,character:"~"}];function _l(e){return e.label||!e.identifier?e.label||"":Nr(e.identifier)}function Tl(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 Ml(e,t,n){let i=t.indexStack,s=e.children||[],a=[],u=-1,c=n.before,d;i.push(-1);let p=t.createTracker(n);for(;++u0&&(c==="\r"||c===` `)&&h.type==="html"&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/," "),c=" ",p=t.createTracker(n),p.move(a.join("")));let g=t.handle(h,e,t,{...p.current(),after:y,before:c});d&&d===g.slice(0,1)&&(g=Ie(d.charCodeAt(0))+g.slice(1));let k=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,d=void 0,k&&(a.length>0&&k.before&&c===a[a.length-1].slice(-1)&&(a[a.length-1]=a[a.length-1].slice(0,-1)+Ie(c.charCodeAt(0))),k.after&&(d=y)),p.move(g),a.push(g),c=g.slice(-1)}return i.pop(),a.join("")}function Pl(e,t,n){let i=t.indexStack,s=e.children||[],a=t.createTracker(n),u=[],c=-1;for(i.push(-1);++c `}return` `}var sg=/\r?\n|\r/g;function Dl(e,t){let n=[],i=0,s=0,a;for(;a=sg.exec(e);)u(e.slice(i,a.index)),n.push(a[0]),i=a.index+a[0].length,s++;return u(e.slice(i)),n.join("");function u(c){n.push(t(c,s,!c))}}function Ll(e,t,n){let i=(n.before||"")+(t||"")+(n.after||""),s=[],a=[],u={},c=-1;for(;++c=p||h+1u.length,d;c&&u.push(s);try{d=e.apply(this,u)}catch(p){let h=p;if(c&&n)throw h;return s(h)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...c){n||(n=!0,t(u,...c))}function a(u){s(null,u)}}var me=class extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let s="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?s=t:!a.cause&&t&&(u=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof i=="string"){let d=i.indexOf(":");d===-1?a.ruleId=i:(a.source=i.slice(0,d),a.ruleId=i.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){let d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}let c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=c?c.line:void 0,this.name=Et(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}};me.prototype.file="";me.prototype.name="";me.prototype.reason="";me.prototype.message="";me.prototype.stack="";me.prototype.column=void 0;me.prototype.line=void 0;me.prototype.ancestors=void 0;me.prototype.cause=void 0;me.prototype.fatal=void 0;me.prototype.place=void 0;me.prototype.ruleId=void 0;me.prototype.source=void 0;var We=Nt(require("node:path"),1);var Wo=Nt(require("node:process"),1);var zo=require("node:url");function $r(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var Vo=["history","path","basename","stem","extname","dirname"],Un=class{constructor(t){let n;t?$r(t)?n={path:t}:typeof t=="string"||pg(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Wo.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i0){let[k,...A]=h,F=i[g][1];Vn(F)&&Vn(k)&&(k=(0,qr.default)(!0,F,k)),i[g]=[p,k,...A]}}}},Ko=new qo().freeze();function jo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function $o(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Go(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 Gl(e){if(!Vn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ql(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Gr(e){return gg(e)?e:new Un(e)}function gg(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function yg(e){return typeof e=="string"||kg(e)}function kg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Kl=Ko().use(fn).use(Hr).freeze();var Jo={d:(e,t)=>{for(var n in t)Jo.o(t,n)&&!Jo.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},Qo={};Jo.d(Qo,{Z:()=>vg,$:()=>Xl});var gn={horizontalTab:-2,virtualSpace:-1,nul:0,eof:null,space:32};function Zl(e){return 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,s){var a;if(!i)return s;for(typeof i=="string"&&(i=[i]),a=-1;++a{e.exports=function(c,d,p){for(var h,y,g,k,A,F,T,v,_=(p.before||"")+(d||"")+(p.after||""),M=[],B=[],Y={},S=-1;++S=v||g+1{var t=e&&e.__esModule?()=>e.default:()=>e;return tt.d(t,{a:t}),t},tt.d=(e,t)=>{for(var n in t)tt.o(t,n)&&!tt.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},tt.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Xo={};(()=>{function e(s={}){let a=s.permalinks||[],u=s.pageResolver||(g=>[g.replace(/ /g,"_").toLowerCase()]),c=s.newClassName||"new",d=s.wikiLinkClassName||"internal",p=s.hrefTemplate||(g=>`#/page/${g}`),h;function y(g){return g[g.length-1]}return{enter:{wikiLink:function(g){h={type:"wikiLink",value:null,data:{alias:null,permalink:null,exists:null}},this.enter(h,g)}},exit:{wikiLinkTarget:function(g){let k=this.sliceSerialize(g);y(this.stack).value=k},wikiLinkAlias:function(g){let k=this.sliceSerialize(g);y(this.stack).data.alias=k},wikiLink:function(g){this.exit(g);let k=h,A=u(k.value),F=A.find(B=>a.indexOf(B)!==-1),T=F!==void 0,v;v=T?F:A[0]||"";let _=k.value;k.data.alias&&(_=k.data.alias);let M=d;T||(M+=" "+c),k.data.alias=_,k.data.permalink=v,k.data.exists=T,k.data.hName="a",k.data.hProperties={className:M,href:p(v)},k.data.hChildren=[{type:"text",value:_}]}}}}tt.d(Xo,{V:()=>e,x:()=>i});var t=tt(113),n=tt.n(t);function i(s={}){let a=s.aliasDivider||":";return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]},{character:"]",inConstruct:["label","reference"]}],handlers:{wikiLink:function(u,c,d){let p=d.enter("wikiLink"),h=n()(d,u.value,{before:"[",after:"]"}),y=n()(d,u.data.alias,{before:"[",after:"]"}),g;return g=y!==h?`[[${h}${a}${y}]]`:`[[${h}]]`,p(),g}}}}})();var bg=Xo.V,xg=Xo.x,Ql=!1;function Xl(e={}){let t=this.data();function n(i,s){t[i]?t[i].push(s):t[i]=[s]}!Ql&&(this.Parser&&this.Parser.prototype&&this.Parser.prototype.blockTokenizers||this.Compiler&&this.Compiler.prototype&&this.Compiler.prototype.visitors)&&(Ql=!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||":",s="]]";return{text:{91:{tokenize:function(a,u,c){var d,p,h=0,y=0,g=0;return function(_){return _!=="[[".charCodeAt(y)?c(_):(a.enter("wikiLink"),a.enter("wikiLinkMarker"),k(_))};function k(_){return y===2?(a.exit("wikiLinkMarker"),function(M){return Zo(M)||M===gn.eof?c(M):(a.enter("wikiLinkData"),a.enter("wikiLinkTarget"),A(M))}(_)):_!=="[[".charCodeAt(y)?c(_):(a.consume(_),y++,k)}function A(_){return _===i.charCodeAt(h)?d?(a.exit("wikiLinkTarget"),a.enter("wikiLinkAliasMarker"),F(_)):c(_):_===s.charCodeAt(g)?d?(a.exit("wikiLinkTarget"),a.exit("wikiLinkData"),a.enter("wikiLinkMarker"),v(_)):c(_):Zo(_)||_===gn.eof?c(_):(Zl(_)||(d=!0),a.consume(_),A)}function F(_){return h===i.length?(a.exit("wikiLinkAliasMarker"),a.enter("wikiLinkAlias"),T(_)):_!==i.charCodeAt(h)?c(_):(a.consume(_),h++,F)}function T(_){return _===s.charCodeAt(g)?p?(a.exit("wikiLinkAlias"),a.exit("wikiLinkData"),a.enter("wikiLinkMarker"),v(_)):c(_):Zo(_)||_===gn.eof?c(_):(Zl(_)||(p=!0),a.consume(_),T)}function v(_){return g===2?(a.exit("wikiLinkMarker"),a.exit("wikiLink"),u(_)):_!==s.charCodeAt(g)?c(_):(a.consume(_),g++,v)}}}}}}(e)),n("fromMarkdownExtensions",bg(e)),n("toMarkdownExtensions",xg(e))}var vg=Xl,Av=Qo.Z,eu=Qo.$;(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Cg={"\n":"\\n","\r":"\\r"," ":"\\t","\b":"\\b","\f":"\\f","'":"\\'",'"':'\\"',"\\":"\\\\"},Ag={};for(let[e,t]of Object.entries(Cg))Ag[t]=e;function Hn(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,...s)=>{let u=typeof s.at(-1)=="object",c=u?s.length-2:s.length-1,d={groups:u?s.at(-1):void 0,offset:s.at(c-1),source:s.at(c),substring:i},p=s.slice(0,c-1);return n(d,...p)??d.substring}))}function nu(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 Sg=[{constructor:ArrayBuffer,equalityComparer:Eg},{constructor:Date,equalityComparer:_g},{constructor:RegExp,equalityComparer:Mg},{constructor:Map,equalityComparer:Tg},{constructor:Set,equalityComparer:Pg}];function Ze(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e===null||t===null)return!1;let n=e.constructor,i=t.constructor;if(n!==i)return!1;if(n!==Object){let d=Dg(e,t);if(d!==void 0)return d}let s=yn(e),a=yn(t);if(s.length!==a.length)return!1;let u=e,c=t;for(let d of s)if(!a.includes(d)||!Ze(u[d],c[d]))return!1;return!0}function yn(e){let t=[],n=e;for(;n;){let i=Object.getOwnPropertyDescriptors(n);for(let[s,a]of Object.entries(i)){if(s==="__proto__"||typeof a.value=="function")continue;let u=typeof a.get=="function",c=typeof a.set=="function";if(u||c){u&&c&&t.push(s);continue}a.enumerable&&a.writable&&t.push(s)}n=Object.getPrototypeOf(n)}return t.sort()}function Kr(e){return e==null?e:Object.getPrototypeOf(e)}function Eg(e,t){if(e.byteLength!==t.byteLength)return!1;let n=new Uint8Array(e),i=new Uint8Array(t);return Ze(n,i)}function _g(e,t){return e.getTime()===t.getTime()}function Tg(e,t){if(e.size!==t.size)return!1;for(let[n,i]of e.entries())if(!t.has(n)||!Ze(i,t.get(n)))return!1;return!0}function Mg(e,t){return e.source===t.source&&e.flags===t.flags}function Pg(e,t){if(e.size!==t.size)return!1;for(let n of e){if(t.has(n))continue;let i=!1;for(let s of t)if(Ze(n,s)){i=!0;break}if(!i)return!1}return!0}function Dg(e,t){for(let{constructor:n,equalityComparer:i}of Sg)if(e instanceof n&&t instanceof n)return i(e,t)}var es=Nt(ou(),1);(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Lg=/[a-zA-Z]:\/[^:]*$/,rt=es.default.posix,Wv=rt.delimiter,zv=es.default.posix.sep,su=rt.basename,au=rt.dirname,Zr=rt.extname,Vv=rt.format;var lu=rt.join,Uv=rt.normalize,Hv=rt.parse,Ig=rt.relative;function uu(...e){let t=rt.resolve(...e);return t=Og(t),Lg.exec(t)?.[0]??t}function Og(e){return Hn(e,"\\","/")}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function ts(e){try{return!e.includes("://")||e.trim()!==e?!1:(new URL(e),!0)}catch{return!1}}var Tt=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Rg="md";function Ng(e,t,n){if(Qr(t))return t.extension===n;if(typeof t=="string"){let i=Jr(e,t);return i?i.extension===n:Zr(t).slice(1)===n}return!1}function du(e,t,n){if(t===null)return null;if(hu(t))return t;let i=cu(e,t,n);if(i)return i;let s=pu(t);return s===t?null:cu(e,s,n)}function Jr(e,t,n){let i=du(e,t,n);return Qr(i)?i:null}function jn(e,t){if(hu(t))return t.path;let n=du(e,t);return n?n.path:pu(t)}function hu(e){return e instanceof Tt.TAbstractFile}function Qr(e){return e instanceof Tt.TFile}function ns(e,t){return Ng(e,t,Rg)}function cu(e,t,n){return n?e.vault.getAbstractFileByPathInsensitive(t):e.vault.getAbstractFileByPath(t)}function pu(e){return(0,Tt.normalizePath)(uu("/",e))}var rs=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function gu(e){return e.vault.getMarkdownFiles().sort((t,n)=>t.path.localeCompare(n.path))}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var yu=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();async function $g(e){await new Promise(t=>{e.metadataCache.onCleanCache(t)})}async function Xr(e,t){let n=Jr(e,t);if(!n||n.deleted)return null;await Gg(e,n);let i=e.metadataCache.fileCache[n.path];return i&&i.mtime===n.stat.mtime&&i.size===n.stat.size&&e.metadataCache.metadataCache[i.hash]||(await e.metadataCache.computeFileMetadataAsync(n),await $g(e)),e.metadataCache.getFileCache(n)}async function Gg(e,t){if(!ns(e,t))return;let n=jn(e,t);for(let i of e.workspace.getLeavesOfType(Aa.Markdown))i.view instanceof yu.MarkdownView&&i.view.file?.path===n&&i.view.dirty&&await i.view.save()}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var qg=/[\\\x00\x08\x0B\x0C\x0E-\x1F ]/g;var wu="|";function bu(e){return Hn(e,qg,({substring:t})=>encodeURIComponent(t))}function gt(e){let t=Zg(e);if(t)return t;let n="!",i=e.startsWith(n);i&&(e=nu(e,n));let a=Kl().use(fn).use(eu,{aliasDivider:wu}).parse(e);if(a.children.length!==1)return null;let u=a.children[0];if(u?.type!=="paragraph"||u.children.length!==1)return null;let c=u.children[0];if(c?.position?.start.offset!==0||c.position.end.offset!==e.length)return null;switch(c.type){case"link":return Kg(c,e,i);case"wikiLink":return Jg(c,e,i);default:return null}}function Kg(e,t,n){let i="<",s="](",a=")",u=e.children[0],c=t.slice((u?.position?.end.offset??1)+s.length,(e.position?.end.offset??0)-a.length),d=t.startsWith(i)||c.startsWith(i),p=ts(e.url),h=e.url;if(!p&&!d)try{h=decodeURIComponent(h)}catch(y){console.error(`Failed to decode URL ${h}`,y)}return{alias:u?.value,encodedUrl:p?bu(h):void 0,hasAngleBrackets:d,isEmbed:n,isExternal:p,isWikilink:!1,title:e.title??void 0,url:h}}function Zg(e){let t=e.startsWith("<")&&e.endsWith(">");return t&&(e=e.slice(1,-1)),ts(e)?{encodedUrl:bu(e),hasAngleBrackets:t,isEmbed:!1,isExternal:!0,isWikilink:!1,url:e}:null}function Jg(e,t,n){return{alias:t.includes(wu)?e.data.alias:void 0,isEmbed:n,isExternal:!1,isWikilink:!0,url:e.value}}var xu=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();async function vu(e){let n={...{abortSignal:AbortSignal.any([]),buildNoticeMessage(){throw new Error("buildNoticeMessage is required")},items:[],noticeMinTimeoutInMilliseconds:2e3,processItem:Wt,progressBarTitle:"",shouldContinueOnError:!0,shouldShowProgressBar:!0,uiUpdateThresholdInMilliseconds:100},...e},i=n.items,s=0,a=null;n.shouldShowProgressBar&&(a=new xu.Notice("",0));let u=sleep(n.noticeMinTimeoutInMilliseconds),c=createEl("progress");if(c.max=i.length,n.shouldShowProgressBar){let p=createFragment();p.createDiv({text:n.progressBarTitle}),p.appendChild(c),a?.setMessage(p)}let d=performance.now();for(let p of i){if(n.abortSignal.aborted){a?.hide();return}s++;let h=`# ${s.toString()} / ${i.length.toString()}`,y=n.buildNoticeMessage(p,h);n.shouldShowProgressBar||a?.setMessage(y),ro("Loop")(y);let g=new Error(br);try{performance.now()-d>n.uiUpdateThresholdInMilliseconds&&(await xa(),d=performance.now()),await n.processItem(p)}catch(k){if(console.error("Error processing item",p),!n.shouldContinueOnError)throw a?.hide(),k;g.cause=k,xr(g)}c.value++}await u,a?.hide()}var ii=require("obsidian");var Cu=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var ei=class extends Cu.Component{registerAsyncEvent(t){ti(this,t)}};function ti(e,t){e.register(()=>{t.asyncEvents.offref(t)})}var _u=Nt(Su(),1);(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Oe=(e=>(e.AlertModal="alert-modal",e.CancelButton="cancel-button",e.CheckboxComponent="checkbox-component",e.CodeHighlighterComponent="code-highlighter-component",e.ConfirmModal="confirm-modal",e.DateComponent="date-component",e.DateTimeComponent="datetime-component",e.EmailComponent="email-component",e.FileComponent="file-component",e.IsPlaceholder="is-placeholder",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.OverlayValidator="overlay-validator",e.PasswordComponent="password-component",e.PluginSettingsTab="plugin-settings-tab",e.PromptModal="prompt-modal",e.SelectItemModal="select-item-modal",e.SettingComponentWrapper="setting-component-wrapper",e.TelephoneComponent="telephone-component",e.TextBox="text-box",e.TimeComponent="time-component",e.Tooltip="tooltip",e.TooltipArrow="tooltip-arrow",e.TooltipValidator="tooltip-validator",e.TriStateCheckboxComponent="tri-state-checkbox-component",e.TypedDropdownComponent="typed-dropdown-component",e.TypedMultipleDropdownComponent="typed-multiple-dropdown-component",e.UrlComponent="url-component",e.WeekComponent="week-component",e))(Oe||{});(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Eu=`${kr}-styles`;function Mt(e,...t){e.addClass(Oe.LibraryName,vr(),...t)}function Tu(e,t){pa(t),ya(t);let n=Dn(e,"lastLibraryVersion","0.0.0");if((0,_u.compareVersions)(Qi,n.value)<=0)return;n.value=Qi;let i=Qg();i.DEBUG=ga(),document.head.querySelector(`#${Eu}`)?.remove(),document.head.createEl("style",{attr:{id:Eu},text:ua})}function Qg(){return window}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var ri=class extends ii.Plugin{events=new Xe;get abortSignal(){return this._abortSignal}get settings(){return this.settingsManager.settingsWrapper.safeSettings}get settingsManager(){if(!this._settingsManager)throw new Error("Settings manager not defined");return this._settingsManager}get settingsTab(){if(!this._settingsTab)throw new Error("Settings tab not defined");return this._settingsTab}_abortSignal;_settingsManager=null;_settingsTab=null;lifecycleEventNames=new Set;notice;consoleDebug(t,...n){Ar(this.manifest.id,1)(t,...n)}async onExternalSettingsChange(){await super.onExternalSettingsChange?.(),await this._settingsManager?.loadFromFile(!1)}async onload(){await super.onload(),await this.onloadImpl(),ba(this.afterLoad.bind(this))}onunload(){super.onunload(),et(async()=>{try{await this.onunloadImpl()}finally{await this.triggerLifecycleEvent("unload")}})}async waitForLifecycleEvent(t){this.lifecycleEventNames.has(t)||await new Promise(n=>{this.events.once(t,()=>{n()})})}createSettingsManager(){return null}createSettingsTab(){return null}async onLayoutReady(){await Ke()}async onloadImpl(){Tu(this.app,this.manifest.id),this.register(fa(()=>{this.showNotice("An unhandled error occurred. Please check the console for more information.")})),this._settingsManager=this.createSettingsManager(),this._settingsManager&&(ti(this,this._settingsManager.on("loadSettings",this.onLoadSettings.bind(this))),ti(this,this._settingsManager.on("saveSettings",this.onSaveSettings.bind(this)))),await this._settingsManager?.loadFromFile(!0),this._settingsTab=this.createSettingsTab(),this._settingsTab&&this.addSettingTab(this._settingsTab);let t=new AbortController;this._abortSignal=t.signal,this.register(()=>{t.abort()})}async onLoadSettings(t,n){await Ke()}async onSaveSettings(t,n,i){await Ke()}async onunloadImpl(){await Ke()}showNotice(t){this.notice&&this.notice.hide(),this.notice=new ii.Notice(`${this.manifest.name} ${t}`)}async afterLoad(){await this.triggerLifecycleEvent("load"),this.app.workspace.onLayoutReady(In(this.onLayoutReadyBase.bind(this)))}async onLayoutReadyBase(){try{await this.onLayoutReady()}finally{await this.triggerLifecycleEvent("layoutReady")}}async triggerLifecycleEvent(t){this.lifecycleEventNames.add(t),await this.events.triggerAsync(t)}};var Pu=require("@codemirror/language"),Du=require("@codemirror/state"),si=require("@codemirror/view");function is(e,t){let n=e.dataset;n.frontmatterMarkdownLinksLinkData=JSON.stringify(t)}function Mu(e){if(!e)return{};let t=createDiv();is(t,e);let n=t.attributes[0];return n?{[n.name]:n.value}:{}}function oi(e){let t=e.dataset;return t.frontmatterMarkdownLinksLinkData?JSON.parse(t.frontmatterMarkdownLinksLinkData):null}var os=class e{get decorations(){return this._decorations}_decorations;constructor(t){this._decorations=e.buildDecorations(t)}static buildDecorations(t){let n=new Du.RangeSetBuilder,i=-1,s=i,a=!1,u=i,c=i,d=!1;for(let{from:h,to:y}of t.visibleRanges)(0,Pu.syntaxTree)(t.state).iterate({enter(g){let k=t.state.doc.lineAt(g.from).number;if(k!==s&&(p(u,c),s=k,a=!1,u=i,c=i,d=!1),g.name==="comment_hmd-frontmatter"){d=!0;return}if(g.name==="hmd-frontmatter_meta"&&!a){a=!0;return}a&&(u===i&&(u=g.from),c=g.to),g.name==="hmd-frontmatter_string"&&(p(g.from+1,g.to-1),u=i,c=i)},from:h,to:y}),p(u,c);return n.finish();function p(h,y){if(h===i)return;let g=t.state.doc.sliceString(h,y);d&&(g=g.trimEnd());let k=gt(g);if(k)for(let A of Xg(g))n.add(h+A.from,h+A.to,si.Decoration.mark({attributes:Mu(A.isClickable?{isExternalUrl:k.isExternal,isWikilink:k.isWikilink,url:k.url}:null),class:A.cssClass}))}}update(t){!t.docChanged&&!t.viewportChanged||(this._decorations=e.buildDecorations(t.view))}};function Fu(e){let t=si.ViewPlugin.fromClass(os,{decorations:n=>n.decorations});e.registerEditorExtension(t)}function Xg(e){let t=gt(e);if(!t)return[];let n=[[{cssClass:`cm-formatting-link cm-formatting-link-start${t.isEmbed?" cm-formatting-embed":""}`,regExp:/!?\[\[/},{cssClass:"cm-hmd-embed cm-hmd-internal-link",isClickable:!0,regExp:/[^|]+/},{cssClass:"cm-formatting-link cm-formatting-link-end",regExp:/\]\]/}],[{cssClass:`cm-formatting-link cm-formatting-link-start${t.isEmbed?" cm-formatting-embed":""}`,regExp:/!?\[\[/},{cssClass:"cm-hmd-internal-link cm-link-has-alias",isClickable:!0,regExp:/[^|]+/},{cssClass:"cm-hmd-internal-link cm-link-alias-pipe",regExp:/\|/},{cssClass:"cm-hmd-internal-link cm-link-alias",isClickable:!0,regExp:/[^|]+/},{cssClass:"cm-formatting-link cm-formatting-link-end",regExp:/\]\]/}],[{cssClass:"cm-formatting cm-formatting-image cm-image cm-image-marker",regExp:/!/},{cssClass:"cm-formatting cm-formatting-image cm-image cm-image-alt-text cm-link",regExp:/\[/},{cssClass:"cm-image cm-image-alt-text cm-link",isClickable:!0,regExp:/.+/},{cssClass:"cm-formatting cm-formatting-image cm-image cm-image-alt-text cm-link",regExp:/\]/},{cssClass:"cm-formatting cm-formatting-link-string cm-string cm-url",regExp:/\(/},{cssClass:"cm-string cm-url",isClickable:!0,regExp:/.+/},{cssClass:"cm-formatting cm-formatting-link-string cm-string cm-url",regExp:/\)/}],[{cssClass:"cm-formatting cm-formatting-link cm-link",regExp:/\[/},{cssClass:"cm-link",isClickable:!0,regExp:/.+/},{cssClass:"cm-formatting cm-formatting-link cm-link",regExp:/\]/},{cssClass:"cm-formatting cm-formatting-link-string cm-string cm-url",regExp:/\(/},{cssClass:"cm-string cm-url",isClickable:!0,regExp:/.+/},{cssClass:"cm-formatting cm-formatting-link-string cm-string cm-url",regExp:/\)/}],[{cssClass:"cm-formatting cm-formatting-link cm-link",regExp://}],[{cssClass:"cm-url",isClickable:!0,regExp:/.+/}]];for(let i of n){let s=e0(e,i);if(s)return s}return[]}function e0(e,t){let n=`^${t.map(d=>`(${d.regExp.source})`).join("")}$`,s=new RegExp(n).exec(e);if(!s)return null;let a=[],u=0,c=0;for(let d of t){c++;let p=u+(s[c]?.length??0);a.push({cssClass:d.cssClass,from:u,isClickable:d.isClickable??!1,to:p}),u=p}return a}var Lu=require("obsidian");var t0=1,$n="frontmatter-links",ai="file-mtime",n0=5e3,li=class{db;fileFrontmatterLinkCacheMap=new Map;pathMtimeMap=new Map;pendingStoreActions=[];processStoreActionsDebounced=(0,Lu.debounce)(()=>{this.processStoreActions()},n0);add(t,n){let i=this.fileFrontmatterLinkCacheMap.get(t);i||(i=[],this.fileFrontmatterLinkCacheMap.set(t,i)),Bt(i,s=>s.key!==n.key),i.push(n),this.addStoreAction($n,s=>{s.put({filePath:t,links:i})})}delete(t){this.fileFrontmatterLinkCacheMap.delete(t),this.pathMtimeMap.delete(t),this.addStoreAction($n,n=>{n.delete(t)})}getFilePaths(){return Array.from(this.fileFrontmatterLinkCacheMap.keys())}getKeys(t){return(this.fileFrontmatterLinkCacheMap.get(t)??[]).map(i=>i.key)}getLinks(t){return this.fileFrontmatterLinkCacheMap.get(t.path)??[]}async init(t){let n=window.indexedDB.open(`${t.appId}/frontmatter-markdown-links`,t0);n.addEventListener("upgradeneeded",p=>{if(p.newVersion!==1)return;let h=n.result;h.createObjectStore(ai,{keyPath:"filePath"}),h.createObjectStore($n,{keyPath:"filePath"})});let i=await ss(n);this.db=i;let s=i.transaction([ai,$n],"readonly"),a=s.objectStore(ai),u=await ss(a.getAll());for(let p of u)this.pathMtimeMap.set(p.filePath,p.mtime);let c=s.objectStore($n),d=await ss(c.getAll());for(let p of d){let h=new Set,y=[];for(let g of p.links)h.has(g.key)||(h.add(g.key),y.push(g));this.fileFrontmatterLinkCacheMap.set(p.filePath,y)}}isCacheValid(t){return this.pathMtimeMap.get(t.path)===t.stat.mtime}rename(t,n){let i=this.fileFrontmatterLinkCacheMap.get(t)??[];this.updateFile(n),this.delete(t);for(let s of i)this.add(n.path,s)}updateFile(t){this.pathMtimeMap.set(t.path,t.stat.mtime),this.addStoreAction(ai,n=>{n.put({filePath:t.path,mtime:t.stat.mtime})})}addStoreAction(t,n){this.pendingStoreActions.push({action:n,storeName:t}),this.processStoreActionsDebounced()}processStoreActions(){let t=this.pendingStoreActions;this.pendingStoreActions=[];let n=t.map(s=>s.storeName).unique(),i=this.db.transaction(n,"readwrite");for(let s of t){let a=i.objectStore(s.storeName);s.action(a)}i.commit()}};async function ss(e){return e.readyState==="done"?e.result:await new Promise((t,n)=>{e.addEventListener("success",()=>{t(e.result)}),e.addEventListener("error",()=>{n(e.error)})})}function Iu(e,t){let n=Object.keys(t).map(i=>r0(e,i,t[i]));return n.length===1?n[0]:function(){n.forEach(i=>i())}}function r0(e,t,n){let i=e[t],s=e.hasOwnProperty(t),a=s?i:function(){return Object.getPrototypeOf(e)[t].apply(this,arguments)},u=n(a);return i&&Object.setPrototypeOf(u,i),Object.setPrototypeOf(c,u),e[t]=c,d;function c(...p){return u===a&&e[t]===c&&d(),u.apply(this,p)}function d(){e[t]===c&&(s?e[t]=a:delete e[t]),u!==a&&(u=a,Object.setPrototypeOf(c,i||Function))}}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function i0(e,t){return Iu(e,t)}function wn(e,t,n){let i=i0(t,n),s=!1;function a(){if(!s)try{i()}finally{s=!0}}return e.register(a),i}var Ou=!1;function Ru(e){let t=e.app.metadataTypeManager.registeredTypeWidgets.multitext;wn(e,t,{render:n=>(i,s,a)=>Nu(i,s,a,n,e)})}function o0(e,t,n){n.call(t);let i=Array.from(t.rootEl.querySelectorAll(".multi-select-pill-content"));for(let s=0;sfunction(){o0(s.app,this,c)}}),Ou=!0,a.multiselect.rootEl.remove(),Nu(e,t,n,i,s)}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var Pt=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 u=this.transformValue(t,n);return u===void 0?void 0:{__transformerId:i,transformedValue:u}}if(t===null)return null;if(typeof t!="object")return t;if(Array.isArray(t))return t.map((u,c)=>this.transformValueRecursively(u,c.toString()));let s=t;if(s.__transformerId)return this.getTransformer(s.__transformerId).restoreValue(s.transformedValue,n);let a={};for(let u of yn(t)){let c=t[u],d=this.transformValueRecursively(c,u);a[u]=d}return a}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var ze=class extends Pt{};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var ui=class extends ze{get id(){return"date"}canTransform(t){return t instanceof Date}restoreValue(t){return new Date(t)}transformValue(t){return t.toISOString()}};var Yu=Nt(Bu(),1);(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var ci=class extends ze{get id(){return"duration"}canTransform(t){let n=t??{};return!!n.asHours&&!!n.asMinutes&&!!n.asSeconds&&!!n.asMilliseconds}restoreValue(t){return(0,Yu.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 fi=class extends Pt{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)??sn(`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 di=class extends ze{get id(){return"map"}canTransform(t){return t instanceof Map}restoreValue(t){return new Map(t)}transformValue(t){return Array.from(t.entries())}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var hi=class extends ze{get id(){return"set"}canTransform(t){return t instanceof Set}restoreValue(t){return new Set(t)}transformValue(t){return Array.from(t)}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var s0="_",pi=class extends Pt{get id(){return"skip-private-property"}canTransform(t,n){return n.startsWith(s0)}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 Gn=class{keyValueMap=new Map;valueKeyMap=new Map;constructor(t=[]){for(let[n,i]of t)this.set(n,i)}clear(){this.keyValueMap.clear(),this.valueKeyMap.clear()}deleteKey(t){let n=this.getValue(t);n!==void 0&&this.valueKeyMap.delete(n),this.keyValueMap.delete(t)}deleteValue(t){let n=this.getKey(t);n!==void 0&&this.keyValueMap.delete(n),this.valueKeyMap.delete(t)}entries(){return this.keyValueMap.entries()}getKey(t){return this.valueKeyMap.get(t)}getValue(t){return this.keyValueMap.get(t)}hasKey(t){return this.keyValueMap.has(t)}hasValue(t){return this.valueKeyMap.has(t)}keys(){return this.keyValueMap.keys()}set(t,n){this.deleteKey(t),this.deleteValue(n),this.keyValueMap.set(t,n),this.valueKeyMap.set(n,t)}values(){return this.valueKeyMap.keys()}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var mi=class extends ze{get id(){return"two-way-map"}canTransform(t){return t instanceof Gn}restoreValue(t){return new Gn(t)}transformValue(t){return Array.from(t.entries())}};(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var a0=new fi([new pi,new ui,new ci,new di,new hi,new mi]),gi=class extends Xe{constructor(t){super(),this.plugin=t,this.app=t.app,this.defaultSettings=this.createDefaultSettings(),this.currentSettingsWrapper=this.createDefaultSettingsWrapper(),this.lastSavedSettingsWrapper=this.createDefaultSettingsWrapper(),this.propertyNames=yn(this.currentSettingsWrapper.settings),this.registerValidators()}app;defaultSettings;get settingsWrapper(){return this.currentSettingsWrapper}currentSettingsWrapper;lastSavedSettingsWrapper;propertyNames;validators=new Map;async editAndSave(t,n){await this.edit(t),await this.saveToFile(n)}async ensureSafe(t){let n=await this.validate(t);for(let i of this.propertyNames)n[i]&&(t[i]=this.defaultSettings[i])}async getSafeCopy(t){let n=await this.cloneSettings(t);return await this.ensureSafe(n),n}async loadFromFile(t){let n=await this.plugin.loadData();this.lastSavedSettingsWrapper=this.createDefaultSettingsWrapper(),this.currentSettingsWrapper=this.createDefaultSettingsWrapper();try{if(n==null)return;if(typeof n!="object"){console.error(`Invalid settings from data.json. Expected Object, got: ${typeof n}`);return}let i=n,s=await this.rawRecordToSettings(i),a=await this.validate(s);for(let c of this.propertyNames)this.setPropertyImpl(c,s[c],a[c]);this.lastSavedSettingsWrapper=await this.cloneSettingsWrapper(this.currentSettingsWrapper);let u=await this.settingsToRawRecord(this.currentSettingsWrapper.settings);Ze(u,n)||await this.saveToFileImpl()}finally{await this.triggerAsync("loadSettings",this.currentSettingsWrapper,t)}}on(t,n,i){return super.on(t,n,i)}async saveToFile(t){Ze(this.lastSavedSettingsWrapper.settings,this.currentSettingsWrapper.settings)||(await this.saveToFileImpl(),await this.triggerAsync("saveSettings",this.currentSettingsWrapper,this.lastSavedSettingsWrapper,t),this.lastSavedSettingsWrapper=await this.cloneSettingsWrapper(this.currentSettingsWrapper))}async setProperty(t,n){return await this.edit(i=>{i[t]=n}),this.currentSettingsWrapper.validationMessages[t]}async validate(t){let n={};for(let[i,s]of this.validators.entries()){let a=await s(t[i],t);a&&(n[i]=a)}return n}getTransformer(){return a0}async onLoadRecord(t){await Ke()}async onSavingRecord(t){await Ke()}registerValidator(t,n){this.validators.set(t,n)}registerValidators(){}async cloneSettings(t){let n=await this.settingsToRawRecord(t),i=JSON.stringify(n),s=JSON.parse(i);return await this.rawRecordToSettings(s)}async cloneSettingsWrapper(t){return{safeSettings:await this.cloneSettings(t.safeSettings),settings:await this.cloneSettings(t.settings),validationMessages:{...t.validationMessages}}}createDefaultSettingsWrapper(){return{safeSettings:this.createDefaultSettings(),settings:this.createDefaultSettings(),validationMessages:{}}}async edit(t){try{await t(this.currentSettingsWrapper.settings)}finally{let n=await this.validate(this.currentSettingsWrapper.settings);for(let i of this.propertyNames){let s=n[i]??"";this.currentSettingsWrapper.validationMessages[i]=s,this.currentSettingsWrapper.safeSettings[i]=s?this.defaultSettings[i]:this.currentSettingsWrapper.settings[i]}}}isValidPropertyName(t){return typeof t!="string"?!1:this.propertyNames.includes(t)}async rawRecordToSettings(t){t=this.getTransformer().transformObjectRecursively(t),await this.onLoadRecord(t);let n=this.createDefaultSettings();for(let[i,s]of Object.entries(t)){if(!this.isValidPropertyName(i)){console.warn(`Unknown property: ${i}`);continue}typeof s!=typeof this.defaultSettings[i]&&console.warn("Possible invalid value type. It might lead to an unexpected behavior of the plugin. There is also a chance it is a false-negative warning, as we are unable to determine the exact type of the value in runtime.",{defaultValue:this.defaultSettings[i],propertyName:i,value:s}),n[i]=s}return n}async saveToFileImpl(){await this.plugin.saveData(await this.settingsToRawRecord(this.currentSettingsWrapper.settings))}setPropertyImpl(t,n,i){this.currentSettingsWrapper.settings[t]=n,this.currentSettingsWrapper.validationMessages[t]=i??"",this.currentSettingsWrapper.safeSettings[t]=i?this.defaultSettings[t]:n}async settingsToRawRecord(t){let n={};for(let i of this.propertyNames)n[i]=t[i];return await this.onSavingRecord(n),this.getTransformer().transformObjectRecursively(n)}};var yi=class{shouldShowInitializationNotice=!0};var ki=class extends gi{createDefaultSettings(){return new yi}};var Hu=require("obsidian");var Gt=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function wi(e){let t=e.parentElement;if(!t)throw new Error("Element must be attached to the DOM");if(t.classList.contains(Oe.SettingComponentWrapper))return t;let n=Array.from(t.children),i=createDiv();Mt(i,Oe.SettingComponentWrapper);for(let s of n)i.appendChild(s);return t.appendChild(i),i}var Wu=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var ls=class{constructor(t){this.abstractTextComponent=t}empty(){this.abstractTextComponent.setValue("")}isEmpty(){return this.abstractTextComponent.getValue()===""}setPlaceholderValue(t){return this.abstractTextComponent.setPlaceholder(t),this}};function zu(e){return l0(e)?e:e instanceof Wu.AbstractTextComponent?new ls(e):null}function l0(e){let t=e;return typeof t.setPlaceholderValue=="function"&&typeof t.isEmpty=="function"}var ve=require("obsidian");(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var bi=class{constructor(t){this.el=t;let n=wi(t);this._validatorEl=n.createEl("input",{attr:{tabindex:-1}}),Mt(this._validatorEl,Oe.OverlayValidator),this._validatorEl.addEventListener("focus",()=>{this.el.focus()}),this._validatorEl.isActiveElement=this.isElementOrDescendantActive.bind(this);let i=this.el.querySelector("[tabindex]");i||(this.el.getAttr("tabindex")===null&&(this.el.tabIndex=-1),i=this.el),this.el.addEventListener("focusin",()=>{this.forceBlurValidatorEl()}),this.el.addEventListener("click",()=>{i.focus()}),this.el.addEventListener("focusout",()=>{setTimeout(()=>{this.isElementOrDescendantActive()||this.forceBlurValidatorEl()},0)})}get validatorEl(){return this._validatorEl}_validatorEl;forceBlurValidatorEl(){this._validatorEl.dispatchEvent(new Event("blur"))}isElementOrDescendantActive(){return this.el.contains(document.activeElement)}},Dt=class{constructor(t){this.validatorEl=t}};function Vu(e){return u0(e)?e:e instanceof ve.ColorComponent?new Dt(e.colorPickerEl):e instanceof ve.DropdownComponent?new Dt(e.selectEl):e instanceof ve.ProgressBarComponent?new bi(e.progressBar):e instanceof ve.SearchComponent?new Dt(e.inputEl):e instanceof ve.SliderComponent?new Dt(e.sliderEl):e instanceof ve.TextAreaComponent?new Dt(e.inputEl):e instanceof ve.TextComponent?new Dt(e.inputEl):e instanceof ve.ToggleComponent?new bi(e.toggleEl):null}function u0(e){return!!e.validatorEl}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();function Uu(e){return e.validationMessage!==void 0}(function(){if(globalThis.process)return;let t={browser:!0,cwd:__name(()=>"/","cwd"),env:{},platform:"android"};globalThis.process=t})();var us="PluginSettingsTab",xi=class extends Gt.PluginSettingTab{constructor(t){super(t.app,t),this.plugin=t,Mt(this.containerEl,Oe.PluginSettingsTab),this.saveSettingsDebounced=(0,Gt.debounce)(In(()=>this.plugin.settingsManager.saveToFile(us)),this.saveSettingsDebounceTimeoutInMilliseconds),this.asyncEventsComponent=new ei,this.asyncEvents=new Xe}get isOpen(){return this._isOpen}get saveSettingsDebounceTimeoutInMilliseconds(){return 2e3}_isOpen=!1;asyncEvents;asyncEventsComponent;saveSettingsDebounced;get pluginSettings(){return this.plugin.settingsManager.settingsWrapper.settings}bind(t,n,i){let a={...{componentToPluginSettingsValueConverter:_=>_,onChanged:Wt,pluginSettingsToComponentValueConverter:_=>_,shouldResetSettingWhenComponentIsEmpty:!0,shouldShowPlaceholderForDefaultValues:!0,shouldShowValidationMessage:!0},...i},u=Vu(t)?.validatorEl,c=zu(t),d=this.pluginSettings[n],p=this.plugin.settingsManager.defaultSettings[n];c?.setPlaceholderValue(a.pluginSettingsToComponentValueConverter(p));let h,y=null,g=null;if(u){let _=wi(u);y=_.createDiv(),Mt(y,Oe.Tooltip,Oe.TooltipValidator),g=y.createSpan();let M=y.createDiv();Mt(M,Oe.TooltipArrow),y.hide(),_.appendChild(y)}this.asyncEventsComponent.registerAsyncEvent(this.on("validationMessageChanged",(_,M)=>{n===_&&(h=M,T())}));let k=!1;c&&a.shouldShowPlaceholderForDefaultValues&&Ze(d,p)?c.empty():t.setValue(a.pluginSettingsToComponentValueConverter(d));let A=!1,T=(0,Gt.debounce)(()=>{requestAnimationFrame(()=>{v()})},100);return t.onChange(async _=>{if(A){A=!1;return}k=!1;let M=this.pluginSettings[n],B,Y=!0;if(c?.isEmpty()&&a.shouldResetSettingWhenComponentIsEmpty)B=p;else{let S=a.componentToPluginSettingsValueConverter(_);Uu(S)?(h=S.validationMessage,Y=!1):B=S}Y&&(h=await this.plugin.settingsManager.setProperty(n,B),c&&a.shouldShowPlaceholderForDefaultValues&&!c.isEmpty()&&Ze(B,p)&&(k=!0)),T(),B!==void 0&&await a.onChanged(B,M),this.saveSettingsDebounced()}),u?.addEventListener("focus",()=>{T()}),u?.addEventListener("blur",()=>{T()}),u?.addEventListener("click",()=>{requestAnimationFrame(()=>{T()})}),h=this.plugin.settingsManager.settingsWrapper.validationMessages[n]??"",T(),t;function v(){k&&!u?.isActiveElement()&&(k=!1,c?.isEmpty()||(A=!0,c?.empty())),u&&(h===""&&(u.setCustomValidity(""),u.checkValidity(),h=u.validationMessage),u.setCustomValidity(h),a.shouldShowValidationMessage?(g&&(g.textContent=h),y?.toggle(!!h)):h&&(0,Gt.setTooltip)(u,h))}}display(){this.containerEl.empty(),this._isOpen=!0,this.asyncEventsComponent.load(),this.asyncEventsComponent.registerAsyncEvent(this.plugin.settingsManager.on("loadSettings",this.onLoadSettings.bind(this))),this.asyncEventsComponent.registerAsyncEvent(this.plugin.settingsManager.on("saveSettings",this.onSaveSettings.bind(this)))}hide(){super.hide(),this.saveSettingsDebounced.cancel(),this._isOpen=!1,this.asyncEventsComponent.unload(),this.asyncEventsComponent.load(),et(()=>this.hideAsync())}async hideAsync(){await this.plugin.settingsManager.saveToFile(us)}show(){this.app.setting.openTab(this)}async onLoadSettings(t,n){this.display(),await Ke()}on(t,n,i){return this.asyncEvents.on(t,n,i)}async onSaveSettings(t,n,i){if(i===us){for(let[s,a]of Object.entries(t.validationMessages))await this.asyncEvents.triggerAsync("validationMessageChanged",s,a);return}this.display()}};var vi=class extends xi{display(){super.display(),new Hu.Setting(this.containerEl).setName("Show initialization notice").setDesc("Whether to show a notice when the plugin is being initialized").addToggle(t=>{this.bind(t,"shouldShowInitializationNotice")})}};var ju=!1;function $u(e){let t=e.app.metadataTypeManager.registeredTypeWidgets.text;wn(e,t,{render:n=>(i,s,a)=>Gu(i,s,a,n,e)})}function c0(e){let t=Ci(e);return t?.alias??t?.url??e.value??""}function f0(e){return Ci(e)?.url??e.value??""}function Ci(e,t=!1){let n=t?e.value:e.inputEl.textContent;return gt(n??"")}function d0(e){let t=Ci(e);return!!t&&(t.isWikilink||!t.isExternal)}function h0(e,t){let n=Ci(e,!0);n?.isExternal&&(e.value=n.encodedUrl??n.url),t.call(e)}function Gu(e,t,n,i,s){let a=i(e,t,n);if(!a||ju)return a;let u=Kr(a);return wn(s,u,{getDisplayText:()=>function(){return c0(this)},getLinkText:()=>function(){return f0(this)},isWikilink:()=>function(){return d0(this)},render:c=>function(){h0(this,c)}}),ju=!0,a.inputEl.remove(),a.linkEl.remove(),Gu(e,t,n,i,s)}var Ai=class extends ri{currentlyProcessingFiles=new Set;frontmatterMarkdownLinksCache;createSettingsManager(){return new ki(this)}createSettingsTab(){return new vi(this)}async onLayoutReady(){await this.processAllNotes(),this.registerEvent(this.app.metadataCache.on("changed",this.handleMetadataCacheChanged.bind(this))),this.registerEvent(this.app.vault.on("delete",this.handleDelete.bind(this))),this.registerEvent(this.app.vault.on("rename",this.handleRename.bind(this))),this.registerDomEvents(document)}async onloadImpl(){await super.onloadImpl(),$u(this),Ru(this),Fu(this),this.register(()=>{et(this.clearMetadataCache.bind(this))}),this.register(this.refreshMarkdownViews.bind(this)),this.refreshMarkdownViews(),this.registerIFrameEvents()}async clearMetadataCache(){for(let t of this.frontmatterMarkdownLinksCache.getFilePaths()){let n=this.app.metadataCache.getCache(t);if(!n?.frontmatterLinks)continue;let i=new Set(this.frontmatterMarkdownLinksCache.getKeys(t));n.frontmatterLinks=n.frontmatterLinks.filter(u=>!i.has(u.key)),n.frontmatterLinks.length===0&&delete n.frontmatterLinks;let s=this.app.vault.getFileByPath(t);if(!s)continue;let a=await this.app.vault.read(s);this.app.metadataCache.trigger("changed",s,a,n)}}handleClick(t){if(t.button===2||!Re.Keymap.isModEvent(t)&&!this.isLivePreviewMode())return;let i=t.target,s=oi(i);if(s&&!s.isWikilink)if(t.preventDefault(),s.isExternalUrl)window.open(s.url,t.button===1?"tab":"");else{let a=this.app.workspace.getActiveFile();if(!a)return;et(()=>this.app.workspace.openLinkText(s.url,a.path,Re.Keymap.isModEvent(t)))}}handleContextMenu(t){let n=t.target,i=oi(n);if(!i)return;t.preventDefault();let s=new Re.Menu;i.isExternalUrl?this.app.workspace.handleExternalLinkContextMenu(s,i.url):this.app.workspace.handleLinkContextMenu(s,i.url,this.app.workspace.getActiveFile()?.path??""),s.showAtMouseEvent(t)}handleDelete(t){this.frontmatterMarkdownLinksCache.delete(t.path)}handleMetadataCacheChanged(t,n,i){et(async()=>{await this.processFrontmatterLinksInFile(t,i,n)})}handleMouseOver(t){let n=this.app.workspace.getActiveViewOfType(Re.MarkdownView),i=t.target,s=oi(i);s&&(s.isExternalUrl||(t.preventDefault(),this.app.workspace.trigger("hover-link",{event:t,hoverParent:this,linktext:s.url,source:n?.getHoverSource()??"source",targetEl:i})))}handleRename(t,n){t instanceof Re.TFile&&this.frontmatterMarkdownLinksCache.rename(n,t)}isLivePreviewMode(){let t=this.app.workspace.getActiveViewOfType(Re.MarkdownView);return!t||t.getMode()!=="source"?!1:!t.getState().source}async processAllNotes(){this.frontmatterMarkdownLinksCache=new li,await this.frontmatterMarkdownLinksCache.init(this.app);let t=new Set(this.frontmatterMarkdownLinksCache.getFilePaths());await vu({abortSignal:this.abortSignal,buildNoticeMessage:(n,i)=>`Processing frontmatter links ${i} - ${n.path}`,items:gu(this.app),processItem:async n=>{if(t.delete(n.path),this.frontmatterMarkdownLinksCache.isCacheValid(n)){let s=this.frontmatterMarkdownLinksCache.getLinks(n);if(s.length>0){let a=await Xr(this.app,n);if(a){a.frontmatterLinks??=[];let u=new Set(s.map(c=>c.key));Bt(a.frontmatterLinks,c=>!u.has(c.key)),a.frontmatterLinks.push(...s)}}return}let i=await Xr(this.app,n);i&&await this.processFrontmatterLinksInFile(n,i)},progressBarTitle:"Frontmatter Markdown Links: Initializing...",shouldContinueOnError:!0,shouldShowProgressBar:this.settings.shouldShowInitializationNotice});for(let n of t)this.frontmatterMarkdownLinksCache.delete(n)}processFrontmatterLinks(t,n,i,s){if(typeof t=="string"){let u=gt(t);if(!u||u.isWikilink||u.isExternal)return!1;i.frontmatterLinks??=[];let c=i.frontmatterLinks.find(d=>d.key===n);return c||(c={key:n,link:"",original:""},i.frontmatterLinks.push(c)),c.link=u.url,c.original=t,u.alias!==void 0&&(c.displayText=u.alias),this.frontmatterMarkdownLinksCache.add(s,c),!0}if(typeof t!="object"||t===null)return!1;let a=!1;for(let[u,c]of Object.entries(t)){let d=this.processFrontmatterLinks(c,n?`${n}.${u}`:u,i,s);a||=d}return a}async processFrontmatterLinksInFile(t,n,i){this.frontmatterMarkdownLinksCache.updateFile(t),!(this.currentlyProcessingFiles.has(t.path)||!this.processFrontmatterLinks(n.frontmatter,"",n,t.path))&&(this.currentlyProcessingFiles.add(t.path),i??=await this.app.vault.read(t),this.app.metadataCache.trigger("changed",t,i,n),this.currentlyProcessingFiles.delete(t.path))}refreshMarkdownViews(){for(let t of this.app.workspace.getLeavesOfType("markdown")){if(!(t.view instanceof Re.MarkdownView))continue;let n=(0,Re.parseYaml)(t.view.rawFrontmatter);t.view.metadataEditor.synchronize({}),t.view.metadataEditor.synchronize(n)}}registerDomEvents(t){this.registerDomEvent(t,"click",this.handleClick.bind(this)),this.registerDomEvent(t,"auxclick",this.handleClick.bind(this)),this.registerDomEvent(t,"contextmenu",this.handleContextMenu.bind(this),{capture:!0}),this.registerDomEvent(t,"mouseover",this.handleMouseOver.bind(this),{capture:!0})}registerIFrameEvents(){let t=new MutationObserver(n=>{for(let i of n)if(i.type==="childList")for(let s of Array.from(i.addedNodes))s instanceof HTMLIFrameElement&&et(async()=>{await io(s),s.contentDocument&&this.registerDomEvents(s.contentDocument)})});t.observe(document.body,{childList:!0,subtree:!0}),this.register(()=>{t.disconnect()})}};var p0=Ai; /*! 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 */