h(s.create(null,i.sourceSpan,"Invalid ICU message. Missing '}'.")),null;l.push(this._advance())}}_getText(i){let l=i.parts[0];if(l.length>0&&l[0]==`
`){let p=this._getParentElement();p!=null&&p.children.length==0&&this.getTagDefinition(p.name).ignoreFirstLf&&(l=l.substring(1))}return l}_consumeText(i){let l=this._getText(i);l.length>0&&this._addToParent(new u.Text(l,i.sourceSpan))}_closeVoidElement(){let i=this._getParentElement();i&&this.getTagDefinition(i.name).isVoid&&this._elementStack.pop()}_consumeStartTag(i){let l=i.parts[0],p=i.parts[1],m=[];for(;this._peek.type===n.TokenType.ATTR_NAME;)m.push(this._consumeAttr(this._advance()));let C=this._getElementFullName(l,p,this._getParentElement()),g=!1;if(this._peek.type===n.TokenType.TAG_OPEN_END_VOID){this._advance(),g=!0;let b=this.getTagDefinition(C);this.canSelfClose||b.canSelfClose||D.getNsPrefix(C)!==null||b.isVoid||this._errors.push(s.create(C,i.sourceSpan,`Only void and foreign elements can be self closed "${i.parts[1]}"`))}else this._peek.type===n.TokenType.TAG_OPEN_END&&(this._advance(),g=!1);let B=this._peek.sourceSpan.start,O=new r.ParseSourceSpan(i.sourceSpan.start,B),F=new r.ParseSourceSpan(i.sourceSpan.start.moveBy(1),i.sourceSpan.end),w=new u.Element(C,m,[],O,O,void 0,F);this._pushElement(w),g&&(this._popElement(C),w.endSourceSpan=O)}_pushElement(i){let l=this._getParentElement();l&&this.getTagDefinition(l.name).isClosedByChild(i.name)&&this._elementStack.pop(),this._addToParent(i),this._elementStack.push(i)}_consumeEndTag(i){let l=this.allowHtmComponentClosingTags&&i.parts.length===0?null:this._getElementFullName(i.parts[0],i.parts[1],this._getParentElement());if(this._getParentElement()&&(this._getParentElement().endSourceSpan=i.sourceSpan),l&&this.getTagDefinition(l).isVoid)this._errors.push(s.create(l,i.sourceSpan,`Void elements do not have end tags "${i.parts[1]}"`));else if(!this._popElement(l)){let p=`Unexpected closing tag "${l}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this._errors.push(s.create(l,i.sourceSpan,p))}}_popElement(i){for(let l=this._elementStack.length-1;l>=0;l--){let p=this._elementStack[l];if(!i||(D.getNsPrefix(p.name)?p.name==i:p.name.toLowerCase()==i.toLowerCase()))return this._elementStack.splice(l,this._elementStack.length-l),!0;if(!this.getTagDefinition(p.name).closedByParent)return!1}return!1}_consumeAttr(i){let l=D.mergeNsAndName(i.parts[0],i.parts[1]),p=i.sourceSpan.end,m="",C,g;if(this._peek.type===n.TokenType.ATTR_QUOTE&&(g=this._advance().sourceSpan.start),this._peek.type===n.TokenType.ATTR_VALUE){let B=this._advance();m=B.parts[0],p=B.sourceSpan.end,C=B.sourceSpan}return this._peek.type===n.TokenType.ATTR_QUOTE&&(p=this._advance().sourceSpan.end,C=new r.ParseSourceSpan(g,p)),new u.Attribute(l,m,new r.ParseSourceSpan(i.sourceSpan.start,p),C,i.sourceSpan)}_getParentElement(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}_getParentElementSkippingContainers(){let i=null;for(let l=this._elementStack.length-1;l>=0;l--){if(!D.isNgContainer(this._elementStack[l].name))return{parent:this._elementStack[l],container:i};i=this._elementStack[l]}return{parent:null,container:i}}_addToParent(i){let l=this._getParentElement();l!=null?l.children.push(i):this._rootNodes.push(i)}_insertBeforeContainer(i,l,p){if(!l)this._addToParent(p),this._elementStack.push(p);else{if(i){let m=i.children.indexOf(l);i.children[m]=p}else this._rootNodes.push(p);p.children.push(l),this._elementStack.splice(this._elementStack.indexOf(l),0,p)}}_getElementFullName(i,l,p){return i===""&&(i=this.getTagDefinition(l).implicitNamespacePrefix||"",i===""&&p!=null&&(i=D.getNsPrefix(p.name))),D.mergeNsAndName(i,l)}};function v(i,l){return i.length>0&&i[i.length-1]===l}}}),Ml=I({"node_modules/angular-html-parser/lib/compiler/src/ml_parser/html_parser.js"(e){"use strict";N(),Object.defineProperty(e,"__esModule",{value:!0});var r=Fs(),u=ns(),n=ns();e.ParseTreeResult=n.ParseTreeResult,e.TreeError=n.TreeError;var D=class extends u.Parser{constructor(){super(r.getHtmlTagDefinition)}parse(s,a,f){let c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,v=arguments.length>4?arguments[4]:void 0;return super.parse(s,a,f,c,v)}};e.HtmlParser=D}}),ss=I({"node_modules/angular-html-parser/lib/angular-html-parser/src/index.js"(e){"use strict";N(),Object.defineProperty(e,"__esModule",{value:!0});var r=Ml(),u=Ze();e.TagContentType=u.TagContentType;var n=null,D=()=>(n||(n=new r.HtmlParser),n);function s(a){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{canSelfClose:c=!1,allowHtmComponentClosingTags:v=!1,isTagNameCaseSensitive:i=!1,getTagContentType:l}=f;return D().parse(a,"angular-html-parser",{tokenizeExpansionForms:!1,interpolationConfig:void 0,canSelfClose:c,allowHtmComponentClosingTags:v},i,l)}e.parse=s}}),jl=I({"src/language-html/parser-html.js"(e,r){N();var{ParseSourceSpan:u,ParseLocation:n,ParseSourceFile:D}=Ne(),s=JD(),a=ls(),f=ZD(),{inferParserByLanguage:c}=yl(),v=Bl(),i=Nl(),l=Ol(),{hasPragma:p}=ql(),{Node:m}=Il(),{parseIeConditionalComment:C}=Rl(),{locStart:g,locEnd:B}=xl();function O(b,M,R){let{canSelfClose:U,normalizeTagName:k,normalizeAttributeName:j,allowHtmComponentClosingTags:L,isTagNameCaseSensitive:t,getTagContentType:o}=M,d=ss(),{RecursiveVisitor:h,visitAll:A}=As(),{ParseSourceSpan:q}=Ne(),{getHtmlTagDefinition:P}=Fs(),{rootNodes:G,errors:X}=d.parse(b,{canSelfClose:U,allowHtmComponentClosingTags:L,isTagNameCaseSensitive:t,getTagContentType:o});if(R.parser==="vue")if(G.some(_=>_.type==="docType"&&_.value==="html"||_.type==="element"&&_.name.toLowerCase()==="html")){U=!0,k=!0,j=!0,L=!0,t=!1;let _=d.parse(b,{canSelfClose:U,allowHtmComponentClosingTags:L,isTagNameCaseSensitive:t});G=_.rootNodes,X=_.errors}else{let _=T=>{if(!T||T.type!=="element"||T.name!=="template")return!1;let x=T.attrs.find(V=>V.name==="lang"),$=x&&x.value;return!$||c($,R)==="html"};if(G.some(_)){let T,x=()=>d.parse(b,{canSelfClose:U,allowHtmComponentClosingTags:L,isTagNameCaseSensitive:t}),$=()=>T||(T=x()),V=z=>$().rootNodes.find(Y=>{let{startSourceSpan:ie}=Y;return ie&&ie.start.offset===z.startSourceSpan.start.offset});for(let z=0;z<G.length;z++){let Y=G[z],{endSourceSpan:ie,startSourceSpan:Ee}=Y;if(ie===null)X=$().errors,G[z]=V(Y)||Y;else if(_(Y)){let Fe=$(),Oe=Ee.end.offset,Z=ie.start.offset;for(let re of Fe.errors){let{offset:oe}=re.span.start;if(Oe<oe&&oe<Z){X=[re];break}}G[z]=V(Y)||Y}}}}if(X.length>0){let{msg:E,span:{start:_,end:T}}=X[0];throw f(E,{start:{line:_.line+1,column:_.col+1},end:{line:T.line+1,column:T.col+1}})}let Q=E=>{let _=E.name.startsWith(":")?E.name.slice(1).split(":")[0]:null,T=E.nameSpan.toString(),x=_!==null&&T.startsWith(`${_}:`),$=x?T.slice(_.length+1):T;E.name=$,E.namespace=_,E.hasExplicitNamespace=x},H=E=>{switch(E.type){case"element":Q(E);for(let _ of E.attrs)Q(_),_.valueSpan?(_.value=_.valueSpan.toString(),/["']/.test(_.value[0])&&(_.value=_.value.slice(1,-1))):_.value=null;break;case"comment":E.value=E.sourceSpan.toString().slice(4,-3);break;case"text":E.value=E.sourceSpan.toString();break}},W=(E,_)=>{let T=E.toLowerCase();return _(T)?T:E},K=E=>{if(E.type==="element"&&(k&&(!E.namespace||E.namespace===E.tagDefinition.implicitNamespacePrefix||l(E))&&(E.name=W(E.name,_=>_ in v)),j)){let _=i[E.name]||Object.create(null);for(let T of E.attrs)T.namespace||(T.name=W(T.name,x=>E.name in i&&(x in i["*"]||x in _)))}},J=E=>{E.sourceSpan&&E.endSourceSpan&&(E.sourceSpan=new q(E.sourceSpan.start,E.endSourceSpan.end))},S=E=>{if(E.type==="element"){let _=P(t?E.name:E.name.toLowerCase());!E.namespace||E.namespace===_.implicitNamespacePrefix||l(E)?E.tagDefinition=_:E.tagDefinition=P("")}};return A(new class extends h{visit(E){H(E),S(E),K(E),J(E)}},G),G}function F(b,M,R){let U=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,{frontMatter:k,content:j}=U?s(b):{frontMatter:null,content:b},L=new D(b,M.filepath),t=new n(L,0,0,0),o=t.moveBy(b.length),d={type:"root",sourceSpan:new u(t,o),children:O(j,R,M)};if(k){let q=new n(L,0,0,0),P=q.moveBy(k.raw.length);k.sourceSpan=new u(q,P),d.children.unshift(k)}let h=new m(d),A=(q,P)=>{let{offset:G}=P,X=b.slice(0,G).replace(/[^\n\r]/g," "),H=F(X+q,M,R,!1);H.sourceSpan=new u(P,a(H.children).sourceSpan.end);let W=H.children[0];return W.length===G?H.children.shift():(W.sourceSpan=new u(W.sourceSpan.start.moveBy(G),W.sourceSpan.end),W.value=W.value.slice(G)),H};return h.walk(q=>{if(q.type==="comment"){let P=C(q,A);P&&q.parent.replaceChild(q,P)}}),h}function w(){let{name:b,canSelfClose:M=!1,normalizeTagName:R=!1,normalizeAttributeName:U=!1,allowHtmComponentClosingTags:k=!1,isTagNameCaseSensitive:j=!1,getTagContentType:L}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{parse:(t,o,d)=>F(t,Object.assign({parser:b},d),{canSelfClose:M,normalizeTagName:R,normalizeAttributeName:U,allowHtmComponentClosingTags:k,isTagNameCaseSensitive:j,getTagContentType:L}),hasPragma:p,astFormat:"html",locStart:g,locEnd:B}}r.exports={parsers:{html:w({name:"html",canSelfClose:!0,normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0}),angular:w({name:"angular",canSelfClose:!0}),vue:w({name:"vue",canSelfClose:!0,isTagNameCaseSensitive:!0,getTagContentType:(b,M,R,U)=>{if(b.toLowerCase()!=="html"&&!R&&(b!=="template"||U.some(k=>{let{name:j,value:L}=k;return j==="lang"&&L!=="html"&&L!==""&&L!==void 0})))return ss().TagContentType.RAW_TEXT}}),lwc:w({name:"lwc"})}}}}),_2=jl();export{_2 as default};
