WokerTask/public/admin/assets/highlight.js.dba6fa1b.js

3 lines
20 KiB
JavaScript

var te={exports:{}};function ne(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var i=e[t];typeof i=="object"&&!Object.isFrozen(i)&&ne(i)}),e}te.exports=ne;te.exports.default=ne;class de{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function xe(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function v(e,...t){const i=Object.create(null);for(const f in e)i[f]=e[f];return t.forEach(function(f){for(const b in f)i[b]=f[b]}),i}const Je="</span>",pe=e=>!!e.scope||e.sublanguage&&e.language,Ve=(e,{prefix:t})=>{if(e.includes(".")){const i=e.split(".");return[`${t}${i.shift()}`,...i.map((f,b)=>`${f}${"_".repeat(b+1)}`)].join(" ")}return`${t}${e}`};class qe{constructor(t,i){this.buffer="",this.classPrefix=i.classPrefix,t.walk(this)}addText(t){this.buffer+=xe(t)}openNode(t){if(!pe(t))return;let i="";t.sublanguage?i=`language-${t.language}`:i=Ve(t.scope,{prefix:this.classPrefix}),this.span(i)}closeNode(t){!pe(t)||(this.buffer+=Je)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const Ee=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class ie{constructor(){this.rootNode=Ee(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const i=Ee({scope:t});this.add(i),this.stack.push(i)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,i){return typeof i=="string"?t.addText(i):i.children&&(t.openNode(i),i.children.forEach(f=>this._walk(t,f)),t.closeNode(i)),t}static _collapse(t){typeof t!="string"&&(!t.children||(t.children.every(i=>typeof i=="string")?t.children=[t.children.join("")]:t.children.forEach(i=>{ie._collapse(i)})))}}class Qe extends ie{constructor(t){super(),this.options=t}addKeyword(t,i){t!==""&&(this.openNode(i),this.addText(t),this.closeNode())}addText(t){t!==""&&this.add(t)}addSublanguage(t,i){const f=t.root;f.sublanguage=!0,f.language=i,this.add(f)}toHTML(){return new qe(this,this.options).value()}finalize(){return!0}}function j(e){return e?typeof e=="string"?e:e.source:null}function Oe(e){return L("(?=",e,")")}function me(e){return L("(?:",e,")*")}function et(e){return L("(?:",e,")?")}function L(...e){return e.map(i=>j(i)).join("")}function tt(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function se(...e){return"("+(tt(e).capture?"":"?:")+e.map(f=>j(f)).join("|")+")"}function ye(e){return new RegExp(e.toString()+"|").exec("").length-1}function nt(e,t){const i=e&&e.exec(t);return i&&i.index===0}const it=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function re(e,{joinWith:t}){let i=0;return e.map(f=>{i+=1;const b=i;let _=j(f),c="";for(;_.length>0;){const r=it.exec(_);if(!r){c+=_;break}c+=_.substring(0,r.index),_=_.substring(r.index+r[0].length),r[0][0]==="\\"&&r[1]?c+="\\"+String(Number(r[1])+b):(c+=r[0],r[0]==="("&&i++)}return c}).map(f=>`(${f})`).join(t)}const st=/\b\B/,Re="[a-zA-Z]\\w*",ce="[a-zA-Z_]\\w*",Se="\\b\\d+(\\.\\d+)?",Ne="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ae="\\b(0b[01]+)",rt="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ct=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=L(t,/.*\b/,e.binary,/\b.*/)),v({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(i,f)=>{i.index!==0&&f.ignoreMatch()}},e)},P={begin:"\\\\[\\s\\S]",relevance:0},ot={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[P]},at={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[P]},lt={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Y=function(e,t,i={}){const f=v({scope:"comment",begin:e,end:t,contains:[]},i);f.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const b=se("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return f.contains.push({begin:L(/[ ]+/,"(",b,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),f},ut=Y("//","$"),ft=Y("/\\*","\\*/"),gt=Y("#","$"),ht={scope:"number",begin:Se,relevance:0},dt={scope:"number",begin:Ne,relevance:0},pt={scope:"number",begin:Ae,relevance:0},Et={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[P,{begin:/\[/,end:/\]/,relevance:0,contains:[P]}]}]},bt={scope:"title",begin:Re,relevance:0},_t={scope:"title",begin:ce,relevance:0},wt={begin:"\\.\\s*"+ce,relevance:0},Mt=function(e){return Object.assign(e,{"on:begin":(t,i)=>{i.data._beginMatch=t[1]},"on:end":(t,i)=>{i.data._beginMatch!==t[1]&&i.ignoreMatch()}})};var F=Object.freeze({__proto__:null,MATCH_NOTHING_RE:st,IDENT_RE:Re,UNDERSCORE_IDENT_RE:ce,NUMBER_RE:Se,C_NUMBER_RE:Ne,BINARY_NUMBER_RE:Ae,RE_STARTERS_RE:rt,SHEBANG:ct,BACKSLASH_ESCAPE:P,APOS_STRING_MODE:ot,QUOTE_STRING_MODE:at,PHRASAL_WORDS_MODE:lt,COMMENT:Y,C_LINE_COMMENT_MODE:ut,C_BLOCK_COMMENT_MODE:ft,HASH_COMMENT_MODE:gt,NUMBER_MODE:ht,C_NUMBER_MODE:dt,BINARY_NUMBER_MODE:pt,REGEXP_MODE:Et,TITLE_MODE:bt,UNDERSCORE_TITLE_MODE:_t,METHOD_GUARD:wt,END_SAME_AS_BEGIN:Mt});function xt(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function Ot(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function yt(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=xt,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Rt(e,t){!Array.isArray(e.illegal)||(e.illegal=se(...e.illegal))}function St(e,t){if(!!e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Nt(e,t){e.relevance===void 0&&(e.relevance=1)}const At=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const i=Object.assign({},e);Object.keys(e).forEach(f=>{delete e[f]}),e.keywords=i.keywords,e.begin=L(i.beforeMatch,Oe(i.begin)),e.starts={relevance:0,contains:[Object.assign(i,{endsParent:!0})]},e.relevance=0,delete i.beforeMatch},kt=["of","and","for","in","not","or","if","then","parent","list","value"],Tt="keyword";function ke(e,t,i=Tt){const f=Object.create(null);return typeof e=="string"?b(i,e.split(" ")):Array.isArray(e)?b(i,e):Object.keys(e).forEach(function(_){Object.assign(f,ke(e[_],t,_))}),f;function b(_,c){t&&(c=c.map(r=>r.toLowerCase())),c.forEach(function(r){const l=r.split("|");f[l[0]]=[_,It(l[0],l[1])]})}}function It(e,t){return t?Number(t):vt(e)?0:1}function vt(e){return kt.includes(e.toLowerCase())}const be={},D=e=>{console.error(e)},_e=(e,...t)=>{console.log(`WARN: ${e}`,...t)},C=(e,t)=>{be[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),be[`${e}/${t}`]=!0)},X=new Error;function Te(e,t,{key:i}){let f=0;const b=e[i],_={},c={};for(let r=1;r<=t.length;r++)c[r+f]=b[r],_[r+f]=!0,f+=ye(t[r-1]);e[i]=c,e[i]._emit=_,e[i]._multi=!0}function Bt(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw D("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),X;if(typeof e.beginScope!="object"||e.beginScope===null)throw D("beginScope must be object"),X;Te(e,e.begin,{key:"beginScope"}),e.begin=re(e.begin,{joinWith:""})}}function Dt(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw D("skip, excludeEnd, returnEnd not compatible with endScope: {}"),X;if(typeof e.endScope!="object"||e.endScope===null)throw D("endScope must be object"),X;Te(e,e.end,{key:"endScope"}),e.end=re(e.end,{joinWith:""})}}function Lt(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Ct(e){Lt(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Bt(e),Dt(e)}function Ht(e){function t(c,r){return new RegExp(j(c),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(r?"g":""))}class i{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(r,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,r]),this.matchAt+=ye(r)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const r=this.regexes.map(l=>l[1]);this.matcherRe=t(re(r,{joinWith:"|"}),!0),this.lastIndex=0}exec(r){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(r);if(!l)return null;const x=l.findIndex((H,Z)=>Z>0&&H!==void 0),w=this.matchIndexes[x];return l.splice(0,x),Object.assign(l,w)}}class f{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(r){if(this.multiRegexes[r])return this.multiRegexes[r];const l=new i;return this.rules.slice(r).forEach(([x,w])=>l.addRule(x,w)),l.compile(),this.multiRegexes[r]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(r,l){this.rules.push([r,l]),l.type==="begin"&&this.count++}exec(r){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let x=l.exec(r);if(this.resumingScanAtSamePosition()&&!(x&&x.index===this.lastIndex)){const w=this.getMatcher(0);w.lastIndex=this.lastIndex+1,x=w.exec(r)}return x&&(this.regexIndex+=x.position+1,this.regexIndex===this.count&&this.considerAll()),x}}function b(c){const r=new f;return c.contains.forEach(l=>r.addRule(l.begin,{rule:l,type:"begin"})),c.terminatorEnd&&r.addRule(c.terminatorEnd,{type:"end"}),c.illegal&&r.addRule(c.illegal,{type:"illegal"}),r}function _(c,r){const l=c;if(c.isCompiled)return l;[Ot,St,Ct,At].forEach(w=>w(c,r)),e.compilerExtensions.forEach(w=>w(c,r)),c.__beforeBegin=null,[yt,Rt,Nt].forEach(w=>w(c,r)),c.isCompiled=!0;let x=null;return typeof c.keywords=="object"&&c.keywords.$pattern&&(c.keywords=Object.assign({},c.keywords),x=c.keywords.$pattern,delete c.keywords.$pattern),x=x||/\w+/,c.keywords&&(c.keywords=ke(c.keywords,e.case_insensitive)),l.keywordPatternRe=t(x,!0),r&&(c.begin||(c.begin=/\B|\b/),l.beginRe=t(l.begin),!c.end&&!c.endsWithParent&&(c.end=/\B|\b/),c.end&&(l.endRe=t(l.end)),l.terminatorEnd=j(l.end)||"",c.endsWithParent&&r.terminatorEnd&&(l.terminatorEnd+=(c.end?"|":"")+r.terminatorEnd)),c.illegal&&(l.illegalRe=t(c.illegal)),c.contains||(c.contains=[]),c.contains=[].concat(...c.contains.map(function(w){return jt(w==="self"?c:w)})),c.contains.forEach(function(w){_(w,l)}),c.starts&&_(c.starts,r),l.matcher=b(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=v(e.classNameAliases||{}),_(e)}function Ie(e){return e?e.endsWithParent||Ie(e.starts):!1}function jt(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return v(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Ie(e)?v(e,{starts:e.starts?v(e.starts):null}):Object.isFrozen(e)?v(e):e}var Pt="11.6.0";class Ut extends Error{constructor(t,i){super(t),this.name="HTMLInjectionError",this.html=i}}const ee=xe,we=v,Me=Symbol("nomatch"),$t=7,Gt=function(e){const t=Object.create(null),i=Object.create(null),f=[];let b=!0;const _="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let r={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Qe};function l(n){return r.noHighlightRe.test(n)}function x(n){let a=n.className+" ";a+=n.parentNode?n.parentNode.className:"";const h=r.languageDetectRe.exec(a);if(h){const p=A(h[1]);return p||(_e(_.replace("{}",h[1])),_e("Falling back to no-highlight mode for this block.",n)),p?h[1]:"no-highlight"}return a.split(/\s+/).find(p=>l(p)||A(p))}function w(n,a,h){let p="",M="";typeof a=="object"?(p=n,h=a.ignoreIllegals,M=a.language):(C("10.7.0","highlight(lang, code, ...args) has been deprecated."),C("10.7.0",`Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`),M=n,p=a),h===void 0&&(h=!0);const S={code:p,language:M};G("before:highlight",S);const k=S.result?S.result:H(S.language,S.code,h);return k.code=S.code,G("after:highlight",k),k}function H(n,a,h,p){const M=Object.create(null);function S(s,o){return s.keywords[o]}function k(){if(!u.keywords){O.addText(E);return}let s=0;u.keywordPatternRe.lastIndex=0;let o=u.keywordPatternRe.exec(E),g="";for(;o;){g+=E.substring(s,o.index);const d=I.case_insensitive?o[0].toLowerCase():o[0],y=S(u,d);if(y){const[N,Ye]=y;if(O.addText(g),g="",M[d]=(M[d]||0)+1,M[d]<=$t&&(z+=Ye),N.startsWith("_"))g+=o[0];else{const Ze=I.classNameAliases[N]||N;O.addKeyword(o[0],Ze)}}else g+=o[0];s=u.keywordPatternRe.lastIndex,o=u.keywordPatternRe.exec(E)}g+=E.substring(s),O.addText(g)}function K(){if(E==="")return;let s=null;if(typeof u.subLanguage=="string"){if(!t[u.subLanguage]){O.addText(E);return}s=H(u.subLanguage,E,!0,he[u.subLanguage]),he[u.subLanguage]=s._top}else s=J(E,u.subLanguage.length?u.subLanguage:null);u.relevance>0&&(z+=s.relevance),O.addSublanguage(s._emitter,s.language)}function R(){u.subLanguage!=null?K():k(),E=""}function T(s,o){let g=1;const d=o.length-1;for(;g<=d;){if(!s._emit[g]){g++;continue}const y=I.classNameAliases[s[g]]||s[g],N=o[g];y?O.addKeyword(N,y):(E=N,k(),E=""),g++}}function ue(s,o){return s.scope&&typeof s.scope=="string"&&O.openNode(I.classNameAliases[s.scope]||s.scope),s.beginScope&&(s.beginScope._wrap?(O.addKeyword(E,I.classNameAliases[s.beginScope._wrap]||s.beginScope._wrap),E=""):s.beginScope._multi&&(T(s.beginScope,o),E="")),u=Object.create(s,{parent:{value:u}}),u}function fe(s,o,g){let d=nt(s.endRe,g);if(d){if(s["on:end"]){const y=new de(s);s["on:end"](o,y),y.isMatchIgnored&&(d=!1)}if(d){for(;s.endsParent&&s.parent;)s=s.parent;return s}}if(s.endsWithParent)return fe(s.parent,o,g)}function Ke(s){return u.matcher.regexIndex===0?(E+=s[0],1):(m=!0,0)}function We(s){const o=s[0],g=s.rule,d=new de(g),y=[g.__beforeBegin,g["on:begin"]];for(const N of y)if(!!N&&(N(s,d),d.isMatchIgnored))return Ke(o);return g.skip?E+=o:(g.excludeBegin&&(E+=o),R(),!g.returnBegin&&!g.excludeBegin&&(E=o)),ue(g,s),g.returnBegin?0:o.length}function ze(s){const o=s[0],g=a.substring(s.index),d=fe(u,s,g);if(!d)return Me;const y=u;u.endScope&&u.endScope._wrap?(R(),O.addKeyword(o,u.endScope._wrap)):u.endScope&&u.endScope._multi?(R(),T(u.endScope,s)):y.skip?E+=o:(y.returnEnd||y.excludeEnd||(E+=o),R(),y.excludeEnd&&(E=o));do u.scope&&O.closeNode(),!u.skip&&!u.subLanguage&&(z+=u.relevance),u=u.parent;while(u!==d.parent);return d.starts&&ue(d.starts,s),y.returnEnd?0:o.length}function Fe(){const s=[];for(let o=u;o!==I;o=o.parent)o.scope&&s.unshift(o.scope);s.forEach(o=>O.openNode(o))}let W={};function ge(s,o){const g=o&&o[0];if(E+=s,g==null)return R(),0;if(W.type==="begin"&&o.type==="end"&&W.index===o.index&&g===""){if(E+=a.slice(o.index,o.index+1),!b){const d=new Error(`0 width match regex (${n})`);throw d.languageName=n,d.badRule=W.rule,d}return 1}if(W=o,o.type==="begin")return We(o);if(o.type==="illegal"&&!h){const d=new Error('Illegal lexeme "'+g+'" for mode "'+(u.scope||"<unnamed>")+'"');throw d.mode=u,d}else if(o.type==="end"){const d=ze(o);if(d!==Me)return d}if(o.type==="illegal"&&g==="")return 1;if(Q>1e5&&Q>o.index*3)throw new Error("potential infinite loop, way more iterations than matches");return E+=g,g.length}const I=A(n);if(!I)throw D(_.replace("{}",n)),new Error('Unknown language: "'+n+'"');const Xe=Ht(I);let q="",u=p||Xe;const he={},O=new r.__emitter(r);Fe();let E="",z=0,B=0,Q=0,m=!1;try{for(u.matcher.considerAll();;){Q++,m?m=!1:u.matcher.considerAll(),u.matcher.lastIndex=B;const s=u.matcher.exec(a);if(!s)break;const o=a.substring(B,s.index),g=ge(o,s);B=s.index+g}return ge(a.substring(B)),O.closeAllNodes(),O.finalize(),q=O.toHTML(),{language:n,value:q,relevance:z,illegal:!1,_emitter:O,_top:u}}catch(s){if(s.message&&s.message.includes("Illegal"))return{language:n,value:ee(a),illegal:!0,relevance:0,_illegalBy:{message:s.message,index:B,context:a.slice(B-100,B+100),mode:s.mode,resultSoFar:q},_emitter:O};if(b)return{language:n,value:ee(a),illegal:!1,relevance:0,errorRaised:s,_emitter:O,_top:u};throw s}}function Z(n){const a={value:ee(n),illegal:!1,relevance:0,_top:c,_emitter:new r.__emitter(r)};return a._emitter.addText(n),a}function J(n,a){a=a||r.languages||Object.keys(t);const h=Z(n),p=a.filter(A).filter(le).map(R=>H(R,n,!1));p.unshift(h);const M=p.sort((R,T)=>{if(R.relevance!==T.relevance)return T.relevance-R.relevance;if(R.language&&T.language){if(A(R.language).supersetOf===T.language)return 1;if(A(T.language).supersetOf===R.language)return-1}return 0}),[S,k]=M,K=S;return K.secondBest=k,K}function ve(n,a,h){const p=a&&i[a]||h;n.classList.add("hljs"),n.classList.add(`language-${p}`)}function V(n){let a=null;const h=x(n);if(l(h))return;if(G("before:highlightElement",{el:n,language:h}),n.children.length>0&&(r.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(n)),r.throwUnescapedHTML))throw new Ut("One of your code blocks includes unescaped HTML.",n.innerHTML);a=n;const p=a.textContent,M=h?w(p,{language:h,ignoreIllegals:!0}):J(p);n.innerHTML=M.value,ve(n,h,M.language),n.result={language:M.language,re:M.relevance,relevance:M.relevance},M.secondBest&&(n.secondBest={language:M.secondBest.language,relevance:M.secondBest.relevance}),G("after:highlightElement",{el:n,result:M,text:p})}function Be(n){r=we(r,n)}const De=()=>{$(),C("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Le(){$(),C("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let oe=!1;function $(){if(document.readyState==="loading"){oe=!0;return}document.querySelectorAll(r.cssSelector).forEach(V)}function Ce(){oe&&$()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",Ce,!1);function He(n,a){let h=null;try{h=a(e)}catch(p){if(D("Language definition for '{}' could not be registered.".replace("{}",n)),b)D(p);else throw p;h=c}h.name||(h.name=n),t[n]=h,h.rawDefinition=a.bind(null,e),h.aliases&&ae(h.aliases,{languageName:n})}function je(n){delete t[n];for(const a of Object.keys(i))i[a]===n&&delete i[a]}function Pe(){return Object.keys(t)}function A(n){return n=(n||"").toLowerCase(),t[n]||t[i[n]]}function ae(n,{languageName:a}){typeof n=="string"&&(n=[n]),n.forEach(h=>{i[h.toLowerCase()]=a})}function le(n){const a=A(n);return a&&!a.disableAutodetect}function Ue(n){n["before:highlightBlock"]&&!n["before:highlightElement"]&&(n["before:highlightElement"]=a=>{n["before:highlightBlock"](Object.assign({block:a.el},a))}),n["after:highlightBlock"]&&!n["after:highlightElement"]&&(n["after:highlightElement"]=a=>{n["after:highlightBlock"](Object.assign({block:a.el},a))})}function $e(n){Ue(n),f.push(n)}function G(n,a){const h=n;f.forEach(function(p){p[h]&&p[h](a)})}function Ge(n){return C("10.7.0","highlightBlock will be removed entirely in v12.0"),C("10.7.0","Please use highlightElement now."),V(n)}Object.assign(e,{highlight:w,highlightAuto:J,highlightAll:$,highlightElement:V,highlightBlock:Ge,configure:Be,initHighlighting:De,initHighlightingOnLoad:Le,registerLanguage:He,unregisterLanguage:je,listLanguages:Pe,getLanguage:A,registerAliases:ae,autoDetection:le,inherit:we,addPlugin:$e}),e.debugMode=function(){b=!1},e.safeMode=function(){b=!0},e.versionString=Pt,e.regex={concat:L,lookahead:Oe,either:se,optional:et,anyNumberOfTimes:me};for(const n in F)typeof F[n]=="object"&&te.exports(F[n]);return Object.assign(e,F),e};var U=Gt({}),Kt=U;U.HighlightJS=U;U.default=U;const Wt=Kt;export{Wt as H};