varBm=Object.create;varWn=Object.defineProperty;varDc=Object.getOwnPropertyDescriptor;varFm=Object.getOwnPropertyNames;var_m=Object.getPrototypeOf,Rm=Object.prototype.hasOwnProperty;varun=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Kc=(e,t)=>{for(variint)Wn(e,i,{get:t[i],enumerable:!0})},Nc=(e,t,i,n)=>{if(t&&typeoft=="object"||typeoft=="function")for(letrofFm(t))!Rm.call(e,r)&&r!==i&&Wn(e,r,{get:()=>t[r],enumerable:!(n=Dc(t,r))||n.enumerable});returne};varpn=(e,t,i)=>(i=e!=null?Bm(_m(e)):{},Nc(t||!e||!e.__esModule?Wn(i,"default",{value:e,enumerable:!0}):i,e)),Dm=e=>Nc(Wn({},"__esModule",{value:!0}),e),T=(e,t,i,n)=>{for(varr=n>1?void0:n?Dc(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);returnn&&r&&Wn(t,i,r),r};varIo=(e,t,i)=>{if(!t.has(e))throwTypeError("Cannot "+i)};varY=(e,t,i)=>(Io(e,t,"read from private field"),i?i.call(e):t.get(e)),ve=(e,t,i)=>{if(t.has(e))throwTypeError("Cannot add the same private member more than once");tinstanceofWeakSet?t.add(e):t.set(e,i)},Be=(e,t,i,n)=>(Io(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i);varBo=(e,t,i,n)=>({set_(r){Be(e,t,r,i)},get_(){returnY(e,t,n)}}),he=(e,t,i)=>(Io(e,t,"access private method"),i);varVa=un((Cd,Ua)=>{(function(e,t){"use strict";typeofdefine=="function"&&define.amd?define(t):typeofUa=="object"&&Ua.exports?Ua.exports=t():e.log=t()})(Cd,function(){"use strict";vare=function(){},t="undefined",i=typeofwindow!==t&&typeofwindow.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],r={},a=null;functions(h,x){varb=h[x];if(typeofb.bind=="function")returnb.bind(h);try{returnFunction.prototype.bind.call(b,h)}catch{returnfunction(){returnFunction.prototype.apply.apply(b,[h,arguments])}}}functiono(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}functionl(h){returnh==="debug"&&(h="log"),typeofconsole===t?!1:h==="trace"&&i?o:console[h]!==void0?s(console,h):console.log!==void0?s(console,"log"):e}functionc(){for(varh=this.getLevel(),x=0;x<n.length;x++){varb=n[x];this[b]=x<h?e:this.methodFactory(b,h,this.name)}if(this.log=this.debug,typeofconsole===t&&h<this.levels.SILENT)return"No console available for logging"}functiond(h){returnfunction(){typeofconsole!==t&&(c.call(this),this[h].apply(this,arguments))}}functionu(h,x,b){returnl(h)||d.apply(this,arguments)}functiong(h,x){varb=this,k,A,L,C="loglevel";typeofh=="string"?C+=":"+h:typeofh=="symbol"&&(C=void0);functionq(K){varU=(n[K]||"silent").toUpperCase();if(!(typeofwindow===t||!C)){try{window.localStorage[C]=U;return}catch{}try{window.document.cookie=encodeURIComponent(C)+"="+U+";"}catch{}}}functionz(){varK;if(!(typeofwindow===t||!C)){try{K=window.localStorage[C]}catch{}if(typeofK===t)try{varU=window.document.cookie,Q=encodeURIComponent(C),R=U.indexOf(Q+"=");R!==-1&&(K=/^([^;]+)/.exec(U.slice(R+Q.length+1))[1])}catch{}returnb.levels[K]===void0&&(K=void0),K}}functionF(){if(!(typeofwindow===t||!C)){try{window.localStorage.removeItem(C)}catch{}try{window.document.cookie=encodeURIComponent(C)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}functionN(K){varU=K;if(typeofU=="string"&&b.levels[U.toUpperCase()]!==void0&&(U=b.levels[U.toUpperCase()]),typeofU=="number"&&U>=0&&U<=b.levels.SILENT)returnU;thrownewTypeError("log.setLevel() called with invalid level: "+K)}b.name=h,b.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},b.methodFactory=x||u,b.getLevel=function(){returnL??A??k},b.setLevel=function(K,U){returnL=N(K),U!==!1&&q(L),c.call(b)},b.setDefaultLevel=function(K){A=N(K),z()||b.setLevel(K,!1)},b.resetLevel=function(){L=null,F(),c.call(b)},b.enableAll=function(K){b.setLevel(b.levels.TRACE,K)},b.disableAll=function(K){b.setLevel(b.levels.SILENT,K)},b.rebuild=function(){if(a!==b&&(k=N(a.getLevel())),c.call(b),a===b)for(varKinr)r[K].rebuild()},k=N(a?a.getLevel():"WARN");var_=z();_!=null&&(L=N(_)),c.call(b)}a=newg,a.getLogger=f
`;return o.replace(/\n$/,"")}var Zm=Qm,Jm=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Xm=["scalar","sequence","mapping"];function eg(e){var t={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(n){t[String(n)]=i})}),t}function ig(e,t){if(t=t||{},Object.keys(t).forEach(function(i){if(Jm.indexOf(i)===-1)throw new Ge('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(i){return i},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=eg(t.styleAliases||null),Xm.indexOf(this.kind)===-1)throw new Ge('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Pe=ig;function Yc(e,t){var i=[];return e[t].forEach(function(n){var r=i.length;i.forEach(function(a,s){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(r=s)}),i[r]=n}),i}function tg(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,i;function n(r){r.multi?(e.multi[r.kind].push(r),e.multi.fallback.push(r)):e[r.kind][r.tag]=e.fallback[r.tag]=r}for(t=0,i=arguments.length;t<i;t+=1)arguments[t].forEach(n);return e}function Do(e){return this.extend(e)}Do.prototype.extend=function(t){var i=[],n=[];if(t instanceof Pe)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(i=i.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new Ge("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(a){if(!(a instanceof Pe))throw new Ge("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Ge("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Ge("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof Pe))throw new Ge("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(Do.prototype);return r.implicit=(this.implicit||[]).concat(i),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=Yc(r,"implicit"),r.compiledExplicit=Yc(r,"explicit"),r.compiledTypeMap=tg(r.compiledImplicit,r.compiledExplicit),r};var ng=Do,rg=new Pe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),ag=new Pe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),sg=new Pe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),og=new ng({explicit:[rg,ag,sg]});function lg(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function cg(){return null}function dg(e){return e===null}var ug=new Pe("tag:yaml.org,2002:null",{kind:"scalar",resolve:lg,construct:cg,predicate:dg,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function pg(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function mg(e){return e==="true"||e==="True"||e==="TRUE"}function gg(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var hg=new Pe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:pg,construct:mg,predicate:gg,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});functio
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function ch(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var ud=new Array(256),pd=new Array(256);for(xt=0;xt<256;xt++)ud[xt]=Hc(xt)?1:0,pd[xt]=Hc(xt);var xt;function dh(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||sd,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function md(e,t){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=Zm(i),new Ge(t,i)}function j(e,t){throw md(e,t)}function Pa(e,t){e.onWarning&&e.onWarning.call(null,md(e,t))}var $c={YAML:function(t,i,n){var r,a,s;t.version!==null&&j(t,"duplication of %YAML directive"),n.length!==1&&j(t,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&j(t,"ill-formed argument of the YAML directive"),a=parseInt(r[1],10),s=parseInt(r[2],10),a!==1&&j(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Pa(t,"unsupported YAML version of the document")},TAG:function(t,i,n){var r,a;n.length!==2&&j(t,"TAG directive accepts exactly two arguments"),r=n[0],a=n[1],cd.test(r)||j(t,"ill-formed tag handle (first argument) of the TAG directive"),Zi.call(t.tagMap,r)&&j(t,'there is a previously declared suffix for "'+r+'" tag handle'),dd.test(a)||j(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{j(t,"tag prefix is malformed: "+a)}t.tagMap[r]=a}};function Qi(e,t,i,n){var r,a,s,o;if(t<i){if(o=e.input.slice(t,i),n)for(r=0,a=o.length;r<a;r+=1)s=o.charCodeAt(r),s===9||32<=s&&s<=1114111||j(e,"expected valid JSON character");else nh.test(o)&&j(e,"the stream contains non-printable characters");e.result+=o}}function Wc(e,t,i,n){var r,a,s,o;for(Le.isObject(i)||j(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(i),s=0,o=r.length;s<o;s+=1)a=r[s],Zi.call(t,a)||(t[a]=i[a],n[a]=!0)}function hn(e,t,i,n,r,a,s,o,l){var c,d;if(Array.isArray(r))for(r=Array.prototype.slice.call(r),c=0,d=r.length;c<d;c+=1)Array.isArray(r[c])&&j(e,"nested arrays are not supported inside keys"),typeof r=="object"&&Pc(r[c])==="[object Object]"&&(r[c]="[object Object]");if(typeof r=="object"&&Pc(r)==="[object Object]"&&(r="[object Object]"),r=String(r),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,d=a.length;c<d;c+=1)Wc(e,t,a[c],i);else Wc(e,t,a,i);else!e.json&&!Zi.call(i,r)&&Zi.call(t,r)&&(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,j(e,"duplicated mapping key")),r==="__proto__"?Object.defineProperty(t,r,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[r]=a,delete i[r];return t}function Ho(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):j(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Te(e,t,i){for(var n=0,r=e.input.charCodeAt(e.position);r!==0;){for(;wt(r);)r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(t&&r===35)do r=e.input.charCodeAt(++e.position);while(r!==10&&r!==13&&r!==0);if(Ei(r))for(Ho(e),r=e.input.charCodeAt(e.position),n++,e.lineIndent=0;r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position);else break}return i!==-1&&n!==0&&e.lineIndent<i&&Pa(e,"deficient indentation"),n}function Wa(e){var t=e.position,i;return i=e.input.charCodeAt(t),!!((i===45||i===46)&&i===e.input.charCodeAt(t+1)&&i===e.input.charCodeAt(t+2)&&(t+=3,i=e.input.charCodeAt(t),i===0||ti(i)))}function $o(e,t){t===1?e.result+=" ":t>1&&(e.result+=Le.rep
`,t-1))}function uh(e,t,i){var n,r,a,s,o,l,c,d,u=e.kind,g=e.result,m;if(m=e.input.charCodeAt(e.position),ti(m)||gn(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(r=e.input.charCodeAt(e.position+1),ti(r)||i&&gn(r)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;m!==0;){if(m===58){if(r=e.input.charCodeAt(e.position+1),ti(r)||i&&gn(r))break}else if(m===35){if(n=e.input.charCodeAt(e.position-1),ti(n))break}else{if(e.position===e.lineStart&&Wa(e)||i&&gn(m))break;if(Ei(m))if(l=e.line,c=e.lineStart,d=e.lineIndent,Te(e,!1,-1),e.lineIndent>=t){o=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=d;break}}o&&(Qi(e,a,s,!1),$o(e,e.line-l),a=s=e.position,o=!1),wt(m)||(s=e.position+1),m=e.input.charCodeAt(++e.position)}return Qi(e,a,s,!1),e.result?!0:(e.kind=u,e.result=g,!1)}function ph(e,t){var i,n,r;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(Qi(e,n,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)n=e.position,e.position++,r=e.position;else return!0;else Ei(i)?(Qi(e,n,r,!0),$o(e,Te(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Wa(e)?j(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);j(e,"unexpected end of the stream within a single quoted scalar")}function mh(e,t){var i,n,r,a,s,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return Qi(e,i,e.position,!0),e.position++,!0;if(o===92){if(Qi(e,i,e.position,!0),o=e.input.charCodeAt(++e.position),Ei(o))Te(e,!1,t);else if(o<256&&ud[o])e.result+=pd[o],e.position++;else if((s=oh(o))>0){for(r=s,a=0;r>0;r--)o=e.input.charCodeAt(++e.position),(s=sh(o))>=0?a=(a<<4)+s:j(e,"expected hexadecimal character");e.result+=ch(a),e.position++}else j(e,"unknown escape sequence");i=n=e.position}else Ei(o)?(Qi(e,i,n,!0),$o(e,Te(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Wa(e)?j(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}j(e,"unexpected end of the stream within a double quoted scalar")}function gh(e,t){var i=!0,n,r,a,s=e.tag,o,l=e.anchor,c,d,u,g,m,h=Object.create(null),x,b,k,A;if(A=e.input.charCodeAt(e.position),A===91)d=93,m=!1,o=[];else if(A===123)d=125,m=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),A=e.input.charCodeAt(++e.position);A!==0;){if(Te(e,!0,t),A=e.input.charCodeAt(e.position),A===d)return e.position++,e.tag=s,e.anchor=l,e.kind=m?"mapping":"sequence",e.result=o,!0;i?A===44&&j(e,"expected the node content, but found ','"):j(e,"missed comma between flow collection entries"),b=x=k=null,u=g=!1,A===63&&(c=e.input.charCodeAt(e.position+1),ti(c)&&(u=g=!0,e.position++,Te(e,!0,t))),n=e.line,r=e.lineStart,a=e.position,fn(e,t,Ya,!1,!0),b=e.tag,x=e.result,Te(e,!0,t),A=e.input.charCodeAt(e.position),(g||e.line===n)&&A===58&&(u=!0,A=e.input.charCodeAt(++e.position),Te(e,!0,t),fn(e,t,Ya,!1,!0),k=e.result),m?hn(e,o,h,b,x,k,n,r,a):u?o.push(hn(e,null,h,b,x,k,n,r,a)):o.push(x),Te(e,!0,t),A=e.input.charCodeAt(e.position),A===44?(i=!0,A=e.input.charCodeAt(++e.position)):i=!1}j(e,"unexpected end of the stream within a flow collection")}function hh(e,t){var i,n,r=Ro,a=!1,s=!1,o=t,l=0,c=!1,d,u;if(u=e.input.charCodeAt(e.position),u===124)n=!1;else if(u===62)n=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Ro===r?r=u===43?jc:th:j(e,"repeat of a chomping mode identifier");else if((d=lh(u))>=0)d===0?j(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?j(e,"repeat of an indentation width identifier"):(o=t+d-1,s=!0);else break;if(wt(u)){do u=e.input.charCodeAt(++e.position);while(wt(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Ei(u)&&u!==0)}for(;u!==0;){for(Ho(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!s||e.lineIn
`,a?1+l:l),a=!0,s=!0,l=0,i=e.position;!Ei(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Qi(e,i,e.position,!1)}return!0}function Uc(e,t){var i,n=e.tag,r=e.anchor,a=[],s,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!ti(s))));){if(o=!0,e.position++,Te(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(i=e.line,fn(e,t,ld,!1,!0),a.push(e.result),Te(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>t)&&l!==0)j(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=n,e.anchor=r,e.kind="sequence",e.result=a,!0):!1}function fh(e,t,i){var n,r,a,s,o,l,c=e.tag,d=e.anchor,u={},g=Object.create(null),m=null,h=null,x=null,b=!1,k=!1,A;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),A=e.input.charCodeAt(e.position);A!==0;){if(!b&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),a=e.line,(A===63||A===58)&&ti(n))A===63?(b&&(hn(e,u,g,m,h,null,s,o,l),m=h=x=null),k=!0,b=!0,r=!0):b?(b=!1,r=!0):j(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,A=n;else{if(s=e.line,o=e.lineStart,l=e.position,!fn(e,i,od,!1,!0))break;if(e.line===a){for(A=e.input.charCodeAt(e.position);wt(A);)A=e.input.charCodeAt(++e.position);if(A===58)A=e.input.charCodeAt(++e.position),ti(A)||j(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(hn(e,u,g,m,h,null,s,o,l),m=h=x=null),k=!0,b=!1,r=!1,m=e.tag,h=e.result;else if(k)j(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=d,!0}else if(k)j(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=d,!0}if((e.line===a||e.lineIndent>t)&&(b&&(s=e.line,o=e.lineStart,l=e.position),fn(e,t,ja,!0,r)&&(b?h=e.result:x=e.result),b||(hn(e,u,g,m,h,x,s,o,l),m=h=x=null),Te(e,!0,-1),A=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&A!==0)j(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return b&&hn(e,u,g,m,h,null,s,o,l),k&&(e.tag=c,e.anchor=d,e.kind="mapping",e.result=u),k}function yh(e){var t,i=!1,n=!1,r,a,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&j(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(i=!0,s=e.input.charCodeAt(++e.position)):s===33?(n=!0,r="!!",s=e.input.charCodeAt(++e.position)):r="!",t=e.position,i){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(a=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):j(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!ti(s);)s===33&&(n?j(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),cd.test(r)||j(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),ah.test(a)&&j(e,"tag suffix cannot contain flow indicator characters")}a&&!dd.test(a)&&j(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{j(e,"tag name is malformed: "+a)}return i?e.tag=a:Zi.call(e.tagMap,r)?e.tag=e.tagMap[r]+a:r==="!"?e.tag="!"+a:r==="!!"?e.tag="tag:yaml.org,2002:"+a:j(e,'undeclared tag handle "'+r+'"'),!0}function bh(e){var t,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&j(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!ti(i)&&!gn(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function vh(e){var t,i,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new dh(e,t),n=e.indexOf("\0");for(n!==-1&&(i.position=n,j(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)xh(i);return i.documents}function wh(e,t,i){t!==null&&typeof t=="object"&&typeof i>"u"&&(i=t,t=null);var n=gd(e,i);if(typeof t!="function")return n;for(var r=0,a=n.length;r<a;r+=1)t(n[r])}function kh(e,t){var i=gd(e,t);if(i.length!==0){if(i.length===1)return i[0];throw new Ge("expected a single document in the stream, but found more")}}var Sh=wh,Ah=kh,hd={loadAll:Sh,load:Ah},fd=Object.prototype.toString,yd=Object.prototype.hasOwnProperty,Wo=65279,Th=9,Gn=10,zh=13,Lh=32,Eh=33,Oh=34,Ko=35,Ch=37,Mh=38,qh=39,Ih=42,bd=44,Bh=45,Ha=58,Fh=61,_h=62,Rh=63,Dh=64,vd=91,xd=93,Kh=96,wd=123,Nh=124,kd=125,He={};He[0]="\\0";He[7]="\\a";He[8]="\\b";He[9]="\\t";He[10]="\\n";He[11]="\\v";He[12]="\\f";He[13]="\\r";He[27]="\\e";He[34]='\\"';He[92]="\\\\";He[133]="\\N";He[160]="\\_";He[8232]="\\L";He[8233]="\\P";var Yh=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],jh=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ph(e,t){var i,n,r,a,s,o,l;if(t===null)return{};for(i={},n=Object.keys(t),r=0,a=n.length;r<a;r+=1)s=n[r],o=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&yd.call(l.styleAliases,o)&&(o=l.styleAliases[o]),i[s]=o;return i}function Hh(e){var t,i,n;if(t=e.toString(16).toUpperCase(),e<=255)i="x",n=2;else if(e<=65535)i="u",n=4;else if(e<=4294967295)i="U",n=8;else throw new Ge("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+Le.repeat("0",n-t.length)+t}var $h=1,Qn=2;function Wh(e){this.schema=e.schema||sd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Le.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Ph(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Qn:$h,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Vc(e,t){for(var i=Le.repeat(" ",t),n=0,r=-1,a="",s,o=e.length;n<o;)r=e.indexOf(`
`+t.stack),se.default.error(i),Xn&&Za(i.substring(i.indexOf("]")+2),se.default.levels.TRACE)}function yn(e){se.default.info(`${Ga}${e}`),Xn&&Za(e,se.default.levels.INFO)}function ri(e){se.default.debug(`${Ga}${e}`),Xn&&Za(e,se.default.levels.DEBUG)}function kt(e){se.default.warn(`${Ga}${e}`),Xn&&Za(e,se.default.levels.WARN)}function St(e){se.default.getLevel()>se.default.levels.DEBUG||Zo.set(e,performance.now())}function Ji(e){if(se.default.getLevel()>se.default.levels.DEBUG)return;Zo.has(e)||kt(E("logs.timing-key-not-found").replace("{TIMING_KEY}",e));let t=performance.now()-Zo.get(e);ri(`${e}:${t}`+E("logs.milliseconds-abbreviation"))}function Za(e,t){se.default.getLevel()<=t&&Qa.push(e)}function qd(){Qa=[]}function Jo(e){Xn=e}function Ja(e){switch(e){case"INFO":{se.default.setLevel("info");break}case"TRACE":{se.default.setLevel("trace");break}case"DEBUG":{se.default.setLevel("debug");break}case"SILENT":{se.default.setLevel("silent");break}case"ERROR":{se.default.setLevel("error");break}case"WARN":{se.default.setLevel("warn");break}}}function Id(e){switch(e){case se.default.levels.INFO:return"INFO";case se.default.levels.TRACE:return"TRACE";case se.default.levels.DEBUG:return"DEBUG";case se.default.levels.SILENT:return"SILENT";case se.default.levels.ERROR:return"ERROR";case se.default.levels.WARN:return"WARN"}}var Bd={};var Fd={};var _d={};var Rd={commands:{"lint-file":{name:"Linten Sie die aktuelle Datei","error-message":"Lint-Datei-Fehler in der Datei"},"lint-file-unless-ignored":{name:"Linten Sie die aktuelle Datei, es sei denn, sie wird ignoriert"},"lint-all-files":{name:"Linten Sie alle Dateien im Vault","error-message":"Beim Linten aller Dateien Fehler in der Datei","success-message":"Alle Dateien gelinted","errors-message-singular":"Beim Linten aller Dateien gab es einen Fehler.","errors-message-plural":"Beim Linten aller Dateien gab es {NUM} Fehler.","start-message":"Dadurch werden alle Ihre Dateien ver\xE4ndert und es k\xF6nnen Fehler entstehen.","submit-button-text":"Linte alle","submit-button-notice-text":"Linte alle Dateien..."},"lint-all-files-in-folder":{name:"Linte alle Dateien im aktuellen Ordner","start-message":"Dadurch werden alle Ihre Dateien in {FOLDER_NAME} bearbeitet, einschlie\xDFlich der Dateien in den Unterordnern, was zu Fehlern f\xFChren kann.","submit-button-text":"Linte alle Dateien in {FOLDER_NAME}","submit-button-notice-text":"Linten aller Dateien in {FOLDER_NAME}...","error-message":"Beim Linten aller Dateien im Ordner gab es Fehler in der Datei","success-message":"Alle {NUM}-Dateien in {FOLDER_NAME} wurden gelinted.","message-singular":"Alle {NUM}-Dateien in {FOLDER_NAME} wurden gelinted und es trat ein Fehler auf.","message-plural":"Alle {FILE_COUNT}-Dateien in {FOLDER_NAME} wurden gelinted und es gab {ERROR_COUNT} Fehler."},"paste-as-plain-text":{name:"Einf\xFCgen als reiner Text und ohne \xC4nderungen"},"lint-file-pop-up-menu-text":{name:"Linte Datei"},"lint-folder-pop-up-menu-text":{name:"Linte Ordner"}},logs:{"plugin-load":"Plugin wird geladen","plugin-unload":"Plugin entladen","folder-lint":"Linting-Ordner ","linter-run":"Laufender Linter","paste-link-warning":"Abgebrochenes Einf\xFCgen des Lints, da der Inhalt der Zwischenablage ein Link ist, wodurch Konflikte mit anderen Plugins vermieden werden, die das Einf\xFCgen \xE4ndern.","see-console":"Weitere Informationen finden Sie in der Konsole.","unknown-error":"Beim Linten ist ein unbekannter Fehler aufgetreten.","moment-locale-not-found":"Beim Versuch, Moment.js locale auf {MOMENT_LOCALE} umzustellen, wurde {CURRENT_LOCALE} angezeigt","file-change-lint-message-start":"Linted","pre-rules":"Regeln vor regul\xE4ren Regeln","post-rules":"Regeln nach regul\xE4ren Regeln","rule-running":"Laufende Regeln","custom-regex":"Benutzerdefinierte Regex-Regeln","running-custom-regex":"Ausf\xFChren von benutzerdefinierten Regex","running-custom-lint-command":"Ausf\xFChren von benutzerdefinierten Lint-Befehlen","custom-lint-duplicate-warning":'Sie k\xF6nnen denselben Befehl ("{COMMAND_NAME}") nicht zweimal als benutzerdefinierte Lint-Regel
`&&(e=e.substring(0,s.end.offset)+e.substring(s.end.offset+1)),e=e.substring(0,s.start.offset)+e.substring(s.end.offset),a(e,o,s.start.offset)}for(let s of n){let o=s[1],l=o.referencePositions.length-o.footnotesReferencingKey.length;l=l>=0?l:0;let c=0;for(let d of o.footnotesReferencingKey){if(c+l>=o.referencePositions.length)throw new Error(E("logs.missing-footnote-error-message").replace("{FOOTNOTE}",d));r.set(d,o.referencePositions[l+c++])}}i=i.sort((s,o)=>r.get(s)-r.get(o)),i.length>0&&(e=e.trimEnd()+`
`+s;return e}function Gu(e){let t=xe("footnoteDefinition",e),i=[],n=new Map,r=new Map,a=[],s=new Set,o=[],l=function(u,g,m){let h=g.match(/\[\^.*?\]/)[0];n.set(g,h);let x=s.has(h);if(x&&i.includes(g)){o.unshift(g);return}else if(x)throw new Error(E("logs.too-many-footnotes-error-message").replace("{FOOTNOTE_KEY}",h));let b;do b=u.lastIndexOf(h,m),b!==-1&&((b+g.length>u.length||u.substring(b,b+g.length)!==g)&&a.push({key:h,position:b}),m=b-1);while(b>0);s.add(h)};for(let u of t){let g=e.substring(u.start.offset,u.end.offset);i.unshift(g),l(e,g,u.start.offset)}let c=1,d=new Set;for(let u of i){if(d.has(u))continue;d.add(u);let g=n.get(u),m=`[^${c++}]`;r.set(g,m)}a.sort((u,g)=>g.position-u.position);for(let u of a){let g=r.get(u.key);e=cu(e,u.key,g,u.position)}for(let u of d){let g=n.get(u),m=r.get(g);e=e.replace(u,u.replace(g,m))}for(let u of o){let g=e.replace(`
`);e===g&&(g=e.replace(u,"")),e=g}return e}function ws(e,t,i){let n=xe(i,e);if(n.length===0)return e;let r="";if(t==="underscore")r="_";else if(t==="asterisk")r="*";else{let a=n[n.length-1];r=e.substring(a.start.offset,a.start.offset+1)}i==="strong"&&(r+=r);for(let a of n){let s=r+e.substring(a.start.offset+r.length,a.end.offset-r.length)+r;e=de(e,a.start.offset,a.end.offset,s)}return e}function Qu(e,t){let i=xe("paragraph",e);if(i.length===0)return e;for(let n of i){let r=e.substring(n.start.offset,n.end.offset).split(`
`),e}function Ju(e){let t=xe("link",e);for(let i of t){if(i==null)continue;let n=e.substring(i.start.offset,i.end.offset);if(!n.match(gr))continue;let r=n.indexOf("]"),a=n.substring(0,1)+n.substring(1,r).trim()+n.substring(r);e=de(e,i.start.offset,i.end.offset,a)}return e}function Xu(e,t){let i=xe("emphasis",e);for(let n of i){let r=e.substring(n.start.offset+1,n.end.offset-1);r=t(r),e=de(e,n.start.offset+1,n.end.offset-1,r)}return e}function ep(e,t){let i=xe("strong",e);for(let n of i){let r=e.substring(n.start.offset+2,n.end.offset-2);r=t(r),e=de(e,n.start.offset+2,n.end.offset-2,r)}return e}function ks(e,t){let i=xb(e);for(let n of i){let r=n.start.offset;for(;r>0&&e.charAt(r-1).trim()==="";)r--;(r===0||e.charAt(r-1).trim()!="")&&r++;let a=e.substring(r,n.end.offset);gp.test(a)&&(r+=4,a=a.substring(4)),a=t(a),e=de(e,r,n.end.offset,a)}return e}function ip(e){let t=xe("code",e);for(let i of t){let n=e.substring(i.start.offset,i.end.offset);!n.startsWith("```")&&!n.startsWith("~~~")||(e=Tt(e,i.start.offset,i.end.offset))}return e}function tp(e,t){let i=xe("math",e);for(let n of i)e=Tt(e,n.start.offset,n.end.offset);i=xe("inlineMath",e);for(let n of i)e.substring(n.start.offset,n.end.offset).startsWith("$".repeat(t))&&(e=Tt(e,n.start.offset,n.end.offset));return e}function np(e){let t=xe("blockquote",e);for(letioft){letn=i.end.offset;for(;n<e.length-1&&e.charAt(n)!==`
`;)n++;e=Tt(e,i.start.offset,n,!0)}return e}function rp(e,t,i){let n=xe("list",e);if(!n)return e;for(let r of n){let a=r.start.offset;for(;a>0&&e.charAt(a-1)!==`
`;)a--;let s=e.substring(a,r.end.offset),o=function(u){let g=u.lastIndexOf("> ");return g!==-1&&(u=u.substring(g+2)),u=u.replaceAll(" "," "),Math.floor((u.split(" ").length-1)/2)+1},l=new Map,c=function(u,g){let m=g;for(;m>u;)l.delete(m--)},d=-1;s=s.replace(/^(( |\t|> )*)((\d+(\.|\)))|[-*+])([^\n]*)$/gm,(u,g="",m,h,x,b,k)=>{let A=1,L=o(g);if(!/^\d/.test(h)){let C=L>d?L:d;return c(L,C),u}return l.has(L)?t==="ascending"&&(A=l.get(L)+1,l.set(L,A)):l.set(L,1),d>L&&c(L,d),d=L,`${g}${A}${i}${k}`}),e=de(e,a,r.end.offset,s)}return e}function ap(e,t){let i=xe("listItem",e);if(!i)return e;let n=/^((\d+[.)])|(- \[[ x]\]))/m,r=t;if(t=="consistent"){let a=i.length-1;for(;a>=0;){let s=e.substring(i[a].start.offset,i[a].end.offset);if(a--,!s.match(n)){r=s.charAt(0);break}}if(a==-1)return e}for(let a of i){let s=e.substring(a.start.offset,a.end.offset);s.match(n)||(s=r+s.substring(1),e=de(e,a.start.offset,a.end.offset,s))}return e}function Dl(e,t){let i=xe("blockquote",e);for(let n of i){let r=n.end.offset;for(;r<e.length-1&&e.charAt(r)!==`
`;)r++;let a=e.substring(n.start.offset,r);a=t(a),e=de(e,n.start.offset,r,a)}return e}function sp(e,t){let i=xe("math",e),n=new RegExp("^(\\${"+t+",})(\\n*)"),r=new RegExp("(\\n*)(\\${"+t+",})([^\\$]*)$");for(let a of i){let s=e.substring(a.start.offset,a.end.offset),o=Sb(s,t,a.start.offset);for(let l of o)e=$u(e,l.startIndex,l.endIndex,n,r)}i=xe("inlineMath",e);for(let a of i)e.substring(a.start.offset,a.end.offset).startsWith("$".repeat(t))&&(e=$u(e,a.start.offset,a.end.offset,n,r));return e}function Sb(e,t,i){let n="$".repeat(t),r=t;for(;e.charAt(r)==="$";)n+="$",r++;let a=[],s=Xi(e,n);if(s<=1)return[];if(s===2)return a.unshift({startIndex:i,endIndex:i+e.length}),a;s===3&&a.unshift({startIndex:i,endIndex:i+e.indexOf(n,n.length)+n.length}),s%2===1&&s--;let o=i,l=n.length;for(;s>2;){let c=e.indexOf(n,l)+n.length;a.unshift({startIndex:o,endIndex:i+c}),o=i+c+1,l=c+1,s-=2}return a.unshift({startIndex:i+e.indexOf(n,l),endIndex:i+e.length}),a}function $u(e,t,i,n,r){let a=e.substring(ir(e,t),t)??"",[s]=bn(a,a.length),o=e.substring(ir(e,i),i)??"",l=e.substring(t,i),c=cp.test(a.trim()),d=!1;for(l=l.replace(n,(u,g,m="")=>{let h="";return!c&&a.trim()!=""?(h+=`
---`)},wikiLink:{replaceAction:zs,placeholder:"{WIKI_LINK_PLACEHOLDER}"},obsidianMultiLineComments:{replaceAction:fp,placeholder:"{OBSIDIAN_COMMENT_PLACEHOLDER}"},footnoteAtStartOfLine:{replaceAction:Ts,placeholder:"{FOOTNOTE_AT_START_OF_LINE_PLACEHOLDER}"},footnoteAfterATask:{replaceAction:/- \[.] (\[\^\w+\]) ?([,.;!:?])/gm,placeholder:"{FOOTNOTE_AFTER_A_TASK_PLACEHOLDER}"},url:{replaceAction:kn,placeholder:"{URL_PLACEHOLDER}"},anchorTag:{replaceAction:bp,placeholder:"{ANCHOR_PLACEHOLDER}"},templaterCommand:{replaceAction:Sp,placeholder:"{TEMPLATER_PLACEHOLDER}"},link:{replaceAction:Bb,placeholder:"{REGULAR_LINK_PLACEHOLDER}"},tag:{replaceAction:Fb,placeholder:"#tag-placeholder"},table:{replaceAction:_b,placeholder:"{TABLE_PLACEHOLDER}"},customIgnore:{replaceAction:Rb,placeholder:"{CUSTOM_IGNORE_PLACEHOLDER}"}};function Ee(e,t,i){let n=[];for(let r of e){let a;if(typeof r.replaceAction=="string")a=qb(t,r.placeholder,r.replaceAction);else if(r.replaceAction instanceof RegExp)a=Ib(t,r.placeholder,r.replaceAction);else if(typeof r.replaceAction=="function"){let s=r.replaceAction;a=s(t,r.placeholder)}t=a.newText,n.push({replacedValues:a.replacedValues,placeholder:r.placeholder})}return t=i(t),n=n.reverse(),n!=null&&n.length>0&&n.forEach(r=>{r.replacedValues.forEach(a=>{t=t.replace(new RegExp(r.placeholder,"i"),Xe(a))})}),t}function qb(e,t,i){let n=xe(i,e),r=[];for(let a of n){let s=e.substring(a.start.offset,a.end.offset);r.push(s),e=de(e,a.start.offset,a.end.offset,t)}return r.reverse(),{newText:e,replacedValues:r}}function Ib(e,t,i){let n=e.match(i),r=[];if(i.flags.includes("g")){if(e=e.replaceAll(i,t),n)for(let a of n)r.push(a)}else e=e.replace(i,t),n&&r.push(n[0]);return{newText:e,replacedValues:r}}function Bb(e,t){let i=xe("link",e),n=[];for(let r of i){if(r==null)continue;let a=e.substring(r.start.offset,r.end.offset);a.match(gr)&&(n.push(a),e=de(e,r.start.offset,r.end.offset,t))}return n.reverse(),{newText:e,replacedValues:n}}function Fb(e,t){let i=[];return e=e.replace(hr,(n,r,a)=>(i.push(a),r+t)),{newText:e,replacedValues:i}}function _b(e,t){let i=Ss(e),n=new Array(i.length),r=0,a=n.length;for(let s of i)n[a-1-r++]=e.substring(s.startIndex,s.endIndex),e=de(e,s.startIndex,s.endIndex,t);return{newText:e,replacedValues:n}}function Rb(e,t){let i=op(e),n=new Array(i.length),r=0,a=n.length;for(let s of i)n[a-1-r++]=e.substring(s.startIndex,s.endIndex),e=de(e,s.startIndex,s.endIndex,t);return{newText:e,replacedValues:n}}var D=(s=>(s.YAML="YAML",s.HEADING="Heading",s.FOOTNOTE="Footnote",s.CONTENT="Content",s.SPACING="Spacing",s.PASTE="Paste",s))(D||{}),Fs=class{constructor(t,i,n,r,a,s,o,l=[],c=!1,d=[]){this.nameKey=t;this.descriptionKey=i;this.settingsKey=n;this.alias=r;this.type=a;this.applyAfterIgnore=s;this.examples=o;this.options=l;this.hasSpecialExecutionOrder=c;this.ignoreTypes=d;this.ruleHeading=this.getName().toLowerCase().replaceAll(" ","-"),l.unshift(new zn("enabled",this.descriptionKey,"",!1));for(let u of l)u.ruleAlias=r}getDefaultOptions(){let t={};for(let i of this.options)t[i.configKey]=i.defaultValue;return t}getOptions(t){return t.ruleConfigs[this.settingsKey]}getName(){return E(this.nameKey)}getDescription(){return E(this.descriptionKey)}getURL(){return"https://platers.github.io/obsidian-linter/settings/"+this.type.toLowerCase()+"-rules/#"+this.ruleHeading}enabledOptionName(){return this.options[0].configKey}apply(t,i){return Ee(this.ignoreTypes,t,n=>this.applyAfterIgnore(n,i))}},_s=class{constructor(t,i,n,r={}){this.description=t,this.options=r,this.before=i,this.after=n}},Ip=Object.values(D);function Rs(e){let t=An(e);if(t===null)return[[],!1];let i=Cp(t);return i.includes("all")?[Ii.map(n=>n.alias),!0]:[i,!1]}var Ii=[],Db={},qt=new Map;function Bp(e){Ii.push(e),Ii.sort((t,i)=>Ip.indexOf(t.type)-Ip.indexOf(i.type)||t.settingsKey.localeCompare(i.settingsKey)),Db[e.alias]=e,qt.has(e.type)?qt.get(e.type).push(e):qt.set(e.type,[e])}function Ds(e,t){let i;throw e instanceof Ld?(i=e.toString(),i=E("logs.wrapper-yaml-error").replace("{ERROR_MESSAGE}",i.substring(i.indexOf(":")+1))):i=E("logs.wrapper-unknown-e
`,n),r===-1&&(r=l.length-1,c=!0),[a,o]=bn(l,r-1);let d=o+a.length+1,u=r;c&&u++;let g=l.substring(d,u);if(g.includes(f.math.placeholder)||g.includes(f.code.placeholder)){n++;continue}let m=As.test(g);s=i(a,m),o++,l=de(l,o,o+a.length,s),n=r+1+s.length-a.length}while(!c);return l}get exampleBuilders(){return[new y({description:"When style = `space`, a space is added to blockquotes missing a space after the indicator",before:p`
`,options:{style:"no space"}})]}get optionBuilders(){return[new ie({OptionsClass:js,nameKey:"rules.blockquote-style.style.name",descriptionKey:"rules.blockquote-style.style.description",optionsKey:"style",records:[{value:"space",description:"> indicator is followed by a space"},{value:"no space",description:">indicator is not followed by a space"}]})]}};It=T([v.register],It);var Ps=class{};T([v.noSettingControl()],Ps.prototype,"lineContent",2);var Bt=class extends v{constructor(){super({nameKey:"rules.add-blockquote-indentation-on-paste.name",descriptionKey:"rules.add-blockquote-indentation-on-paste.description",type:"Paste"})}get OptionsClass(){return Ps}apply(t,i){let n=/^(\s*)((> ?)+) .*/,r=i.lineContent.match(n);if(!r)return t;let a=r[1]??"",s=r[2]??"";return t.trim().replace(/\n/gm,`
${a}${s}`)}get exampleBuilders(){return[new y({description:"Line being pasted into regular text does not get blockquotified with current line being `Part1ofthesentence`",before:p`
`,options:{lineContent:"Part 1 of the sentence"}}),new y({description:"Line being pasted into a blockquote gets blockquotified with current line being `>>`",before:p`
`,options:{style:"ALL CAPS"}})]}get optionBuilders(){return[new ie({OptionsClass:Ft,nameKey:"rules.capitalize-headings.style.name",descriptionKey:"rules.capitalize-headings.style.description",optionsKey:"style",records:[{value:"Title Case",description:"Capitalize Using Title Case Rules"},{value:"ALL CAPS",description:"CAPITALIZE THE WHOLE TITLE"},{value:"First letter",description:"Only capitalize the first letter"}]}),new W({OptionsClass:Ft,nameKey:"rules.capitalize-headings.ignore-case-words.name",descriptionKey:"rules.capitalize-headings.ignore-case-words.description",optionsKey:"ignoreCasedWords"}),new me({OptionsClass:Ft,nameKey:"rules.capitalize-headings.ignore-words.name",descriptionKey:"rules.capitalize-headings.ignore-words.description",optionsKey:"ignoreWords",splitter:fr,separator:", "}),new me({OptionsClass:Ft,nameKey:"rules.capitalize-headings.lowercase-words.name",descriptionKey:"rules.capitalize-headings.lowercase-words.description",optionsKey:"lowercaseWords",splitter:fr,separator:", "})]}};_t=T([v.register],_t);var Hs=class{constructor(){this.innerNewLines=!1}},Sr=class extends v{constructor(){super({nameKey:"rules.compact-yaml.name",descriptionKey:"rules.compact-yaml.description",type:"Spacing"})}get OptionsClass(){return Hs}apply(t,i){return ye(t,n=>(n=n.replace(/^---\n+/,`---
---`,""));if(!r)return n;for(let a of xi)if(i.dedupeAliasKey&&Object.keys(r).includes(a)){n=oe(n,a,we(ot(this.getUniqueArray(Fe(pe(n,a)))),i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let a of vi)if(i.dedupeTagKey&&Object.keys(r).includes(a)){n=oe(n,a,we(st(this.getUniqueArray(Fe(pe(n,a)))),i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(i.dedupeArrayKeys){let a=[...xi,...vi,...i.ignoreDedupeArrayKeys];for(let s of Object.keys(r)){if(a.includes(s)||!Array.isArray(r[s])||r[s].length!==0&&typeof r[s][0]=="object"&&r[s][0]!==null)continue;let o=pe(n,s),l="single-line";o.includes(`
`)&&(l="multi-line");let c=this.getUniqueArray(Fe(o));n=oe(n,s,we(c,l,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays))}}return n})}getUniqueArray(t){return t==null||typeof t=="string"||t.length<=1?t:[...new Set(t)]}get exampleBuilders(){return[new y({description:"Dedupe YAML tags is case sensitive and will use your default format for tags.",before:p`
`,options:{aliasArrayStyle:"multi-line"}}),new y({description:"Dedupe YAML aliases is case sensitive and will use your default format for aliases.",before:p`
`,options:{aliasArrayStyle:"multi-line"}}),new y({description:"Dedupe YAML array keys is case sensitive and will try to preserve the original array format.",before:p`
`,options:{aliasArrayStyle:"multi-line"}}),new y({description:"Dedupe YAML respects list of keys to not remove duplicates of for normal arrays (keys to ignore is just `arr2` for this example)",before:p`
`,options:{aliasArrayStyle:"multi-line",ignoreDedupeArrayKeys:["arr2"]}})]}get optionBuilders(){return[new W({OptionsClass:ki,nameKey:"rules.dedupe-yaml-array-values.dedupe-alias-key.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-alias-key.description",optionsKey:"dedupeAliasKey"}),new W({OptionsClass:ki,nameKey:"rules.dedupe-yaml-array-values.dedupe-tag-key.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-tag-key.description",optionsKey:"dedupeTagKey"}),new W({OptionsClass:ki,nameKey:"rules.dedupe-yaml-array-values.dedupe-array-keys.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-array-keys.description",optionsKey:"dedupeArrayKeys"}),new me({OptionsClass:ki,nameKey:"rules.dedupe-yaml-array-values.ignore-keys.name",descriptionKey:"rules.dedupe-yaml-array-values.ignore-keys.description",optionsKey:"ignoreDedupeArrayKeys"})]}};Lr=T([v.register],Lr);var Ws=class{constructor(){this.defaultLanguage=""}},Er=class extends v{constructor(){super({nameKey:"rules.default-language-for-code-fences.name",descriptionKey:"rules.default-language-for-code-fences.description",type:"Content",ruleIgnoreTypes:[f.yaml,f.math,f.yaml,f.link,f.wikiLink,f.tag]})}get OptionsClass(){return Ws}apply(t,i){return lp(t,i.defaultLanguage)}get exampleBuilders(){return[new y({description:"Add a default language `javascript` to code blocks that do not have a language specified",before:p`
`,options:{defaultLanguage:""}})]}get optionBuilders(){return[new ke({OptionsClass:Ws,nameKey:"rules.default-language-for-code-fences.default-language.name",descriptionKey:"rules.default-language-for-code-fences.default-language.description",optionsKey:"defaultLanguage"})]}};Er=T([v.register],Er);var Us=class{constructor(){this.style="consistent"}},Or=class extends v{constructor(){super({nameKey:"rules.emphasis-style.name",descriptionKey:"rules.emphasis-style.description",type:"Content",ruleIgnoreTypes:[f.code,f.math,f.yaml,f.link,f.wikiLink,f.tag,f.math,f.inlineMath]})}get OptionsClass(){return Us}apply(t,i){return ws(t,i.style,"emphasis")}get exampleBuilders(){return[new y({description:"Emphasis indicators should use underscores when style is set to 'underscore'",before:p`
`,options:{style:"asterisk"}}),new y({description:"Emphasis indicators should use consistent style based on first emphasis indicator in a file when style is set to 'consistent'",before:p`
`,options:{style:"consistent"}}),new y({description:"Emphasis indicators should use consistent style based on first emphasis indicator in a file when style is set to 'consistent'",before:p`
`,options:{style:"consistent"}})]}get optionBuilders(){return[new ie({OptionsClass:Us,nameKey:"rules.emphasis-style.style.name",descriptionKey:"rules.emphasis-style.style.description",optionsKey:"style",records:[{value:"consistent",description:"Makes sure the first instance of emphasis is the style that will be used throughout the document"},{value:"asterisk",description:"Makes sure * is the emphasis indicator"},{value:"underscore",description:"Makes sure _ is the emphasis indicator"}]})]}};Or=T([v.register],Or);var Gl=class{},Cr=class extends v{constructor(){super({nameKey:"rules.empty-line-around-blockquotes.name",descriptionKey:"rules.empty-line-around-blockquotes.description",type:"Spacing"})}get OptionsClass(){return Gl}apply(t,i){return np(t)}get exampleBuilders(){return[new y({description:"Blockquotes that start a document do not get an empty line before them.",before:p`
`})]}get optionBuilders(){return[]}};Cr=T([v.register],Cr);var Ql=class{},Mr=class extends v{constructor(){super({nameKey:"rules.empty-line-around-code-fences.name",descriptionKey:"rules.empty-line-around-code-fences.description",type:"Spacing"})}get OptionsClass(){return Ql}apply(t,i){return ip(t)}get exampleBuilders(){return[new y({description:"Fenced code blocks that start a document do not get an empty line before them.",before:p`
`})]}get optionBuilders(){return[]}};Mr=T([v.register],Mr);var Vs=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};T([v.noSettingControl()],Vs.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var qr=class extends v{constructor(){super({nameKey:"rules.empty-line-around-math-blocks.name",descriptionKey:"rules.empty-line-around-math-blocks.description",type:"Spacing",ruleIgnoreTypes:[f.yaml,f.code]})}get OptionsClass(){return Vs}apply(t,i){return tp(t,i.minimumNumberOfDollarSignsToBeAMathBlock)}get exampleBuilders(){return[new y({description:"Math blocks that start a document do not get an empty line before them.",before:p`
`}),new y({description:"Math blocks that are singe-line are updated based on the value of `NumberofDollarSignstoIndicateaMathBlock` (in this case its value is 2)",before:p`
`}),new y({description:"Math blocks that are not at the start or the end of the document will have an empty line added before and after them",before:p`
`})]}get optionBuilders(){return[]}};qr=T([v.register],qr);var Zl=class{},Ir=class extends v{constructor(){super({nameKey:"rules.empty-line-around-tables.name",descriptionKey:"rules.empty-line-around-tables.description",type:"Spacing",ruleIgnoreTypes:[f.yaml,f.code,f.math,f.inlineMath,f.wikiLink,f.link]})}get OptionsClass(){return Zl}apply(t,i){return zp(t)}get exampleBuilders(){return[new y({description:"Tables that start a document do not get an empty line before them.",before:p`
array:[value:withcoloninthemiddle,valuewith' a single quote present, "already escaped: value", value with " a double quote present, value with both '"adoubleandsinglequotepresentisnotescapedbutisinvalidYAML,colon:betweencharactersisfine]
nestedArray:[[value:withcoloninthemiddle,valuewith' a single quote present], ["already escaped: value", value with " a double quote present], value with both '"adoubleandsinglequotepresentisnotescapedbutisinvalidYAML,colon:betweencharactersisfine]
array:["value: with colon in the middle","value with ' a single quote present","already escaped: value",'value with " a double quote present',valuewithboth'"adoubleandsinglequotepresentisnotescapedbutisinvalidYAML,colon:betweencharactersisfine]
nestedArray:[["value: with colon in the middle","value with ' a single quote present"],["already escaped: value",'value with " a double quote present'],valuewithboth'"adoubleandsinglequotepresentisnotescapedbutisinvalidYAML,colon:betweencharactersisfine]
nestedArray2:[["value: with colon in the middle"],"value with ' a single quote present"]
`})]}get optionBuilders(){return[]}};_r=T([v.register],_r);var Rr=class{constructor(){this.defaultEscapeCharacter='"';this.forceYamlEscape=[]}};T([v.noSettingControl()],Rr.prototype,"defaultEscapeCharacter",2);var Dt=class extends v{constructor(){super({nameKey:"rules.force-yaml-escape.name",descriptionKey:"rules.force-yaml-escape.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Rr}apply(t,i){return ye(t,n=>{for(let r of i.forceYamlEscape){let a=pe(n,r);if(a!=null){if(a.includes(`
`)||a.startsWith(" [")||Tn(a))continue;a=wi(a,i.defaultEscapeCharacter,!0),n=oe(n,r," "+a)}}return n})}get exampleBuilders(){return[new y({description:"YAML without anything to escape",before:p`
`}),new y({description:"Force YAML keys to be escaped with double quotes where not already escaped with `ForceYAMLEscapeonKeys='key'\\n'title'\\n'bool'`",before:p`
---`,""));if(!r)return n;for(let a of xi)if(i.formatAliasKey&&Object.keys(r).includes(a)){n=oe(n,a,we(ot(Fe(pe(n,a))),i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let a of vi)if(i.formatTagKey&&Object.keys(r).includes(a)){n=oe(n,a,we(st(Fe(pe(n,a))),i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(i.formatArrayKeys){let a=[...xi,...vi,...i.forceMultiLineArrayStyle,...i.forceSingleLineArrayStyle];for(let s of Object.keys(r))a.includes(s)||!Array.isArray(r[s])||r[s].length!==0&&typeof r[s][0]=="object"&&r[s][0]!==null||(n=oe(n,s,we(Fe(pe(n,s)),i.defaultArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)))}for(let a of i.forceSingleLineArrayStyle)Object.keys(r).includes(a)&&(n=oe(n,a,we(Fe(pe(n,a)),"single-line",i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)));for(let a of i.forceMultiLineArrayStyle)Object.keys(r).includes(a)&&(n=oe(n,a,we(Fe(pe(n,a)),"multi-line",i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)));return n})}get exampleBuilders(){return[new y({description:"Format tags as a single-line array delimited by spaces and aliases as a multi-line array and format the key `test` to be a single-line array",before:p`
`,options:{aliasArrayStyle:"multi-line",forceSingleLineArrayStyle:["test"]}}),new y({description:"Format tags as a single string with space delimiters, ignore aliases, and format regular YAML arrays as single-line arrays",before:p`
`,options:{formatAliasKey:!1,tagArrayStyle:"single string space delimited"}}),new y({description:"Arrays with dictionaries in them are ignored",before:p`
`,options:{bottom:!1,emptyLineAfterYaml:!0}}),new y({description:"Empty line before header and after YAML is removed with `EmptyLineBetweenYAMLandHeader=false`",before:p`
`)))}return n})}get exampleBuilders(){return[new y({description:"Insert static lines into YAML frontmatter. Text to insert: `aliases:\ntags:doc\nanimal:dog`",before:p`
`})]}get optionBuilders(){return[]}};$r=T([v.register],$r);var Js=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};T([v.noSettingControl()],Js.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var Nt=class extends v{constructor(){super({nameKey:"rules.move-math-block-indicators-to-their-own-line.name",descriptionKey:"rules.move-math-block-indicators-to-their-own-line.description",type:"Spacing",ruleIgnoreTypes:[f.code,f.inlineCode],hasSpecialExecutionOrder:!0})}get OptionsClass(){return Js}apply(t,i){return sp(t,i.minimumNumberOfDollarSignsToBeAMathBlock)}get exampleBuilders(){return[new y({description:"Moving math block indicator to its own line when `NumberofDollarSignstoIndicateaMathBlock` = 2",before:p`
`}),new y({description:"Moving math block indicator to its own line when `NumberofDollarSignstoIndicateaMathBlock` = 3 and opening indicator is on the same line as the start of the content",before:p`
`}),new y({description:"Moving math block indicator to its own line when `NumberofDollarSignstoIndicateaMathBlock` = 2 and ending indicator is on the same line as the ending line of the content",before:p`
`,"").replace("---","");let a=[],s=br;for(let c of vi){let d=pe(r,c);if(d!=null){a=st(Fe(d)),s=c;break}}let o=new Set;if(typeof a=="string")o.add(a),a=[a];else if(a!=null)for(let c of a)o.add(c);else a=[];for(let c of n){let d=c.trim().substring(1);!o.has(d)&&!i.tagsToIgnore.includes(d)&&(o.add(d),a.push(d))}return`---
${oe(r,s,we(a,i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays))}---`}),t=Ee([f.yaml],t,r=>(i.howToHandleExistingTags!=="Nothing"&&(r=r.replace(hr,a=>{let s=a.indexOf("#"),o=a.substring(s+1);return i.tagsToIgnore.includes(o)?a:i.howToHandleExistingTags==="Remove hashtag"?a.substring(0,s)+o:""})),r)),t=t.replace(/(\n---)( |\t)+/,"$1")),t}get exampleBuilders(){return[new y({description:"Move tags from body to YAML with `Tagstoignore='ignored-tag'`",before:p`
`,options:{tagsToIgnore:["ignored-tag"]}}),new y({description:"Move tags from body to YAML with existing tags retains the already existing ones and only adds new ones",before:p`
`}),new y({description:"Move tags to YAML frontmatter and then remove hashtags in body content tags when `Bodytagoperation='Remove hashtag'` and `Tagstoignore='yet-another-ignored-tag'`.",before:p`
`,options:{howToHandleExistingTags:"Remove hashtag",tagsToIgnore:["yet-another-ignored-tag"]}}),new y({description:"Move tags to YAML frontmatter and then remove body content tags when `Bodytagoperation='Remove whole tag'`.",before:p`
`,options:{howToHandleExistingTags:"Remove whole tag"}})]}get optionBuilders(){return[new ie({OptionsClass:ut,nameKey:"rules.move-tags-to-yaml.how-to-handle-existing-tags.name",descriptionKey:"rules.move-tags-to-yaml.how-to-handle-existing-tags.description",optionsKey:"howToHandleExistingTags",records:[{value:"Nothing",description:"Leaves tags in the body of the file alone"},{value:"Remove hashtag",description:"Removes `#` from tags in content body after moving them to the YAML frontmatter"},{value:"Remove whole tag",description:"Removes the whole tag in content body after moving them to the YAML frontmatter. _Note that this removes the first space prior to the tag as well_"}]}),new me({OptionsClass:ut,nameKey:"rules.move-tags-to-yaml.tags-to-ignore.name",descriptionKey:"rules.move-tags-to-yaml.tags-to-ignore.description",optionsKey:"tagsToIgnore"})]}};Wr=T([v.register],Wr);var eo=class{constructor(){this.noBareURIs=!1}},Xs="'\"\u2018\u2019\u201C\u201D`[]",bv=["http","ftp","https","smtp"],Ur=class extends v{constructor(){super({nameKey:"rules.no-bare-urls.name",descriptionKey:"rules.no-bare-urls.description",type:"Content",ruleIgnoreTypes:[f.code,f.math,f.yaml,f.link,f.wikiLink,f.tag,f.image,f.inlineCode,f.anchorTag,f.html]})}get OptionsClass(){return eo}apply(t,i){let n=t.match(kn);if(n&&(t=this.handleMatches(t,n,!1)),i.noBareURIs){let r=t.match(yp);r&&(t=this.handleMatches(t,r,!0))}return t}handleMatches(t,i,n){let r=0,a=i.length;for(let s=0;s<a;s++){let o=i[s],l=t.indexOf(o,r),c=l+o.length;o.charAt(0)==="<"&&(o=o.substring(1),l++),o.charAt(o.length-1)===">"&&(o=o.substring(0,o.length-1),c--);let d=l===0?void 0:t.charAt(l-1),u=c>=t.length?void 0:t.charAt(c),g=Xi(o,"(");if(g!=0&&g!=Xi(o,")")&&u==")"?(o+=u,c++,u=c>=t.length?void 0:t.charAt(c)):g==0&&o.endsWith(")")&&(u=")",c--,o=o.substring(0,o.length-1)),this.skipMatch(d,u,o,n)){r=l+o.length;continue}if(d!=null&&d==="<"&&u!=null&&u===">"){let m=l-1;for(;m>0&&t.charAt(m-1)==="<";)m--;let h=c;for(;h<t.length-1&&t.charAt(h+1)===">";)h++;t=de(t,m,h+1,"<"+o+">"),r=l+o.length;continue}t=de(t,l,l+o.length,"<"+o+">"),r=l+o.length+2}return t}skipMatch(t,i,n,r){let a=t!=null&&Xs.includes(t)||Xs.includes(n.charAt(0)),s=i!=null&&Xs.includes(i)||Xs.includes(n.charAt(n.length-1));return a&&s?!0:r?bv.includes(n.substring(0,n.indexOf(":"))):!1}get exampleBuilders(){return[new y({description:"Makesurethatlinksareinsideofanglebracketswhennotinsinglequotes('),doublequotes(\"), or backticks(`)",before:p`
`,options:{noBareURIs:!0}})]}get optionBuilders(){return[new W({OptionsClass:eo,nameKey:"rules.no-bare-urls.no-bare-uris.name",descriptionKey:"rules.no-bare-urls.no-bare-uris.description",optionsKey:"noBareURIs"})]}};Ur=T([v.register],Ur);var Gr=class{constructor(){this.numberStyle="ascending";this.listEndStyle="."}},Vr=class extends v{constructor(){super({nameKey:"rules.ordered-list-style.name",descriptionKey:"rules.ordered-list-style.description",type:"Content",ruleIgnoreTypes:[f.code,f.math,f.yaml,f.tag]})}get OptionsClass(){return Gr}apply(t,i){return rp(t,i.numberStyle,i.listEndStyle)}get exampleBuilders(){return[new y({description:"Ordered lists have list items set to ascending numerical order when Number Style is `ascending`.",before:p`
`,options:{numberStyle:"lazy"}}),new y({description:"Ordered list in blockquote has list items set to ascending numerical order when Number Style is `ascending`.",before:p`
`}),new y({description:"Nested ordered list has list items set to '1)' when Number Style is `lazy` and Ordered List Indicator End Style is `)`.",before:p`
`,options:{listEndStyle:")",numberStyle:"lazy"}})]}get optionBuilders(){return[new ie({OptionsClass:Gr,nameKey:"rules.ordered-list-style.number-style.name",descriptionKey:"rules.ordered-list-style.number-style.description",optionsKey:"numberStyle",records:[{value:"ascending",description:"Makes sure ordered list items are ascending (i.e. 1, 2, 3, etc.)"},{value:"lazy",description:"Makes sure ordered list item indicators all are the number 1"}]}),new ie({OptionsClass:Gr,nameKey:"rules.ordered-list-style.list-end-style.name",descriptionKey:"rules.ordered-list-style.list-end-style.description",optionsKey:"listEndStyle",records:[{value:".",description:"Makes sure ordered list items indicators end in '.' (i.e `1.`)"},{value:")",description:"Makes sure ordered list item indicators end in ')' (i.e. `1)`)"}]})]}};Vr=T([v.register],Vr);var nc=class{},Qr=class extends v{constructor(){super({nameKey:"rules.paragraph-blank-lines.name",descriptionKey:"rules.paragraph-blank-lines.description",type:"Spacing",ruleIgnoreTypes:[f.obsidianMultiLineComments,f.yaml,f.table]})}get OptionsClass(){return nc}apply(t,i){return Zu(t)}get exampleBuilders(){return[new y({description:"Paragraphs should be surrounded by blank lines",before:p`
`}),new y({description:"Paragraphs can be extended via the use of 2 or more spaces at the end of a line, a line break html or xml, or a backslash (\\)",before:p`
`})]}get optionBuilders(){return[]}};Qr=T([v.register],Qr);var Zr=class{};T([v.noSettingControl()],Zr.prototype,"lineContent",2),T([v.noSettingControl()],Zr.prototype,"selectedText",2);var Yt=class extends v{constructor(){super({nameKey:"rules.prevent-double-checklist-indicator-on-paste.name",descriptionKey:"rules.prevent-double-checklist-indicator-on-paste.description",type:"Paste"})}get OptionsClass(){return Zr}apply(t,i){let n=Ap.test(i.lineContent),r=Es.test(t),a=Es.test(i.selectedText);return!n||!r||a?t:t.replace(Es,"")}get exampleBuilders(){return[new y({description:"Line being pasted is left alone when current line has no checklist indicator in it: `Regulartexthere`",before:p`
`,options:{lineContent:"Regular text here",selectedText:""}}),new y({description:"Line being pasted into a blockquote without a checklist indicator is left alone when it lacks a checklist indicator: `>>`",before:p`
`,options:{lineContent:"> > ",selectedText:""}}),new y({description:"Line being pasted into a blockquote with a checklist indicator has its checklist indicator removed when current line is: `>-[x]`",before:p`
`,options:{lineContent:"> - [x] ",selectedText:""}}),new y({description:"Line being pasted with a checklist indicator has its checklist indicator removed when current line is: `-[]`",before:p`
`,options:{lineContent:"- [ ] ",selectedText:""}}),new y({description:"Line being pasted as a checklist indicator has its checklist indicator removed when current line is: `-[!]`",before:p`
`,options:{lineContent:"- [!] ",selectedText:""}}),new y({description:"When pasting a checklist and the selected text starts with a checklist, the text to paste should still start with a checklist",before:p`
`,options:{lineContent:"- [!] Some text here",selectedText:"- [!] Some text here"}})]}get optionBuilders(){return[]}};Yt=T([v.register],Yt);var Jr=class{};T([v.noSettingControl()],Jr.prototype,"lineContent",2),T([v.noSettingControl()],Jr.prototype,"selectedText",2);var jt=class extends v{constructor(){super({nameKey:"rules.prevent-double-list-item-indicator-on-paste.name",descriptionKey:"rules.prevent-double-list-item-indicator-on-paste.description",type:"Paste"})}get OptionsClass(){return Jr}apply(t,i){let n=new RegExp(`^${yr}[*+-]`),r=/^\s*[*+-] /,a=n.test(i.lineContent),s=n.test(i.selectedText),o=r.test(t);return s||!a||!o?t:t.replace(r,"")}get exampleBuilders(){return[new y({description:"Line being pasted is left alone when current line has no list indicator in it: `Regulartexthere`",before:p`
`,options:{lineContent:"Regular text here",selectedText:""}}),new y({description:"Line being pasted into a blockquote without a list indicator is left alone when it lacks a list indicator: `>>`",before:p`
`,options:{lineContent:"> > ",selectedText:""}}),new y({description:"Line being pasted into a blockquote with a list indicator is has its list indicator removed when current line is: `>*`",before:p`
`,options:{lineContent:"> * ",selectedText:""}}),new y({description:"Line being pasted with a list indicator is has its list indicator removed when current line is: `+`",before:p`
`,options:{lineContent:"+ ",selectedText:""}}),new y({description:"When pasting a list item and the selected text starts with a list item indicator, the text to paste should still start with a list item indicator",before:p`
`,options:{lineContent:"+ ",selectedText:"+ "}})]}get optionBuilders(){return[]}};jt=T([v.register],jt);var rc=class{},Pt=class extends v{constructor(){super({nameKey:"rules.proper-ellipsis-on-paste.name",descriptionKey:"rules.proper-ellipsis-on-paste.description",type:"Paste"})}get OptionsClass(){return rc}apply(t,i){return t.replaceAll(Ls,"\u2026")}get exampleBuilders(){return[new y({description:"Replacing three consecutive dots with an ellipsis even if spaces are present",before:p`
`})]}get optionBuilders(){return[]}};Xr=T([v.register],Xr);var Ht=class{constructor(){this.singleQuoteStyleEnabled=!0;this.singleQuoteStyle="''";this.doubleQuoteStyleEnabled=!0;this.doubleQuoteStyle='""'}},ea=class extends v{constructor(){super({nameKey:"rules.quote-style.name",descriptionKey:"rules.quote-style.description",type:"Content",ruleIgnoreTypes:[f.code,f.inlineCode,f.math,f.yaml,f.math,f.inlineMath,f.html,f.link,f.wikiLink,f.templaterCommand,f.image]})}get OptionsClass(){return Ht}apply(t,i){let n=t;return i.doubleQuoteStyleEnabled&&(i.doubleQuoteStyle==='""'?n=this.convertSmartDoubleQuotesToStraightQuotes(n):n=this.convertStraightQuoteToSmartQuote(n,'"',"\u201C\u201D"[0],"\u201C\u201D"[1],!1)),i.singleQuoteStyleEnabled&&(i.singleQuoteStyle==="''"?n=this.convertSmartSingleQuotesToStraightQuotes(n):n=this.convertStraightQuoteToSmartQuote(n,"'","\u2018\u2019"[0],"\u2018\u2019"[1],!0)),n}convertSmartSingleQuotesToStraightQuotes(t){return t.replace(kp,"'")}convertSmartDoubleQuotesToStraightQuotes(t){return t.replace(wp,'"')}convertStraightQuoteToSmartQuote(t,i,n,r,a){let s=du(i,t);if(s.length===0)return t;let o=t.length-1,l,c="",d="",u=!1,g=!1,m=!1,h=!1,x=!1,b="";for(let k of s)c=k==0?"":t.charAt(k-1),d=k===o?"":t.charAt(k+1),u=Kl.test(c),g=Kl.test(d),x=u&&g,m=c!=""&&c.trim()==="",h=d!=""&&d.trim()==="",x&&a?l=r:h&&!m?(l=r,b=l):m&&!h?(l=n,b=l):(b===""||b===r?l=n:l=r,b=l),t=de(t,k,k+1,l);return t}get exampleBuilders(){return[new y({description:"Smart quotes used in file are converted to straight quotes when styles are set to `Straight`",before:p`
`}),new y({description:"Blanks lines are removed between like list types (ordered, specific list item indicators, and checklists) while blanks are left between different kinds of list item indicators",before:p`
`})]}get optionBuilders(){return[new ke({nameKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-before.name",descriptionKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-before.description",OptionsClass:da,optionsKey:"charactersToRemoveSpacesBefore"}),new ke({nameKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-after.name",descriptionKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-after.description",OptionsClass:da,optionsKey:"charactersToRemoveSpacesAfter"})]}};ca=T([v.register],ca);var io=class{constructor(){this.punctuationToRemove=".,;:!\u3002\uFF0C\uFF1B\uFF1A\uFF01"}},ua=class extends v{constructor(){super({nameKey:"rules.remove-trailing-punctuation-in-heading.name",descriptionKey:"rules.remove-trailing-punctuation-in-heading.description",type:"Heading",ruleIgnoreTypes:[f.code,f.math,f.yaml]})}get OptionsClass(){return io}apply(t,i){return t.replaceAll(rt,(n,r="",a="",s="",o="",l="")=>{if(o==""||o.match(xp))return n;let c=o.trimEnd(),d=c.charAt(c.length-1);return i.punctuationToRemove.includes(d)?r+a+s+o.substring(0,c.length-1)+o.substring(c.length)+l:n})}get exampleBuilders(){return[new y({description:"Removes punctuation from the end of a heading",before:p`
---`,""));if(!r)return n;for(let a of xi)if(i.sortAliasKey&&Object.keys(r).includes(a)){n=oe(n,a,we(ot(this.sortArray(Fe(pe(n,a)),i.sortOrder)),i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let a of vi)if(i.sortTagKey&&Object.keys(r).includes(a)){n=oe(n,a,we(st(this.sortArray(Fe(pe(n,a)),i.sortOrder)),i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(i.sortArrayKeys){let a=[...xi,...vi,...i.ignoreSortArrayKeys];for(let s of Object.keys(r)){if(a.includes(s)||!Array.isArray(r[s])||r[s].length!==0&&typeof r[s][0]=="object"&&r[s][0]!==null)continue;let o=pe(n,s),l="single-line";o.includes(`
`,options:{aliasArrayStyle:"multi-line"}}),new y({description:"Sort YAML Arrays respects list of keys to not sort values of for normal arrays (keys to ignore is just `arr2` for this example)",before:p`
`,options:{aliasArrayStyle:"multi-line",ignoreSortArrayKeys:["arr2"]}})]}get optionBuilders(){return[new W({OptionsClass:mi,nameKey:"rules.sort-yaml-array-values.sort-alias-key.name",descriptionKey:"rules.sort-yaml-array-values.sort-alias-key.description",optionsKey:"sortAliasKey"}),new W({OptionsClass:mi,nameKey:"rules.sort-yaml-array-values.sort-tag-key.name",descriptionKey:"rules.sort-yaml-array-values.sort-tag-key.description",optionsKey:"sortTagKey"}),new W({OptionsClass:mi,nameKey:"rules.sort-yaml-array-values.sort-array-keys.name",descriptionKey:"rules.sort-yaml-array-values.sort-array-keys.description",optionsKey:"sortArrayKeys"}),new me({OptionsClass:mi,nameKey:"rules.sort-yaml-array-values.ignore-keys.name",descriptionKey:"rules.sort-yaml-array-values.ignore-keys.description",optionsKey:"ignoreSortArrayKeys"}),new ie({OptionsClass:mi,nameKey:"rules.sort-yaml-array-values.sort-order.name",descriptionKey:"rules.sort-yaml-array-values.sort-order.description",optionsKey:"sortOrder",records:[{value:"Ascending Alphabetical",description:"Sorts the array values from a to z"},{value:"Descending Alphabetical",description:"Sorts the array values from z to a"}]})]}};ma=T([v.register],ma);var yc=class{},ga=class extends v{constructor(){super({nameKey:"rules.space-after-list-markers.name",descriptionKey:"rules.space-after-list-markers.description",type:"Spacing",ruleIgnoreTypes:[f.code,f.math,f.yaml,f.link,f.wikiLink,f.tag]})}get OptionsClass(){return yc}apply(t,i){return t=t.replace(/^(\s*\d+\.|\s*[-+*])[^\S\r\n]+/gm,"$1 "),t.replace(/^(\s*\d+\.|\s*[-+*]\s+\[[ xX]\])[^\S\r\n]+/gm,"$1 ")}get exampleBuilders(){return[new y({description:"A single space is left between the list marker and the text of the list item",before:p`
`})]}get optionBuilders(){return[new ke({OptionsClass:fa,nameKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.english-symbols-punctuation-before.name",descriptionKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.english-symbols-punctuation-before.description",optionsKey:"englishNonLetterCharactersBeforeCJKCharacters"}),new ke({OptionsClass:fa,nameKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.english-symbols-punctuation-after.name",descriptionKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.english-symbols-punctuation-after.description",optionsKey:"englishNonLetterCharactersAfterCJKCharacters"})]}};ha=T([v.register],ha);var no=class{constructor(){this.style="consistent"}},ya=class extends v{constructor(){super({nameKey:"rules.strong-style.name",descriptionKey:"rules.strong-style.description",type:"Content",ruleIgnoreTypes:[f.code,f.yaml,f.link,f.wikiLink,f.tag,f.math,f.inlineMath]})}get OptionsClass(){return no}apply(t,i){return ws(t,i.style,"strong")}get exampleBuilders(){return[new y({description:"Strong indicators should use underscores when style is set to 'underscore'",before:p`
`,options:{style:"asterisk"}}),new y({description:"Strong indicators should use consistent style based on first strong indicator in a file when style is set to 'consistent'",before:p`
`,options:{style:"consistent"}}),new y({description:"Strong indicators should use consistent style based on first strong indicator in a file when style is set to 'consistent'",before:p`
`,options:{style:"consistent"}})]}get optionBuilders(){return[new ie({OptionsClass:no,nameKey:"rules.strong-style.style.name",descriptionKey:"rules.strong-style.style.description",optionsKey:"style",records:[{value:"consistent",description:"Makes sure the first instance of strong is the style that will be used throughout the document"},{value:"asterisk",description:"Makes sure ** is the strong indicator"},{value:"underscore",description:"Makes sure __ is the strong indicator"}]})]}};ya=T([v.register],ya);var ro=class{constructor(){this.twoSpaceLineBreak=!1}},Qt=class extends v{constructor(){super({nameKey:"rules.trailing-spaces.name",descriptionKey:"rules.trailing-spaces.description",type:"Spacing",hasSpecialExecutionOrder:!0,ruleIgnoreTypes:[f.code,f.math,f.yaml,f.link,f.wikiLink,f.tag]})}get OptionsClass(){return ro}apply(t,i){return i.twoSpaceLineBreak?(t=t.replace(/(\S)[ \t]$/gm,"$1"),t=t.replace(/(\S)[ \t]{3,}$/gm,"$1"),t=t.replace(/(\S)( ?\t\t? ?)$/gm,"$1"),t):t.replace(/[ \t]+$/gm,"")}get exampleBuilders(){return[new y({description:"Removes trailing spaces and tabs.",before:p`
`,options:{twoSpaceLineBreak:!0}})]}get optionBuilders(){return[new W({OptionsClass:ro,nameKey:"rules.trailing-spaces.twp-space-line-break.name",descriptionKey:"rules.trailing-spaces.twp-space-line-break.description",optionsKey:"twoSpaceLineBreak"})]}};Qt=T([v.register],Qt);var ao=class{constructor(){this.lineBreakIndicator=" "}},ba=class extends v{constructor(){super({nameKey:"rules.two-spaces-between-lines-with-content.name",descriptionKey:"rules.two-spaces-between-lines-with-content.description",type:"Content",ruleIgnoreTypes:[f.obsidianMultiLineComments,f.yaml,f.table]})}get OptionsClass(){return ao}apply(t,i){return Qu(t,i.lineBreakIndicator)}get exampleBuilders(){return[new y({description:"Make sure two spaces are added to the ends of lines that have content on it and the next line for lists, blockquotes, and paragraphs when the line break indicator is ``",before:p`
`,options:{lineBreakIndicator:" "}})]}get optionBuilders(){return[new ie({OptionsClass:ao,nameKey:"rules.two-spaces-between-lines-with-content.line-break-indicator.name",descriptionKey:"rules.two-spaces-between-lines-with-content.line-break-indicator.description",optionsKey:"lineBreakIndicator",records:[{value:" ",description:" "},{value:"<br/>",description:"<br/>"},{value:"<br>",description:"<br>"},{value:"\\",description:"\\"}]})]}};ba=T([v.register],ba);var so=class{constructor(){this.listStyle="consistent"}},va=class extends v{constructor(){super({nameKey:"rules.unordered-list-style.name",descriptionKey:"rules.unordered-list-style.description",type:"Content",ruleIgnoreTypes:[f.code,f.math,f.yaml,f.tag]})}get OptionsClass(){return so}apply(t,i){return ap(t,i.listStyle)}get exampleBuilders(){return[new y({description:"Unordered lists have their indicator updated to `*` when `Listitemstyle='consistent'` and `*` is the first unordered list indicator",before:p`
`,options:{listStyle:"+"}})]}get optionBuilders(){return[new ie({OptionsClass:so,nameKey:"rules.unordered-list-style.list-style.name",descriptionKey:"rules.unordered-list-style.list-style.description",optionsKey:"listStyle",records:[{value:"consistent",description:"Makes sure unordered list items use a consistent list item indicator in the file which will be based on the first list item found"},{value:"-",description:"Makes sure unordered list items use `-` as their indicator"},{value:"*",description:"Makes sure unordered list items use `*` as their indicator"},{value:"+",description:"Makes sure unordered list items use `+` as their indicator"}]})]}};va=T([v.register],va);var Hi=class{constructor(){this.priorityKeysAtStartOfYaml=!0;this.yamlKeyPrioritySortOrder=[];this.yamlSortOrderForOtherKeys="None"}};T([v.noSettingControl()],Hi.prototype,"dateModifiedKey",2),T([v.noSettingControl()],Hi.prototype,"currentTimeFormatted",2),T([v.noSettingControl()],Hi.prototype,"yamlTimestampDateModifiedEnabled",2);var Zt=class extends v{constructor(){super({nameKey:"rules.yaml-key-sort.name",descriptionKey:"rules.yaml-key-sort.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Hi}apply(t,i){let n=An(t);if(n===null)return t;let r=n,a=i.priorityKeysAtStartOfYaml,s=i.yamlKeyPrioritySortOrder,o=0;for(let x of s)x.endsWith(":")&&(s[o]=x.substring(0,x.length-1)),o++;let l=oi(r),c=this.getYAMLKeysSorted(r,s,l),d=c.sortedYamlKeyValues;r=c.remainingYaml;let u=i.yamlSortOrderForOtherKeys;if(l==null)return this.getTextWithNewYamlFrontmatter(t,n,d,r,a,i.dateModifiedKey,i.currentTimeFormatted,i.yamlTimestampDateModifiedEnabled);let g=Object.keys(l),m;if(u==="Ascending Alphabetical")m=this.sortAlphabeticallyAsc;else if(u==="Descending Alphabetical")m=this.sortAlphabeticallyDesc;else return this.getTextWithNewYamlFrontmatter(t,n,d,r,a,i.dateModifiedKey,i.currentTimeFormatted,i.yamlTimestampDateModifiedEnabled);g=g.sort(m);let h=this.getYAMLKeysSorted(r,g,l);return this.getTextWithNewYamlFrontmatter(t,n,d,h.sortedYamlKeyValues,a,i.dateModifiedKey,i.currentTimeFormatted,i.yamlTimestampDateModifiedEnabled)}getYAMLKeysSorted(t,i,n){let r="";for(let a of i){if(!(a in n))continue;let s=pe(t,a,!1);s!==null&&(s.includes(`
`,t=Ct(t,a,!1))}return{remainingYaml:t,sortedYamlKeyValues:r}}updateDateModifiedIfYamlChanged(t,i,n,r){return t==i?i:oe(i,n," "+r)}getTextWithNewYamlFrontmatter(t,i,n,r,a,s,o,l){let c=`${r}${n}`;return a&&(c=`${n}${r}`),l&&(c=this.updateDateModifiedIfYamlChanged(i,c,s,o)),t.replace(i,c)}sortAlphabeticallyAsc(t,i){return t=t.toLowerCase(),i=i.toLowerCase(),t<i?-1:i<t?1:0}sortAlphabeticallyDesc(t,i){return t=t.toLowerCase(),i=i.toLowerCase(),t>i?-1:i>t?1:0}get exampleBuilders(){return[new y({description:"Sorts YAML keys in order specified by `YAMLKeyPrioritySortOrder` has a sort order of `datetypelanguage`",before:p`
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"None",priorityKeysAtStartOfYaml:!0}}),new y({description:"Sorts YAML keys in order specified by `YAMLKeyPrioritySortOrder` has a sort order of `datetypelanguage` with `'YAML Sort Order for Other Keys'=AscendingAlphabetical`",before:p`
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Ascending Alphabetical"}}),new y({description:"Sorts YAML keys in order specified by `YAMLKeyPrioritySortOrder` has a sort order of `datetypelanguage` with `'YAML Sort Order for Other Keys'=DescendingAlphabetical`",before:p`
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Descending Alphabetical",priorityKeysAtStartOfYaml:!0}}),new y({description:"Sorts YAML keys in order specified by `YAMLKeyPrioritySortOrder` has a sort order of `datetypelanguage` with `'YAML Sort Order for Other Keys'=DescendingAlphabetical` and `'Priority Keys at Start of YAML'=false`",before:p`
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Descending Alphabetical",priorityKeysAtStartOfYaml:!1}})]}get optionBuilders(){return[new me({OptionsClass:Hi,nameKey:"rules.yaml-key-sort.yaml-key-priority-sort-order.name",descriptionKey:"rules.yaml-key-sort.yaml-key-priority-sort-order.description",optionsKey:"yamlKeyPrioritySortOrder"}),new W({OptionsClass:Hi,nameKey:"rules.yaml-key-sort.priority-keys-at-start-of-yaml.name",descriptionKey:"rules.yaml-key-sort.priority-keys-at-start-of-yaml.description",optionsKey:"priorityKeysAtStartOfYaml"}),new ie({OptionsClass:Hi,nameKey:"rules.yaml-key-sort.yaml-sort-order-for-other-keys.name",descriptionKey:"rules.yaml-key-sort.yaml-sort-order-for-other-keys.description",optionsKey:"yamlSortOrderForOtherKeys",records:[{value:"None",description:"No sorting other than what is in the YAML Key Priority Sort Order text area"},{value:"Ascending Alphabetical",description:"Sorts the keys based on key value from a to z"},{value:"Descending Alphabetical",description:"Sorts the keys based on key value from z to a"}]})]}};Zt=T([v.register],Zt);var Oe=require("obsidian");var wc=pn($p());var Ue=class{constructor(){this.dateCreatedKey="date created";this.dateCreated=!0;this.forceRetentionOfCreatedValue=!1;this.format="dddd, MMMM Do YYYY, h:mm:ss a";this.dateModified=!0;this.dateModifiedKey="date modified";this.convertToUTC=!1;this.locale="en"}};T([v.noSettingControl()],Ue.prototype,"alreadyModified",2),T([v.noSettingControl()],Ue.prototype,"fileCreatedTime",2),T([v.noSettingControl()],Ue.prototype,"fileModifiedTime",2),T([v.noSettingControl()],Ue.prototype,"locale",2),T([v.noSettingControl()],Ue.prototype,"currentTime",2),T([v.noSettingControl()],Ue.prototype,"fileName",2);var pt=class extends v{constructor(){super({nameKey:"rules.yaml-timestamp.name",descriptionKey:"rules.yaml-timestamp.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Ue}apply(t,i){let n=i.alreadyModified,r=Ci(t);return n=n||r!==t,i.format=i.format.trimEnd(),ye(r,a=>{if(i.dateCreated){let s=!1;[a,s]=this.handleDateCreatedValue(a,i),n=n||s}return i.dateModified&&(a=this.handleDateModifiedValue(a,n,i)),a})}handleDateCreatedValue(t,i){let n=!1,r=`
`,options:{fileCreatedTime:"2020-01-01T00:00:00-00:00",fileModifiedTime:"2020-01-02T00:00:00-00:00",currentTime:(0,Oe.moment)("Thursday, January 2nd 2020, 12:00:05 am","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}}),new y({description:"dateCreated option is false",before:p`
`,options:{dateCreated:!1,fileCreatedTime:"2020-01-01T00:00:00-00:00",fileModifiedTime:"2020-01-01T00:00:00-00:00",currentTime:(0,Oe.moment)("Thursday, January 2nd 2020, 12:00:05 am","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}}),new y({description:"Date Created Key is set",before:p`
`,options:{dateCreated:!1,dateModified:!0,dateModifiedKey:"modified",fileModifiedTime:"2020-01-01T00:00:00-00:00",currentTime:(0,Oe.moment)("Wednesday, January 1st 2020, 4:00:00 pm","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}}),new y({description:"Header is set with convert to UTC option true",before:p`
#H1
`,after:p`
---
datecreated:2020-01-01T14:00:00+00:00
datemodified:2020-01-02T02:00:05+00:00
---
#H1
`,options:{format:"YYYY-MM-DDTHH:mm:ssZ",fileCreatedTime:"2020-01-01T09:00:00-05:00",fileModifiedTime:"2020-01-01T21:00:00-05:00",currentTime:(0,Oe.moment)("2020-01-01T21:00:05-05:00","YYYY-MM-DDTHH:mm:ssZ"),alreadyModified:!1,convertToUTC:!0}}),new y({description:"dateCreated option is false with convert to UTC option true",before:p`
#H1
`,after:p`
---
datemodified:2020-01-02T02:00:05+00:00
---
#H1
`,options:{format:"YYYY-MM-DDTHH:mm:ssZ",dateCreated:!1,fileCreatedTime:"2020-01-01T09:00:00-05:00",fileModifiedTime:"2020-01-01T21:00:00-05:00",currentTime:(0,Oe.moment)("2020-01-01T21:00:05-05:00","YYYY-MM-DDTHH:mm:ssZ"),alreadyModified:!1,convertToUTC:!0}}),new y({description:"Date Created Key is set with convert to UTC option true",before:p`
#H1
`,after:p`
---
created:2020-01-01T14:00:00+00:00
---
#H1
`,options:{format:"YYYY-MM-DDTHH:mm:ssZ",dateCreated:!0,dateModified:!1,dateCreatedKey:"created",fileCreatedTime:"2020-01-01T09:00:00-05:00",currentTime:(0,Oe.moment)("2020-01-01T21:00:05-05:00","YYYY-MM-DDTHH:mm:ssZ"),alreadyModified:!1,convertToUTC:!0}}),new y({description:"Date Modified Key is set with convert to UTC option true",before:p`
---`,""),c=oi(s),d=i.aliasHelperKey??jl;d.endsWith(":")&&(d=d.substring(0,d.length-1)),a=c[d]??null,a!=null&&(a=a+"",a=wi(a,i.defaultEscapeCharacter,this.forceEscape(a,i.aliasArrayStyle)));let u=null,g=Object.keys(c);for(let m of xi)if(g.includes(m)){u=m;break}if(u!=null){let m=pe(l,u),h="multi-line",x=m==="",b=!1;!m.includes(`
`)&&!(m==="[]"&&i.aliasArrayStyle==="multi-line")&&(m.match(/^\[.*\]/)===null?(h="single string to single-line",b=!0):h="single-line");let k=ot(Fe(m)),A=this.getNewAliasValue(k,o,r,a);A===""?l=Ct(l,u):i.preserveExistingAliasesSectionStyle?!x&&(b&&r==A||!b||k==A)?l=oe(l,u,we(A,h,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=oe(l,u,we(A,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=oe(l,u,we(A,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0))}else o||(l=oe(l,Yl,we(r,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)));return!i.useYamlKeyToKeepTrackOfOldFilenameOrHeading||o?l=Ct(l,d):l=oe(l,d,`${r}`),t=t.replace(`---
${l}---`),t}getTitleInfo(t,i,n,r){let a=Ee([f.code,f.math,f.yaml,f.tag],t,Os);a=a||i;let s=wi(a,r,this.forceEscape(a,n));return[a,s]}forceEscape(t,i){return ss(t)||t.includes(",")&&(i==="single-line"||i==="single string to single-line"||i==="single string comma delimited")}getNewAliasValue(t,i,n,r){if(t==null)return i?"":n;if(typeof t=="string")i?t===n&&(t=""):r===t?t=n:t=[n,t];else if(r!==null){let a=t.indexOf(r);a===-1&&Tn(r)&&(a=t.indexOf(r.substring(1,r.length-1))),a!==-1?i?t.splice(a,1):t[a]=n:t=[n,...t]}else{let a=t.indexOf(n);a!==-1?i&&t.splice(a,1):i||(t=[n,...t])}return t===""||t.length===0?"":t}get exampleBuilders(){return[new y({description:"Adds a header with the title from heading.",before:p`
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0}}),new y({description:"Adds a header with the title without YAML key when the use of the YAML key is set to false.",before:p`
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0,useYamlKeyToKeepTrackOfOldFilenameOrHeading:!1}}),new y({description:"Replaces old filename with new filename when no header is present and filename is different than the old one listed in `linter-yaml-title-alias`.",before:p`
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0}}),new y({description:"Make sure that markdown and wiki links in first H1 get their values converted to text",before:p`
${i.titleKey}:${n}`)}return r})}getFirstH1Header(t){return Ee([f.code,f.math,f.yaml,f.tag],t,Os)}get exampleBuilders(){return[new y({description:"Adds a header with the title from heading when `mode='First H1 or Filename if H1 Missing'`.",before:p`
`,options:{fileName:"Filename"}}),new y({description:"Make sure that markdown links in headings are properly copied to the YAML as just the text when `mode='First H1 or Filename if H1 Missing'`",before:p`
`,options:{mode:"first-h1",fileName:"Filename"}}),new y({description:"When `mode='Filename'`, title uses the filename ignoring all H1s. Note: the filename is \"Filename\" in this example.",before:p`
`,options:{mode:"filename",fileName:"Filename"}})]}get optionBuilders(){return[new ke({OptionsClass:Jt,nameKey:"rules.yaml-title.title-key.name",descriptionKey:"rules.yaml-title.title-key.description",optionsKey:"titleKey"}),new ie({OptionsClass:Jt,nameKey:"rules.yaml-title.mode.name",descriptionKey:"rules.yaml-title.mode.description",optionsKey:"mode",records:[{value:"first-h1-or-filename-if-h1-missing",description:"Uses the first H1 in the file or the filename of the file if there is not H1"},{value:"filename",description:"Uses the filename as the title"},{value:"first-h1",description:"Uses the first H1 in the file as the title"}]})]}};wa=T([v.register],wa);var sw=`<svgxmlns="http://www.w3.org/2000/svg"width="100"height="100"viewBox="0 0 24 24"fill="none"stroke="currentColor"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"class="lucide lucide-file-cog">
`),c+=`/${s.find}/${s.flags}/${s.replace}/`,ri(c);let d=new RegExp(`${s.find}`,s.flags);r=r.replace(d,lu(s.replace)),a!=r&&ri(r),a=r}return r})}runPasteLint(t,i,n){let r=n.oldText;return[r]=$t.applyIfEnabled(r,n.settings,[]),[r]=Vt.applyIfEnabled(r,n.settings,[]),[r]=Ut.applyIfEnabled(r,n.settings,[]),[r]=Pt.applyIfEnabled(r,n.settings,[]),[r]=Wt.applyIfEnabled(r,n.settings,[]),[r]=Yt.applyIfEnabled(r,n.settings,[],{lineContent:t,selectedText:i}),[r]=jt.applyIfEnabled(r,n.settings,[],{lineContent:t,selectedText:i}),[r]=Bt.applyIfEnabled(r,n.settings,[],{lineContent:t}),r}};function ka(e,t=null,i,n){let r=t?(0,Bn.moment)(t.stat.ctime):(0,Bn.moment)();r.locale(i);let a=t?(0,Bn.moment)(t.stat.mtime):(0,Bn.moment)();a.locale(i);let s=a.format(),o=r.format();return{oldText:e,fileInfo:{name:t?t.basename:"",createdAtFormatted:o,modifiedAtFormatted:s},settings:n,momentLocale:i,getCurrentTime:()=>{let l=(0,Bn.moment)();return l.locale(i),l}}}var po=require("obsidian");var Sa=class extends po.Modal{constructor(t,i,n,r,a,s=!1){super(t),this.modalEl.addClass("confirm-modal"),this.contentEl.createEl("h3",{text:E("warning-text")}).style.textAlign="center",s&&(this.contentEl.createEl("p",{text:E("custom-command-warning")}).style.fontWeight="bold"),this.contentEl.createEl("p",{text:i+" "+E("file-backup-text")}).id="confirm-dialog",this.contentEl.createDiv("modal-button-container",o=>{o.createEl("button",{text:"Cancel"}).addEventListener("click",()=>this.close());let l=o.createEl("button",{attr:{type:"submit"},cls:"mod-cta",text:n});l.addEventListener("click",async c=>{new po.Notice(r),this.close(),await a()}),setTimeout(()=>{l.focus()},50)})}};var ft=require("obsidian");var Wp=require("obsidian");var ww={General:Ce.general.id,Custom:Ce.custom.id,YAML:Ce.yaml.id,Heading:Ce.heading.id,Footnote:Ce.footer.id,Content:Ce.content.id,Spacing:Ce.whitespace.id,Paste:Ce.paste.id,Debug:Ce.debug.id},kw={General:"tabs.names.general",Custom:"tabs.names.custom",YAML:"tabs.names.yaml",Heading:"tabs.names.heading",Footnote:"tabs.names.footnote",Content:"tabs.names.content",Spacing:"tabs.names.spacing",Paste:"tabs.names.paste",Debug:"tabs.names.debug"},Bi=class{constructor(t,i,n,r,a){this.name=n;this.isMobile=r;this.plugin=a;this.searchSettingInfo=[];this.navButton=t.createDiv("linter-navigation-item");let s="linter-desktop";r&&(s="linter-mobile"),this.navButton.addClass(s),(0,Wp.setIcon)(this.navButton.createSpan({cls:"linter-navigation-item-icon"}),ww[n]);let o=E(kw[n]);this.navButton.createSpan().setText(o),this.contentEl=i.createDiv("linter-tab-settings"),this.contentEl.id=n.toLowerCase().replace(" ","-"),this.headingEl=this.contentEl.createEl("h2",{text:o}),pi(this.headingEl)}addSettingSearchInfo(t,i="",n="",r=null,a=null){this.searchSettingInfo.push({containerEl:t,name:i.toLowerCase(),description:n.toLowerCase(),options:r,alias:a})}addSettingSearchInfoForGeneralSettings(t){this.searchSettingInfo.push({containerEl:t.containerEl,name:t.name.toLowerCase(),description:t.description.toLowerCase(),options:null,alias:null})}updateTabDisplayMode(t,i="the status is still the same"){switch(t?(this.navButton.addClass("linter-navigation-item-selected"),qi(this.contentEl)):(this.navButton.removeClass("linter-navigation-item-selected"),pi(this.contentEl)),i){case"entering search mode by focusing on the search input box":qi(this.contentEl),qi(this.headingEl);for(let n of this.searchSettingInfo)qi(n.containerEl);break;case"leaving search mode by selecting a tab":pi(this.headingEl);for(let n of this.searchSettingInfo)qi(n.containerEl);break}}};var km=require("obsidian");var Up=require("obsidian");var Aa={ruleConfigs:{},lintOnSave:!1,recordLintOnSaveLogs:!1,displayChanged:!0,lintOnFileChange:!1,displayLintOnFileChangeNotice:!1,settingsConvertedToConfigKeyValues:!1,foldersToIgnore:[],filesToIgnore:[],linterLocale:"system-default",logLevel:"ERROR",lintCommands:[],customRegexes:[],commonStyles:{aliasArrayStyle:"single-line",tagArrayStyle:"single-line",minimumNumberOfDollarSignsToBeAMathBlock:2,escapeCharacter:'"',removeUnnecessaryEscapeCharsForMultiLineArrays:!1}};var
`," "))}};var So=class extends Bi{constructor(i,n,r,a,s,o){super(i,n,r,s,o);this.rules=a;this.display()}display(){for(let i of this.rules){let n=this.contentEl.createDiv();n.id=i.alias,n.createEl(this.isMobile?"h4":"h3",{},a=>{a.innerHTML=`<ahref="${i.getURL()}">${i.getName()}</a>`});letr=[];for(letaofi.options)a.display(n,this.plugin.settings,this.plugin),r.push(a.getSearchInfo());this.addSettingSearchInfo(n,i.getName().toLowerCase(),i.getDescription().toLowerCase(),r,n.id)}}};varSm=require("obsidian");varqa=classextendsNn{constructor(i,n,r=[]){super(i,n);this.app=i;this.inputEl=n;this.valuesToExclude=r}getSuggestions(i){letn=this.app.commands.listCommands();if(!n)return[];letr=n.filter(o=>{for(letlofthis.valuesToExclude)if(l.id==o.id&&!(this.inputEl.hasAttribute("commandId")&&this.inputEl.getAttribute("commandId")==o.id))return!1;return!0}),a=[],s=i.toLowerCase();returnr.forEach(o=>{(o.id.contains(s)||o.name.toLowerCase().contains(s))&&a.push(o)}),a}renderSuggestion(i,n){n.setText(i.name)}selectSuggestion(i){this.inputEl.value=i.name,this.inputEl.setAttribute("commandId",i.id),this.inputEl.trigger("input"),this.close()}};varAo=classextends_i{constructor(i,n,r,a,s){super(i,n,E("options.custom-command.name"),E("options.custom-command.description"),E("options.custom-command.warning"),E("options.custom-command.add-input-button-text"),s,()=>{leto={id:"",name:""};this.lintCommands.push(o),this.saveSettings(),this.addCommand(o,this.lintCommands.length-1,!0)});this.lintCommands=r;this.app=a;this.display()}showInputEls(){this.lintCommands.forEach((i,n)=>{this.addCommand(i,n)})}addCommand(i,n,r=!1){newSm.Setting(this.inputElDiv).addSearch(a=>{newqa(this.app,a.inputEl,this.lintCommands),a.setPlaceholder(E("options.custom-command.command-search-placeholder-text")).setValue(i.name).onChange(s=>{leto={id:a.inputEl.getAttribute("commandId"),name:s};o.name&&o.id?(this.lintCommands[n]=o,this.saveSettings()):!o.name&&!o.id&&(this.lintCommands[n]=o,this.saveSettings())}),a.inputEl.setAttr("tabIndex",n),a.inputEl.addClass("linter-custom-command"),r&&a.inputEl.focus()}).addExtraButton(a=>{a.setIcon("up-chevron-glyph").setTooltip(E("options.custom-command.move-up-tooltip")).onClick(()=>{this.arrayMove(n,n-1),this.saveSettings(),this.resetInputEls()})}).addExtraButton(a=>{a.setIcon("down-chevron-glyph").setTooltip(E("options.custom-command.move-down-tooltip")).onClick(()=>{this.arrayMove(n,n+1),this.saveSettings(),this.resetInputEls()})}).addExtraButton(a=>{a.setIcon("cross").setTooltip(E("options.custom-command.delete-tooltip")).onClick(()=>{this.lintCommands.splice(n,1),this.saveSettings(),this.resetInputEls()})})}arrayMove(i,n){if(n<0||n===this.lintCommands.length)return;letr=this.lintCommands[i];this.lintCommands[i]=this.lintCommands[n],this.lintCommands[n]=r}};varRc=require("obsidian");varrk="gm",To=classextends_i{constructor(i,n,r,a){super(i,n,E("options.custom-replace.name"),E("options.custom-replace.description"),E("options.custom-replace.warning"),E("options.custom-replace.add-input-button-text"),a,()=>{lets={label:"",find:"",replace:"",flags:rk};this.regexes.push(s),this.saveSettings(),this.addRegex(s,this.regexes.length-1,!0)});this.regexes=r;this.display(),this.inputElDiv.addClass("linter-custom-regex-replacement-container")}showInputEls(){this.regexes.forEach((i,n)=>{this.addRegex(i,n)})}addRegex(i,n,r=!1){leta=this.inputElDiv.createDiv({cls:"linter-custom-regex-replacement"}),s=a.createDiv(),o=newRc.Setting(s).addText(d=>{d.setPlaceholder(E("options.custom-replace.label-placeholder-text")).setValue(i.label).onChange(u=>{this.regexes[n].label=u,this.saveSettings()}),d.inputEl.setAttr("inputIndex",n),d.inputEl.addClass("linter-custom-regex-replacement-label-input"),r&&d.inputEl.focus()});o.controlEl.addClass("linter-custom-regex-replacement-label"),o.descEl.remove(),o.infoEl.remove(),o.nameEl.remove();letl=a.createDiv();newRc.Setting(l).addText(d=>{d.setPlaceholder(E("options.custom-replace.regex-to-find-placeholder-text")).setValue(i.find).onChange(u=>{this.regexes[n].find=u,this.saveSettings()})
`," "))}};var Am=require("obsidian");var Lo=class{constructor(t,i,n,r){this.containerEl=t;this.searchZeroState=i;this.tabNameToTab=n;this.onFocus=r;this.searchSettingInfo=new Map;for(let[a,s]of n)this.searchSettingInfo.set(a,s.searchSettingInfo);this.display()}display(){let t=new Am.Setting(this.containerEl);t.settingEl.style.border="none",t.addSearch(i=>{this.search=i}),this.search.setPlaceholder(E("tabs.default-search-bar-text")),this.search.inputEl.onfocus=()=>{this.onFocus()},this.search.onChange(i=>{this.searchSettings(i.toLowerCase())})}searchSettings(t){let i=new Set,n=function(r,a){qi(r),i.has(a)||i.add(a)};for(let[r,a]of this.searchSettingInfo)for(let s of a)if(t.trim()===""||s.alias?.includes(t)||s.description.includes(t)||s.name.includes(t))n(s.containerEl,r);else if(s.options)for(let o of s.options){if(o.description.toLowerCase().includes(t)||o.name.toLowerCase().includes(t)){n(s.containerEl,r);break}else if(o.options){for(let l of o.options)if(l.description.toLowerCase().includes(t)||l.value.toLowerCase().includes(t)){n(s.containerEl,r);break}}pi(s.containerEl)}else pi(s.containerEl);for(let[r,a]of this.tabNameToTab)i.has(r)?qi(a.headingEl):pi(a.headingEl);i.size===0?qi(this.searchZeroState):pi(this.searchZeroState)}focusOnInput(){this.search.inputEl.focus()}};var Tm=pn(Va());var Yn=require("obsidian");var Ia=class{constructor(t,i,n,r=!0){this.containerEl=t;this.name=i;this.description=n;this.disabled=r;this.display()}display(){let t=this.containerEl.createDiv(),i=t.createDiv("setting-item-info");this.nameEl=i.createDiv("setting-item-name"),this.nameEl.setText(this.name),this.descEl=i.createDiv("setting-item-description"),this.descEl.setText(this.description),this.inputContainerEl=t.createDiv("full-width-textbox-input-wrapper"),this.inputContainerEl.onmouseover=()=>{this.getInput().trim()!=""&&this.copyEl.removeClass("linter-visually-hidden")},this.inputContainerEl.onmouseleave=()=>{this.copyEl.addClass("linter-visually-hidden")},this.inputEl=this.inputContainerEl.createEl("textarea",{cls:"full-width"}),this.inputEl.spellcheck=!1,this.inputEl.disabled=this.disabled,this.copyEl=this.inputContainerEl.createDiv({cls:"settings-copy-button linter-visually-hidden ",attr:{"aria-label":E("copy-aria-label")}}),this.copyIconEl=this.copyEl.createSpan(),(0,Yn.setIcon)(this.copyIconEl,"linter-clipboard"),this.copyIconEl.onclick=()=>{this.handleCopy(this.copyIconEl)}}getInput(){return this.inputEl.value}handleCopy(t){navigator.clipboard.writeText(this.getInput()).then(()=>{(0,Yn.setIcon)(t,"linter-success"),setTimeout(()=>{(0,Yn.setIcon)(t,"linter-clipboard")},1500)},i=>{new Yn.Notice(`${E("notice-text.copy-to-clipboard-failed")+i}`,0)})}};var ak=Object.keys(Tm.default.levels),Eo=class extends Bi{constructor(t,i,n,r){super(t,i,"Debug",n,r),this.display()}display(){let t=this.contentEl.createDiv(),i={isForEnum:!0,values:ak,descriptions:[]};this.addSettingSearchInfoForGeneralSettings(new $i(t,"tabs.debug.log-level.name","tabs.debug.log-level.description","logLevel",this.plugin,i,async()=>{Ja(this.plugin.settings.logLevel)})),t=this.contentEl.createDiv();let n=E("tabs.debug.linter-config.name"),r=E("tabs.debug.linter-config.description");new Ia(t,n,r).inputEl.setText(JSON.stringify(this.plugin.settings,null,2)),this.addSettingSearchInfo(t,n,r),t=this.contentEl.createDiv(),this.addSettingSearchInfoForGeneralSettings(new Fi(t,"tabs.debug.log-collection.name","tabs.debug.log-collection.description","recordLintOnSaveLogs",this.plugin)),t=this.contentEl.createDiv(),n=E("tabs.debug.linter-logs.name"),r=E("tabs.debug.linter-logs.description");let s=new Ia(t,n,"");s.inputEl.setText(Qa.join(`
`)),Mi(r,s.descEl,this.plugin.settingsTab.component),this.addSettingSearchInfo(t,n,r)}};var Oo=class extends ft.PluginSettingTab{constructor(i,n){super(i,n);this.plugin=n;this.tabNameToTab=new Map;this.selectedTab="General";this.component=new ft.Component}display(){let{containerEl:i}=this;this.component.load(),i.empty();let n=i.createDiv("linter-setting-title");ft.Platform.isMobile?n.addClass("linter-mobile"):n.createEl("h1").setText(E("linter-title")),this.navContainer=i.createEl("nav",{cls:"linter-setting-header"}),this.tabNavEl=this.navContainer.createDiv("linter-setting-tab-group"),this.settingsContentEl=i.createDiv("linter-setting-content"),this.addTabs(ft.Platform.isMobile),this.createSearchZeroState(ft.Platform.isMobile),this.generateSearchBar(n),this.selectedTab==""&&this.tabSearcher.focusOnInput()}hide(){this.component.unload()}addTabs(i){this.addTab(new ko(this.tabNavEl,this.settingsContentEl,i,this.plugin,this.app));for(let n of Object.values(D))this.addTab(new So(this.tabNavEl,this.settingsContentEl,n,qt.get(n),i,this.plugin));this.addTab(new zo(this.tabNavEl,this.settingsContentEl,i,this.app,this.plugin)),this.addTab(new Eo(this.tabNavEl,this.settingsContentEl,i,this.plugin))}generateSearchBar(i){this.tabSearcher=new Lo(i,this.searchZeroState,this.tabNameToTab,()=>{for(let n of this.tabNameToTab.values()){n.updateTabDisplayMode(!1,"entering search mode by focusing on the search input box");let r=this.tabSearcher.search.getValue();this.selectedTab==""&&r.trim()!=""&&this.tabSearcher.searchSettings(r.toLowerCase()),this.selectedTab=""}})}createSearchZeroState(i){this.searchZeroState=this.settingsContentEl.createDiv(),pi(this.searchZeroState),this.searchZeroState.createEl(i?"h3":"h2",{text:E("empty-search-results-text")}).style.textAlign="center"}addTab(i){i.navButton.onclick=()=>{this.onTabClick(i.name)},i.updateTabDisplayMode(this.selectedTab===i.name,"the status is still the same"),this.tabNameToTab.set(i.name,i)}onTabClick(i){if(this.selectedTab!==i){if(this.selectedTab=="")for(let[n,r]of this.tabNameToTab)r.updateTabDisplayMode(n===i,"leaving search mode by selecting a tab");else pi(this.searchZeroState),this.tabNameToTab.get(i).updateTabDisplayMode(!0),this.tabNameToTab.get(this.selectedTab).updateTabDisplayMode(!1);this.selectedTab=i}}};var Lm=require("obsidian");var sk=/^---\n/gm,zm=`${Sn}:`,Co=class extends Lm.EditorSuggest{constructor(i){super(i.app);this.plugin=i;this.inline=!1;let n=E("all-rules-option");this.ruleInfo=[{displayName:n,name:n.toLowerCase(),alias:"all"}];for(let r of Ii){let a=r.getName();this.ruleInfo.push({displayName:a,name:a.toLowerCase(),alias:r.alias})}}onTrigger(i,n,r){let a=n.getLine(i.line).toLowerCase();if(a.startsWith(zm)||this.disabledRulesIsEndOfStartOfFileToCursor(n.getRange({line:0,ch:0},i))){this.inline=a.startsWith(zm);let o=n.getLine(i.line).substring(0,i.ch),l=o.match(/(\S+)$/)?.first().replaceAll("[","").replaceAll("]","");if(l)return{end:i,start:{ch:o.lastIndexOf(l),line:i.line},query:l}}return null}getSuggestions(i){let[n,r]=Rs(i.editor.getValue());if(r)return[];let a=i.query.toLowerCase();return this.ruleInfo.filter(o=>(o.name.contains(a)||o.alias.contains(a))&&!n.includes(o.alias))}renderSuggestion(i,n){n.addClass("mod-complex");let r=n.createDiv({cls:"suggestion-content"});r.createDiv({cls:"suggestion-title"}).setText(`${i.displayName}`),r.createDiv({cls:"suggestion-note"}).setText(`${i.alias}`)}selectSuggestion(i){if(this.context){let n=i.alias;this.inline?n=`${n},`:n=`${n}
`),a=[];if(r.length%i.length!==0)for(let s=0;s<i.length;s++)a.push(n);else{let s=r.length/i.length,o="";for(let l=0;l<r.length;l++)o+=r[l],(l+1===i.length||(l+1)%s===0)&&(a.push(o),o="")}return a}async pasteAsPlainText(i){let n=await navigator.clipboard.readText();if(!n){new re.Notice(E("notice-text.empty-clipboard"),yt);return}i.replaceSelection(n)}setCustomCommandCallback(i){(0,Im.warn)(E("logs.custom-command-callback-warning")),this.customCommandsCallback=i}async runCustomCommandsInSidebar(i){if(!this.settings.lintCommands||this.settings.lintCommands.length==0||!this.hasCustomCommands)return;let n=this.app.workspace.getRightLeaf(!1),r=this.getEditor();await this.customCommandsLock.acquire("command",async()=>{this.currentlyOpeningSidebar=!0,await n.openFile(i),this.rulesRunner.runCustomCommands(this.settings.lintCommands,this.app.commands),this.customCommandsCallback&&await this.customCommandsCallback(i)}),n.detach(),r&&r.focus(),this.currentlyOpeningSidebar=!1}async runCustomCommands(i){!this.settings.lintCommands||this.settings.lintCommands.length==0||!this.hasCustomCommands||await this.customCommandsLock.acquire("command",async()=>{try{this.rulesRunner.runCustomCommands(this.settings.lintCommands,this.app.commands)}catch(n){this.handleLintError(i,n,E("commands.lint-file.error-message")+" '{FILE_PATH}'",!1)}this.customCommandsCallback&&await this.customCommandsCallback(i)})}getEditor(){let i=this.app.workspace.getActiveViewOfType(re.MarkdownView);return i?i.editor:null}getCurrentMode(){let i=this.app.workspace.getActiveFileView();if(!i)return;let n=i.getState();return Object.hasOwn(n,"source")?n.source?"source":"preview":null}getLineContent(i,n){return i.getLine(n.anchor.line)}moveConfigValuesToKeyBasedFormat(){is("en");for(let i of Ii){let n=E("rules."+i.alias+".name"),r=this.settings.ruleConfigs[n];if(r!=null){let a=E("rules."+i.alias+".description"),s={enabled:r[a]??!1};for(let o of i.options){if(o.configKey==="enabled")continue;let l=E("rules."+i.alias+"."+o.configKey+".name");s[o.configKey]=r[l]??o.defaultValue}this.settings.ruleConfigs[i.alias]=s,delete this.settings.ruleConfigs[n]}}this.settings.settingsConvertedToConfigKeyValues=!0,this.saveSettings(),is(window.localStorage.getItem("language"))}getAllFilesInFolder(i){let n=[],r=[i];for(let a of r)for(let s of a.children)s instanceof re.TFile&&this.isMarkdownFile(s)?n.push(s):s instanceof re.TFolder&&r.push(s);return n}updatePasteOverrideStatus(){for(let i of qt.get("Paste"))if(i.getOptions(this.settings).enabled){this.overridePaste=!0;return}this.overridePaste=!1}updateHasCustomCommandStatus(){for(let i of this.settings.lintCommands)if(i.id&&i.id.trim()!=""){this.hasCustomCommands=!0;return}this.hasCustomCommands=!1}endOfDocument(i){let n=i.split(`