import{p as m}from"./vendor-lezer-yaml-BRjO6Z3u.js";import{L as O,c as r,d as l,f as i,h as a,k as p}from"./cm-language-CDsY7zq0.js";import{p as u}from"./vendor-lezer-common-tVQBIsvN.js";import{s as f,t as d}from"./vendor-lezer-highlight-DuEf3ZFH.js";import{L as c}from"./vendor-lezer-lr-eZ5kYecM.js";import"./cm-state-X9WpHEQO.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./cm-view-CiSFjroV.js";import"./vendor-style-mod-Bs6eFhZE.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:m.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.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:"]"})}),i.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 y(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,y as yamlFrontmatter,s as yamlLanguage};
