import u from"shiki/langs/bash.mjs";import w from"shiki/langs/c.mjs";import N from"shiki/langs/coffee.mjs";import b from"shiki/langs/csharp.mjs";import y from"shiki/langs/css.mjs";import H from"shiki/langs/go.mjs";import v from"shiki/langs/graphql.mjs";import L from"shiki/langs/html.mjs";import _ from"shiki/langs/http.mjs";import x from"shiki/langs/java.mjs";import T from"shiki/langs/javascript.mjs";import j from"shiki/langs/kotlin.mjs";import E from"shiki/langs/lua.mjs";import r from"shiki/langs/markdown.mjs";import M from"shiki/langs/objective-c.mjs";import q from"shiki/langs/perl.mjs";import A from"shiki/langs/php.mjs";import D from"shiki/langs/python.mjs";import F from"shiki/langs/scala.mjs";import R from"shiki/langs/sql.mjs";import a from"shiki/langs/swift.mjs";import S from"shiki/langs/tsx.mjs";import W from"shiki/langs/typescript.mjs";import C from"shiki/langs/vim.mjs";import G from"shiki/langs/xml.mjs";import J from"shiki/langs/yaml.mjs";import U from"shiki/langs/jsx.mjs";import{transformerNotationDiff as V,transformerNotationHighlight as $,transformerNotationWordHighlight as z,transformerNotationFocus as B,transformerNotationErrorLevel as I,transformerMetaHighlight as K,transformerMetaWordHighlight as O,transformerRemoveNotationEscape as P}from"@shikijs/transformers";import{createHighlighterCoreSync as s}from"shiki/core";import{createJavaScriptRegexEngine as n}from"shiki/engine/javascript";import Q from"./ruby";import f from"./theme";import X from"./treeview-transformer";import Y from"./node-transformer";import Z from"./line-numbers-transformer";import{mapLang as rr}from"./map-lang";const or=[{...r[0],displayName:"Markdoc",name:"markdoc",scopeName:"source.markdoc",aliases:[],repository:{...r[0].repository,fenced_code_block:{patterns:[...r[0].repository.fenced_code_block.patterns||[],{name:"markdoc",begin:".*{%",end:"%}",patterns:[{match:"(?<={%)\\s*(/\\w+(-\\w+)?|\\w+(-\\w+)?)",name:"markdoc.tag"},{match:"\\$\\w+",name:"markdoc.variable"},{match:'".*?"',name:"markdoc.string"},{match:"\\b\\w+(?=\\()",name:"markdoc.function"},{match:"\\s+\\w+(?==|\\s)",name:"markdoc.keyword"},{match:"(?<==)false|true(?=\\s)",name:"markdoc.boolean"}]}]}}}],p="text",c=s({themes:[f],langs:[u,w,N,b,y,H,v,L,_,x,T,j,E,r,M,q,A,D,Q,F,R,a,S,W,G,C,J,or,U],engine:n()}),tr=[V(),$(),z(),B(),I(),K(),O(),P(),Y()],mr=(o,m,h)=>{const{withLineNumbers:g,startLineNumber:l,highlight:d,customTransformer:e}=h||{},i=rr(m?.toLowerCase()||p),t={lang:i,theme:"theme",meta:{__raw:d},transformers:[...i==="treeview"?[X()]:[],...tr,...g?[Z(l)]:[],...e?[e]:[]]};try{return m==="swift"?s({themes:[f],langs:[a],engine:n({forgiving:!0})}).codeToHtml(o,t):c.codeToHtml(o,t)}catch{return c.codeToHtml(o,{...t,lang:p})}};function Jr(){return{highlight:mr}}export{mr as highlight,Jr as useCodeHighlight};
