import{p as i}from"./vendor-lezer-yaml-BNIl6S_O.js";import{L as r,b as O,c as l,e as a,g as m,h as p}from"./vendor-codemirror-language-BgPj_McA.js";import{p as u}from"./vendor-lezer-common-B3-cUCR_.js";import{s as f,a as d}from"./vendor-lezer-highlight-CDMHUZ74.js";import{L as c}from"./vendor-lezer-lr-bhwg1HMg.js";import"./vendor-codemirror-state-C9awkmn-.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./vendor-codemirror-view-CiLROUVV.js";import"./vendor-style-mod-NZ5MEPvj.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";const g=c.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:"!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~",goto:"vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS",nodeNames:"⚠ Document Frontmatter DashLine FrontmatterContent Body",maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),s=O.define({name:"yaml",parser:i.configure({props:[l.add({Stream:e=>{for(let n=e.node.resolve(e.pos,-1);n&&n.to>=e.pos;n=n.parent){if(n.name=="BlockLiteralContent"&&n.from<n.to)return e.baseIndentFor(n);if(n.name=="BlockLiteral")return e.baseIndentFor(n)+e.unit;if(n.name=="BlockSequence"||n.name=="BlockMapping")return e.column(n.firstChild.from,1);if(n.name=="QuotedLiteral")return null;if(n.name=="Literal"){let t=e.column(n.from,1);if(t==e.lineIndent(n.from,1))return t;if(n.to>e.pos)return null}}return null},FlowMapping:a({closing:"}"}),FlowSequence:a({closing:"]"})}),m.add({"FlowMapping FlowSequence":p,"Item Pair BlockLiteral":(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function $(){return new r(s)}const S=O.define({name:"yaml-frontmatter",parser:g.configure({props:[f({DashLine:d.meta})]})});function b(e){let{language:n,support:t}=e.content instanceof r?e.content:{language:e.content,support:[]};return new r(S.configure({wrap:u(o=>o.name=="FrontmatterContent"?{parser:s.parser}:o.name=="Body"?{parser:n.parser}:null)}),t)}export{$ as yaml,b as yamlFrontmatter,s as yamlLanguage};
