import{y as e,x as t,w as s,v as a,t as n,s as i,a as r,b as o,c as l,r as c,d as g,e as h,p,f as u,g as d,h as f,i as m,j as v,o as y,m as k,k as w,l as j,n as x,q as N,u as b,z as L,A as _,B as A,C as O,D as S,E as q,F as E,G as H,H as I,I as z,J as B,K as C,L as P}from"./highlight.js-BXjaxjTa.js";const R={arduino:C,bash:B,c:z,cpp:I,csharp:H,css:E,diff:q,go:S,graphql:O,ini:A,java:_,javascript:L,json:b,kotlin:N,less:x,lua:j,makefile:w,markdown:k,objectivec:y,perl:v,php:m,"php-template":f,plaintext:d,python:u,"python-repl":p,r:h,ruby:g,rust:c,scss:l,shell:o,sql:r,swift:i,typescript:n,vbnet:a,wasm:s,xml:t,yaml:e},T={};function D(e){const t=P.newInstance();return e&&n(e),{highlight:s,highlightAuto:function(e,n){const i=(n||T).subset||a();let r,o=-1,l=0;for(;++o<i.length;){const a=i[o];if(!t.getLanguage(a))continue;const c=s(a,e,n);c.data&&void 0!==c.data.relevance&&c.data.relevance>l&&(l=c.data.relevance,r=c)}return r||{type:"root",children:[],data:{language:void 0,relevance:l}}},listLanguages:a,register:n,registerAlias:function(e,s){if("string"==typeof e)t.registerAliases("string"==typeof s?s:[...s],{languageName:e});else{let s;for(s in e)if(Object.hasOwn(e,s)){const a=e[s];t.registerAliases("string"==typeof a?a:[...a],{languageName:s})}}},registered:function(e){return Boolean(t.getLanguage(e))}};function s(e,s,a){const n=a||T,i="string"==typeof n.prefix?n.prefix:"hljs-";if(!t.getLanguage(e))throw new Error("Unknown language: `"+e+"` is not registered");t.configure({__emitter:F,classPrefix:i});const r=t.highlight(s,{ignoreIllegals:!0,language:e});if(r.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:r.errorRaised});const o=r._emitter.root,l=o.data;return l.language=r.language,l.relevance=r.relevance,o}function a(){return t.listLanguages()}function n(e,s){if("string"==typeof e)t.registerLanguage(e,s);else{let s;for(s in e)Object.hasOwn(e,s)&&t.registerLanguage(s,e[s])}}}class F{constructor(e){this.options=e,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(""===e)return;const t=this.stack[this.stack.length-1],s=t.children[t.children.length-1];s&&"text"===s.type?s.value+=e:t.children.push({type:"text",value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){const s=this.stack[this.stack.length-1],a=e.root.children;t?s.children.push({type:"element",tagName:"span",properties:{className:[t]},children:a}):s.children.push(...a)}openNode(e){const t=this,s={type:"element",tagName:"span",properties:{className:e.split(".").map(function(e,s){return s?e+"_".repeat(s):t.options.classPrefix+e})},children:[]};this.stack[this.stack.length-1].children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}export{D as c,R as g};
