!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e.prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.html=t())}(this,function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n0){for(var r=0;r<~]))"].join("|");return new RegExp(e,"g")}}),b=C(function(e){e.exports=function(e){return!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141))}});C(function(e){e.exports=function(e){if("string"!=typeof e||0===e.length)return 0;var t;e="string"==typeof(t=e)?t.replace(E(),""):t;for(var n=0,i=0;i=127&&r<=159||(r>=768&&r<=879||(r>65535&&i++,n+=b(r)?2:1))}return n}});function A(e){return function(t,n,i){var r=i&&i.backwards;if(!1===n)return!1;for(var a=t.length,o=n;o>=0&&o"],["||","??"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(e,t){e.forEach(function(e){x[e]=t})});var P={};function N(e,t,n,i){for(var r=[e];0!==r.length;){var a=r.pop();if(a!==P){var o=!0;if(t&&!1===t(a)&&(o=!1),n&&(r.push(a),r.push(P)),o)if("concat"===a.type||"fill"===a.type)for(var s=a.parts.length-1;s>=0;--s)r.push(a.parts[s]);else if("if-break"===a.type)a.flatContents&&r.push(a.flatContents),a.breakContents&&r.push(a.breakContents);else if("group"===a.type&&a.expandedStates)if(i)for(var c=a.expandedStates.length-1;c>=0;--c)r.push(a.expandedStates[c]);else r.push(a.contents);else a.contents&&r.push(a.contents)}else n(r.pop())}}function w(e,t){if("concat"===e.type||"fill"===e.type){var n=e.parts.map(function(e){return w(e,t)});return t(Object.assign({},e,{parts:n}))}if("if-break"===e.type){var i=e.breakContents&&w(e.breakContents,t),r=e.flatContents&&w(e.flatContents,t);return t(Object.assign({},e,{breakContents:i,flatContents:r}))}if(e.contents){var a=w(e.contents,t);return t(Object.assign({},e,{contents:a}))}return t(e)}function O(e,t,n){var i=n,r=!1;return N(e,function(e){var n=t(e);if(void 0!==n&&(r=!0,i=n),r)return!1}),i}function R(e){return"string"!=typeof e&&("line"===e.type||void 0)}function D(e){return!("group"!==e.type||!e.break)||(!("line"!==e.type||!e.hard)||("break-parent"===e.type||void 0))}function $(e){if(e.length>0){var t=e[e.length-1];t.expandedStates||(t.break=!0)}return null}function I(e){return"line"!==e.type||e.hard?"if-break"===e.type?e.flatContents||"":e:e.soft?"":" "}var L=S,M={isEmpty:function(e){return"string"==typeof e&&0===e.length},willBreak:function(e){return O(e,D,!1)},isLineNext:function(e){return O(e,R,!1)},traverseDoc:N,mapDoc:w,propagateBreaks:function(e){var t=new Set,n=[];N(e,function(e){if("break-parent"===e.type&&$(n),"group"===e.type){if(n.push(e),t.has(e))return!1;t.add(e)}},function(e){"group"===e.type&&n.pop().break&&$(n)},!0)},removeLines:function(e){return w(e,I)},stripTrailingHardline:function e(t){if("concat"===t.type&&0!==t.parts.length){var n=t.parts[t.parts.length-1];if("concat"===n.type)return 2===n.parts.length&&n.parts[0].hard&&"break-parent"===n.parts[1].type?{type:"concat",parts:t.parts.slice(0,-1)}:{type:"concat",parts:t.parts.slice(0,-1).concat(e(n))}}return t}},F=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"],B=Object.freeze({default:F}),U=["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","tabindex","target","type"],X=["title"],j=["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"],q=["accesskey","alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","tabindex","target","type"],V=["autoplay","controls","crossorigin","loop","muted","preload","src"],z=["href","target"],W=["color","face","size"],G=["dir"],H=["cite"],Q=["alink","background","bgcolor","link","text","vlink"],K=["clear"],Y=["accesskey","autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","tabindex","type","value"],Z=["height","width"],J=["align"],ee=["align","char","charoff","span","valign","width"],te=["align","char","charoff","span","valign","width"],ne=["value"],ie=["cite","datetime"],re=["open"],ae=["title"],oe=["open"],se=["compact"],ce=["align"],ue=["compact"],le=["height","src","type","width"],he=["disabled","form","name"],pe=["color","face","size"],fe=["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],de=["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"],me=["cols","rows"],ve=["align"],_e=["align"],ye=["align"],ge=["align"],Te=["align"],Se=["align"],ke=["profile"],Ce=["align","noshade","size","width"],Ee=["manifest","version"],be=["align","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"],Ae=["align","alt","border","crossorigin","decoding","height","hspace","ismap","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"],xe=["accept","accesskey","align","alt","autocomplete","autofocus","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","tabindex","title","type","usemap","value","width"],Pe=["cite","datetime"],Ne=["prompt"],we=["accesskey","for","form"],Oe=["accesskey","align"],Re=["type","value"],De=["as","charset","color","crossorigin","href","hreflang","integrity","media","nonce","referrerpolicy","rel","rev","sizes","target","title","type"],$e=["name"],Ie=["compact"],Le=["charset","content","http-equiv","name","scheme"],Me=["high","low","max","min","optimum","value"],Fe=["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","tabindex","type","typemustmatch","usemap","vspace","width"],Be=["compact","reversed","start","type"],Ue=["disabled","label"],Xe=["disabled","label","selected","value"],je=["for","form","name"],qe=["align"],Ve=["name","type","value","valuetype"],ze=["width"],We=["max","value"],Ge=["cite"],He=["async","charset","crossorigin","defer","integrity","language","nomodule","nonce","referrerpolicy","src","type"],Qe=["autocomplete","autofocus","disabled","form","multiple","name","required","size","tabindex"],Ke=["name"],Ye=["media","sizes","src","srcset","type"],Ze=["media","nonce","title","type"],Je=["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],et=["align","char","charoff","valign"],tt=["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],nt=["accesskey","autocomplete","autofocus","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","tabindex","wrap"],it=["align","char","charoff","valign"],rt=["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],at=["align","char","charoff","valign"],ot=["datetime"],st=["align","bgcolor","char","charoff","valign"],ct=["default","kind","label","src","srclang"],ut=["compact","type"],lt=["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"],ht={a:U,abbr:X,applet:j,area:q,audio:V,base:z,basefont:W,bdo:G,blockquote:H,body:Q,br:K,button:Y,canvas:Z,caption:J,col:ee,colgroup:te,data:ne,del:ie,details:re,dfn:ae,dialog:oe,dir:se,div:ce,dl:ue,embed:le,fieldset:he,font:pe,form:fe,frame:de,frameset:me,h1:ve,h2:_e,h3:ye,h4:ge,h5:Te,h6:Se,head:ke,hr:Ce,html:Ee,iframe:be,img:Ae,input:xe,ins:Pe,isindex:Ne,label:we,legend:Oe,li:Re,link:De,map:$e,menu:Ie,meta:Le,meter:Me,object:Fe,ol:Be,optgroup:Ue,option:Xe,output:je,p:qe,param:Ve,pre:ze,progress:We,q:Ge,script:He,select:Qe,slot:Ke,source:Ye,style:Ze,table:Je,tbody:et,td:tt,textarea:nt,tfoot:it,th:rt,thead:at,time:ot,tr:st,track:ct,ul:ut,video:lt,"*":["accesskey","autocapitalize","class","contenteditable","dir","draggable","hidden","id","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","slot","spellcheck","style","tabindex","title","translate"]},pt=Object.freeze({a:U,abbr:X,applet:j,area:q,audio:V,base:z,basefont:W,bdo:G,blockquote:H,body:Q,br:K,button:Y,canvas:Z,caption:J,col:ee,colgroup:te,data:ne,del:ie,details:re,dfn:ae,dialog:oe,dir:se,div:ce,dl:ue,embed:le,fieldset:he,font:pe,form:fe,frame:de,frameset:me,h1:ve,h2:_e,h3:ye,h4:ge,h5:Te,h6:Se,head:ke,hr:Ce,html:Ee,iframe:be,img:Ae,input:xe,ins:Pe,isindex:Ne,label:we,legend:Oe,li:Re,link:De,map:$e,menu:Ie,meta:Le,meter:Me,object:Fe,ol:Be,optgroup:Ue,option:Xe,output:je,p:qe,param:Ve,pre:ze,progress:We,q:Ge,script:He,select:Qe,slot:Ke,source:Ye,style:Ze,table:Je,tbody:et,td:tt,textarea:nt,tfoot:it,th:rt,thead:at,time:ot,tr:st,track:ct,ul:ut,video:lt,default:ht});const ft={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"none",rp:"none",script:"none",source:"block",style:"none",template:"inline",track:"block",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",fieldset:"block",button:"inline-block",video:"inline-block",audio:"inline-block"},dt="inline",mt={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"},vt="normal";var _t=B&&F||B,yt=pt&&ht||pt,gt=L.concat,Tt=M.mapDoc,St=ft,kt=dt,Ct=mt,Et=vt,bt=At(_t);function At(e){var t=Object.create(null),n=!0,i=!1,r=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){t[a.value]=!0}}catch(e){i=!0,r=e}finally{try{n||null==o.return||o.return()}finally{if(i)throw r}}return t}function xt(e){return!("element"!==e.type||"template"!==e.fullName||!e.attrMap.lang||"html"===e.attrMap.lang)||(!("ieConditionalComment"!==e.type||!e.lastChild||e.lastChild.isSelfClosing||e.lastChild.endSourceSpan)||("ieConditionalComment"===e.type&&!e.complete||!(!Ft(e)||!e.children.some(function(e){return"text"!==e.type&&"interpolation"!==e.type}))))}function Pt(e){return"attribute"!==e.type&&"text"!==e.type&&(!!e.parent&&("number"==typeof e.index&&0!==e.index&&function(e){return"comment"===e.type&&"prettier-ignore"===e.value.trim()}(e.parent.children[e.index-1])))}function Nt(e){return"element"===e.type&&("script"===e.fullName||"style"===e.fullName||"svg:style"===e.fullName)}function wt(e){return"yaml"===e.type||"toml"===e.type}function Ot(e){return Bt(e).startsWith("pre")}function Rt(e,t){return e.split(/(\n)/g).map(function(e,n){return n%2==1?t:e})}function Dt(e){return"element"===e.type&&0!==e.children.length&&(-1!==["html","head","ul","ol","select"].indexOf(e.name)||e.cssDisplay.startsWith("table")&&"table-cell"!==e.cssDisplay)}function $t(e){return Lt(e)||"element"===e.type&&"br"===e.fullName||It(e)}function It(e){return function(e){return"element"===e.type&&!e.namespace&&(e.name.includes("-")||/[A-Z]/.test(e.name[0]))}(e)&&function(e){return function(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.linee.sourceSpan.end.line:"root"===e.parent.type||e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}(e)}(e)}function Lt(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return-1!==["script","select"].indexOf(e.name)}return!1}function Mt(e){return"block"===e||"list-item"===e||e.startsWith("table")}function Ft(e){return Bt(e).startsWith("pre")}function Bt(e){return"element"===e.type&&!e.namespace&&Ct[e.name]||Et}function Ut(e){var t=1/0,n=!0,i=!1,r=void 0;try{for(var a,o=e.split("\n")[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;if(0!==s.length){if(/\S/.test(s[0]))return 0;var c=s.match(/^\s*/)[0].length;s.length!==c&&c1&&void 0!==arguments[1]?arguments[1]:Ut(e);return 0===t?e:e.split("\n").map(function(e){return e.slice(t)}).join("\n")}var jt={HTML_ELEMENT_ATTRIBUTES:function(e,t){for(var n=Object.create(null),i=Object.keys(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:function(){return!0},i=0,r=t.stack.length-1;r>=0;r--){var a=t.stack[r];a&&"object"===e(a)&&!Array.isArray(a)&&n(a)&&i++}return i},dedentString:Xt,forceBreakChildren:Dt,forceBreakContent:function(e){return Dt(e)||"element"===e.type&&0!==e.children.length&&(-1!==["body","template","script","style"].indexOf(e.name)||e.children.some(function(e){return(t=e).children&&t.children.some(function(e){return"text"!==e.type});var t}))},forceNextEmptyLine:function(e){return wt(e)||e.next&&e.sourceSpan.end.line+1=o?Xt(" ".repeat(o)+t.slice(a)):t.slice(0,n).trim()+"\n"+Xt(i,r)},getLastDescendant:function e(t){return t.lastChild?e(t.lastChild):t},getNodeCssStyleDisplay:function(e,t){if(e.prev&&"comment"===e.prev.type){var n=e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);if(n)return n[1]}var i=!1;if("element"===e.type&&"svg"===e.namespace){if(!function(e,t){for(var n=e;n;){if(t(n))return!0;n=n.parent}return!1}(e,function(e){return"svg:foreignObject"===e.fullName}))return"svg"===e.name?"inline-block":"block";i=!0}switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return"element"===e.type&&(!e.namespace||i)&&St[e.name]||kt}},getNodeCssStyleWhiteSpace:Bt,getPrettierIgnoreAttributeCommentData:function(e){var t=e.trim().match(/^prettier-ignore-attribute(?:\s+([^]+))?$/);return!!t&&(!t[1]||t[1].split(/\s+/))},hasPrettierIgnore:Pt,identity:function(e){return e},inferScriptParser:function(e){if("script"===e.name&&!e.attrMap.src){if(!e.attrMap.lang&&!e.attrMap.type||"module"===e.attrMap.type||"text/javascript"===e.attrMap.type||"text/babel"===e.attrMap.type||"application/javascript"===e.attrMap.type)return"babylon";if("application/x-typescript"===e.attrMap.type||"ts"===e.attrMap.lang||"tsx"===e.attrMap.lang)return"typescript";if("text/markdown"===e.attrMap.type)return"markdown"}if("style"===e.name){if(!e.attrMap.lang||"postcss"===e.attrMap.lang)return"css";if("scss"===e.attrMap.lang)return"scss";if("less"===e.attrMap.lang)return"less"}return null},isDanglingSpaceSensitiveNode:function(e){return!Mt(t=e.cssDisplay)&&"inline-block"!==t&&!Nt(e);var t},isFrontMatterNode:wt,isIndentationSensitiveNode:Ot,isLeadingSpaceSensitiveNode:function(e){return!(wt(e)||("text"!==e.type&&"interpolation"!==e.type||!e.prev||"text"!==e.prev.type&&"interpolation"!==e.prev.type)&&(!e.parent||"none"===e.parent.cssDisplay||!e.prev&&"element"===e.parent.type&&e.parent.tagDefinition.ignoreFirstLf||!Ft(e.parent)&&(!e.prev&&("root"===e.parent.type||Nt(e.parent)||(t=e.parent.cssDisplay,Mt(t)||"inline-block"===t))||e.prev&&!function(e){return!Mt(e)}(e.prev.cssDisplay))));var t},isPreLikeNode:Ft,isScriptLikeTag:Nt,isTrailingSpaceSensitiveNode:function(e){return!(wt(e)||("text"!==e.type&&"interpolation"!==e.type||!e.next||"text"!==e.next.type&&"interpolation"!==e.next.type)&&(!e.parent||"none"===e.parent.cssDisplay||!Ft(e.parent)&&(!e.next&&("root"===e.parent.type||Nt(e.parent)||(t=e.parent.cssDisplay,Mt(t)||"inline-block"===t))||e.next&&!function(e){return!Mt(e)}(e.next.cssDisplay))));var t},isWhitespaceSensitiveNode:function(e){return Nt(e)||"interpolation"===e.type||Ot(e)},normalizeParts:function(e){for(var t=[],n=e.slice();0!==n.length;){var i=n.shift();i&&("concat"!==i.type?0===t.length||"string"!=typeof t[t.length-1]||"string"!=typeof i?t.push(i):t.push(t.pop()+i):Array.prototype.unshift.apply(n,i.parts))}return t},preferHardlineAsLeadingSpaces:function(e){return Lt(e)||e.prev&&$t(e.prev)||It(e)},preferHardlineAsTrailingSpaces:$t,replaceDocNewlines:function(e,t){return Tt(e,function(e){return"string"==typeof e&&e.includes("\n")?gt(Rt(e,t)):e})},replaceNewlines:Rt,shouldNotPrintClosingTag:function(e){return!e.isSelfClosing&&!e.endSourceSpan&&(Pt(e)||xt(e.parent))},shouldPreserveContent:xt};var qt=function(e){return/^\s*/.test(e)};var Vt=function(e,t){var n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n},zt={attrs:!0,children:!0},Wt=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e);for(var i=Object.keys(n),r=0;r",harr:"↔",hArr:"⇔",hearts:"♥",hellip:"…",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",image:"ℑ",infin:"∞",int:"∫",Iota:"Ι",iota:"ι",iquest:"¿",isin:"∈",Iuml:"Ï",iuml:"ï",Kappa:"Κ",kappa:"κ",Lambda:"Λ",lambda:"λ",lang:"⟨",laquo:"«",larr:"←",lArr:"⇐",lceil:"⌈",ldquo:"“",le:"≤",lfloor:"⌊",lowast:"∗",loz:"◊",lrm:"‎",lsaquo:"‹",lsquo:"‘",lt:"<",macr:"¯",mdash:"—",micro:"µ",middot:"·",minus:"−",Mu:"Μ",mu:"μ",nabla:"∇",nbsp:" ",ndash:"–",ne:"≠",ni:"∋",not:"¬",notin:"∉",nsub:"⊄",Ntilde:"Ñ",ntilde:"ñ",Nu:"Ν",nu:"ν",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",OElig:"Œ",oelig:"œ",Ograve:"Ò",ograve:"ò",oline:"‾",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",oplus:"⊕",or:"∨",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",otimes:"⊗",Ouml:"Ö",ouml:"ö",para:"¶",permil:"‰",perp:"⊥",Phi:"Φ",phi:"φ",Pi:"Π",pi:"π",piv:"ϖ",plusmn:"±",pound:"£",prime:"′",Prime:"″",prod:"∏",prop:"∝",Psi:"Ψ",psi:"ψ",quot:'"',radic:"√",rang:"⟩",raquo:"»",rarr:"→",rArr:"⇒",rceil:"⌉",rdquo:"”",real:"ℜ",reg:"®",rfloor:"⌋",Rho:"Ρ",rho:"ρ",rlm:"‏",rsaquo:"›",rsquo:"’",sbquo:"‚",Scaron:"Š",scaron:"š",sdot:"⋅",sect:"§",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sim:"∼",spades:"♠",sub:"⊂",sube:"⊆",sum:"∑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supe:"⊇",szlig:"ß",Tau:"Τ",tau:"τ",there4:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thinsp:" ",THORN:"Þ",thorn:"þ",tilde:"˜",times:"×",trade:"™",Uacute:"Ú",uacute:"ú",uarr:"↑",uArr:"⇑",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",Uuml:"Ü",uuml:"ü",weierp:"℘",Xi:"Ξ",xi:"ξ",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ",Yuml:"Ÿ",Zeta:"Ζ",zeta:"ζ",zwj:"‍",zwnj:"‌"},t.NGSP_UNICODE="",t.NAMED_ENTITIES.ngsp=t.NGSP_UNICODE});k(Kt);var Yt=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var r,a,o=function(){function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=i.closedByChildren,a=i.requiredParents,o=i.implicitNamespacePrefix,s=i.contentType,c=void 0===s?Kt.TagContentType.PARSABLE_DATA:s,u=i.closedByParent,l=void 0!==u&&u,h=i.isVoid,p=void 0!==h&&h,f=i.ignoreFirstLf,d=void 0!==f&&f;t(this,e),this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,r&&r.length>0&&r.forEach(function(e){return n.closedByChildren[e]=!0}),this.isVoid=p,this.closedByParent=l||p,a&&a.length>0&&(this.requiredParents={},this.parentToAdd=a[0],a.forEach(function(e){return n.requiredParents[e]=!0})),this.implicitNamespacePrefix=o||null,this.contentType=c,this.ignoreFirstLf=d}return i(e,[{key:"requireExtraParent",value:function(e){if(!this.requiredParents)return!1;if(!e)return!0;var t=e.toLowerCase();return!("template"===t||"ng-template"===e)&&1!=this.requiredParents[t]}},{key:"isClosedByChild",value:function(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}]),e}();n.HtmlTagDefinition=o,n.getHtmlTagDefinition=function(e){return a||(r=new o,a={base:new o({isVoid:!0}),meta:new o({isVoid:!0}),area:new o({isVoid:!0}),embed:new o({isVoid:!0}),link:new o({isVoid:!0}),img:new o({isVoid:!0}),input:new o({isVoid:!0}),param:new o({isVoid:!0}),hr:new o({isVoid:!0}),br:new o({isVoid:!0}),source:new o({isVoid:!0}),track:new o({isVoid:!0}),wbr:new o({isVoid:!0}),p:new o({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new o({closedByChildren:["tbody","tfoot"]}),tbody:new o({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new o({closedByChildren:["tbody"],closedByParent:!0}),tr:new o({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new o({closedByChildren:["td","th"],closedByParent:!0}),th:new o({closedByChildren:["td","th"],closedByParent:!0}),col:new o({requiredParents:["colgroup"],isVoid:!0}),svg:new o({implicitNamespacePrefix:"svg"}),math:new o({implicitNamespacePrefix:"math"}),li:new o({closedByChildren:["li"],closedByParent:!0}),dt:new o({closedByChildren:["dt","dd"]}),dd:new o({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new o({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new o({closedByChildren:["optgroup"],closedByParent:!0}),option:new o({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new o({ignoreFirstLf:!0}),listing:new o({ignoreFirstLf:!0}),style:new o({contentType:Kt.TagContentType.RAW_TEXT}),script:new o({contentType:Kt.TagContentType.RAW_TEXT}),title:new o({contentType:Kt.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new o({contentType:Kt.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),a[e.toLowerCase()]||r}});k(Yt);var Zt=C(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.assertArrayOfStrings=function(e,t){if(null!=t){if(!Array.isArray(t))throw new Error("Expected '".concat(e,"' to be an array of strings."));for(var n=0;n]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];t.assertInterpolationSymbols=function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected '".concat(e,"' to be an array, [start, end]."));if(null!=t){var i=t[0],r=t[1];n.forEach(function(e){if(e.test(i)||e.test(r))throw new Error("['".concat(i,"', '").concat(r,"'] contains unusable interpolation symbol."))})}}});k(Zt);var Jt=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(n,i){t(this,e),this.start=n,this.end=i}return i(e,null,[{key:"fromArray",value:function(t){return t?(Zt.assertInterpolationSymbols("interpolation",t),new e(t[0],t[1])):n.DEFAULT_INTERPOLATION_CONFIG}}]),e}();n.InterpolationConfig=r,n.DEFAULT_INTERPOLATION_CONFIG=new r("{{","}}")});k(Jt);var en=C(function(e,t){function n(e){return t.$0<=e&&e<=t.$9}Object.defineProperty(t,"__esModule",{value:!0}),t.$EOF=0,t.$TAB=9,t.$LF=10,t.$VTAB=11,t.$FF=12,t.$CR=13,t.$SPACE=32,t.$BANG=33,t.$DQ=34,t.$HASH=35,t.$$=36,t.$PERCENT=37,t.$AMPERSAND=38,t.$SQ=39,t.$LPAREN=40,t.$RPAREN=41,t.$STAR=42,t.$PLUS=43,t.$COMMA=44,t.$MINUS=45,t.$PERIOD=46,t.$SLASH=47,t.$COLON=58,t.$SEMICOLON=59,t.$LT=60,t.$EQ=61,t.$GT=62,t.$QUESTION=63,t.$0=48,t.$9=57,t.$A=65,t.$E=69,t.$F=70,t.$X=88,t.$Z=90,t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93,t.$CARET=94,t.$_=95,t.$a=97,t.$e=101,t.$f=102,t.$n=110,t.$r=114,t.$t=116,t.$u=117,t.$v=118,t.$x=120,t.$z=122,t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125,t.$NBSP=160,t.$PIPE=124,t.$TILDA=126,t.$AT=64,t.$BT=96,t.isWhitespace=function(e){return e>=t.$TAB&&e<=t.$SPACE||e==t.$NBSP},t.isDigit=n,t.isAsciiLetter=function(e){return e>=t.$a&&e<=t.$z||e>=t.$A&&e<=t.$Z},t.isAsciiHexDigit=function(e){return e>=t.$a&&e<=t.$f||e>=t.$A&&e<=t.$F||n(e)}});k(en);var tn=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(n,i,r){t(this,e),this.filePath=n,this.name=i,this.members=r}return i(e,[{key:"assertNoMembers",value:function(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got ".concat(JSON.stringify(this),"."))}}]),e}();n.StaticSymbol=r;var a=function(){function e(){t(this,e),this.cache=new Map}return i(e,[{key:"get",value:function(e,t,n){var i=(n=n||[]).length?".".concat(n.join(".")):"",a='"'.concat(e,'".').concat(t).concat(i),o=this.cache.get(a);return o||(o=new r(e,t,n),this.cache.set(a,o)),o}}]),e}();n.StaticSymbolCache=a});k(tn);var nn=C(function(n,r){Object.defineProperty(r,"__esModule",{value:!0});var a=/-+([a-z0-9])/g;function o(e,t,n){var i=e.indexOf(t);return-1==i?n:[e.slice(0,i).trim(),e.slice(i+1).trim()]}function s(t,n,i){return Array.isArray(t)?n.visitArray(t,i):"object"===e(r=t)&&null!==r&&Object.getPrototypeOf(r)===h?n.visitStringMap(t,i):null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t?n.visitPrimitive(t,i):n.visitOther(t,i);var r}r.dashCaseToCamelCase=function(e){return e.replace(a,function(){for(var e=arguments.length,t=new Array(e),n=0;n=55296&&i<=56319&&e.length>n+1){var r=e.charCodeAt(n+1);r>=56320&&r<=57343&&(n++,i=(i-55296<<10)+r-56320+65536)}i<=127?t+=String.fromCharCode(i):i<=2047?t+=String.fromCharCode(i>>6&31|192,63&i|128):i<=65535?t+=String.fromCharCode(i>>12|224,i>>6&63|128,63&i|128):i<=2097151&&(t+=String.fromCharCode(i>>18&7|240,i>>12&63|128,i>>6&63|128,63&i|128))}return t},r.stringify=function e(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(e).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return"".concat(t.overriddenName);if(t.name)return"".concat(t.name);var n=t.toString();if(null==n)return""+n;var i=n.indexOf("\n");return-1===i?n:n.substring(0,i)},r.resolveForwardRef=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e},r.isPromise=p;r.Version=function e(n){t(this,e),this.full=n;var i=n.split(".");this.major=i[0],this.minor=i[1],this.patch=i.slice(2).join(".")}});k(nn);var rn=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function a(e){return e.replace(/\W/g,"_")}n.sanitizeIdentifier=a;var o,s=0;function c(e){if(!e||!e.reference)return null;var t=e.reference;if(t instanceof tn.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;var n=nn.stringify(t);return n.indexOf("(")>=0?(n="anonymous_".concat(s++),t.__anonymousType=n):n=a(n),n}n.identifierName=c,n.identifierModuleUrl=function(e){var t=e.reference;return t instanceof tn.StaticSymbol?t.filePath:"./".concat(nn.stringify(t))},n.viewClassName=function(e,t){return"View_".concat(c({reference:e}),"_").concat(t)},n.rendererTypeName=function(e){return"RenderType_".concat(c({reference:e}))},n.hostViewClassName=function(e){return"HostView_".concat(c({reference:e}))},n.componentFactoryName=function(e){return"".concat(c({reference:e}),"NgFactory")},function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(o=n.CompileSummaryKind||(n.CompileSummaryKind={})),n.tokenName=function(e){return null!=e.value?a(e.value):c(e.identifier)},n.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value};n.CompileStylesheetMetadata=function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.moduleUrl,r=n.styles,a=n.styleUrls;t(this,e),this.moduleUrl=i||null,this.styles=d(r),this.styleUrls=d(a)};var u=function(){function e(n){var i=n.encapsulation,r=n.template,a=n.templateUrl,o=n.htmlAst,s=n.styles,c=n.styleUrls,u=n.externalStylesheets,l=n.animations,h=n.ngContentSelectors,p=n.interpolation,f=n.isInline,v=n.preserveWhitespaces;if(t(this,e),this.encapsulation=i,this.template=r,this.templateUrl=a,this.htmlAst=o,this.styles=d(s),this.styleUrls=d(c),this.externalStylesheets=d(u),this.animations=l?m(l):[],this.ngContentSelectors=h||[],p&&2!=p.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=p,this.isInline=f,this.preserveWhitespaces=v}return i(e,[{key:"toSummary",value:function(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}}]),e}();n.CompileTemplateMetadata=u;var l=function(){function e(n){var i=n.isHost,r=n.type,a=n.isComponent,o=n.selector,s=n.exportAs,c=n.changeDetection,u=n.inputs,l=n.outputs,h=n.hostListeners,p=n.hostProperties,f=n.hostAttributes,m=n.providers,v=n.viewProviders,_=n.queries,y=n.guards,g=n.viewQueries,T=n.entryComponents,S=n.template,k=n.componentViewType,C=n.rendererType,E=n.componentFactory;t(this,e),this.isHost=!!i,this.type=r,this.isComponent=a,this.selector=o,this.exportAs=s,this.changeDetection=c,this.inputs=u,this.outputs=l,this.hostListeners=h,this.hostProperties=p,this.hostAttributes=f,this.providers=d(m),this.viewProviders=d(v),this.queries=d(_),this.guards=y,this.viewQueries=d(g),this.entryComponents=d(T),this.template=S,this.componentViewType=k,this.rendererType=C,this.componentFactory=E}return i(e,null,[{key:"create",value:function(t){var n=t.isHost,i=t.type,a=t.isComponent,o=t.selector,s=t.exportAs,c=t.changeDetection,u=t.inputs,l=t.outputs,h=t.host,p=t.providers,f=t.viewProviders,d=t.queries,m=t.guards,v=t.viewQueries,_=t.entryComponents,y=t.template,g=t.componentViewType,T=t.rendererType,S=t.componentFactory,k={},C={},E={};null!=h&&Object.keys(h).forEach(function(e){var t=h[e],n=e.match(r);null===n?E[e]=t:null!=n[1]?C[n[1]]=t:null!=n[2]&&(k[n[2]]=t)});var b={};null!=u&&u.forEach(function(e){var t=nn.splitAtColon(e,[e,e]);b[t[0]]=t[1]});var A={};return null!=l&&l.forEach(function(e){var t=nn.splitAtColon(e,[e,e]);A[t[0]]=t[1]}),new e({isHost:n,type:i,isComponent:!!a,selector:o,exportAs:s,changeDetection:c,inputs:b,outputs:A,hostListeners:k,hostProperties:C,hostAttributes:E,providers:p,viewProviders:f,queries:d,guards:m,viewQueries:v,entryComponents:_,template:y,componentViewType:g,rendererType:T,componentFactory:S})}}]),i(e,[{key:"toSummary",value:function(){return{summaryKind:o.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.viewQueries,entryComponents:this.entryComponents,changeDetection:this.changeDetection,template:this.template&&this.template.toSummary(),componentViewType:this.componentViewType,rendererType:this.rendererType,componentFactory:this.componentFactory}}}]),e}();n.CompileDirectiveMetadata=l;var h=function(){function e(n){var i=n.type,r=n.name,a=n.pure;t(this,e),this.type=i,this.name=r,this.pure=!!a}return i(e,[{key:"toSummary",value:function(){return{summaryKind:o.Pipe,type:this.type,name:this.name,pure:this.pure}}}]),e}();n.CompilePipeMetadata=h;n.CompileShallowModuleMetadata=function e(){t(this,e)};var p=function(){function e(n){var i=n.type,r=n.providers,a=n.declaredDirectives,o=n.exportedDirectives,s=n.declaredPipes,c=n.exportedPipes,u=n.entryComponents,l=n.bootstrapComponents,h=n.importedModules,p=n.exportedModules,f=n.schemas,m=n.transitiveModule,v=n.id;t(this,e),this.type=i||null,this.declaredDirectives=d(a),this.exportedDirectives=d(o),this.declaredPipes=d(s),this.exportedPipes=d(c),this.providers=d(r),this.entryComponents=d(u),this.bootstrapComponents=d(l),this.importedModules=d(h),this.exportedModules=d(p),this.schemas=d(f),this.id=v||null,this.transitiveModule=m||null}return i(e,[{key:"toSummary",value:function(){var e=this.transitiveModule;return{summaryKind:o.NgModule,type:this.type,entryComponents:e.entryComponents,providers:e.providers,modules:e.modules,exportedDirectives:e.exportedDirectives,exportedPipes:e.exportedPipes}}}]),e}();n.CompileNgModuleMetadata=p;var f=function(){function e(){t(this,e),this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}return i(e,[{key:"addProvider",value:function(e,t){this.providers.push({provider:e,module:t})}},{key:"addDirective",value:function(e){this.directivesSet.has(e.reference)||(this.directivesSet.add(e.reference),this.directives.push(e))}},{key:"addExportedDirective",value:function(e){this.exportedDirectivesSet.has(e.reference)||(this.exportedDirectivesSet.add(e.reference),this.exportedDirectives.push(e))}},{key:"addPipe",value:function(e){this.pipesSet.has(e.reference)||(this.pipesSet.add(e.reference),this.pipes.push(e))}},{key:"addExportedPipe",value:function(e){this.exportedPipesSet.has(e.reference)||(this.exportedPipesSet.add(e.reference),this.exportedPipes.push(e))}},{key:"addModule",value:function(e){this.modulesSet.has(e.reference)||(this.modulesSet.add(e.reference),this.modules.push(e))}},{key:"addEntryComponent",value:function(e){this.entryComponentsSet.has(e.componentType)||(this.entryComponentsSet.add(e.componentType),this.entryComponents.push(e))}}]),e}();function d(e){return e||[]}n.TransitiveCompileNgModuleMetadata=f;function m(e){return e.reduce(function(e,t){var n=Array.isArray(t)?m(t):t;return e.concat(n)},[])}function v(e){return e.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}n.ProviderMeta=function e(n,i){var r=i.useClass,a=i.useValue,o=i.useExisting,s=i.useFactory,c=i.deps,u=i.multi;t(this,e),this.token=n,this.useClass=r||null,this.useValue=a,this.useExisting=o,this.useFactory=s||null,this.dependencies=c||null,this.multi=!!u},n.flatten=m,n.templateSourceUrl=function(e,t,n){var i;return i=n.isInline?t.type.reference instanceof tn.StaticSymbol?"".concat(t.type.reference.filePath,".").concat(t.type.reference.name,".html"):"".concat(c(e),"/").concat(c(t.type),".html"):n.templateUrl,t.type.reference instanceof tn.StaticSymbol?i:v(i)},n.sharedStylesheetJitUrl=function(e,t){var n=e.moduleUrl.split(/\/\\/g),i=n[n.length-1];return v("css/".concat(t).concat(i,".ngstyle.js"))},n.ngModuleJitUrl=function(e){return v("".concat(c(e.type),"/module.ngfactory.js"))},n.templateJitUrl=function(e,t){return v("".concat(c(e),"/").concat(c(t.type),".ngfactory.js"))}});k(rn);var an=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(n,i,r,a){t(this,e),this.file=n,this.offset=i,this.line=r,this.col=a}return i(e,[{key:"toString",value:function(){return null!=this.offset?"".concat(this.file.url,"@").concat(this.line,":").concat(this.col):this.file.url}},{key:"moveBy",value:function(t){for(var n=this.file.content,i=n.length,r=this.offset,a=this.line,o=this.col;r>0&&t<0;){if(r--,t++,n.charCodeAt(r)==en.$LF){a--;var s=n.substr(0,r-1).lastIndexOf(String.fromCharCode(en.$LF));o=s>0?r-s:r}else o--}for(;r0;){var c=n.charCodeAt(r);r++,t--,c==en.$LF?(a++,o=0):o++}return new e(this.file,r,a,o)}},{key:"getContext",value:function(e,t){var n=this.file.content,i=this.offset;if(null!=i){i>n.length-1&&(i=n.length-1);for(var r=i,a=0,o=0;a0&&(a++,"\n"!=n[--i]||++o!=t););for(a=0,o=0;a2&&void 0!==arguments[2]?arguments[2]:null;t(this,e),this.start=n,this.end=i,this.details=r}return i(e,[{key:"toString",value:function(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}]),e}();n.ParseSourceSpan=s,function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(o=n.ParseErrorLevel||(n.ParseErrorLevel={}));var c=function(){function e(n,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.ERROR;t(this,e),this.span=n,this.msg=i,this.level=r}return i(e,[{key:"contextualMessage",value:function(){var e=this.span.start.getContext(100,3);return e?"".concat(this.msg,' ("').concat(e.before,"[").concat(o[this.level]," ->]").concat(e.after,'")'):this.msg}},{key:"toString",value:function(){var e=this.span.details?", ".concat(this.span.details):"";return"".concat(this.contextualMessage(),": ").concat(this.span.start).concat(e)}}]),e}();n.ParseError=c,n.typeSourceSpan=function(e,t){var n=rn.identifierModuleUrl(t),i=null!=n?"in ".concat(e," ").concat(rn.identifierName(t)," in ").concat(n):"in ".concat(e," ").concat(rn.identifierName(t)),o=new a("",i);return new s(new r(o,-1,-1,-1),new r(o,-1,-1,-1))}});k(an);var on=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t(this,e),this.path=n,this.position=i}return i(e,[{key:"parentOf",value:function(e){return e&&this.path[this.path.indexOf(e)-1]}},{key:"childOf",value:function(e){return this.path[this.path.indexOf(e)+1]}},{key:"first",value:function(e){for(var t=this.path.length-1;t>=0;t--){var n=this.path[t];if(n instanceof e)return n}}},{key:"push",value:function(e){this.path.push(e)}},{key:"pop",value:function(){return this.path.pop()}},{key:"empty",get:function(){return!this.path||!this.path.length}},{key:"head",get:function(){return this.path[0]}},{key:"tail",get:function(){return this.path[this.path.length-1]}}]),e}();n.AstPath=r});k(on);var sn=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(n,i){t(this,e),this.value=n,this.sourceSpan=i}return i(e,[{key:"visit",value:function(e,t){return e.visitText(this,t)}}]),e}();n.Text=o;var c=function(){function e(n,i){t(this,e),this.value=n,this.sourceSpan=i}return i(e,[{key:"visit",value:function(e,t){return e.visitCdata(this,t)}}]),e}();n.CDATA=c;var u=function(){function e(n,i,r,a,o){t(this,e),this.switchValue=n,this.type=i,this.cases=r,this.sourceSpan=a,this.switchValueSourceSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitExpansion(this,t)}}]),e}();n.Expansion=u;var l=function(){function e(n,i,r,a,o){t(this,e),this.value=n,this.expression=i,this.sourceSpan=r,this.valueSourceSpan=a,this.expSourceSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitExpansionCase(this,t)}}]),e}();n.ExpansionCase=l;var h=function(){function e(n,i,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;t(this,e),this.name=n,this.value=i,this.sourceSpan=r,this.valueSpan=a,this.nameSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitAttribute(this,t)}}]),e}();n.Attribute=h;var p=function(){function e(n,i,r,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;t(this,e),this.name=n,this.attrs=i,this.children=r,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=s,this.nameSpan=c}return i(e,[{key:"visit",value:function(e,t){return e.visitElement(this,t)}}]),e}();n.Element=p;var f=function(){function e(n,i){t(this,e),this.value=n,this.sourceSpan=i}return i(e,[{key:"visit",value:function(e,t){return e.visitComment(this,t)}}]),e}();n.Comment=f;var d=function(){function e(n,i){t(this,e),this.value=n,this.sourceSpan=i}return i(e,[{key:"visit",value:function(e,t){return e.visitDocType(this,t)}}]),e}();function m(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=[],r=e.visit?function(t){return e.visit(t,n)||t.visit(e,n)}:function(t){return t.visit(e,n)};return t.forEach(function(e){var t=r(e);t&&i.push(t)}),i}n.DocType=d,n.visitAll=m;var v=function(){function e(){t(this,e)}return i(e,[{key:"visitElement",value:function(e,t){this.visitChildren(t,function(t){t(e.attrs),t(e.children)})}},{key:"visitAttribute",value:function(e,t){}},{key:"visitText",value:function(e,t){}},{key:"visitCdata",value:function(e,t){}},{key:"visitComment",value:function(e,t){}},{key:"visitDocType",value:function(e,t){}},{key:"visitExpansion",value:function(e,t){return this.visitChildren(t,function(t){t(e.cases)})}},{key:"visitExpansionCase",value:function(e,t){}},{key:"visitChildren",value:function(e,t){var n=[],i=this;return t(function(t){t&&n.push(m(i,t,e))}),[].concat.apply([],n)}}]),e}();n.RecursiveVisitor=v,n.findNode=function(e,n){var o=[];return m(new(function(e){function c(){return t(this,c),s(this,a(c).apply(this,arguments))}return r(c,v),i(c,[{key:"visit",value:function(e,t){var i=function e(t){var n=t.sourceSpan.start.offset,i=t.sourceSpan.end.offset;return t instanceof p&&(t.endSourceSpan?i=t.endSourceSpan.end.offset:t.children&&t.children.length&&(i=e(t.children[t.children.length-1]).end)),{start:n,end:i}}(e);if(!(i.start<=n&&n3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Jt.DEFAULT_INTERPOLATION_CONFIG,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return new m(new an.ParseSourceFile(e,t),n,i,r,a).tokenize()};var h=/\r\n?/g;function p(e){var t=e===en.$EOF?"EOF":String.fromCharCode(e);return'Unexpected character "'.concat(t,'"')}function f(e){return'Unknown entity "'.concat(e,'" - use the "&#;" or "&#x;" syntax')}var d=function e(n){t(this,e),this.error=n},m=function(){function e(n,i,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Jt.DEFAULT_INTERPOLATION_CONFIG,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];t(this,e),this._file=n,this._getTagDefinition=i,this._tokenizeIcu=r,this._interpolationConfig=a,this.canSelfClose=o,this._peek=-1,this._nextPeek=-1,this._index=-1,this._line=0,this._column=-1,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._input=n.content,this._length=n.content.length,this._advance()}return i(e,[{key:"_processCarriageReturns",value:function(e){return e.replace(h,"\n")}},{key:"tokenize",value:function(){for(;this._peek!==en.$EOF;){var e=this._getLocation();try{this._attemptCharCode(en.$LT)?this._attemptCharCode(en.$BANG)?this._attemptCharCode(en.$LBRACKET)?this._consumeCdata(e):this._attemptCharCode(en.$MINUS)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(en.$SLASH)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){if(!(e instanceof d))throw e;this.errors.push(e.error)}}return this._beginToken(o.EOF),this._endToken([]),new l(function(e){for(var t=[],n=void 0,i=0;i0&&void 0!==arguments[0]?arguments[0]:this._getLocation(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getLocation();return new an.ParseSourceSpan(e,t)}},{key:"_beginToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getLocation();this._currentTokenStart=t,this._currentTokenType=e}},{key:"_endToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getLocation(),n=new c(this._currentTokenType,e,new an.ParseSourceSpan(this._currentTokenStart,t));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}},{key:"_createError",value:function(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var n=new u(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new d(n)}},{key:"_advance",value:function(){if(this._index>=this._length)throw this._createError(p(en.$EOF),this._getSpan());this._peek===en.$LF?(this._line++,this._column=0):this._peek!==en.$LF&&this._peek!==en.$CR&&this._column++,this._index++,this._peek=this._index>=this._length?en.$EOF:this._input.charCodeAt(this._index),this._nextPeek=this._index+1>=this._length?en.$EOF:this._input.charCodeAt(this._index+1)}},{key:"_attemptCharCode",value:function(e){return this._peek===e&&(this._advance(),!0)}},{key:"_attemptCharCodeCaseInsensitive",value:function(e){return t=this._peek,n=e,S(t)==S(n)&&(this._advance(),!0);var t,n}},{key:"_requireCharCode",value:function(e){var t=this._getLocation();if(!this._attemptCharCode(e))throw this._createError(p(this._peek),this._getSpan(t,t))}},{key:"_attemptStr",value:function(e){var t=e.length;if(this._index+t>this._length)return!1;for(var n=this._savePosition(),i=0;ii.offset&&a.push(this._input.substring(i.offset,this._index));this._peek!==t;)a.push(this._readChar(e));return this._endToken([this._processCarriageReturns(a.join(""))],i)}},{key:"_consumeComment",value:function(e){var t=this;this._beginToken(o.COMMENT_START,e),this._requireCharCode(en.$MINUS),this._endToken([]);var n=this._consumeRawText(!1,en.$MINUS,function(){return t._attemptStr("->")});this._beginToken(o.COMMENT_END,n.sourceSpan.end),this._endToken([])}},{key:"_consumeCdata",value:function(e){var t=this;this._beginToken(o.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]);var n=this._consumeRawText(!1,en.$RBRACKET,function(){return t._attemptStr("]>")});this._beginToken(o.CDATA_END,n.sourceSpan.end),this._endToken([])}},{key:"_consumeDocType",value:function(e){this._beginToken(o.DOC_TYPE_START,e),this._requireStrCaseInsensitive("DOCTYPE"),this._endToken([]),this._attemptCharCodeUntilFn(v);var t=this._consumeRawText(!1,en.$GT,function(){return!0});this._beginToken(o.DOC_TYPE_END,t.sourceSpan.end),this._endToken([])}},{key:"_consumePrefixAndName",value:function(){for(var e,t,n=this._index,i=null;this._peek!==en.$COLON&&!(((e=this._peek)en.$9));)this._advance();return this._peek===en.$COLON?(this._advance(),i=this._input.substring(n,this._index-1),t=this._index):t=n,this._requireCharCodeUntilFn(_,this._index===t?1:0),[i,this._input.substring(t,this._index)]}},{key:"_consumeTagOpen",value:function(e){var t,n,i=this._savePosition();try{if(!en.isAsciiLetter(this._peek))throw this._createError(p(this._peek),this._getSpan());var r=this._index;for(this._consumeTagOpenStart(e),n=(t=this._input.substring(r,this._index)).toLowerCase(),this._attemptCharCodeUntilFn(v);this._peek!==en.$SLASH&&this._peek!==en.$GT;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(v),this._attemptCharCode(en.$EQ)&&(this._attemptCharCodeUntilFn(v),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(v);this._consumeTagOpenEnd()}catch(t){if(t instanceof d)return this._restorePosition(i),this._beginToken(o.TEXT,e),void this._endToken(["<"]);throw t}if(!this.canSelfClose||this.tokens[this.tokens.length-1].type!==o.TAG_OPEN_END_VOID){var a=this._getTagDefinition(t).contentType;a===Kt.TagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(n,!1):a===Kt.TagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,!0)}}},{key:"_consumeRawTextWithTagClose",value:function(e,t){var n=this,i=this._consumeRawText(t,en.$LT,function(){return!!n._attemptCharCode(en.$SLASH)&&(n._attemptCharCodeUntilFn(v),!!n._attemptStrCaseInsensitive(e)&&(n._attemptCharCodeUntilFn(v),n._attemptCharCode(en.$GT)))});this._beginToken(o.TAG_CLOSE,i.sourceSpan.end),this._endToken([null,e])}},{key:"_consumeTagOpenStart",value:function(e){this._beginToken(o.TAG_OPEN_START,e);var t=this._consumePrefixAndName();this._endToken(t)}},{key:"_consumeAttributeName",value:function(){this._beginToken(o.ATTR_NAME);var e=this._consumePrefixAndName();this._endToken(e)}},{key:"_consumeAttributeValue",value:function(){var e;if(this._beginToken(o.ATTR_VALUE),this._peek===en.$SQ||this._peek===en.$DQ){var t=this._peek;this._advance();for(var n=[];this._peek!==t;)n.push(this._readChar(!0));e=n.join(""),this._advance()}else{var i=this._index;this._requireCharCodeUntilFn(_,1),e=this._input.substring(i,this._index)}this._endToken([this._processCarriageReturns(e)])}},{key:"_consumeTagOpenEnd",value:function(){var e=this._attemptCharCode(en.$SLASH)?o.TAG_OPEN_END_VOID:o.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(en.$GT),this._endToken([])}},{key:"_consumeTagClose",value:function(e){this._beginToken(o.TAG_CLOSE,e),this._attemptCharCodeUntilFn(v);var t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(v),this._requireCharCode(en.$GT),this._endToken(t)}},{key:"_consumeExpansionFormStart",value:function(){this._beginToken(o.EXPANSION_FORM_START,this._getLocation()),this._requireCharCode(en.$LBRACE),this._endToken([]),this._expansionCaseStack.push(o.EXPANSION_FORM_START),this._beginToken(o.RAW_TEXT,this._getLocation());var e=this._readUntil(en.$COMMA);this._endToken([e],this._getLocation()),this._requireCharCode(en.$COMMA),this._attemptCharCodeUntilFn(v),this._beginToken(o.RAW_TEXT,this._getLocation());var t=this._readUntil(en.$COMMA);this._endToken([t],this._getLocation()),this._requireCharCode(en.$COMMA),this._attemptCharCodeUntilFn(v)}},{key:"_consumeExpansionCaseStart",value:function(){this._beginToken(o.EXPANSION_CASE_VALUE,this._getLocation());var e=this._readUntil(en.$LBRACE).trim();this._endToken([e],this._getLocation()),this._attemptCharCodeUntilFn(v),this._beginToken(o.EXPANSION_CASE_EXP_START,this._getLocation()),this._requireCharCode(en.$LBRACE),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(v),this._expansionCaseStack.push(o.EXPANSION_CASE_EXP_START)}},{key:"_consumeExpansionCaseEnd",value:function(){this._beginToken(o.EXPANSION_CASE_EXP_END,this._getLocation()),this._requireCharCode(en.$RBRACE),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(v),this._expansionCaseStack.pop()}},{key:"_consumeExpansionFormEnd",value:function(){this._beginToken(o.EXPANSION_FORM_END,this._getLocation()),this._requireCharCode(en.$RBRACE),this._endToken([]),this._expansionCaseStack.pop()}},{key:"_consumeText",value:function(){var e=this._getLocation();this._beginToken(o.TEXT,e);var t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])}},{key:"_isTextEnd",value:function(){if(this._peek===en.$LT||this._peek===en.$EOF)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(T(this._input,this._index,this._interpolationConfig))return!0;if(this._peek===en.$RBRACE&&this._isInExpansionCase())return!0}return!1}},{key:"_savePosition",value:function(){return[this._peek,this._index,this._column,this._line,this.tokens.length]}},{key:"_readUntil",value:function(e){var t=this._index;return this._attemptUntilChar(e),this._input.substring(t,this._index)}},{key:"_restorePosition",value:function(e){this._peek=e[0],this._index=e[1],this._column=e[2],this._line=e[3];var t=e[4];t0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===o.EXPANSION_CASE_EXP_START}},{key:"_isInExpansionForm",value:function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===o.EXPANSION_FORM_START}}]),e}();function v(e){return!en.isWhitespace(e)||e===en.$EOF}function _(e){return en.isWhitespace(e)||e===en.$GT||e===en.$SLASH||e===en.$SQ||e===en.$DQ||e===en.$EQ}function y(e){return e==en.$SEMICOLON||e==en.$EOF||!en.isAsciiHexDigit(e)}function g(e){return e==en.$SEMICOLON||e==en.$EOF||!en.isAsciiLetter(e)}function T(e,t,n){var i=!!n&&e.indexOf(n.start,t)==t;return e.charCodeAt(t)==en.$LBRACE&&!i}function S(e){return e>=en.$a&&e<=en.$z?e-en.$a+en.$A:e}});k(cn);var un=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var o=function(e){function n(e,i,r){var o;return t(this,n),(o=s(this,a(n).call(this,i,r))).elementName=e,o}return r(n,an.ParseError),i(n,null,[{key:"create",value:function(e,t,i){return new n(e,t,i)}}]),n}();n.TreeError=o;var c=function e(n,i){t(this,e),this.rootNodes=n,this.errors=i};n.ParseTreeResult=c;var u=function(){function e(n){t(this,e),this.getTagDefinition=n}return i(e,[{key:"parse",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Jt.DEFAULT_INTERPOLATION_CONFIG,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=cn.tokenize(e,t,this.getTagDefinition,n,i,r),o=new l(a.tokens,this.getTagDefinition,r).build();return new c(o.rootNodes,a.errors.concat(o.errors))}}]),e}();n.Parser=u;var l=function(){function e(n,i,r){t(this,e),this.tokens=n,this.getTagDefinition=i,this.canSelfClose=r,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return i(e,[{key:"build",value:function(){for(;this._peek.type!==cn.TokenType.EOF;)this._peek.type===cn.TokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===cn.TokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===cn.TokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===cn.TokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===cn.TokenType.TEXT||this._peek.type===cn.TokenType.RAW_TEXT||this._peek.type===cn.TokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===cn.TokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._peek.type===cn.TokenType.DOC_TYPE_START?this._consumeDocType(this._advance()):this._advance();return new c(this._rootNodes,this._errors)}},{key:"_advance",value:function(){var e=this._peek;return this._index0)return this._errors=this._errors.concat(a.errors),null;var s=new an.ParseSourceSpan(t.sourceSpan.start,r.sourceSpan.end),c=new an.ParseSourceSpan(n.sourceSpan.start,r.sourceSpan.end);return new sn.ExpansionCase(t.parts[0],a.rootNodes,s,t.sourceSpan,c)}},{key:"_collectExpansionExpTokens",value:function(e){for(var t=[],n=[cn.TokenType.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==cn.TokenType.EXPANSION_FORM_START&&this._peek.type!==cn.TokenType.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===cn.TokenType.EXPANSION_CASE_EXP_END){if(!h(n,cn.TokenType.EXPANSION_CASE_EXP_START))return this._errors.push(o.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===cn.TokenType.EXPANSION_FORM_END){if(!h(n,cn.TokenType.EXPANSION_FORM_START))return this._errors.push(o.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===cn.TokenType.EOF)return this._errors.push(o.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}}},{key:"_getText",value:function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var n=this._getParentElement();null!=n&&0==n.children.length&&this.getTagDefinition(n.name).ignoreFirstLf&&(t=t.substring(1))}return t}},{key:"_consumeText",value:function(e){var t=this._getText(e);t.length>0&&this._addToParent(new sn.Text(t,e.sourceSpan))}},{key:"_closeVoidElement",value:function(){var e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}},{key:"_consumeStartTag",value:function(e){for(var t=e.parts[0],n=e.parts[1],i=[];this._peek.type===cn.TokenType.ATTR_NAME;)i.push(this._consumeAttr(this._advance()));var r=this._getElementFullName(t,n,this._getParentElement()),a=!1;if(this._peek.type===cn.TokenType.TAG_OPEN_END_VOID){this._advance(),a=!0;var s=this.getTagDefinition(r);this.canSelfClose||s.canSelfClose||null!==Kt.getNsPrefix(r)||s.isVoid||this._errors.push(o.create(r,e.sourceSpan,'Only void and foreign elements can be self closed "'.concat(e.parts[1],'"')))}else this._peek.type===cn.TokenType.TAG_OPEN_END&&(this._advance(),a=!1);var c=this._peek.sourceSpan.start,u=new an.ParseSourceSpan(e.sourceSpan.start,c),l=new an.ParseSourceSpan(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),h=new sn.Element(r,i,[],u,u,void 0,l);this._pushElement(h),a&&(this._popElement(r),h.endSourceSpan=u)}},{key:"_pushElement",value:function(e){var t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop();var n=this.getTagDefinition(e.name),i=this._getParentElementSkippingContainers(),r=i.parent,a=i.container;if(r&&n.requireExtraParent(r.name)){var o=new sn.Element(n.parentToAdd,[],[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan);this._insertBeforeContainer(r,a,o)}this._addToParent(e),this._elementStack.push(e)}},{key:"_consumeEndTag",value:function(e){var t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());if(this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),this.getTagDefinition(t).isVoid)this._errors.push(o.create(t,e.sourceSpan,'Void elements do not have end tags "'.concat(e.parts[1],'"')));else if(!this._popElement(t)){var n='Unexpected closing tag "'.concat(t,'". 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(o.create(t,e.sourceSpan,n))}}},{key:"_popElement",value:function(e){for(var t=this._elementStack.length-1;t>=0;t--){var n=this._elementStack[t];if(Kt.getNsPrefix(n.name)?n.name==e:n.name.toLowerCase()==e.toLowerCase())return this._elementStack.splice(t,this._elementStack.length-t),!0;if(!this.getTagDefinition(n.name).closedByParent)return!1}return!1}},{key:"_consumeAttr",value:function(e){var t=Kt.mergeNsAndName(e.parts[0],e.parts[1]),n=e.sourceSpan.end,i="",r=void 0;if(this._peek.type===cn.TokenType.ATTR_VALUE){var a=this._advance();i=a.parts[0],n=a.sourceSpan.end,r=a.sourceSpan}return new sn.Attribute(t,i,new an.ParseSourceSpan(e.sourceSpan.start,n),r,e.sourceSpan)}},{key:"_getParentElement",value:function(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}},{key:"_getParentElementSkippingContainers",value:function(){for(var e=null,t=this._elementStack.length-1;t>=0;t--){if(!Kt.isNgContainer(this._elementStack[t].name))return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:null,container:e}}},{key:"_addToParent",value:function(e){var t=this._getParentElement();null!=t?t.children.push(e):this._rootNodes.push(e)}},{key:"_insertBeforeContainer",value:function(e,t,n){if(t){if(e){var i=e.children.indexOf(t);e.children[i]=n}else this._rootNodes.push(n);n.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,n)}else this._addToParent(n),this._elementStack.push(n)}},{key:"_getElementFullName",value:function(e,t,n){return null==e&&null==(e=this.getTagDefinition(t).implicitNamespacePrefix)&&null!=n&&(e=Kt.getNsPrefix(n.name)),Kt.mergeNsAndName(e,t)}}]),e}();function h(e,t){return e.length>0&&e[e.length-1]===t}});k(un);var ln=C(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var o=un;n.ParseTreeResult=o.ParseTreeResult,n.TreeError=o.TreeError;var u=function(e){function n(){return t(this,n),s(this,a(n).call(this,Yt.getHtmlTagDefinition))}return r(n,un.Parser),i(n,[{key:"parse",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Jt.DEFAULT_INTERPOLATION_CONFIG,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return c(a(n.prototype),"parse",this).call(this,e,t,i,r,o)}}]),n}();n.HtmlParser=u});k(ln);var hn=C(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=null,i=function(){return n||(n=new ln.HtmlParser),n};t.parse=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).canSelfClose,n=void 0!==t&&t;return i().parse(e,"angular-html-parser",!1,void 0,n)}});k(hn);var pn=jt.HTML_ELEMENT_ATTRIBUTES,fn=jt.HTML_TAGS,dn=qt,mn=Qt.Node;function vn(e,n){var o=hn,c=sn.RecursiveVisitor,u=sn.visitAll,l=sn.Attribute,h=sn.CDATA,p=sn.Comment,f=sn.DocType,d=sn.Element,m=sn.Text,v=an.ParseSourceSpan,_=Yt.getHtmlTagDefinition,y=o.parse(e,{canSelfClose:n}),g=y.rootNodes,T=y.errors;if(0!==T.length){var S=T[0],k=S.msg,C=S.span.start,E=C.line,b=C.col;throw Vt(k,{start:{line:E+1,column:b}})}var A=function(e){var t=e.name.startsWith(":")?e.name.slice(1).split(":")[0]:null,n=e.nameSpan?e.nameSpan.toString():e.name,i=n.startsWith("".concat(t,":")),r=i?n.slice(t.length+1):n;e.name=r,e.namespace=t,e.hasExplicitNamespace=i},x=function(e,t){var n=e.toLowerCase();return t(n)?n:e};return u(new(function(e){function n(){return t(this,n),s(this,a(n).apply(this,arguments))}return r(n,c),i(n,[{key:"visit",value:function(e){!function(e){if(e instanceof l)e.type="attribute";else if(e instanceof h)e.type="cdata";else if(e instanceof p)e.type="comment";else if(e instanceof f)e.type="docType";else if(e instanceof d)e.type="element";else{if(!(e instanceof m))throw new Error("Unexpected node ".concat(JSON.stringify(e)));e.type="text"}}(e),function(e){e instanceof d?(A(e),e.attrs.forEach(function(e){A(e),e.valueSpan?(e.value=e.valueSpan.toString(),/['"]/.test(e.value[0])&&(e.value=e.value.slice(1,-1))):e.value=null})):e instanceof p?e.value=e.sourceSpan.toString().slice("\x3c!--".length,-"--\x3e".length):e instanceof m&&(e.value=e.sourceSpan.toString())}(e),function(e){if(e instanceof d){var t=_(e.name);e.namespace&&e.namespace!==t.implicitNamespacePrefix?e.tagDefinition=_(""):e.tagDefinition=t}}(e),function(e){if(e instanceof d){e.namespace&&e.namespace!==e.tagDefinition.implicitNamespacePrefix||(e.name=x(e.name,function(e){return e in fn}));var t=pn[e.name]||Object.create(null);e.attrs.forEach(function(n){n.namespace||(n.name=x(n.name,function(n){return e.name in pn&&(n in pn["*"]||n in t)}))})}}(e),function(e){e.sourceSpan&&e.endSourceSpan&&(e.sourceSpan=new v(e.sourceSpan.start,e.endSourceSpan.end))}(e)}}]),n}()),g),g}function _n(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?m(e):{frontMatter:null,content:e},r=i.frontMatter,a=i.content,o={type:"root",sourceSpan:{start:{offset:0},end:{offset:e.length}},children:vn(a,n)};r&&o.children.unshift(r);var s=function(i,r){var a=r.offset,o=_n(e.slice(0,a).replace(/[^\r\n]/g," ")+i,t,n,!1),s=o.children[0].sourceSpan.constructor;o.sourceSpan=new s(r,o.children[o.children.length-1].sourceSpan.end);var c=o.children[0];return c.length===a?o.children.shift():(c.sourceSpan=new s(c.sourceSpan.start.moveBy(a),c.sourceSpan.end),c.value=c.value.slice(a)),o},c=function(e){return"element"===e.type&&!e.nameSpan};return new mn(o).map(function(e){if(e.children&&e.children.some(c)){var t=[],n=!0,i=!1,r=void 0;try{for(var a,o=e.children[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var l=a.value;c(l)?Array.prototype.push.apply(t,l.children):t.push(l)}}catch(e){i=!0,r=e}finally{try{n||null==o.return||o.return()}finally{if(i)throw r}}return e.clone({children:t})}if("comment"===e.type){var h=function(e,t){if(!e.value)return null;var n=e.value.match(/^(\[if([^\]]*?)\]>)([\s\S]*?)