@angular-eslint/eslint-plugin-template 1.1.1-alpha.9 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/configs/all.json +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -1
- package/dist/rules/no-duplicate-attributes.d.ts +7 -0
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t=(e=require("typescript"))&&"object"==typeof e&&"default"in e?e.default:e,n=require("@typescript-eslint/experimental-utils"),s=require("aria-query");function r(e,t){const n=(e=e.replace(/\r\n/g,"\n")).indexOf(t);return[n,n+t.length]}const i=new Map;var a={"extract-inline-html":{preprocess:function(e,n){const s=[e];if(!function(e,t){return!![".component.ts",".page.ts",".dialog.ts",".modal.ts",".popover.ts",".bottomsheet.ts",".snackbar.ts"].some(e=>t.endsWith(e))||!(!e.includes("Component")||!e.includes("@angular/core"))}(e,n))return s;try{const a=t.createSourceFile(n,e,t.ScriptTarget.Latest,!0),o=a.statements.filter(e=>t.isClassDeclaration(e));if(!o||!o.length)return s;const l=[];for(const e of o)if(e.decorators)for(const n of e.decorators)t.isCallExpression(n.expression)&&t.isIdentifier(n.expression.expression)&&"Component"===n.expression.expression.text&&l.push(n);if(!l||!l.length)return s;const c=[e];let u=0;for(const n of l){if(!t.isDecorator(n)||!t.isCallExpression(n.expression)||1!==n.expression.arguments.length)continue;const s=n.expression.arguments[0];if(!t.isObjectLiteralExpression(s))continue;const o=s.properties.find(e=>e&&e.name&&"template"===e.name.getText());if(s.properties.find(e=>e&&e.name&&"templateUrl"===e.name.getText())||!o)continue;if(!t.isPropertyAssignment(o)||!t.isStringLiteralLike(o.initializer))continue;const l=o.initializer.text,p=r(e,l),h=`inline-template-${++u}.component.html`;i.set(h,{range:p,lineAndCharacter:{start:a.getLineAndCharacterOfPosition(p[0]),end:a.getLineAndCharacterOfPosition(p[1])}}),c.push({text:l,filename:h})}return c}catch(e){return console.log(e),console.error("preprocess: ERROR could not parse @Component() metadata",n),s}},postprocess:function(e,t){const n=e[0];if(1===e.length)return n;const s=e.slice(1);return[...n,...[].concat(...s.map((e,t)=>{const n=`inline-template-${++t}.component.html`,s=i.get(n);return s?e.map(e=>{if(e.line=e.line+s.lineAndCharacter.start.line,e.endLine=e.endLine+s.lineAndCharacter.start.line,e.fix){const t=s.range[0];e.fix.range=[t+e.fix.range[0],t+e.fix.range[1]]}return e}):[]}))]},supportsAutofix:!0}};const o=n.ESLintUtils.RuleCreator(()=>"");function l(e){return c(e),e.parserServices}function c(e){var t,n;if(!(null==(t=e.parserServices)?void 0:t.convertNodeSourceSpanToLoc)||!(null==(n=e.parserServices)?void 0:n.convertElementSourceSpanToLoc))throw new Error("You have used a rule which requires '@angular-eslint/template-parser' to be used as the 'parser' in your ESLint config.")}var u;function p(e){if(":"!=e[0])return[null,e];const t=e.indexOf(":",1);if(-1==t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[e.slice(1,t),e.slice(t+1)]}function h(e){return"ng-container"===p(e)[1]}function d(e){return"ng-content"===p(e)[1]}function m(e){return null===e?null:p(e)[0]}function g(e,t){return e?`:${e}:${t}`:t}!function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"}(u||(u={}));const v={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",alefsym:"ℵ",Alpha:"Α",alpha:"α",amp:"&",and:"∧",ang:"∠",apos:"'",Aring:"Å",aring:"å",asymp:"≈",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",bdquo:"„",Beta:"Β",beta:"β",brvbar:"¦",bull:"•",cap:"∩",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",Chi:"Χ",chi:"χ",circ:"ˆ",clubs:"♣",cong:"≅",copy:"©",crarr:"↵",cup:"∪",curren:"¤",dagger:"†",Dagger:"‡",darr:"↓",dArr:"⇓",deg:"°",Delta:"Δ",delta:"δ",diams:"♦",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",empty:"∅",emsp:" ",ensp:" ",Epsilon:"Ε",epsilon:"ε",equiv:"≡",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",exist:"∃",fnof:"ƒ",forall:"∀",frac12:"½",frac14:"¼",frac34:"¾",frasl:"⁄",Gamma:"Γ",gamma:"γ",ge:"≥",gt:">",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:"",ngsp:""};class f{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:n=u.PARSABLE_DATA,closedByParent:s=!1,isVoid:r=!1,ignoreFirstLf:i=!1,preventNamespaceInheritance:a=!1}={}){this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,e&&e.length>0&&e.forEach(e=>this.closedByChildren[e]=!0),this.isVoid=r,this.closedByParent=s||r,this.implicitNamespacePrefix=t||null,this.contentType=n,this.ignoreFirstLf=i,this.preventNamespaceInheritance=a}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}let y,S;function x(e){var t,n;return S||(y=new f,S={base:new f({isVoid:!0}),meta:new f({isVoid:!0}),area:new f({isVoid:!0}),embed:new f({isVoid:!0}),link:new f({isVoid:!0}),img:new f({isVoid:!0}),input:new f({isVoid:!0}),param:new f({isVoid:!0}),hr:new f({isVoid:!0}),br:new f({isVoid:!0}),source:new f({isVoid:!0}),track:new f({isVoid:!0}),wbr:new f({isVoid:!0}),p:new f({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 f({closedByChildren:["tbody","tfoot"]}),tbody:new f({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new f({closedByChildren:["tbody"],closedByParent:!0}),tr:new f({closedByChildren:["tr"],closedByParent:!0}),td:new f({closedByChildren:["td","th"],closedByParent:!0}),th:new f({closedByChildren:["td","th"],closedByParent:!0}),col:new f({isVoid:!0}),svg:new f({implicitNamespacePrefix:"svg"}),foreignObject:new f({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new f({implicitNamespacePrefix:"math"}),li:new f({closedByChildren:["li"],closedByParent:!0}),dt:new f({closedByChildren:["dt","dd"]}),dd:new f({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new f({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new f({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new f({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new f({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new f({closedByChildren:["optgroup"],closedByParent:!0}),option:new f({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new f({ignoreFirstLf:!0}),listing:new f({ignoreFirstLf:!0}),style:new f({contentType:u.RAW_TEXT}),script:new f({contentType:u.RAW_TEXT}),title:new f({contentType:u.ESCAPABLE_RAW_TEXT}),textarea:new f({contentType:u.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),null!==(n=null!==(t=S[e])&&void 0!==t?t:S[e.toLowerCase()])&&void 0!==n?n:y}const E=new RegExp("(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g");class _{constructor(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}static parse(e){const t=[],n=(e,t)=>{t.notSelectors.length>0&&!t.element&&0==t.classNames.length&&0==t.attrs.length&&(t.element="*"),e.push(t)};let s,r=new _,i=r,a=!1;for(E.lastIndex=0;s=E.exec(e);){if(s[1]){if(a)throw new Error("Nesting :not in a selector is not allowed");a=!0,i=new _,r.notSelectors.push(i)}const e=s[2];if(e){const t=s[3];"#"===t?i.addAttribute("id",e.substr(1)):"."===t?i.addClassName(e.substr(1)):i.setElement(e)}const o=s[4];if(o&&i.addAttribute(o,s[6]),s[7]&&(a=!1,i=r),s[8]){if(a)throw new Error("Multiple selectors in :not are not supported");n(t,r),r=i=new _}}return n(t,r),t}isElementSelector(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length}hasElementSelector(){return!!this.element}setElement(e=null){this.element=e}getMatchingElementTemplate(){const e=this.element||"div",t=this.classNames.length>0?` class="${this.classNames.join(" ")}"`:"";let n="";for(let e=0;e<this.attrs.length;e+=2)n+=` ${this.attrs[e]}${""!==this.attrs[e+1]?`="${this.attrs[e+1]}"`:""}`;return x(e).isVoid?`<${e}${t}${n}/>`:`<${e}${t}${n}></${e}>`}getAttrs(){const e=[];return this.classNames.length>0&&e.push("class",this.classNames.join(" ")),e.concat(this.attrs)}addAttribute(e,t=""){this.attrs.push(e,t&&t.toLowerCase()||"")}addClassName(e){this.classNames.push(e.toLowerCase())}toString(){let e=this.element||"";if(this.classNames&&this.classNames.forEach(t=>e+="."+t),this.attrs)for(let t=0;t<this.attrs.length;t+=2){const n=this.attrs[t+1];e+=`[${this.attrs[t]}${n?"="+n:""}]`}return this.notSelectors.forEach(t=>e+=`:not(${t})`),e}}class C{constructor(){this._elementMap=new Map,this._elementPartialMap=new Map,this._classMap=new Map,this._classPartialMap=new Map,this._attrValueMap=new Map,this._attrValuePartialMap=new Map,this._listContexts=[]}static createNotMatcher(e){const t=new C;return t.addSelectables(e,null),t}addSelectables(e,t){let n=null;e.length>1&&(n=new w(e),this._listContexts.push(n));for(let s=0;s<e.length;s++)this._addSelectable(e[s],t,n)}_addSelectable(e,t,n){let s=this;const r=e.element,i=e.classNames,a=e.attrs,o=new b(e,t,n);if(r&&(0===a.length&&0===i.length?this._addTerminal(s._elementMap,r,o):s=this._addPartial(s._elementPartialMap,r)),i)for(let e=0;e<i.length;e++){const t=i[e];0===a.length&&e===i.length-1?this._addTerminal(s._classMap,t,o):s=this._addPartial(s._classPartialMap,t)}if(a)for(let e=0;e<a.length;e+=2){const t=a[e],n=a[e+1];if(e===a.length-2){const e=s._attrValueMap;let r=e.get(t);r||(r=new Map,e.set(t,r)),this._addTerminal(r,n,o)}else{const e=s._attrValuePartialMap;let r=e.get(t);r||(r=new Map,e.set(t,r)),s=this._addPartial(r,n)}}}_addTerminal(e,t,n){let s=e.get(t);s||(s=[],e.set(t,s)),s.push(n)}_addPartial(e,t){let n=e.get(t);return n||(n=new C,e.set(t,n)),n}match(e,t){let n=!1;const s=e.element,r=e.classNames,i=e.attrs;for(let e=0;e<this._listContexts.length;e++)this._listContexts[e].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,s,e,t)||n,n=this._matchPartial(this._elementPartialMap,s,e,t)||n,r)for(let s=0;s<r.length;s++){const i=r[s];n=this._matchTerminal(this._classMap,i,e,t)||n,n=this._matchPartial(this._classPartialMap,i,e,t)||n}if(i)for(let s=0;s<i.length;s+=2){const r=i[s],a=i[s+1],o=this._attrValueMap.get(r);a&&(n=this._matchTerminal(o,"",e,t)||n),n=this._matchTerminal(o,a,e,t)||n;const l=this._attrValuePartialMap.get(r);a&&(n=this._matchPartial(l,"",e,t)||n),n=this._matchPartial(l,a,e,t)||n}return n}_matchTerminal(e,t,n,s){if(!e||"string"!=typeof t)return!1;let r=e.get(t)||[];const i=e.get("*");if(i&&(r=r.concat(i)),0===r.length)return!1;let a,o=!1;for(let e=0;e<r.length;e++)a=r[e],o=a.finalize(n,s)||o;return o}_matchPartial(e,t,n,s){if(!e||"string"!=typeof t)return!1;const r=e.get(t);return!!r&&r.match(n,s)}}class w{constructor(e){this.selectors=e,this.alreadyMatched=!1}}class b{constructor(e,t,n){this.selector=e,this.cbContext=t,this.listContext=n,this.notSelectors=e.notSelectors}finalize(e,t){let n=!0;return!(this.notSelectors.length>0)||this.listContext&&this.listContext.alreadyMatched||(n=!C.createNotMatcher(this.notSelectors).match(e,null)),!n||!t||this.listContext&&this.listContext.alreadyMatched||(this.listContext&&(this.listContext.alreadyMatched=!0),t(this.selector,this.cbContext)),n}}var T,I,N,A,P,k;function M(e){const t=function(e){const t=e.classNames&&e.classNames.length?[8,...e.classNames]:[];return[e.element&&"*"!==e.element?e.element:"",...e.attrs,...t]}(e),n=e.notSelectors&&e.notSelectors.length?e.notSelectors.map(e=>function(e){const t=e.classNames&&e.classNames.length?[8,...e.classNames]:[];return e.element?[5,e.element,...e.attrs,...t]:e.attrs.length?[3,...e.attrs,...t]:e.classNames&&e.classNames.length?[9,...e.classNames]:[]}(e)):[];return t.concat(...n)}function L(e){return e?_.parse(e).map(M):[]}!function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"}(T||(T={})),function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"}(I||(I={})),function(e){e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL"}(N||(N={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"}(A||(A={})),function(e){e[e.Const=0]="Const"}(P||(P={}));class O{constructor(e=[]){this.modifiers=e}hasModifier(e){return-1!==this.modifiers.indexOf(e)}}!function(e){e[e.Dynamic=0]="Dynamic",e[e.Bool=1]="Bool",e[e.String=2]="String",e[e.Int=3]="Int",e[e.Number=4]="Number",e[e.Function=5]="Function",e[e.Inferred=6]="Inferred",e[e.None=7]="None"}(k||(k={}));class R extends O{constructor(e,t){super(t),this.name=e}visitType(e,t){return e.visitBuiltinType(this,t)}}class F extends O{constructor(e,t,n=null){super(t),this.value=e,this.typeParams=n}visitType(e,t){return e.visitExpressionType(this,t)}}const B=new R(k.Dynamic),D=new R(k.Inferred),$=new R(k.Bool),V=(new R(k.Int),new R(k.Number)),U=new R(k.String),j=(new R(k.Function),new R(k.None));var q,H,W,z;function K(e,t){const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(!e[s].isEquivalent(t[s]))return!1;return!0}!function(e){e[e.Minus=0]="Minus",e[e.Plus=1]="Plus"}(q||(q={})),function(e){e[e.Equals=0]="Equals",e[e.NotEquals=1]="NotEquals",e[e.Identical=2]="Identical",e[e.NotIdentical=3]="NotIdentical",e[e.Minus=4]="Minus",e[e.Plus=5]="Plus",e[e.Divide=6]="Divide",e[e.Multiply=7]="Multiply",e[e.Modulo=8]="Modulo",e[e.And=9]="And",e[e.Or=10]="Or",e[e.BitwiseAnd=11]="BitwiseAnd",e[e.Lower=12]="Lower",e[e.LowerEquals=13]="LowerEquals",e[e.Bigger=14]="Bigger",e[e.BiggerEquals=15]="BiggerEquals"}(H||(H={}));class X{constructor(e,t){this.type=e||null,this.sourceSpan=t||null}prop(e,t){return new _e(this,e,null,t)}key(e,t,n){return new Ce(this,e,t,n)}callMethod(e,t,n){return new te(this,e,t,null,n)}callFn(e,t,n){return new ne(this,e,null,t,n)}instantiate(e,t,n){return new se(this,e,t,n)}conditional(e,t=null,n){return new me(this,e,t,null,n)}equals(e,t){return new Ee(H.Equals,this,e,null,t)}notEquals(e,t){return new Ee(H.NotEquals,this,e,null,t)}identical(e,t){return new Ee(H.Identical,this,e,null,t)}notIdentical(e,t){return new Ee(H.NotIdentical,this,e,null,t)}minus(e,t){return new Ee(H.Minus,this,e,null,t)}plus(e,t){return new Ee(H.Plus,this,e,null,t)}divide(e,t){return new Ee(H.Divide,this,e,null,t)}multiply(e,t){return new Ee(H.Multiply,this,e,null,t)}modulo(e,t){return new Ee(H.Modulo,this,e,null,t)}and(e,t){return new Ee(H.And,this,e,null,t)}bitwiseAnd(e,t,n=!0){return new Ee(H.BitwiseAnd,this,e,null,t,n)}or(e,t){return new Ee(H.Or,this,e,null,t)}lower(e,t){return new Ee(H.Lower,this,e,null,t)}lowerEquals(e,t){return new Ee(H.LowerEquals,this,e,null,t)}bigger(e,t){return new Ee(H.Bigger,this,e,null,t)}biggerEquals(e,t){return new Ee(H.BiggerEquals,this,e,null,t)}isBlank(e){return this.equals(Ne,e)}cast(e,t){return new fe(this,e,t)}toStmt(){return new Oe(this,null)}}!function(e){e[e.This=0]="This",e[e.Super=1]="Super",e[e.CatchError=2]="CatchError",e[e.CatchStack=3]="CatchStack"}(W||(W={}));class G extends X{constructor(e,t,n){super(t,n),"string"==typeof e?(this.name=e,this.builtin=null):(this.name=null,this.builtin=e)}isEquivalent(e){return e instanceof G&&this.name===e.name&&this.builtin===e.builtin}isConstant(){return!1}visitExpression(e,t){return e.visitReadVarExpr(this,t)}set(e){if(!this.name)throw new Error(`Built in variable ${this.builtin} can not be assigned to.`);return new J(this.name,e,null,this.sourceSpan)}}class Q extends X{constructor(e,t,n){super(t,n),this.expr=e}visitExpression(e,t){return e.visitTypeofExpr(this,t)}isEquivalent(e){return e instanceof Q&&e.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}}class Y extends X{constructor(e,t,n){super(t,n),this.node=e}isEquivalent(e){return e instanceof Y&&this.node===e.node}isConstant(){return!1}visitExpression(e,t){return e.visitWrappedNodeExpr(this,t)}}class J extends X{constructor(e,t,n,s){super(n||t.type,s),this.name=e,this.value=t}isEquivalent(e){return e instanceof J&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWriteVarExpr(this,t)}toDeclStmt(e,t){return new Me(this.name,this.value,e,t,this.sourceSpan)}toConstDecl(){return this.toDeclStmt(D,[Ae.Final])}}class Z extends X{constructor(e,t,n,s,r){super(s||n.type,r),this.receiver=e,this.index=t,this.value=n}isEquivalent(e){return e instanceof Z&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWriteKeyExpr(this,t)}}class ee extends X{constructor(e,t,n,s,r){super(s||n.type,r),this.receiver=e,this.name=t,this.value=n}isEquivalent(e){return e instanceof ee&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWritePropExpr(this,t)}}!function(e){e[e.ConcatArray=0]="ConcatArray",e[e.SubscribeObservable=1]="SubscribeObservable",e[e.Bind=2]="Bind"}(z||(z={}));class te extends X{constructor(e,t,n,s,r){super(s,r),this.receiver=e,this.args=n,"string"==typeof t?(this.name=t,this.builtin=null):(this.name=null,this.builtin=t)}isEquivalent(e){return e instanceof te&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.builtin===e.builtin&&K(this.args,e.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeMethodExpr(this,t)}}class ne extends X{constructor(e,t,n,s,r=!1){super(n,s),this.fn=e,this.args=t,this.pure=r}isEquivalent(e){return e instanceof ne&&this.fn.isEquivalent(e.fn)&&K(this.args,e.args)&&this.pure===e.pure}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeFunctionExpr(this,t)}}class se extends X{constructor(e,t,n,s){super(n,s),this.classExpr=e,this.args=t}isEquivalent(e){return e instanceof se&&this.classExpr.isEquivalent(e.classExpr)&&K(this.args,e.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInstantiateExpr(this,t)}}class re extends X{constructor(e,t,n){super(t,n),this.value=e}isEquivalent(e){return e instanceof re&&this.value===e.value}isConstant(){return!0}visitExpression(e,t){return e.visitLiteralExpr(this,t)}}class ie{constructor(e,t){this.text=e,this.sourceSpan=t}}class ae extends ie{}class oe extends ie{}class le extends X{constructor(e,t,n,s,r){super(U,r),this.metaBlock=e,this.messageParts=t,this.placeHolderNames=n,this.expressions=s}isEquivalent(e){return!1}isConstant(){return!1}visitExpression(e,t){return e.visitLocalizedString(this,t)}serializeI18nHead(){let e=this.metaBlock.description||"";return this.metaBlock.meaning&&(e=`${this.metaBlock.meaning}|${e}`),this.metaBlock.customId&&(e=`${e}@@${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(t=>{e=`${e}␟${t}`}),he(e,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(e){var t,n;return null!==(n=null===(t=this.messageParts[e])||void 0===t?void 0:t.sourceSpan)&&void 0!==n?n:this.sourceSpan}getPlaceholderSourceSpan(e){var t,n,s,r;return null!==(r=null!==(n=null===(t=this.placeHolderNames[e])||void 0===t?void 0:t.sourceSpan)&&void 0!==n?n:null===(s=this.expressions[e])||void 0===s?void 0:s.sourceSpan)&&void 0!==r?r:this.sourceSpan}serializeI18nTemplatePart(e){return he(this.placeHolderNames[e-1].text,this.messageParts[e].text,this.getMessagePartSourceSpan(e))}}const ce=e=>e.replace(/\\/g,"\\\\"),ue=e=>e.replace(/:/g,"\\:"),pe=e=>e.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function he(e,t,n){return""===e?{cooked:t,raw:pe((s=ce(t),s.replace(/^:/,"\\:"))),range:n}:{cooked:`:${e}:${t}`,raw:pe(`:${ue(ce(e))}:${ce(t)}`),range:n};var s}class de extends X{constructor(e,t,n=null,s){super(t,s),this.value=e,this.typeParams=n}isEquivalent(e){return e instanceof de&&this.value.name===e.value.name&&this.value.moduleName===e.value.moduleName&&this.value.runtime===e.value.runtime}isConstant(){return!1}visitExpression(e,t){return e.visitExternalExpr(this,t)}}class me extends X{constructor(e,t,n=null,s,r){super(s||t.type,r),this.condition=e,this.falseCase=n,this.trueCase=t}isEquivalent(e){return e instanceof me&&this.condition.isEquivalent(e.condition)&&this.trueCase.isEquivalent(e.trueCase)&&(n=e.falseCase,null==(t=this.falseCase)||null==n?t==n:t.isEquivalent(n));var t,n}isConstant(){return!1}visitExpression(e,t){return e.visitConditionalExpr(this,t)}}class ge extends X{constructor(e,t){super($,t),this.condition=e}isEquivalent(e){return e instanceof ge&&this.condition.isEquivalent(e.condition)}isConstant(){return!1}visitExpression(e,t){return e.visitNotExpr(this,t)}}class ve extends X{constructor(e,t){super(e.type,t),this.condition=e}isEquivalent(e){return e instanceof ve&&this.condition.isEquivalent(e.condition)}isConstant(){return!1}visitExpression(e,t){return e.visitAssertNotNullExpr(this,t)}}class fe extends X{constructor(e,t,n){super(t,n),this.value=e}isEquivalent(e){return e instanceof fe&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitCastExpr(this,t)}}class ye{constructor(e,t=null){this.name=e,this.type=t}isEquivalent(e){return this.name===e.name}}class Se extends X{constructor(e,t,n,s,r){super(n,s),this.params=e,this.statements=t,this.name=r}isEquivalent(e){return e instanceof Se&&K(this.params,e.params)&&K(this.statements,e.statements)}isConstant(){return!1}visitExpression(e,t){return e.visitFunctionExpr(this,t)}toDeclStmt(e,t){return new Le(e,this.params,this.statements,this.type,t,this.sourceSpan)}}class xe extends X{constructor(e,t,n,s,r=!0){super(n||V,s),this.operator=e,this.expr=t,this.parens=r}isEquivalent(e){return e instanceof xe&&this.operator===e.operator&&this.expr.isEquivalent(e.expr)}isConstant(){return!1}visitExpression(e,t){return e.visitUnaryOperatorExpr(this,t)}}class Ee extends X{constructor(e,t,n,s,r,i=!0){super(s||t.type,r),this.operator=e,this.rhs=n,this.parens=i,this.lhs=t}isEquivalent(e){return e instanceof Ee&&this.operator===e.operator&&this.lhs.isEquivalent(e.lhs)&&this.rhs.isEquivalent(e.rhs)}isConstant(){return!1}visitExpression(e,t){return e.visitBinaryOperatorExpr(this,t)}}class _e extends X{constructor(e,t,n,s){super(n,s),this.receiver=e,this.name=t}isEquivalent(e){return e instanceof _e&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name}isConstant(){return!1}visitExpression(e,t){return e.visitReadPropExpr(this,t)}set(e){return new ee(this.receiver,this.name,e,null,this.sourceSpan)}}class Ce extends X{constructor(e,t,n,s){super(n,s),this.receiver=e,this.index=t}isEquivalent(e){return e instanceof Ce&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)}isConstant(){return!1}visitExpression(e,t){return e.visitReadKeyExpr(this,t)}set(e){return new Z(this.receiver,this.index,e,null,this.sourceSpan)}}class we extends X{constructor(e,t,n){super(t,n),this.entries=e}isConstant(){return this.entries.every(e=>e.isConstant())}isEquivalent(e){return e instanceof we&&K(this.entries,e.entries)}visitExpression(e,t){return e.visitLiteralArrayExpr(this,t)}}class be{constructor(e,t,n){this.key=e,this.value=t,this.quoted=n}isEquivalent(e){return this.key===e.key&&this.value.isEquivalent(e.value)}}class Te extends X{constructor(e,t,n){super(t,n),this.entries=e,this.valueType=null,t&&(this.valueType=t.valueType)}isEquivalent(e){return e instanceof Te&&K(this.entries,e.entries)}isConstant(){return this.entries.every(e=>e.value.isConstant())}visitExpression(e,t){return e.visitLiteralMapExpr(this,t)}}new G(W.This,null,null),new G(W.Super,null,null),new G(W.CatchError,null,null),new G(W.CatchStack,null,null);const Ie=new re(null,null,null),Ne=new re(null,D,null);var Ae;!function(e){e[e.Final=0]="Final",e[e.Private=1]="Private",e[e.Exported=2]="Exported",e[e.Static=3]="Static"}(Ae||(Ae={}));class Pe extends class{constructor(e,t,n){this.text=e,this.multiline=t,this.trailingNewline=n}toString(){return this.multiline?` ${this.text} `:this.text}}{constructor(e){super("",!0,!0),this.tags=e}toString(){return function(e){if(0===e.length)return"";if(1===e.length&&e[0].tagName&&!e[0].text)return`*${Ke(e[0])} `;let t="*\n";for(const n of e)t+=" *",t+=Ke(n).replace(/\n/g,"\n * "),t+="\n";return t+=" ",t}(this.tags)}}class ke{constructor(e=[],t=null,n){this.modifiers=e,this.sourceSpan=t,this.leadingComments=n}hasModifier(e){return-1!==this.modifiers.indexOf(e)}addLeadingComment(e){var t;this.leadingComments=null!==(t=this.leadingComments)&&void 0!==t?t:[],this.leadingComments.push(e)}}class Me extends ke{constructor(e,t,n,s,r,i){super(s,r,i),this.name=e,this.value=t,this.type=n||t&&t.type||null}isEquivalent(e){return e instanceof Me&&this.name===e.name&&(this.value?!!e.value&&this.value.isEquivalent(e.value):!e.value)}visitStatement(e,t){return e.visitDeclareVarStmt(this,t)}}class Le extends ke{constructor(e,t,n,s,r,i,a){super(r,i,a),this.name=e,this.params=t,this.statements=n,this.type=s||null}isEquivalent(e){return e instanceof Le&&K(this.params,e.params)&&K(this.statements,e.statements)}visitStatement(e,t){return e.visitDeclareFunctionStmt(this,t)}}class Oe extends ke{constructor(e,t,n){super([],t,n),this.expr=e}isEquivalent(e){return e instanceof Oe&&this.expr.isEquivalent(e.expr)}visitStatement(e,t){return e.visitExpressionStmt(this,t)}}class Re extends ke{constructor(e,t=null,n){super([],t,n),this.value=e}isEquivalent(e){return e instanceof Re&&this.value.isEquivalent(e.value)}visitStatement(e,t){return e.visitReturnStmt(this,t)}}class Fe extends ke{constructor(e,t,n=[],s,r){super([],s,r),this.condition=e,this.trueCase=t,this.falseCase=n}isEquivalent(e){return e instanceof Fe&&this.condition.isEquivalent(e.condition)&&K(this.trueCase,e.trueCase)&&K(this.falseCase,e.falseCase)}visitStatement(e,t){return e.visitIfStmt(this,t)}}function Be(e,t,n){return new G(e,t,n)}function De(e,t=null,n){return new de(e,null,t,n)}function $e(e,t,n){return new F(e,t,n)}function Ve(e){return new Q(e)}function Ue(e,t,n){return new we(e,t,n)}function je(e,t=null){return new Te(e.map(e=>new be(e.key,e.value,e.quoted)),t,null)}function qe(e,t,n,s,r){return new Se(e,t,n,s,r)}function He(e,t,n,s,r){return new Fe(e,t,n,s,r)}function We(e,t,n){return new re(e,t,n)}function ze(e){return e instanceof re&&null===e.value}function Ke(e){let t="";if(e.tagName&&(t+=" @"+e.tagName),e.text){if(e.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');t+=" "+e.text.replace(/@/g,"\\@")}return t}const Xe=/-+([a-z0-9])/g;function Ge(e,t){return Qe(e,":",t)}function Qe(e,t,n){const s=e.indexOf(t);return-1==s?n:[e.slice(0,s).trim(),e.slice(s+1).trim()]}function Ye(e){throw new Error("Internal Error: "+e)}function Je(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function Ze(e){let t="";for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);if(s>=55296&&s<=56319&&e.length>n+1){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(n++,s=(s-55296<<10)+t-56320+65536)}s<=127?t+=String.fromCharCode(s):s<=2047?t+=String.fromCharCode(s>>6&31|192,63&s|128):s<=65535?t+=String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128):s<=2097151&&(t+=String.fromCharCode(s>>18&7|240,s>>12&63|128,s>>6&63|128,63&s|128))}return t}function et(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(et).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;if(!e.toString)return"object";const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}const tt="undefined"!=typeof window&&window,nt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,st="undefined"!=typeof global&&global||tt||nt,rt=Be("<unknown>"),it={};class at extends X{constructor(e){super(e.type),this.resolved=e,this.original=e}visitExpression(e,t){return t===it?this.original.visitExpression(e,t):this.resolved.visitExpression(e,t)}isEquivalent(e){return e instanceof at&&this.resolved.isEquivalent(e.resolved)}isConstant(){return!0}fixup(e){this.resolved=e,this.shared=!0}}class ot{constructor(e=!1){this.isClosureCompilerEnabled=e,this.statements=[],this.literals=new Map,this.literalFactories=new Map,this.injectorDefinitions=new Map,this.directiveDefinitions=new Map,this.componentDefinitions=new Map,this.pipeDefinitions=new Map,this.nextNameIndex=0}getConstLiteral(e,t){if(e instanceof re&&!pt(e)||e instanceof at)return e;const n=this.keyOf(e);let s=this.literals.get(n),r=!1;if(s||(s=new at(e),this.literals.set(n,s),r=!0),!r&&!s.shared||r&&t){const t=this.freshName();let n,r;this.isClosureCompilerEnabled&&pt(e)?(n=Be(t).set(new Se([],[new Re(e)])),r=Be(t).callFn([])):(n=Be(t).set(e),r=Be(t)),this.statements.push(n.toDeclStmt(D,[Ae.Final])),s.fixup(r)}return s}getDefinition(e,t,n,s=!1){const r=this.definitionsOf(t);let i=r.get(e),a=!1;if(!i){const s=this.propertyNameOf(t);i=new at(n.importExpr(e).prop(s)),r.set(e,i),a=!0}if(!a&&!i.shared||a&&s){const e=this.freshName();this.statements.push(Be(e).set(i.resolved).toDeclStmt(D,[Ae.Final])),i.fixup(Be(e))}return i}getLiteralFactory(e){if(e instanceof we){const t=e.entries.map(e=>e.isConstant()?e:rt),n=this.keyOf(Ue(t));return this._getLiteralFactory(n,e.entries,e=>Ue(e))}{const t=je(e.entries.map(e=>({key:e.key,value:e.value.isConstant()?e.value:rt,quoted:e.quoted}))),n=this.keyOf(t);return this._getLiteralFactory(n,e.entries.map(e=>e.value),t=>je(t.map((t,n)=>({key:e.entries[n].key,value:t,quoted:e.entries[n].quoted}))))}}_getLiteralFactory(e,t,n){let s=this.literalFactories.get(e);const r=t.filter(e=>!e.isConstant());if(!s){const r=t.map((e,t)=>e.isConstant()?this.getConstLiteral(e,!0):Be("a"+t)),i=qe(r.filter(ut).map(e=>new ye(e.name,B)),[new Re(n(r))],D),a=this.freshName();this.statements.push(Be(a).set(i).toDeclStmt(D,[Ae.Final])),s=Be(a),this.literalFactories.set(e,s)}return{literalFactory:s,literalFactoryArguments:r}}uniqueName(e){return`${e}${this.nextNameIndex++}`}definitionsOf(e){switch(e){case 2:return this.componentDefinitions;case 1:return this.directiveDefinitions;case 0:return this.injectorDefinitions;case 3:return this.pipeDefinitions}return Ye("Unknown definition kind "+e),this.componentDefinitions}propertyNameOf(e){switch(e){case 2:return"ɵcmp";case 1:return"ɵdir";case 0:return"ɵinj";case 3:return"ɵpipe"}return Ye("Unknown definition kind "+e),"<unknown>"}freshName(){return this.uniqueName("_c")}keyOf(e){return e.visitExpression(new lt,it)}}class lt{constructor(){this.visitWrappedNodeExpr=ct,this.visitWriteVarExpr=ct,this.visitWriteKeyExpr=ct,this.visitWritePropExpr=ct,this.visitInvokeMethodExpr=ct,this.visitInvokeFunctionExpr=ct,this.visitInstantiateExpr=ct,this.visitConditionalExpr=ct,this.visitNotExpr=ct,this.visitAssertNotNullExpr=ct,this.visitCastExpr=ct,this.visitFunctionExpr=ct,this.visitUnaryOperatorExpr=ct,this.visitBinaryOperatorExpr=ct,this.visitReadPropExpr=ct,this.visitReadKeyExpr=ct,this.visitCommaExpr=ct,this.visitLocalizedString=ct}visitLiteralExpr(e){return""+("string"==typeof e.value?'"'+e.value+'"':e.value)}visitLiteralArrayExpr(e,t){return`[${e.entries.map(e=>e.visitExpression(this,t)).join(",")}]`}visitLiteralMapExpr(e,t){return"{"+e.entries.map(e=>`${(e=>{const t=e.quoted?'"':"";return`${t}${e.key}${t}`})(e)}:${e.value.visitExpression(this,t)}`).join(",")}visitExternalExpr(e){return e.value.moduleName?`EX:${e.value.moduleName}:${e.value.name}`:"EX:"+e.value.runtime.name}visitReadVarExpr(e){return"VAR:"+e.name}visitTypeofExpr(e,t){return"TYPEOF:"+e.expr.visitExpression(this,t)}}function ct(e){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${e.constructor.name}`)}function ut(e){return e instanceof G}function pt(e){return e instanceof re&&"string"==typeof e.value&&e.value.length>=50}const ht="@angular/core";class dt{}function mt(e){return e.replace(/\W/g,"_")}dt.ANALYZE_FOR_ENTRY_COMPONENTS={name:"ANALYZE_FOR_ENTRY_COMPONENTS",moduleName:ht},dt.ElementRef={name:"ElementRef",moduleName:ht},dt.NgModuleRef={name:"NgModuleRef",moduleName:ht},dt.ViewContainerRef={name:"ViewContainerRef",moduleName:ht},dt.ChangeDetectorRef={name:"ChangeDetectorRef",moduleName:ht},dt.QueryList={name:"QueryList",moduleName:ht},dt.TemplateRef={name:"TemplateRef",moduleName:ht},dt.Renderer2={name:"Renderer2",moduleName:ht},dt.CodegenComponentFactoryResolver={name:"ɵCodegenComponentFactoryResolver",moduleName:ht},dt.ComponentFactoryResolver={name:"ComponentFactoryResolver",moduleName:ht},dt.ComponentFactory={name:"ComponentFactory",moduleName:ht},dt.ComponentRef={name:"ComponentRef",moduleName:ht},dt.NgModuleFactory={name:"NgModuleFactory",moduleName:ht},dt.createModuleFactory={name:"ɵcmf",moduleName:ht},dt.moduleDef={name:"ɵmod",moduleName:ht},dt.moduleProviderDef={name:"ɵmpd",moduleName:ht},dt.RegisterModuleFactoryFn={name:"ɵregisterModuleFactory",moduleName:ht},dt.inject={name:"ɵɵinject",moduleName:ht},dt.directiveInject={name:"ɵɵdirectiveInject",moduleName:ht},dt.INJECTOR={name:"INJECTOR",moduleName:ht},dt.Injector={name:"Injector",moduleName:ht},dt.ɵɵdefineInjectable={name:"ɵɵdefineInjectable",moduleName:ht},dt.InjectableDef={name:"ɵɵInjectableDef",moduleName:ht},dt.ViewEncapsulation={name:"ViewEncapsulation",moduleName:ht},dt.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:ht},dt.SecurityContext={name:"SecurityContext",moduleName:ht},dt.LOCALE_ID={name:"LOCALE_ID",moduleName:ht},dt.TRANSLATIONS_FORMAT={name:"TRANSLATIONS_FORMAT",moduleName:ht},dt.inlineInterpolate={name:"ɵinlineInterpolate",moduleName:ht},dt.interpolate={name:"ɵinterpolate",moduleName:ht},dt.EMPTY_ARRAY={name:"ɵEMPTY_ARRAY",moduleName:ht},dt.EMPTY_MAP={name:"ɵEMPTY_MAP",moduleName:ht},dt.Renderer={name:"Renderer",moduleName:ht},dt.viewDef={name:"ɵvid",moduleName:ht},dt.elementDef={name:"ɵeld",moduleName:ht},dt.anchorDef={name:"ɵand",moduleName:ht},dt.textDef={name:"ɵted",moduleName:ht},dt.directiveDef={name:"ɵdid",moduleName:ht},dt.providerDef={name:"ɵprd",moduleName:ht},dt.queryDef={name:"ɵqud",moduleName:ht},dt.pureArrayDef={name:"ɵpad",moduleName:ht},dt.pureObjectDef={name:"ɵpod",moduleName:ht},dt.purePipeDef={name:"ɵppd",moduleName:ht},dt.pipeDef={name:"ɵpid",moduleName:ht},dt.nodeValue={name:"ɵnov",moduleName:ht},dt.ngContentDef={name:"ɵncd",moduleName:ht},dt.unwrapValue={name:"ɵunv",moduleName:ht},dt.createRendererType2={name:"ɵcrt",moduleName:ht},dt.RendererType2={name:"RendererType2",moduleName:ht},dt.ViewDefinition={name:"ɵViewDefinition",moduleName:ht},dt.createComponentFactory={name:"ɵccf",moduleName:ht},dt.setClassMetadata={name:"ɵsetClassMetadata",moduleName:ht};let gt=0;var vt;!function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(vt||(vt={}));const ft="@angular/core";class yt{}function St(e){return je(Object.keys(e).map(t=>({key:t,value:e[t],quoted:!1})))}function xt(e,t){if(0===t)return $e(e);const n=[];for(let e=0;e<t;e++)n.push(B);return $e(e,void 0,n)}function Et(e){return"@"+e}function _t(e,t){return`animation_${e}_${t}`}yt.NEW_METHOD="factory",yt.TRANSFORM_METHOD="transform",yt.PATCH_DEPS="patchedDeps",yt.namespaceHTML={name:"ɵɵnamespaceHTML",moduleName:ft},yt.namespaceMathML={name:"ɵɵnamespaceMathML",moduleName:ft},yt.namespaceSVG={name:"ɵɵnamespaceSVG",moduleName:ft},yt.element={name:"ɵɵelement",moduleName:ft},yt.elementStart={name:"ɵɵelementStart",moduleName:ft},yt.elementEnd={name:"ɵɵelementEnd",moduleName:ft},yt.advance={name:"ɵɵadvance",moduleName:ft},yt.syntheticHostProperty={name:"ɵɵsyntheticHostProperty",moduleName:ft},yt.syntheticHostListener={name:"ɵɵsyntheticHostListener",moduleName:ft},yt.attribute={name:"ɵɵattribute",moduleName:ft},yt.attributeInterpolate1={name:"ɵɵattributeInterpolate1",moduleName:ft},yt.attributeInterpolate2={name:"ɵɵattributeInterpolate2",moduleName:ft},yt.attributeInterpolate3={name:"ɵɵattributeInterpolate3",moduleName:ft},yt.attributeInterpolate4={name:"ɵɵattributeInterpolate4",moduleName:ft},yt.attributeInterpolate5={name:"ɵɵattributeInterpolate5",moduleName:ft},yt.attributeInterpolate6={name:"ɵɵattributeInterpolate6",moduleName:ft},yt.attributeInterpolate7={name:"ɵɵattributeInterpolate7",moduleName:ft},yt.attributeInterpolate8={name:"ɵɵattributeInterpolate8",moduleName:ft},yt.attributeInterpolateV={name:"ɵɵattributeInterpolateV",moduleName:ft},yt.classProp={name:"ɵɵclassProp",moduleName:ft},yt.elementContainerStart={name:"ɵɵelementContainerStart",moduleName:ft},yt.elementContainerEnd={name:"ɵɵelementContainerEnd",moduleName:ft},yt.elementContainer={name:"ɵɵelementContainer",moduleName:ft},yt.styleMap={name:"ɵɵstyleMap",moduleName:ft},yt.styleMapInterpolate1={name:"ɵɵstyleMapInterpolate1",moduleName:ft},yt.styleMapInterpolate2={name:"ɵɵstyleMapInterpolate2",moduleName:ft},yt.styleMapInterpolate3={name:"ɵɵstyleMapInterpolate3",moduleName:ft},yt.styleMapInterpolate4={name:"ɵɵstyleMapInterpolate4",moduleName:ft},yt.styleMapInterpolate5={name:"ɵɵstyleMapInterpolate5",moduleName:ft},yt.styleMapInterpolate6={name:"ɵɵstyleMapInterpolate6",moduleName:ft},yt.styleMapInterpolate7={name:"ɵɵstyleMapInterpolate7",moduleName:ft},yt.styleMapInterpolate8={name:"ɵɵstyleMapInterpolate8",moduleName:ft},yt.styleMapInterpolateV={name:"ɵɵstyleMapInterpolateV",moduleName:ft},yt.classMap={name:"ɵɵclassMap",moduleName:ft},yt.classMapInterpolate1={name:"ɵɵclassMapInterpolate1",moduleName:ft},yt.classMapInterpolate2={name:"ɵɵclassMapInterpolate2",moduleName:ft},yt.classMapInterpolate3={name:"ɵɵclassMapInterpolate3",moduleName:ft},yt.classMapInterpolate4={name:"ɵɵclassMapInterpolate4",moduleName:ft},yt.classMapInterpolate5={name:"ɵɵclassMapInterpolate5",moduleName:ft},yt.classMapInterpolate6={name:"ɵɵclassMapInterpolate6",moduleName:ft},yt.classMapInterpolate7={name:"ɵɵclassMapInterpolate7",moduleName:ft},yt.classMapInterpolate8={name:"ɵɵclassMapInterpolate8",moduleName:ft},yt.classMapInterpolateV={name:"ɵɵclassMapInterpolateV",moduleName:ft},yt.styleProp={name:"ɵɵstyleProp",moduleName:ft},yt.stylePropInterpolate1={name:"ɵɵstylePropInterpolate1",moduleName:ft},yt.stylePropInterpolate2={name:"ɵɵstylePropInterpolate2",moduleName:ft},yt.stylePropInterpolate3={name:"ɵɵstylePropInterpolate3",moduleName:ft},yt.stylePropInterpolate4={name:"ɵɵstylePropInterpolate4",moduleName:ft},yt.stylePropInterpolate5={name:"ɵɵstylePropInterpolate5",moduleName:ft},yt.stylePropInterpolate6={name:"ɵɵstylePropInterpolate6",moduleName:ft},yt.stylePropInterpolate7={name:"ɵɵstylePropInterpolate7",moduleName:ft},yt.stylePropInterpolate8={name:"ɵɵstylePropInterpolate8",moduleName:ft},yt.stylePropInterpolateV={name:"ɵɵstylePropInterpolateV",moduleName:ft},yt.nextContext={name:"ɵɵnextContext",moduleName:ft},yt.templateCreate={name:"ɵɵtemplate",moduleName:ft},yt.text={name:"ɵɵtext",moduleName:ft},yt.enableBindings={name:"ɵɵenableBindings",moduleName:ft},yt.disableBindings={name:"ɵɵdisableBindings",moduleName:ft},yt.getCurrentView={name:"ɵɵgetCurrentView",moduleName:ft},yt.textInterpolate={name:"ɵɵtextInterpolate",moduleName:ft},yt.textInterpolate1={name:"ɵɵtextInterpolate1",moduleName:ft},yt.textInterpolate2={name:"ɵɵtextInterpolate2",moduleName:ft},yt.textInterpolate3={name:"ɵɵtextInterpolate3",moduleName:ft},yt.textInterpolate4={name:"ɵɵtextInterpolate4",moduleName:ft},yt.textInterpolate5={name:"ɵɵtextInterpolate5",moduleName:ft},yt.textInterpolate6={name:"ɵɵtextInterpolate6",moduleName:ft},yt.textInterpolate7={name:"ɵɵtextInterpolate7",moduleName:ft},yt.textInterpolate8={name:"ɵɵtextInterpolate8",moduleName:ft},yt.textInterpolateV={name:"ɵɵtextInterpolateV",moduleName:ft},yt.restoreView={name:"ɵɵrestoreView",moduleName:ft},yt.pureFunction0={name:"ɵɵpureFunction0",moduleName:ft},yt.pureFunction1={name:"ɵɵpureFunction1",moduleName:ft},yt.pureFunction2={name:"ɵɵpureFunction2",moduleName:ft},yt.pureFunction3={name:"ɵɵpureFunction3",moduleName:ft},yt.pureFunction4={name:"ɵɵpureFunction4",moduleName:ft},yt.pureFunction5={name:"ɵɵpureFunction5",moduleName:ft},yt.pureFunction6={name:"ɵɵpureFunction6",moduleName:ft},yt.pureFunction7={name:"ɵɵpureFunction7",moduleName:ft},yt.pureFunction8={name:"ɵɵpureFunction8",moduleName:ft},yt.pureFunctionV={name:"ɵɵpureFunctionV",moduleName:ft},yt.pipeBind1={name:"ɵɵpipeBind1",moduleName:ft},yt.pipeBind2={name:"ɵɵpipeBind2",moduleName:ft},yt.pipeBind3={name:"ɵɵpipeBind3",moduleName:ft},yt.pipeBind4={name:"ɵɵpipeBind4",moduleName:ft},yt.pipeBindV={name:"ɵɵpipeBindV",moduleName:ft},yt.hostProperty={name:"ɵɵhostProperty",moduleName:ft},yt.property={name:"ɵɵproperty",moduleName:ft},yt.propertyInterpolate={name:"ɵɵpropertyInterpolate",moduleName:ft},yt.propertyInterpolate1={name:"ɵɵpropertyInterpolate1",moduleName:ft},yt.propertyInterpolate2={name:"ɵɵpropertyInterpolate2",moduleName:ft},yt.propertyInterpolate3={name:"ɵɵpropertyInterpolate3",moduleName:ft},yt.propertyInterpolate4={name:"ɵɵpropertyInterpolate4",moduleName:ft},yt.propertyInterpolate5={name:"ɵɵpropertyInterpolate5",moduleName:ft},yt.propertyInterpolate6={name:"ɵɵpropertyInterpolate6",moduleName:ft},yt.propertyInterpolate7={name:"ɵɵpropertyInterpolate7",moduleName:ft},yt.propertyInterpolate8={name:"ɵɵpropertyInterpolate8",moduleName:ft},yt.propertyInterpolateV={name:"ɵɵpropertyInterpolateV",moduleName:ft},yt.i18n={name:"ɵɵi18n",moduleName:ft},yt.i18nAttributes={name:"ɵɵi18nAttributes",moduleName:ft},yt.i18nExp={name:"ɵɵi18nExp",moduleName:ft},yt.i18nStart={name:"ɵɵi18nStart",moduleName:ft},yt.i18nEnd={name:"ɵɵi18nEnd",moduleName:ft},yt.i18nApply={name:"ɵɵi18nApply",moduleName:ft},yt.i18nPostprocess={name:"ɵɵi18nPostprocess",moduleName:ft},yt.pipe={name:"ɵɵpipe",moduleName:ft},yt.projection={name:"ɵɵprojection",moduleName:ft},yt.projectionDef={name:"ɵɵprojectionDef",moduleName:ft},yt.reference={name:"ɵɵreference",moduleName:ft},yt.inject={name:"ɵɵinject",moduleName:ft},yt.injectAttribute={name:"ɵɵinjectAttribute",moduleName:ft},yt.injectPipeChangeDetectorRef={name:"ɵɵinjectPipeChangeDetectorRef",moduleName:ft},yt.directiveInject={name:"ɵɵdirectiveInject",moduleName:ft},yt.invalidFactory={name:"ɵɵinvalidFactory",moduleName:ft},yt.invalidFactoryDep={name:"ɵɵinvalidFactoryDep",moduleName:ft},yt.templateRefExtractor={name:"ɵɵtemplateRefExtractor",moduleName:ft},yt.resolveWindow={name:"ɵɵresolveWindow",moduleName:ft},yt.resolveDocument={name:"ɵɵresolveDocument",moduleName:ft},yt.resolveBody={name:"ɵɵresolveBody",moduleName:ft},yt.defineComponent={name:"ɵɵdefineComponent",moduleName:ft},yt.setComponentScope={name:"ɵɵsetComponentScope",moduleName:ft},yt.ComponentDefWithMeta={name:"ɵɵComponentDefWithMeta",moduleName:ft},yt.FactoryDef={name:"ɵɵFactoryDef",moduleName:ft},yt.defineDirective={name:"ɵɵdefineDirective",moduleName:ft},yt.DirectiveDefWithMeta={name:"ɵɵDirectiveDefWithMeta",moduleName:ft},yt.InjectorDef={name:"ɵɵInjectorDef",moduleName:ft},yt.defineInjector={name:"ɵɵdefineInjector",moduleName:ft},yt.NgModuleDefWithMeta={name:"ɵɵNgModuleDefWithMeta",moduleName:ft},yt.ModuleWithProviders={name:"ModuleWithProviders",moduleName:ft},yt.defineNgModule={name:"ɵɵdefineNgModule",moduleName:ft},yt.setNgModuleScope={name:"ɵɵsetNgModuleScope",moduleName:ft},yt.PipeDefWithMeta={name:"ɵɵPipeDefWithMeta",moduleName:ft},yt.definePipe={name:"ɵɵdefinePipe",moduleName:ft},yt.queryRefresh={name:"ɵɵqueryRefresh",moduleName:ft},yt.viewQuery={name:"ɵɵviewQuery",moduleName:ft},yt.staticViewQuery={name:"ɵɵstaticViewQuery",moduleName:ft},yt.staticContentQuery={name:"ɵɵstaticContentQuery",moduleName:ft},yt.loadQuery={name:"ɵɵloadQuery",moduleName:ft},yt.contentQuery={name:"ɵɵcontentQuery",moduleName:ft},yt.NgOnChangesFeature={name:"ɵɵNgOnChangesFeature",moduleName:ft},yt.InheritDefinitionFeature={name:"ɵɵInheritDefinitionFeature",moduleName:ft},yt.CopyDefinitionFeature={name:"ɵɵCopyDefinitionFeature",moduleName:ft},yt.ProvidersFeature={name:"ɵɵProvidersFeature",moduleName:ft},yt.listener={name:"ɵɵlistener",moduleName:ft},yt.getFactoryOf={name:"ɵɵgetFactoryOf",moduleName:ft},yt.getInheritedFactory={name:"ɵɵgetInheritedFactory",moduleName:ft},yt.sanitizeHtml={name:"ɵɵsanitizeHtml",moduleName:ft},yt.sanitizeStyle={name:"ɵɵsanitizeStyle",moduleName:ft},yt.sanitizeResourceUrl={name:"ɵɵsanitizeResourceUrl",moduleName:ft},yt.sanitizeScript={name:"ɵɵsanitizeScript",moduleName:ft},yt.sanitizeUrl={name:"ɵɵsanitizeUrl",moduleName:ft},yt.sanitizeUrlOrResourceUrl={name:"ɵɵsanitizeUrlOrResourceUrl",moduleName:ft},yt.trustConstantHtml={name:"ɵɵtrustConstantHtml",moduleName:ft},yt.trustConstantScript={name:"ɵɵtrustConstantScript",moduleName:ft},yt.trustConstantResourceUrl={name:"ɵɵtrustConstantResourceUrl",moduleName:ft};class Ct{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e){return e.visitText(this)}}class wt{constructor(e,t,n){this.value=e,this.sourceSpan=t,this.i18n=n}visit(e){return e.visitBoundText(this)}}class bt{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=s,this.i18n=r}visit(e){return e.visitTextAttribute(this)}}class Tt{constructor(e,t,n,s,r,i,a,o,l){this.name=e,this.type=t,this.securityContext=n,this.value=s,this.unit=r,this.sourceSpan=i,this.keySpan=a,this.valueSpan=o,this.i18n=l}static fromBoundElementProperty(e,t){if(void 0===e.keySpan)throw new Error(`Unexpected state: keySpan must be defined for bound attributes but was not for ${e.name}: ${e.sourceSpan}`);return new Tt(e.name,e.type,e.securityContext,e.value,e.unit,e.sourceSpan,e.keySpan,e.valueSpan,t)}visit(e){return e.visitBoundAttribute(this)}}class It{constructor(e,t,n,s,r,i,a){this.name=e,this.type=t,this.handler=n,this.target=s,this.phase=r,this.sourceSpan=i,this.handlerSpan=a}static fromParsedEvent(e){return new It(e.name,e.type,e.handler,0===e.type?e.targetOrPhase:null,1===e.type?e.targetOrPhase:null,e.sourceSpan,e.handlerSpan)}visit(e){return e.visitBoundEvent(this)}}class Nt{constructor(e,t,n,s,r,i,a,o,l,c){this.name=e,this.attributes=t,this.inputs=n,this.outputs=s,this.children=r,this.references=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=l,this.i18n=c}visit(e){return e.visitElement(this)}}class At{constructor(e,t,n,s,r,i,a,o,l,c,u,p){this.tagName=e,this.attributes=t,this.inputs=n,this.outputs=s,this.templateAttrs=r,this.children=i,this.references=a,this.variables=o,this.sourceSpan=l,this.startSourceSpan=c,this.endSourceSpan=u,this.i18n=p}visit(e){return e.visitTemplate(this)}}class Pt{constructor(e,t,n,s){this.selector=e,this.attributes=t,this.sourceSpan=n,this.i18n=s,this.name="ng-content"}visit(e){return e.visitContent(this)}}class kt{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.keySpan=s,this.valueSpan=r}visit(e){return e.visitVariable(this)}}class Mt{constructor(e,t,n,s){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=s}visit(e){return e.visitReference(this)}}class Lt{constructor(e,t,n,s){this.vars=e,this.placeholders=t,this.sourceSpan=n,this.i18n=s}visit(e){return e.visitIcu(this)}}function Ot(e,t){const n=[];if(e.visit)for(const n of t)e.visit(n)||n.visit(e);else for(const s of t){const t=s.visit(e);t&&n.push(t)}return n}class Rt{constructor(e,t,n,s,r,i){this.nodes=e,this.placeholders=t,this.placeholderToMessage=n,this.meaning=s,this.description=r,this.customId=i,this.id=this.customId,this.legacyIds=[],this.sources=e.length?[{filePath:e[0].sourceSpan.start.file.url,startLine:e[0].sourceSpan.start.line+1,startCol:e[0].sourceSpan.start.col+1,endLine:e[e.length-1].sourceSpan.end.line+1,endCol:e[0].sourceSpan.start.col+1}]:[]}}class Ft{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitText(this,t)}}class Bt{constructor(e,t){this.children=e,this.sourceSpan=t}visit(e,t){return e.visitContainer(this,t)}}class Dt{constructor(e,t,n,s){this.expression=e,this.type=t,this.cases=n,this.sourceSpan=s}visit(e,t){return e.visitIcu(this,t)}}class $t{constructor(e,t,n,s,r,i,a,o,l){this.tag=e,this.attrs=t,this.startName=n,this.closeName=s,this.children=r,this.isVoid=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=l}visit(e,t){return e.visitTagPlaceholder(this,t)}}class Vt{constructor(e,t,n){this.value=e,this.name=t,this.sourceSpan=n}visit(e,t){return e.visitPlaceholder(this,t)}}class Ut{constructor(e,t,n){this.value=e,this.name=t,this.sourceSpan=n}visit(e,t){return e.visitIcuPlaceholder(this,t)}}function jt(e){return function(e){const t=Ze(e),n=function(e,t){const n=e.length+3>>>2,s=[];for(let r=0;r<n;r++)s[r]=sn(e,4*r,t);return s}(t,Yt.Big),s=8*t.length,r=function(e,t){const n=[];for(let e=0;e<80;e++)n.push(void 0);return n}();let i=1732584193,a=4023233417,o=2562383102,l=271733878,c=3285377520;n[s>>5]|=128<<24-s%32,n[15+(s+64>>9<<4)]=s;for(let e=0;e<n.length;e+=16){const t=i,s=a,u=o,p=l,h=c;for(let t=0;t<80;t++){r[t]=t<16?n[e+t]:tn(r[t-3]^r[t-8]^r[t-14]^r[t-16],1);const s=Kt(t,a,o,l),u=s[0],p=s[1],h=[tn(i,5),u,c,p,r[t]].reduce(Jt);c=l,l=o,o=tn(a,30),a=i,i=h}i=Jt(i,t),a=Jt(a,s),o=Jt(o,u),l=Jt(l,p),c=Jt(c,h)}return function(e){let t="";for(let n=0;n<e.length;n++){const s=nn(e,n);t+=(s>>>4).toString(16)+(15&s).toString(16)}return t.toLowerCase()}(rn([i,a,o,l,c]))}((t=e.nodes,t.map(e=>e.visit(Wt,null))).join("")+`[${e.meaning}]`);var t}function qt(e){const t=new zt;return function(e,t=""){let n=Xt(e);if(t){const e=Xt(t);n=function(e,t){const n=e[0],s=t[0],r=Zt(e[1],t[1]),i=r[0],a=r[1];return[Jt(Jt(n,s),i),a]}(function(e,t){const n=e[0],s=e[1];return[n<<1|s>>>31,s<<1|n>>>31]}(n),e)}return function(e){let t="",n="1";for(let s=e.length-1;s>=0;s--)t=an(t,on(nn(e,s),n)),n=on(256,n);return t.split("").reverse().join("")}(rn([2147483647&n[0],n[1]]))}(e.nodes.map(e=>e.visit(t,null)).join(""),e.meaning)}class Ht{visitText(e,t){return e.value}visitContainer(e,t){return`[${e.children.map(e=>e.visit(this)).join(", ")}]`}visitIcu(e,t){const n=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.expression}, ${e.type}, ${n.join(", ")}}`}visitTagPlaceholder(e,t){return e.isVoid?`<ph tag name="${e.startName}"/>`:`<ph tag name="${e.startName}">${e.children.map(e=>e.visit(this)).join(", ")}</ph name="${e.closeName}">`}visitPlaceholder(e,t){return e.value?`<ph name="${e.name}">${e.value}</ph>`:`<ph name="${e.name}"/>`}visitIcuPlaceholder(e,t){return`<ph icu name="${e.name}">${e.value.visit(this)}</ph>`}}const Wt=new Ht;class zt extends Ht{visitIcu(e,t){let n=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.type}, ${n.join(", ")}}`}}function Kt(e,t,n,s){return e<20?[t&n|~t&s,1518500249]:e<40?[t^n^s,1859775393]:e<60?[t&n|t&s|n&s,2400959708]:[t^n^s,3395469782]}function Xt(e){const t=Ze(e);let n=Gt(t,0),s=Gt(t,102072);return 0!=n||0!=s&&1!=s||(n^=319790063,s^=-1801410264),[n,s]}function Gt(e,t){let n,s=2654435769,r=2654435769;const i=e.length;for(n=0;n+12<=i;n+=12){s=Jt(s,sn(e,n,Yt.Little)),r=Jt(r,sn(e,n+4,Yt.Little));const i=Qt(s,r,t=Jt(t,sn(e,n+8,Yt.Little)));s=i[0],r=i[1],t=i[2]}return s=Jt(s,sn(e,n,Yt.Little)),r=Jt(r,sn(e,n+4,Yt.Little)),t=Jt(t,i),Qt(s,r,t=Jt(t,sn(e,n+8,Yt.Little)<<8))[2]}function Qt(e,t,n){return e=en(e,t),e=en(e,n),e^=n>>>13,t=en(t,n),t=en(t,e),t^=e<<8,n=en(n,e),n=en(n,t),n^=t>>>13,e=en(e,t),e=en(e,n),e^=n>>>12,t=en(t,n),t=en(t,e),t^=e<<16,n=en(n,e),n=en(n,t),n^=t>>>5,e=en(e,t),e=en(e,n),e^=n>>>3,t=en(t,n),t=en(t,e),t^=e<<10,n=en(n,e),n=en(n,t),[e,t,n^=t>>>15]}var Yt;function Jt(e,t){return Zt(e,t)[1]}function Zt(e,t){const n=(65535&e)+(65535&t),s=(e>>>16)+(t>>>16)+(n>>>16);return[s>>>16,s<<16|65535&n]}function en(e,t){const n=(65535&e)-(65535&t);return(e>>16)-(t>>16)+(n>>16)<<16|65535&n}function tn(e,t){return e<<t|e>>>32-t}function nn(e,t){return t>=e.length?0:255&e.charCodeAt(t)}function sn(e,t,n){let s=0;if(n===Yt.Big)for(let n=0;n<4;n++)s+=nn(e,t+n)<<24-8*n;else for(let n=0;n<4;n++)s+=nn(e,t+n)<<8*n;return s}function rn(e){return e.reduce((e,t)=>e+function(e){let t="";for(let n=0;n<4;n++)t+=String.fromCharCode(e>>>8*(3-n)&255);return t}(t),"")}function an(e,t){let n="";const s=Math.max(e.length,t.length);for(let r=0,i=0;r<s||i;r++){const s=i+ +(e[r]||0)+ +(t[r]||0);s>=10?(i=1,n+=s-10):(i=0,n+=s)}return n}function on(e,t){let n="",s=t;for(;0!==e;e>>>=1)1&e&&(n=an(n,s)),s=an(s,s);return n}function ln(e){return"i18n"===e||e.startsWith("i18n-")}function cn(e){return e instanceof Rt}function un(e){return cn(e)&&1===e.nodes.length&&e.nodes[0]instanceof Dt}function pn(e){return!!e.i18n}function hn(e){return e.nodes[0]}function dn(e,t=0){return`�${e}${t>0?":"+t:""}�`}function mn(e=0){let t=e;return()=>t++}function gn(e){const t={};return e.forEach((e,n)=>{t[n]=We(e.length>1?`[${e.join("|")}]`:e[0])}),t}function vn(e,t,...n){const s=e.get(t)||[];s.push(...n),e.set(t,s)}function fn(e,t=0,n=0){const s=t,r=new Map,i=e instanceof Rt?e.nodes.find(e=>e instanceof Bt):e;return i&&i.children.filter(e=>e instanceof Vt).forEach((e,t)=>{const i=dn(s+t,n);vn(r,e.name,i)}),r}function yn(e={},t){const n={};return e&&Object.keys(e).length&&Object.keys(e).forEach(s=>n[Sn(s,t)]=e[s]),n}function Sn(e,t=!0){const n=e.toUpperCase().replace(/[^A-Z0-9_]/g,"_");if(!t)return n;const s=n.split("_");if(1===s.length)return e.toLowerCase();let r;/^\d+$/.test(s[s.length-1])&&(r=s.pop());let i=s.shift().toLowerCase();return s.length&&(i+=s.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")),r?`${i}_${r}`:i}function xn(e){return("MSG_"+e).toUpperCase()}function En(e){return new Me(e.name,void 0,D,void 0,e.sourceSpan)}!function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"}(Yt||(Yt={}));const _n=/[-.]/;function Cn(e,t){let n=null;return()=>(n||(e.push(new Me("_t",void 0,B)),n=Be(t)),n)}function wn(e){if(this)throw new Error(`Builder ${this.constructor.name} doesn't support ${e} yet`);throw new Error(`Feature ${e} is not supported yet`)}function bn(e){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${e.constructor.name}`)}function Tn(e){return Array.isArray(e)?Ue(e.map(Tn)):We(e,D)}function In(e,t){return Object.getOwnPropertyNames(e).length>0?function(e,t){return je(Object.getOwnPropertyNames(e).map(n=>{const s=e[n];let r,i,a;return Array.isArray(s)?[i,r]=s:[r,i]=Ge(n,[n,s]),a=r,{key:a,quoted:_n.test(a),value:t&&i!==r?Ue([Tn(i),Tn(r)]):Tn(i)}}))}(e,t):null}function Nn(e){for(;ze(e[e.length-1]);)e.pop();return e}function An(e,t){if(Array.isArray(e.predicate)){let n=[];return e.predicate.forEach(e=>{const t=e.split(",").map(e=>We(e.trim()));n.push(...t)}),t.getConstLiteral(Ue(n),!0)}return e.predicate}class Pn{constructor(){this.values=[]}set(e,t){t&&this.values.push({key:e,value:t,quoted:!1})}toLiteralMap(){return je(this.values)}}function kn(e,t,n){let s=De(e,null,n);if(t.length>0)for(let e=0;e<t.length;e++)s=s.callFn(t[e],n);else s=s.callFn([],n);return s}function Mn(e){const{expressions:t,strings:n}=e;return 1===t.length&&2===n.length&&""===n[0]&&""===n[1]?1:t.length+n.length}var Ln,On,Rn;function Fn(e){const t=Be("t"),n=[];let s=j;const r=Dn(e)?t:new Ee(H.Or,t,e.internalType);let i=null;if(null!==e.deps)"invalid"!==e.deps&&(i=new se(r,Bn(e.deps,e.injectFn,e.target===On.Pipe)),s=function(e){let t=!1;const n=e.map(e=>{const n=function(e){const t=[];return e.resolved===Rn.Attribute&&null!==e.attribute&&t.push({key:"attribute",value:e.attribute,quoted:!1}),e.optional&&t.push({key:"optional",value:We(!0),quoted:!1}),e.host&&t.push({key:"host",value:We(!0),quoted:!1}),e.self&&t.push({key:"self",value:We(!0),quoted:!1}),e.skipSelf&&t.push({key:"skipSelf",value:We(!0),quoted:!1}),t.length>0?je(t):null}(e);return null!==n?(t=!0,n):We(null)});return t?$e(Ue(n)):j}(e.deps));else{const t=Be(`ɵ${e.name}_BaseFactory`),s=De(yt.getInheritedFactory),a=t.set(s.callFn([e.internalType],void 0,!0)).toDeclStmt(D,[Ae.Exported,Ae.Final]);n.push(a),i=t.callFn([r])}const a=i,o=[];let l=null;function c(e){const n=Be("r");o.push(n.set(Ie).toDeclStmt());let s=null;return s=null!==a?n.set(a).toStmt():De(yt.invalidFactory).callFn([]).toStmt(),o.push(He(t,[s],[n.set(e).toStmt()])),n}if(Dn(e)&&e.delegateType===Ln.Factory){const t=Be(`ɵ${e.name}_BaseFactory`),s=De(yt.getFactoryOf);if(e.delegate.isEquivalent(e.internalType))throw new Error("Illegal state: compiling factory that delegates to itself");const r=t.set(s.callFn([e.delegate])).toDeclStmt(D,[Ae.Exported,Ae.Final]);n.push(r),l=c(t.callFn([]))}else if(Dn(e)){const t=Bn(e.delegateDeps,e.injectFn,e.target===On.Pipe);l=c(new(e.delegateType===Ln.Class?se:ne)(e.delegate,t))}else l=function(e){return void 0!==e.expression}(e)?c(e.expression):i;return o.push(null!==l?new Re(l):De(yt.invalidFactory).callFn([]).toStmt()),{factory:qe([new ye("t",B)],o,D,void 0,e.name+"_Factory"),statements:n,type:$e(De(yt.FactoryDef,[xt(e.type.type,e.typeArgumentCount),s]))}}function Bn(e,t,n){return e.map((e,s)=>function(e,t,n,s){switch(e.resolved){case Rn.Token:case Rn.ChangeDetectorRef:const r=0|(e.self?2:0)|(e.skipSelf?4:0)|(e.host?1:0)|(e.optional?8:0);let i=0!==r||e.optional?We(r):null;if(n&&e.resolved===Rn.ChangeDetectorRef)return De(yt.injectPipeChangeDetectorRef).callFn(i?[i]:[]);const a=[e.token];return i&&a.push(i),De(t).callFn(a);case Rn.Attribute:return De(yt.injectAttribute).callFn([e.token]);case Rn.Invalid:return De(yt.invalidFactoryDep).callFn([We(s)]);default:return wn("Unknown R3ResolvedDependencyType: "+Rn[e.resolved])}}(e,t,n,s))}function Dn(e){return void 0!==e.delegateType}function $n(e,t){return{statements:[],factory:e.node===t.node?t.prop("ɵfac"):qe([new ye("t",B)],[new Re(t.callMethod("ɵfac",[Be("t")]))])}}!function(e){e[e.Class=0]="Class",e[e.Function=1]="Function",e[e.Factory=2]="Factory"}(Ln||(Ln={})),function(e){e[e.Directive=0]="Directive",e[e.Component=1]="Component",e[e.Injectable=2]="Injectable",e[e.Pipe=3]="Pipe",e[e.NgModule=4]="NgModule"}(On||(On={})),function(e){e[e.Token=0]="Token",e[e.Attribute=1]="Attribute",e[e.ChangeDetectorRef=2]="ChangeDetectorRef",e[e.Invalid=3]="Invalid"}(Rn||(Rn={}));const Vn=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];class Un{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected 'interpolation' to be an array, [start, end].");if(null!=t){const e=t[0],n=t[1];Vn.forEach(t=>{if(t.test(e)||t.test(n))throw new Error(`['${e}', '${n}'] contains unusable interpolation symbol.`)})}}(0,e),new Un(e[0],e[1])):jn}}const jn=new Un("{{","}}");class qn{constructor(e=null){this.file=e,this.sourcesContent=new Map,this.lines=[],this.lastCol0=0,this.hasMappings=!1}addSource(e,t=null){return this.sourcesContent.has(e)||this.sourcesContent.set(e,t),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(e,t,n,s){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(null!=t&&!this.sourcesContent.has(t))throw new Error(`Unknown source file "${t}"`);if(null==e)throw new Error("The column in the generated code must be provided");if(e<this.lastCol0)throw new Error("Mapping should be added in output order");if(t&&(null==n||null==s))throw new Error("The source location must be provided when a source url is provided");return this.hasMappings=!0,this.lastCol0=e,this.currentLine.push({col0:e,sourceUrl:t,sourceLine0:n,sourceCol0:s}),this}get currentLine(){return this.lines.slice(-1)[0]}toJSON(){if(!this.hasMappings)return null;const e=new Map,t=[],n=[];Array.from(this.sourcesContent.keys()).forEach((s,r)=>{e.set(s,r),t.push(s),n.push(this.sourcesContent.get(s)||null)});let s="",r=0,i=0,a=0,o=0;return this.lines.forEach(t=>{r=0,s+=t.map(t=>{let n=Hn(t.col0-r);return r=t.col0,null!=t.sourceUrl&&(n+=Hn(e.get(t.sourceUrl)-i),i=e.get(t.sourceUrl),n+=Hn(t.sourceLine0-a),a=t.sourceLine0,n+=Hn(t.sourceCol0-o),o=t.sourceCol0),n}).join(","),s+=";"}),s=s.slice(0,-1),{file:this.file||"",version:3,sourceRoot:"",sources:t,sourcesContent:n,mappings:s}}toJsComment(){return this.hasMappings?"//# sourceMappingURL=data:application/json;base64,"+function(e){let t="";e=Ze(e);for(let n=0;n<e.length;){const s=e.charCodeAt(n++),r=e.charCodeAt(n++),i=e.charCodeAt(n++);t+=Wn(s>>2),t+=Wn((3&s)<<4|(isNaN(r)?0:r>>4)),t+=isNaN(r)?"=":Wn((15&r)<<2|i>>6),t+=isNaN(r)||isNaN(i)?"=":Wn(63&i)}return t}(JSON.stringify(this,null,0)):""}}function Hn(e){e=e<0?1+(-e<<1):e<<1;let t="";do{let n=31&e;(e>>=5)>0&&(n|=32),t+=Wn(n)}while(e>0);return t}function Wn(e){if(e<0||e>=64)throw new Error("Can only encode value in the range [0, 63]");return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e]}const zn=/'|\\|\n|\r|\$/g,Kn=/^[$A-Z_][0-9A-Z_$]*$/i,Xn=Be("error",null,null),Gn=Be("stack",null,null);class Qn{constructor(e){this.indent=e,this.partsLength=0,this.parts=[],this.srcSpans=[]}}class Yn{constructor(e){this._indent=e,this._classes=[],this._preambleLineCount=0,this._lines=[new Qn(e)]}static createRoot(){return new Yn(0)}get _currentLine(){return this._lines[this._lines.length-1]}println(e,t=""){this.print(e||null,t,!0)}lineIsEmpty(){return 0===this._currentLine.parts.length}lineLength(){return this._currentLine.indent*" ".length+this._currentLine.partsLength}print(e,t,n=!1){t.length>0&&(this._currentLine.parts.push(t),this._currentLine.partsLength+=t.length,this._currentLine.srcSpans.push(e&&e.sourceSpan||null)),n&&this._lines.push(new Qn(this._indent))}removeEmptyLastLine(){this.lineIsEmpty()&&this._lines.pop()}incIndent(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}decIndent(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}pushClass(e){this._classes.push(e)}popClass(){return this._classes.pop()}get currentClass(){return this._classes.length>0?this._classes[this._classes.length-1]:null}toSource(){return this.sourceLines.map(e=>e.parts.length>0?Zn(e.indent)+e.parts.join(""):"").join("\n")}toSourceMapGenerator(e,t=0){const n=new qn(e);let s=!1;const r=()=>{s||(n.addSource(e," ").addMapping(0,e,0,0),s=!0)};for(let e=0;e<t;e++)n.addLine(),r();return this.sourceLines.forEach((e,t)=>{n.addLine();const i=e.srcSpans,a=e.parts;let o=e.indent*" ".length,l=0;for(;l<i.length&&!i[l];)o+=a[l].length,l++;for(l<i.length&&0===t&&0===o?s=!0:r();l<i.length;){const e=i[l],t=e.start.file,s=e.start.line,r=e.start.col;for(n.addSource(t.url,t.content).addMapping(o,t.url,s,r),o+=a[l].length,l++;l<i.length&&(e===i[l]||!i[l]);)o+=a[l].length,l++}}),n}setPreambleLineCount(e){return this._preambleLineCount=e}spanOf(e,t){const n=this._lines[e-this._preambleLineCount];if(n){let e=t-Zn(n.indent).length;for(let t=0;t<n.parts.length;t++){const s=n.parts[t];if(s.length>e)return n.srcSpans[t];e-=s.length}}return null}get sourceLines(){return this._lines.length&&0===this._lines[this._lines.length-1].parts.length?this._lines.slice(0,-1):this._lines}}function Jn(e,t,n=!0){if(null==e)return null;const s=e.replace(zn,(...e)=>"$"==e[0]?t?"\\$":"$":"\n"==e[0]?"\\n":"\r"==e[0]?"\\r":"\\"+e[0]);return n||!Kn.test(s)?`'${s}'`:s}function Zn(e){let t="";for(let n=0;n<e;n++)t+=" ";return t}class es{evaluateStatements(e,t,n,s){const r=new ts(n),i=Yn.createRoot();return t.length>0&&!t[0].isEquivalent(We("use strict").toStmt())&&(t=[We("use strict").toStmt(),...t]),r.visitAllStatements(t,i),r.createReturnStmt(i),this.evaluateCode(e,i,r.getArgs(),s)}evaluateCode(e,t,n,s){let r=`"use strict";${t.toSource()}\n//# sourceURL=${e}`;const i=[],a=[];for(const e in n)a.push(n[e]),i.push(e);if(s){const n=new Function(...i.concat("return null;")).toString(),s=n.slice(0,n.indexOf("return null;")).split("\n").length-1;r+="\n"+t.toSourceMapGenerator(e,s).toJsComment()}const o=new Function(...i.concat(r));return this.executeFunction(o,a)}executeFunction(e,t){return e(...t)}}class ts extends class extends class{constructor(e){this._escapeDollarInStrings=e}printLeadingComments(e,t){if(void 0!==e.leadingComments)for(const n of e.leadingComments)n instanceof Pe?t.print(e,`/*${n.toString()}*/`,n.trailingNewline):n.multiline?t.print(e,`/* ${n.text} */`,n.trailingNewline):n.text.split("\n").forEach(n=>{t.println(e,"// "+n)})}visitExpressionStmt(e,t){return this.printLeadingComments(e,t),e.expr.visitExpression(this,t),t.println(e,";"),null}visitReturnStmt(e,t){return this.printLeadingComments(e,t),t.print(e,"return "),e.value.visitExpression(this,t),t.println(e,";"),null}visitIfStmt(e,t){this.printLeadingComments(e,t),t.print(e,"if ("),e.condition.visitExpression(this,t),t.print(e,") {");const n=null!=e.falseCase&&e.falseCase.length>0;return e.trueCase.length<=1&&!n?(t.print(e," "),this.visitAllStatements(e.trueCase,t),t.removeEmptyLastLine(),t.print(e," ")):(t.println(),t.incIndent(),this.visitAllStatements(e.trueCase,t),t.decIndent(),n&&(t.println(e,"} else {"),t.incIndent(),this.visitAllStatements(e.falseCase,t),t.decIndent())),t.println(e,"}"),null}visitThrowStmt(e,t){return this.printLeadingComments(e,t),t.print(e,"throw "),e.error.visitExpression(this,t),t.println(e,";"),null}visitWriteVarExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),t.print(e,e.name+" = "),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitWriteKeyExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),e.receiver.visitExpression(this,t),t.print(e,"["),e.index.visitExpression(this,t),t.print(e,"] = "),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitWritePropExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),e.receiver.visitExpression(this,t),t.print(e,`.${e.name} = `),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitInvokeMethodExpr(e,t){e.receiver.visitExpression(this,t);let n=e.name;return null!=e.builtin&&(n=this.getBuiltinMethodName(e.builtin),null==n)||(t.print(e,`.${n}(`),this.visitAllExpressions(e.args,t,","),t.print(e,")")),null}visitInvokeFunctionExpr(e,t){return e.fn.visitExpression(this,t),t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null}visitWrappedNodeExpr(e,t){throw new Error("Abstract emitter cannot visit WrappedNodeExpr.")}visitTypeofExpr(e,t){t.print(e,"typeof "),e.expr.visitExpression(this,t)}visitReadVarExpr(e,t){let n=e.name;if(null!=e.builtin)switch(e.builtin){case W.Super:n="super";break;case W.This:n="this";break;case W.CatchError:n=Xn.name;break;case W.CatchStack:n=Gn.name;break;default:throw new Error("Unknown builtin variable "+e.builtin)}return t.print(e,n),null}visitInstantiateExpr(e,t){return t.print(e,"new "),e.classExpr.visitExpression(this,t),t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null}visitLiteralExpr(e,t){const n=e.value;return t.print(e,"string"==typeof n?Jn(n,this._escapeDollarInStrings):""+n),null}visitLocalizedString(e,t){const n=e.serializeI18nHead();t.print(e,"$localize `"+n.raw);for(let n=1;n<e.messageParts.length;n++)t.print(e,"${"),e.expressions[n-1].visitExpression(this,t),t.print(e,"}"+e.serializeI18nTemplatePart(n).raw);return t.print(e,"`"),null}visitConditionalExpr(e,t){return t.print(e,"("),e.condition.visitExpression(this,t),t.print(e,"? "),e.trueCase.visitExpression(this,t),t.print(e,": "),e.falseCase.visitExpression(this,t),t.print(e,")"),null}visitNotExpr(e,t){return t.print(e,"!"),e.condition.visitExpression(this,t),null}visitAssertNotNullExpr(e,t){return e.condition.visitExpression(this,t),null}visitUnaryOperatorExpr(e,t){let n;switch(e.operator){case q.Plus:n="+";break;case q.Minus:n="-";break;default:throw new Error("Unknown operator "+e.operator)}return e.parens&&t.print(e,"("),t.print(e,n),e.expr.visitExpression(this,t),e.parens&&t.print(e,")"),null}visitBinaryOperatorExpr(e,t){let n;switch(e.operator){case H.Equals:n="==";break;case H.Identical:n="===";break;case H.NotEquals:n="!=";break;case H.NotIdentical:n="!==";break;case H.And:n="&&";break;case H.BitwiseAnd:n="&";break;case H.Or:n="||";break;case H.Plus:n="+";break;case H.Minus:n="-";break;case H.Divide:n="/";break;case H.Multiply:n="*";break;case H.Modulo:n="%";break;case H.Lower:n="<";break;case H.LowerEquals:n="<=";break;case H.Bigger:n=">";break;case H.BiggerEquals:n=">=";break;default:throw new Error("Unknown operator "+e.operator)}return e.parens&&t.print(e,"("),e.lhs.visitExpression(this,t),t.print(e,` ${n} `),e.rhs.visitExpression(this,t),e.parens&&t.print(e,")"),null}visitReadPropExpr(e,t){return e.receiver.visitExpression(this,t),t.print(e,"."),t.print(e,e.name),null}visitReadKeyExpr(e,t){return e.receiver.visitExpression(this,t),t.print(e,"["),e.index.visitExpression(this,t),t.print(e,"]"),null}visitLiteralArrayExpr(e,t){return t.print(e,"["),this.visitAllExpressions(e.entries,t,","),t.print(e,"]"),null}visitLiteralMapExpr(e,t){return t.print(e,"{"),this.visitAllObjects(n=>{t.print(e,Jn(n.key,this._escapeDollarInStrings,n.quoted)+":"),n.value.visitExpression(this,t)},e.entries,t,","),t.print(e,"}"),null}visitCommaExpr(e,t){return t.print(e,"("),this.visitAllExpressions(e.parts,t,","),t.print(e,")"),null}visitAllExpressions(e,t,n){this.visitAllObjects(e=>e.visitExpression(this,t),e,t,n)}visitAllObjects(e,t,n,s){let r=!1;for(let i=0;i<t.length;i++)i>0&&(n.lineLength()>80?(n.print(null,s,!0),r||(n.incIndent(),n.incIndent(),r=!0)):n.print(null,s,!1)),e(t[i]);r&&(n.decIndent(),n.decIndent())}visitAllStatements(e,t){e.forEach(e=>e.visitStatement(this,t))}}{constructor(){super(!1)}visitDeclareClassStmt(e,t){return t.pushClass(e),this._visitClassConstructor(e,t),null!=e.parent&&(t.print(e,e.name+".prototype = Object.create("),e.parent.visitExpression(this,t),t.println(e,".prototype);")),e.getters.forEach(n=>this._visitClassGetter(e,n,t)),e.methods.forEach(n=>this._visitClassMethod(e,n,t)),t.popClass(),null}_visitClassConstructor(e,t){t.print(e,`function ${e.name}(`),null!=e.constructorMethod&&this._visitParams(e.constructorMethod.params,t),t.println(e,") {"),t.incIndent(),null!=e.constructorMethod&&e.constructorMethod.body.length>0&&(t.println(e,"var self = this;"),this.visitAllStatements(e.constructorMethod.body,t)),t.decIndent(),t.println(e,"}")}_visitClassGetter(e,t,n){n.println(e,`Object.defineProperty(${e.name}.prototype, '${t.name}', { get: function() {`),n.incIndent(),t.body.length>0&&(n.println(e,"var self = this;"),this.visitAllStatements(t.body,n)),n.decIndent(),n.println(e,"}});")}_visitClassMethod(e,t,n){n.print(e,`${e.name}.prototype.${t.name} = function(`),this._visitParams(t.params,n),n.println(e,") {"),n.incIndent(),t.body.length>0&&(n.println(e,"var self = this;"),this.visitAllStatements(t.body,n)),n.decIndent(),n.println(e,"};")}visitWrappedNodeExpr(e,t){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitReadVarExpr(e,t){if(e.builtin===W.This)t.print(e,"self");else{if(e.builtin===W.Super)throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");super.visitReadVarExpr(e,t)}return null}visitDeclareVarStmt(e,t){return t.print(e,"var "+e.name),e.value&&(t.print(e," = "),e.value.visitExpression(this,t)),t.println(e,";"),null}visitCastExpr(e,t){return e.value.visitExpression(this,t),null}visitInvokeFunctionExpr(e,t){const n=e.fn;return n instanceof G&&n.builtin===W.Super?(t.currentClass.parent.visitExpression(this,t),t.print(e,".call(this"),e.args.length>0&&(t.print(e,", "),this.visitAllExpressions(e.args,t,",")),t.print(e,")")):super.visitInvokeFunctionExpr(e,t),null}visitFunctionExpr(e,t){return t.print(e,`function${e.name?" "+e.name:""}(`),this._visitParams(e.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print(e,"}"),null}visitDeclareFunctionStmt(e,t){return t.print(e,`function ${e.name}(`),this._visitParams(e.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println(e,"}"),null}visitTryCatchStmt(e,t){t.println(e,"try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println(e,`} catch (${Xn.name}) {`),t.incIndent();const n=[Gn.set(Xn.prop("stack")).toDeclStmt(null,[Ae.Final])].concat(e.catchStmts);return this.visitAllStatements(n,t),t.decIndent(),t.println(e,"}"),null}visitLocalizedString(e,t){t.print(e,'$localize((this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})(');const n=[e.serializeI18nHead()];for(let t=1;t<e.messageParts.length;t++)n.push(e.serializeI18nTemplatePart(t));return t.print(e,`[${n.map(e=>Jn(e.cooked,!1)).join(", ")}], `),t.print(e,`[${n.map(e=>Jn(e.raw,!1)).join(", ")}])`),e.expressions.forEach(n=>{t.print(e,", "),n.visitExpression(this,t)}),t.print(e,")"),null}_visitParams(e,t){this.visitAllObjects(e=>t.print(null,e.name),e,t,",")}getBuiltinMethodName(e){let t;switch(e){case z.ConcatArray:t="concat";break;case z.SubscribeObservable:t="subscribe";break;case z.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t}}{constructor(e){super(),this.reflector=e,this._evalArgNames=[],this._evalArgValues=[],this._evalExportedVars=[]}createReturnStmt(e){new Re(new Te(this._evalExportedVars.map(e=>new be(e,Be(e),!1)))).visitStatement(this,e)}getArgs(){const e={};for(let t=0;t<this._evalArgNames.length;t++)e[this._evalArgNames[t]]=this._evalArgValues[t];return e}visitExternalExpr(e,t){return this._emitReferenceToExternal(e,this.reflector.resolveExternalReference(e.value),t),null}visitWrappedNodeExpr(e,t){return this._emitReferenceToExternal(e,e.node,t),null}visitDeclareVarStmt(e,t){return e.hasModifier(Ae.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareVarStmt(e,t)}visitDeclareFunctionStmt(e,t){return e.hasModifier(Ae.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareFunctionStmt(e,t)}visitDeclareClassStmt(e,t){return e.hasModifier(Ae.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareClassStmt(e,t)}_emitReferenceToExternal(e,t,n){let s=this._evalArgValues.indexOf(t);if(-1===s){s=this._evalArgValues.length,this._evalArgValues.push(t);const e=function(e){if(!e||!e.reference)return null;const t=e.reference;if(t instanceof class{constructor(e,t,n){this.filePath=e,this.name=t,this.members=n}assertNoMembers(){if(this.members.length)throw new Error(`Illegal state: symbol without members expected, but got ${JSON.stringify(this)}.`)}})return t.name;if(t.__anonymousType)return t.__anonymousType;let n=et(t);return n.indexOf("(")>=0?(n="anonymous_"+gt++,t.__anonymousType=n):n=mt(n),n}({reference:t})||"val";this._evalArgNames.push(`jit_${e}_${s}`)}n.print(e,this._evalArgNames[s])}}function ns(e){return e>=9&&e<=32||160==e}function ss(e){return 48<=e&&e<=57}function rs(e){return e>=97&&e<=122||e>=65&&e<=90}function is(e){return 10===e||13===e}function as(e){return 48<=e&&e<=55}class os{constructor(e,t,n,s){this.file=e,this.offset=t,this.line=n,this.col=s}toString(){return null!=this.offset?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){const t=this.file.content,n=t.length;let s=this.offset,r=this.line,i=this.col;for(;s>0&&e<0;)if(s--,e++,10==t.charCodeAt(s)){r--;const e=t.substr(0,s-1).lastIndexOf(String.fromCharCode(10));i=e>0?s-e:s}else i--;for(;s<n&&e>0;){const n=t.charCodeAt(s);s++,e--,10==n?(r++,i=0):i++}return new os(this.file,s,r,i)}getContext(e,t){const n=this.file.content;let s=this.offset;if(null!=s){s>n.length-1&&(s=n.length-1);let r=s,i=0,a=0;for(;i<e&&s>0&&(s--,i++,"\n"!=n[s]||++a!=t););for(i=0,a=0;i<e&&r<n.length-1&&(r++,i++,"\n"!=n[r]||++a!=t););return{before:n.substring(s,this.offset),after:n.substring(this.offset,r+1)}}return null}}class ls{constructor(e,t){this.content=e,this.url=t}}class cs{constructor(e,t,n=e,s=null){this.start=e,this.end=t,this.fullStart=n,this.details=s}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}var us,ps,hs,ds;!function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(us||(us={}));class ms{constructor(e,t,n=us.ERROR){this.span=e,this.msg=t,this.level=n}contextualMessage(){const e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${us[this.level]} ->]${e.after}")`:this.msg}toString(){const e=this.span.details?", "+this.span.details:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}}class gs{constructor(e){this.context=e}resolveExternalReference(e){if("@angular/core"!==e.moduleName)throw new Error(`Cannot resolve external reference to ${e.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(e.name))throw new Error(`No value provided for @angular/core symbol '${e.name}'.`);return this.context[e.name]}parameters(e){throw new Error("Not implemented.")}annotations(e){throw new Error("Not implemented.")}shallowAnnotations(e){throw new Error("Not implemented.")}tryAnnotations(e){throw new Error("Not implemented.")}propMetadata(e){throw new Error("Not implemented.")}hasLifecycleHook(e,t){throw new Error("Not implemented.")}guards(e){throw new Error("Not implemented.")}componentModuleUrl(e,t){throw new Error("Not implemented.")}}function vs(e,t=!1){return je(Object.keys(e).map(n=>({key:n,quoted:t,value:e[n]})))}function fs(e){const t=e.map(e=>Ve(e.type));return e.length>0?$e(Ue(t)):j}function ys(e,t){const n=Ue(e.map(e=>e.value));return t?qe([],[new Re(n)]):n}class Ss{constructor(e,t,n,s){this.input=t,this.errLocation=n,this.ctxLocation=s,this.message=`Parser Error: ${e} ${n} [${t}] in ${s}`}}class xs{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new zs(e+this.start,e+this.end)}}class Es{constructor(e,t){this.span=e,this.sourceSpan=t}visit(e,t=null){return null}toString(){return"AST"}}class _s extends Es{constructor(e,t,n){super(e,t),this.nameSpan=n}}class Cs extends Es{constructor(e,t,n,s,r){super(e,t),this.prefix=n,this.uninterpretedExpression=s,this.location=r}visit(e,t=null){return e.visitQuote(this,t)}toString(){return"Quote"}}class ws extends Es{visit(e,t=null){}}class bs extends Es{visit(e,t=null){return e.visitImplicitReceiver(this,t)}}class Ts extends bs{visit(e,t=null){var n;return null===(n=e.visitThisReceiver)||void 0===n?void 0:n.call(e,this,t)}}class Is extends Es{constructor(e,t,n){super(e,t),this.expressions=n}visit(e,t=null){return e.visitChain(this,t)}}class Ns extends Es{constructor(e,t,n,s,r){super(e,t),this.condition=n,this.trueExp=s,this.falseExp=r}visit(e,t=null){return e.visitConditional(this,t)}}class As extends _s{constructor(e,t,n,s,r){super(e,t,n),this.receiver=s,this.name=r}visit(e,t=null){return e.visitPropertyRead(this,t)}}class Ps extends _s{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.value=i}visit(e,t=null){return e.visitPropertyWrite(this,t)}}class ks extends _s{constructor(e,t,n,s,r){super(e,t,n),this.receiver=s,this.name=r}visit(e,t=null){return e.visitSafePropertyRead(this,t)}}class Ms extends Es{constructor(e,t,n,s){super(e,t),this.obj=n,this.key=s}visit(e,t=null){return e.visitKeyedRead(this,t)}}class Ls extends Es{constructor(e,t,n,s,r){super(e,t),this.obj=n,this.key=s,this.value=r}visit(e,t=null){return e.visitKeyedWrite(this,t)}}class Os extends _s{constructor(e,t,n,s,r,i){super(e,t,i),this.exp=n,this.name=s,this.args=r}visit(e,t=null){return e.visitPipe(this,t)}}class Rs extends Es{constructor(e,t,n){super(e,t),this.value=n}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}}class Fs extends Es{constructor(e,t,n){super(e,t),this.expressions=n}visit(e,t=null){return e.visitLiteralArray(this,t)}}class Bs extends Es{constructor(e,t,n,s){super(e,t),this.keys=n,this.values=s}visit(e,t=null){return e.visitLiteralMap(this,t)}}class Ds extends Es{constructor(e,t,n,s){super(e,t),this.strings=n,this.expressions=s}visit(e,t=null){return e.visitInterpolation(this,t)}}class $s extends Es{constructor(e,t,n,s,r){super(e,t),this.operation=n,this.left=s,this.right=r}visit(e,t=null){return e.visitBinary(this,t)}}class Vs extends $s{constructor(e,t,n,s,r,i,a){super(e,t,r,i,a),this.operator=n,this.expr=s}static createMinus(e,t,n){return new Vs(e,t,"-",n,"-",new Rs(e,t,0),n)}static createPlus(e,t,n){return new Vs(e,t,"+",n,"-",n,new Rs(e,t,0))}visit(e,t=null){return void 0!==e.visitUnary?e.visitUnary(this,t):e.visitBinary(this,t)}}class Us extends Es{constructor(e,t,n){super(e,t),this.expression=n}visit(e,t=null){return e.visitPrefixNot(this,t)}}class js extends Es{constructor(e,t,n){super(e,t),this.expression=n}visit(e,t=null){return e.visitNonNullAssert(this,t)}}class qs extends _s{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.args=i}visit(e,t=null){return e.visitMethodCall(this,t)}}class Hs extends _s{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.args=i}visit(e,t=null){return e.visitSafeMethodCall(this,t)}}class Ws extends Es{constructor(e,t,n,s){super(e,t),this.target=n,this.args=s}visit(e,t=null){return e.visitFunctionCall(this,t)}}class zs{constructor(e,t){this.start=e,this.end=t}}class Ks extends Es{constructor(e,t,n,s,r){super(new xs(0,null===t?0:t.length),new zs(s,null===t?s:s+t.length)),this.ast=e,this.source=t,this.location=n,this.errors=r}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}}class Xs{constructor(e,t,n){this.sourceSpan=e,this.key=t,this.value=n}}class Gs{constructor(e,t,n){this.sourceSpan=e,this.key=t,this.value=n}}class Qs{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitFunctionCall(e,t){e.target&&this.visit(e.target,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.obj,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.obj,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitPrefixNot(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitQuote(e,t){}visitAll(e,t){for(const n of e)this.visit(n,t)}}class Ys{constructor(e,t,n,s,r,i){this.name=e,this.expression=t,this.type=n,this.sourceSpan=s,this.keySpan=r,this.valueSpan=i,this.isLiteral=this.type===ps.LITERAL_ATTR,this.isAnimation=this.type===ps.ANIMATION}}!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LITERAL_ATTR=1]="LITERAL_ATTR",e[e.ANIMATION=2]="ANIMATION"}(ps||(ps={}));class Js{constructor(e,t,n,s,r,i){this.name=e,this.targetOrPhase=t,this.type=n,this.handler=s,this.sourceSpan=r,this.handlerSpan=i}}class Zs{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.keySpan=s,this.valueSpan=r}}class er{constructor(e,t,n,s,r,i,a,o){this.name=e,this.type=t,this.securityContext=n,this.value=s,this.unit=r,this.sourceSpan=i,this.keySpan=a,this.valueSpan=o}}class tr{}tr.event=Be("$event");class nr{constructor(e,t){this.stmts=e,this.allowDefault=t,this.render3Stmts=e.map(e=>e instanceof Me&&e.name==t.name&&e.value instanceof Ee?new Re(e.value.lhs.value):e)}}class sr{constructor(e,t){this.stmts=e,this.currValExpr=t}}function rr(e,t,n,s,r,i){e||(e=new hr);const a=new pr(e,t,s,i),o=n.visit(a,ds.Expression),l=ir(a,s);if(a.usesImplicitReceiver&&e.notifyImplicitReceiverUse(),0===a.temporaryCount&&r==hs.TrySimple)return new sr([],o);if(r===hs.Expression)return new sr(l,o);const c=function(e){return Be("currVal_"+e)}(s);return l.push(c.set(o).toDeclStmt(B,[Ae.Final])),new sr(l,c)}function ir(e,t){const n=[];for(let s=0;s<e.temporaryCount;s++)n.push(or(t,s));return n}function ar(e,t){return`tmp_${e}_${t}`}function or(e,t){return new Me(ar(e,t),Ie)}function lr(e,t){if(e!==ds.Expression)throw new Error("Expected an expression, but saw "+t)}function cr(e,t){return e===ds.Statement?t.toStmt():t}!function(e){e[e.General=0]="General",e[e.TrySimple=1]="TrySimple",e[e.Expression=2]="Expression"}(hs||(hs={})),function(e){e[e.Statement=0]="Statement",e[e.Expression=1]="Expression"}(ds||(ds={}));class ur extends class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){return new Ds(e.span,e.sourceSpan,e.strings,this.visitAll(e.expressions))}visitLiteralPrimitive(e,t){return new Rs(e.span,e.sourceSpan,e.value)}visitPropertyRead(e,t){return new As(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitPropertyWrite(e,t){return new Ps(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,e.value.visit(this))}visitSafePropertyRead(e,t){return new ks(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitMethodCall(e,t){return new qs(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args))}visitSafeMethodCall(e,t){return new Hs(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args))}visitFunctionCall(e,t){return new Ws(e.span,e.sourceSpan,e.target.visit(this),this.visitAll(e.args))}visitLiteralArray(e,t){return new Fs(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitLiteralMap(e,t){return new Bs(e.span,e.sourceSpan,e.keys,this.visitAll(e.values))}visitUnary(e,t){switch(e.operator){case"+":return Vs.createPlus(e.span,e.sourceSpan,e.expr.visit(this));case"-":return Vs.createMinus(e.span,e.sourceSpan,e.expr.visit(this));default:throw new Error("Unknown unary operator "+e.operator)}}visitBinary(e,t){return new $s(e.span,e.sourceSpan,e.operation,e.left.visit(this),e.right.visit(this))}visitPrefixNot(e,t){return new Us(e.span,e.sourceSpan,e.expression.visit(this))}visitNonNullAssert(e,t){return new js(e.span,e.sourceSpan,e.expression.visit(this))}visitConditional(e,t){return new Ns(e.span,e.sourceSpan,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))}visitPipe(e,t){return new Os(e.span,e.sourceSpan,e.exp.visit(this),e.name,this.visitAll(e.args),e.nameSpan)}visitKeyedRead(e,t){return new Ms(e.span,e.sourceSpan,e.obj.visit(this),e.key.visit(this))}visitKeyedWrite(e,t){return new Ls(e.span,e.sourceSpan,e.obj.visit(this),e.key.visit(this),e.value.visit(this))}visitAll(e){const t=[];for(let n=0;n<e.length;++n)t[n]=e[n].visit(this);return t}visitChain(e,t){return new Is(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitQuote(e,t){return new Cs(e.span,e.sourceSpan,e.prefix,e.uninterpretedExpression,e.location)}}{constructor(e){super(),this._converterFactory=e}visitPipe(e,t){const n=[e.exp,...e.args].map(e=>e.visit(this,t));return new dr(e.span,e.sourceSpan,n,this._converterFactory.createPipeConverter(e.name,n.length))}visitLiteralArray(e,t){const n=e.expressions.map(e=>e.visit(this,t));return new dr(e.span,e.sourceSpan,n,this._converterFactory.createLiteralArrayConverter(e.expressions.length))}visitLiteralMap(e,t){const n=e.values.map(e=>e.visit(this,t));return new dr(e.span,e.sourceSpan,n,this._converterFactory.createLiteralMapConverter(e.keys))}}class pr{constructor(e,t,n,s,r,i){this._localResolver=e,this._implicitReceiver=t,this.bindingId=n,this.interpolationFunction=s,this.baseSourceSpan=r,this.implicitReceiverAccesses=i,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0,this.usesImplicitReceiver=!1}visitUnary(e,t){let n;switch(e.operator){case"+":n=q.Plus;break;case"-":n=q.Minus;break;default:throw new Error("Unsupported operator "+e.operator)}return cr(t,new xe(n,this._visit(e.expr,ds.Expression),void 0,this.convertSourceSpan(e.span)))}visitBinary(e,t){let n;switch(e.operation){case"+":n=H.Plus;break;case"-":n=H.Minus;break;case"*":n=H.Multiply;break;case"/":n=H.Divide;break;case"%":n=H.Modulo;break;case"&&":n=H.And;break;case"||":n=H.Or;break;case"==":n=H.Equals;break;case"!=":n=H.NotEquals;break;case"===":n=H.Identical;break;case"!==":n=H.NotIdentical;break;case"<":n=H.Lower;break;case">":n=H.Bigger;break;case"<=":n=H.LowerEquals;break;case">=":n=H.BiggerEquals;break;default:throw new Error("Unsupported operation "+e.operation)}return cr(t,new Ee(n,this._visit(e.left,ds.Expression),this._visit(e.right,ds.Expression),void 0,this.convertSourceSpan(e.span)))}visitChain(e,t){return function(e,t){if(e!==ds.Statement)throw new Error("Expected a statement, but saw "+t)}(t,e),this.visitAll(e.expressions,t)}visitConditional(e,t){return cr(t,this._visit(e.condition,ds.Expression).conditional(this._visit(e.trueExp,ds.Expression),this._visit(e.falseExp,ds.Expression),this.convertSourceSpan(e.span)))}visitPipe(e,t){throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: "+e.name)}visitFunctionCall(e,t){const n=this.visitAll(e.args,ds.Expression);let s;return s=e instanceof dr?e.converter(n):this._visit(e.target,ds.Expression).callFn(n,this.convertSourceSpan(e.span)),cr(t,s)}visitImplicitReceiver(e,t){return lr(t,e),this.usesImplicitReceiver=!0,this._implicitReceiver}visitThisReceiver(e,t){return this.visitImplicitReceiver(e,t)}visitInterpolation(e,t){lr(t,e);const n=[We(e.expressions.length)];for(let t=0;t<e.strings.length-1;t++)n.push(We(e.strings[t])),n.push(this._visit(e.expressions[t],ds.Expression));return n.push(We(e.strings[e.strings.length-1])),this.interpolationFunction?this.interpolationFunction(n):e.expressions.length<=9?De(dt.inlineInterpolate).callFn(n):De(dt.interpolate).callFn([n[0],Ue(n.slice(1),void 0,this.convertSourceSpan(e.span))])}visitKeyedRead(e,t){const n=this.leftMostSafeNode(e);return n?this.convertSafeAccess(e,n,t):cr(t,this._visit(e.obj,ds.Expression).key(this._visit(e.key,ds.Expression)))}visitKeyedWrite(e,t){const n=this._visit(e.obj,ds.Expression),s=this._visit(e.key,ds.Expression),r=this._visit(e.value,ds.Expression);return cr(t,n.key(s).set(r))}visitLiteralArray(e,t){throw new Error("Illegal State: literal arrays should have been converted into functions")}visitLiteralMap(e,t){throw new Error("Illegal State: literal maps should have been converted into functions")}visitLiteralPrimitive(e,t){return cr(t,We(e.value,null==e.value||!0===e.value||!0===e.value?D:void 0,this.convertSourceSpan(e.span)))}_getLocal(e,t){var n;return(null===(n=this._localResolver.globals)||void 0===n?void 0:n.has(e))&&t instanceof Ts?null:this._localResolver.getLocal(e)}visitMethodCall(e,t){if(e.receiver instanceof bs&&!(e.receiver instanceof Ts)&&"$any"===e.name){const t=this.visitAll(e.args,ds.Expression);if(1!=t.length)throw new Error("Invalid call to $any, expected 1 argument but received "+(t.length||"none"));return t[0].cast(B,this.convertSourceSpan(e.span))}const n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);{const n=this.visitAll(e.args,ds.Expression),s=this.usesImplicitReceiver;let r=null;const i=this._visit(e.receiver,ds.Expression);if(i===this._implicitReceiver){const t=this._getLocal(e.name,e.receiver);t&&(this.usesImplicitReceiver=s,r=t.callFn(n),this.addImplicitReceiverAccess(e.name))}return null==r&&(r=i.callMethod(e.name,n,this.convertSourceSpan(e.span))),cr(t,r)}}visitPrefixNot(e,t){return cr(t,(n=this._visit(e.expression,ds.Expression),new ge(n,void 0)));var n}visitNonNullAssert(e,t){return cr(t,(n=this._visit(e.expression,ds.Expression),new ve(n,void 0)));var n}visitPropertyRead(e,t){const n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);{let n=null;const s=this.usesImplicitReceiver,r=this._visit(e.receiver,ds.Expression);return r===this._implicitReceiver&&(n=this._getLocal(e.name,e.receiver),n&&(this.usesImplicitReceiver=s,this.addImplicitReceiverAccess(e.name))),null==n&&(n=r.prop(e.name)),cr(t,n)}}visitPropertyWrite(e,t){const n=this._visit(e.receiver,ds.Expression),s=this.usesImplicitReceiver;let r=null;if(n===this._implicitReceiver){const t=this._getLocal(e.name,e.receiver);if(t){if(!(t instanceof _e))throw new Error(`Cannot assign value "${e.value instanceof As?e.value.name:void 0}" to template variable "${e.name}". Template variables are read-only.`);r=t,this.usesImplicitReceiver=s,this.addImplicitReceiverAccess(e.name)}}return null===r&&(r=n.prop(e.name)),cr(t,r.set(this._visit(e.value,ds.Expression)))}visitSafePropertyRead(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)}visitSafeMethodCall(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)}visitAll(e,t){return e.map(e=>this._visit(e,t))}visitQuote(e,t){throw new Error(`Quotes are not supported for evaluation!\n Statement: ${e.uninterpretedExpression} located at ${e.location}`)}_visit(e,t){return this._resultMap.get(e)||(this._nodeMap.get(e)||e).visit(this,t)}convertSafeAccess(e,t,n){let s=this._visit(t.receiver,ds.Expression),r=void 0;this.needsTemporary(t.receiver)&&(r=this.allocateTemporary(),s=r.set(s),this._resultMap.set(t.receiver,r));const i=s.isBlank();this._nodeMap.set(t,t instanceof Hs?new qs(t.span,t.sourceSpan,t.nameSpan,t.receiver,t.name,t.args):new As(t.span,t.sourceSpan,t.nameSpan,t.receiver,t.name));const a=this._visit(e,ds.Expression);return this._nodeMap.delete(t),r&&this.releaseTemporary(r),cr(n,i.conditional(We(null),a))}leftMostSafeNode(e){const t=(e,t)=>(this._nodeMap.get(t)||t).visit(e);return e.visit({visitUnary:e=>null,visitBinary:e=>null,visitChain:e=>null,visitConditional:e=>null,visitFunctionCall:e=>null,visitImplicitReceiver:e=>null,visitThisReceiver:e=>null,visitInterpolation:e=>null,visitKeyedRead(e){return t(this,e.obj)},visitKeyedWrite:e=>null,visitLiteralArray:e=>null,visitLiteralMap:e=>null,visitLiteralPrimitive:e=>null,visitMethodCall(e){return t(this,e.receiver)},visitPipe:e=>null,visitPrefixNot:e=>null,visitNonNullAssert:e=>null,visitPropertyRead(e){return t(this,e.receiver)},visitPropertyWrite:e=>null,visitQuote:e=>null,visitSafeMethodCall(e){return t(this,e.receiver)||e},visitSafePropertyRead(e){return t(this,e.receiver)||e}})}needsTemporary(e){const t=(e,t)=>t&&(this._nodeMap.get(t)||t).visit(e);return e.visit({visitUnary(e){return t(this,e.expr)},visitBinary(e){return t(this,e.left)||t(this,e.right)},visitChain:e=>!1,visitConditional(e){return t(this,e.condition)||t(this,e.trueExp)||t(this,e.falseExp)},visitFunctionCall:e=>!0,visitImplicitReceiver:e=>!1,visitThisReceiver:e=>!1,visitInterpolation(e){return((e,n)=>n.some(n=>t(e,n)))(this,e.expressions)},visitKeyedRead:e=>!1,visitKeyedWrite:e=>!1,visitLiteralArray:e=>!0,visitLiteralMap:e=>!0,visitLiteralPrimitive:e=>!1,visitMethodCall:e=>!0,visitPipe:e=>!0,visitPrefixNot(e){return t(this,e.expression)},visitNonNullAssert(e){return t(this,e.expression)},visitPropertyRead:e=>!1,visitPropertyWrite:e=>!1,visitQuote:e=>!1,visitSafeMethodCall:e=>!0,visitSafePropertyRead:e=>!1})}allocateTemporary(){const e=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new G(ar(this.bindingId,e))}releaseTemporary(e){if(this._currentTemporary--,e.name!=ar(this.bindingId,this._currentTemporary))throw new Error(`Temporary ${e.name} released out of order`)}convertSourceSpan(e){if(this.baseSourceSpan){const t=this.baseSourceSpan.start.moveBy(e.start),n=this.baseSourceSpan.start.moveBy(e.end),s=this.baseSourceSpan.fullStart.moveBy(e.start);return new cs(t,n,s)}return null}addImplicitReceiverAccess(e){this.implicitReceiverAccesses&&this.implicitReceiverAccesses.add(e)}}class hr{constructor(e){this.globals=e}notifyImplicitReceiverUse(){}getLocal(e){return e===tr.event.name?tr.event:null}}class dr extends Ws{constructor(e,t,n,s){super(e,t,null,n),this.args=n,this.converter=s}}class mr{constructor(){this.strictStyling=!0}shimCssText(e,t,n=""){const s=e.match(Lr)||[];return e=function(e){return e.replace(Mr,"")}(e),e=this._insertDirectives(e),[this._scopeCssText(e,t,n),...s].join("\n")}_insertDirectives(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)}_insertPolyfillDirectivesInCssText(e){return e.replace(vr,function(...e){return e[2]+"{"})}_insertPolyfillRulesInCssText(e){return e.replace(fr,(...e)=>{const t=e[0].replace(e[1],"").replace(e[2],"");return e[4]+t})}_scopeCssText(e,t,n){const s=this._extractUnscopedRulesFromCssText(e);return e=this._insertPolyfillHostInCssText(e),e=this._convertColonHost(e),e=this._convertColonHostContext(e),e=this._convertShadowDOMSelectors(e),t&&(e=this._scopeSelectors(e,t,n)),(e=e+"\n"+s).trim()}_extractUnscopedRulesFromCssText(e){let t,n="";for(yr.lastIndex=0;null!==(t=yr.exec(e));)n+=t[0].replace(t[2],"").replace(t[1],t[4])+"\n\n";return n}_convertColonHost(e){return this._convertColonRule(e,_r,this._colonHostPartReplacer)}_convertColonHostContext(e){return this._convertColonRule(e,Cr,this._colonHostContextPartReplacer)}_convertColonRule(e,t,n){return e.replace(t,function(...e){if(e[2]){const t=e[2].split(","),s=[];for(let r=0;r<t.length;r++){const i=t[r].trim();if(!i)break;s.push(n(wr,i,e[3]))}return s.join(",")}return wr+e[3]})}_colonHostContextPartReplacer(e,t,n){return t.indexOf(Sr)>-1?this._colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n}_colonHostPartReplacer(e,t,n){return e+t.replace(Sr,"")+n}_convertShadowDOMSelectors(e){return Tr.reduce((e,t)=>e.replace(t," "),e)}_scopeSelectors(e,t,n){return function(e,t){const n=Vr(e,Br,"%QUOTED%"),s=Vr(n.escapedString,Fr,"%BLOCK%");let r=0,i=0;return s.escapedString.replace(Or,(...e)=>{const n=e[2];let i="",a=e[4],o="";a&&a.startsWith("{%BLOCK%")&&(i=s.blocks[r++],a=a.substring("%BLOCK%".length+1),o="{");const l=t(new Dr(n,i));return`${e[1]}${l.selector}${e[3]}${o}${l.content}${a}`}).replace(Rr,()=>n.blocks[i++])}(e,e=>{let s=e.selector,r=e.content;return"@"!=e.selector[0]?s=this._scopeSelector(e.selector,t,n,this.strictStyling):(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document"))&&(r=this._scopeSelectors(e.content,t,n)),new Dr(s,r)})}_scopeSelector(e,t,n,s){return e.split(",").map(e=>e.trim().split(Ir)).map(e=>{const[r,...i]=e;return[(e=>this._selectorNeedsScoping(e,t)?s?this._applyStrictSelectorScope(e,t,n):this._applySelectorScope(e,t,n):e)(r),...i].join(" ")}).join(", ")}_selectorNeedsScoping(e,t){return!this._makeScopeMatcher(t).test(e)}_makeScopeMatcher(e){return e=e.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+e+")"+Nr,"m")}_applySelectorScope(e,t,n){return this._applySimpleSelectorScope(e,t,n)}_applySimpleSelectorScope(e,t,n){if(Ar.lastIndex=0,Ar.test(e)){const s=this.strictStyling?`[${n}]`:t;return e.replace(br,(e,t)=>t.replace(/([^:]*)(:*)(.*)/,(e,t,n,r)=>t+s+n+r)).replace(Ar,s+" ")}return t+" "+e}_applyStrictSelectorScope(e,t,n){const s="["+(t=t.replace(/\[is=([^\]]*)\]/g,(e,...t)=>t[0]))+"]",r=e=>{let r=e.trim();if(!r)return"";if(e.indexOf(wr)>-1)r=this._applySimpleSelectorScope(e,t,n);else{const t=e.replace(Ar,"");if(t.length>0){const e=t.match(/([^:]*)(:*)(.*)/);e&&(r=e[1]+s+e[2]+e[3])}}return r},i=new gr(e);let a,o="",l=0;const c=/( |>|\+|~(?!=))\s*/g;let u=!((e=i.content()).indexOf(wr)>-1);for(;null!==(a=c.exec(e));){const t=a[1],n=e.slice(l,a.index).trim();u=u||n.indexOf(wr)>-1,o+=`${u?r(n):n} ${t} `,l=c.lastIndex}const p=e.substring(l);return u=u||p.indexOf(wr)>-1,o+=u?r(p):p,i.restore(o)}_insertPolyfillHostInCssText(e){return e.replace(kr,xr).replace(Pr,Sr)}}class gr{constructor(e){this.placeholders=[],this.index=0,e=e.replace(/(\[[^\]]*\])/g,(e,t)=>{const n=`__ph-${this.index}__`;return this.placeholders.push(t),this.index++,n}),this._content=e.replace(/(:nth-[-\w]+)(\([^)]+\))/g,(e,t,n)=>{const s=`__ph-${this.index}__`;return this.placeholders.push(n),this.index++,t+s})}restore(e){return e.replace(/__ph-(\d+)__/g,(e,t)=>this.placeholders[+t])}content(){return this._content}}const vr=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,fr=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,yr=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Sr="-shadowcsshost",xr="-shadowcsscontext",Er=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",_r=new RegExp("("+Sr+Er,"gim"),Cr=new RegExp("("+xr+Er,"gim"),wr=Sr+"-no-combinator",br=/-shadowcsshost-no-combinator([^\s]*)/,Tr=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],Ir=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,Nr="([>\\s~+[.,{:][\\s\\S]*)?$",Ar=/-shadowcsshost/gim,Pr=/:host/gim,kr=/:host-context/gim,Mr=/\/\*\s*[\s\S]*?\*\//g,Lr=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,Or=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,Rr=/%QUOTED%/g,Fr=new Map([["{","}"]]),Br=new Map([['"','"'],["'","'"]]);class Dr{constructor(e,t){this.selector=e,this.content=t}}class $r{constructor(e,t){this.escapedString=e,this.blocks=t}}function Vr(e,t,n){const s=[],r=[];let i,a,o=0,l=0,c=-1;for(let u=0;u<e.length;u++){const p=e[u];"\\"===p?u++:p===a?(o--,0===o&&(r.push(e.substring(c,u)),s.push(n),l=u,c=-1,i=a=void 0)):p===i?o++:0===o&&t.has(p)&&(i=p,a=t.get(p),o=1,c=u+1,s.push(e.substring(l,c)))}return-1!==c?(r.push(e.substring(c)),s.push(n)):s.push(e.substring(l)),new $r(s.join(""),r)}class Ur{constructor(e,t){this.sourceSpan=e,this.i18n=t}}class jr extends Ur{constructor(e,t,n){super(t,n),this.value=e}visit(e,t){return e.visitText(this,t)}}class qr extends Ur{constructor(e,t,n,s,r,i){super(s,i),this.switchValue=e,this.type=t,this.cases=n,this.switchValueSourceSpan=r}visit(e,t){return e.visitExpansion(this,t)}}class Hr{constructor(e,t,n,s,r){this.value=e,this.expression=t,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=r}visit(e,t){return e.visitExpansionCase(this,t)}}class Wr extends Ur{constructor(e,t,n,s,r){super(n,r),this.name=e,this.value=t,this.valueSpan=s}visit(e,t){return e.visitAttribute(this,t)}}class zr extends Ur{constructor(e,t,n,s,r,i=null,a){super(s,a),this.name=e,this.attrs=t,this.children=n,this.startSourceSpan=r,this.endSourceSpan=i}visit(e,t){return e.visitElement(this,t)}}class Kr{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitComment(this,t)}}function Xr(e,t,n=null){const s=[],r=e.visit?t=>e.visit(t,n)||t.visit(e,n):t=>t.visit(e,n);return t.forEach(e=>{const t=r(e);t&&s.push(t)}),s}var Gr;!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.INCOMPLETE_TAG_OPEN=4]="INCOMPLETE_TAG_OPEN",e[e.TEXT=5]="TEXT",e[e.ESCAPABLE_RAW_TEXT=6]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=7]="RAW_TEXT",e[e.COMMENT_START=8]="COMMENT_START",e[e.COMMENT_END=9]="COMMENT_END",e[e.CDATA_START=10]="CDATA_START",e[e.CDATA_END=11]="CDATA_END",e[e.ATTR_NAME=12]="ATTR_NAME",e[e.ATTR_QUOTE=13]="ATTR_QUOTE",e[e.ATTR_VALUE=14]="ATTR_VALUE",e[e.DOC_TYPE=15]="DOC_TYPE",e[e.EXPANSION_FORM_START=16]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=17]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=18]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=19]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=20]="EXPANSION_FORM_END",e[e.EOF=21]="EOF"}(Gr||(Gr={}));class Qr{constructor(e,t,n){this.type=e,this.parts=t,this.sourceSpan=n}}class Yr extends ms{constructor(e,t,n){super(n,e),this.tokenType=t}}class Jr{constructor(e,t,n){this.tokens=e,this.errors=t,this.nonNormalizedIcuExpressions=n}}const Zr=/\r\n?/g;function ei(e){return`Unexpected character "${0===e?"EOF":String.fromCharCode(e)}"`}function ti(e){return`Unknown entity "${e}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`}var ni;!function(e){e.HEX="hexadecimal",e.DEC="decimal"}(ni||(ni={}));class si{constructor(e){this.error=e}}class ri{constructor(e,t,n){this._getTagDefinition=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||jn,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(e=>e.codePointAt(0)||0);const s=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new pi(e,s):new ui(e,s),this._preserveLineEndings=n.preserveLineEndings||!1,this._escapedString=n.escapedString||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1;try{this._cursor.init()}catch(e){this.handleError(e)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(Zr,"\n")}tokenize(){for(;0!==this._cursor.peek();){const e=this._cursor.clone();try{this._attemptCharCode(60)?this._attemptCharCode(33)?this._attemptCharCode(91)?this._consumeCdata(e):this._attemptCharCode(45)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(47)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}this._beginToken(Gr.EOF),this._endToken([])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(125!==this._cursor.peek()&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(125===this._cursor.peek()){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(null===this._currentTokenStart)throw new Yr("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(null===this._currentTokenType)throw new Yr("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));const n=new Qr(this._currentTokenType,e,this._cursor.getSpan(this._currentTokenStart,this._leadingTriviaCodePoints));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');const n=new Yr(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new si(n)}handleError(e){if(e instanceof hi&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),!(e instanceof si))throw e;this.errors.push(e.error)}_attemptCharCode(e){return this._cursor.peek()===e&&(this._cursor.advance(),!0)}_attemptCharCodeCaseInsensitive(e){return t=e,ci(this._cursor.peek())==ci(t)&&(this._cursor.advance(),!0);var t}_requireCharCode(e){const t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(ei(this._cursor.peek()),this._cursor.getSpan(t))}_attemptStr(e){const t=e.length;if(this._cursor.charsLeft()<t)return!1;const n=this._cursor.clone();for(let s=0;s<t;s++)if(!this._attemptCharCode(e.charCodeAt(s)))return this._cursor=n,!1;return!0}_attemptStrCaseInsensitive(e){for(let t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0}_requireStr(e){const t=this._cursor.clone();if(!this._attemptStr(e))throw this._createError(ei(this._cursor.peek()),this._cursor.getSpan(t))}_attemptCharCodeUntilFn(e){for(;!e(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(e,t){const n=this._cursor.clone();if(this._attemptCharCodeUntilFn(e),this._cursor.diff(n)<t)throw this._createError(ei(this._cursor.peek()),this._cursor.getSpan(n))}_attemptUntilChar(e){for(;this._cursor.peek()!==e;)this._cursor.advance()}_readChar(e){if(e&&38===this._cursor.peek())return this._decodeEntity();{const e=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),e}}_decodeEntity(){const e=this._cursor.clone();if(this._cursor.advance(),!this._attemptCharCode(35)){const t=this._cursor.clone();if(this._attemptCharCodeUntilFn(li),59!=this._cursor.peek())return this._cursor=t,"&";const n=this._cursor.getChars(t);this._cursor.advance();const s=v[n];if(!s)throw this._createError(ti(n),this._cursor.getSpan(e));return s}{const n=this._attemptCharCode(120)||this._attemptCharCode(88),s=this._cursor.clone();if(this._attemptCharCodeUntilFn(oi),59!=this._cursor.peek())throw this._cursor.advance(),this._createError((t=n?ni.HEX:ni.DEC,`Unable to parse entity "${this._cursor.getChars(e)}" - ${t} character reference entities must end with ";"`),this._cursor.getSpan());const r=this._cursor.getChars(s);this._cursor.advance();try{const e=parseInt(r,n?16:10);return String.fromCharCode(e)}catch(t){throw this._createError(ti(this._cursor.getChars(e)),this._cursor.getSpan())}}var t}_consumeRawText(e,t){this._beginToken(e?Gr.ESCAPABLE_RAW_TEXT:Gr.RAW_TEXT);const n=[];for(;;){const s=this._cursor.clone(),r=t();if(this._cursor=s,r)break;n.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(n.join(""))])}_consumeComment(e){this._beginToken(Gr.COMMENT_START,e),this._requireCharCode(45),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("--\x3e")),this._beginToken(Gr.COMMENT_END),this._requireStr("--\x3e"),this._endToken([])}_consumeCdata(e){this._beginToken(Gr.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(Gr.CDATA_END),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(Gr.DOC_TYPE,e);const t=this._cursor.clone();this._attemptUntilChar(62);const n=this._cursor.getChars(t);this._cursor.advance(),this._endToken([n])}_consumePrefixAndName(){const e=this._cursor.clone();let t="";for(;58!==this._cursor.peek()&&!(((n=this._cursor.peek())<97||122<n)&&(n<65||90<n)&&(n<48||n>57));)this._cursor.advance();var n;let s;return 58===this._cursor.peek()?(t=this._cursor.getChars(e),this._cursor.advance(),s=this._cursor.clone()):s=e,this._requireCharCodeUntilFn(ai,""===t?0:1),[t,this._cursor.getChars(s)]}_consumeTagOpen(e){let t,n,s;try{if(!rs(this._cursor.peek()))throw this._createError(ei(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),n=s.parts[0],t=s.parts[1],this._attemptCharCodeUntilFn(ii);47!==this._cursor.peek()&&62!==this._cursor.peek()&&60!==this._cursor.peek();)this._consumeAttributeName(),this._attemptCharCodeUntilFn(ii),this._attemptCharCode(61)&&(this._attemptCharCodeUntilFn(ii),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(ii);this._consumeTagOpenEnd()}catch(t){if(t instanceof si)return void(s?s.type=Gr.INCOMPLETE_TAG_OPEN:(this._beginToken(Gr.TEXT,e),this._endToken(["<"])));throw t}const r=this._getTagDefinition(t).contentType;r===u.RAW_TEXT?this._consumeRawTextWithTagClose(n,t,!1):r===u.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,t,!0)}_consumeRawTextWithTagClose(e,t,n){this._consumeRawText(n,()=>!!this._attemptCharCode(60)&&!!this._attemptCharCode(47)&&(this._attemptCharCodeUntilFn(ii),!!this._attemptStrCaseInsensitive(t)&&(this._attemptCharCodeUntilFn(ii),this._attemptCharCode(62)))),this._beginToken(Gr.TAG_CLOSE),this._requireCharCodeUntilFn(e=>62===e,3),this._cursor.advance(),this._endToken([e,t])}_consumeTagOpenStart(e){this._beginToken(Gr.TAG_OPEN_START,e);const t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){const e=this._cursor.peek();if(39===e||34===e)throw this._createError(ei(e),this._cursor.getSpan());this._beginToken(Gr.ATTR_NAME);const t=this._consumePrefixAndName();this._endToken(t)}_consumeAttributeValue(){let e;if(39===this._cursor.peek()||34===this._cursor.peek()){this._beginToken(Gr.ATTR_QUOTE);const t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(Gr.ATTR_VALUE);const n=[];for(;this._cursor.peek()!==t;)n.push(this._readChar(!0));e=n.join(""),this._endToken([this._processCarriageReturns(e)]),this._beginToken(Gr.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(Gr.ATTR_VALUE);const t=this._cursor.clone();this._requireCharCodeUntilFn(ai,1),e=this._cursor.getChars(t),this._endToken([this._processCarriageReturns(e)])}}_consumeTagOpenEnd(){const e=this._attemptCharCode(47)?Gr.TAG_OPEN_END_VOID:Gr.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){this._beginToken(Gr.TAG_CLOSE,e),this._attemptCharCodeUntilFn(ii);const t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(ii),this._requireCharCode(62),this._endToken(t)}_consumeExpansionFormStart(){this._beginToken(Gr.EXPANSION_FORM_START),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(Gr.EXPANSION_FORM_START),this._beginToken(Gr.RAW_TEXT);const e=this._readUntil(44),t=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([t]);else{const n=this._endToken([e]);t!==e&&this.nonNormalizedIcuExpressions.push(n)}this._requireCharCode(44),this._attemptCharCodeUntilFn(ii),this._beginToken(Gr.RAW_TEXT);const n=this._readUntil(44);this._endToken([n]),this._requireCharCode(44),this._attemptCharCodeUntilFn(ii)}_consumeExpansionCaseStart(){this._beginToken(Gr.EXPANSION_CASE_VALUE);const e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(ii),this._beginToken(Gr.EXPANSION_CASE_EXP_START),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(ii),this._expansionCaseStack.push(Gr.EXPANSION_CASE_EXP_START)}_consumeExpansionCaseEnd(){this._beginToken(Gr.EXPANSION_CASE_EXP_END),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(ii),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(Gr.EXPANSION_FORM_END),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeText(){const e=this._cursor.clone();this._beginToken(Gr.TEXT,e);const 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(""))])}_isTextEnd(){if(60===this._cursor.peek()||0===this._cursor.peek())return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(125===this._cursor.peek()&&this._isInExpansionCase())return!0}return!1}_readUntil(e){const t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Gr.EXPANSION_CASE_EXP_START}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Gr.EXPANSION_FORM_START}isExpansionFormStart(){if(123!==this._cursor.peek())return!1;if(this._interpolationConfig){const e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}}function ii(e){return!ns(e)||0===e}function ai(e){return ns(e)||62===e||60===e||47===e||39===e||34===e||61===e}function oi(e){return 59==e||0==e||!function(e){return e>=97&&e<=102||e>=65&&e<=70||ss(e)}(e)}function li(e){return 59==e||0==e||!rs(e)}function ci(e){return e>=97&&e<=122?e-97+65:e}class ui{constructor(e,t){if(e instanceof ui){this.file=e.file,this.input=e.input,this.end=e.end;const t=e.state;this.state={peek:t.peek,offset:t.offset,line:t.line,column:t.column}}else{if(!t)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=e,this.input=e.content,this.end=t.endPos,this.state={peek:-1,offset:t.startPos,line:t.startLine,column:t.startCol}}}clone(){return new ui(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(e){return this.state.offset-e.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(e,t){let n=e=e||this;if(t)for(;this.diff(e)>0&&-1!==t.indexOf(e.peek());)n===e&&(e=e.clone()),e.advance();const s=this.locationFromCursor(e),r=this.locationFromCursor(this),i=n!==e?this.locationFromCursor(n):s;return new cs(s,r,i)}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new hi('Unexpected character "EOF"',this);const t=this.charAt(e.offset);10===t?(e.line++,e.column=0):is(t)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new os(e.file,e.state.offset,e.state.line,e.state.column)}}class pi extends ui{constructor(e,t){e instanceof pi?(super(e),this.internalState=Object.assign({},e.internalState)):(super(e,t),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new pi(this)}getChars(e){const t=e.clone();let n="";for(;t.internalState.offset<this.internalState.offset;)n+=String.fromCodePoint(t.peek()),t.advance();return n}processEscapeSequence(){const e=()=>this.internalState.peek;if(92===e())if(this.internalState=Object.assign({},this.state),this.advanceState(this.internalState),110===e())this.state.peek=10;else if(114===e())this.state.peek=13;else if(118===e())this.state.peek=11;else if(116===e())this.state.peek=9;else if(98===e())this.state.peek=8;else if(102===e())this.state.peek=12;else if(117===e())if(this.advanceState(this.internalState),123===e()){this.advanceState(this.internalState);const t=this.clone();let n=0;for(;125!==e();)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(t,n)}else{const e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(120===e()){this.advanceState(this.internalState);const e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(as(e())){let t="",n=0,s=this.clone();for(;as(e())&&n<3;)s=this.clone(),t+=String.fromCodePoint(e()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(t,8),this.internalState=s.internalState}else is(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,t){const n=this.input.substr(e.internalState.offset,t),s=parseInt(n,16);if(isNaN(s))throw e.state=e.internalState,new hi("Invalid hexadecimal escape sequence",e);return s}}class hi{constructor(e,t){this.msg=e,this.cursor=t}}class di extends ms{constructor(e,t,n){super(t,n),this.elementName=e}static create(e,t,n){return new di(e,t,n)}}class mi{constructor(e,t){this.rootNodes=e,this.errors=t}}class gi{constructor(e,t){this.tokens=e,this.getTagDefinition=t,this._index=-1,this._elementStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==Gr.EOF;)this._peek.type===Gr.TAG_OPEN_START||this._peek.type===Gr.INCOMPLETE_TAG_OPEN?this._consumeStartTag(this._advance()):this._peek.type===Gr.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===Gr.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Gr.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Gr.TEXT||this._peek.type===Gr.RAW_TEXT||this._peek.type===Gr.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Gr.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance()}_advance(){const e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}_advanceIf(e){return this._peek.type===e?this._advance():null}_consumeCdata(e){this._consumeText(this._advance()),this._advanceIf(Gr.CDATA_END)}_consumeComment(e){const t=this._advanceIf(Gr.RAW_TEXT);this._advanceIf(Gr.COMMENT_END);const n=null!=t?t.parts[0].trim():null;this._addToParent(new Kr(n,e.sourceSpan))}_consumeExpansion(e){const t=this._advance(),n=this._advance(),s=[];for(;this._peek.type===Gr.EXPANSION_CASE_VALUE;){const e=this._parseExpansionCase();if(!e)return;s.push(e)}if(this._peek.type!==Gr.EXPANSION_FORM_END)return void this.errors.push(di.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));const r=new cs(e.sourceSpan.start,this._peek.sourceSpan.end,e.sourceSpan.fullStart);this._addToParent(new qr(t.parts[0],n.parts[0],s,r,t.sourceSpan)),this._advance()}_parseExpansionCase(){const e=this._advance();if(this._peek.type!==Gr.EXPANSION_CASE_EXP_START)return this.errors.push(di.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;const t=this._advance(),n=this._collectExpansionExpTokens(t);if(!n)return null;const s=this._advance();n.push(new Qr(Gr.EOF,[],s.sourceSpan));const r=new gi(n,this.getTagDefinition);if(r.build(),r.errors.length>0)return this.errors=this.errors.concat(r.errors),null;const i=new cs(e.sourceSpan.start,s.sourceSpan.end,e.sourceSpan.fullStart),a=new cs(t.sourceSpan.start,s.sourceSpan.end,t.sourceSpan.fullStart);return new Hr(e.parts[0],r.rootNodes,i,e.sourceSpan,a)}_collectExpansionExpTokens(e){const t=[],n=[Gr.EXPANSION_CASE_EXP_START];for(;;){if(this._peek.type!==Gr.EXPANSION_FORM_START&&this._peek.type!==Gr.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===Gr.EXPANSION_CASE_EXP_END){if(!vi(n,Gr.EXPANSION_CASE_EXP_START))return this.errors.push(di.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===Gr.EXPANSION_FORM_END){if(!vi(n,Gr.EXPANSION_FORM_START))return this.errors.push(di.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===Gr.EOF)return this.errors.push(di.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}}_consumeText(e){let t=e.parts[0];if(t.length>0&&"\n"==t[0]){const e=this._getParentElement();null!=e&&0==e.children.length&&this.getTagDefinition(e.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new jr(t,e.sourceSpan))}_closeVoidElement(){const e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}_consumeStartTag(e){const[t,n]=e.parts,s=[];for(;this._peek.type===Gr.ATTR_NAME;)s.push(this._consumeAttr(this._advance()));const r=this._getElementFullName(t,n,this._getParentElement());let i=!1;if(this._peek.type===Gr.TAG_OPEN_END_VOID){this._advance(),i=!0;const t=this.getTagDefinition(r);t.canSelfClose||null!==m(r)||t.isVoid||this.errors.push(di.create(r,e.sourceSpan,`Only void and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===Gr.TAG_OPEN_END&&(this._advance(),i=!1);const a=this._peek.sourceSpan.start,o=new cs(e.sourceSpan.start,a,e.sourceSpan.fullStart),l=new cs(e.sourceSpan.start,a,e.sourceSpan.fullStart),c=new zr(r,s,[],o,l,void 0);this._pushElement(c),i?this._popElement(r,o):e.type===Gr.INCOMPLETE_TAG_OPEN&&(this._popElement(r,null),this.errors.push(di.create(r,o,`Opening tag "${r}" not terminated.`)))}_pushElement(e){const t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)}_consumeEndTag(e){const t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());this.getTagDefinition(t).isVoid?this.errors.push(di.create(t,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`)):this._popElement(t,e.sourceSpan)||this.errors.push(di.create(t,e.sourceSpan,`Unexpected closing tag "${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`))}_popElement(e,t){for(let n=this._elementStack.length-1;n>=0;n--){const s=this._elementStack[n];if(s.name==e)return s.endSourceSpan=t,s.sourceSpan.end=null!==t?t.end:s.sourceSpan.end,this._elementStack.splice(n,this._elementStack.length-n),!0;if(!this.getTagDefinition(s.name).closedByParent)return!1}return!1}_consumeAttr(e){const t=g(e.parts[0],e.parts[1]);let n=e.sourceSpan.end,s="",r=void 0;if(this._peek.type===Gr.ATTR_QUOTE&&this._advance(),this._peek.type===Gr.ATTR_VALUE){const e=this._advance();s=e.parts[0],n=e.sourceSpan.end,r=e.sourceSpan}return this._peek.type===Gr.ATTR_QUOTE&&(n=this._advance().sourceSpan.end),new Wr(t,s,new cs(e.sourceSpan.start,n,e.sourceSpan.fullStart),r)}_getParentElement(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}_addToParent(e){const t=this._getParentElement();null!=t?t.children.push(e):this.rootNodes.push(e)}_getElementFullName(e,t,n){if(""===e&&""===(e=this.getTagDefinition(t).implicitNamespacePrefix||"")&&null!=n){const t=p(n.name)[1];this.getTagDefinition(t).preventNamespaceInheritance||(e=m(n.name))}return g(e,t)}}function vi(e,t){return e.length>0&&e[e.length-1]===t}class fi extends class{constructor(e){this.getTagDefinition=e}parse(e,t,n){const s=function(e,t,n,s={}){const r=new ri(new ls(e,t),n,s);return r.tokenize(),new Jr(function(e){const t=[];let n=void 0;for(let s=0;s<e.length;s++){const r=e[s];n&&n.type==Gr.TEXT&&r.type==Gr.TEXT?(n.parts[0]+=r.parts[0],n.sourceSpan.end=r.sourceSpan.end):(n=r,t.push(n))}return t}(r.tokens),r.errors,r.nonNormalizedIcuExpressions)}(e,t,this.getTagDefinition,n),r=new gi(s.tokens,this.getTagDefinition);return r.build(),new mi(r.rootNodes,s.errors.concat(r.errors))}}{constructor(){super(x)}parse(e,t,n){return super.parse(e,t,n)}}const yi=new Set(["pre","template","textarea","script","style"]),Si=new RegExp("[^ \f\n\r\t\v - \u2028\u2029 \ufeff]"),xi=new RegExp("[ \f\n\r\t\v - \u2028\u2029 \ufeff]{2,}","g");function Ei(e){return e.replace(new RegExp("","g")," ")}class _i{visitElement(e,t){return yi.has(e.name)||e.attrs.some(e=>"ngPreserveWhitespaces"===e.name)?new zr(e.name,Xr(this,e.attrs),e.children,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n):new zr(e.name,e.attrs,function(e,t){const n=[];return t.forEach((s,r)=>{const i=s.visit(e,{prev:t[r-1],next:t[r+1]});i&&n.push(i)}),n}(this,e.children),e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}visitAttribute(e,t){return"ngPreserveWhitespaces"!==e.name?e:null}visitText(e,t){return e.value.match(Si)||t&&(t.prev instanceof qr||t.next instanceof qr)?new jr(Ei(e.value).replace(xi," "),e.sourceSpan,e.i18n):null}visitComment(e,t){return e}visitExpansion(e,t){return e}visitExpansionCase(e,t){return e}}var Ci;!function(e){e[e.PublicService=0]="PublicService",e[e.PrivateService=1]="PrivateService",e[e.Component=2]="Component",e[e.Directive=3]="Directive",e[e.Builtin=4]="Builtin"}(Ci||(Ci={}));const wi=/^([^:/?#]+):/;class bi{constructor(e,t,n,s,r){if(this._exprParser=e,this._interpolationConfig=t,this._schemaRegistry=n,this.errors=r,this.pipesByName=null,this._usedPipes=new Map,s){const e=new Map;s.forEach(t=>e.set(t.name,t)),this.pipesByName=e}}get interpolationConfig(){return this._interpolationConfig}getUsedPipes(){return Array.from(this._usedPipes.values())}createBoundHostProperties(e,t){if(e.hostProperties){const n=[];return Object.keys(e.hostProperties).forEach(s=>{const r=e.hostProperties[s];"string"==typeof r?this.parsePropertyBinding(s,r,!0,t,t.start.offset,void 0,[],n,t):this._reportError(`Value of the host property binding "${s}" needs to be a string representing an expression but got "${r}" (${typeof r})`,t)}),n}return null}createDirectiveHostPropertyAsts(e,t,n){const s=this.createBoundHostProperties(e,n);return s&&s.map(e=>this.createBoundElementProperty(t,e))}createDirectiveHostEventAsts(e,t){if(e.hostListeners){const n=[];return Object.keys(e.hostListeners).forEach(s=>{const r=e.hostListeners[s];"string"==typeof r?this.parseEvent(s,r,t,t,[],n):this._reportError(`Value of the host listener "${s}" needs to be a string representing an expression but got "${r}" (${typeof r})`,t)}),n}return null}parseInterpolation(e,t){const n=t.start.toString();try{const s=this._exprParser.parseInterpolation(e,n,t.start.offset,this._interpolationConfig);return s&&this._reportExpressionParserErrors(s.errors,t),this._checkPipes(s,t),s}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,t.start.offset)}}parseInterpolationExpression(e,t){const n=t.start.toString();try{const s=this._exprParser.parseInterpolationExpression(e,n,t.start.offset);return s&&this._reportExpressionParserErrors(s.errors,t),this._checkPipes(s,t),s}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,t.start.offset)}}parseInlineTemplateBinding(e,t,n,s,r,i,a,o){const l=this._parseTemplateBindings(e,t,n,n.start.offset+"*".length,s);for(const e of l){const t=Ai(n,e.sourceSpan),l=e.key.source,c=Ai(n,e.key.span);if(e instanceof Xs){const s=e.value?e.value.source:"$implicit",r=e.value?Ai(n,e.value.span):void 0;a.push(new Zs(l,s,t,c,r))}else if(e.value){const s=o?t:n,a=Ai(n,e.value.ast.sourceSpan);this._parsePropertyAst(l,e.value,s,c,a,r,i)}else r.push([l,""]),this.parseLiteralAttr(l,null,c,s,void 0,r,i,c)}}_parseTemplateBindings(e,t,n,s,r){const i=n.start.toString();try{const a=this._exprParser.parseTemplateBindings(e,t,i,s,r);return this._reportExpressionParserErrors(a.errors,n),a.templateBindings.forEach(e=>{e.value instanceof Ks&&this._checkPipes(e.value,n)}),a.warnings.forEach(e=>{this._reportError(e,n,us.WARNING)}),a.templateBindings}catch(e){return this._reportError(""+e,n),[]}}parseLiteralAttr(e,t,n,s,r,i,a,o){Ii(e)?(e=e.substring(1),t&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',n,us.ERROR),this._parseAnimation(e,t,n,s,o,r,i,a)):a.push(new Ys(e,this._exprParser.wrapLiteralPrimitive(t,"",s),ps.LITERAL_ATTR,n,o,r))}parsePropertyBinding(e,t,n,s,r,i,a,o,l){0===e.length&&this._reportError("Property name is missing in binding",s);let c=!1;e.startsWith("animate-")?(c=!0,e=e.substring("animate-".length)):Ii(e)&&(c=!0,e=e.substring(1)),c?this._parseAnimation(e,t,s,r,l,i,a,o):this._parsePropertyAst(e,this._parseBinding(t,n,i||s,r),s,l,i,a,o)}parsePropertyInterpolation(e,t,n,s,r,i,a){const o=this.parseInterpolation(t,s||n);return!!o&&(this._parsePropertyAst(e,o,n,a,s,r,i),!0)}_parsePropertyAst(e,t,n,s,r,i,a){i.push([e,t.source]),a.push(new Ys(e,t,ps.DEFAULT,n,s,r))}_parseAnimation(e,t,n,s,r,i,a,o){0===e.length&&this._reportError("Animation trigger is missing",n);const l=this._parseBinding(t||"undefined",!1,i||n,s);a.push([e,l.source]),o.push(new Ys(e,l,ps.ANIMATION,n,r,i))}_parseBinding(e,t,n,s){const r=(n&&n.start||"(unknown)").toString();try{const i=t?this._exprParser.parseSimpleBinding(e,r,s,this._interpolationConfig):this._exprParser.parseBinding(e,r,s,this._interpolationConfig);return i&&this._reportExpressionParserErrors(i.errors,n),this._checkPipes(i,n),i}catch(e){return this._reportError(""+e,n),this._exprParser.wrapLiteralPrimitive("ERROR",r,s)}}createBoundElementProperty(e,t,n=!1,s=!0){if(t.isAnimation)return new er(t.name,4,N.NONE,t.expression,null,t.sourceSpan,t.keySpan,t.valueSpan);let r=null,i=void 0,a=null;const o=t.name.split(".");let l=void 0;if(o.length>1)if("attr"==o[0]){a=o.slice(1).join("."),n||this._validatePropertyOrAttributeName(a,t.sourceSpan,!0),l=Ni(this._schemaRegistry,e,a,!0);const s=a.indexOf(":");if(s>-1){const e=a.substring(0,s),t=a.substring(s+1);a=g(e,t)}i=1}else"class"==o[0]?(a=o[1],i=2,l=[N.NONE]):"style"==o[0]&&(r=o.length>2?o[2]:null,a=o[1],i=3,l=[N.STYLE]);if(null===a){const r=this._schemaRegistry.getMappedPropName(t.name);a=s?r:t.name,l=Ni(this._schemaRegistry,e,r,!1),i=0,n||this._validatePropertyOrAttributeName(r,t.sourceSpan,!1)}return new er(a,i,l[0],t.expression,r,t.sourceSpan,t.keySpan,t.valueSpan)}parseEvent(e,t,n,s,r,i){0===e.length&&this._reportError("Event name is missing in binding",n),Ii(e)?(e=e.substr(1),this._parseAnimationEvent(e,t,n,s,i)):this._parseRegularEvent(e,t,n,s,r,i)}calcPossibleSecurityContexts(e,t,n){const s=this._schemaRegistry.getMappedPropName(t);return Ni(this._schemaRegistry,e,s,n)}_parseAnimationEvent(e,t,n,s,r){const i=Qe(e,".",[e,""]),a=i[0],o=i[1].toLowerCase();if(o)switch(o){case"start":case"done":const e=this._parseAction(t,s);r.push(new Js(a,o,1,e,n,s));break;default:this._reportError(`The provided animation output phase value "${o}" for "@${a}" is not supported (use start or done)`,n)}else this._reportError(`The animation trigger output event (@${a}) is missing its phase value name (start or done are currently supported)`,n)}_parseRegularEvent(e,t,n,s,r,i){const[a,o]=Ge(e,[null,e]),l=this._parseAction(t,s);r.push([e,l.source]),i.push(new Js(o,a,0,l,n,s))}_parseAction(e,t){const n=(t&&t.start||"(unknown").toString(),s=t&&t.start?t.start.offset:0;try{const r=this._exprParser.parseAction(e,n,s,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,t),!r||r.ast instanceof ws?(this._reportError("Empty expressions are not allowed",t),this._exprParser.wrapLiteralPrimitive("ERROR",n,s)):(this._checkPipes(r,t),r)}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,s)}}_reportError(e,t,n=us.ERROR){this.errors.push(new ms(t,e,n))}_reportExpressionParserErrors(e,t){for(const n of e)this._reportError(n.message,t)}_checkPipes(e,t){if(e&&this.pipesByName){const n=new Ti;e.visit(n),n.pipes.forEach((e,n)=>{const s=this.pipesByName.get(n);s?this._usedPipes.set(n,s):this._reportError(`The pipe '${n}' could not be found`,new cs(t.start.moveBy(e.span.start),t.start.moveBy(e.span.end)))})}}_validatePropertyOrAttributeName(e,t,n){const s=n?this._schemaRegistry.validateAttribute(e):this._schemaRegistry.validateProperty(e);s.error&&this._reportError(s.msg,t,us.ERROR)}}class Ti extends Qs{constructor(){super(...arguments),this.pipes=new Map}visitPipe(e,t){return this.pipes.set(e.name,e),e.exp.visit(this),this.visitAll(e.args,t),null}}function Ii(e){return"@"==e[0]}function Ni(e,t,n,s){const r=[];return _.parse(t).forEach(t=>{const i=t.element?[t.element]:e.allKnownElementNames(),a=new Set(t.notSelectors.filter(e=>e.isElementSelector()).map(e=>e.element)),o=i.filter(e=>!a.has(e));r.push(...o.map(t=>e.securityContext(t,n,s)))}),0===r.length?[N.NONE]:Array.from(new Set(r)).sort()}function Ai(e,t){const n=t.start-e.start.offset,s=t.end-e.end.offset;return new cs(e.start.moveBy(n),e.end.moveBy(s),e.fullStart.moveBy(n),e.details)}function Pi(e){let t=null,n=null,s=null,r=!1,i="";e.attrs.forEach(e=>{const a=e.name.toLowerCase();"select"==a?t=e.value:"href"==a?n=e.value:"rel"==a?s=e.value:"ngNonBindable"==e.name?r=!0:"ngProjectAs"==e.name&&e.value.length>0&&(i=e.value)}),t=function(e){return null===e||0===e.length?"*":e}(t);const a=e.name.toLowerCase();let o=ki.OTHER;return d(a)?o=ki.NG_CONTENT:"style"==a?o=ki.STYLE:"script"==a?o=ki.SCRIPT:"link"==a&&"stylesheet"==s&&(o=ki.STYLESHEET),new Li(o,t,n,r,i)}var ki,Mi;!function(e){e[e.NG_CONTENT=0]="NG_CONTENT",e[e.STYLE=1]="STYLE",e[e.STYLESHEET=2]="STYLESHEET",e[e.SCRIPT=3]="SCRIPT",e[e.OTHER=4]="OTHER"}(ki||(ki={}));class Li{constructor(e,t,n,s,r){this.type=e,this.selectAttr=t,this.hrefAttr=n,this.nonBindable=s,this.projectAs=r}}function Oi(e){return e instanceof Ks&&(e=e.ast),e instanceof ws}function Ri(e){const t=e.charCodeAt(0);if(t==e.charCodeAt(e.length-1)&&(39==t||34==t)){const t=e.substring(1,e.length-1);-1==t.indexOf("'")&&-1==t.indexOf('"')&&(e=t)}return e}function Fi(e){return e.replace(/[a-z][A-Z]/g,e=>e.charAt(0)+"-"+e.charAt(1)).toLowerCase()}class Bi{constructor(e){this._directiveExpr=e,this._hasInitialValues=!1,this.hasBindings=!1,this.hasBindingsWithPipes=!1,this._classMapInput=null,this._styleMapInput=null,this._singleStyleInputs=null,this._singleClassInputs=null,this._lastStylingInput=null,this._firstStylingInput=null,this._stylesIndex=new Map,this._classesIndex=new Map,this._initialStyleValues=[],this._initialClassValues=[]}registerBoundInput(e){let t=null,n=e.name;switch(e.type){case 0:t=this.registerInputBasedOnName(n,e.value,e.sourceSpan);break;case 3:t=this.registerStyleInput(n,!1,e.value,e.sourceSpan,e.unit);break;case 2:t=this.registerClassInput(n,!1,e.value,e.sourceSpan)}return!!t}registerInputBasedOnName(e,t,n){let s=null;const r=e.substring(0,6),i="style"===e||"style."===r||"style!"===r;if(i||!i&&("class"===e||"class."===r||"class!"===r)){const r="."!==e.charAt(5),a=e.substr(r?5:6);s=i?this.registerStyleInput(a,r,t,n):this.registerClassInput(a,r,t,n)}return s}registerStyleInput(e,t,n,s,r){if(Oi(n))return null;e=Fi(e);const{property:i,hasOverrideFlag:a,suffix:o}=$i(e),l={name:i,suffix:r="string"==typeof r&&0!==r.length?r:o,value:n,sourceSpan:s,hasOverrideFlag:a};return t?this._styleMapInput=l:((this._singleStyleInputs=this._singleStyleInputs||[]).push(l),Di(this._stylesIndex,i)),this._lastStylingInput=l,this._firstStylingInput=this._firstStylingInput||l,this._checkForPipes(n),this.hasBindings=!0,l}registerClassInput(e,t,n,s){if(Oi(n))return null;const{property:r,hasOverrideFlag:i}=$i(e),a={name:r,value:n,sourceSpan:s,hasOverrideFlag:i,suffix:null};if(t){if(this._classMapInput)throw new Error("[class] and [className] bindings cannot be used on the same element simultaneously");this._classMapInput=a}else(this._singleClassInputs=this._singleClassInputs||[]).push(a),Di(this._classesIndex,r);return this._lastStylingInput=a,this._firstStylingInput=this._firstStylingInput||a,this._checkForPipes(n),this.hasBindings=!0,a}_checkForPipes(e){e instanceof Ks&&e.ast instanceof Os&&(this.hasBindingsWithPipes=!0)}registerStyleAttr(e){this._initialStyleValues=function(e){const t=[];let n=0,s=0,r=0,i=0,a=0,o=null,l=!1;for(;n<e.length;)switch(e.charCodeAt(n++)){case 40:s++;break;case 41:s--;break;case 39:l=l||i>0,0===r?r=39:39===r&&92!==e.charCodeAt(n-1)&&(r=0);break;case 34:l=l||i>0,0===r?r=34:34===r&&92!==e.charCodeAt(n-1)&&(r=0);break;case 58:o||0!==s||0!==r||(o=Fi(e.substring(a,n-1).trim()),i=n);break;case 59:if(o&&i>0&&0===s&&0===r){const s=e.substring(i,n-1).trim();t.push(o,l?Ri(s):s),a=n,i=0,o=null,l=!1}}if(o&&i){const n=e.substr(i).trim();t.push(o,l?Ri(n):n)}return t}(e),this._hasInitialValues=!0}registerClassAttr(e){this._initialClassValues=e.trim().split(/\s+/g),this._hasInitialValues=!0}populateInitialStylingAttrs(e){if(this._initialClassValues.length){e.push(We(1));for(let t=0;t<this._initialClassValues.length;t++)e.push(We(this._initialClassValues[t]))}if(this._initialStyleValues.length){e.push(We(2));for(let t=0;t<this._initialStyleValues.length;t+=2)e.push(We(this._initialStyleValues[t]),We(this._initialStyleValues[t+1]))}}assignHostAttrs(e,t){this._directiveExpr&&(e.length||this._hasInitialValues)&&(this.populateInitialStylingAttrs(e),t.set("hostAttrs",Ue(e)))}buildClassMapInstruction(e){return this._classMapInput?this._buildMapBasedInstruction(e,!0,this._classMapInput):null}buildStyleMapInstruction(e){return this._styleMapInput?this._buildMapBasedInstruction(e,!1,this._styleMapInput):null}_buildMapBasedInstruction(e,t,n){let s=2;const r=n.value.visit(e);let i;return r instanceof Ds?(s+=r.expressions.length,i=t?function(e){switch(Mn(e)){case 1:return yt.classMap;case 3:return yt.classMapInterpolate1;case 5:return yt.classMapInterpolate2;case 7:return yt.classMapInterpolate3;case 9:return yt.classMapInterpolate4;case 11:return yt.classMapInterpolate5;case 13:return yt.classMapInterpolate6;case 15:return yt.classMapInterpolate7;case 17:return yt.classMapInterpolate8;default:return yt.classMapInterpolateV}}(r):function(e){switch(Mn(e)){case 1:return yt.styleMap;case 3:return yt.styleMapInterpolate1;case 5:return yt.styleMapInterpolate2;case 7:return yt.styleMapInterpolate3;case 9:return yt.styleMapInterpolate4;case 11:return yt.styleMapInterpolate5;case 13:return yt.styleMapInterpolate6;case 15:return yt.styleMapInterpolate7;case 17:return yt.styleMapInterpolate8;default:return yt.styleMapInterpolateV}}(r)):i=t?yt.classMap:yt.styleMap,{reference:i,calls:[{supportsInterpolation:!0,sourceSpan:n.sourceSpan,allocateBindingSlots:s,params:e=>{const t=e(r);return Array.isArray(t)?t:[t]}}]}}_buildSingleInputs(e,t,n,s,r){const i=[];return t.forEach(t=>{const a=i[i.length-1],o=t.value.visit(n);let l=e,c=2;o instanceof Ds&&(c+=o.expressions.length,s&&(l=s(o)));const u={sourceSpan:t.sourceSpan,allocateBindingSlots:c,supportsInterpolation:!!s,params:e=>{const n=[];n.push(We(t.name));const s=e(o);return Array.isArray(s)?n.push(...s):n.push(s),r||null===t.suffix||n.push(We(t.suffix)),n}};a&&a.reference===l?a.calls.push(u):i.push({reference:l,calls:[u]})}),i}_buildClassInputs(e){return this._singleClassInputs?this._buildSingleInputs(yt.classProp,this._singleClassInputs,e,null,!0):[]}_buildStyleInputs(e){return this._singleStyleInputs?this._buildSingleInputs(yt.styleProp,this._singleStyleInputs,e,Vi,!1):[]}buildUpdateLevelInstructions(e){const t=[];if(this.hasBindings){const n=this.buildStyleMapInstruction(e);n&&t.push(n);const s=this.buildClassMapInstruction(e);s&&t.push(s),t.push(...this._buildStyleInputs(e)),t.push(...this._buildClassInputs(e))}return t}}function Di(e,t){e.has(t)||e.set(t,e.size)}function $i(e){let t=!1;const n=e.indexOf("!important");-1!==n&&(e=n>0?e.substring(0,n):"",t=!0);let s=null,r=e;const i=e.lastIndexOf(".");return i>0&&(s=e.substr(i+1),r=e.substring(0,i)),{property:r,suffix:s,hasOverrideFlag:t}}function Vi(e){switch(Mn(e)){case 1:return yt.styleProp;case 3:return yt.stylePropInterpolate1;case 5:return yt.stylePropInterpolate2;case 7:return yt.stylePropInterpolate3;case 9:return yt.stylePropInterpolate4;case 11:return yt.stylePropInterpolate5;case 13:return yt.stylePropInterpolate6;case 15:return yt.stylePropInterpolate7;case 17:return yt.stylePropInterpolate8;default:return yt.stylePropInterpolateV}}!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.Keyword=2]="Keyword",e[e.String=3]="String",e[e.Operator=4]="Operator",e[e.Number=5]="Number",e[e.Error=6]="Error"}(Mi||(Mi={}));const Ui=["var","let","as","null","undefined","true","false","if","else","this"];class ji{tokenize(e){const t=new Ki(e),n=[];let s=t.scanToken();for(;null!=s;)n.push(s),s=t.scanToken();return n}}class qi{constructor(e,t,n,s,r){this.index=e,this.end=t,this.type=n,this.numValue=s,this.strValue=r}isCharacter(e){return this.type==Mi.Character&&this.numValue==e}isNumber(){return this.type==Mi.Number}isString(){return this.type==Mi.String}isOperator(e){return this.type==Mi.Operator&&this.strValue==e}isIdentifier(){return this.type==Mi.Identifier}isKeyword(){return this.type==Mi.Keyword}isKeywordLet(){return this.type==Mi.Keyword&&"let"==this.strValue}isKeywordAs(){return this.type==Mi.Keyword&&"as"==this.strValue}isKeywordNull(){return this.type==Mi.Keyword&&"null"==this.strValue}isKeywordUndefined(){return this.type==Mi.Keyword&&"undefined"==this.strValue}isKeywordTrue(){return this.type==Mi.Keyword&&"true"==this.strValue}isKeywordFalse(){return this.type==Mi.Keyword&&"false"==this.strValue}isKeywordThis(){return this.type==Mi.Keyword&&"this"==this.strValue}isError(){return this.type==Mi.Error}toNumber(){return this.type==Mi.Number?this.numValue:-1}toString(){switch(this.type){case Mi.Character:case Mi.Identifier:case Mi.Keyword:case Mi.Operator:case Mi.String:case Mi.Error:return this.strValue;case Mi.Number:return this.numValue.toString();default:return null}}}function Hi(e,t,n){return new qi(e,t,Mi.Character,n,String.fromCharCode(n))}function Wi(e,t,n){return new qi(e,t,Mi.Operator,0,n)}const zi=new qi(-1,-1,Mi.Character,0,"");class Ki{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){const e=this.input,t=this.length;let n=this.peek,s=this.index;for(;n<=32;){if(++s>=t){n=0;break}n=e.charCodeAt(s)}if(this.peek=n,this.index=s,s>=t)return null;if(Xi(n))return this.scanIdentifier();if(ss(n))return this.scanNumber(s);const r=s;switch(n){case 46:return this.advance(),ss(this.peek)?this.scanNumber(r):Hi(r,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(r,n);case 39:case 34:return this.scanString();case 35:case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(r,String.fromCharCode(n));case 63:return this.scanComplexOperator(r,"?",46,".");case 60:case 62:return this.scanComplexOperator(r,String.fromCharCode(n),61,"=");case 33:case 61:return this.scanComplexOperator(r,String.fromCharCode(n),61,"=",61,"=");case 38:return this.scanComplexOperator(r,"&",38,"&");case 124:return this.scanComplexOperator(r,"|",124,"|");case 160:for(;ns(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(n)}]`,0)}scanCharacter(e,t){return this.advance(),Hi(e,this.index,t)}scanOperator(e,t){return this.advance(),Wi(e,this.index,t)}scanComplexOperator(e,t,n,s,r,i){this.advance();let a=t;return this.peek==n&&(this.advance(),a+=s),null!=r&&this.peek==r&&(this.advance(),a+=i),Wi(e,this.index,a)}scanIdentifier(){const e=this.index;for(this.advance();Gi(this.peek);)this.advance();const t=this.input.substring(e,this.index);return Ui.indexOf(t)>-1?new qi(e,this.index,Mi.Keyword,0,t):function(e,t,n){return new qi(e,t,Mi.Identifier,0,n)}(e,this.index,t)}scanNumber(e){let t=this.index===e;for(this.advance();;){if(ss(this.peek));else if(46==this.peek)t=!1;else{if(101!=(n=this.peek)&&69!=n)break;if(this.advance(),Qi(this.peek)&&this.advance(),!ss(this.peek))return this.error("Invalid exponent",-1);t=!1}this.advance()}var n;const s=this.input.substring(e,this.index),r=t?function(e){const t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}(s):parseFloat(s);return new qi(e,this.index,Mi.Number,r,"")}scanString(){const e=this.index,t=this.peek;this.advance();let n="",s=this.index;const r=this.input;for(;this.peek!=t;)if(92==this.peek){let e;if(n+=r.substring(s,this.index),this.advance(),this.peek=this.peek,117==this.peek){const t=r.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(t))return this.error(`Invalid unicode escape [\\u${t}]`,0);e=parseInt(t,16);for(let e=0;e<5;e++)this.advance()}else e=Yi(this.peek),this.advance();n+=String.fromCharCode(e),s=this.index}else{if(0==this.peek)return this.error("Unterminated quote",0);this.advance()}const i=r.substring(s,this.index);return this.advance(),new qi(e,this.index,Mi.String,0,n+i)}error(e,t){const n=this.index+t;return function(e,t,n){return new qi(e,t,Mi.Error,0,n)}(n,this.index,`Lexer Error: ${e} at column ${n} in expression [${this.input}]`)}}function Xi(e){return 97<=e&&e<=122||65<=e&&e<=90||95==e||36==e}function Gi(e){return rs(e)||ss(e)||95==e||36==e}function Qi(e){return 45==e||43==e}function Yi(e){switch(e){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return e}}class Ji{constructor(e,t,n,s,r){this.strings=e,this.stringSpans=t,this.expressions=n,this.expressionsSpans=s,this.offsets=r}}class Zi{constructor(e,t,n){this.templateBindings=e,this.warnings=t,this.errors=n}}const ea=ta(jn);function ta(e){const t=Je(e.start)+"([\\s\\S]*?)"+Je(e.end);return new RegExp(t,"g")}class na{constructor(e){this._lexer=e,this.errors=[],this.simpleExpressionChecker=aa}parseAction(e,t,n,s=jn){this._checkNoInterpolation(e,t,s);const r=this._stripComments(e),i=this._lexer.tokenize(this._stripComments(e)),a=new ia(e,t,n,i,r.length,!0,this.errors,e.length-r.length).parseChain();return new Ks(a,e,t,n,this.errors)}parseBinding(e,t,n,s=jn){const r=this._parseBindingAst(e,t,n,s);return new Ks(r,e,t,n,this.errors)}checkSimpleExpression(e){const t=new this.simpleExpressionChecker;return e.visit(t),t.errors}parseSimpleBinding(e,t,n,s=jn){const r=this._parseBindingAst(e,t,n,s),i=this.checkSimpleExpression(r);return i.length>0&&this._reportError("Host binding expression cannot contain "+i.join(" "),e,t),new Ks(r,e,t,n,this.errors)}_reportError(e,t,n,s){this.errors.push(new Ss(e,t,n,s))}_parseBindingAst(e,t,n,s){const r=this._parseQuote(e,t,n);if(null!=r)return r;this._checkNoInterpolation(e,t,s);const i=this._stripComments(e),a=this._lexer.tokenize(i);return new ia(e,t,n,a,i.length,!1,this.errors,e.length-i.length).parseChain()}_parseQuote(e,t,n){if(null==e)return null;const s=e.indexOf(":");if(-1==s)return null;const r=e.substring(0,s).trim();if(!function(e){if(0==e.length)return!1;const t=new Ki(e);if(!Xi(t.peek))return!1;for(t.advance();0!==t.peek;){if(!Gi(t.peek))return!1;t.advance()}return!0}(r))return null;const i=e.substring(s+1),a=new xs(0,e.length);return new Cs(a,a.toAbsolute(n),r,i,t)}parseTemplateBindings(e,t,n,s,r){const i=this._lexer.tokenize(t);return new ia(t,n,r,i,t.length,!1,this.errors,0).parseTemplateBindings({source:e,span:new zs(s,s+e.length)})}parseInterpolation(e,t,n,s=jn){const r=this.splitInterpolation(e,t,s);if(null==r)return null;const i=[];for(let s=0;s<r.expressions.length;++s){const a=r.expressions[s],o=this._stripComments(a),l=this._lexer.tokenize(o),c=new ia(e,t,n,l,o.length,!1,this.errors,r.offsets[s]+(a.length-o.length)).parseChain();i.push(c)}return this.createInterpolationAst(r.strings,i,e,t,n)}parseInterpolationExpression(e,t,n){const s=this._stripComments(e),r=this._lexer.tokenize(s),i=new ia(e,t,n,r,s.length,!1,this.errors,0).parseChain();return this.createInterpolationAst(["",""],[i],e,t,n)}createInterpolationAst(e,t,n,s,r){const i=new xs(0,n.length),a=new Ds(i,i.toAbsolute(r),e,t);return new Ks(a,n,s,r,this.errors)}splitInterpolation(e,t,n=jn){const s=[],r=[],i=[],a=[],o=[];let l=0,c=!1,u=!1,{start:p,end:h}=n;for(;l<e.length;)if(c){const n=l,s=n+p.length,a=e.indexOf(h,s);if(-1===a){c=!1,u=!0;break}const d=a+h.length,m=e.substring(s,a);m.trim().length>0?r.push(m):(this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${l} in`,t),r.push("$implicit")),i.push(s),o.push({start:n,end:d}),l=d,c=!1}else{const t=l;l=e.indexOf(p,l),-1===l&&(l=e.length);const n=e.substring(t,l);s.push(n),a.push({start:t,end:l}),c=!0}return c||(u?(s[s.length-1]+=e.substring(l),a[a.length-1].end=e.length):(s.push(e.substring(l)),a.push({start:l,end:e.length}))),0===r.length?null:new Ji(s,a,r,o,i)}wrapLiteralPrimitive(e,t,n){const s=new xs(0,null==e?0:e.length);return new Ks(new Rs(s,s.toAbsolute(n),e),e,t,n,this.errors)}_stripComments(e){const t=this._commentStart(e);return null!=t?e.substring(0,t).trim():e}_commentStart(e){let t=null;for(let s=0;s<e.length-1;s++){const r=e.charCodeAt(s),i=e.charCodeAt(s+1);if(47===r&&47==i&&null==t)return s;t===r?t=null:null==t&&(39===(n=r)||34===n||96===n)&&(t=r)}var n;return null}_checkNoInterpolation(e,t,n){const s=(r=n)===jn?ea:ta(r);var r;const i=e.split(s);i.length>1&&this._reportError(`Got interpolation (${n.start}${n.end}) where expression was expected`,e,`at column ${this._findInterpolationErrorColumn(i,1,n)} in`,t)}_findInterpolationErrorColumn(e,t,n){let s="";for(let r=0;r<t;r++)s+=r%2==0?e[r]:`${n.start}${e[r]}${n.end}`;return s.length}}class sa extends na{constructor(){super(...arguments),this.simpleExpressionChecker=oa}}var ra;!function(e){e[e.None=0]="None",e[e.Writable=1]="Writable"}(ra||(ra={}));class ia{constructor(e,t,n,s,r,i,a,o){this.input=e,this.location=t,this.absoluteOffset=n,this.tokens=s,this.inputLength=r,this.parseAction=i,this.errors=a,this.offset=o,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=ra.None,this.sourceSpanCache=new Map,this.index=0}peek(e){const t=this.index+e;return t<this.tokens.length?this.tokens[t]:zi}get next(){return this.peek(0)}get atEOF(){return this.index>=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:0===this.tokens.length?this.inputLength+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e){return new xs(e,this.currentEndIndex)}sourceSpan(e){const t=`${e}@${this.inputIndex}`;return this.sourceSpanCache.has(t)||this.sourceSpanCache.set(t,this.span(e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(t)}advance(){this.index++}withContext(e,t){this.context|=e;const n=t();return this.context^=e,n}consumeOptionalCharacter(e){return!!this.next.isCharacter(e)&&(this.advance(),!0)}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error("Missing expected "+String.fromCharCode(e))}consumeOptionalOperator(e){return!!this.next.isOperator(e)&&(this.advance(),!0)}expectOperator(e){this.consumeOptionalOperator(e)||this.error("Missing expected operator "+e)}prettyPrintToken(e){return e===zi?"end of input":"token "+e}expectIdentifierOrKeyword(){const e=this.next;return e.isIdentifier()||e.isKeyword()?(this.advance(),e.toString()):(this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),"")}expectIdentifierOrKeywordOrString(){const e=this.next;return e.isIdentifier()||e.isKeyword()||e.isString()?(this.advance(),e.toString()):(this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),"")}parseChain(){const e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){const t=this.parsePipe();if(e.push(t),this.consumeOptionalCharacter(59))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else this.index<this.tokens.length&&this.error(`Unexpected token '${this.next}'`)}return 0==e.length?new ws(this.span(t),this.sourceSpan(t)):1==e.length?e[0]:new Is(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{const t=this.inputIndex,n=this.expectIdentifierOrKeyword(),s=this.sourceSpan(t),r=[];for(;this.consumeOptionalCharacter(58);)r.push(this.parseExpression());const{start:i}=e.span;e=new Os(this.span(i),this.sourceSpan(i),e,n,r,s)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){const e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){const n=this.parsePipe();let s;if(this.consumeOptionalCharacter(58))s=this.parsePipe();else{const t=this.input.substring(e,this.inputIndex);this.error(`Conditional expression ${t} requires all 3 expressions`),s=new ws(this.span(e),this.sourceSpan(e))}return new Ns(this.span(e),this.sourceSpan(e),t,n,s)}return t}parseLogicalOr(){let e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){const t=this.parseLogicalAnd(),{start:n}=e.span;e=new $s(this.span(n),this.sourceSpan(n),"||",e,t)}return e}parseLogicalAnd(){let e=this.parseEquality();for(;this.consumeOptionalOperator("&&");){const t=this.parseEquality(),{start:n}=e.span;e=new $s(this.span(n),this.sourceSpan(n),"&&",e,t)}return e}parseEquality(){let e=this.parseRelational();for(;this.next.type==Mi.Operator;){const t=this.next.strValue;switch(t){case"==":case"===":case"!=":case"!==":this.advance();const n=this.parseRelational(),{start:s}=e.span;e=new $s(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseRelational(){let e=this.parseAdditive();for(;this.next.type==Mi.Operator;){const t=this.next.strValue;switch(t){case"<":case">":case"<=":case">=":this.advance();const n=this.parseAdditive(),{start:s}=e.span;e=new $s(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseAdditive(){let e=this.parseMultiplicative();for(;this.next.type==Mi.Operator;){const t=this.next.strValue;switch(t){case"+":case"-":this.advance();let n=this.parseMultiplicative();const{start:s}=e.span;e=new $s(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseMultiplicative(){let e=this.parsePrefix();for(;this.next.type==Mi.Operator;){const t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();const{start:s}=e.span;e=new $s(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parsePrefix(){if(this.next.type==Mi.Operator){const e=this.inputIndex;let t;switch(this.next.strValue){case"+":return this.advance(),t=this.parsePrefix(),Vs.createPlus(this.span(e),this.sourceSpan(e),t);case"-":return this.advance(),t=this.parsePrefix(),Vs.createMinus(this.span(e),this.sourceSpan(e),t);case"!":return this.advance(),t=this.parsePrefix(),new Us(this.span(e),this.sourceSpan(e),t)}}return this.parseCallChain()}parseCallChain(){let e=this.parsePrimary();const t=e.span.start;for(;;)if(this.consumeOptionalCharacter(46))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.consumeOptionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.consumeOptionalCharacter(91))this.withContext(ra.Writable,()=>{this.rbracketsExpected++;const n=this.parsePipe();if(n instanceof ws&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("=")){const s=this.parseConditional();e=new Ls(this.span(t),this.sourceSpan(t),e,n,s)}else e=new Ms(this.span(t),this.sourceSpan(t),e,n)});else if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const n=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),e=new Ws(this.span(t),this.sourceSpan(t),e,n)}else{if(!this.consumeOptionalOperator("!"))return e;e=new js(this.span(t),this.sourceSpan(t),e)}}parsePrimary(){const e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const e=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),e}if(this.next.isKeywordNull())return this.advance(),new Rs(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new Rs(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new Rs(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new Rs(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new Ts(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;const t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new Fs(this.span(e),this.sourceSpan(e),t)}if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new bs(this.span(e),this.sourceSpan(e)),!1);if(this.next.isNumber()){const t=this.next.toNumber();return this.advance(),new Rs(this.span(e),this.sourceSpan(e),t)}if(this.next.isString()){const t=this.next.toString();return this.advance(),new Rs(this.span(e),this.sourceSpan(e),t)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new ws(this.span(e),this.sourceSpan(e))):(this.error("Unexpected token "+this.next),new ws(this.span(e),this.sourceSpan(e)))}parseExpressionList(e){const t=[];if(!this.next.isCharacter(e))do{t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){const e=[],t=[],n=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{const n=this.next.isString(),s=this.expectIdentifierOrKeywordOrString();e.push({key:s,quoted:n}),this.expectCharacter(58),t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new Bs(this.span(n),this.sourceSpan(n),e,t)}parseAccessMemberOrMethodCall(e,t=!1){const n=e.span.start,s=this.inputIndex,r=this.expectIdentifierOrKeyword(),i=this.sourceSpan(s);if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const s=this.parseCallArguments();this.expectCharacter(41),this.rparensExpected--;const a=this.span(n),o=this.sourceSpan(n);return t?new Hs(a,o,i,e,r,s):new qs(a,o,i,e,r,s)}if(t)return this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new ws(this.span(n),this.sourceSpan(n))):new ks(this.span(n),this.sourceSpan(n),i,e,r);if(this.consumeOptionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new ws(this.span(n),this.sourceSpan(n));const t=this.parseConditional();return new Ps(this.span(n),this.sourceSpan(n),i,e,r,t)}return new As(this.span(n),this.sourceSpan(n),i,e,r)}parseCallArguments(){if(this.next.isCharacter(41))return[];const e=[];do{e.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1;const n=this.currentAbsoluteOffset;do{e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-")}while(t);return{source:e,span:new zs(n,n+e.length)}}parseTemplateBindings(e){const t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){const n=this.parseLetBinding();if(n)t.push(n);else{const n=this.expectTemplateBindingKey(),s=this.parseAsBinding(n);s?t.push(s):(n.source=e.source+n.source[0].toUpperCase()+n.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(n)))}this.consumeStatementTerminator()}return new Zi(t,[],this.errors)}parseDirectiveKeywordBindings(e){const t=[];this.consumeOptionalCharacter(58);const n=this.getDirectiveBoundTarget();let s=this.currentAbsoluteOffset;const r=this.parseAsBinding(e);r||(this.consumeStatementTerminator(),s=this.currentAbsoluteOffset);const i=new zs(e.span.start,s);return t.push(new Gs(i,e,n)),r&&t.push(r),t}getDirectiveBoundTarget(){if(this.next===zi||this.peekKeywordAs()||this.peekKeywordLet())return null;const e=this.parsePipe(),{start:t,end:n}=e.span,s=this.input.substring(t,n);return new Ks(e,s,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();const t=this.expectTemplateBindingKey();this.consumeStatementTerminator();const n=new zs(e.span.start,this.currentAbsoluteOffset);return new Xs(n,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;const e=this.currentAbsoluteOffset;this.advance();const t=this.expectTemplateBindingKey();let n=null;this.consumeOptionalOperator("=")&&(n=this.expectTemplateBindingKey()),this.consumeStatementTerminator();const s=new zs(e,this.currentAbsoluteOffset);return new Xs(s,t,n)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new Ss(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return null==e&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(59)&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93))&&!(this.context&ra.Writable&&e.isOperator("="));)this.next.isError()&&this.errors.push(new Ss(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}}class aa{constructor(){this.errors=[]}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){}visitLiteralPrimitive(e,t){}visitPropertyRead(e,t){}visitPropertyWrite(e,t){}visitSafePropertyRead(e,t){}visitMethodCall(e,t){}visitSafeMethodCall(e,t){}visitFunctionCall(e,t){}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitUnary(e,t){}visitBinary(e,t){}visitPrefixNot(e,t){}visitNonNullAssert(e,t){}visitConditional(e,t){}visitPipe(e,t){this.errors.push("pipes")}visitKeyedRead(e,t){}visitKeyedWrite(e,t){}visitAll(e,t){return e.map(e=>e.visit(this,t))}visitChain(e,t){}visitQuote(e,t){}}class oa extends Qs{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}let la;function ca(){return la||(la={},ua(N.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),ua(N.STYLE,["*|style"]),ua(N.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","img|srcset","input|src","ins|cite","q|cite","source|src","source|srcset","track|src","video|poster","video|src"]),ua(N.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),la}function ua(e,t){for(const n of t)la[n.toLowerCase()]=e}const pa=["[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume",":svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type","select^[HTMLElement]|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","shadow^[HTMLElement]|","slot^[HTMLElement]|name","source^[HTMLElement]|media,sizes,src,srcset,type","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|#height,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],ha={class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"};class da extends class{}{constructor(){super(),this._schema={},pa.forEach(e=>{const t={},[n,s]=e.split("|"),r=s.split(","),[i,a]=n.split("^");i.split(",").forEach(e=>this._schema[e.toLowerCase()]=t);const o=a&&this._schema[a.toLowerCase()];o&&Object.keys(o).forEach(e=>{t[e]=o[e]}),r.forEach(e=>{if(e.length>0)switch(e[0]){case"*":break;case"!":t[e.substring(1)]="boolean";break;case"#":t[e.substring(1)]="number";break;case"%":t[e.substring(1)]="object";break;default:t[e]="string"}})})}hasProperty(e,t,n){if(n.some(e=>"no-errors-schema"===e.name))return!0;if(e.indexOf("-")>-1){if(h(e)||d(e))return!1;if(n.some(e=>"custom-elements"===e.name))return!0}return!!(this._schema[e.toLowerCase()]||this._schema.unknown)[t]}hasElement(e,t){if(t.some(e=>"no-errors-schema"===e.name))return!0;if(e.indexOf("-")>-1){if(h(e)||d(e))return!0;if(t.some(e=>"custom-elements"===e.name))return!0}return!!this._schema[e.toLowerCase()]}securityContext(e,t,n){n&&(t=this.getMappedPropName(t)),e=e.toLowerCase(),t=t.toLowerCase();let s=ca()[e+"|"+t];return s||(s=ca()["*|"+t],s||N.NONE)}getMappedPropName(e){return ha[e]||e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...\nIf '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Object.keys(this._schema)}normalizeAnimationStyleProperty(e){return e.replace(Xe,(...e)=>e[1].toUpperCase())}normalizeAnimationStyleValue(e,t,n){let s="";const r=n.toString().trim();let i=null;if(function(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}(e)&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&(i=`Please provide a CSS unit value for ${t}:${n}`)}return{error:i,value:r+s}}}const ma=/^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/;class ga{constructor(e){this.bindingParser=e,this.errors=[],this.styles=[],this.styleUrls=[],this.ngContentSelectors=[],this.inI18nBlock=!1}visitElement(e){const t=cn(e.i18n);t&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",e.sourceSpan),this.inI18nBlock=!0);const n=Pi(e);if(n.type===ki.SCRIPT)return null;if(n.type===ki.STYLE){const t=1===(s=e).children.length&&s.children[0]instanceof jr?s.children[0].value:null;return null!==t&&this.styles.push(t),null}if(n.type===ki.STYLESHEET&&function(e){if(null==e||0===e.length||"/"==e[0])return!1;const t=e.match(wi);return null===t||"package"==t[1]||"asset"==t[1]}(n.hrefAttr))return this.styleUrls.push(n.hrefAttr),null;var s;const r="ng-template"===p(e.name)[1],i=[],a=[],o=[],l=[],c=[],u={},h=[],d=[];let m=!1;for(const t of e.attrs){let e=!1;const n=fa(t.name);let s=!1;if(t.i18n&&(u[t.name]=t.i18n),n.startsWith("*")){m&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",t.sourceSpan),s=!0,m=!0;const e=t.value,r=n.substring("*".length),i=[];this.bindingParser.parseInlineTemplateBinding(r,e,t.sourceSpan,t.valueSpan?t.valueSpan.start.offset:t.sourceSpan.start.offset+t.name.length,[],h,i,!0),d.push(...i.map(e=>new kt(e.name,e.value,e.sourceSpan,e.keySpan,e.valueSpan)))}else e=this.parseAttribute(r,t,[],i,a,o,l);e||s||c.push(this.visitAttribute(t))}const g=Xr(n.nonBindable?va:this,e.children);let v;if(n.type===ki.NG_CONTENT){e.children&&!e.children.every(e=>function(e){return e instanceof jr&&0==e.value.trim().length}(e)||function(e){return e instanceof Kr}(e))&&this.reportError("<ng-content> element cannot have content.",e.sourceSpan);const t=n.selectAttr,s=e.attrs.map(e=>this.visitAttribute(e));v=new Pt(t,s,e.sourceSpan,e.i18n),this.ngContentSelectors.push(t)}else if(r){const t=this.extractAttributes(e.name,i,u);v=new At(e.name,c,t.bound,a,[],g,l,o,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}else{const t=this.extractAttributes(e.name,i,u);v=new Nt(e.name,c,t.bound,a,g,l,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}if(m){const n=this.extractAttributes("ng-template",h,u),s=[];n.literal.forEach(e=>s.push(e)),n.bound.forEach(e=>s.push(e));const i=v instanceof Nt?{attributes:v.attributes,inputs:v.inputs,outputs:v.outputs}:{attributes:[],inputs:[],outputs:[]};v=new At(v.name,i.attributes,i.inputs,i.outputs,s,[v],[],d,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,r&&t?void 0:e.i18n)}return t&&(this.inI18nBlock=!1),v}visitAttribute(e){return new bt(e.name,e.value,e.sourceSpan,e.valueSpan,e.i18n)}visitText(e){return this._visitTextWithInterpolation(e.value,e.sourceSpan,e.i18n)}visitExpansion(e){if(!e.i18n)return null;if(!cn(e.i18n))throw new Error(`Invalid type "${e.i18n.constructor}" for "i18n" property of ${e.sourceSpan.toString()}. Expected a "Message"`);const t=e.i18n,n={},s={};return Object.keys(t.placeholders).forEach(e=>{const r=t.placeholders[e];if(e.startsWith("VAR_")){const t=e.trim(),s=this.bindingParser.parseInterpolationExpression(r.text,r.sourceSpan);n[t]=new wt(s,r.sourceSpan)}else s[e]=this._visitTextWithInterpolation(r.text,r.sourceSpan)}),new Lt(n,s,e.sourceSpan,t)}visitExpansionCase(e){return null}visitComment(e){return null}extractAttributes(e,t,n){const s=[],r=[];return t.forEach(t=>{const i=n[t.name];if(t.isLiteral)r.push(new bt(t.name,t.expression.source||"",t.sourceSpan,void 0,i));else{const n=this.bindingParser.createBoundElementProperty(e,t,!0,!1);s.push(Tt.fromBoundElementProperty(n,i))}}),{bound:s,literal:r}}parseAttribute(e,t,n,s,r,i,a){const o=fa(t.name),l=t.value,c=t.sourceSpan,u=t.valueSpan?t.valueSpan.start.offset:c.start.offset;function p(e,n,s){const r=e.start.moveBy(n.length+(t.name.length-o.length)),i=r.moveBy(s.length);return new cs(r,i,r,s)}const h=o.match(ma);let d=!1;if(h){if(d=!0,null!=h[1]){const e=h[7],r=p(c,h[1],e);this.bindingParser.parsePropertyBinding(e,l,!1,c,u,t.valueSpan,n,s,r)}else if(h[2])if(e){const e=h[7],n=p(c,h[2],e);this.parseVariable(e,l,c,n,t.valueSpan,i)}else this.reportError('"let-" is only supported on ng-template elements.',c);else if(h[3])this.parseReference(h[7],l,c,t.valueSpan,a);else if(h[4]){const e=[];this.bindingParser.parseEvent(h[7],l,c,t.valueSpan||c,n,e),ya(e,r)}else if(h[5]){const e=h[7],i=p(c,h[5],e);this.bindingParser.parsePropertyBinding(e,l,!1,c,u,t.valueSpan,n,s,i),this.parseAssignmentEvent(e,l,c,t.valueSpan,n,r)}else if(h[6]){const e=p(c,"",o);this.bindingParser.parseLiteralAttr(o,l,c,u,t.valueSpan,n,s,e)}else if(h[8]){const e=p(c,"[(",h[8]);this.bindingParser.parsePropertyBinding(h[8],l,!1,c,u,t.valueSpan,n,s,e),this.parseAssignmentEvent(h[8],l,c,t.valueSpan,n,r)}else if(h[9]){const e=p(c,"[",h[9]);this.bindingParser.parsePropertyBinding(h[9],l,!1,c,u,t.valueSpan,n,s,e)}else if(h[10]){const e=[];this.bindingParser.parseEvent(h[10],l,c,t.valueSpan||c,n,e),ya(e,r)}}else{const e=p(c,"",o);d=this.bindingParser.parsePropertyInterpolation(o,l,c,t.valueSpan,n,s,e)}return d}_visitTextWithInterpolation(e,t,n){const s=Ei(e),r=this.bindingParser.parseInterpolation(s,t);return r?new wt(r,t,n):new Ct(s,t)}parseVariable(e,t,n,s,r,i){e.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',n):0===e.length&&this.reportError("Variable does not have a name",n),i.push(new kt(e,t,n,s,r))}parseReference(e,t,n,s,r){e.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',n):0===e.length&&this.reportError("Reference does not have a name",n),r.push(new Mt(e,t,n,s))}parseAssignmentEvent(e,t,n,s,r,i){const a=[];this.bindingParser.parseEvent(e+"Change",t+"=$event",n,s||n,r,a),ya(a,i)}reportError(e,t,n=us.ERROR){this.errors.push(new ms(t,e,n))}}const va=new class{visitElement(e){const t=Pi(e);if(t.type===ki.SCRIPT||t.type===ki.STYLE||t.type===ki.STYLESHEET)return null;const n=Xr(this,e.children,null);return new Nt(e.name,Xr(this,e.attrs),[],[],n,[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan)}visitComment(e){return null}visitAttribute(e){return new bt(e.name,e.value,e.sourceSpan,void 0,e.i18n)}visitText(e){return new Ct(e.value,e.sourceSpan)}visitExpansion(e){return null}visitExpansionCase(e){return null}};function fa(e){return/^data-/i.test(e)?e.substring(5):e}function ya(e,t){t.push(...e.map(e=>It.fromParsedEvent(e)))}var Sa;!function(e){e[e.ELEMENT=0]="ELEMENT",e[e.TEMPLATE=1]="TEMPLATE"}(Sa||(Sa={}));class xa{constructor(e,t,n=0,s=null,r,i){this.index=e,this.ref=t,this.level=n,this.templateIndex=s,this.meta=r,this.registry=i,this.bindings=new Set,this.placeholders=new Map,this.isEmitted=!1,this._unresolvedCtxCount=0,this._registry=i||{getUniqueId:mn(),icus:new Map},this.id=this._registry.getUniqueId()}appendTag(e,t,n,s){t.isVoid&&s||vn(this.placeholders,t.isVoid||!s?t.startName:t.closeName,{type:e,index:n,ctx:this.id,isVoid:t.isVoid,closed:s})}get icus(){return this._registry.icus}get isRoot(){return 0===this.level}get isResolved(){return 0===this._unresolvedCtxCount}getSerializedPlaceholders(){const e=new Map;return this.placeholders.forEach((t,n)=>e.set(n,t.map(wa))),e}appendBinding(e){this.bindings.add(e)}appendIcu(e,t){vn(this._registry.icus,e,t)}appendBoundText(e){fn(e,this.bindings.size,this.id).forEach((e,t)=>vn(this.placeholders,t,...e))}appendTemplate(e,t){this.appendTag(Sa.TEMPLATE,e,t,!1),this.appendTag(Sa.TEMPLATE,e,t,!0),this._unresolvedCtxCount++}appendElement(e,t,n){this.appendTag(Sa.ELEMENT,e,t,n)}appendProjection(e,t){this.appendTag(Sa.ELEMENT,e,t,!1),this.appendTag(Sa.ELEMENT,e,t,!0)}forkChildContext(e,t,n){return new xa(e,this.ref,this.level+1,t,n,this._registry)}reconcileChildContext(e){["start","close"].forEach(t=>{const n=(this.placeholders.get(e.meta[t+"Name"])||[]).find(Ca(this.id,e.templateIndex));n&&(n.ctx=e.id)}),e.placeholders.forEach((t,n)=>{const s=this.placeholders.get(n);if(!s)return void this.placeholders.set(n,t);const r=s.findIndex(Ca(e.id,e.templateIndex));if(r>=0){const e=n.startsWith("CLOSE");n.endsWith("NG-TEMPLATE")?s.splice(r+(e?0:1),0,...t):(t[e?t.length-1:0].tmpl=s[r],s.splice(r,1,...t))}else s.push(...t);this.placeholders.set(n,s)}),this._unresolvedCtxCount--}}function Ea(e,t,n,s){return dn(`${s?"/":""}${e}${t}`,n)}function _a(e,{index:t,ctx:n,isVoid:s},r){return s?Ea(e,t,n)+Ea(e,t,n,!0):Ea(e,t,n,r)}function Ca(e,t){return n=>"object"==typeof n&&n.type===Sa.TEMPLATE&&n.index===t&&n.ctx===e}function wa(e){const t=(e,t)=>_a("#",e,t),n=(e,t)=>_a("*",e,t);switch(e.type){case Sa.ELEMENT:return e.closed?t(e,!0)+(e.tmpl?n(e.tmpl,!0):""):e.tmpl?n(e.tmpl)+t(e)+(e.isVoid?n(e.tmpl,!0):""):t(e);case Sa.TEMPLATE:return n(e,e.closed);default:return e}}const ba=new class{visitText(e){return e.value}visitContainer(e){return e.children.map(e=>e.visit(this)).join("")}visitIcu(e){const t=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.expressionPlaceholder}, ${e.type}, ${t.join(" ")}}`}visitTagPlaceholder(e){return e.isVoid?this.formatPh(e.startName):`${this.formatPh(e.startName)}${e.children.map(e=>e.visit(this)).join("")}${this.formatPh(e.closeName)}`}visitPlaceholder(e){return this.formatPh(e.name)}visitIcuPlaceholder(e,t){return this.formatPh(e.name)}formatPh(e){return`{${Sn(e,!1)}}`}};function Ta(e){return e.visit(ba)}const Ia={A:"LINK",B:"BOLD_TEXT",BR:"LINE_BREAK",EM:"EMPHASISED_TEXT",H1:"HEADING_LEVEL1",H2:"HEADING_LEVEL2",H3:"HEADING_LEVEL3",H4:"HEADING_LEVEL4",H5:"HEADING_LEVEL5",H6:"HEADING_LEVEL6",HR:"HORIZONTAL_RULE",I:"ITALIC_TEXT",LI:"LIST_ITEM",LINK:"MEDIA_LINK",OL:"ORDERED_LIST",P:"PARAGRAPH",Q:"QUOTATION",S:"STRIKETHROUGH_TEXT",SMALL:"SMALL_TEXT",SUB:"SUBSTRIPT",SUP:"SUPERSCRIPT",TBODY:"TABLE_BODY",TD:"TABLE_CELL",TFOOT:"TABLE_FOOTER",TH:"TABLE_HEADER_CELL",THEAD:"TABLE_HEADER",TR:"TABLE_ROW",TT:"MONOSPACED_TEXT",U:"UNDERLINED_TEXT",UL:"UNORDERED_LIST"};class Na{constructor(){this._placeHolderNameCounts={},this._signatureToName={}}getStartTagPlaceholderName(e,t,n){const s=this._hashTag(e,t,n);if(this._signatureToName[s])return this._signatureToName[s];const r=e.toUpperCase(),i=Ia[r]||"TAG_"+r,a=this._generateUniqueName(n?i:"START_"+i);return this._signatureToName[s]=a,a}getCloseTagPlaceholderName(e){const t=this._hashClosingTag(e);if(this._signatureToName[t])return this._signatureToName[t];const n=e.toUpperCase(),s=this._generateUniqueName("CLOSE_"+(Ia[n]||"TAG_"+n));return this._signatureToName[t]=s,s}getPlaceholderName(e,t){const n=e.toUpperCase(),s=`PH: ${n}=${t}`;if(this._signatureToName[s])return this._signatureToName[s];const r=this._generateUniqueName(n);return this._signatureToName[s]=r,r}getUniquePlaceholder(e){return this._generateUniqueName(e.toUpperCase())}_hashTag(e,t,n){return"<"+e+Object.keys(t).sort().map(e=>` ${e}=${t[e]}`).join("")+(n?"/>":`></${e}>`)}_hashClosingTag(e){return this._hashTag("/"+e,{},!1)}_generateUniqueName(e){if(!this._placeHolderNameCounts.hasOwnProperty(e))return this._placeHolderNameCounts[e]=1,e;const t=this._placeHolderNameCounts[e];return this._placeHolderNameCounts[e]=t+1,`${e}_${t}`}}const Aa=new na(new ji);function Pa(e,t){return t}class ka{constructor(e,t){this._expressionParser=e,this._interpolationConfig=t}toI18nMessage(e,t="",n="",s="",r){const i={isIcu:1==e.length&&e[0]instanceof qr,icuDepth:0,placeholderRegistry:new Na,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:r||Pa},a=Xr(this,e,i);return new Rt(a,i.placeholderToContent,i.placeholderToMessage,t,n,s)}visitElement(e,t){var n;const s=Xr(this,e.children,t),r={};e.attrs.forEach(e=>{r[e.name]=e.value});const i=x(e.name).isVoid,a=t.placeholderRegistry.getStartTagPlaceholderName(e.name,r,i);t.placeholderToContent[a]={text:e.startSourceSpan.toString(),sourceSpan:e.startSourceSpan};let o="";i||(o=t.placeholderRegistry.getCloseTagPlaceholderName(e.name),t.placeholderToContent[o]={text:`</${e.name}>`,sourceSpan:null!==(n=e.endSourceSpan)&&void 0!==n?n:e.sourceSpan});const l=new $t(e.name,r,a,o,s,i,e.sourceSpan,e.startSourceSpan,e.endSourceSpan);return t.visitNodeFn(e,l)}visitAttribute(e,t){const n=this._visitTextWithInterpolation(e.value,e.sourceSpan,t);return t.visitNodeFn(e,n)}visitText(e,t){const n=this._visitTextWithInterpolation(e.value,e.sourceSpan,t);return t.visitNodeFn(e,n)}visitComment(e,t){return null}visitExpansion(e,t){t.icuDepth++;const n={},s=new Dt(e.switchValue,e.type,n,e.sourceSpan);if(e.cases.forEach(e=>{n[e.value]=new Bt(e.expression.map(e=>e.visit(this,t)),e.expSourceSpan)}),t.icuDepth--,t.isIcu||t.icuDepth>0){const n=t.placeholderRegistry.getUniquePlaceholder("VAR_"+e.type);return s.expressionPlaceholder=n,t.placeholderToContent[n]={text:e.switchValue,sourceSpan:e.switchValueSourceSpan},t.visitNodeFn(e,s)}const r=t.placeholderRegistry.getPlaceholderName("ICU",e.sourceSpan.toString());t.placeholderToMessage[r]=this.toI18nMessage([e],"","","",void 0);const i=new Ut(s,r,e.sourceSpan);return t.visitNodeFn(e,i)}visitExpansionCase(e,t){throw new Error("Unreachable code")}_visitTextWithInterpolation(e,t,n){const s=this._expressionParser.splitInterpolation(e,t.start.toString(),this._interpolationConfig);if(!s)return new Ft(e,t);const r=[],i=new Bt(r,t),{start:a,end:o}=this._interpolationConfig;for(let e=0;e<s.strings.length-1;e++){const i=s.expressions[e],l=i.split(La)[2]||"INTERPOLATION",c=n.placeholderRegistry.getPlaceholderName(l,i);if(s.strings[e].length){const n=Ma(t,s.stringSpans[e]);r.push(new Ft(s.strings[e],n))}const u=Ma(t,s.expressionsSpans[e]);r.push(new Vt(i,c,u)),n.placeholderToContent[c]={text:a+i+o,sourceSpan:u}}const l=s.strings.length-1;if(s.strings[l].length){const e=Ma(t,s.stringSpans[l]);r.push(new Ft(s.strings[l],e))}return i}}function Ma(e,{start:t,end:n}){return new cs(e.fullStart.moveBy(t),e.fullStart.moveBy(n))}const La=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g,Oa=(e,t)=>(e instanceof Ur&&(t instanceof Ut&&e.i18n instanceof Rt&&(t.previousMessage=e.i18n),e.i18n=t),t);class Ra{constructor(e=jn,t=!1,n=!1){this.interpolationConfig=e,this.keepI18nAttrs=t,this.enableI18nLegacyMessageIdFormat=n,this.hasI18nMeta=!1,this._createI18nMessage=function(e){const t=new ka(Aa,e);return(e,n,s,r,i)=>t.toI18nMessage(e,n,s,r,i)}(this.interpolationConfig)}_generateI18nMessage(e,t="",n){const{meaning:s,description:r,customId:i}=this._parseMetadata(t),a=this._createI18nMessage(e,s,r,i,n);return this._setMessageId(a,t),this._setLegacyIds(a,t),a}visitElement(e){if(function(e){return e.attrs.some(e=>ln(e.name))}(e)){this.hasI18nMeta=!0;const t=[],n={};for(const s of e.attrs)if("i18n"===s.name){const t=this._generateI18nMessage(e.children,e.i18n||s.value,Oa);t.nodes.length&&(e.i18n=t)}else s.name.startsWith("i18n-")?n[s.name.slice("i18n-".length)]=s.value:t.push(s);if(Object.keys(n).length)for(const e of t){const t=n[e.name];void 0!==t&&e.value&&(e.i18n=this._generateI18nMessage([e],e.i18n||t))}this.keepI18nAttrs||(e.attrs=t)}return Xr(this,e.children,e.i18n),e}visitExpansion(e,t){let n;const s=e.i18n;if(this.hasI18nMeta=!0,s instanceof Ut){const t=s.name;n=this._generateI18nMessage([e],s),hn(n).name=t}else n=this._generateI18nMessage([e],t||s);return e.i18n=n,e}visitText(e){return e}visitAttribute(e){return e}visitComment(e){return e}visitExpansionCase(e){return e}_parseMetadata(e){return"string"==typeof e?function(e=""){let t,n,s;if(e=e.trim()){const r=e.indexOf("@@"),i=e.indexOf("|");let a;[a,t]=r>-1?[e.slice(0,r),e.slice(r+2)]:[e,""],[n,s]=i>-1?[a.slice(0,i),a.slice(i+1)]:["",a]}return{customId:t,meaning:n,description:s}}(e):e instanceof Rt?e:{}}_setMessageId(e,t){e.id||(e.id=t instanceof Rt&&t.id||function(e){return e.id||qt(e)}(e))}_setLegacyIds(e,t){if(this.enableI18nLegacyMessageIdFormat)e.legacyIds=[jt(e),qt(e)];else if("string"!=typeof t){const n=t instanceof Rt?t:t instanceof Ut?t.previousMessage:void 0;e.legacyIds=n?n.legacyIds:[]}}}function Fa(e,t,n,s){const r=[We(function(e){return e.nodes.map(e=>e.visit(Ba,null)).join("")}(t))];Object.keys(s).length&&r.push(vs(s,!0));const i=n.set(Be("goog.getMsg").callFn(r)).toConstDecl(),a=function(e){const t=[];return e.description&&t.push({tagName:"desc",text:e.description}),e.meaning&&t.push({tagName:"meaning",text:e.meaning}),0==t.length?null:function(e=[]){return new Pe(e)}(t)}(t);return null!==a&&i.addLeadingComment(a),[i,new Oe(e.set(n))]}const Ba=new class{formatPh(e){return`{$${Sn(e)}}`}visitText(e){return e.value}visitContainer(e){return e.children.map(e=>e.visit(this)).join("")}visitIcu(e){return Ta(e)}visitTagPlaceholder(e){return e.isVoid?this.formatPh(e.startName):`${this.formatPh(e.startName)}${e.children.map(e=>e.visit(this)).join("")}${this.formatPh(e.closeName)}`}visitPlaceholder(e){return this.formatPh(e.name)}visitIcuPlaceholder(e,t){return this.formatPh(e.name)}};function Da(e,t,n){const{messageParts:s,placeHolders:r}=function(e){const t=[];return e.nodes.forEach(e=>e.visit($a,t)),function(e){const t=[],n=[];e[0]instanceof oe&&t.push(Va(e[0].sourceSpan.start));for(let s=0;s<e.length;s++){const r=e[s];r instanceof ae?t.push(r):(n.push(r),e[s-1]instanceof oe&&t.push(Va(e[s-1].sourceSpan.end)))}return e[e.length-1]instanceof oe&&t.push(Va(e[e.length-1].sourceSpan.end)),{messageParts:t,placeHolders:n}}(t)}(t),i=function(e){const t=e.nodes[0];return new cs(t.sourceSpan.start,e.nodes[e.nodes.length-1].sourceSpan.end,t.sourceSpan.fullStart,t.sourceSpan.details)}(t),a=r.map(e=>n[e.text]),o=function(e,t,n,s,r){return new le(e,t,n,s,r)}(t,s,r,a,i),l=e.set(o);return[new Oe(l)]}const $a=new class{visitText(e,t){t[t.length-1]instanceof ae?t[t.length-1].text+=e.value:t.push(new ae(e.value,e.sourceSpan))}visitContainer(e,t){e.children.forEach(e=>e.visit(this,t))}visitIcu(e,t){t.push(new ae(Ta(e),e.sourceSpan))}visitTagPlaceholder(e,t){var n,s;t.push(this.createPlaceholderPiece(e.startName,null!==(n=e.startSourceSpan)&&void 0!==n?n:e.sourceSpan)),e.isVoid||(e.children.forEach(e=>e.visit(this,t)),t.push(this.createPlaceholderPiece(e.closeName,null!==(s=e.endSourceSpan)&&void 0!==s?s:e.sourceSpan)))}visitPlaceholder(e,t){t.push(this.createPlaceholderPiece(e.name,e.sourceSpan))}visitIcuPlaceholder(e,t){t.push(this.createPlaceholderPiece(e.name,e.sourceSpan))}createPlaceholderPiece(e,t){return new oe(Sn(e,!1),t)}};function Va(e){return new ae("",new cs(e,e))}const Ua=new Set(["$event"]),ja=new Map([["window",yt.resolveWindow],["document",yt.resolveDocument],["body",yt.resolveBody]]),qa=[" ","\n","\r","\t"];function Ha(e,t){return He(Be("rf").bitwiseAnd(We(e),null,!1),t)}function Wa(e,t=null,n=null){const{type:s,name:r,target:i,phase:a,handler:o}=e;if(i&&!ja.has(i))throw new Error(`Unexpected global target '${i}' defined for '${r}' event.\n Supported list of global targets: ${Array.from(ja.keys())}.`);const l=new Set,c=null===n||0===n.bindingLevel?Be("ctx"):n.getOrCreateSharedContextVar(0),u=function(e,t,n,s,r,i,a,o){e||(e=new hr(Ua));const l=function(e,t){const n=new ur(e);return t.visit(n)}({createLiteralArrayConverter:e=>e=>Ue(e),createLiteralMapConverter:e=>t=>je(e.map((e,n)=>({key:e.key,value:t[n],quoted:e.quoted}))),createPipeConverter:e=>{throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: "+e)}},n),c=new pr(e,t,"b",()=>Ye("Unexpected interpolation"),i,a),u=[];!function e(t,n){Array.isArray(t)?t.forEach(t=>e(t,n)):n.push(t)}(l.visit(c,ds.Statement),u),function(e,t,n){for(let t=e-1;t>=0;t--)n.unshift(or("b",t))}(c.temporaryCount,0,u),c.usesImplicitReceiver&&e.notifyImplicitReceiverUse();const p=u.length-1;let h=null;if(p>=0){const e=(d=u[p])instanceof Oe?d.expr:d instanceof Re?d.value:null;e&&(h=Be("pd_b"),u[p]=h.set(e.cast(B).notIdentical(We(!1))).toDeclStmt(null,[Ae.Final]))}var d;return new nr(u,h)}(n,c,o,0,0,e.handlerSpan,l),p=[];n&&(p.push(...n.restoreViewStatement()),p.push(...n.variableDeclarations())),p.push(...u.render3Stmts);const h=1===s?function(e,t){return`@${e}.${t}`}(r,a):r,d=t&&mt(t),m=[];l.has("$event")&&m.push(new ye("$event",B));const g=qe(m,p,D,null,d),v=[We(h),g];return i&&v.push(We(!1),De(ja.get(i))),v}class za{constructor(e,t,n=0,s,r,i,a,o,l,c,u,p,h,d,m={prepareStatements:[],constExpressions:[]}){this.constantPool=e,this.level=n,this.contextName=s,this.i18nContext=r,this.templateIndex=i,this.templateName=a,this.directiveMatcher=o,this.directives=l,this.pipeTypeByName=c,this.pipes=u,this._namespace=p,this.i18nUseExternalIds=d,this._constants=m,this._dataIndex=0,this._bindingContext=0,this._prefixCode=[],this._creationCodeFns=[],this._updateCodeFns=[],this._currentIndex=0,this._tempVariables=[],this._nestedTemplateFns=[],this._unsupported=wn,this.i18n=null,this._pureFunctionSlots=0,this._bindingSlots=0,this._ngContentReservedSlots=[],this._ngContentSelectorsOffset=0,this._implicitReceiverExpr=null,this.visitReference=bn,this.visitVariable=bn,this.visitTextAttribute=bn,this.visitBoundAttribute=bn,this.visitBoundEvent=bn,this._bindingScope=t.nestedScope(n),this.fileBasedI18nSuffix=h.replace(/[^A-Za-z0-9]/g,"_")+"_",this._valueConverter=new Ka(e,()=>this.allocateDataSlot(),e=>this.allocatePureFunctionSlots(e),(e,t,n,s)=>{const r=c.get(e);r&&this.pipes.add(r),this._bindingScope.set(this.level,t,s),this.creationInstruction(null,yt.pipe,[We(n),We(e)])})}buildTemplateFunction(e,t,n=0,s){this._ngContentSelectorsOffset=n,this._namespace!==yt.namespaceHTML&&this.creationInstruction(null,this._namespace),t.forEach(e=>this.registerContextVariables(e));const r=this.i18nContext||cn(s)&&!un(s)&&!(1===(i=e).length&&i[0]instanceof Nt&&e[0].i18n===s);var i;const a=oo(e);if(r&&this.i18nStart(null,s,a),Ot(this,e),this._pureFunctionSlots+=this._bindingSlots,this._valueConverter.updatePipeSlotOffsets(this._bindingSlots),this._nestedTemplateFns.forEach(e=>e()),0===this.level&&this._ngContentReservedSlots.length){const e=[];if(this._ngContentReservedSlots.length>1||"*"!==this._ngContentReservedSlots[0]){const t=this._ngContentReservedSlots.map(e=>"*"!==e?L(e):e);e.push(this.constantPool.getConstLiteral(Tn(t),!0))}this.creationInstruction(null,yt.projectionDef,e,!0)}r&&this.i18nEnd(null,a);const o=this._creationCodeFns.map(e=>e()),l=this._updateCodeFns.map(e=>e()),c=this._bindingScope.viewSnapshotStatements(),u=this._bindingScope.variableDeclarations().concat(this._tempVariables),p=o.length>0?[Ha(1,c.concat(o))]:[],h=l.length>0?[Ha(2,u.concat(l))]:[];return qe([new ye("rf",V),new ye("ctx",null)],[...this._prefixCode,...p,...h],D,null,this.templateName)}getLocal(e){return this._bindingScope.get(e)}notifyImplicitReceiverUse(){this._bindingScope.notifyImplicitReceiverUse()}i18nTranslate(e,t={},n,s){const r=n||this.i18nGenerateMainBlockVar(),i=function(e,t,n,s={},r){const i=[En(t),He(lo(),Fa(t,e,n,yn(s,!0)),Da(t,e,yn(s,!1)))];return r&&i.push(new Oe(t.set(r(t)))),i}(e,r,this.i18nGenerateClosureVar(e.id),t,s);return this._constants.prepareStatements.push(...i),r}registerContextVariables(e){const t=this._bindingScope.freshReferenceName(),n=this.level,s=Be(e.name+t);this._bindingScope.set(n,e.name,s,1,(t,r)=>{let i;return i=t.bindingLevel===n?Be("ctx"):t.getSharedContextName(n)||Ya(r),[s.set(i.prop(e.value||"$implicit")).toConstDecl()]})}i18nAppendBindings(e){e.length>0&&e.forEach(e=>this.i18n.appendBinding(e))}i18nBindProps(e){const t={};return Object.keys(e).forEach(n=>{const s=e[n];if(s instanceof Ct)t[n]=We(s.value);else{const e=s.value.visit(this._valueConverter);if(this.allocateBindingSlots(e),e instanceof Ds){const{strings:s,expressions:r}=e,{id:i,bindings:a}=this.i18n,o=function(e,t=0,n=0){if(!e.length)return"";let s="";const r=e.length-1;for(let i=0;i<r;i++)s+=`${e[i]}${dn(t+i,n)}`;return s+=e[r],s}(s,a.size,i);this.i18nAppendBindings(r),t[n]=We(o)}}}),t}i18nGenerateMainBlockVar(){return Be(this.constantPool.uniqueName("i18n_"))}i18nGenerateClosureVar(e){let t;const n=this.fileBasedI18nSuffix.toUpperCase();if(this.i18nUseExternalIds){const s=xn("EXTERNAL_"),r=this.constantPool.uniqueName(n);t=`${s}${mt(e)}$$${r}`}else{const e=xn(n);t=this.constantPool.uniqueName(e)}return Be(t)}i18nUpdateRef(e){const{icus:t,meta:n,isRoot:s,isResolved:r,isEmitted:i}=e;if(s&&r&&!i&&!un(n)){e.isEmitted=!0;const s=e.getSerializedPlaceholders();let r,i={},a=s.size?gn(s):{};t.size&&t.forEach((e,t)=>{if(1===e.length)a[t]=e[0];else{const n=dn("I18N_EXP_"+t);a[t]=We(n),i[t]=Ue(e)}}),(Array.from(s.values()).some(e=>e.length>1)||Object.keys(i).length)&&(r=e=>{const t=[e];return Object.keys(i).length&&t.push(vs(i,!0)),Qa(null,yt.i18nPostprocess,t)}),this.i18nTranslate(n,a,e.ref,r)}}i18nStart(e=null,t,n){const s=this.allocateDataSlot();this.i18n=this.i18nContext?this.i18nContext.forkChildContext(s,this.templateIndex,t):new xa(s,this.i18nGenerateMainBlockVar(),0,this.templateIndex,t);const{id:r,ref:i}=this.i18n,a=[We(s),this.addToConsts(i)];r>0&&a.push(We(r)),this.creationInstruction(e,n?yt.i18n:yt.i18nStart,a)}i18nEnd(e=null,t){if(!this.i18n)throw new Error("i18nEnd is executed with no i18n context present");this.i18nContext?(this.i18nContext.reconcileChildContext(this.i18n),this.i18nUpdateRef(this.i18nContext)):this.i18nUpdateRef(this.i18n);const{index:n,bindings:s}=this.i18n;if(s.size){const t=[];s.forEach(n=>{t.push({sourceSpan:e,value:()=>this.convertPropertyBinding(n)})}),this.updateInstructionChainWithAdvance(this.getConstCount()-1,yt.i18nExp,t),this.updateInstruction(e,yt.i18nApply,[We(n)])}t||this.creationInstruction(e,yt.i18nEnd),this.i18n=null}i18nAttributesInstruction(e,t,n){let s=!1;const r=[],i=[];if(t.forEach(e=>{const t=e.i18n,a=e.value.visit(this._valueConverter);if(this.allocateBindingSlots(a),a instanceof Ds){const o=gn(fn(t));r.push(We(e.name),this.i18nTranslate(t,o)),a.expressions.forEach(e=>{s=!0,i.push({sourceSpan:n,value:()=>this.convertPropertyBinding(e)})})}}),i.length>0&&this.updateInstructionChainWithAdvance(e,yt.i18nExp,i),r.length>0){const e=We(this.allocateDataSlot()),t=this.addToConsts(Ue(r));this.creationInstruction(n,yt.i18nAttributes,[e,t]),s&&this.updateInstruction(n,yt.i18nApply,[e])}}getNamespaceInstruction(e){switch(e){case"math":return yt.namespaceMathML;case"svg":return yt.namespaceSVG;default:return yt.namespaceHTML}}addNamespaceInstruction(e,t){this._namespace=e,this.creationInstruction(t.startSourceSpan,e)}interpolatedUpdateInstruction(e,t,n,s,r,i){this.updateInstructionWithAdvance(t,s.sourceSpan,e,()=>[We(n),...this.getUpdateInstructionArguments(r),...i])}visitContent(e){const t=this.allocateDataSlot(),n=this._ngContentSelectorsOffset+this._ngContentReservedSlots.length,s=[We(t)];this._ngContentReservedSlots.push(e.selector);const r=e.attributes.filter(e=>"select"!==e.name.toLowerCase()),i=this.getAttributeExpressions(e.name,r,[],[]);i.length>0?s.push(We(n),Ue(i)):0!==n&&s.push(We(n)),this.creationInstruction(e.sourceSpan,yt.projection,s),this.i18n&&this.i18n.appendProjection(e.i18n,t)}visitElement(e){var t,n;const s=this.allocateDataSlot(),r=new Bi(null);let i=!1;const a=cn(e.i18n)&&!un(e.i18n),o=[],[l,c]=p(e.name),u=h(e.name);for(const t of e.attributes){const{name:e,value:n}=t;"ngNonBindable"===e?i=!0:"style"===e?r.registerStyleAttr(n):"class"===e?r.registerClassAttr(n):o.push(t)}this.matchDirectives(e.name,e);const d=[We(s)];u||d.push(We(c));const m=[],g=[];e.inputs.forEach(e=>{r.registerBoundInput(e)||(0===e.type&&e.i18n?g.push(e):m.push(e))});const v=this.getAttributeExpressions(e.name,o,m,e.outputs,r,[],g);d.push(this.addAttrsToConsts(v));const f=this.prepareRefsArray(e.references);d.push(this.addToConsts(f));const y=this._namespace,S=this.getNamespaceInstruction(l);S!==y&&this.addNamespaceInstruction(S,e),this.i18n&&this.i18n.appendElement(e.i18n,s);const x=!a&&this.i18n?!oo(e.children):e.children.length>0,E=!r.hasBindingsWithPipes&&0===e.outputs.length&&0===g.length&&!x,_=!E&&oo(e.children);if(E)this.creationInstruction(e.sourceSpan,u?yt.elementContainer:yt.element,Nn(d));else{if(this.creationInstruction(e.startSourceSpan,u?yt.elementContainerStart:yt.elementStart,Nn(d)),i&&this.creationInstruction(e.startSourceSpan,yt.disableBindings),g.length>0&&this.i18nAttributesInstruction(s,g,null!==(t=e.startSourceSpan)&&void 0!==t?t:e.sourceSpan),e.outputs.length>0){const t=e.outputs.map(t=>({sourceSpan:t.sourceSpan,params:this.prepareListenerParameter(e.name,t,s)}));this.creationInstructionChain(yt.listener,t)}a&&this.i18nStart(e.startSourceSpan,e.i18n,_)}const C=r.buildUpdateLevelInstructions(this._valueConverter),w=C.length-1;for(let e=0;e<=w;e++)this._bindingSlots+=this.processStylingUpdateInstruction(s,C[e]);const b=We(void 0),T=[],I=[];if(m.forEach(e=>{const t=e.type;if(4===t){const t=e.value.visit(this._valueConverter),n=!(t instanceof Rs&&!t.value);this.allocateBindingSlots(t),T.push({name:Et(e.name),sourceSpan:e.sourceSpan,value:()=>n?this.convertPropertyBinding(t):b})}else{if(e.i18n)return;const n=e.value.visit(this._valueConverter);if(void 0!==n){const r=[],[i,a]=p(e.name),o=ro(e.securityContext,1===t);if(o&&r.push(o),i){const e=We(i);o?r.push(e):r.push(We(null),e)}if(this.allocateBindingSlots(n),0===t)n instanceof Ds?this.interpolatedUpdateInstruction(to(n),s,a,e,n,r):T.push({name:a,sourceSpan:e.sourceSpan,value:()=>this.convertPropertyBinding(n),params:r});else if(1===t)if(n instanceof Ds&&Mn(n)>1)this.interpolatedUpdateInstruction(function(e){switch(Mn(e)){case 3:return yt.attributeInterpolate1;case 5:return yt.attributeInterpolate2;case 7:return yt.attributeInterpolate3;case 9:return yt.attributeInterpolate4;case 11:return yt.attributeInterpolate5;case 13:return yt.attributeInterpolate6;case 15:return yt.attributeInterpolate7;case 17:return yt.attributeInterpolate8;default:return yt.attributeInterpolateV}}(n),s,a,e,n,r);else{const t=n instanceof Ds?n.expressions[0]:n;I.push({name:a,sourceSpan:e.sourceSpan,value:()=>this.convertPropertyBinding(t),params:r})}else this.updateInstructionWithAdvance(s,e.sourceSpan,yt.classProp,()=>[We(s),We(a),this.convertPropertyBinding(n),...r])}}}),T.length>0&&this.updateInstructionChainWithAdvance(s,yt.property,T),I.length>0&&this.updateInstructionChainWithAdvance(s,yt.attribute,I),Ot(this,e.children),!a&&this.i18n&&this.i18n.appendElement(e.i18n,s,!0),!E){const t=null!==(n=e.endSourceSpan)&&void 0!==n?n:e.sourceSpan;a&&this.i18nEnd(t,_),i&&this.creationInstruction(t,yt.enableBindings),this.creationInstruction(t,u?yt.elementContainerEnd:yt.elementEnd)}}visitTemplate(e){var t;const n=this.allocateDataSlot();this.i18n&&this.i18n.appendTemplate(e.i18n,n);const s=mt(e.tagName||""),r=`${this.contextName}${s?"_"+s:""}_${n}`,i=r+"_Template",a=[We(n),Be(i),We(e.tagName?p(e.tagName)[1]:e.tagName)];this.matchDirectives("ng-template",e);const o=this.getAttributeExpressions("ng-template",e.attributes,e.inputs,e.outputs,void 0,e.templateAttrs);if(a.push(this.addAttrsToConsts(o)),e.references&&e.references.length){const t=this.prepareRefsArray(e.references);a.push(this.addToConsts(t)),a.push(De(yt.templateRefExtractor))}const l=new za(this.constantPool,this._bindingScope,this.level+1,r,this.i18n,n,i,this.directiveMatcher,this.directives,this.pipeTypeByName,this.pipes,this._namespace,this.fileBasedI18nSuffix,this.i18nUseExternalIds,this._constants);if(this._nestedTemplateFns.push(()=>{const t=l.buildTemplateFunction(e.children,e.variables,this._ngContentReservedSlots.length+this._ngContentSelectorsOffset,e.i18n);this.constantPool.statements.push(t.toDeclStmt(i)),l._ngContentReservedSlots.length&&this._ngContentReservedSlots.push(...l._ngContentReservedSlots)}),this.creationInstruction(e.sourceSpan,yt.templateCreate,()=>(a.splice(2,0,We(l.getConstCount()),We(l.getVarCount())),Nn(a))),this.templatePropertyBindings(n,e.templateAttrs),"ng-template"===e.tagName){const[s,r]=function(e,t){const n=[],s=[];for(const r of e)(t(r)?n:s).push(r);return[n,s]}(e.inputs,pn);if(s.length>0&&this.i18nAttributesInstruction(n,s,null!==(t=e.startSourceSpan)&&void 0!==t?t:e.sourceSpan),r.length>0&&this.templatePropertyBindings(n,r),e.outputs.length>0){const t=e.outputs.map(e=>({sourceSpan:e.sourceSpan,params:this.prepareListenerParameter("ng_template",e,n)}));this.creationInstructionChain(yt.listener,t)}}}visitBoundText(e){if(this.i18n){const t=e.value.visit(this._valueConverter);return this.allocateBindingSlots(t),void(t instanceof Ds&&(this.i18n.appendBoundText(e.i18n),this.i18nAppendBindings(t.expressions)))}const t=this.allocateDataSlot();this.creationInstruction(e.sourceSpan,yt.text,[We(t)]);const n=e.value.visit(this._valueConverter);this.allocateBindingSlots(n),n instanceof Ds?this.updateInstructionWithAdvance(t,e.sourceSpan,function(e){switch(Mn(e)){case 1:return yt.textInterpolate;case 3:return yt.textInterpolate1;case 5:return yt.textInterpolate2;case 7:return yt.textInterpolate3;case 9:return yt.textInterpolate4;case 11:return yt.textInterpolate5;case 13:return yt.textInterpolate6;case 15:return yt.textInterpolate7;case 17:return yt.textInterpolate8;default:return yt.textInterpolateV}}(n),()=>this.getUpdateInstructionArguments(n)):Ye("Text nodes should be interpolated and never bound directly.")}visitText(e){this.i18n||this.creationInstruction(e.sourceSpan,yt.text,[We(this.allocateDataSlot()),We(e.value)])}visitIcu(e){let t=!1;this.i18n||(t=!0,this.i18nStart(null,e.i18n,!0));const n=this.i18n,s=this.i18nBindProps(e.vars),r=this.i18nBindProps(e.placeholders),i=e.i18n,a=e=>{const t=yn(Object.assign(Object.assign({},s),r),!1);return Qa(null,yt.i18nPostprocess,[e,vs(t,!0)])};if(un(n.meta))this.i18nTranslate(i,{},n.ref,a);else{const e=this.i18nTranslate(i,{},void 0,a);n.appendIcu(hn(i).name,e)}return t&&this.i18nEnd(null,!0),null}allocateDataSlot(){return this._dataIndex++}getConstCount(){return this._dataIndex}getVarCount(){return this._pureFunctionSlots}getConsts(){return this._constants}getNgContentSelectors(){return this._ngContentReservedSlots.length?this.constantPool.getConstLiteral(Tn(this._ngContentReservedSlots),!0):null}bindingContext(){return""+this._bindingContext++}templatePropertyBindings(e,t){const n=[];t.forEach(t=>{if(t instanceof Tt){const s=t.value.visit(this._valueConverter);if(void 0!==s)if(this.allocateBindingSlots(s),s instanceof Ds){const n=[];this.interpolatedUpdateInstruction(to(s),e,t.name,t,s,n)}else n.push({name:t.name,sourceSpan:t.sourceSpan,value:()=>this.convertPropertyBinding(s)})}}),n.length>0&&this.updateInstructionChainWithAdvance(e,yt.property,n)}instructionFn(e,t,n,s,r=!1){e[r?"unshift":"push"](()=>{const e=Array.isArray(s)?s:s();return Qa(t,n,e).toStmt()})}processStylingUpdateInstruction(e,t){let n=0;if(t){const s=[];t.calls.forEach(e=>{n+=e.allocateBindingSlots,s.push({sourceSpan:e.sourceSpan,value:()=>e.params(t=>e.supportsInterpolation&&t instanceof Ds?this.getUpdateInstructionArguments(t):this.convertPropertyBinding(t))})}),this.updateInstructionChainWithAdvance(e,t.reference,s)}return n}creationInstruction(e,t,n,s){this.instructionFn(this._creationCodeFns,e,t,n||[],s)}creationInstructionChain(e,t){const n=t.length?t[0].sourceSpan:null;this._creationCodeFns.push(()=>kn(e,t.map(e=>e.params()),n).toStmt())}updateInstructionWithAdvance(e,t,n,s){this.addAdvanceInstructionIfNecessary(e,t),this.updateInstruction(t,n,s)}updateInstruction(e,t,n){this.instructionFn(this._updateCodeFns,e,t,n||[])}updateInstructionChain(e,t){const n=t.length?t[0].sourceSpan:null;this._updateCodeFns.push(()=>{const s=t.map(e=>{const t=e.value(),n=Array.isArray(t)?t:[t];return e.params&&n.push(...e.params),e.name&&n.unshift(We(e.name)),n});return kn(e,s,n).toStmt()})}updateInstructionChainWithAdvance(e,t,n){this.addAdvanceInstructionIfNecessary(e,n.length?n[0].sourceSpan:null),this.updateInstructionChain(t,n)}addAdvanceInstructionIfNecessary(e,t){if(e!==this._currentIndex){const n=e-this._currentIndex;if(n<1)throw new Error("advance instruction can only go forwards");this.instructionFn(this._updateCodeFns,t,yt.advance,[We(n)]),this._currentIndex=e}}allocatePureFunctionSlots(e){const t=this._pureFunctionSlots;return this._pureFunctionSlots+=e,t}allocateBindingSlots(e){this._bindingSlots+=e instanceof Ds?e.expressions.length:1}getImplicitReceiverExpr(){return this._implicitReceiverExpr?this._implicitReceiverExpr:this._implicitReceiverExpr=0===this.level?Be("ctx"):this._bindingScope.getOrCreateSharedContextVar(0)}convertPropertyBinding(e){const t=rr(this,this.getImplicitReceiverExpr(),e,this.bindingContext(),hs.Expression,()=>Ye("Unexpected interpolation")),n=t.currValExpr;return this._tempVariables.push(...t.stmts),n}getUpdateInstructionArguments(e){const{args:t,stmts:n}=function(e,t,n,s){const r=new pr(e,t,s,void 0),i=n.visit(r,ds.Expression);r.usesImplicitReceiver&&e.notifyImplicitReceiverUse();const a=ir(r,s);let o=i.args.slice(1);if(n instanceof Ds){const e=n.strings;3===o.length&&""===e[0]&&""===e[1]?o=[o[1]]:o.length>=19&&(o=[Ue(o)])}return{stmts:a,args:o}}(this,this.getImplicitReceiverExpr(),e,this.bindingContext());return this._tempVariables.push(...n),t}matchDirectives(e,t){if(this.directiveMatcher){const n=function(e,t){const n=new _,s=p(e)[1];return n.setElement(s),Object.getOwnPropertyNames(t).forEach(e=>{const s=p(e)[1],r=t[e];n.addAttribute(s,r),"class"===e.toLowerCase()&&r.trim().split(/\s+/).forEach(e=>n.addClassName(e))}),n}(e,function(e){const t={};return e instanceof At&&"ng-template"!==e.tagName?e.templateAttrs.forEach(e=>t[e.name]=""):(e.attributes.forEach(e=>{ln(e.name)||(t[e.name]=e.value)}),e.inputs.forEach(e=>{t[e.name]=""}),e.outputs.forEach(e=>{t[e.name]=""})),t}(t));this.directiveMatcher.match(n,(e,t)=>{this.directives.add(t)})}}getAttributeExpressions(e,t,n,s,r,i=[],a=[]){const o=new Set,l=[];let c;for(const n of t)"ngProjectAs"===n.name&&(c=n),n.i18n?l.push(We(n.name),this.i18nTranslate(n.i18n)):l.push(...Za(n.name),io(e,n));function u(e,t){"string"==typeof e?o.has(e)||(l.push(...Za(e)),void 0!==t&&l.push(t),o.add(e)):l.push(We(e))}if(c&&l.push(...function(e){const t=L(e.value)[0];return[We(5),Tn(t)]}(c)),r&&r.populateInitialStylingAttrs(l),n.length||s.length){const e=l.length;for(let e=0;e<n.length;e++){const t=n[e];4!==t.type&&1!==t.type&&u(t.name)}for(let e=0;e<s.length;e++){const t=s[e];1!==t.type&&u(t.name)}l.length!==e&&l.splice(e,0,We(3))}return i.length&&(l.push(We(4)),i.forEach(e=>u(e.name))),a.length&&(l.push(We(6)),a.forEach(e=>u(e.name))),l}addToConsts(e){if(ze(e))return Ne;const t=this._constants.constExpressions;for(let n=0;n<t.length;n++)if(t[n].isEquivalent(e))return We(n);return We(t.push(e)-1)}addAttrsToConsts(e){return e.length>0?this.addToConsts(Ue(e)):Ne}prepareRefsArray(e){return e&&0!==e.length?Tn(function e(t){return t.reduce((t,n)=>{const s=Array.isArray(n)?e(n):n;return t.concat(s)},[])}(e.map(e=>{const t=this.allocateDataSlot(),n=this._bindingScope.freshReferenceName(),s=this.level,r=Be(n);return this._bindingScope.set(s,e.name,r,0,(e,n)=>{const s=n>0?[Ya(n).toStmt()]:[],i=r.set(De(yt.reference).callFn([We(t)]));return s.concat(i.toConstDecl())},!0),[e.name,e.value]}))):Ne}prepareListenerParameter(e,t,n){return()=>{const s=t.name,r=1===t.type?_t(s,t.phase):mt(s),i=`${this.templateName}_${e}_${r}_${n}_listener`,a=this._bindingScope.nestedScope(this._bindingScope.bindingLevel,Ua);return Wa(t,i,a)}}}class Ka extends class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Ds(e.span,e.sourceSpan,e.strings,n):e}visitLiteralPrimitive(e,t){return e}visitPropertyRead(e,t){const n=e.receiver.visit(this);return n!==e.receiver?new As(e.span,e.sourceSpan,e.nameSpan,n,e.name):e}visitPropertyWrite(e,t){const n=e.receiver.visit(this),s=e.value.visit(this);return n!==e.receiver||s!==e.value?new Ps(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitSafePropertyRead(e,t){const n=e.receiver.visit(this);return n!==e.receiver?new ks(e.span,e.sourceSpan,e.nameSpan,n,e.name):e}visitMethodCall(e,t){const n=e.receiver.visit(this),s=this.visitAll(e.args);return n!==e.receiver||s!==e.args?new qs(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitSafeMethodCall(e,t){const n=e.receiver.visit(this),s=this.visitAll(e.args);return n!==e.receiver||s!==e.args?new Hs(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitFunctionCall(e,t){const n=e.target&&e.target.visit(this),s=this.visitAll(e.args);return n!==e.target||s!==e.args?new Ws(e.span,e.sourceSpan,n,s):e}visitLiteralArray(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Fs(e.span,e.sourceSpan,n):e}visitLiteralMap(e,t){const n=this.visitAll(e.values);return n!==e.values?new Bs(e.span,e.sourceSpan,e.keys,n):e}visitUnary(e,t){const n=e.expr.visit(this);if(n!==e.expr)switch(e.operator){case"+":return Vs.createPlus(e.span,e.sourceSpan,n);case"-":return Vs.createMinus(e.span,e.sourceSpan,n);default:throw new Error("Unknown unary operator "+e.operator)}return e}visitBinary(e,t){const n=e.left.visit(this),s=e.right.visit(this);return n!==e.left||s!==e.right?new $s(e.span,e.sourceSpan,e.operation,n,s):e}visitPrefixNot(e,t){const n=e.expression.visit(this);return n!==e.expression?new Us(e.span,e.sourceSpan,n):e}visitNonNullAssert(e,t){const n=e.expression.visit(this);return n!==e.expression?new js(e.span,e.sourceSpan,n):e}visitConditional(e,t){const n=e.condition.visit(this),s=e.trueExp.visit(this),r=e.falseExp.visit(this);return n!==e.condition||s!==e.trueExp||r!==e.falseExp?new Ns(e.span,e.sourceSpan,n,s,r):e}visitPipe(e,t){const n=e.exp.visit(this),s=this.visitAll(e.args);return n!==e.exp||s!==e.args?new Os(e.span,e.sourceSpan,n,e.name,s,e.nameSpan):e}visitKeyedRead(e,t){const n=e.obj.visit(this),s=e.key.visit(this);return n!==e.obj||s!==e.key?new Ms(e.span,e.sourceSpan,n,s):e}visitKeyedWrite(e,t){const n=e.obj.visit(this),s=e.key.visit(this),r=e.value.visit(this);return n!==e.obj||s!==e.key||r!==e.value?new Ls(e.span,e.sourceSpan,n,s,r):e}visitAll(e){const t=[];let n=!1;for(let s=0;s<e.length;++s){const r=e[s],i=r.visit(this);t[s]=i,n=n||i!==r}return n?t:e}visitChain(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Is(e.span,e.sourceSpan,n):e}visitQuote(e,t){return e}}{constructor(e,t,n,s){super(),this.constantPool=e,this.allocateSlot=t,this.allocatePureFunctionSlots=n,this.definePipe=s,this._pipeBindExprs=[]}visitPipe(e,t){const n=this.allocateSlot(),s="PIPE:"+n,r=this.allocatePureFunctionSlots(2+e.args.length),i=new As(e.span,e.sourceSpan,e.nameSpan,new bs(e.span,e.sourceSpan),s),{identifier:a,isVarLength:o}=function(e){const t=Xa[e.length];return{identifier:t||yt.pipeBindV,isVarLength:!t}}(e.args);this.definePipe(e.name,s,n,De(a));const l=[e.exp,...e.args],c=this.visitAll(o?[new Fs(e.span,e.sourceSpan,l)]:l),u=new Ws(e.span,e.sourceSpan,i,[new Rs(e.span,e.sourceSpan,n),new Rs(e.span,e.sourceSpan,r),...c]);return this._pipeBindExprs.push(u),u}updatePipeSlotOffsets(e){this._pipeBindExprs.forEach(t=>{t.args[1].value+=e})}visitLiteralArray(e,t){return new dr(e.span,e.sourceSpan,this.visitAll(e.expressions),e=>{const t=Ue(e);return Ja(this.constantPool,t,this.allocatePureFunctionSlots)})}visitLiteralMap(e,t){return new dr(e.span,e.sourceSpan,this.visitAll(e.values),t=>{const n=je(t.map((t,n)=>({key:e.keys[n].key,value:t,quoted:e.keys[n].quoted})));return Ja(this.constantPool,n,this.allocatePureFunctionSlots)})}}const Xa=[yt.pipeBind1,yt.pipeBind2,yt.pipeBind3,yt.pipeBind4],Ga=[yt.pureFunction0,yt.pureFunction1,yt.pureFunction2,yt.pureFunction3,yt.pureFunction4,yt.pureFunction5,yt.pureFunction6,yt.pureFunction7,yt.pureFunction8];function Qa(e,t,n){return De(t,null,e).callFn(n,e)}function Ya(e){return De(yt.nextContext).callFn(e>1?[We(e)]:[])}function Ja(e,t,n){const{literalFactory:s,literalFactoryArguments:r}=e.getLiteralFactory(t),i=n(1+r.length),{identifier:a,isVarLength:o}=function(e){const t=Ga[e.length];return{identifier:t||yt.pureFunctionV,isVarLength:!t}}(r),l=[We(i),s];return o?l.push(Ue(r)):l.push(...r),De(a).callFn(l)}function Za(e){const[t,n]=p(e),s=We(n);return t?[We(0),We(t),s]:[s]}class eo{constructor(e=0,t=null,n){if(this.bindingLevel=e,this.parent=t,this.globals=n,this.map=new Map,this.referenceNameIndex=0,this.restoreViewVariable=null,void 0!==n)for(const e of n)this.set(0,e,Be(e))}static createRootScope(){return new eo}get(e){let t=this;for(;t;){let n=t.map.get(e);if(null!=n)return t!==this&&(n={retrievalLevel:n.retrievalLevel,lhs:n.lhs,declareLocalCallback:n.declareLocalCallback,declare:!1,priority:n.priority,localRef:n.localRef},this.map.set(e,n),this.maybeGenerateSharedContextVar(n),this.maybeRestoreView(n.retrievalLevel,n.localRef)),n.declareLocalCallback&&!n.declare&&(n.declare=!0),n.lhs;t=t.parent}return 0===this.bindingLevel?null:this.getComponentProperty(e)}set(e,t,n,s=0,r,i){if(this.map.has(t)){if(i)return this;Ye(`The name ${t} is already defined in scope to be ${this.map.get(t)}`)}return this.map.set(t,{retrievalLevel:e,lhs:n,declare:!1,declareLocalCallback:r,priority:s,localRef:i||!1}),this}getLocal(e){return this.get(e)}notifyImplicitReceiverUse(){0!==this.bindingLevel&&(this.map.get("$$shared_ctx$$0").declare=!0)}nestedScope(e,t){const n=new eo(e,this,t);return e>0&&n.generateSharedContextVar(0),n}getOrCreateSharedContextVar(e){const t="$$shared_ctx$$"+e;return this.map.has(t)||this.generateSharedContextVar(e),this.map.get(t).lhs}getSharedContextName(e){const t=this.map.get("$$shared_ctx$$"+e);return t&&t.declare?t.lhs:null}maybeGenerateSharedContextVar(e){if(1===e.priority&&e.retrievalLevel<this.bindingLevel){const t=this.map.get("$$shared_ctx$$"+e.retrievalLevel);t?t.declare=!0:this.generateSharedContextVar(e.retrievalLevel)}}generateSharedContextVar(e){const t=Be("ctx"+this.freshReferenceName());this.map.set("$$shared_ctx$$"+e,{retrievalLevel:e,lhs:t,declareLocalCallback:(e,n)=>[t.set(Ya(n)).toConstDecl()],declare:!1,priority:2,localRef:!1})}getComponentProperty(e){const t=this.map.get("$$shared_ctx$$0");return t.declare=!0,this.maybeRestoreView(0,!1),t.lhs.prop(e)}maybeRestoreView(e,t){this.isListenerScope()&&(e<this.bindingLevel||t)&&(this.parent.restoreViewVariable||(this.parent.restoreViewVariable=Be(this.parent.freshReferenceName())),this.restoreViewVariable=this.parent.restoreViewVariable)}restoreViewStatement(){return this.restoreViewVariable?[Qa(null,yt.restoreView,[this.restoreViewVariable]).toStmt()]:[]}viewSnapshotStatements(){const e=Qa(null,yt.getCurrentView,[]);return this.restoreViewVariable?[this.restoreViewVariable.set(e).toConstDecl()]:[]}isListenerScope(){return this.parent&&this.parent.bindingLevel===this.bindingLevel}variableDeclarations(){let e=0;return Array.from(this.map.values()).filter(e=>e.declare).sort((e,t)=>t.retrievalLevel-e.retrievalLevel||t.priority-e.priority).reduce((t,n)=>{const s=this.bindingLevel-n.retrievalLevel,r=n.declareLocalCallback(this,s-e);return e=s,t.concat(r)},[])}freshReferenceName(){let e=this;for(;e.parent;)e=e.parent;return"_r"+e.referenceNameIndex++}}function to(e){switch(Mn(e)){case 1:return yt.propertyInterpolate;case 3:return yt.propertyInterpolate1;case 5:return yt.propertyInterpolate2;case 7:return yt.propertyInterpolate3;case 9:return yt.propertyInterpolate4;case 11:return yt.propertyInterpolate5;case 13:return yt.propertyInterpolate6;case 15:return yt.propertyInterpolate7;case 17:return yt.propertyInterpolate8;default:return yt.propertyInterpolateV}}const no=new da;function so(e=jn){return new bi(new sa(new ji),e,no,null,[])}function ro(e,t){switch(e){case N.HTML:return De(yt.sanitizeHtml);case N.SCRIPT:return De(yt.sanitizeScript);case N.STYLE:return t?De(yt.sanitizeStyle):null;case N.URL:return De(yt.sanitizeUrl);case N.RESOURCE_URL:return De(yt.sanitizeResourceUrl);default:return null}}function io(e,t){const n=Tn(t.value);switch(no.securityContext(e,t.name,!0)){case N.HTML:return De(yt.trustConstantHtml).callFn([n],t.valueSpan);case N.SCRIPT:return De(yt.trustConstantScript).callFn([n],t.valueSpan);case N.RESOURCE_URL:return De(yt.trustConstantResourceUrl).callFn([n],t.valueSpan);default:return n}}function ao(e){return e instanceof Ct||e instanceof wt||e instanceof Lt}function oo(e){return e.every(ao)}function lo(){return Ve(Be("ngI18nClosureMode")).notIdentical(We("undefined",U)).and(Be("ngI18nClosureMode"))}const co=/attr\.([^\]]+)/;function uo(e,t,n){const s=new Pn,r=L(e.selector);return s.set("type",e.internalType),r.length>0&&s.set("selectors",Tn(r)),e.queries.length>0&&s.set("contentQueries",function(e,t,n){const s=[],r=[],i=Cn(r,"_t");for(const n of e){s.push(De(n.static?yt.staticContentQuery:yt.contentQuery).callFn([Be("dirIndex"),...ho(n,t)]).toStmt());const e=i(),a=De(yt.loadQuery).callFn([]),o=De(yt.queryRefresh).callFn([e.set(a)]),l=Be("ctx").prop(n.propertyName).set(n.first?e.prop("first"):e);r.push(o.and(l).toStmt())}const a=n?n+"_ContentQueries":null;return qe([new ye("rf",V),new ye("ctx",null),new ye("dirIndex",null)],[Ha(1,s),Ha(2,r)],D,null,a)}(e.queries,t,e.name)),e.viewQueries.length&&s.set("viewQuery",function(e,t,n){const s=[],r=[],i=Cn(r,"_t");e.forEach(e=>{const n=De(e.static?yt.staticViewQuery:yt.viewQuery).callFn(ho(e,t));s.push(n.toStmt());const a=i(),o=De(yt.loadQuery).callFn([]),l=De(yt.queryRefresh).callFn([a.set(o)]),c=Be("ctx").prop(e.propertyName).set(e.first?a.prop("first"):a);r.push(l.and(c).toStmt())});const a=n?n+"_Query":null;return qe([new ye("rf",V),new ye("ctx",null)],[Ha(1,s),Ha(2,r)],D,null,a)}(e.viewQueries,t,e.name)),s.set("hostBindings",function(e,t,n,s,r,i,a){const o=Be("ctx"),l=new Bi(o),{styleAttr:c,classAttr:u}=e.specialAttributes;void 0!==c&&l.registerStyleAttr(c),void 0!==u&&l.registerClassAttr(u);const p=[],h=[],d=t,m=yo(e),g=n.createDirectiveHostEventAsts(m,d);if(g&&g.length){const e=function(e,t){const n=[],s=[],r=[];return e.forEach(e=>{let r=e.name&&mt(e.name);const i=1===e.type?_t(r,e.targetOrPhase):r,a=t&&r?`${t}_${i}_HostBindingHandler`:null,o=Wa(It.fromParsedEvent(e),a);1==e.type?s.push(o):n.push(o)}),s.length>0&&r.push(kn(yt.syntheticHostListener,s).toStmt()),n.length>0&&r.push(kn(yt.listener,n).toStmt()),r}(g,i);p.push(...e)}const v=n.createBoundHostProperties(m,d),f=[];let y,S=0;v&&v.forEach(e=>{l.registerInputBasedOnName(e.name,e.expression,d)?S+=2:(f.push(e),S++)});const x=()=>(y||(y=new Ka(s,()=>Ye("Unexpected node"),e=>{const t=S;return S+=e,t},()=>Ye("Unexpected pipe"))),y),E=[],_=[],C=[];f.forEach(e=>{const t=e.expression.visit(x()),s=fo(o,t),{bindingName:i,instruction:a,isAttribute:l}=function(e){let t,n=e.name;const s=n.match(co);return s?(n=s[1],t=yt.attribute):e.isAnimation?(n=Et(n),t=yt.syntheticHostProperty):t=yt.hostProperty,{bindingName:n,instruction:t,isAttribute:!!s}}(e),c=n.calcPossibleSecurityContexts(r,i,l).filter(e=>e!==N.NONE);let u=null;c.length&&(u=2===c.length&&c.indexOf(N.URL)>-1&&c.indexOf(N.RESOURCE_URL)>-1?De(yt.sanitizeUrlOrResourceUrl):ro(c[0],l));const p=[We(i),s.currValExpr];u&&p.push(u),h.push(...s.stmts),a===yt.hostProperty?E.push(p):a===yt.attribute?_.push(p):a===yt.syntheticHostProperty?C.push(p):h.push(De(a).callFn(p).toStmt())}),E.length>0&&h.push(kn(yt.hostProperty,E).toStmt()),_.length>0&&h.push(kn(yt.attribute,_).toStmt()),C.length>0&&h.push(kn(yt.syntheticHostProperty,C).toStmt());const w=function(e){const t=[];for(let n of Object.getOwnPropertyNames(e)){const s=e[n];t.push(We(n),s)}return t}(e.attributes);if(l.assignHostAttrs(w,a),l.hasBindings&&l.buildUpdateLevelInstructions(x()).forEach(e=>{if(e.calls.length>0){const t=[];e.calls.forEach(e=>{S+=Math.max(e.allocateBindingSlots-2,0),t.push(function(e,t,n){return e.params(e=>n(t,e).currValExpr)}(e,o,fo))}),h.push(kn(e.reference,t).toStmt())}}),S&&a.set("hostVars",We(S)),p.length>0||h.length>0){const e=i?i+"_HostBindings":null,t=[];return p.length>0&&t.push(Ha(1,p)),h.length>0&&t.push(Ha(2,h)),qe([new ye("rf",V),new ye("ctx",null)],t,D,null,e)}return null}(e.host,e.typeSourceSpan,n,t,e.selector||"",e.name,s)),s.set("inputs",In(e.inputs,!0)),s.set("outputs",In(e.outputs)),null!==e.exportAs&&s.set("exportAs",Ue(e.exportAs.map(e=>We(e)))),s}function po(e,t){const n=[],s=t.providers,r=t.viewProviders;if(s||r){const e=[s||new we([])];r&&e.push(r),n.push(De(yt.ProvidersFeature).callFn(e))}t.usesInheritance&&n.push(De(yt.InheritDefinitionFeature)),t.fullInheritance&&n.push(De(yt.CopyDefinitionFeature)),t.lifecycle.usesOnChanges&&n.push(De(yt.NgOnChangesFeature)),n.length&&e.set("features",Ue(n))}function ho(e,t){const n=[An(e,t),We(e.descendants)];return e.read&&n.push(e.read),n}function mo(e){return $e(je(Object.keys(e).map(t=>({key:t,value:We(Array.isArray(e[t])?e[t][0]:e[t]),quoted:!0}))))}function go(e){return e.length>0?$e(Ue(e.map(e=>We(e)))):j}function vo(e){const t=null!==e.selector?e.selector.replace(/\n/g,""):null;return[xt(e.type.type,e.typeArgumentCount),null!==t?(n=t,$e(We(n))):j,null!==e.exportAs?go(e.exportAs):j,mo(e.inputs),mo(e.outputs),go(e.queries.map(e=>e.propertyName))];var n}function fo(e,t){return rr(null,e,t,"b",hs.Expression,()=>Ye("Unexpected interpolation"))}function yo(e){return{hostAttributes:{},hostListeners:e.listeners,hostProperties:e.properties}}const So=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;class xo{get(e){return""}}const Eo=Object.keys({useClass:null})[0],_o=Object.keys({useFactory:null})[0],Co=Object.keys({useValue:null})[0],wo=Object.keys({useExisting:null})[0],bo=function(e){const t=new Y(e);return{value:t,type:t}};function To(e){return Object.assign(Object.assign({},e),{predicate:Array.isArray(e.predicate)?e.predicate:new Y(e.predicate),read:e.read?new Y(e.read):null,static:e.static})}function Io(e){const t=Oo(e.inputs||[]),n=Oo(e.outputs||[]),s=e.propMetadata,r={},i={};for(const e in s)s.hasOwnProperty(e)&&s[e].forEach(t=>{"Input"===t.ngMetadataName?r[e]=t.bindingPropertyName?[t.bindingPropertyName,e]:e:Lo(t)&&(i[e]=t.bindingPropertyName||e)});return Object.assign(Object.assign({},e),{typeSourceSpan:e.typeSourceSpan,type:bo(e.type),internalType:new Y(e.type),deps:Po(e.deps),host:ko(e.propMetadata,e.typeSourceSpan,e.host),inputs:Object.assign(Object.assign({},t),r),outputs:Object.assign(Object.assign({},n),i),queries:e.queries.map(To),providers:null!=e.providers?new Y(e.providers):null,viewQueries:e.viewQueries.map(To),fullInheritance:!1})}function No(e,t){return e.hasOwnProperty(t)?new Y(e[t]):void 0}function Ao(e){let t;return t=null===e.token?new re(null):e.resolved===Rn.Attribute?new re(e.token):new Y(e.token),{token:t,attribute:null,resolved:e.resolved,host:e.host,optional:e.optional,self:e.self,skipSelf:e.skipSelf}}function Po(e){return null==e?null:e.map(Ao)}function ko(e,t,n){const s=function(e){const t={},n={},s={},r={};for(const i of Object.keys(e)){const a=e[i],o=i.match(So);if(null===o)switch(i){case"class":if("string"!=typeof a)throw new Error("Class binding must be string");r.classAttr=a;break;case"style":if("string"!=typeof a)throw new Error("Style binding must be string");r.styleAttr=a;break;default:t[i]="string"==typeof a?We(a):a}else if(null!=o[1]){if("string"!=typeof a)throw new Error("Property binding must be string");s[o[1]]=a}else if(null!=o[2]){if("string"!=typeof a)throw new Error("Event binding must be string");n[o[2]]=a}}return{attributes:t,listeners:n,properties:s,specialAttributes:r}}(n||{}),r=function(e,t){const n=yo(e),s=so();return s.createDirectiveHostEventAsts(n,t),s.createBoundHostProperties(n,t),s.errors}(s,t);if(r.length)throw new Error(r.map(e=>e.msg).join("\n"));for(const t in e)e.hasOwnProperty(t)&&e[t].forEach(e=>{"HostBinding"===e.ngMetadataName?s.properties[e.hostPropertyName||t]=t:Mo(e)&&(s.listeners[e.eventName||t]=`${t}(${(e.args||[]).join(",")})`)});return s}function Mo(e){return"HostListener"===e.ngMetadataName}function Lo(e){return"Output"===e.ngMetadataName}function Oo(e){return e.reduce((e,t)=>{const[n,s]=t.split(",").map(e=>e.trim());return e[n]=s||n,e},{})}var Ro,Fo,Bo;new class{constructor(e){this.full=e;const t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}}("11.0.0"),function(e){e[e.Extract=0]="Extract",e[e.Merge=1]="Merge"}(Ro||(Ro={})),function(e){e[e.OnInit=0]="OnInit",e[e.OnDestroy=1]="OnDestroy",e[e.DoCheck=2]="DoCheck",e[e.OnChanges=3]="OnChanges",e[e.AfterContentInit=4]="AfterContentInit",e[e.AfterContentChecked=5]="AfterContentChecked",e[e.AfterViewInit=6]="AfterViewInit",e[e.AfterViewChecked=7]="AfterViewChecked"}(Fo||(Fo={})),Be("_l"),Be("_l"),Be("_v"),Be("_ck"),Be("_co"),Be("en"),Be("ad"),function(e){e[e.Scheme=1]="Scheme",e[e.UserInfo=2]="UserInfo",e[e.Domain=3]="Domain",e[e.Port=4]="Port",e[e.Path=5]="Path",e[e.QueryData=6]="QueryData",e[e.Fragment=7]="Fragment"}(Bo||(Bo={})),(st.ng||(st.ng={})).ɵcompilerFacade=new class{constructor(e=new es){this.jitEvaluator=e,this.R3ResolvedDependencyType=Rn,this.R3FactoryTarget=On,this.ResourceLoader=xo,this.elementSchemaRegistry=new da}compilePipe(e,t,n){const s=function(e){const t=[];return t.push({key:"name",value:We(e.pipeName),quoted:!1}),t.push({key:"type",value:e.type.value,quoted:!1}),t.push({key:"pure",value:We(e.pure),quoted:!1}),{expression:De(yt.definePipe).callFn([je(t)]),type:new F(De(yt.PipeDefWithMeta,[xt(e.type.type,e.typeArgumentCount),new F(new re(e.pipeName))]))}}({name:n.name,type:bo(n.type),internalType:new Y(n.type),typeArgumentCount:n.typeArgumentCount,deps:Po(n.deps),pipeName:n.pipeName,pure:n.pure});return this.jitExpression(s.expression,e,t,[])}compileInjectable(e,t,n){const{expression:s,statements:r}=function(e){let t=null;const n={name:e.name,type:e.type,internalType:e.internalType,typeArgumentCount:e.typeArgumentCount,deps:[],injectFn:dt.inject,target:On.Injectable};if(void 0!==e.useClass){const s=e.useClass.isEquivalent(e.internalType);let r=void 0;void 0!==e.userDeps&&(r=e.userDeps),t=void 0!==r?Fn(Object.assign(Object.assign({},n),{delegate:e.useClass,delegateDeps:r,delegateType:Ln.Class})):s?Fn(n):$n(e.type.value,e.useClass)}else t=void 0!==e.useFactory?void 0!==e.userDeps?Fn(Object.assign(Object.assign({},n),{delegate:e.useFactory,delegateDeps:e.userDeps||[],delegateType:Ln.Function})):{statements:[],factory:qe([],[new Re(e.useFactory.callFn([]))])}:void 0!==e.useValue?Fn(Object.assign(Object.assign({},n),{expression:e.useValue})):void 0!==e.useExisting?Fn(Object.assign(Object.assign({},n),{expression:De(dt.inject).callFn([e.useExisting])})):$n(e.type.value,e.internalType);const s={token:e.internalType,factory:t.factory};return null!==e.providedIn.value&&(s.providedIn=e.providedIn),{expression:De(dt.ɵɵdefineInjectable).callFn([St(s)]),type:new F(De(dt.InjectableDef,[xt(e.type.type,e.typeArgumentCount)])),statements:t.statements}}({name:n.name,type:bo(n.type),internalType:new Y(n.type),typeArgumentCount:n.typeArgumentCount,providedIn:(i=n.providedIn,null==i||"string"==typeof i?new re(i):new Y(i)),useClass:No(n,Eo),useFactory:No(n,_o),useValue:No(n,Co),useExisting:No(n,wo),userDeps:Po(n.userDeps)||void 0});var i;return this.jitExpression(s,e,t,r)}compileInjector(e,t,n){const s=function(e){const t=Fn({name:e.name,type:e.type,internalType:e.internalType,typeArgumentCount:0,deps:e.deps,injectFn:yt.inject,target:On.NgModule}),n={factory:t.factory};return null!==e.providers&&(n.providers=e.providers),e.imports.length>0&&(n.imports=Ue(e.imports)),{expression:De(yt.defineInjector).callFn([St(n)]),type:new F(De(yt.InjectorDef,[new F(e.type.type)])),statements:t.statements}}({name:n.name,type:bo(n.type),internalType:new Y(n.type),deps:Po(n.deps),providers:new Y(n.providers),imports:n.imports.map(e=>new Y(e))});return this.jitExpression(s.expression,e,t,s.statements)}compileNgModule(e,t,n){const s=function(e){const{internalType:t,type:n,bootstrap:s,declarations:r,imports:i,exports:a,schemas:o,containsForwardDecls:l,emitInline:c,id:u}=e,p=[],h={type:t};if(s.length&&(h.bootstrap=ys(s,l)),c)r.length&&(h.declarations=ys(r,l)),i.length&&(h.imports=ys(i,l)),a.length&&(h.exports=ys(a,l));else{const t=function(e){const{adjacentType:t,declarations:n,imports:s,exports:r,containsForwardDecls:i}=e,a={};if(n.length&&(a.declarations=ys(n,i)),s.length&&(a.imports=ys(s,i)),r.length&&(a.exports=ys(r,i)),0===Object.keys(a).length)return null;const o=function(e){const t=new de({name:"ngJitMode",moduleName:null}),n=new Ee(H.Identical,new Q(t),We("undefined")),s=new Ee(H.Or,n,t,void 0,void 0,!0);return new Ee(H.And,s,e)}(new ne(De(yt.setNgModuleScope),[t,St(a)])),l=new Se([],[o.toStmt()]);return new ne(l,[]).toStmt()}(e);null!==t&&p.push(t)}return o&&o.length&&(h.schemas=Ue(o.map(e=>e.value))),u&&(h.id=u),{expression:De(yt.defineNgModule).callFn([St(h)]),type:new F(De(yt.NgModuleDefWithMeta,[new F(n.type),fs(r),fs(i),fs(a)])),additionalStatements:p}}({type:bo(n.type),internalType:new Y(n.type),adjacentType:new Y(n.type),bootstrap:n.bootstrap.map(bo),declarations:n.declarations.map(bo),imports:n.imports.map(bo),exports:n.exports.map(bo),emitInline:!0,containsForwardDecls:!1,schemas:n.schemas?n.schemas.map(bo):null,id:n.id?new Y(n.id):null});return this.jitExpression(s.expression,e,t,[])}compileDirective(e,t,n){const s=new ot,r=so(),i=function(e,t,n){const s=uo(e,t,n);po(s,e);const r=De(yt.defineDirective).callFn([s.toLiteralMap()]),i=vo(e);return{expression:r,type:$e(De(yt.DirectiveDefWithMeta,i))}}(Io(n),s,r);return this.jitExpression(i.expression,e,t,s.statements)}compileComponent(e,t,n){const s=new ot,r=n.interpolation?Un.fromArray(n.interpolation):jn,i=function(e,t,n={}){const{interpolationConfig:s,preserveWhitespaces:r,enableI18nLegacyMessageIdFormat:i}=n,a=so(s),o=(new fi).parse(e,t,Object.assign(Object.assign({leadingTriviaChars:qa},n),{tokenizeExpansionForms:!0}));if(o.errors&&o.errors.length>0)return{interpolationConfig:s,preserveWhitespaces:r,template:e,errors:o.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};let l=o.rootNodes;const c=new Ra(s,!r,i);l=Xr(c,l),r||(l=Xr(new _i,l),c.hasI18nMeta&&(l=Xr(new Ra(s,!1),l)));const{nodes:u,errors:p,styleUrls:h,styles:d,ngContentSelectors:m}=function(e,t){const n=new ga(t);return{nodes:Xr(n,e),errors:t.errors.concat(n.errors),styleUrls:n.styleUrls,styles:n.styles,ngContentSelectors:n.ngContentSelectors}}(l,a);return{interpolationConfig:s,preserveWhitespaces:r,errors:p.length>0?p:null,template:e,nodes:u,styleUrls:h,styles:d,ngContentSelectors:m}}(n.template,t,{preserveWhitespaces:n.preserveWhitespaces,interpolationConfig:r});if(null!==i.errors){const e=i.errors.map(e=>e.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${n.name}: ${e}`)}const a=function(e,t,n){const s=uo(e,t,n);po(s,e);const r=e.selector&&_.parse(e.selector),i=r&&r[0];if(i){const e=i.getAttrs();e.length&&s.set("attrs",t.getConstLiteral(Ue(e.map(e=>We(null!=e?e:void 0))),!0))}let a=null;if(e.directives.length>0){const t=new C;for(const{selector:n,expression:s}of e.directives)t.addSelectables(_.parse(n),s);a=t}const o=e.name,l=o?o+"_Template":null,c=new Set,u=new Set,p=e.changeDetection,h=e.template,d=new za(t,eo.createRootScope(),0,o,null,null,l,a,c,e.pipes,u,yt.namespaceHTML,e.relativeContextFilePath,e.i18nUseExternalIds),m=d.buildTemplateFunction(h.nodes,[]),g=d.getNgContentSelectors();g&&s.set("ngContentSelectors",g),s.set("decls",We(d.getConstCount())),s.set("vars",We(d.getVarCount()));const{constExpressions:v,prepareStatements:f}=d.getConsts();if(v.length>0){let e=Ue(v);f.length>0&&(e=qe([],[...f,new Re(e)])),s.set("consts",e)}if(s.set("template",m),c.size){let t=Ue(Array.from(c));e.wrapDirectivesAndPipesInClosure&&(t=qe([],[new Re(t)])),s.set("directives",t)}if(u.size){let t=Ue(Array.from(u));e.wrapDirectivesAndPipesInClosure&&(t=qe([],[new Re(t)])),s.set("pipes",t)}if(null===e.encapsulation&&(e.encapsulation=T.Emulated),e.styles&&e.styles.length){const n=(e.encapsulation==T.Emulated?function(e,t,n){const s=new mr;return e.map(e=>s.shimCssText(e,"_ngcontent-%COMP%","_nghost-%COMP%"))}(e.styles):e.styles).map(e=>t.getConstLiteral(We(e)));s.set("styles",Ue(n))}else e.encapsulation===T.Emulated&&(e.encapsulation=T.None);e.encapsulation!==T.Emulated&&s.set("encapsulation",We(e.encapsulation)),null!==e.animations&&s.set("data",je([{key:"animation",value:e.animations,quoted:!1}])),null!=p&&p!==I.Default&&s.set("changeDetection",We(p));const y=De(yt.defineComponent).callFn([s.toLiteralMap()]),S=vo(e);return S.push(go(e.template.ngContentSelectors)),{expression:y,type:$e(De(yt.ComponentDefWithMeta,S))}}(Object.assign(Object.assign(Object.assign({},n),Io(n)),{selector:n.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:i,wrapDirectivesAndPipesInClosure:!1,styles:[...n.styles,...i.styles],encapsulation:n.encapsulation,interpolation:r,changeDetection:n.changeDetection,animations:null!=n.animations?new Y(n.animations):null,viewProviders:null!=n.viewProviders?new Y(n.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0}),s,so(r));return this.jitExpression(a.expression,e,`ng:///${n.name}.js`,s.statements)}compileFactory(e,t,n){const s=Fn({name:n.name,type:bo(n.type),internalType:new Y(n.type),typeArgumentCount:n.typeArgumentCount,deps:Po(n.deps),injectFn:"directiveInject"===n.injectFn?dt.directiveInject:dt.inject,target:n.target});return this.jitExpression(s.factory,e,t,s.statements)}createParseSourceSpan(e,t,n){return function(e,t,n){const s=new ls("",`in ${e} ${t} in ${n}`);return new cs(new os(s,-1,-1,-1),new os(s,-1,-1,-1))}(e,t,n)}jitExpression(e,t,n,s){const r=[...s,new Me("$def",e,void 0,[Ae.Exported])];return this.jitEvaluator.evaluateStatements(n,r,new gs(t),!0).$def}};const Do=Symbol("PROPERTY");function $o(e,t){const n=e.attributes.find(e=>e.name===t);if(n)return n.value;const s=e.inputs.find(e=>e.name===t);return s&&s.value instanceof Ks?s.value.ast instanceof Rs?s.value.ast.value:Do:null}var Vo=o({name:"accessibility-alt-text",meta:{type:"suggestion",docs:{description:"Enforces alternate text for elements which require the alt, aria-label, aria-labelledby attributes.",category:"Best Practices",recommended:!1},schema:[],messages:{accessibilityAltText:"<{{element}}/> element must have a text alternative."}},defaultOptions:[],create(e){const t=l(e);return{"Element[name=/^(img|area|object|input)$/]"(n){if(!function(e){return"img"===e.name?function(e){return e.attributes.some(({name:e})=>qo(e))||e.inputs.some(({name:e})=>qo(e))}(e):"object"===e.name?function(e){let t=!1,n=!1;for(const s of e.attributes)t="title"===s.name,n=jo(s.name);if(t||n)return!0;let s=!1,r=!1;for(const t of e.inputs)s="title"===t.name,r=jo(t.name);return!(!s&&!r)||e.children.length>0&&!!e.children[0].value}(e):"area"===e.name?Uo(e):function(e){return"image"!==$o(e,"type")||Uo(e)}(e)}(n)){const s=t.convertElementSourceSpanToLoc(e,n);e.report({loc:s,messageId:"accessibilityAltText",data:{element:n.name}})}}}}});function Uo(e){let t=!1,n=!1;for(const s of e.attributes)t=qo(s.name),n=jo(s.name);if(t||n)return!0;let s=!1,r=!1;for(const t of e.inputs)s=qo(t.name),r=jo(t.name);return s||r}function jo(e){return"aria-label"===e||"aria-labelledby"===e}function qo(e){return"alt"===e}const Ho=new Set(["innerHtml","innerHTML","innerText"]);var Wo=o({name:"accessibility-elements-content",meta:{type:"suggestion",docs:{description:"Ensures that the heading, anchor and button elements have content in it.",category:"Best Practices",recommended:!1},schema:[],messages:{accessibilityElementsContent:"<{{element}}/> should have content."}},defaultOptions:[],create(e){const t=l(e);return{"Element[name=/^(a|button|h1|h2|h3|h4|h5|h6)$/][children.length=0]"({inputs:n,name:s,sourceSpan:r}){if(n.some(({name:e})=>Ho.has(e)))return;const i=t.convertNodeSourceSpanToLoc(r);e.report({loc:i,messageId:"accessibilityElementsContent",data:{element:s}})}}}});const zo={items:{type:"string"},type:"array",uniqueItems:!0},Ko=["button","input","meter","output","progress","select","textarea"],Xo=["for","htmlFor"],Go=["label"];var Qo=o({name:"accessibility-label-for",meta:{type:"suggestion",docs:{description:"Ensures that a label element/component is associated with a form element",category:"Best Practices",recommended:!1},schema:[{additionalProperties:!1,properties:{controlComponents:zo,labelAttributes:zo,labelComponents:zo},type:"object"}],messages:{accessibilityLabelFor:"A label element/component must be associated with a form element"}},defaultOptions:[{controlComponents:Ko,labelAttributes:Xo,labelComponents:Go}],create(e,[t]){const n=l(e),{controlComponents:s,labelAttributes:r,labelComponents:i}=function({controlComponents:e,labelAttributes:t,labelComponents:n}){return{controlComponents:new Set([...Ko,...null!=e?e:[]]),labelAttributes:new Set([...Xo,...null!=t?t:[]]),labelComponents:new Set([...Go,...null!=n?n:[]])}}(t);var a;return{[`Element[name=${a=[...i],RegExp(`^(${a.join("|")})$`)}]`](t){const i=new Set([...t.attributes,...t.inputs].map(({name:e})=>e));if([...r].some(e=>i.has(e))||function(e,t){return Boolean([...e].some(e=>{return n=e,function e({children:t}){return t.some(t=>t instanceof Nt&&(t.name===n||e(t)))}(t);var n}))}(s,t))return;const a=n.convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:a,messageId:"accessibilityLabelFor"})}}}}),Yo=o({name:"accessibility-table-scope",meta:{type:"suggestion",docs:{description:"Ensures that scope is not used on any element except <th>",category:"Best Practices",recommended:!1},schema:[],messages:{accessibilityTableScope:"Scope attribute can only be on <th> element"}},defaultOptions:[],create(e){const t=l(e);return{'Element[name!="th"] > :matches(BoundAttribute[name="scope"], TextAttribute[name="scope"])'({sourceSpan:n}){const s=t.convertNodeSourceSpanToLoc(n);e.report({loc:s,messageId:"accessibilityTableScope"})}}}}),Jo=o({name:"accessibility-valid-aria",meta:{type:"suggestion",docs:{description:"Ensures that correct ARIA attributes and respective values are used",category:"Best Practices",recommended:!1},schema:[],messages:{accessibilityValidAria:"The `{{attribute}}` is an invalid ARIA attribute",accessibilityValidAriaValue:"The `{{attribute}}` has an invalid value. Check the valid values at https://raw.githack.com/w3c/aria/stable/#roles"}},defaultOptions:[],create(e){const t=l(e);return{"BoundAttribute[name=/^aria-.*/], TextAttribute[name=/^aria-.*/]"(n){const{name:r,sourceSpan:i}=n,a=s.aria.get(r),o=t.convertNodeSourceSpanToLoc(i);if(!a)return void e.report({loc:o,messageId:"accessibilityValidAria",data:{attribute:r}});const l=function(e){return e instanceof Tt?e.value.ast:e}(n);(function(e){return!function(e){return e instanceof Fs||e instanceof Bs}(e)&&!function(e){return e instanceof Rs||e instanceof bt}(e)})(l)||function({allowundefined:e,type:t,values:n},s){if(e&&el(s))return!0;switch(t){case"boolean":return Zo(s);case"tristate":return Zo(s)||el(s);case"id":case"idlist":return!0;case"integer":return r=s,!Number.isNaN(r)&&parseInt(Number(r))==r&&!Number.isNaN(parseInt(r,10));case"number":return function(e){return!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(e)}(s);case"string":return function(e){return"string"==typeof e}(s);case"token":case"tokenlist":{const e=Zo(s)?JSON.parse(s):s;return Boolean(null==n?void 0:n.includes(e))}}var r}(a,l.value)||e.report({loc:o,messageId:"accessibilityValidAriaValue",data:{attribute:r}})}}}});function Zo(e){return"boolean"==typeof e||"false"===e||"true"===e}function el(e){return null==e}const tl=/\[(.*)\]/;var nl=o({name:"banana-in-box",meta:{type:"suggestion",docs:{description:"Ensures that the two-way data binding syntax is correct",category:"Best Practices",recommended:"error"},fixable:"code",schema:[],messages:{bananaInBox:"Invalid binding syntax. Use [(expr)] instead"}},defaultOptions:[],create(e){const t=l(e),n=e.getSourceCode();return{BoundEvent({name:s,sourceSpan:r}){const i=s.match(tl);if(!i)return;const[,a]=i,o=`[(${a})]`,l=t.convertNodeSourceSpanToLoc(r),c=n.getIndexFromLoc(l.start);e.report({messageId:"bananaInBox",loc:l,fix:e=>e.replaceTextRange([c,c+s.length+2],o)})}}}});let sl=null;function rl(){return sl||(sl=new Set(s.dom.keys()))}const il=new Set(["presentation","none",Do]);function al(e){if("string"==typeof e){if("true"===e)return!0;if("false"===e)return!1}return e}let ol=null,ll=null,cl=null;var ul=o({name:"click-events-have-key-events",meta:{type:"suggestion",docs:{description:"Ensures that the click event is accompanied with at least one key event keyup, keydown or keypress.",category:"Best Practices",recommended:!1},schema:[],messages:{clickEventsHaveKeyEvents:"click must be accompanied by either keyup, keydown or keypress event for accessibility."}},defaultOptions:[],create:e=>({Element(t){if(!rl().has(t.name))return;if(function(e){const t=$o(e,"role");return null!==t&&il.has(t)}(t)||function(e){if("INPUT"===e.name.toUpperCase()){const t=$o(e,"type");if("string"==typeof t&&"HIDDEN"===t.toUpperCase())return!0}const t=al($o(e,"aria-hidden"));return t===Do||!0===t}(t)||function(e){return rl().has(e.name)&&function(e){function t(t){return e.name===t.name&&function(e=[],t){const n=[...t.attributes,...t.inputs];return e.every(e=>n.some(n=>"a"===t.name&&"routerLink"===n.name||e.name===n.name&&(!e.value||e.value===al($o(t,e.name)))))}(t.attributes,e)}return!!function(){if(null===ol){const e=[...s.roles.keys()],t=[...s.elementRoles],n=new Set(e.filter(e=>{const t=s.roles.get(e);return!t.abstract&&"progressbar"!==e&&t.superClass.some(e=>e.includes("widget"))}).concat("toolbar"));ol=t.reduce((e,[t,s])=>([...s].some(e=>n.has(e))&&e.push(t),e),[])}return ol}().some(t)||!function(){if(null===ll){const e=[...s.roles.keys()],t=[...s.elementRoles],n=new Set(e.filter(e=>{const t=s.roles.get(e);return!t.abstract&&"toolbar"!==e&&!t.superClass.some(e=>e.includes("widget"))}).concat("progressbar"));ll=t.reduce((e,[t,s])=>([...s].every(e=>n.has(e))&&e.push(t),e),[])}return ll}().some(t)&&!!function(){if(null===cl){const{AXObjects:e,elementAXObjects:t}=require("axobject-query"),n=new Set(Array.from(e.keys()).filter(t=>"widget"===e.get(t).type));cl=[...t].reduce((e,[t,s])=>([...s].every(e=>n.has(e))&&e.push(t),e),[])}return cl}().some(t)}(e)}(t))return;let n=!1,r=!1;for(const e of t.outputs)n="click"===e.name,r=e.name.startsWith("keyup")||e.name.startsWith("keydown")||e.name.startsWith("keypress");if(!n||r)return;const i=l(e).convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:i,messageId:"clickEventsHaveKeyEvents"})}})}),pl=o({name:"conditional-complexity",meta:{type:"suggestion",docs:{description:"The conditional complexity should not exceed a rational limit",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{maxComplexity:{minimum:1,type:"number"}},additionalProperties:!1}],messages:{"conditionalСomplexity":'The conditional complexity "{{totalComplexity}}" exceeds the defined limit "{{maxComplexity}}"'}},defaultOptions:[{maxComplexity:5}],create(e,[{maxComplexity:t}]){const n=e.getSourceCode(),s=l(e);return{BoundAttribute({value:{source:n},sourceSpan:r}){if(!n)return;const i=n.replace(/\s/g,""),a=ml(hl((dl||(dl=new na(new ji))).parseBinding(i,null,0).ast));if(a<=t)return;const o=s.convertNodeSourceSpanToLoc(r);e.report({loc:o,messageId:"conditionalСomplexity",data:{maxComplexity:t,totalComplexity:a}})},Interpolation({expressions:s}){for(const r of s){const s=ml(r);if(s<=t)continue;const{sourceSpan:{end:i,start:a}}=r,o={end:n.getLocFromIndex(i),start:n.getLocFromIndex(a)};e.report({loc:o,messageId:"conditionalСomplexity",data:{maxComplexity:t,totalComplexity:s}})}}}}});function hl(e){return e instanceof Os?e.exp:e}let dl=null;function ml(e){const t=hl(e);if(!(t instanceof $s||t instanceof Ns))return 0;let n=1;return t instanceof $s&&(t.left instanceof $s&&(n+=ml(t.left)),t.right instanceof $s&&(n+=ml(t.right))),t instanceof Ns&&(n+=ml(t.condition)+ml(t.trueExp)+ml(t.falseExp)),n}var gl=o({name:"cyclomatic-complexity",meta:{type:"suggestion",docs:{description:"Checks cyclomatic complexity against a specified limit. It is a quantitative measure of the number of linearly independent paths through a program's source code",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{maxComplexity:{type:"number",minimum:1}},additionalProperties:!1}],messages:{cyclomaticComplexity:'The cyclomatic complexity "{{totalComplexity}}" exceeds the defined limit "{{maxComplexity}}"'}},defaultOptions:[{maxComplexity:5}],create(e,[{maxComplexity:t}]){let n=0;const s=l(e);return{'BoundAttribute[name=/^(ngForOf|ngIf|ngSwitchCase)$/], TextAttribute[name="ngSwitchDefault"]'({sourceSpan:r}){if(n+=1,n<=t)return;const i=s.convertNodeSourceSpanToLoc(r);e.report({messageId:"cyclomaticComplexity",loc:i,data:{maxComplexity:t,totalComplexity:n}})}}}});const vl=["Text","Icu"],fl=["class","style","color","svgIcon","href","src","id","lang","charset","height","width","target","type","colspan","uiSref","uiSrefActive","ui-view","xmlns","stroke-width","stroke","fill","viewBox","tabindex","formControlName"],yl=[],Sl=/[A-Z]/i,xl={checkId:!0,checkText:!0,checkAttributes:!0,ignoreAttributes:[""],ignoreTags:[],boundTextAllowedPattern:""};var El=o({name:"i18n",meta:{type:"suggestion",docs:{description:"Helps to ensure following best practices for i18n. Checks for missing i18n attributes on elements and non-ignored attributes containing text. Can also highlight tags that do not use Custom ID (@@) feature. Default Config = "+JSON.stringify(xl),category:"Best Practices",recommended:!1},fixable:"code",schema:[{type:"object",properties:{checkId:{type:"boolean"},checkText:{type:"boolean"},checkAttributes:{type:"boolean"},ignoreAttributes:{type:"array",items:{type:"string"}},ignoreTags:{type:"array",items:{type:"string"}},boundTextAllowedPattern:{type:"string"}},additionalProperties:!1}],messages:{i18nId:"Missing custom message identifier. For more information visit https://angular.io/guide/i18n#use-a-custom-id-with-a-description",i18nIdOnAttrib:"Missing custom message identifier on attribute '{{attribName}}'. For more information visit https://angular.io/guide/i18n#use-a-custom-id-with-a-description",i18nText:"Each element containing text node should have an i18n attribute. See https://angular.io/guide/i18n",i18nAttrib:"Attribute '{{attribName}}' has no corresponding i18n attribute. See https://angular.io/guide/i18n#translate-attributes",i18nSuggestIgnore:"Add the attribute name '{{attribName}}' to the ignoreAttributes option in the eslint config."}},defaultOptions:[xl],create(e,[t]){const n=l(e),s=e.getSourceCode(),{checkId:r,checkText:i,checkAttributes:a,ignoreAttributes:o,ignoreTags:c,boundTextAllowedPattern:u}=t,p=c&&c.length>0?c:yl,h=u?new RegExp(u):Sl,d=[...fl];function m(t,o){const l=n.convertNodeSourceSpanToLoc(t.sourceSpan);let c=s.getIndexFromLoc(l.start)+1;c+=o.length,t.attributes.forEach(t=>{t.i18n?r&&!t.i18n.customId&&e.report({messageId:"i18nIdOnAttrib",loc:l,data:{attribName:t.name}}):!(a&&t.value&&"string"==typeof t.value&&t.value.length>0&&"true"!==t.value&&"false"!==t.value)||function(e){let t=e;return t.endsWith("px")&&(t=t.substr(0,t.length-2)),String(Number(t))===String(t)}(t.value)||t.name.startsWith(":xml")||d.includes(t.name)||d.includes(o+"["+t.name+"]")||e.report({messageId:"i18nAttrib",loc:l,data:{attribName:t.name},fix:e=>e.replaceTextRange([c,c]," i18n-"+t.name),suggest:[{messageId:"i18nSuggestIgnore",data:{attribName:t.name},fix:e=>e.insertTextBeforeRange([0,0],"")}]})}),t.i18n?r&&(t.i18n.customId||e.report({messageId:"i18nId",loc:l})):!i||p&&-1!==p.indexOf(t.name)||t.children&&t.children.some(e=>vl.includes(e.type)||"BoundText"===e.type&&h.test(e.value.ast.strings.join("").trim()))&&e.report({messageId:"i18nText",loc:l,fix:e=>e.replaceTextRange([c,c]," i18n")})}return o&&o.length>0&&d.push(...o),{Element(e){m(e,e.name)},Template(e){m(e,e.tagName)}}}}),_l=o({name:"mouse-events-have-key-events",meta:{type:"suggestion",docs:{description:"Ensures that the Mouse Events mouseover and mouseout are accompanied with Key Events focus and blur.",category:"Best Practices",recommended:!1},schema:[],messages:{mouseOverEventHasFocusEvent:"mouseover must be accompanied by focus event for accessibility.",mouseOutEventHasBlurEvent:"mouseout must be accompanied by blur event for accessibility"}},defaultOptions:[],create(e){const t=l(e);return{Element(n){let s=!1,r=!1,i=!1,a=!1;for(const e of n.outputs)s="mouseover"===e.name,r="mouseout"===e.name,i="focus"===e.name,a="blur"===e.name;if(!s&&!r)return;const o=t.convertNodeSourceSpanToLoc(n.sourceSpan);s&&!i&&e.report({loc:o,messageId:"mouseOverEventHasFocusEvent"}),r&&!a&&e.report({loc:o,messageId:"mouseOutEventHasBlurEvent"})}}}}),Cl=o({name:"no-any",meta:{type:"suggestion",docs:{description:'The use of "$any" nullifies the compile-time benefits of the Angular\'s type system.',category:"Best Practices",recommended:!1},schema:[],messages:{noAny:'Avoid using "$any" in templates'}},defaultOptions:[],create(e){c(e);const t=e.getSourceCode();return{'MethodCall[name="$any"][receiver.expression=undefined][receiver.name=undefined]'({sourceSpan:{end:n,start:s}}){const r={start:t.getLocFromIndex(s),end:t.getLocFromIndex(n)};e.report({messageId:"noAny",loc:r})}}}}),wl=o({name:"no-autofocus",meta:{type:"suggestion",docs:{description:"Ensure that autofocus attribute is not used",category:"Best Practices",recommended:!1},schema:[],messages:{noAutofocus:"autofocus attribute should not be used, as it reduces usability and accessibility for users"}},defaultOptions:[],create(e){const t=l(e);return{'TextAttribute[name="autofocus"], BoundAttribute[name="autofocus"]'(n){const s=t.convertNodeSourceSpanToLoc(n.sourceSpan);e.report({loc:s,messageId:"noAutofocus"})}}}}),bl=o({name:"no-call-expression",meta:{type:"suggestion",docs:{description:"Disallows calling expressions in templates, except for output handlers",category:"Best Practices",recommended:!1},schema:[],messages:{noCallExpression:"Avoid calling expressions in templates"}},defaultOptions:[],create(e){c(e);const t=e.getSourceCode();return{':not(BoundEvent) > * > :matches(MethodCall[name!="$any"], SafeMethodCall)'({sourceSpan:{end:n,start:s}}){const r={start:t.getLocFromIndex(s),end:t.getLocFromIndex(n)};e.report({messageId:"noCallExpression",loc:r})}}}}),Tl=o({name:"no-distracting-elements",meta:{type:"suggestion",docs:{description:"Enforces that no distracting elements are used",category:"Best Practices",recommended:!1},schema:[],messages:{noDistractingElements:"Do not use <{{element}}> elements as they can create visual accessibility issues and are deprecated"}},defaultOptions:[],create(e){const t=l(e);return{"Element[name=/^(blink|marquee)$/]"({name:n,sourceSpan:s}){const r=t.convertNodeSourceSpanToLoc(s);e.report({loc:r,messageId:"noDistractingElements",data:{element:n}})}}}}),Il=o({name:"no-negated-async",meta:{type:"suggestion",docs:{description:"Ensures that strict equality is used when evaluating negations on async pipe output",category:"Best Practices",recommended:"error"},schema:[],messages:{noNegatedAsync:"Async pipes should not be negated. Use (observable | async) === (false | null | undefined) to check its value instead",noLooseEquality:"Async pipes must use strict equality `===` when comparing with `false`"}},defaultOptions:[],create(e){c(e);const t=e.getSourceCode();return{"PrefixNot > BindingPipe[name=async]"({parent:{parent:{type:n},sourceSpan:{end:s,start:r}}}){const i=Nl(n)?-1:0,a={start:t.getLocFromIndex(r+i),end:t.getLocFromIndex(s+i)};e.report({messageId:"noNegatedAsync",loc:a})},'Binary[operation="=="] > BindingPipe[name=async]'({parent:{parent:{type:n},sourceSpan:{end:s,start:r}}}){const i=Nl(n)?-2:-1,a=Nl(n)?-1:0,o={start:t.getLocFromIndex(r+i),end:t.getLocFromIndex(s+a)};e.report({messageId:"noLooseEquality",loc:o})}}}});function Nl(e){return"Interpolation"===e}var Al=o({name:"no-positive-tabindex",meta:{type:"suggestion",docs:{description:"Ensures that the tabindex attribute is not positive",category:"Best Practices",recommended:!1},schema:[],messages:{noPositiveTabindex:"tabindex attribute cannot be positive"}},defaultOptions:[],create(e){const t=l(e);return{'BoundAttribute[name="tabindex"][value.ast.value>0], TextAttribute[name="tabindex"][value>0]'({sourceSpan:n}){const s=t.convertNodeSourceSpanToLoc(n);e.report({loc:s,messageId:"noPositiveTabindex"})}}}});function Pl(){return(Pl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}var kl=o({name:"use-track-by-function",meta:{type:"suggestion",docs:{description:"Ensures trackBy function is used.",category:"Best Practices",recommended:!1},schema:[],messages:{useTrackByFunction:"Missing trackBy function in ngFor directive"}},defaultOptions:[],create(e){const t=l(e);return{'BoundAttribute.inputs[name="ngForOf"]'(n){if(n.parent.inputs.some(e=>"BoundAttribute"===e.type&&"ngForTrackBy"===e.name))return;const s=t.convertNodeSourceSpanToLoc(n.sourceSpan);e.report({messageId:"useTrackByFunction",loc:s})},'BoundAttribute.templateAttrs[name="ngForOf"]'(n){const s=n.parent.templateAttrs;if(s.some(e=>"BoundAttribute"===e.type&&"ngForTrackBy"===e.name))return;const r=t.convertNodeSourceSpanToLoc(s[0].sourceSpan).start,i=t.convertNodeSourceSpanToLoc(s[s.length-1].sourceSpan).end,a={start:Pl({},r,{column:r.column-1}),end:Pl({},i,{column:i.column+1})};e.report({messageId:"useTrackByFunction",loc:a})}}}});module.exports={configs:{all:{extends:"./configs/base.json",rules:{"@angular-eslint/template/accessibility-alt-text":"error","@angular-eslint/template/accessibility-elements-content":"error","@angular-eslint/template/accessibility-label-for":"error","@angular-eslint/template/accessibility-table-scope":"error","@angular-eslint/template/accessibility-valid-aria":"error","@angular-eslint/template/banana-in-box":"error","@angular-eslint/template/click-events-have-key-events":"error","@angular-eslint/template/conditional-complexity":"error","@angular-eslint/template/cyclomatic-complexity":"error","@angular-eslint/template/i18n":"error","@angular-eslint/template/mouse-events-have-key-events":"error","@angular-eslint/template/no-any":"error","@angular-eslint/template/no-autofocus":"error","@angular-eslint/template/no-call-expression":"error","@angular-eslint/template/no-distracting-elements":"error","@angular-eslint/template/no-negated-async":"error","@angular-eslint/template/no-positive-tabindex":"error","@angular-eslint/template/use-track-by-function":"error"}},base:{parser:"@angular-eslint/template-parser",plugins:["@angular-eslint/template"]},recommended:{extends:"./configs/base.json",rules:{"@angular-eslint/template/banana-in-box":"error","@angular-eslint/template/no-negated-async":"error"}},"process-inline-templates":{parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:2020,sourceType:"module"},plugins:["@angular-eslint/template"],processor:"@angular-eslint/template/extract-inline-html"}},processors:a,rules:{"accessibility-alt-text":Vo,"accessibility-elements-content":Wo,"accessibility-label-for":Qo,"accessibility-table-scope":Yo,"accessibility-valid-aria":Jo,"banana-in-box":nl,"conditional-complexity":pl,"click-events-have-key-events":ul,"cyclomatic-complexity":gl,i18n:El,"mouse-events-have-key-events":_l,"no-any":Cl,"no-autofocus":wl,"no-call-expression":bl,"no-distracting-elements":Tl,"no-negated-async":Il,"no-positive-tabindex":Al,"use-track-by-function":kl}};
|
|
1
|
+
var e,t=(e=require("typescript"))&&"object"==typeof e&&"default"in e?e.default:e,n=require("@typescript-eslint/experimental-utils"),s=require("aria-query");function r(e,t){const n=(e=e.replace(/\r\n/g,"\n")).indexOf(t);return[n,n+t.length]}const i=new Map;var a={"extract-inline-html":{preprocess:function(e,n){const s=[e];if(!function(e,t){return!![".component.ts",".page.ts",".dialog.ts",".modal.ts",".popover.ts",".bottomsheet.ts",".snackbar.ts"].some(e=>t.endsWith(e))||!(!e.includes("Component")||!e.includes("@angular/core"))}(e,n))return s;try{const a=t.createSourceFile(n,e,t.ScriptTarget.Latest,!0),o=a.statements.filter(e=>t.isClassDeclaration(e));if(!o||!o.length)return s;const l=[];for(const e of o)if(e.decorators)for(const n of e.decorators)t.isCallExpression(n.expression)&&t.isIdentifier(n.expression.expression)&&"Component"===n.expression.expression.text&&l.push(n);if(!l||!l.length)return s;const c=[e];let u=0;for(const n of l){if(!t.isDecorator(n)||!t.isCallExpression(n.expression)||1!==n.expression.arguments.length)continue;const s=n.expression.arguments[0];if(!t.isObjectLiteralExpression(s))continue;const o=s.properties.find(e=>e&&e.name&&"template"===e.name.getText());if(s.properties.find(e=>e&&e.name&&"templateUrl"===e.name.getText())||!o)continue;if(!t.isPropertyAssignment(o)||!t.isStringLiteralLike(o.initializer))continue;const l=o.initializer.text,p=r(e,l),h=`inline-template-${++u}.component.html`;i.set(h,{range:p,lineAndCharacter:{start:a.getLineAndCharacterOfPosition(p[0]),end:a.getLineAndCharacterOfPosition(p[1])}}),c.push({text:l,filename:h})}return c}catch(e){return console.log(e),console.error("preprocess: ERROR could not parse @Component() metadata",n),s}},postprocess:function(e,t){const n=e[0];if(1===e.length)return n;const s=e.slice(1);return[...n,...[].concat(...s.map((e,t)=>{const n=`inline-template-${++t}.component.html`,s=i.get(n);return s?e.map(e=>{if(e.line=e.line+s.lineAndCharacter.start.line,e.endLine=e.endLine+s.lineAndCharacter.start.line,e.fix){const t=s.range[0];e.fix.range=[t+e.fix.range[0],t+e.fix.range[1]]}return e}):[]}))]},supportsAutofix:!0}};const o=n.ESLintUtils.RuleCreator(()=>"");function l(e){return c(e),e.parserServices}function c(e){var t,n;if(!(null==(t=e.parserServices)?void 0:t.convertNodeSourceSpanToLoc)||!(null==(n=e.parserServices)?void 0:n.convertElementSourceSpanToLoc))throw new Error("You have used a rule which requires '@angular-eslint/template-parser' to be used as the 'parser' in your ESLint config.")}var u;function p(e){if(":"!=e[0])return[null,e];const t=e.indexOf(":",1);if(-1==t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[e.slice(1,t),e.slice(t+1)]}function h(e){return"ng-container"===p(e)[1]}function d(e){return"ng-content"===p(e)[1]}function m(e){return null===e?null:p(e)[0]}function g(e,t){return e?`:${e}:${t}`:t}!function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"}(u||(u={}));const v={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",alefsym:"ℵ",Alpha:"Α",alpha:"α",amp:"&",and:"∧",ang:"∠",apos:"'",Aring:"Å",aring:"å",asymp:"≈",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",bdquo:"„",Beta:"Β",beta:"β",brvbar:"¦",bull:"•",cap:"∩",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",Chi:"Χ",chi:"χ",circ:"ˆ",clubs:"♣",cong:"≅",copy:"©",crarr:"↵",cup:"∪",curren:"¤",dagger:"†",Dagger:"‡",darr:"↓",dArr:"⇓",deg:"°",Delta:"Δ",delta:"δ",diams:"♦",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",empty:"∅",emsp:" ",ensp:" ",Epsilon:"Ε",epsilon:"ε",equiv:"≡",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",exist:"∃",fnof:"ƒ",forall:"∀",frac12:"½",frac14:"¼",frac34:"¾",frasl:"⁄",Gamma:"Γ",gamma:"γ",ge:"≥",gt:">",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:"",ngsp:""};class f{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:n=u.PARSABLE_DATA,closedByParent:s=!1,isVoid:r=!1,ignoreFirstLf:i=!1,preventNamespaceInheritance:a=!1}={}){this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,e&&e.length>0&&e.forEach(e=>this.closedByChildren[e]=!0),this.isVoid=r,this.closedByParent=s||r,this.implicitNamespacePrefix=t||null,this.contentType=n,this.ignoreFirstLf=i,this.preventNamespaceInheritance=a}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}let y,S;function x(e){var t,n;return S||(y=new f,S={base:new f({isVoid:!0}),meta:new f({isVoid:!0}),area:new f({isVoid:!0}),embed:new f({isVoid:!0}),link:new f({isVoid:!0}),img:new f({isVoid:!0}),input:new f({isVoid:!0}),param:new f({isVoid:!0}),hr:new f({isVoid:!0}),br:new f({isVoid:!0}),source:new f({isVoid:!0}),track:new f({isVoid:!0}),wbr:new f({isVoid:!0}),p:new f({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 f({closedByChildren:["tbody","tfoot"]}),tbody:new f({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new f({closedByChildren:["tbody"],closedByParent:!0}),tr:new f({closedByChildren:["tr"],closedByParent:!0}),td:new f({closedByChildren:["td","th"],closedByParent:!0}),th:new f({closedByChildren:["td","th"],closedByParent:!0}),col:new f({isVoid:!0}),svg:new f({implicitNamespacePrefix:"svg"}),foreignObject:new f({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new f({implicitNamespacePrefix:"math"}),li:new f({closedByChildren:["li"],closedByParent:!0}),dt:new f({closedByChildren:["dt","dd"]}),dd:new f({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new f({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new f({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new f({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new f({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new f({closedByChildren:["optgroup"],closedByParent:!0}),option:new f({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new f({ignoreFirstLf:!0}),listing:new f({ignoreFirstLf:!0}),style:new f({contentType:u.RAW_TEXT}),script:new f({contentType:u.RAW_TEXT}),title:new f({contentType:u.ESCAPABLE_RAW_TEXT}),textarea:new f({contentType:u.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),null!==(n=null!==(t=S[e])&&void 0!==t?t:S[e.toLowerCase()])&&void 0!==n?n:y}const E=new RegExp("(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g");class _{constructor(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}static parse(e){const t=[],n=(e,t)=>{t.notSelectors.length>0&&!t.element&&0==t.classNames.length&&0==t.attrs.length&&(t.element="*"),e.push(t)};let s,r=new _,i=r,a=!1;for(E.lastIndex=0;s=E.exec(e);){if(s[1]){if(a)throw new Error("Nesting :not in a selector is not allowed");a=!0,i=new _,r.notSelectors.push(i)}const e=s[2];if(e){const t=s[3];"#"===t?i.addAttribute("id",e.substr(1)):"."===t?i.addClassName(e.substr(1)):i.setElement(e)}const o=s[4];if(o&&i.addAttribute(o,s[6]),s[7]&&(a=!1,i=r),s[8]){if(a)throw new Error("Multiple selectors in :not are not supported");n(t,r),r=i=new _}}return n(t,r),t}isElementSelector(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length}hasElementSelector(){return!!this.element}setElement(e=null){this.element=e}getMatchingElementTemplate(){const e=this.element||"div",t=this.classNames.length>0?` class="${this.classNames.join(" ")}"`:"";let n="";for(let e=0;e<this.attrs.length;e+=2)n+=` ${this.attrs[e]}${""!==this.attrs[e+1]?`="${this.attrs[e+1]}"`:""}`;return x(e).isVoid?`<${e}${t}${n}/>`:`<${e}${t}${n}></${e}>`}getAttrs(){const e=[];return this.classNames.length>0&&e.push("class",this.classNames.join(" ")),e.concat(this.attrs)}addAttribute(e,t=""){this.attrs.push(e,t&&t.toLowerCase()||"")}addClassName(e){this.classNames.push(e.toLowerCase())}toString(){let e=this.element||"";if(this.classNames&&this.classNames.forEach(t=>e+="."+t),this.attrs)for(let t=0;t<this.attrs.length;t+=2){const n=this.attrs[t+1];e+=`[${this.attrs[t]}${n?"="+n:""}]`}return this.notSelectors.forEach(t=>e+=`:not(${t})`),e}}class C{constructor(){this._elementMap=new Map,this._elementPartialMap=new Map,this._classMap=new Map,this._classPartialMap=new Map,this._attrValueMap=new Map,this._attrValuePartialMap=new Map,this._listContexts=[]}static createNotMatcher(e){const t=new C;return t.addSelectables(e,null),t}addSelectables(e,t){let n=null;e.length>1&&(n=new w(e),this._listContexts.push(n));for(let s=0;s<e.length;s++)this._addSelectable(e[s],t,n)}_addSelectable(e,t,n){let s=this;const r=e.element,i=e.classNames,a=e.attrs,o=new b(e,t,n);if(r&&(0===a.length&&0===i.length?this._addTerminal(s._elementMap,r,o):s=this._addPartial(s._elementPartialMap,r)),i)for(let e=0;e<i.length;e++){const t=i[e];0===a.length&&e===i.length-1?this._addTerminal(s._classMap,t,o):s=this._addPartial(s._classPartialMap,t)}if(a)for(let e=0;e<a.length;e+=2){const t=a[e],n=a[e+1];if(e===a.length-2){const e=s._attrValueMap;let r=e.get(t);r||(r=new Map,e.set(t,r)),this._addTerminal(r,n,o)}else{const e=s._attrValuePartialMap;let r=e.get(t);r||(r=new Map,e.set(t,r)),s=this._addPartial(r,n)}}}_addTerminal(e,t,n){let s=e.get(t);s||(s=[],e.set(t,s)),s.push(n)}_addPartial(e,t){let n=e.get(t);return n||(n=new C,e.set(t,n)),n}match(e,t){let n=!1;const s=e.element,r=e.classNames,i=e.attrs;for(let e=0;e<this._listContexts.length;e++)this._listContexts[e].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,s,e,t)||n,n=this._matchPartial(this._elementPartialMap,s,e,t)||n,r)for(let s=0;s<r.length;s++){const i=r[s];n=this._matchTerminal(this._classMap,i,e,t)||n,n=this._matchPartial(this._classPartialMap,i,e,t)||n}if(i)for(let s=0;s<i.length;s+=2){const r=i[s],a=i[s+1],o=this._attrValueMap.get(r);a&&(n=this._matchTerminal(o,"",e,t)||n),n=this._matchTerminal(o,a,e,t)||n;const l=this._attrValuePartialMap.get(r);a&&(n=this._matchPartial(l,"",e,t)||n),n=this._matchPartial(l,a,e,t)||n}return n}_matchTerminal(e,t,n,s){if(!e||"string"!=typeof t)return!1;let r=e.get(t)||[];const i=e.get("*");if(i&&(r=r.concat(i)),0===r.length)return!1;let a,o=!1;for(let e=0;e<r.length;e++)a=r[e],o=a.finalize(n,s)||o;return o}_matchPartial(e,t,n,s){if(!e||"string"!=typeof t)return!1;const r=e.get(t);return!!r&&r.match(n,s)}}class w{constructor(e){this.selectors=e,this.alreadyMatched=!1}}class b{constructor(e,t,n){this.selector=e,this.cbContext=t,this.listContext=n,this.notSelectors=e.notSelectors}finalize(e,t){let n=!0;return!(this.notSelectors.length>0)||this.listContext&&this.listContext.alreadyMatched||(n=!C.createNotMatcher(this.notSelectors).match(e,null)),!n||!t||this.listContext&&this.listContext.alreadyMatched||(this.listContext&&(this.listContext.alreadyMatched=!0),t(this.selector,this.cbContext)),n}}var T,I,N,A,P,k;function M(e){const t=function(e){const t=e.classNames&&e.classNames.length?[8,...e.classNames]:[];return[e.element&&"*"!==e.element?e.element:"",...e.attrs,...t]}(e),n=e.notSelectors&&e.notSelectors.length?e.notSelectors.map(e=>function(e){const t=e.classNames&&e.classNames.length?[8,...e.classNames]:[];return e.element?[5,e.element,...e.attrs,...t]:e.attrs.length?[3,...e.attrs,...t]:e.classNames&&e.classNames.length?[9,...e.classNames]:[]}(e)):[];return t.concat(...n)}function L(e){return e?_.parse(e).map(M):[]}!function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"}(T||(T={})),function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"}(I||(I={})),function(e){e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL"}(N||(N={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"}(A||(A={})),function(e){e[e.Const=0]="Const"}(P||(P={}));class O{constructor(e=[]){this.modifiers=e}hasModifier(e){return-1!==this.modifiers.indexOf(e)}}!function(e){e[e.Dynamic=0]="Dynamic",e[e.Bool=1]="Bool",e[e.String=2]="String",e[e.Int=3]="Int",e[e.Number=4]="Number",e[e.Function=5]="Function",e[e.Inferred=6]="Inferred",e[e.None=7]="None"}(k||(k={}));class R extends O{constructor(e,t){super(t),this.name=e}visitType(e,t){return e.visitBuiltinType(this,t)}}class F extends O{constructor(e,t,n=null){super(t),this.value=e,this.typeParams=n}visitType(e,t){return e.visitExpressionType(this,t)}}const B=new R(k.Dynamic),D=new R(k.Inferred),$=new R(k.Bool),V=(new R(k.Int),new R(k.Number)),U=new R(k.String),j=(new R(k.Function),new R(k.None));var q,H,W,z;function K(e,t){const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(!e[s].isEquivalent(t[s]))return!1;return!0}!function(e){e[e.Minus=0]="Minus",e[e.Plus=1]="Plus"}(q||(q={})),function(e){e[e.Equals=0]="Equals",e[e.NotEquals=1]="NotEquals",e[e.Identical=2]="Identical",e[e.NotIdentical=3]="NotIdentical",e[e.Minus=4]="Minus",e[e.Plus=5]="Plus",e[e.Divide=6]="Divide",e[e.Multiply=7]="Multiply",e[e.Modulo=8]="Modulo",e[e.And=9]="And",e[e.Or=10]="Or",e[e.BitwiseAnd=11]="BitwiseAnd",e[e.Lower=12]="Lower",e[e.LowerEquals=13]="LowerEquals",e[e.Bigger=14]="Bigger",e[e.BiggerEquals=15]="BiggerEquals"}(H||(H={}));class X{constructor(e,t){this.type=e||null,this.sourceSpan=t||null}prop(e,t){return new _e(this,e,null,t)}key(e,t,n){return new Ce(this,e,t,n)}callMethod(e,t,n){return new te(this,e,t,null,n)}callFn(e,t,n){return new ne(this,e,null,t,n)}instantiate(e,t,n){return new se(this,e,t,n)}conditional(e,t=null,n){return new me(this,e,t,null,n)}equals(e,t){return new Ee(H.Equals,this,e,null,t)}notEquals(e,t){return new Ee(H.NotEquals,this,e,null,t)}identical(e,t){return new Ee(H.Identical,this,e,null,t)}notIdentical(e,t){return new Ee(H.NotIdentical,this,e,null,t)}minus(e,t){return new Ee(H.Minus,this,e,null,t)}plus(e,t){return new Ee(H.Plus,this,e,null,t)}divide(e,t){return new Ee(H.Divide,this,e,null,t)}multiply(e,t){return new Ee(H.Multiply,this,e,null,t)}modulo(e,t){return new Ee(H.Modulo,this,e,null,t)}and(e,t){return new Ee(H.And,this,e,null,t)}bitwiseAnd(e,t,n=!0){return new Ee(H.BitwiseAnd,this,e,null,t,n)}or(e,t){return new Ee(H.Or,this,e,null,t)}lower(e,t){return new Ee(H.Lower,this,e,null,t)}lowerEquals(e,t){return new Ee(H.LowerEquals,this,e,null,t)}bigger(e,t){return new Ee(H.Bigger,this,e,null,t)}biggerEquals(e,t){return new Ee(H.BiggerEquals,this,e,null,t)}isBlank(e){return this.equals(Ne,e)}cast(e,t){return new fe(this,e,t)}toStmt(){return new Oe(this,null)}}!function(e){e[e.This=0]="This",e[e.Super=1]="Super",e[e.CatchError=2]="CatchError",e[e.CatchStack=3]="CatchStack"}(W||(W={}));class G extends X{constructor(e,t,n){super(t,n),"string"==typeof e?(this.name=e,this.builtin=null):(this.name=null,this.builtin=e)}isEquivalent(e){return e instanceof G&&this.name===e.name&&this.builtin===e.builtin}isConstant(){return!1}visitExpression(e,t){return e.visitReadVarExpr(this,t)}set(e){if(!this.name)throw new Error(`Built in variable ${this.builtin} can not be assigned to.`);return new J(this.name,e,null,this.sourceSpan)}}class Q extends X{constructor(e,t,n){super(t,n),this.expr=e}visitExpression(e,t){return e.visitTypeofExpr(this,t)}isEquivalent(e){return e instanceof Q&&e.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}}class Y extends X{constructor(e,t,n){super(t,n),this.node=e}isEquivalent(e){return e instanceof Y&&this.node===e.node}isConstant(){return!1}visitExpression(e,t){return e.visitWrappedNodeExpr(this,t)}}class J extends X{constructor(e,t,n,s){super(n||t.type,s),this.name=e,this.value=t}isEquivalent(e){return e instanceof J&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWriteVarExpr(this,t)}toDeclStmt(e,t){return new Me(this.name,this.value,e,t,this.sourceSpan)}toConstDecl(){return this.toDeclStmt(D,[Ae.Final])}}class Z extends X{constructor(e,t,n,s,r){super(s||n.type,r),this.receiver=e,this.index=t,this.value=n}isEquivalent(e){return e instanceof Z&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWriteKeyExpr(this,t)}}class ee extends X{constructor(e,t,n,s,r){super(s||n.type,r),this.receiver=e,this.name=t,this.value=n}isEquivalent(e){return e instanceof ee&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWritePropExpr(this,t)}}!function(e){e[e.ConcatArray=0]="ConcatArray",e[e.SubscribeObservable=1]="SubscribeObservable",e[e.Bind=2]="Bind"}(z||(z={}));class te extends X{constructor(e,t,n,s,r){super(s,r),this.receiver=e,this.args=n,"string"==typeof t?(this.name=t,this.builtin=null):(this.name=null,this.builtin=t)}isEquivalent(e){return e instanceof te&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.builtin===e.builtin&&K(this.args,e.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeMethodExpr(this,t)}}class ne extends X{constructor(e,t,n,s,r=!1){super(n,s),this.fn=e,this.args=t,this.pure=r}isEquivalent(e){return e instanceof ne&&this.fn.isEquivalent(e.fn)&&K(this.args,e.args)&&this.pure===e.pure}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeFunctionExpr(this,t)}}class se extends X{constructor(e,t,n,s){super(n,s),this.classExpr=e,this.args=t}isEquivalent(e){return e instanceof se&&this.classExpr.isEquivalent(e.classExpr)&&K(this.args,e.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInstantiateExpr(this,t)}}class re extends X{constructor(e,t,n){super(t,n),this.value=e}isEquivalent(e){return e instanceof re&&this.value===e.value}isConstant(){return!0}visitExpression(e,t){return e.visitLiteralExpr(this,t)}}class ie{constructor(e,t){this.text=e,this.sourceSpan=t}}class ae extends ie{}class oe extends ie{}class le extends X{constructor(e,t,n,s,r){super(U,r),this.metaBlock=e,this.messageParts=t,this.placeHolderNames=n,this.expressions=s}isEquivalent(e){return!1}isConstant(){return!1}visitExpression(e,t){return e.visitLocalizedString(this,t)}serializeI18nHead(){let e=this.metaBlock.description||"";return this.metaBlock.meaning&&(e=`${this.metaBlock.meaning}|${e}`),this.metaBlock.customId&&(e=`${e}@@${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(t=>{e=`${e}␟${t}`}),he(e,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(e){var t,n;return null!==(n=null===(t=this.messageParts[e])||void 0===t?void 0:t.sourceSpan)&&void 0!==n?n:this.sourceSpan}getPlaceholderSourceSpan(e){var t,n,s,r;return null!==(r=null!==(n=null===(t=this.placeHolderNames[e])||void 0===t?void 0:t.sourceSpan)&&void 0!==n?n:null===(s=this.expressions[e])||void 0===s?void 0:s.sourceSpan)&&void 0!==r?r:this.sourceSpan}serializeI18nTemplatePart(e){return he(this.placeHolderNames[e-1].text,this.messageParts[e].text,this.getMessagePartSourceSpan(e))}}const ce=e=>e.replace(/\\/g,"\\\\"),ue=e=>e.replace(/:/g,"\\:"),pe=e=>e.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function he(e,t,n){return""===e?{cooked:t,raw:pe((s=ce(t),s.replace(/^:/,"\\:"))),range:n}:{cooked:`:${e}:${t}`,raw:pe(`:${ue(ce(e))}:${ce(t)}`),range:n};var s}class de extends X{constructor(e,t,n=null,s){super(t,s),this.value=e,this.typeParams=n}isEquivalent(e){return e instanceof de&&this.value.name===e.value.name&&this.value.moduleName===e.value.moduleName&&this.value.runtime===e.value.runtime}isConstant(){return!1}visitExpression(e,t){return e.visitExternalExpr(this,t)}}class me extends X{constructor(e,t,n=null,s,r){super(s||t.type,r),this.condition=e,this.falseCase=n,this.trueCase=t}isEquivalent(e){return e instanceof me&&this.condition.isEquivalent(e.condition)&&this.trueCase.isEquivalent(e.trueCase)&&(n=e.falseCase,null==(t=this.falseCase)||null==n?t==n:t.isEquivalent(n));var t,n}isConstant(){return!1}visitExpression(e,t){return e.visitConditionalExpr(this,t)}}class ge extends X{constructor(e,t){super($,t),this.condition=e}isEquivalent(e){return e instanceof ge&&this.condition.isEquivalent(e.condition)}isConstant(){return!1}visitExpression(e,t){return e.visitNotExpr(this,t)}}class ve extends X{constructor(e,t){super(e.type,t),this.condition=e}isEquivalent(e){return e instanceof ve&&this.condition.isEquivalent(e.condition)}isConstant(){return!1}visitExpression(e,t){return e.visitAssertNotNullExpr(this,t)}}class fe extends X{constructor(e,t,n){super(t,n),this.value=e}isEquivalent(e){return e instanceof fe&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitCastExpr(this,t)}}class ye{constructor(e,t=null){this.name=e,this.type=t}isEquivalent(e){return this.name===e.name}}class Se extends X{constructor(e,t,n,s,r){super(n,s),this.params=e,this.statements=t,this.name=r}isEquivalent(e){return e instanceof Se&&K(this.params,e.params)&&K(this.statements,e.statements)}isConstant(){return!1}visitExpression(e,t){return e.visitFunctionExpr(this,t)}toDeclStmt(e,t){return new Le(e,this.params,this.statements,this.type,t,this.sourceSpan)}}class xe extends X{constructor(e,t,n,s,r=!0){super(n||V,s),this.operator=e,this.expr=t,this.parens=r}isEquivalent(e){return e instanceof xe&&this.operator===e.operator&&this.expr.isEquivalent(e.expr)}isConstant(){return!1}visitExpression(e,t){return e.visitUnaryOperatorExpr(this,t)}}class Ee extends X{constructor(e,t,n,s,r,i=!0){super(s||t.type,r),this.operator=e,this.rhs=n,this.parens=i,this.lhs=t}isEquivalent(e){return e instanceof Ee&&this.operator===e.operator&&this.lhs.isEquivalent(e.lhs)&&this.rhs.isEquivalent(e.rhs)}isConstant(){return!1}visitExpression(e,t){return e.visitBinaryOperatorExpr(this,t)}}class _e extends X{constructor(e,t,n,s){super(n,s),this.receiver=e,this.name=t}isEquivalent(e){return e instanceof _e&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name}isConstant(){return!1}visitExpression(e,t){return e.visitReadPropExpr(this,t)}set(e){return new ee(this.receiver,this.name,e,null,this.sourceSpan)}}class Ce extends X{constructor(e,t,n,s){super(n,s),this.receiver=e,this.index=t}isEquivalent(e){return e instanceof Ce&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)}isConstant(){return!1}visitExpression(e,t){return e.visitReadKeyExpr(this,t)}set(e){return new Z(this.receiver,this.index,e,null,this.sourceSpan)}}class we extends X{constructor(e,t,n){super(t,n),this.entries=e}isConstant(){return this.entries.every(e=>e.isConstant())}isEquivalent(e){return e instanceof we&&K(this.entries,e.entries)}visitExpression(e,t){return e.visitLiteralArrayExpr(this,t)}}class be{constructor(e,t,n){this.key=e,this.value=t,this.quoted=n}isEquivalent(e){return this.key===e.key&&this.value.isEquivalent(e.value)}}class Te extends X{constructor(e,t,n){super(t,n),this.entries=e,this.valueType=null,t&&(this.valueType=t.valueType)}isEquivalent(e){return e instanceof Te&&K(this.entries,e.entries)}isConstant(){return this.entries.every(e=>e.value.isConstant())}visitExpression(e,t){return e.visitLiteralMapExpr(this,t)}}new G(W.This,null,null),new G(W.Super,null,null),new G(W.CatchError,null,null),new G(W.CatchStack,null,null);const Ie=new re(null,null,null),Ne=new re(null,D,null);var Ae;!function(e){e[e.Final=0]="Final",e[e.Private=1]="Private",e[e.Exported=2]="Exported",e[e.Static=3]="Static"}(Ae||(Ae={}));class Pe extends class{constructor(e,t,n){this.text=e,this.multiline=t,this.trailingNewline=n}toString(){return this.multiline?` ${this.text} `:this.text}}{constructor(e){super("",!0,!0),this.tags=e}toString(){return function(e){if(0===e.length)return"";if(1===e.length&&e[0].tagName&&!e[0].text)return`*${Ke(e[0])} `;let t="*\n";for(const n of e)t+=" *",t+=Ke(n).replace(/\n/g,"\n * "),t+="\n";return t+=" ",t}(this.tags)}}class ke{constructor(e=[],t=null,n){this.modifiers=e,this.sourceSpan=t,this.leadingComments=n}hasModifier(e){return-1!==this.modifiers.indexOf(e)}addLeadingComment(e){var t;this.leadingComments=null!==(t=this.leadingComments)&&void 0!==t?t:[],this.leadingComments.push(e)}}class Me extends ke{constructor(e,t,n,s,r,i){super(s,r,i),this.name=e,this.value=t,this.type=n||t&&t.type||null}isEquivalent(e){return e instanceof Me&&this.name===e.name&&(this.value?!!e.value&&this.value.isEquivalent(e.value):!e.value)}visitStatement(e,t){return e.visitDeclareVarStmt(this,t)}}class Le extends ke{constructor(e,t,n,s,r,i,a){super(r,i,a),this.name=e,this.params=t,this.statements=n,this.type=s||null}isEquivalent(e){return e instanceof Le&&K(this.params,e.params)&&K(this.statements,e.statements)}visitStatement(e,t){return e.visitDeclareFunctionStmt(this,t)}}class Oe extends ke{constructor(e,t,n){super([],t,n),this.expr=e}isEquivalent(e){return e instanceof Oe&&this.expr.isEquivalent(e.expr)}visitStatement(e,t){return e.visitExpressionStmt(this,t)}}class Re extends ke{constructor(e,t=null,n){super([],t,n),this.value=e}isEquivalent(e){return e instanceof Re&&this.value.isEquivalent(e.value)}visitStatement(e,t){return e.visitReturnStmt(this,t)}}class Fe extends ke{constructor(e,t,n=[],s,r){super([],s,r),this.condition=e,this.trueCase=t,this.falseCase=n}isEquivalent(e){return e instanceof Fe&&this.condition.isEquivalent(e.condition)&&K(this.trueCase,e.trueCase)&&K(this.falseCase,e.falseCase)}visitStatement(e,t){return e.visitIfStmt(this,t)}}function Be(e,t,n){return new G(e,t,n)}function De(e,t=null,n){return new de(e,null,t,n)}function $e(e,t,n){return new F(e,t,n)}function Ve(e){return new Q(e)}function Ue(e,t,n){return new we(e,t,n)}function je(e,t=null){return new Te(e.map(e=>new be(e.key,e.value,e.quoted)),t,null)}function qe(e,t,n,s,r){return new Se(e,t,n,s,r)}function He(e,t,n,s,r){return new Fe(e,t,n,s,r)}function We(e,t,n){return new re(e,t,n)}function ze(e){return e instanceof re&&null===e.value}function Ke(e){let t="";if(e.tagName&&(t+=" @"+e.tagName),e.text){if(e.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');t+=" "+e.text.replace(/@/g,"\\@")}return t}const Xe=/-+([a-z0-9])/g;function Ge(e,t){return Qe(e,":",t)}function Qe(e,t,n){const s=e.indexOf(t);return-1==s?n:[e.slice(0,s).trim(),e.slice(s+1).trim()]}function Ye(e){throw new Error("Internal Error: "+e)}function Je(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function Ze(e){let t="";for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);if(s>=55296&&s<=56319&&e.length>n+1){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(n++,s=(s-55296<<10)+t-56320+65536)}s<=127?t+=String.fromCharCode(s):s<=2047?t+=String.fromCharCode(s>>6&31|192,63&s|128):s<=65535?t+=String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128):s<=2097151&&(t+=String.fromCharCode(s>>18&7|240,s>>12&63|128,s>>6&63|128,63&s|128))}return t}function et(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(et).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;if(!e.toString)return"object";const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}const tt="undefined"!=typeof window&&window,nt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,st="undefined"!=typeof global&&global||tt||nt,rt=Be("<unknown>"),it={};class at extends X{constructor(e){super(e.type),this.resolved=e,this.original=e}visitExpression(e,t){return t===it?this.original.visitExpression(e,t):this.resolved.visitExpression(e,t)}isEquivalent(e){return e instanceof at&&this.resolved.isEquivalent(e.resolved)}isConstant(){return!0}fixup(e){this.resolved=e,this.shared=!0}}class ot{constructor(e=!1){this.isClosureCompilerEnabled=e,this.statements=[],this.literals=new Map,this.literalFactories=new Map,this.injectorDefinitions=new Map,this.directiveDefinitions=new Map,this.componentDefinitions=new Map,this.pipeDefinitions=new Map,this.nextNameIndex=0}getConstLiteral(e,t){if(e instanceof re&&!pt(e)||e instanceof at)return e;const n=this.keyOf(e);let s=this.literals.get(n),r=!1;if(s||(s=new at(e),this.literals.set(n,s),r=!0),!r&&!s.shared||r&&t){const t=this.freshName();let n,r;this.isClosureCompilerEnabled&&pt(e)?(n=Be(t).set(new Se([],[new Re(e)])),r=Be(t).callFn([])):(n=Be(t).set(e),r=Be(t)),this.statements.push(n.toDeclStmt(D,[Ae.Final])),s.fixup(r)}return s}getDefinition(e,t,n,s=!1){const r=this.definitionsOf(t);let i=r.get(e),a=!1;if(!i){const s=this.propertyNameOf(t);i=new at(n.importExpr(e).prop(s)),r.set(e,i),a=!0}if(!a&&!i.shared||a&&s){const e=this.freshName();this.statements.push(Be(e).set(i.resolved).toDeclStmt(D,[Ae.Final])),i.fixup(Be(e))}return i}getLiteralFactory(e){if(e instanceof we){const t=e.entries.map(e=>e.isConstant()?e:rt),n=this.keyOf(Ue(t));return this._getLiteralFactory(n,e.entries,e=>Ue(e))}{const t=je(e.entries.map(e=>({key:e.key,value:e.value.isConstant()?e.value:rt,quoted:e.quoted}))),n=this.keyOf(t);return this._getLiteralFactory(n,e.entries.map(e=>e.value),t=>je(t.map((t,n)=>({key:e.entries[n].key,value:t,quoted:e.entries[n].quoted}))))}}_getLiteralFactory(e,t,n){let s=this.literalFactories.get(e);const r=t.filter(e=>!e.isConstant());if(!s){const r=t.map((e,t)=>e.isConstant()?this.getConstLiteral(e,!0):Be("a"+t)),i=qe(r.filter(ut).map(e=>new ye(e.name,B)),[new Re(n(r))],D),a=this.freshName();this.statements.push(Be(a).set(i).toDeclStmt(D,[Ae.Final])),s=Be(a),this.literalFactories.set(e,s)}return{literalFactory:s,literalFactoryArguments:r}}uniqueName(e){return`${e}${this.nextNameIndex++}`}definitionsOf(e){switch(e){case 2:return this.componentDefinitions;case 1:return this.directiveDefinitions;case 0:return this.injectorDefinitions;case 3:return this.pipeDefinitions}return Ye("Unknown definition kind "+e),this.componentDefinitions}propertyNameOf(e){switch(e){case 2:return"ɵcmp";case 1:return"ɵdir";case 0:return"ɵinj";case 3:return"ɵpipe"}return Ye("Unknown definition kind "+e),"<unknown>"}freshName(){return this.uniqueName("_c")}keyOf(e){return e.visitExpression(new lt,it)}}class lt{constructor(){this.visitWrappedNodeExpr=ct,this.visitWriteVarExpr=ct,this.visitWriteKeyExpr=ct,this.visitWritePropExpr=ct,this.visitInvokeMethodExpr=ct,this.visitInvokeFunctionExpr=ct,this.visitInstantiateExpr=ct,this.visitConditionalExpr=ct,this.visitNotExpr=ct,this.visitAssertNotNullExpr=ct,this.visitCastExpr=ct,this.visitFunctionExpr=ct,this.visitUnaryOperatorExpr=ct,this.visitBinaryOperatorExpr=ct,this.visitReadPropExpr=ct,this.visitReadKeyExpr=ct,this.visitCommaExpr=ct,this.visitLocalizedString=ct}visitLiteralExpr(e){return""+("string"==typeof e.value?'"'+e.value+'"':e.value)}visitLiteralArrayExpr(e,t){return`[${e.entries.map(e=>e.visitExpression(this,t)).join(",")}]`}visitLiteralMapExpr(e,t){return"{"+e.entries.map(e=>`${(e=>{const t=e.quoted?'"':"";return`${t}${e.key}${t}`})(e)}:${e.value.visitExpression(this,t)}`).join(",")}visitExternalExpr(e){return e.value.moduleName?`EX:${e.value.moduleName}:${e.value.name}`:"EX:"+e.value.runtime.name}visitReadVarExpr(e){return"VAR:"+e.name}visitTypeofExpr(e,t){return"TYPEOF:"+e.expr.visitExpression(this,t)}}function ct(e){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${e.constructor.name}`)}function ut(e){return e instanceof G}function pt(e){return e instanceof re&&"string"==typeof e.value&&e.value.length>=50}const ht="@angular/core";class dt{}function mt(e){return e.replace(/\W/g,"_")}dt.ANALYZE_FOR_ENTRY_COMPONENTS={name:"ANALYZE_FOR_ENTRY_COMPONENTS",moduleName:ht},dt.ElementRef={name:"ElementRef",moduleName:ht},dt.NgModuleRef={name:"NgModuleRef",moduleName:ht},dt.ViewContainerRef={name:"ViewContainerRef",moduleName:ht},dt.ChangeDetectorRef={name:"ChangeDetectorRef",moduleName:ht},dt.QueryList={name:"QueryList",moduleName:ht},dt.TemplateRef={name:"TemplateRef",moduleName:ht},dt.Renderer2={name:"Renderer2",moduleName:ht},dt.CodegenComponentFactoryResolver={name:"ɵCodegenComponentFactoryResolver",moduleName:ht},dt.ComponentFactoryResolver={name:"ComponentFactoryResolver",moduleName:ht},dt.ComponentFactory={name:"ComponentFactory",moduleName:ht},dt.ComponentRef={name:"ComponentRef",moduleName:ht},dt.NgModuleFactory={name:"NgModuleFactory",moduleName:ht},dt.createModuleFactory={name:"ɵcmf",moduleName:ht},dt.moduleDef={name:"ɵmod",moduleName:ht},dt.moduleProviderDef={name:"ɵmpd",moduleName:ht},dt.RegisterModuleFactoryFn={name:"ɵregisterModuleFactory",moduleName:ht},dt.inject={name:"ɵɵinject",moduleName:ht},dt.directiveInject={name:"ɵɵdirectiveInject",moduleName:ht},dt.INJECTOR={name:"INJECTOR",moduleName:ht},dt.Injector={name:"Injector",moduleName:ht},dt.ɵɵdefineInjectable={name:"ɵɵdefineInjectable",moduleName:ht},dt.InjectableDef={name:"ɵɵInjectableDef",moduleName:ht},dt.ViewEncapsulation={name:"ViewEncapsulation",moduleName:ht},dt.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:ht},dt.SecurityContext={name:"SecurityContext",moduleName:ht},dt.LOCALE_ID={name:"LOCALE_ID",moduleName:ht},dt.TRANSLATIONS_FORMAT={name:"TRANSLATIONS_FORMAT",moduleName:ht},dt.inlineInterpolate={name:"ɵinlineInterpolate",moduleName:ht},dt.interpolate={name:"ɵinterpolate",moduleName:ht},dt.EMPTY_ARRAY={name:"ɵEMPTY_ARRAY",moduleName:ht},dt.EMPTY_MAP={name:"ɵEMPTY_MAP",moduleName:ht},dt.Renderer={name:"Renderer",moduleName:ht},dt.viewDef={name:"ɵvid",moduleName:ht},dt.elementDef={name:"ɵeld",moduleName:ht},dt.anchorDef={name:"ɵand",moduleName:ht},dt.textDef={name:"ɵted",moduleName:ht},dt.directiveDef={name:"ɵdid",moduleName:ht},dt.providerDef={name:"ɵprd",moduleName:ht},dt.queryDef={name:"ɵqud",moduleName:ht},dt.pureArrayDef={name:"ɵpad",moduleName:ht},dt.pureObjectDef={name:"ɵpod",moduleName:ht},dt.purePipeDef={name:"ɵppd",moduleName:ht},dt.pipeDef={name:"ɵpid",moduleName:ht},dt.nodeValue={name:"ɵnov",moduleName:ht},dt.ngContentDef={name:"ɵncd",moduleName:ht},dt.unwrapValue={name:"ɵunv",moduleName:ht},dt.createRendererType2={name:"ɵcrt",moduleName:ht},dt.RendererType2={name:"RendererType2",moduleName:ht},dt.ViewDefinition={name:"ɵViewDefinition",moduleName:ht},dt.createComponentFactory={name:"ɵccf",moduleName:ht},dt.setClassMetadata={name:"ɵsetClassMetadata",moduleName:ht};let gt=0;var vt;!function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(vt||(vt={}));const ft="@angular/core";class yt{}function St(e){return je(Object.keys(e).map(t=>({key:t,value:e[t],quoted:!1})))}function xt(e,t){if(0===t)return $e(e);const n=[];for(let e=0;e<t;e++)n.push(B);return $e(e,void 0,n)}function Et(e){return"@"+e}function _t(e,t){return`animation_${e}_${t}`}yt.NEW_METHOD="factory",yt.TRANSFORM_METHOD="transform",yt.PATCH_DEPS="patchedDeps",yt.namespaceHTML={name:"ɵɵnamespaceHTML",moduleName:ft},yt.namespaceMathML={name:"ɵɵnamespaceMathML",moduleName:ft},yt.namespaceSVG={name:"ɵɵnamespaceSVG",moduleName:ft},yt.element={name:"ɵɵelement",moduleName:ft},yt.elementStart={name:"ɵɵelementStart",moduleName:ft},yt.elementEnd={name:"ɵɵelementEnd",moduleName:ft},yt.advance={name:"ɵɵadvance",moduleName:ft},yt.syntheticHostProperty={name:"ɵɵsyntheticHostProperty",moduleName:ft},yt.syntheticHostListener={name:"ɵɵsyntheticHostListener",moduleName:ft},yt.attribute={name:"ɵɵattribute",moduleName:ft},yt.attributeInterpolate1={name:"ɵɵattributeInterpolate1",moduleName:ft},yt.attributeInterpolate2={name:"ɵɵattributeInterpolate2",moduleName:ft},yt.attributeInterpolate3={name:"ɵɵattributeInterpolate3",moduleName:ft},yt.attributeInterpolate4={name:"ɵɵattributeInterpolate4",moduleName:ft},yt.attributeInterpolate5={name:"ɵɵattributeInterpolate5",moduleName:ft},yt.attributeInterpolate6={name:"ɵɵattributeInterpolate6",moduleName:ft},yt.attributeInterpolate7={name:"ɵɵattributeInterpolate7",moduleName:ft},yt.attributeInterpolate8={name:"ɵɵattributeInterpolate8",moduleName:ft},yt.attributeInterpolateV={name:"ɵɵattributeInterpolateV",moduleName:ft},yt.classProp={name:"ɵɵclassProp",moduleName:ft},yt.elementContainerStart={name:"ɵɵelementContainerStart",moduleName:ft},yt.elementContainerEnd={name:"ɵɵelementContainerEnd",moduleName:ft},yt.elementContainer={name:"ɵɵelementContainer",moduleName:ft},yt.styleMap={name:"ɵɵstyleMap",moduleName:ft},yt.styleMapInterpolate1={name:"ɵɵstyleMapInterpolate1",moduleName:ft},yt.styleMapInterpolate2={name:"ɵɵstyleMapInterpolate2",moduleName:ft},yt.styleMapInterpolate3={name:"ɵɵstyleMapInterpolate3",moduleName:ft},yt.styleMapInterpolate4={name:"ɵɵstyleMapInterpolate4",moduleName:ft},yt.styleMapInterpolate5={name:"ɵɵstyleMapInterpolate5",moduleName:ft},yt.styleMapInterpolate6={name:"ɵɵstyleMapInterpolate6",moduleName:ft},yt.styleMapInterpolate7={name:"ɵɵstyleMapInterpolate7",moduleName:ft},yt.styleMapInterpolate8={name:"ɵɵstyleMapInterpolate8",moduleName:ft},yt.styleMapInterpolateV={name:"ɵɵstyleMapInterpolateV",moduleName:ft},yt.classMap={name:"ɵɵclassMap",moduleName:ft},yt.classMapInterpolate1={name:"ɵɵclassMapInterpolate1",moduleName:ft},yt.classMapInterpolate2={name:"ɵɵclassMapInterpolate2",moduleName:ft},yt.classMapInterpolate3={name:"ɵɵclassMapInterpolate3",moduleName:ft},yt.classMapInterpolate4={name:"ɵɵclassMapInterpolate4",moduleName:ft},yt.classMapInterpolate5={name:"ɵɵclassMapInterpolate5",moduleName:ft},yt.classMapInterpolate6={name:"ɵɵclassMapInterpolate6",moduleName:ft},yt.classMapInterpolate7={name:"ɵɵclassMapInterpolate7",moduleName:ft},yt.classMapInterpolate8={name:"ɵɵclassMapInterpolate8",moduleName:ft},yt.classMapInterpolateV={name:"ɵɵclassMapInterpolateV",moduleName:ft},yt.styleProp={name:"ɵɵstyleProp",moduleName:ft},yt.stylePropInterpolate1={name:"ɵɵstylePropInterpolate1",moduleName:ft},yt.stylePropInterpolate2={name:"ɵɵstylePropInterpolate2",moduleName:ft},yt.stylePropInterpolate3={name:"ɵɵstylePropInterpolate3",moduleName:ft},yt.stylePropInterpolate4={name:"ɵɵstylePropInterpolate4",moduleName:ft},yt.stylePropInterpolate5={name:"ɵɵstylePropInterpolate5",moduleName:ft},yt.stylePropInterpolate6={name:"ɵɵstylePropInterpolate6",moduleName:ft},yt.stylePropInterpolate7={name:"ɵɵstylePropInterpolate7",moduleName:ft},yt.stylePropInterpolate8={name:"ɵɵstylePropInterpolate8",moduleName:ft},yt.stylePropInterpolateV={name:"ɵɵstylePropInterpolateV",moduleName:ft},yt.nextContext={name:"ɵɵnextContext",moduleName:ft},yt.templateCreate={name:"ɵɵtemplate",moduleName:ft},yt.text={name:"ɵɵtext",moduleName:ft},yt.enableBindings={name:"ɵɵenableBindings",moduleName:ft},yt.disableBindings={name:"ɵɵdisableBindings",moduleName:ft},yt.getCurrentView={name:"ɵɵgetCurrentView",moduleName:ft},yt.textInterpolate={name:"ɵɵtextInterpolate",moduleName:ft},yt.textInterpolate1={name:"ɵɵtextInterpolate1",moduleName:ft},yt.textInterpolate2={name:"ɵɵtextInterpolate2",moduleName:ft},yt.textInterpolate3={name:"ɵɵtextInterpolate3",moduleName:ft},yt.textInterpolate4={name:"ɵɵtextInterpolate4",moduleName:ft},yt.textInterpolate5={name:"ɵɵtextInterpolate5",moduleName:ft},yt.textInterpolate6={name:"ɵɵtextInterpolate6",moduleName:ft},yt.textInterpolate7={name:"ɵɵtextInterpolate7",moduleName:ft},yt.textInterpolate8={name:"ɵɵtextInterpolate8",moduleName:ft},yt.textInterpolateV={name:"ɵɵtextInterpolateV",moduleName:ft},yt.restoreView={name:"ɵɵrestoreView",moduleName:ft},yt.pureFunction0={name:"ɵɵpureFunction0",moduleName:ft},yt.pureFunction1={name:"ɵɵpureFunction1",moduleName:ft},yt.pureFunction2={name:"ɵɵpureFunction2",moduleName:ft},yt.pureFunction3={name:"ɵɵpureFunction3",moduleName:ft},yt.pureFunction4={name:"ɵɵpureFunction4",moduleName:ft},yt.pureFunction5={name:"ɵɵpureFunction5",moduleName:ft},yt.pureFunction6={name:"ɵɵpureFunction6",moduleName:ft},yt.pureFunction7={name:"ɵɵpureFunction7",moduleName:ft},yt.pureFunction8={name:"ɵɵpureFunction8",moduleName:ft},yt.pureFunctionV={name:"ɵɵpureFunctionV",moduleName:ft},yt.pipeBind1={name:"ɵɵpipeBind1",moduleName:ft},yt.pipeBind2={name:"ɵɵpipeBind2",moduleName:ft},yt.pipeBind3={name:"ɵɵpipeBind3",moduleName:ft},yt.pipeBind4={name:"ɵɵpipeBind4",moduleName:ft},yt.pipeBindV={name:"ɵɵpipeBindV",moduleName:ft},yt.hostProperty={name:"ɵɵhostProperty",moduleName:ft},yt.property={name:"ɵɵproperty",moduleName:ft},yt.propertyInterpolate={name:"ɵɵpropertyInterpolate",moduleName:ft},yt.propertyInterpolate1={name:"ɵɵpropertyInterpolate1",moduleName:ft},yt.propertyInterpolate2={name:"ɵɵpropertyInterpolate2",moduleName:ft},yt.propertyInterpolate3={name:"ɵɵpropertyInterpolate3",moduleName:ft},yt.propertyInterpolate4={name:"ɵɵpropertyInterpolate4",moduleName:ft},yt.propertyInterpolate5={name:"ɵɵpropertyInterpolate5",moduleName:ft},yt.propertyInterpolate6={name:"ɵɵpropertyInterpolate6",moduleName:ft},yt.propertyInterpolate7={name:"ɵɵpropertyInterpolate7",moduleName:ft},yt.propertyInterpolate8={name:"ɵɵpropertyInterpolate8",moduleName:ft},yt.propertyInterpolateV={name:"ɵɵpropertyInterpolateV",moduleName:ft},yt.i18n={name:"ɵɵi18n",moduleName:ft},yt.i18nAttributes={name:"ɵɵi18nAttributes",moduleName:ft},yt.i18nExp={name:"ɵɵi18nExp",moduleName:ft},yt.i18nStart={name:"ɵɵi18nStart",moduleName:ft},yt.i18nEnd={name:"ɵɵi18nEnd",moduleName:ft},yt.i18nApply={name:"ɵɵi18nApply",moduleName:ft},yt.i18nPostprocess={name:"ɵɵi18nPostprocess",moduleName:ft},yt.pipe={name:"ɵɵpipe",moduleName:ft},yt.projection={name:"ɵɵprojection",moduleName:ft},yt.projectionDef={name:"ɵɵprojectionDef",moduleName:ft},yt.reference={name:"ɵɵreference",moduleName:ft},yt.inject={name:"ɵɵinject",moduleName:ft},yt.injectAttribute={name:"ɵɵinjectAttribute",moduleName:ft},yt.injectPipeChangeDetectorRef={name:"ɵɵinjectPipeChangeDetectorRef",moduleName:ft},yt.directiveInject={name:"ɵɵdirectiveInject",moduleName:ft},yt.invalidFactory={name:"ɵɵinvalidFactory",moduleName:ft},yt.invalidFactoryDep={name:"ɵɵinvalidFactoryDep",moduleName:ft},yt.templateRefExtractor={name:"ɵɵtemplateRefExtractor",moduleName:ft},yt.resolveWindow={name:"ɵɵresolveWindow",moduleName:ft},yt.resolveDocument={name:"ɵɵresolveDocument",moduleName:ft},yt.resolveBody={name:"ɵɵresolveBody",moduleName:ft},yt.defineComponent={name:"ɵɵdefineComponent",moduleName:ft},yt.setComponentScope={name:"ɵɵsetComponentScope",moduleName:ft},yt.ComponentDefWithMeta={name:"ɵɵComponentDefWithMeta",moduleName:ft},yt.FactoryDef={name:"ɵɵFactoryDef",moduleName:ft},yt.defineDirective={name:"ɵɵdefineDirective",moduleName:ft},yt.DirectiveDefWithMeta={name:"ɵɵDirectiveDefWithMeta",moduleName:ft},yt.InjectorDef={name:"ɵɵInjectorDef",moduleName:ft},yt.defineInjector={name:"ɵɵdefineInjector",moduleName:ft},yt.NgModuleDefWithMeta={name:"ɵɵNgModuleDefWithMeta",moduleName:ft},yt.ModuleWithProviders={name:"ModuleWithProviders",moduleName:ft},yt.defineNgModule={name:"ɵɵdefineNgModule",moduleName:ft},yt.setNgModuleScope={name:"ɵɵsetNgModuleScope",moduleName:ft},yt.PipeDefWithMeta={name:"ɵɵPipeDefWithMeta",moduleName:ft},yt.definePipe={name:"ɵɵdefinePipe",moduleName:ft},yt.queryRefresh={name:"ɵɵqueryRefresh",moduleName:ft},yt.viewQuery={name:"ɵɵviewQuery",moduleName:ft},yt.staticViewQuery={name:"ɵɵstaticViewQuery",moduleName:ft},yt.staticContentQuery={name:"ɵɵstaticContentQuery",moduleName:ft},yt.loadQuery={name:"ɵɵloadQuery",moduleName:ft},yt.contentQuery={name:"ɵɵcontentQuery",moduleName:ft},yt.NgOnChangesFeature={name:"ɵɵNgOnChangesFeature",moduleName:ft},yt.InheritDefinitionFeature={name:"ɵɵInheritDefinitionFeature",moduleName:ft},yt.CopyDefinitionFeature={name:"ɵɵCopyDefinitionFeature",moduleName:ft},yt.ProvidersFeature={name:"ɵɵProvidersFeature",moduleName:ft},yt.listener={name:"ɵɵlistener",moduleName:ft},yt.getFactoryOf={name:"ɵɵgetFactoryOf",moduleName:ft},yt.getInheritedFactory={name:"ɵɵgetInheritedFactory",moduleName:ft},yt.sanitizeHtml={name:"ɵɵsanitizeHtml",moduleName:ft},yt.sanitizeStyle={name:"ɵɵsanitizeStyle",moduleName:ft},yt.sanitizeResourceUrl={name:"ɵɵsanitizeResourceUrl",moduleName:ft},yt.sanitizeScript={name:"ɵɵsanitizeScript",moduleName:ft},yt.sanitizeUrl={name:"ɵɵsanitizeUrl",moduleName:ft},yt.sanitizeUrlOrResourceUrl={name:"ɵɵsanitizeUrlOrResourceUrl",moduleName:ft},yt.trustConstantHtml={name:"ɵɵtrustConstantHtml",moduleName:ft},yt.trustConstantScript={name:"ɵɵtrustConstantScript",moduleName:ft},yt.trustConstantResourceUrl={name:"ɵɵtrustConstantResourceUrl",moduleName:ft};class Ct{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e){return e.visitText(this)}}class wt{constructor(e,t,n){this.value=e,this.sourceSpan=t,this.i18n=n}visit(e){return e.visitBoundText(this)}}class bt{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=s,this.i18n=r}visit(e){return e.visitTextAttribute(this)}}class Tt{constructor(e,t,n,s,r,i,a,o,l){this.name=e,this.type=t,this.securityContext=n,this.value=s,this.unit=r,this.sourceSpan=i,this.keySpan=a,this.valueSpan=o,this.i18n=l}static fromBoundElementProperty(e,t){if(void 0===e.keySpan)throw new Error(`Unexpected state: keySpan must be defined for bound attributes but was not for ${e.name}: ${e.sourceSpan}`);return new Tt(e.name,e.type,e.securityContext,e.value,e.unit,e.sourceSpan,e.keySpan,e.valueSpan,t)}visit(e){return e.visitBoundAttribute(this)}}class It{constructor(e,t,n,s,r,i,a){this.name=e,this.type=t,this.handler=n,this.target=s,this.phase=r,this.sourceSpan=i,this.handlerSpan=a}static fromParsedEvent(e){return new It(e.name,e.type,e.handler,0===e.type?e.targetOrPhase:null,1===e.type?e.targetOrPhase:null,e.sourceSpan,e.handlerSpan)}visit(e){return e.visitBoundEvent(this)}}class Nt{constructor(e,t,n,s,r,i,a,o,l,c){this.name=e,this.attributes=t,this.inputs=n,this.outputs=s,this.children=r,this.references=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=l,this.i18n=c}visit(e){return e.visitElement(this)}}class At{constructor(e,t,n,s,r,i,a,o,l,c,u,p){this.tagName=e,this.attributes=t,this.inputs=n,this.outputs=s,this.templateAttrs=r,this.children=i,this.references=a,this.variables=o,this.sourceSpan=l,this.startSourceSpan=c,this.endSourceSpan=u,this.i18n=p}visit(e){return e.visitTemplate(this)}}class Pt{constructor(e,t,n,s){this.selector=e,this.attributes=t,this.sourceSpan=n,this.i18n=s,this.name="ng-content"}visit(e){return e.visitContent(this)}}class kt{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.keySpan=s,this.valueSpan=r}visit(e){return e.visitVariable(this)}}class Mt{constructor(e,t,n,s){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=s}visit(e){return e.visitReference(this)}}class Lt{constructor(e,t,n,s){this.vars=e,this.placeholders=t,this.sourceSpan=n,this.i18n=s}visit(e){return e.visitIcu(this)}}function Ot(e,t){const n=[];if(e.visit)for(const n of t)e.visit(n)||n.visit(e);else for(const s of t){const t=s.visit(e);t&&n.push(t)}return n}class Rt{constructor(e,t,n,s,r,i){this.nodes=e,this.placeholders=t,this.placeholderToMessage=n,this.meaning=s,this.description=r,this.customId=i,this.id=this.customId,this.legacyIds=[],this.sources=e.length?[{filePath:e[0].sourceSpan.start.file.url,startLine:e[0].sourceSpan.start.line+1,startCol:e[0].sourceSpan.start.col+1,endLine:e[e.length-1].sourceSpan.end.line+1,endCol:e[0].sourceSpan.start.col+1}]:[]}}class Ft{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitText(this,t)}}class Bt{constructor(e,t){this.children=e,this.sourceSpan=t}visit(e,t){return e.visitContainer(this,t)}}class Dt{constructor(e,t,n,s){this.expression=e,this.type=t,this.cases=n,this.sourceSpan=s}visit(e,t){return e.visitIcu(this,t)}}class $t{constructor(e,t,n,s,r,i,a,o,l){this.tag=e,this.attrs=t,this.startName=n,this.closeName=s,this.children=r,this.isVoid=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=l}visit(e,t){return e.visitTagPlaceholder(this,t)}}class Vt{constructor(e,t,n){this.value=e,this.name=t,this.sourceSpan=n}visit(e,t){return e.visitPlaceholder(this,t)}}class Ut{constructor(e,t,n){this.value=e,this.name=t,this.sourceSpan=n}visit(e,t){return e.visitIcuPlaceholder(this,t)}}function jt(e){return function(e){const t=Ze(e),n=function(e,t){const n=e.length+3>>>2,s=[];for(let r=0;r<n;r++)s[r]=sn(e,4*r,t);return s}(t,Yt.Big),s=8*t.length,r=function(e,t){const n=[];for(let e=0;e<80;e++)n.push(void 0);return n}();let i=1732584193,a=4023233417,o=2562383102,l=271733878,c=3285377520;n[s>>5]|=128<<24-s%32,n[15+(s+64>>9<<4)]=s;for(let e=0;e<n.length;e+=16){const t=i,s=a,u=o,p=l,h=c;for(let t=0;t<80;t++){r[t]=t<16?n[e+t]:tn(r[t-3]^r[t-8]^r[t-14]^r[t-16],1);const s=Kt(t,a,o,l),u=s[0],p=s[1],h=[tn(i,5),u,c,p,r[t]].reduce(Jt);c=l,l=o,o=tn(a,30),a=i,i=h}i=Jt(i,t),a=Jt(a,s),o=Jt(o,u),l=Jt(l,p),c=Jt(c,h)}return function(e){let t="";for(let n=0;n<e.length;n++){const s=nn(e,n);t+=(s>>>4).toString(16)+(15&s).toString(16)}return t.toLowerCase()}(rn([i,a,o,l,c]))}((t=e.nodes,t.map(e=>e.visit(Wt,null))).join("")+`[${e.meaning}]`);var t}function qt(e){const t=new zt;return function(e,t=""){let n=Xt(e);if(t){const e=Xt(t);n=function(e,t){const n=e[0],s=t[0],r=Zt(e[1],t[1]),i=r[0],a=r[1];return[Jt(Jt(n,s),i),a]}(function(e,t){const n=e[0],s=e[1];return[n<<1|s>>>31,s<<1|n>>>31]}(n),e)}return function(e){let t="",n="1";for(let s=e.length-1;s>=0;s--)t=an(t,on(nn(e,s),n)),n=on(256,n);return t.split("").reverse().join("")}(rn([2147483647&n[0],n[1]]))}(e.nodes.map(e=>e.visit(t,null)).join(""),e.meaning)}class Ht{visitText(e,t){return e.value}visitContainer(e,t){return`[${e.children.map(e=>e.visit(this)).join(", ")}]`}visitIcu(e,t){const n=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.expression}, ${e.type}, ${n.join(", ")}}`}visitTagPlaceholder(e,t){return e.isVoid?`<ph tag name="${e.startName}"/>`:`<ph tag name="${e.startName}">${e.children.map(e=>e.visit(this)).join(", ")}</ph name="${e.closeName}">`}visitPlaceholder(e,t){return e.value?`<ph name="${e.name}">${e.value}</ph>`:`<ph name="${e.name}"/>`}visitIcuPlaceholder(e,t){return`<ph icu name="${e.name}">${e.value.visit(this)}</ph>`}}const Wt=new Ht;class zt extends Ht{visitIcu(e,t){let n=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.type}, ${n.join(", ")}}`}}function Kt(e,t,n,s){return e<20?[t&n|~t&s,1518500249]:e<40?[t^n^s,1859775393]:e<60?[t&n|t&s|n&s,2400959708]:[t^n^s,3395469782]}function Xt(e){const t=Ze(e);let n=Gt(t,0),s=Gt(t,102072);return 0!=n||0!=s&&1!=s||(n^=319790063,s^=-1801410264),[n,s]}function Gt(e,t){let n,s=2654435769,r=2654435769;const i=e.length;for(n=0;n+12<=i;n+=12){s=Jt(s,sn(e,n,Yt.Little)),r=Jt(r,sn(e,n+4,Yt.Little));const i=Qt(s,r,t=Jt(t,sn(e,n+8,Yt.Little)));s=i[0],r=i[1],t=i[2]}return s=Jt(s,sn(e,n,Yt.Little)),r=Jt(r,sn(e,n+4,Yt.Little)),t=Jt(t,i),Qt(s,r,t=Jt(t,sn(e,n+8,Yt.Little)<<8))[2]}function Qt(e,t,n){return e=en(e,t),e=en(e,n),e^=n>>>13,t=en(t,n),t=en(t,e),t^=e<<8,n=en(n,e),n=en(n,t),n^=t>>>13,e=en(e,t),e=en(e,n),e^=n>>>12,t=en(t,n),t=en(t,e),t^=e<<16,n=en(n,e),n=en(n,t),n^=t>>>5,e=en(e,t),e=en(e,n),e^=n>>>3,t=en(t,n),t=en(t,e),t^=e<<10,n=en(n,e),n=en(n,t),[e,t,n^=t>>>15]}var Yt;function Jt(e,t){return Zt(e,t)[1]}function Zt(e,t){const n=(65535&e)+(65535&t),s=(e>>>16)+(t>>>16)+(n>>>16);return[s>>>16,s<<16|65535&n]}function en(e,t){const n=(65535&e)-(65535&t);return(e>>16)-(t>>16)+(n>>16)<<16|65535&n}function tn(e,t){return e<<t|e>>>32-t}function nn(e,t){return t>=e.length?0:255&e.charCodeAt(t)}function sn(e,t,n){let s=0;if(n===Yt.Big)for(let n=0;n<4;n++)s+=nn(e,t+n)<<24-8*n;else for(let n=0;n<4;n++)s+=nn(e,t+n)<<8*n;return s}function rn(e){return e.reduce((e,t)=>e+function(e){let t="";for(let n=0;n<4;n++)t+=String.fromCharCode(e>>>8*(3-n)&255);return t}(t),"")}function an(e,t){let n="";const s=Math.max(e.length,t.length);for(let r=0,i=0;r<s||i;r++){const s=i+ +(e[r]||0)+ +(t[r]||0);s>=10?(i=1,n+=s-10):(i=0,n+=s)}return n}function on(e,t){let n="",s=t;for(;0!==e;e>>>=1)1&e&&(n=an(n,s)),s=an(s,s);return n}function ln(e){return"i18n"===e||e.startsWith("i18n-")}function cn(e){return e instanceof Rt}function un(e){return cn(e)&&1===e.nodes.length&&e.nodes[0]instanceof Dt}function pn(e){return!!e.i18n}function hn(e){return e.nodes[0]}function dn(e,t=0){return`�${e}${t>0?":"+t:""}�`}function mn(e=0){let t=e;return()=>t++}function gn(e){const t={};return e.forEach((e,n)=>{t[n]=We(e.length>1?`[${e.join("|")}]`:e[0])}),t}function vn(e,t,...n){const s=e.get(t)||[];s.push(...n),e.set(t,s)}function fn(e,t=0,n=0){const s=t,r=new Map,i=e instanceof Rt?e.nodes.find(e=>e instanceof Bt):e;return i&&i.children.filter(e=>e instanceof Vt).forEach((e,t)=>{const i=dn(s+t,n);vn(r,e.name,i)}),r}function yn(e={},t){const n={};return e&&Object.keys(e).length&&Object.keys(e).forEach(s=>n[Sn(s,t)]=e[s]),n}function Sn(e,t=!0){const n=e.toUpperCase().replace(/[^A-Z0-9_]/g,"_");if(!t)return n;const s=n.split("_");if(1===s.length)return e.toLowerCase();let r;/^\d+$/.test(s[s.length-1])&&(r=s.pop());let i=s.shift().toLowerCase();return s.length&&(i+=s.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")),r?`${i}_${r}`:i}function xn(e){return("MSG_"+e).toUpperCase()}function En(e){return new Me(e.name,void 0,D,void 0,e.sourceSpan)}!function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"}(Yt||(Yt={}));const _n=/[-.]/;function Cn(e,t){let n=null;return()=>(n||(e.push(new Me("_t",void 0,B)),n=Be(t)),n)}function wn(e){if(this)throw new Error(`Builder ${this.constructor.name} doesn't support ${e} yet`);throw new Error(`Feature ${e} is not supported yet`)}function bn(e){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${e.constructor.name}`)}function Tn(e){return Array.isArray(e)?Ue(e.map(Tn)):We(e,D)}function In(e,t){return Object.getOwnPropertyNames(e).length>0?function(e,t){return je(Object.getOwnPropertyNames(e).map(n=>{const s=e[n];let r,i,a;return Array.isArray(s)?[i,r]=s:[r,i]=Ge(n,[n,s]),a=r,{key:a,quoted:_n.test(a),value:t&&i!==r?Ue([Tn(i),Tn(r)]):Tn(i)}}))}(e,t):null}function Nn(e){for(;ze(e[e.length-1]);)e.pop();return e}function An(e,t){if(Array.isArray(e.predicate)){let n=[];return e.predicate.forEach(e=>{const t=e.split(",").map(e=>We(e.trim()));n.push(...t)}),t.getConstLiteral(Ue(n),!0)}return e.predicate}class Pn{constructor(){this.values=[]}set(e,t){t&&this.values.push({key:e,value:t,quoted:!1})}toLiteralMap(){return je(this.values)}}function kn(e,t,n){let s=De(e,null,n);if(t.length>0)for(let e=0;e<t.length;e++)s=s.callFn(t[e],n);else s=s.callFn([],n);return s}function Mn(e){const{expressions:t,strings:n}=e;return 1===t.length&&2===n.length&&""===n[0]&&""===n[1]?1:t.length+n.length}var Ln,On,Rn;function Fn(e){const t=Be("t"),n=[];let s=j;const r=Dn(e)?t:new Ee(H.Or,t,e.internalType);let i=null;if(null!==e.deps)"invalid"!==e.deps&&(i=new se(r,Bn(e.deps,e.injectFn,e.target===On.Pipe)),s=function(e){let t=!1;const n=e.map(e=>{const n=function(e){const t=[];return e.resolved===Rn.Attribute&&null!==e.attribute&&t.push({key:"attribute",value:e.attribute,quoted:!1}),e.optional&&t.push({key:"optional",value:We(!0),quoted:!1}),e.host&&t.push({key:"host",value:We(!0),quoted:!1}),e.self&&t.push({key:"self",value:We(!0),quoted:!1}),e.skipSelf&&t.push({key:"skipSelf",value:We(!0),quoted:!1}),t.length>0?je(t):null}(e);return null!==n?(t=!0,n):We(null)});return t?$e(Ue(n)):j}(e.deps));else{const t=Be(`ɵ${e.name}_BaseFactory`),s=De(yt.getInheritedFactory),a=t.set(s.callFn([e.internalType],void 0,!0)).toDeclStmt(D,[Ae.Exported,Ae.Final]);n.push(a),i=t.callFn([r])}const a=i,o=[];let l=null;function c(e){const n=Be("r");o.push(n.set(Ie).toDeclStmt());let s=null;return s=null!==a?n.set(a).toStmt():De(yt.invalidFactory).callFn([]).toStmt(),o.push(He(t,[s],[n.set(e).toStmt()])),n}if(Dn(e)&&e.delegateType===Ln.Factory){const t=Be(`ɵ${e.name}_BaseFactory`),s=De(yt.getFactoryOf);if(e.delegate.isEquivalent(e.internalType))throw new Error("Illegal state: compiling factory that delegates to itself");const r=t.set(s.callFn([e.delegate])).toDeclStmt(D,[Ae.Exported,Ae.Final]);n.push(r),l=c(t.callFn([]))}else if(Dn(e)){const t=Bn(e.delegateDeps,e.injectFn,e.target===On.Pipe);l=c(new(e.delegateType===Ln.Class?se:ne)(e.delegate,t))}else l=function(e){return void 0!==e.expression}(e)?c(e.expression):i;return o.push(null!==l?new Re(l):De(yt.invalidFactory).callFn([]).toStmt()),{factory:qe([new ye("t",B)],o,D,void 0,e.name+"_Factory"),statements:n,type:$e(De(yt.FactoryDef,[xt(e.type.type,e.typeArgumentCount),s]))}}function Bn(e,t,n){return e.map((e,s)=>function(e,t,n,s){switch(e.resolved){case Rn.Token:case Rn.ChangeDetectorRef:const r=0|(e.self?2:0)|(e.skipSelf?4:0)|(e.host?1:0)|(e.optional?8:0);let i=0!==r||e.optional?We(r):null;if(n&&e.resolved===Rn.ChangeDetectorRef)return De(yt.injectPipeChangeDetectorRef).callFn(i?[i]:[]);const a=[e.token];return i&&a.push(i),De(t).callFn(a);case Rn.Attribute:return De(yt.injectAttribute).callFn([e.token]);case Rn.Invalid:return De(yt.invalidFactoryDep).callFn([We(s)]);default:return wn("Unknown R3ResolvedDependencyType: "+Rn[e.resolved])}}(e,t,n,s))}function Dn(e){return void 0!==e.delegateType}function $n(e,t){return{statements:[],factory:e.node===t.node?t.prop("ɵfac"):qe([new ye("t",B)],[new Re(t.callMethod("ɵfac",[Be("t")]))])}}!function(e){e[e.Class=0]="Class",e[e.Function=1]="Function",e[e.Factory=2]="Factory"}(Ln||(Ln={})),function(e){e[e.Directive=0]="Directive",e[e.Component=1]="Component",e[e.Injectable=2]="Injectable",e[e.Pipe=3]="Pipe",e[e.NgModule=4]="NgModule"}(On||(On={})),function(e){e[e.Token=0]="Token",e[e.Attribute=1]="Attribute",e[e.ChangeDetectorRef=2]="ChangeDetectorRef",e[e.Invalid=3]="Invalid"}(Rn||(Rn={}));const Vn=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];class Un{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected 'interpolation' to be an array, [start, end].");if(null!=t){const e=t[0],n=t[1];Vn.forEach(t=>{if(t.test(e)||t.test(n))throw new Error(`['${e}', '${n}'] contains unusable interpolation symbol.`)})}}(0,e),new Un(e[0],e[1])):jn}}const jn=new Un("{{","}}");class qn{constructor(e=null){this.file=e,this.sourcesContent=new Map,this.lines=[],this.lastCol0=0,this.hasMappings=!1}addSource(e,t=null){return this.sourcesContent.has(e)||this.sourcesContent.set(e,t),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(e,t,n,s){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(null!=t&&!this.sourcesContent.has(t))throw new Error(`Unknown source file "${t}"`);if(null==e)throw new Error("The column in the generated code must be provided");if(e<this.lastCol0)throw new Error("Mapping should be added in output order");if(t&&(null==n||null==s))throw new Error("The source location must be provided when a source url is provided");return this.hasMappings=!0,this.lastCol0=e,this.currentLine.push({col0:e,sourceUrl:t,sourceLine0:n,sourceCol0:s}),this}get currentLine(){return this.lines.slice(-1)[0]}toJSON(){if(!this.hasMappings)return null;const e=new Map,t=[],n=[];Array.from(this.sourcesContent.keys()).forEach((s,r)=>{e.set(s,r),t.push(s),n.push(this.sourcesContent.get(s)||null)});let s="",r=0,i=0,a=0,o=0;return this.lines.forEach(t=>{r=0,s+=t.map(t=>{let n=Hn(t.col0-r);return r=t.col0,null!=t.sourceUrl&&(n+=Hn(e.get(t.sourceUrl)-i),i=e.get(t.sourceUrl),n+=Hn(t.sourceLine0-a),a=t.sourceLine0,n+=Hn(t.sourceCol0-o),o=t.sourceCol0),n}).join(","),s+=";"}),s=s.slice(0,-1),{file:this.file||"",version:3,sourceRoot:"",sources:t,sourcesContent:n,mappings:s}}toJsComment(){return this.hasMappings?"//# sourceMappingURL=data:application/json;base64,"+function(e){let t="";e=Ze(e);for(let n=0;n<e.length;){const s=e.charCodeAt(n++),r=e.charCodeAt(n++),i=e.charCodeAt(n++);t+=Wn(s>>2),t+=Wn((3&s)<<4|(isNaN(r)?0:r>>4)),t+=isNaN(r)?"=":Wn((15&r)<<2|i>>6),t+=isNaN(r)||isNaN(i)?"=":Wn(63&i)}return t}(JSON.stringify(this,null,0)):""}}function Hn(e){e=e<0?1+(-e<<1):e<<1;let t="";do{let n=31&e;(e>>=5)>0&&(n|=32),t+=Wn(n)}while(e>0);return t}function Wn(e){if(e<0||e>=64)throw new Error("Can only encode value in the range [0, 63]");return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e]}const zn=/'|\\|\n|\r|\$/g,Kn=/^[$A-Z_][0-9A-Z_$]*$/i,Xn=Be("error",null,null),Gn=Be("stack",null,null);class Qn{constructor(e){this.indent=e,this.partsLength=0,this.parts=[],this.srcSpans=[]}}class Yn{constructor(e){this._indent=e,this._classes=[],this._preambleLineCount=0,this._lines=[new Qn(e)]}static createRoot(){return new Yn(0)}get _currentLine(){return this._lines[this._lines.length-1]}println(e,t=""){this.print(e||null,t,!0)}lineIsEmpty(){return 0===this._currentLine.parts.length}lineLength(){return this._currentLine.indent*" ".length+this._currentLine.partsLength}print(e,t,n=!1){t.length>0&&(this._currentLine.parts.push(t),this._currentLine.partsLength+=t.length,this._currentLine.srcSpans.push(e&&e.sourceSpan||null)),n&&this._lines.push(new Qn(this._indent))}removeEmptyLastLine(){this.lineIsEmpty()&&this._lines.pop()}incIndent(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}decIndent(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}pushClass(e){this._classes.push(e)}popClass(){return this._classes.pop()}get currentClass(){return this._classes.length>0?this._classes[this._classes.length-1]:null}toSource(){return this.sourceLines.map(e=>e.parts.length>0?Zn(e.indent)+e.parts.join(""):"").join("\n")}toSourceMapGenerator(e,t=0){const n=new qn(e);let s=!1;const r=()=>{s||(n.addSource(e," ").addMapping(0,e,0,0),s=!0)};for(let e=0;e<t;e++)n.addLine(),r();return this.sourceLines.forEach((e,t)=>{n.addLine();const i=e.srcSpans,a=e.parts;let o=e.indent*" ".length,l=0;for(;l<i.length&&!i[l];)o+=a[l].length,l++;for(l<i.length&&0===t&&0===o?s=!0:r();l<i.length;){const e=i[l],t=e.start.file,s=e.start.line,r=e.start.col;for(n.addSource(t.url,t.content).addMapping(o,t.url,s,r),o+=a[l].length,l++;l<i.length&&(e===i[l]||!i[l]);)o+=a[l].length,l++}}),n}setPreambleLineCount(e){return this._preambleLineCount=e}spanOf(e,t){const n=this._lines[e-this._preambleLineCount];if(n){let e=t-Zn(n.indent).length;for(let t=0;t<n.parts.length;t++){const s=n.parts[t];if(s.length>e)return n.srcSpans[t];e-=s.length}}return null}get sourceLines(){return this._lines.length&&0===this._lines[this._lines.length-1].parts.length?this._lines.slice(0,-1):this._lines}}function Jn(e,t,n=!0){if(null==e)return null;const s=e.replace(zn,(...e)=>"$"==e[0]?t?"\\$":"$":"\n"==e[0]?"\\n":"\r"==e[0]?"\\r":"\\"+e[0]);return n||!Kn.test(s)?`'${s}'`:s}function Zn(e){let t="";for(let n=0;n<e;n++)t+=" ";return t}class es{evaluateStatements(e,t,n,s){const r=new ts(n),i=Yn.createRoot();return t.length>0&&!t[0].isEquivalent(We("use strict").toStmt())&&(t=[We("use strict").toStmt(),...t]),r.visitAllStatements(t,i),r.createReturnStmt(i),this.evaluateCode(e,i,r.getArgs(),s)}evaluateCode(e,t,n,s){let r=`"use strict";${t.toSource()}\n//# sourceURL=${e}`;const i=[],a=[];for(const e in n)a.push(n[e]),i.push(e);if(s){const n=new Function(...i.concat("return null;")).toString(),s=n.slice(0,n.indexOf("return null;")).split("\n").length-1;r+="\n"+t.toSourceMapGenerator(e,s).toJsComment()}const o=new Function(...i.concat(r));return this.executeFunction(o,a)}executeFunction(e,t){return e(...t)}}class ts extends class extends class{constructor(e){this._escapeDollarInStrings=e}printLeadingComments(e,t){if(void 0!==e.leadingComments)for(const n of e.leadingComments)n instanceof Pe?t.print(e,`/*${n.toString()}*/`,n.trailingNewline):n.multiline?t.print(e,`/* ${n.text} */`,n.trailingNewline):n.text.split("\n").forEach(n=>{t.println(e,"// "+n)})}visitExpressionStmt(e,t){return this.printLeadingComments(e,t),e.expr.visitExpression(this,t),t.println(e,";"),null}visitReturnStmt(e,t){return this.printLeadingComments(e,t),t.print(e,"return "),e.value.visitExpression(this,t),t.println(e,";"),null}visitIfStmt(e,t){this.printLeadingComments(e,t),t.print(e,"if ("),e.condition.visitExpression(this,t),t.print(e,") {");const n=null!=e.falseCase&&e.falseCase.length>0;return e.trueCase.length<=1&&!n?(t.print(e," "),this.visitAllStatements(e.trueCase,t),t.removeEmptyLastLine(),t.print(e," ")):(t.println(),t.incIndent(),this.visitAllStatements(e.trueCase,t),t.decIndent(),n&&(t.println(e,"} else {"),t.incIndent(),this.visitAllStatements(e.falseCase,t),t.decIndent())),t.println(e,"}"),null}visitThrowStmt(e,t){return this.printLeadingComments(e,t),t.print(e,"throw "),e.error.visitExpression(this,t),t.println(e,";"),null}visitWriteVarExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),t.print(e,e.name+" = "),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitWriteKeyExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),e.receiver.visitExpression(this,t),t.print(e,"["),e.index.visitExpression(this,t),t.print(e,"] = "),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitWritePropExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),e.receiver.visitExpression(this,t),t.print(e,`.${e.name} = `),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitInvokeMethodExpr(e,t){e.receiver.visitExpression(this,t);let n=e.name;return null!=e.builtin&&(n=this.getBuiltinMethodName(e.builtin),null==n)||(t.print(e,`.${n}(`),this.visitAllExpressions(e.args,t,","),t.print(e,")")),null}visitInvokeFunctionExpr(e,t){return e.fn.visitExpression(this,t),t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null}visitWrappedNodeExpr(e,t){throw new Error("Abstract emitter cannot visit WrappedNodeExpr.")}visitTypeofExpr(e,t){t.print(e,"typeof "),e.expr.visitExpression(this,t)}visitReadVarExpr(e,t){let n=e.name;if(null!=e.builtin)switch(e.builtin){case W.Super:n="super";break;case W.This:n="this";break;case W.CatchError:n=Xn.name;break;case W.CatchStack:n=Gn.name;break;default:throw new Error("Unknown builtin variable "+e.builtin)}return t.print(e,n),null}visitInstantiateExpr(e,t){return t.print(e,"new "),e.classExpr.visitExpression(this,t),t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null}visitLiteralExpr(e,t){const n=e.value;return t.print(e,"string"==typeof n?Jn(n,this._escapeDollarInStrings):""+n),null}visitLocalizedString(e,t){const n=e.serializeI18nHead();t.print(e,"$localize `"+n.raw);for(let n=1;n<e.messageParts.length;n++)t.print(e,"${"),e.expressions[n-1].visitExpression(this,t),t.print(e,"}"+e.serializeI18nTemplatePart(n).raw);return t.print(e,"`"),null}visitConditionalExpr(e,t){return t.print(e,"("),e.condition.visitExpression(this,t),t.print(e,"? "),e.trueCase.visitExpression(this,t),t.print(e,": "),e.falseCase.visitExpression(this,t),t.print(e,")"),null}visitNotExpr(e,t){return t.print(e,"!"),e.condition.visitExpression(this,t),null}visitAssertNotNullExpr(e,t){return e.condition.visitExpression(this,t),null}visitUnaryOperatorExpr(e,t){let n;switch(e.operator){case q.Plus:n="+";break;case q.Minus:n="-";break;default:throw new Error("Unknown operator "+e.operator)}return e.parens&&t.print(e,"("),t.print(e,n),e.expr.visitExpression(this,t),e.parens&&t.print(e,")"),null}visitBinaryOperatorExpr(e,t){let n;switch(e.operator){case H.Equals:n="==";break;case H.Identical:n="===";break;case H.NotEquals:n="!=";break;case H.NotIdentical:n="!==";break;case H.And:n="&&";break;case H.BitwiseAnd:n="&";break;case H.Or:n="||";break;case H.Plus:n="+";break;case H.Minus:n="-";break;case H.Divide:n="/";break;case H.Multiply:n="*";break;case H.Modulo:n="%";break;case H.Lower:n="<";break;case H.LowerEquals:n="<=";break;case H.Bigger:n=">";break;case H.BiggerEquals:n=">=";break;default:throw new Error("Unknown operator "+e.operator)}return e.parens&&t.print(e,"("),e.lhs.visitExpression(this,t),t.print(e,` ${n} `),e.rhs.visitExpression(this,t),e.parens&&t.print(e,")"),null}visitReadPropExpr(e,t){return e.receiver.visitExpression(this,t),t.print(e,"."),t.print(e,e.name),null}visitReadKeyExpr(e,t){return e.receiver.visitExpression(this,t),t.print(e,"["),e.index.visitExpression(this,t),t.print(e,"]"),null}visitLiteralArrayExpr(e,t){return t.print(e,"["),this.visitAllExpressions(e.entries,t,","),t.print(e,"]"),null}visitLiteralMapExpr(e,t){return t.print(e,"{"),this.visitAllObjects(n=>{t.print(e,Jn(n.key,this._escapeDollarInStrings,n.quoted)+":"),n.value.visitExpression(this,t)},e.entries,t,","),t.print(e,"}"),null}visitCommaExpr(e,t){return t.print(e,"("),this.visitAllExpressions(e.parts,t,","),t.print(e,")"),null}visitAllExpressions(e,t,n){this.visitAllObjects(e=>e.visitExpression(this,t),e,t,n)}visitAllObjects(e,t,n,s){let r=!1;for(let i=0;i<t.length;i++)i>0&&(n.lineLength()>80?(n.print(null,s,!0),r||(n.incIndent(),n.incIndent(),r=!0)):n.print(null,s,!1)),e(t[i]);r&&(n.decIndent(),n.decIndent())}visitAllStatements(e,t){e.forEach(e=>e.visitStatement(this,t))}}{constructor(){super(!1)}visitDeclareClassStmt(e,t){return t.pushClass(e),this._visitClassConstructor(e,t),null!=e.parent&&(t.print(e,e.name+".prototype = Object.create("),e.parent.visitExpression(this,t),t.println(e,".prototype);")),e.getters.forEach(n=>this._visitClassGetter(e,n,t)),e.methods.forEach(n=>this._visitClassMethod(e,n,t)),t.popClass(),null}_visitClassConstructor(e,t){t.print(e,`function ${e.name}(`),null!=e.constructorMethod&&this._visitParams(e.constructorMethod.params,t),t.println(e,") {"),t.incIndent(),null!=e.constructorMethod&&e.constructorMethod.body.length>0&&(t.println(e,"var self = this;"),this.visitAllStatements(e.constructorMethod.body,t)),t.decIndent(),t.println(e,"}")}_visitClassGetter(e,t,n){n.println(e,`Object.defineProperty(${e.name}.prototype, '${t.name}', { get: function() {`),n.incIndent(),t.body.length>0&&(n.println(e,"var self = this;"),this.visitAllStatements(t.body,n)),n.decIndent(),n.println(e,"}});")}_visitClassMethod(e,t,n){n.print(e,`${e.name}.prototype.${t.name} = function(`),this._visitParams(t.params,n),n.println(e,") {"),n.incIndent(),t.body.length>0&&(n.println(e,"var self = this;"),this.visitAllStatements(t.body,n)),n.decIndent(),n.println(e,"};")}visitWrappedNodeExpr(e,t){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitReadVarExpr(e,t){if(e.builtin===W.This)t.print(e,"self");else{if(e.builtin===W.Super)throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");super.visitReadVarExpr(e,t)}return null}visitDeclareVarStmt(e,t){return t.print(e,"var "+e.name),e.value&&(t.print(e," = "),e.value.visitExpression(this,t)),t.println(e,";"),null}visitCastExpr(e,t){return e.value.visitExpression(this,t),null}visitInvokeFunctionExpr(e,t){const n=e.fn;return n instanceof G&&n.builtin===W.Super?(t.currentClass.parent.visitExpression(this,t),t.print(e,".call(this"),e.args.length>0&&(t.print(e,", "),this.visitAllExpressions(e.args,t,",")),t.print(e,")")):super.visitInvokeFunctionExpr(e,t),null}visitFunctionExpr(e,t){return t.print(e,`function${e.name?" "+e.name:""}(`),this._visitParams(e.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print(e,"}"),null}visitDeclareFunctionStmt(e,t){return t.print(e,`function ${e.name}(`),this._visitParams(e.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println(e,"}"),null}visitTryCatchStmt(e,t){t.println(e,"try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println(e,`} catch (${Xn.name}) {`),t.incIndent();const n=[Gn.set(Xn.prop("stack")).toDeclStmt(null,[Ae.Final])].concat(e.catchStmts);return this.visitAllStatements(n,t),t.decIndent(),t.println(e,"}"),null}visitLocalizedString(e,t){t.print(e,'$localize((this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})(');const n=[e.serializeI18nHead()];for(let t=1;t<e.messageParts.length;t++)n.push(e.serializeI18nTemplatePart(t));return t.print(e,`[${n.map(e=>Jn(e.cooked,!1)).join(", ")}], `),t.print(e,`[${n.map(e=>Jn(e.raw,!1)).join(", ")}])`),e.expressions.forEach(n=>{t.print(e,", "),n.visitExpression(this,t)}),t.print(e,")"),null}_visitParams(e,t){this.visitAllObjects(e=>t.print(null,e.name),e,t,",")}getBuiltinMethodName(e){let t;switch(e){case z.ConcatArray:t="concat";break;case z.SubscribeObservable:t="subscribe";break;case z.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t}}{constructor(e){super(),this.reflector=e,this._evalArgNames=[],this._evalArgValues=[],this._evalExportedVars=[]}createReturnStmt(e){new Re(new Te(this._evalExportedVars.map(e=>new be(e,Be(e),!1)))).visitStatement(this,e)}getArgs(){const e={};for(let t=0;t<this._evalArgNames.length;t++)e[this._evalArgNames[t]]=this._evalArgValues[t];return e}visitExternalExpr(e,t){return this._emitReferenceToExternal(e,this.reflector.resolveExternalReference(e.value),t),null}visitWrappedNodeExpr(e,t){return this._emitReferenceToExternal(e,e.node,t),null}visitDeclareVarStmt(e,t){return e.hasModifier(Ae.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareVarStmt(e,t)}visitDeclareFunctionStmt(e,t){return e.hasModifier(Ae.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareFunctionStmt(e,t)}visitDeclareClassStmt(e,t){return e.hasModifier(Ae.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareClassStmt(e,t)}_emitReferenceToExternal(e,t,n){let s=this._evalArgValues.indexOf(t);if(-1===s){s=this._evalArgValues.length,this._evalArgValues.push(t);const e=function(e){if(!e||!e.reference)return null;const t=e.reference;if(t instanceof class{constructor(e,t,n){this.filePath=e,this.name=t,this.members=n}assertNoMembers(){if(this.members.length)throw new Error(`Illegal state: symbol without members expected, but got ${JSON.stringify(this)}.`)}})return t.name;if(t.__anonymousType)return t.__anonymousType;let n=et(t);return n.indexOf("(")>=0?(n="anonymous_"+gt++,t.__anonymousType=n):n=mt(n),n}({reference:t})||"val";this._evalArgNames.push(`jit_${e}_${s}`)}n.print(e,this._evalArgNames[s])}}function ns(e){return e>=9&&e<=32||160==e}function ss(e){return 48<=e&&e<=57}function rs(e){return e>=97&&e<=122||e>=65&&e<=90}function is(e){return 10===e||13===e}function as(e){return 48<=e&&e<=55}class os{constructor(e,t,n,s){this.file=e,this.offset=t,this.line=n,this.col=s}toString(){return null!=this.offset?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){const t=this.file.content,n=t.length;let s=this.offset,r=this.line,i=this.col;for(;s>0&&e<0;)if(s--,e++,10==t.charCodeAt(s)){r--;const e=t.substr(0,s-1).lastIndexOf(String.fromCharCode(10));i=e>0?s-e:s}else i--;for(;s<n&&e>0;){const n=t.charCodeAt(s);s++,e--,10==n?(r++,i=0):i++}return new os(this.file,s,r,i)}getContext(e,t){const n=this.file.content;let s=this.offset;if(null!=s){s>n.length-1&&(s=n.length-1);let r=s,i=0,a=0;for(;i<e&&s>0&&(s--,i++,"\n"!=n[s]||++a!=t););for(i=0,a=0;i<e&&r<n.length-1&&(r++,i++,"\n"!=n[r]||++a!=t););return{before:n.substring(s,this.offset),after:n.substring(this.offset,r+1)}}return null}}class ls{constructor(e,t){this.content=e,this.url=t}}class cs{constructor(e,t,n=e,s=null){this.start=e,this.end=t,this.fullStart=n,this.details=s}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}var us,ps,hs,ds;!function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(us||(us={}));class ms{constructor(e,t,n=us.ERROR){this.span=e,this.msg=t,this.level=n}contextualMessage(){const e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${us[this.level]} ->]${e.after}")`:this.msg}toString(){const e=this.span.details?", "+this.span.details:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}}class gs{constructor(e){this.context=e}resolveExternalReference(e){if("@angular/core"!==e.moduleName)throw new Error(`Cannot resolve external reference to ${e.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(e.name))throw new Error(`No value provided for @angular/core symbol '${e.name}'.`);return this.context[e.name]}parameters(e){throw new Error("Not implemented.")}annotations(e){throw new Error("Not implemented.")}shallowAnnotations(e){throw new Error("Not implemented.")}tryAnnotations(e){throw new Error("Not implemented.")}propMetadata(e){throw new Error("Not implemented.")}hasLifecycleHook(e,t){throw new Error("Not implemented.")}guards(e){throw new Error("Not implemented.")}componentModuleUrl(e,t){throw new Error("Not implemented.")}}function vs(e,t=!1){return je(Object.keys(e).map(n=>({key:n,quoted:t,value:e[n]})))}function fs(e){const t=e.map(e=>Ve(e.type));return e.length>0?$e(Ue(t)):j}function ys(e,t){const n=Ue(e.map(e=>e.value));return t?qe([],[new Re(n)]):n}class Ss{constructor(e,t,n,s){this.input=t,this.errLocation=n,this.ctxLocation=s,this.message=`Parser Error: ${e} ${n} [${t}] in ${s}`}}class xs{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new zs(e+this.start,e+this.end)}}class Es{constructor(e,t){this.span=e,this.sourceSpan=t}visit(e,t=null){return null}toString(){return"AST"}}class _s extends Es{constructor(e,t,n){super(e,t),this.nameSpan=n}}class Cs extends Es{constructor(e,t,n,s,r){super(e,t),this.prefix=n,this.uninterpretedExpression=s,this.location=r}visit(e,t=null){return e.visitQuote(this,t)}toString(){return"Quote"}}class ws extends Es{visit(e,t=null){}}class bs extends Es{visit(e,t=null){return e.visitImplicitReceiver(this,t)}}class Ts extends bs{visit(e,t=null){var n;return null===(n=e.visitThisReceiver)||void 0===n?void 0:n.call(e,this,t)}}class Is extends Es{constructor(e,t,n){super(e,t),this.expressions=n}visit(e,t=null){return e.visitChain(this,t)}}class Ns extends Es{constructor(e,t,n,s,r){super(e,t),this.condition=n,this.trueExp=s,this.falseExp=r}visit(e,t=null){return e.visitConditional(this,t)}}class As extends _s{constructor(e,t,n,s,r){super(e,t,n),this.receiver=s,this.name=r}visit(e,t=null){return e.visitPropertyRead(this,t)}}class Ps extends _s{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.value=i}visit(e,t=null){return e.visitPropertyWrite(this,t)}}class ks extends _s{constructor(e,t,n,s,r){super(e,t,n),this.receiver=s,this.name=r}visit(e,t=null){return e.visitSafePropertyRead(this,t)}}class Ms extends Es{constructor(e,t,n,s){super(e,t),this.obj=n,this.key=s}visit(e,t=null){return e.visitKeyedRead(this,t)}}class Ls extends Es{constructor(e,t,n,s,r){super(e,t),this.obj=n,this.key=s,this.value=r}visit(e,t=null){return e.visitKeyedWrite(this,t)}}class Os extends _s{constructor(e,t,n,s,r,i){super(e,t,i),this.exp=n,this.name=s,this.args=r}visit(e,t=null){return e.visitPipe(this,t)}}class Rs extends Es{constructor(e,t,n){super(e,t),this.value=n}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}}class Fs extends Es{constructor(e,t,n){super(e,t),this.expressions=n}visit(e,t=null){return e.visitLiteralArray(this,t)}}class Bs extends Es{constructor(e,t,n,s){super(e,t),this.keys=n,this.values=s}visit(e,t=null){return e.visitLiteralMap(this,t)}}class Ds extends Es{constructor(e,t,n,s){super(e,t),this.strings=n,this.expressions=s}visit(e,t=null){return e.visitInterpolation(this,t)}}class $s extends Es{constructor(e,t,n,s,r){super(e,t),this.operation=n,this.left=s,this.right=r}visit(e,t=null){return e.visitBinary(this,t)}}class Vs extends $s{constructor(e,t,n,s,r,i,a){super(e,t,r,i,a),this.operator=n,this.expr=s}static createMinus(e,t,n){return new Vs(e,t,"-",n,"-",new Rs(e,t,0),n)}static createPlus(e,t,n){return new Vs(e,t,"+",n,"-",n,new Rs(e,t,0))}visit(e,t=null){return void 0!==e.visitUnary?e.visitUnary(this,t):e.visitBinary(this,t)}}class Us extends Es{constructor(e,t,n){super(e,t),this.expression=n}visit(e,t=null){return e.visitPrefixNot(this,t)}}class js extends Es{constructor(e,t,n){super(e,t),this.expression=n}visit(e,t=null){return e.visitNonNullAssert(this,t)}}class qs extends _s{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.args=i}visit(e,t=null){return e.visitMethodCall(this,t)}}class Hs extends _s{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.args=i}visit(e,t=null){return e.visitSafeMethodCall(this,t)}}class Ws extends Es{constructor(e,t,n,s){super(e,t),this.target=n,this.args=s}visit(e,t=null){return e.visitFunctionCall(this,t)}}class zs{constructor(e,t){this.start=e,this.end=t}}class Ks extends Es{constructor(e,t,n,s,r){super(new xs(0,null===t?0:t.length),new zs(s,null===t?s:s+t.length)),this.ast=e,this.source=t,this.location=n,this.errors=r}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}}class Xs{constructor(e,t,n){this.sourceSpan=e,this.key=t,this.value=n}}class Gs{constructor(e,t,n){this.sourceSpan=e,this.key=t,this.value=n}}class Qs{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitFunctionCall(e,t){e.target&&this.visit(e.target,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.obj,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.obj,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitPrefixNot(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitQuote(e,t){}visitAll(e,t){for(const n of e)this.visit(n,t)}}class Ys{constructor(e,t,n,s,r,i){this.name=e,this.expression=t,this.type=n,this.sourceSpan=s,this.keySpan=r,this.valueSpan=i,this.isLiteral=this.type===ps.LITERAL_ATTR,this.isAnimation=this.type===ps.ANIMATION}}!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LITERAL_ATTR=1]="LITERAL_ATTR",e[e.ANIMATION=2]="ANIMATION"}(ps||(ps={}));class Js{constructor(e,t,n,s,r,i){this.name=e,this.targetOrPhase=t,this.type=n,this.handler=s,this.sourceSpan=r,this.handlerSpan=i}}class Zs{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.keySpan=s,this.valueSpan=r}}class er{constructor(e,t,n,s,r,i,a,o){this.name=e,this.type=t,this.securityContext=n,this.value=s,this.unit=r,this.sourceSpan=i,this.keySpan=a,this.valueSpan=o}}class tr{}tr.event=Be("$event");class nr{constructor(e,t){this.stmts=e,this.allowDefault=t,this.render3Stmts=e.map(e=>e instanceof Me&&e.name==t.name&&e.value instanceof Ee?new Re(e.value.lhs.value):e)}}class sr{constructor(e,t){this.stmts=e,this.currValExpr=t}}function rr(e,t,n,s,r,i){e||(e=new hr);const a=new pr(e,t,s,i),o=n.visit(a,ds.Expression),l=ir(a,s);if(a.usesImplicitReceiver&&e.notifyImplicitReceiverUse(),0===a.temporaryCount&&r==hs.TrySimple)return new sr([],o);if(r===hs.Expression)return new sr(l,o);const c=function(e){return Be("currVal_"+e)}(s);return l.push(c.set(o).toDeclStmt(B,[Ae.Final])),new sr(l,c)}function ir(e,t){const n=[];for(let s=0;s<e.temporaryCount;s++)n.push(or(t,s));return n}function ar(e,t){return`tmp_${e}_${t}`}function or(e,t){return new Me(ar(e,t),Ie)}function lr(e,t){if(e!==ds.Expression)throw new Error("Expected an expression, but saw "+t)}function cr(e,t){return e===ds.Statement?t.toStmt():t}!function(e){e[e.General=0]="General",e[e.TrySimple=1]="TrySimple",e[e.Expression=2]="Expression"}(hs||(hs={})),function(e){e[e.Statement=0]="Statement",e[e.Expression=1]="Expression"}(ds||(ds={}));class ur extends class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){return new Ds(e.span,e.sourceSpan,e.strings,this.visitAll(e.expressions))}visitLiteralPrimitive(e,t){return new Rs(e.span,e.sourceSpan,e.value)}visitPropertyRead(e,t){return new As(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitPropertyWrite(e,t){return new Ps(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,e.value.visit(this))}visitSafePropertyRead(e,t){return new ks(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitMethodCall(e,t){return new qs(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args))}visitSafeMethodCall(e,t){return new Hs(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args))}visitFunctionCall(e,t){return new Ws(e.span,e.sourceSpan,e.target.visit(this),this.visitAll(e.args))}visitLiteralArray(e,t){return new Fs(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitLiteralMap(e,t){return new Bs(e.span,e.sourceSpan,e.keys,this.visitAll(e.values))}visitUnary(e,t){switch(e.operator){case"+":return Vs.createPlus(e.span,e.sourceSpan,e.expr.visit(this));case"-":return Vs.createMinus(e.span,e.sourceSpan,e.expr.visit(this));default:throw new Error("Unknown unary operator "+e.operator)}}visitBinary(e,t){return new $s(e.span,e.sourceSpan,e.operation,e.left.visit(this),e.right.visit(this))}visitPrefixNot(e,t){return new Us(e.span,e.sourceSpan,e.expression.visit(this))}visitNonNullAssert(e,t){return new js(e.span,e.sourceSpan,e.expression.visit(this))}visitConditional(e,t){return new Ns(e.span,e.sourceSpan,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))}visitPipe(e,t){return new Os(e.span,e.sourceSpan,e.exp.visit(this),e.name,this.visitAll(e.args),e.nameSpan)}visitKeyedRead(e,t){return new Ms(e.span,e.sourceSpan,e.obj.visit(this),e.key.visit(this))}visitKeyedWrite(e,t){return new Ls(e.span,e.sourceSpan,e.obj.visit(this),e.key.visit(this),e.value.visit(this))}visitAll(e){const t=[];for(let n=0;n<e.length;++n)t[n]=e[n].visit(this);return t}visitChain(e,t){return new Is(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitQuote(e,t){return new Cs(e.span,e.sourceSpan,e.prefix,e.uninterpretedExpression,e.location)}}{constructor(e){super(),this._converterFactory=e}visitPipe(e,t){const n=[e.exp,...e.args].map(e=>e.visit(this,t));return new dr(e.span,e.sourceSpan,n,this._converterFactory.createPipeConverter(e.name,n.length))}visitLiteralArray(e,t){const n=e.expressions.map(e=>e.visit(this,t));return new dr(e.span,e.sourceSpan,n,this._converterFactory.createLiteralArrayConverter(e.expressions.length))}visitLiteralMap(e,t){const n=e.values.map(e=>e.visit(this,t));return new dr(e.span,e.sourceSpan,n,this._converterFactory.createLiteralMapConverter(e.keys))}}class pr{constructor(e,t,n,s,r,i){this._localResolver=e,this._implicitReceiver=t,this.bindingId=n,this.interpolationFunction=s,this.baseSourceSpan=r,this.implicitReceiverAccesses=i,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0,this.usesImplicitReceiver=!1}visitUnary(e,t){let n;switch(e.operator){case"+":n=q.Plus;break;case"-":n=q.Minus;break;default:throw new Error("Unsupported operator "+e.operator)}return cr(t,new xe(n,this._visit(e.expr,ds.Expression),void 0,this.convertSourceSpan(e.span)))}visitBinary(e,t){let n;switch(e.operation){case"+":n=H.Plus;break;case"-":n=H.Minus;break;case"*":n=H.Multiply;break;case"/":n=H.Divide;break;case"%":n=H.Modulo;break;case"&&":n=H.And;break;case"||":n=H.Or;break;case"==":n=H.Equals;break;case"!=":n=H.NotEquals;break;case"===":n=H.Identical;break;case"!==":n=H.NotIdentical;break;case"<":n=H.Lower;break;case">":n=H.Bigger;break;case"<=":n=H.LowerEquals;break;case">=":n=H.BiggerEquals;break;default:throw new Error("Unsupported operation "+e.operation)}return cr(t,new Ee(n,this._visit(e.left,ds.Expression),this._visit(e.right,ds.Expression),void 0,this.convertSourceSpan(e.span)))}visitChain(e,t){return function(e,t){if(e!==ds.Statement)throw new Error("Expected a statement, but saw "+t)}(t,e),this.visitAll(e.expressions,t)}visitConditional(e,t){return cr(t,this._visit(e.condition,ds.Expression).conditional(this._visit(e.trueExp,ds.Expression),this._visit(e.falseExp,ds.Expression),this.convertSourceSpan(e.span)))}visitPipe(e,t){throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: "+e.name)}visitFunctionCall(e,t){const n=this.visitAll(e.args,ds.Expression);let s;return s=e instanceof dr?e.converter(n):this._visit(e.target,ds.Expression).callFn(n,this.convertSourceSpan(e.span)),cr(t,s)}visitImplicitReceiver(e,t){return lr(t,e),this.usesImplicitReceiver=!0,this._implicitReceiver}visitThisReceiver(e,t){return this.visitImplicitReceiver(e,t)}visitInterpolation(e,t){lr(t,e);const n=[We(e.expressions.length)];for(let t=0;t<e.strings.length-1;t++)n.push(We(e.strings[t])),n.push(this._visit(e.expressions[t],ds.Expression));return n.push(We(e.strings[e.strings.length-1])),this.interpolationFunction?this.interpolationFunction(n):e.expressions.length<=9?De(dt.inlineInterpolate).callFn(n):De(dt.interpolate).callFn([n[0],Ue(n.slice(1),void 0,this.convertSourceSpan(e.span))])}visitKeyedRead(e,t){const n=this.leftMostSafeNode(e);return n?this.convertSafeAccess(e,n,t):cr(t,this._visit(e.obj,ds.Expression).key(this._visit(e.key,ds.Expression)))}visitKeyedWrite(e,t){const n=this._visit(e.obj,ds.Expression),s=this._visit(e.key,ds.Expression),r=this._visit(e.value,ds.Expression);return cr(t,n.key(s).set(r))}visitLiteralArray(e,t){throw new Error("Illegal State: literal arrays should have been converted into functions")}visitLiteralMap(e,t){throw new Error("Illegal State: literal maps should have been converted into functions")}visitLiteralPrimitive(e,t){return cr(t,We(e.value,null==e.value||!0===e.value||!0===e.value?D:void 0,this.convertSourceSpan(e.span)))}_getLocal(e,t){var n;return(null===(n=this._localResolver.globals)||void 0===n?void 0:n.has(e))&&t instanceof Ts?null:this._localResolver.getLocal(e)}visitMethodCall(e,t){if(e.receiver instanceof bs&&!(e.receiver instanceof Ts)&&"$any"===e.name){const t=this.visitAll(e.args,ds.Expression);if(1!=t.length)throw new Error("Invalid call to $any, expected 1 argument but received "+(t.length||"none"));return t[0].cast(B,this.convertSourceSpan(e.span))}const n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);{const n=this.visitAll(e.args,ds.Expression),s=this.usesImplicitReceiver;let r=null;const i=this._visit(e.receiver,ds.Expression);if(i===this._implicitReceiver){const t=this._getLocal(e.name,e.receiver);t&&(this.usesImplicitReceiver=s,r=t.callFn(n),this.addImplicitReceiverAccess(e.name))}return null==r&&(r=i.callMethod(e.name,n,this.convertSourceSpan(e.span))),cr(t,r)}}visitPrefixNot(e,t){return cr(t,(n=this._visit(e.expression,ds.Expression),new ge(n,void 0)));var n}visitNonNullAssert(e,t){return cr(t,(n=this._visit(e.expression,ds.Expression),new ve(n,void 0)));var n}visitPropertyRead(e,t){const n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);{let n=null;const s=this.usesImplicitReceiver,r=this._visit(e.receiver,ds.Expression);return r===this._implicitReceiver&&(n=this._getLocal(e.name,e.receiver),n&&(this.usesImplicitReceiver=s,this.addImplicitReceiverAccess(e.name))),null==n&&(n=r.prop(e.name)),cr(t,n)}}visitPropertyWrite(e,t){const n=this._visit(e.receiver,ds.Expression),s=this.usesImplicitReceiver;let r=null;if(n===this._implicitReceiver){const t=this._getLocal(e.name,e.receiver);if(t){if(!(t instanceof _e))throw new Error(`Cannot assign value "${e.value instanceof As?e.value.name:void 0}" to template variable "${e.name}". Template variables are read-only.`);r=t,this.usesImplicitReceiver=s,this.addImplicitReceiverAccess(e.name)}}return null===r&&(r=n.prop(e.name)),cr(t,r.set(this._visit(e.value,ds.Expression)))}visitSafePropertyRead(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)}visitSafeMethodCall(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)}visitAll(e,t){return e.map(e=>this._visit(e,t))}visitQuote(e,t){throw new Error(`Quotes are not supported for evaluation!\n Statement: ${e.uninterpretedExpression} located at ${e.location}`)}_visit(e,t){return this._resultMap.get(e)||(this._nodeMap.get(e)||e).visit(this,t)}convertSafeAccess(e,t,n){let s=this._visit(t.receiver,ds.Expression),r=void 0;this.needsTemporary(t.receiver)&&(r=this.allocateTemporary(),s=r.set(s),this._resultMap.set(t.receiver,r));const i=s.isBlank();this._nodeMap.set(t,t instanceof Hs?new qs(t.span,t.sourceSpan,t.nameSpan,t.receiver,t.name,t.args):new As(t.span,t.sourceSpan,t.nameSpan,t.receiver,t.name));const a=this._visit(e,ds.Expression);return this._nodeMap.delete(t),r&&this.releaseTemporary(r),cr(n,i.conditional(We(null),a))}leftMostSafeNode(e){const t=(e,t)=>(this._nodeMap.get(t)||t).visit(e);return e.visit({visitUnary:e=>null,visitBinary:e=>null,visitChain:e=>null,visitConditional:e=>null,visitFunctionCall:e=>null,visitImplicitReceiver:e=>null,visitThisReceiver:e=>null,visitInterpolation:e=>null,visitKeyedRead(e){return t(this,e.obj)},visitKeyedWrite:e=>null,visitLiteralArray:e=>null,visitLiteralMap:e=>null,visitLiteralPrimitive:e=>null,visitMethodCall(e){return t(this,e.receiver)},visitPipe:e=>null,visitPrefixNot:e=>null,visitNonNullAssert:e=>null,visitPropertyRead(e){return t(this,e.receiver)},visitPropertyWrite:e=>null,visitQuote:e=>null,visitSafeMethodCall(e){return t(this,e.receiver)||e},visitSafePropertyRead(e){return t(this,e.receiver)||e}})}needsTemporary(e){const t=(e,t)=>t&&(this._nodeMap.get(t)||t).visit(e);return e.visit({visitUnary(e){return t(this,e.expr)},visitBinary(e){return t(this,e.left)||t(this,e.right)},visitChain:e=>!1,visitConditional(e){return t(this,e.condition)||t(this,e.trueExp)||t(this,e.falseExp)},visitFunctionCall:e=>!0,visitImplicitReceiver:e=>!1,visitThisReceiver:e=>!1,visitInterpolation(e){return((e,n)=>n.some(n=>t(e,n)))(this,e.expressions)},visitKeyedRead:e=>!1,visitKeyedWrite:e=>!1,visitLiteralArray:e=>!0,visitLiteralMap:e=>!0,visitLiteralPrimitive:e=>!1,visitMethodCall:e=>!0,visitPipe:e=>!0,visitPrefixNot(e){return t(this,e.expression)},visitNonNullAssert(e){return t(this,e.expression)},visitPropertyRead:e=>!1,visitPropertyWrite:e=>!1,visitQuote:e=>!1,visitSafeMethodCall:e=>!0,visitSafePropertyRead:e=>!1})}allocateTemporary(){const e=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new G(ar(this.bindingId,e))}releaseTemporary(e){if(this._currentTemporary--,e.name!=ar(this.bindingId,this._currentTemporary))throw new Error(`Temporary ${e.name} released out of order`)}convertSourceSpan(e){if(this.baseSourceSpan){const t=this.baseSourceSpan.start.moveBy(e.start),n=this.baseSourceSpan.start.moveBy(e.end),s=this.baseSourceSpan.fullStart.moveBy(e.start);return new cs(t,n,s)}return null}addImplicitReceiverAccess(e){this.implicitReceiverAccesses&&this.implicitReceiverAccesses.add(e)}}class hr{constructor(e){this.globals=e}notifyImplicitReceiverUse(){}getLocal(e){return e===tr.event.name?tr.event:null}}class dr extends Ws{constructor(e,t,n,s){super(e,t,null,n),this.args=n,this.converter=s}}class mr{constructor(){this.strictStyling=!0}shimCssText(e,t,n=""){const s=e.match(Lr)||[];return e=function(e){return e.replace(Mr,"")}(e),e=this._insertDirectives(e),[this._scopeCssText(e,t,n),...s].join("\n")}_insertDirectives(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)}_insertPolyfillDirectivesInCssText(e){return e.replace(vr,function(...e){return e[2]+"{"})}_insertPolyfillRulesInCssText(e){return e.replace(fr,(...e)=>{const t=e[0].replace(e[1],"").replace(e[2],"");return e[4]+t})}_scopeCssText(e,t,n){const s=this._extractUnscopedRulesFromCssText(e);return e=this._insertPolyfillHostInCssText(e),e=this._convertColonHost(e),e=this._convertColonHostContext(e),e=this._convertShadowDOMSelectors(e),t&&(e=this._scopeSelectors(e,t,n)),(e=e+"\n"+s).trim()}_extractUnscopedRulesFromCssText(e){let t,n="";for(yr.lastIndex=0;null!==(t=yr.exec(e));)n+=t[0].replace(t[2],"").replace(t[1],t[4])+"\n\n";return n}_convertColonHost(e){return this._convertColonRule(e,_r,this._colonHostPartReplacer)}_convertColonHostContext(e){return this._convertColonRule(e,Cr,this._colonHostContextPartReplacer)}_convertColonRule(e,t,n){return e.replace(t,function(...e){if(e[2]){const t=e[2].split(","),s=[];for(let r=0;r<t.length;r++){const i=t[r].trim();if(!i)break;s.push(n(wr,i,e[3]))}return s.join(",")}return wr+e[3]})}_colonHostContextPartReplacer(e,t,n){return t.indexOf(Sr)>-1?this._colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n}_colonHostPartReplacer(e,t,n){return e+t.replace(Sr,"")+n}_convertShadowDOMSelectors(e){return Tr.reduce((e,t)=>e.replace(t," "),e)}_scopeSelectors(e,t,n){return function(e,t){const n=Vr(e,Br,"%QUOTED%"),s=Vr(n.escapedString,Fr,"%BLOCK%");let r=0,i=0;return s.escapedString.replace(Or,(...e)=>{const n=e[2];let i="",a=e[4],o="";a&&a.startsWith("{%BLOCK%")&&(i=s.blocks[r++],a=a.substring("%BLOCK%".length+1),o="{");const l=t(new Dr(n,i));return`${e[1]}${l.selector}${e[3]}${o}${l.content}${a}`}).replace(Rr,()=>n.blocks[i++])}(e,e=>{let s=e.selector,r=e.content;return"@"!=e.selector[0]?s=this._scopeSelector(e.selector,t,n,this.strictStyling):(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document"))&&(r=this._scopeSelectors(e.content,t,n)),new Dr(s,r)})}_scopeSelector(e,t,n,s){return e.split(",").map(e=>e.trim().split(Ir)).map(e=>{const[r,...i]=e;return[(e=>this._selectorNeedsScoping(e,t)?s?this._applyStrictSelectorScope(e,t,n):this._applySelectorScope(e,t,n):e)(r),...i].join(" ")}).join(", ")}_selectorNeedsScoping(e,t){return!this._makeScopeMatcher(t).test(e)}_makeScopeMatcher(e){return e=e.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+e+")"+Nr,"m")}_applySelectorScope(e,t,n){return this._applySimpleSelectorScope(e,t,n)}_applySimpleSelectorScope(e,t,n){if(Ar.lastIndex=0,Ar.test(e)){const s=this.strictStyling?`[${n}]`:t;return e.replace(br,(e,t)=>t.replace(/([^:]*)(:*)(.*)/,(e,t,n,r)=>t+s+n+r)).replace(Ar,s+" ")}return t+" "+e}_applyStrictSelectorScope(e,t,n){const s="["+(t=t.replace(/\[is=([^\]]*)\]/g,(e,...t)=>t[0]))+"]",r=e=>{let r=e.trim();if(!r)return"";if(e.indexOf(wr)>-1)r=this._applySimpleSelectorScope(e,t,n);else{const t=e.replace(Ar,"");if(t.length>0){const e=t.match(/([^:]*)(:*)(.*)/);e&&(r=e[1]+s+e[2]+e[3])}}return r},i=new gr(e);let a,o="",l=0;const c=/( |>|\+|~(?!=))\s*/g;let u=!((e=i.content()).indexOf(wr)>-1);for(;null!==(a=c.exec(e));){const t=a[1],n=e.slice(l,a.index).trim();u=u||n.indexOf(wr)>-1,o+=`${u?r(n):n} ${t} `,l=c.lastIndex}const p=e.substring(l);return u=u||p.indexOf(wr)>-1,o+=u?r(p):p,i.restore(o)}_insertPolyfillHostInCssText(e){return e.replace(kr,xr).replace(Pr,Sr)}}class gr{constructor(e){this.placeholders=[],this.index=0,e=e.replace(/(\[[^\]]*\])/g,(e,t)=>{const n=`__ph-${this.index}__`;return this.placeholders.push(t),this.index++,n}),this._content=e.replace(/(:nth-[-\w]+)(\([^)]+\))/g,(e,t,n)=>{const s=`__ph-${this.index}__`;return this.placeholders.push(n),this.index++,t+s})}restore(e){return e.replace(/__ph-(\d+)__/g,(e,t)=>this.placeholders[+t])}content(){return this._content}}const vr=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,fr=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,yr=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Sr="-shadowcsshost",xr="-shadowcsscontext",Er=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",_r=new RegExp("("+Sr+Er,"gim"),Cr=new RegExp("("+xr+Er,"gim"),wr=Sr+"-no-combinator",br=/-shadowcsshost-no-combinator([^\s]*)/,Tr=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],Ir=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,Nr="([>\\s~+[.,{:][\\s\\S]*)?$",Ar=/-shadowcsshost/gim,Pr=/:host/gim,kr=/:host-context/gim,Mr=/\/\*\s*[\s\S]*?\*\//g,Lr=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,Or=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,Rr=/%QUOTED%/g,Fr=new Map([["{","}"]]),Br=new Map([['"','"'],["'","'"]]);class Dr{constructor(e,t){this.selector=e,this.content=t}}class $r{constructor(e,t){this.escapedString=e,this.blocks=t}}function Vr(e,t,n){const s=[],r=[];let i,a,o=0,l=0,c=-1;for(let u=0;u<e.length;u++){const p=e[u];"\\"===p?u++:p===a?(o--,0===o&&(r.push(e.substring(c,u)),s.push(n),l=u,c=-1,i=a=void 0)):p===i?o++:0===o&&t.has(p)&&(i=p,a=t.get(p),o=1,c=u+1,s.push(e.substring(l,c)))}return-1!==c?(r.push(e.substring(c)),s.push(n)):s.push(e.substring(l)),new $r(s.join(""),r)}class Ur{constructor(e,t){this.sourceSpan=e,this.i18n=t}}class jr extends Ur{constructor(e,t,n){super(t,n),this.value=e}visit(e,t){return e.visitText(this,t)}}class qr extends Ur{constructor(e,t,n,s,r,i){super(s,i),this.switchValue=e,this.type=t,this.cases=n,this.switchValueSourceSpan=r}visit(e,t){return e.visitExpansion(this,t)}}class Hr{constructor(e,t,n,s,r){this.value=e,this.expression=t,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=r}visit(e,t){return e.visitExpansionCase(this,t)}}class Wr extends Ur{constructor(e,t,n,s,r){super(n,r),this.name=e,this.value=t,this.valueSpan=s}visit(e,t){return e.visitAttribute(this,t)}}class zr extends Ur{constructor(e,t,n,s,r,i=null,a){super(s,a),this.name=e,this.attrs=t,this.children=n,this.startSourceSpan=r,this.endSourceSpan=i}visit(e,t){return e.visitElement(this,t)}}class Kr{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitComment(this,t)}}function Xr(e,t,n=null){const s=[],r=e.visit?t=>e.visit(t,n)||t.visit(e,n):t=>t.visit(e,n);return t.forEach(e=>{const t=r(e);t&&s.push(t)}),s}var Gr;!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.INCOMPLETE_TAG_OPEN=4]="INCOMPLETE_TAG_OPEN",e[e.TEXT=5]="TEXT",e[e.ESCAPABLE_RAW_TEXT=6]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=7]="RAW_TEXT",e[e.COMMENT_START=8]="COMMENT_START",e[e.COMMENT_END=9]="COMMENT_END",e[e.CDATA_START=10]="CDATA_START",e[e.CDATA_END=11]="CDATA_END",e[e.ATTR_NAME=12]="ATTR_NAME",e[e.ATTR_QUOTE=13]="ATTR_QUOTE",e[e.ATTR_VALUE=14]="ATTR_VALUE",e[e.DOC_TYPE=15]="DOC_TYPE",e[e.EXPANSION_FORM_START=16]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=17]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=18]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=19]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=20]="EXPANSION_FORM_END",e[e.EOF=21]="EOF"}(Gr||(Gr={}));class Qr{constructor(e,t,n){this.type=e,this.parts=t,this.sourceSpan=n}}class Yr extends ms{constructor(e,t,n){super(n,e),this.tokenType=t}}class Jr{constructor(e,t,n){this.tokens=e,this.errors=t,this.nonNormalizedIcuExpressions=n}}const Zr=/\r\n?/g;function ei(e){return`Unexpected character "${0===e?"EOF":String.fromCharCode(e)}"`}function ti(e){return`Unknown entity "${e}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`}var ni;!function(e){e.HEX="hexadecimal",e.DEC="decimal"}(ni||(ni={}));class si{constructor(e){this.error=e}}class ri{constructor(e,t,n){this._getTagDefinition=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||jn,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(e=>e.codePointAt(0)||0);const s=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new pi(e,s):new ui(e,s),this._preserveLineEndings=n.preserveLineEndings||!1,this._escapedString=n.escapedString||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1;try{this._cursor.init()}catch(e){this.handleError(e)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(Zr,"\n")}tokenize(){for(;0!==this._cursor.peek();){const e=this._cursor.clone();try{this._attemptCharCode(60)?this._attemptCharCode(33)?this._attemptCharCode(91)?this._consumeCdata(e):this._attemptCharCode(45)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(47)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}this._beginToken(Gr.EOF),this._endToken([])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(125!==this._cursor.peek()&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(125===this._cursor.peek()){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(null===this._currentTokenStart)throw new Yr("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(null===this._currentTokenType)throw new Yr("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));const n=new Qr(this._currentTokenType,e,this._cursor.getSpan(this._currentTokenStart,this._leadingTriviaCodePoints));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');const n=new Yr(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new si(n)}handleError(e){if(e instanceof hi&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),!(e instanceof si))throw e;this.errors.push(e.error)}_attemptCharCode(e){return this._cursor.peek()===e&&(this._cursor.advance(),!0)}_attemptCharCodeCaseInsensitive(e){return t=e,ci(this._cursor.peek())==ci(t)&&(this._cursor.advance(),!0);var t}_requireCharCode(e){const t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(ei(this._cursor.peek()),this._cursor.getSpan(t))}_attemptStr(e){const t=e.length;if(this._cursor.charsLeft()<t)return!1;const n=this._cursor.clone();for(let s=0;s<t;s++)if(!this._attemptCharCode(e.charCodeAt(s)))return this._cursor=n,!1;return!0}_attemptStrCaseInsensitive(e){for(let t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0}_requireStr(e){const t=this._cursor.clone();if(!this._attemptStr(e))throw this._createError(ei(this._cursor.peek()),this._cursor.getSpan(t))}_attemptCharCodeUntilFn(e){for(;!e(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(e,t){const n=this._cursor.clone();if(this._attemptCharCodeUntilFn(e),this._cursor.diff(n)<t)throw this._createError(ei(this._cursor.peek()),this._cursor.getSpan(n))}_attemptUntilChar(e){for(;this._cursor.peek()!==e;)this._cursor.advance()}_readChar(e){if(e&&38===this._cursor.peek())return this._decodeEntity();{const e=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),e}}_decodeEntity(){const e=this._cursor.clone();if(this._cursor.advance(),!this._attemptCharCode(35)){const t=this._cursor.clone();if(this._attemptCharCodeUntilFn(li),59!=this._cursor.peek())return this._cursor=t,"&";const n=this._cursor.getChars(t);this._cursor.advance();const s=v[n];if(!s)throw this._createError(ti(n),this._cursor.getSpan(e));return s}{const n=this._attemptCharCode(120)||this._attemptCharCode(88),s=this._cursor.clone();if(this._attemptCharCodeUntilFn(oi),59!=this._cursor.peek())throw this._cursor.advance(),this._createError((t=n?ni.HEX:ni.DEC,`Unable to parse entity "${this._cursor.getChars(e)}" - ${t} character reference entities must end with ";"`),this._cursor.getSpan());const r=this._cursor.getChars(s);this._cursor.advance();try{const e=parseInt(r,n?16:10);return String.fromCharCode(e)}catch(t){throw this._createError(ti(this._cursor.getChars(e)),this._cursor.getSpan())}}var t}_consumeRawText(e,t){this._beginToken(e?Gr.ESCAPABLE_RAW_TEXT:Gr.RAW_TEXT);const n=[];for(;;){const s=this._cursor.clone(),r=t();if(this._cursor=s,r)break;n.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(n.join(""))])}_consumeComment(e){this._beginToken(Gr.COMMENT_START,e),this._requireCharCode(45),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("--\x3e")),this._beginToken(Gr.COMMENT_END),this._requireStr("--\x3e"),this._endToken([])}_consumeCdata(e){this._beginToken(Gr.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(Gr.CDATA_END),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(Gr.DOC_TYPE,e);const t=this._cursor.clone();this._attemptUntilChar(62);const n=this._cursor.getChars(t);this._cursor.advance(),this._endToken([n])}_consumePrefixAndName(){const e=this._cursor.clone();let t="";for(;58!==this._cursor.peek()&&!(((n=this._cursor.peek())<97||122<n)&&(n<65||90<n)&&(n<48||n>57));)this._cursor.advance();var n;let s;return 58===this._cursor.peek()?(t=this._cursor.getChars(e),this._cursor.advance(),s=this._cursor.clone()):s=e,this._requireCharCodeUntilFn(ai,""===t?0:1),[t,this._cursor.getChars(s)]}_consumeTagOpen(e){let t,n,s;try{if(!rs(this._cursor.peek()))throw this._createError(ei(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),n=s.parts[0],t=s.parts[1],this._attemptCharCodeUntilFn(ii);47!==this._cursor.peek()&&62!==this._cursor.peek()&&60!==this._cursor.peek();)this._consumeAttributeName(),this._attemptCharCodeUntilFn(ii),this._attemptCharCode(61)&&(this._attemptCharCodeUntilFn(ii),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(ii);this._consumeTagOpenEnd()}catch(t){if(t instanceof si)return void(s?s.type=Gr.INCOMPLETE_TAG_OPEN:(this._beginToken(Gr.TEXT,e),this._endToken(["<"])));throw t}const r=this._getTagDefinition(t).contentType;r===u.RAW_TEXT?this._consumeRawTextWithTagClose(n,t,!1):r===u.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,t,!0)}_consumeRawTextWithTagClose(e,t,n){this._consumeRawText(n,()=>!!this._attemptCharCode(60)&&!!this._attemptCharCode(47)&&(this._attemptCharCodeUntilFn(ii),!!this._attemptStrCaseInsensitive(t)&&(this._attemptCharCodeUntilFn(ii),this._attemptCharCode(62)))),this._beginToken(Gr.TAG_CLOSE),this._requireCharCodeUntilFn(e=>62===e,3),this._cursor.advance(),this._endToken([e,t])}_consumeTagOpenStart(e){this._beginToken(Gr.TAG_OPEN_START,e);const t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){const e=this._cursor.peek();if(39===e||34===e)throw this._createError(ei(e),this._cursor.getSpan());this._beginToken(Gr.ATTR_NAME);const t=this._consumePrefixAndName();this._endToken(t)}_consumeAttributeValue(){let e;if(39===this._cursor.peek()||34===this._cursor.peek()){this._beginToken(Gr.ATTR_QUOTE);const t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(Gr.ATTR_VALUE);const n=[];for(;this._cursor.peek()!==t;)n.push(this._readChar(!0));e=n.join(""),this._endToken([this._processCarriageReturns(e)]),this._beginToken(Gr.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(Gr.ATTR_VALUE);const t=this._cursor.clone();this._requireCharCodeUntilFn(ai,1),e=this._cursor.getChars(t),this._endToken([this._processCarriageReturns(e)])}}_consumeTagOpenEnd(){const e=this._attemptCharCode(47)?Gr.TAG_OPEN_END_VOID:Gr.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){this._beginToken(Gr.TAG_CLOSE,e),this._attemptCharCodeUntilFn(ii);const t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(ii),this._requireCharCode(62),this._endToken(t)}_consumeExpansionFormStart(){this._beginToken(Gr.EXPANSION_FORM_START),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(Gr.EXPANSION_FORM_START),this._beginToken(Gr.RAW_TEXT);const e=this._readUntil(44),t=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([t]);else{const n=this._endToken([e]);t!==e&&this.nonNormalizedIcuExpressions.push(n)}this._requireCharCode(44),this._attemptCharCodeUntilFn(ii),this._beginToken(Gr.RAW_TEXT);const n=this._readUntil(44);this._endToken([n]),this._requireCharCode(44),this._attemptCharCodeUntilFn(ii)}_consumeExpansionCaseStart(){this._beginToken(Gr.EXPANSION_CASE_VALUE);const e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(ii),this._beginToken(Gr.EXPANSION_CASE_EXP_START),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(ii),this._expansionCaseStack.push(Gr.EXPANSION_CASE_EXP_START)}_consumeExpansionCaseEnd(){this._beginToken(Gr.EXPANSION_CASE_EXP_END),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(ii),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(Gr.EXPANSION_FORM_END),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeText(){const e=this._cursor.clone();this._beginToken(Gr.TEXT,e);const 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(""))])}_isTextEnd(){if(60===this._cursor.peek()||0===this._cursor.peek())return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(125===this._cursor.peek()&&this._isInExpansionCase())return!0}return!1}_readUntil(e){const t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Gr.EXPANSION_CASE_EXP_START}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Gr.EXPANSION_FORM_START}isExpansionFormStart(){if(123!==this._cursor.peek())return!1;if(this._interpolationConfig){const e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}}function ii(e){return!ns(e)||0===e}function ai(e){return ns(e)||62===e||60===e||47===e||39===e||34===e||61===e}function oi(e){return 59==e||0==e||!function(e){return e>=97&&e<=102||e>=65&&e<=70||ss(e)}(e)}function li(e){return 59==e||0==e||!rs(e)}function ci(e){return e>=97&&e<=122?e-97+65:e}class ui{constructor(e,t){if(e instanceof ui){this.file=e.file,this.input=e.input,this.end=e.end;const t=e.state;this.state={peek:t.peek,offset:t.offset,line:t.line,column:t.column}}else{if(!t)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=e,this.input=e.content,this.end=t.endPos,this.state={peek:-1,offset:t.startPos,line:t.startLine,column:t.startCol}}}clone(){return new ui(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(e){return this.state.offset-e.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(e,t){let n=e=e||this;if(t)for(;this.diff(e)>0&&-1!==t.indexOf(e.peek());)n===e&&(e=e.clone()),e.advance();const s=this.locationFromCursor(e),r=this.locationFromCursor(this),i=n!==e?this.locationFromCursor(n):s;return new cs(s,r,i)}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new hi('Unexpected character "EOF"',this);const t=this.charAt(e.offset);10===t?(e.line++,e.column=0):is(t)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new os(e.file,e.state.offset,e.state.line,e.state.column)}}class pi extends ui{constructor(e,t){e instanceof pi?(super(e),this.internalState=Object.assign({},e.internalState)):(super(e,t),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new pi(this)}getChars(e){const t=e.clone();let n="";for(;t.internalState.offset<this.internalState.offset;)n+=String.fromCodePoint(t.peek()),t.advance();return n}processEscapeSequence(){const e=()=>this.internalState.peek;if(92===e())if(this.internalState=Object.assign({},this.state),this.advanceState(this.internalState),110===e())this.state.peek=10;else if(114===e())this.state.peek=13;else if(118===e())this.state.peek=11;else if(116===e())this.state.peek=9;else if(98===e())this.state.peek=8;else if(102===e())this.state.peek=12;else if(117===e())if(this.advanceState(this.internalState),123===e()){this.advanceState(this.internalState);const t=this.clone();let n=0;for(;125!==e();)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(t,n)}else{const e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(120===e()){this.advanceState(this.internalState);const e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(as(e())){let t="",n=0,s=this.clone();for(;as(e())&&n<3;)s=this.clone(),t+=String.fromCodePoint(e()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(t,8),this.internalState=s.internalState}else is(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,t){const n=this.input.substr(e.internalState.offset,t),s=parseInt(n,16);if(isNaN(s))throw e.state=e.internalState,new hi("Invalid hexadecimal escape sequence",e);return s}}class hi{constructor(e,t){this.msg=e,this.cursor=t}}class di extends ms{constructor(e,t,n){super(t,n),this.elementName=e}static create(e,t,n){return new di(e,t,n)}}class mi{constructor(e,t){this.rootNodes=e,this.errors=t}}class gi{constructor(e,t){this.tokens=e,this.getTagDefinition=t,this._index=-1,this._elementStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==Gr.EOF;)this._peek.type===Gr.TAG_OPEN_START||this._peek.type===Gr.INCOMPLETE_TAG_OPEN?this._consumeStartTag(this._advance()):this._peek.type===Gr.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===Gr.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Gr.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Gr.TEXT||this._peek.type===Gr.RAW_TEXT||this._peek.type===Gr.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Gr.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance()}_advance(){const e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}_advanceIf(e){return this._peek.type===e?this._advance():null}_consumeCdata(e){this._consumeText(this._advance()),this._advanceIf(Gr.CDATA_END)}_consumeComment(e){const t=this._advanceIf(Gr.RAW_TEXT);this._advanceIf(Gr.COMMENT_END);const n=null!=t?t.parts[0].trim():null;this._addToParent(new Kr(n,e.sourceSpan))}_consumeExpansion(e){const t=this._advance(),n=this._advance(),s=[];for(;this._peek.type===Gr.EXPANSION_CASE_VALUE;){const e=this._parseExpansionCase();if(!e)return;s.push(e)}if(this._peek.type!==Gr.EXPANSION_FORM_END)return void this.errors.push(di.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));const r=new cs(e.sourceSpan.start,this._peek.sourceSpan.end,e.sourceSpan.fullStart);this._addToParent(new qr(t.parts[0],n.parts[0],s,r,t.sourceSpan)),this._advance()}_parseExpansionCase(){const e=this._advance();if(this._peek.type!==Gr.EXPANSION_CASE_EXP_START)return this.errors.push(di.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;const t=this._advance(),n=this._collectExpansionExpTokens(t);if(!n)return null;const s=this._advance();n.push(new Qr(Gr.EOF,[],s.sourceSpan));const r=new gi(n,this.getTagDefinition);if(r.build(),r.errors.length>0)return this.errors=this.errors.concat(r.errors),null;const i=new cs(e.sourceSpan.start,s.sourceSpan.end,e.sourceSpan.fullStart),a=new cs(t.sourceSpan.start,s.sourceSpan.end,t.sourceSpan.fullStart);return new Hr(e.parts[0],r.rootNodes,i,e.sourceSpan,a)}_collectExpansionExpTokens(e){const t=[],n=[Gr.EXPANSION_CASE_EXP_START];for(;;){if(this._peek.type!==Gr.EXPANSION_FORM_START&&this._peek.type!==Gr.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===Gr.EXPANSION_CASE_EXP_END){if(!vi(n,Gr.EXPANSION_CASE_EXP_START))return this.errors.push(di.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===Gr.EXPANSION_FORM_END){if(!vi(n,Gr.EXPANSION_FORM_START))return this.errors.push(di.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===Gr.EOF)return this.errors.push(di.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}}_consumeText(e){let t=e.parts[0];if(t.length>0&&"\n"==t[0]){const e=this._getParentElement();null!=e&&0==e.children.length&&this.getTagDefinition(e.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new jr(t,e.sourceSpan))}_closeVoidElement(){const e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}_consumeStartTag(e){const[t,n]=e.parts,s=[];for(;this._peek.type===Gr.ATTR_NAME;)s.push(this._consumeAttr(this._advance()));const r=this._getElementFullName(t,n,this._getParentElement());let i=!1;if(this._peek.type===Gr.TAG_OPEN_END_VOID){this._advance(),i=!0;const t=this.getTagDefinition(r);t.canSelfClose||null!==m(r)||t.isVoid||this.errors.push(di.create(r,e.sourceSpan,`Only void and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===Gr.TAG_OPEN_END&&(this._advance(),i=!1);const a=this._peek.sourceSpan.start,o=new cs(e.sourceSpan.start,a,e.sourceSpan.fullStart),l=new cs(e.sourceSpan.start,a,e.sourceSpan.fullStart),c=new zr(r,s,[],o,l,void 0);this._pushElement(c),i?this._popElement(r,o):e.type===Gr.INCOMPLETE_TAG_OPEN&&(this._popElement(r,null),this.errors.push(di.create(r,o,`Opening tag "${r}" not terminated.`)))}_pushElement(e){const t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)}_consumeEndTag(e){const t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());this.getTagDefinition(t).isVoid?this.errors.push(di.create(t,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`)):this._popElement(t,e.sourceSpan)||this.errors.push(di.create(t,e.sourceSpan,`Unexpected closing tag "${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`))}_popElement(e,t){for(let n=this._elementStack.length-1;n>=0;n--){const s=this._elementStack[n];if(s.name==e)return s.endSourceSpan=t,s.sourceSpan.end=null!==t?t.end:s.sourceSpan.end,this._elementStack.splice(n,this._elementStack.length-n),!0;if(!this.getTagDefinition(s.name).closedByParent)return!1}return!1}_consumeAttr(e){const t=g(e.parts[0],e.parts[1]);let n=e.sourceSpan.end,s="",r=void 0;if(this._peek.type===Gr.ATTR_QUOTE&&this._advance(),this._peek.type===Gr.ATTR_VALUE){const e=this._advance();s=e.parts[0],n=e.sourceSpan.end,r=e.sourceSpan}return this._peek.type===Gr.ATTR_QUOTE&&(n=this._advance().sourceSpan.end),new Wr(t,s,new cs(e.sourceSpan.start,n,e.sourceSpan.fullStart),r)}_getParentElement(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}_addToParent(e){const t=this._getParentElement();null!=t?t.children.push(e):this.rootNodes.push(e)}_getElementFullName(e,t,n){if(""===e&&""===(e=this.getTagDefinition(t).implicitNamespacePrefix||"")&&null!=n){const t=p(n.name)[1];this.getTagDefinition(t).preventNamespaceInheritance||(e=m(n.name))}return g(e,t)}}function vi(e,t){return e.length>0&&e[e.length-1]===t}class fi extends class{constructor(e){this.getTagDefinition=e}parse(e,t,n){const s=function(e,t,n,s={}){const r=new ri(new ls(e,t),n,s);return r.tokenize(),new Jr(function(e){const t=[];let n=void 0;for(let s=0;s<e.length;s++){const r=e[s];n&&n.type==Gr.TEXT&&r.type==Gr.TEXT?(n.parts[0]+=r.parts[0],n.sourceSpan.end=r.sourceSpan.end):(n=r,t.push(n))}return t}(r.tokens),r.errors,r.nonNormalizedIcuExpressions)}(e,t,this.getTagDefinition,n),r=new gi(s.tokens,this.getTagDefinition);return r.build(),new mi(r.rootNodes,s.errors.concat(r.errors))}}{constructor(){super(x)}parse(e,t,n){return super.parse(e,t,n)}}const yi=new Set(["pre","template","textarea","script","style"]),Si=new RegExp("[^ \f\n\r\t\v - \u2028\u2029 \ufeff]"),xi=new RegExp("[ \f\n\r\t\v - \u2028\u2029 \ufeff]{2,}","g");function Ei(e){return e.replace(new RegExp("","g")," ")}class _i{visitElement(e,t){return yi.has(e.name)||e.attrs.some(e=>"ngPreserveWhitespaces"===e.name)?new zr(e.name,Xr(this,e.attrs),e.children,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n):new zr(e.name,e.attrs,function(e,t){const n=[];return t.forEach((s,r)=>{const i=s.visit(e,{prev:t[r-1],next:t[r+1]});i&&n.push(i)}),n}(this,e.children),e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}visitAttribute(e,t){return"ngPreserveWhitespaces"!==e.name?e:null}visitText(e,t){return e.value.match(Si)||t&&(t.prev instanceof qr||t.next instanceof qr)?new jr(Ei(e.value).replace(xi," "),e.sourceSpan,e.i18n):null}visitComment(e,t){return e}visitExpansion(e,t){return e}visitExpansionCase(e,t){return e}}var Ci;!function(e){e[e.PublicService=0]="PublicService",e[e.PrivateService=1]="PrivateService",e[e.Component=2]="Component",e[e.Directive=3]="Directive",e[e.Builtin=4]="Builtin"}(Ci||(Ci={}));const wi=/^([^:/?#]+):/;class bi{constructor(e,t,n,s,r){if(this._exprParser=e,this._interpolationConfig=t,this._schemaRegistry=n,this.errors=r,this.pipesByName=null,this._usedPipes=new Map,s){const e=new Map;s.forEach(t=>e.set(t.name,t)),this.pipesByName=e}}get interpolationConfig(){return this._interpolationConfig}getUsedPipes(){return Array.from(this._usedPipes.values())}createBoundHostProperties(e,t){if(e.hostProperties){const n=[];return Object.keys(e.hostProperties).forEach(s=>{const r=e.hostProperties[s];"string"==typeof r?this.parsePropertyBinding(s,r,!0,t,t.start.offset,void 0,[],n,t):this._reportError(`Value of the host property binding "${s}" needs to be a string representing an expression but got "${r}" (${typeof r})`,t)}),n}return null}createDirectiveHostPropertyAsts(e,t,n){const s=this.createBoundHostProperties(e,n);return s&&s.map(e=>this.createBoundElementProperty(t,e))}createDirectiveHostEventAsts(e,t){if(e.hostListeners){const n=[];return Object.keys(e.hostListeners).forEach(s=>{const r=e.hostListeners[s];"string"==typeof r?this.parseEvent(s,r,t,t,[],n):this._reportError(`Value of the host listener "${s}" needs to be a string representing an expression but got "${r}" (${typeof r})`,t)}),n}return null}parseInterpolation(e,t){const n=t.start.toString();try{const s=this._exprParser.parseInterpolation(e,n,t.start.offset,this._interpolationConfig);return s&&this._reportExpressionParserErrors(s.errors,t),this._checkPipes(s,t),s}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,t.start.offset)}}parseInterpolationExpression(e,t){const n=t.start.toString();try{const s=this._exprParser.parseInterpolationExpression(e,n,t.start.offset);return s&&this._reportExpressionParserErrors(s.errors,t),this._checkPipes(s,t),s}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,t.start.offset)}}parseInlineTemplateBinding(e,t,n,s,r,i,a,o){const l=this._parseTemplateBindings(e,t,n,n.start.offset+"*".length,s);for(const e of l){const t=Ai(n,e.sourceSpan),l=e.key.source,c=Ai(n,e.key.span);if(e instanceof Xs){const s=e.value?e.value.source:"$implicit",r=e.value?Ai(n,e.value.span):void 0;a.push(new Zs(l,s,t,c,r))}else if(e.value){const s=o?t:n,a=Ai(n,e.value.ast.sourceSpan);this._parsePropertyAst(l,e.value,s,c,a,r,i)}else r.push([l,""]),this.parseLiteralAttr(l,null,c,s,void 0,r,i,c)}}_parseTemplateBindings(e,t,n,s,r){const i=n.start.toString();try{const a=this._exprParser.parseTemplateBindings(e,t,i,s,r);return this._reportExpressionParserErrors(a.errors,n),a.templateBindings.forEach(e=>{e.value instanceof Ks&&this._checkPipes(e.value,n)}),a.warnings.forEach(e=>{this._reportError(e,n,us.WARNING)}),a.templateBindings}catch(e){return this._reportError(""+e,n),[]}}parseLiteralAttr(e,t,n,s,r,i,a,o){Ii(e)?(e=e.substring(1),t&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',n,us.ERROR),this._parseAnimation(e,t,n,s,o,r,i,a)):a.push(new Ys(e,this._exprParser.wrapLiteralPrimitive(t,"",s),ps.LITERAL_ATTR,n,o,r))}parsePropertyBinding(e,t,n,s,r,i,a,o,l){0===e.length&&this._reportError("Property name is missing in binding",s);let c=!1;e.startsWith("animate-")?(c=!0,e=e.substring("animate-".length)):Ii(e)&&(c=!0,e=e.substring(1)),c?this._parseAnimation(e,t,s,r,l,i,a,o):this._parsePropertyAst(e,this._parseBinding(t,n,i||s,r),s,l,i,a,o)}parsePropertyInterpolation(e,t,n,s,r,i,a){const o=this.parseInterpolation(t,s||n);return!!o&&(this._parsePropertyAst(e,o,n,a,s,r,i),!0)}_parsePropertyAst(e,t,n,s,r,i,a){i.push([e,t.source]),a.push(new Ys(e,t,ps.DEFAULT,n,s,r))}_parseAnimation(e,t,n,s,r,i,a,o){0===e.length&&this._reportError("Animation trigger is missing",n);const l=this._parseBinding(t||"undefined",!1,i||n,s);a.push([e,l.source]),o.push(new Ys(e,l,ps.ANIMATION,n,r,i))}_parseBinding(e,t,n,s){const r=(n&&n.start||"(unknown)").toString();try{const i=t?this._exprParser.parseSimpleBinding(e,r,s,this._interpolationConfig):this._exprParser.parseBinding(e,r,s,this._interpolationConfig);return i&&this._reportExpressionParserErrors(i.errors,n),this._checkPipes(i,n),i}catch(e){return this._reportError(""+e,n),this._exprParser.wrapLiteralPrimitive("ERROR",r,s)}}createBoundElementProperty(e,t,n=!1,s=!0){if(t.isAnimation)return new er(t.name,4,N.NONE,t.expression,null,t.sourceSpan,t.keySpan,t.valueSpan);let r=null,i=void 0,a=null;const o=t.name.split(".");let l=void 0;if(o.length>1)if("attr"==o[0]){a=o.slice(1).join("."),n||this._validatePropertyOrAttributeName(a,t.sourceSpan,!0),l=Ni(this._schemaRegistry,e,a,!0);const s=a.indexOf(":");if(s>-1){const e=a.substring(0,s),t=a.substring(s+1);a=g(e,t)}i=1}else"class"==o[0]?(a=o[1],i=2,l=[N.NONE]):"style"==o[0]&&(r=o.length>2?o[2]:null,a=o[1],i=3,l=[N.STYLE]);if(null===a){const r=this._schemaRegistry.getMappedPropName(t.name);a=s?r:t.name,l=Ni(this._schemaRegistry,e,r,!1),i=0,n||this._validatePropertyOrAttributeName(r,t.sourceSpan,!1)}return new er(a,i,l[0],t.expression,r,t.sourceSpan,t.keySpan,t.valueSpan)}parseEvent(e,t,n,s,r,i){0===e.length&&this._reportError("Event name is missing in binding",n),Ii(e)?(e=e.substr(1),this._parseAnimationEvent(e,t,n,s,i)):this._parseRegularEvent(e,t,n,s,r,i)}calcPossibleSecurityContexts(e,t,n){const s=this._schemaRegistry.getMappedPropName(t);return Ni(this._schemaRegistry,e,s,n)}_parseAnimationEvent(e,t,n,s,r){const i=Qe(e,".",[e,""]),a=i[0],o=i[1].toLowerCase();if(o)switch(o){case"start":case"done":const e=this._parseAction(t,s);r.push(new Js(a,o,1,e,n,s));break;default:this._reportError(`The provided animation output phase value "${o}" for "@${a}" is not supported (use start or done)`,n)}else this._reportError(`The animation trigger output event (@${a}) is missing its phase value name (start or done are currently supported)`,n)}_parseRegularEvent(e,t,n,s,r,i){const[a,o]=Ge(e,[null,e]),l=this._parseAction(t,s);r.push([e,l.source]),i.push(new Js(o,a,0,l,n,s))}_parseAction(e,t){const n=(t&&t.start||"(unknown").toString(),s=t&&t.start?t.start.offset:0;try{const r=this._exprParser.parseAction(e,n,s,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,t),!r||r.ast instanceof ws?(this._reportError("Empty expressions are not allowed",t),this._exprParser.wrapLiteralPrimitive("ERROR",n,s)):(this._checkPipes(r,t),r)}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,s)}}_reportError(e,t,n=us.ERROR){this.errors.push(new ms(t,e,n))}_reportExpressionParserErrors(e,t){for(const n of e)this._reportError(n.message,t)}_checkPipes(e,t){if(e&&this.pipesByName){const n=new Ti;e.visit(n),n.pipes.forEach((e,n)=>{const s=this.pipesByName.get(n);s?this._usedPipes.set(n,s):this._reportError(`The pipe '${n}' could not be found`,new cs(t.start.moveBy(e.span.start),t.start.moveBy(e.span.end)))})}}_validatePropertyOrAttributeName(e,t,n){const s=n?this._schemaRegistry.validateAttribute(e):this._schemaRegistry.validateProperty(e);s.error&&this._reportError(s.msg,t,us.ERROR)}}class Ti extends Qs{constructor(){super(...arguments),this.pipes=new Map}visitPipe(e,t){return this.pipes.set(e.name,e),e.exp.visit(this),this.visitAll(e.args,t),null}}function Ii(e){return"@"==e[0]}function Ni(e,t,n,s){const r=[];return _.parse(t).forEach(t=>{const i=t.element?[t.element]:e.allKnownElementNames(),a=new Set(t.notSelectors.filter(e=>e.isElementSelector()).map(e=>e.element)),o=i.filter(e=>!a.has(e));r.push(...o.map(t=>e.securityContext(t,n,s)))}),0===r.length?[N.NONE]:Array.from(new Set(r)).sort()}function Ai(e,t){const n=t.start-e.start.offset,s=t.end-e.end.offset;return new cs(e.start.moveBy(n),e.end.moveBy(s),e.fullStart.moveBy(n),e.details)}function Pi(e){let t=null,n=null,s=null,r=!1,i="";e.attrs.forEach(e=>{const a=e.name.toLowerCase();"select"==a?t=e.value:"href"==a?n=e.value:"rel"==a?s=e.value:"ngNonBindable"==e.name?r=!0:"ngProjectAs"==e.name&&e.value.length>0&&(i=e.value)}),t=function(e){return null===e||0===e.length?"*":e}(t);const a=e.name.toLowerCase();let o=ki.OTHER;return d(a)?o=ki.NG_CONTENT:"style"==a?o=ki.STYLE:"script"==a?o=ki.SCRIPT:"link"==a&&"stylesheet"==s&&(o=ki.STYLESHEET),new Li(o,t,n,r,i)}var ki,Mi;!function(e){e[e.NG_CONTENT=0]="NG_CONTENT",e[e.STYLE=1]="STYLE",e[e.STYLESHEET=2]="STYLESHEET",e[e.SCRIPT=3]="SCRIPT",e[e.OTHER=4]="OTHER"}(ki||(ki={}));class Li{constructor(e,t,n,s,r){this.type=e,this.selectAttr=t,this.hrefAttr=n,this.nonBindable=s,this.projectAs=r}}function Oi(e){return e instanceof Ks&&(e=e.ast),e instanceof ws}function Ri(e){const t=e.charCodeAt(0);if(t==e.charCodeAt(e.length-1)&&(39==t||34==t)){const t=e.substring(1,e.length-1);-1==t.indexOf("'")&&-1==t.indexOf('"')&&(e=t)}return e}function Fi(e){return e.replace(/[a-z][A-Z]/g,e=>e.charAt(0)+"-"+e.charAt(1)).toLowerCase()}class Bi{constructor(e){this._directiveExpr=e,this._hasInitialValues=!1,this.hasBindings=!1,this.hasBindingsWithPipes=!1,this._classMapInput=null,this._styleMapInput=null,this._singleStyleInputs=null,this._singleClassInputs=null,this._lastStylingInput=null,this._firstStylingInput=null,this._stylesIndex=new Map,this._classesIndex=new Map,this._initialStyleValues=[],this._initialClassValues=[]}registerBoundInput(e){let t=null,n=e.name;switch(e.type){case 0:t=this.registerInputBasedOnName(n,e.value,e.sourceSpan);break;case 3:t=this.registerStyleInput(n,!1,e.value,e.sourceSpan,e.unit);break;case 2:t=this.registerClassInput(n,!1,e.value,e.sourceSpan)}return!!t}registerInputBasedOnName(e,t,n){let s=null;const r=e.substring(0,6),i="style"===e||"style."===r||"style!"===r;if(i||!i&&("class"===e||"class."===r||"class!"===r)){const r="."!==e.charAt(5),a=e.substr(r?5:6);s=i?this.registerStyleInput(a,r,t,n):this.registerClassInput(a,r,t,n)}return s}registerStyleInput(e,t,n,s,r){if(Oi(n))return null;e=Fi(e);const{property:i,hasOverrideFlag:a,suffix:o}=$i(e),l={name:i,suffix:r="string"==typeof r&&0!==r.length?r:o,value:n,sourceSpan:s,hasOverrideFlag:a};return t?this._styleMapInput=l:((this._singleStyleInputs=this._singleStyleInputs||[]).push(l),Di(this._stylesIndex,i)),this._lastStylingInput=l,this._firstStylingInput=this._firstStylingInput||l,this._checkForPipes(n),this.hasBindings=!0,l}registerClassInput(e,t,n,s){if(Oi(n))return null;const{property:r,hasOverrideFlag:i}=$i(e),a={name:r,value:n,sourceSpan:s,hasOverrideFlag:i,suffix:null};if(t){if(this._classMapInput)throw new Error("[class] and [className] bindings cannot be used on the same element simultaneously");this._classMapInput=a}else(this._singleClassInputs=this._singleClassInputs||[]).push(a),Di(this._classesIndex,r);return this._lastStylingInput=a,this._firstStylingInput=this._firstStylingInput||a,this._checkForPipes(n),this.hasBindings=!0,a}_checkForPipes(e){e instanceof Ks&&e.ast instanceof Os&&(this.hasBindingsWithPipes=!0)}registerStyleAttr(e){this._initialStyleValues=function(e){const t=[];let n=0,s=0,r=0,i=0,a=0,o=null,l=!1;for(;n<e.length;)switch(e.charCodeAt(n++)){case 40:s++;break;case 41:s--;break;case 39:l=l||i>0,0===r?r=39:39===r&&92!==e.charCodeAt(n-1)&&(r=0);break;case 34:l=l||i>0,0===r?r=34:34===r&&92!==e.charCodeAt(n-1)&&(r=0);break;case 58:o||0!==s||0!==r||(o=Fi(e.substring(a,n-1).trim()),i=n);break;case 59:if(o&&i>0&&0===s&&0===r){const s=e.substring(i,n-1).trim();t.push(o,l?Ri(s):s),a=n,i=0,o=null,l=!1}}if(o&&i){const n=e.substr(i).trim();t.push(o,l?Ri(n):n)}return t}(e),this._hasInitialValues=!0}registerClassAttr(e){this._initialClassValues=e.trim().split(/\s+/g),this._hasInitialValues=!0}populateInitialStylingAttrs(e){if(this._initialClassValues.length){e.push(We(1));for(let t=0;t<this._initialClassValues.length;t++)e.push(We(this._initialClassValues[t]))}if(this._initialStyleValues.length){e.push(We(2));for(let t=0;t<this._initialStyleValues.length;t+=2)e.push(We(this._initialStyleValues[t]),We(this._initialStyleValues[t+1]))}}assignHostAttrs(e,t){this._directiveExpr&&(e.length||this._hasInitialValues)&&(this.populateInitialStylingAttrs(e),t.set("hostAttrs",Ue(e)))}buildClassMapInstruction(e){return this._classMapInput?this._buildMapBasedInstruction(e,!0,this._classMapInput):null}buildStyleMapInstruction(e){return this._styleMapInput?this._buildMapBasedInstruction(e,!1,this._styleMapInput):null}_buildMapBasedInstruction(e,t,n){let s=2;const r=n.value.visit(e);let i;return r instanceof Ds?(s+=r.expressions.length,i=t?function(e){switch(Mn(e)){case 1:return yt.classMap;case 3:return yt.classMapInterpolate1;case 5:return yt.classMapInterpolate2;case 7:return yt.classMapInterpolate3;case 9:return yt.classMapInterpolate4;case 11:return yt.classMapInterpolate5;case 13:return yt.classMapInterpolate6;case 15:return yt.classMapInterpolate7;case 17:return yt.classMapInterpolate8;default:return yt.classMapInterpolateV}}(r):function(e){switch(Mn(e)){case 1:return yt.styleMap;case 3:return yt.styleMapInterpolate1;case 5:return yt.styleMapInterpolate2;case 7:return yt.styleMapInterpolate3;case 9:return yt.styleMapInterpolate4;case 11:return yt.styleMapInterpolate5;case 13:return yt.styleMapInterpolate6;case 15:return yt.styleMapInterpolate7;case 17:return yt.styleMapInterpolate8;default:return yt.styleMapInterpolateV}}(r)):i=t?yt.classMap:yt.styleMap,{reference:i,calls:[{supportsInterpolation:!0,sourceSpan:n.sourceSpan,allocateBindingSlots:s,params:e=>{const t=e(r);return Array.isArray(t)?t:[t]}}]}}_buildSingleInputs(e,t,n,s,r){const i=[];return t.forEach(t=>{const a=i[i.length-1],o=t.value.visit(n);let l=e,c=2;o instanceof Ds&&(c+=o.expressions.length,s&&(l=s(o)));const u={sourceSpan:t.sourceSpan,allocateBindingSlots:c,supportsInterpolation:!!s,params:e=>{const n=[];n.push(We(t.name));const s=e(o);return Array.isArray(s)?n.push(...s):n.push(s),r||null===t.suffix||n.push(We(t.suffix)),n}};a&&a.reference===l?a.calls.push(u):i.push({reference:l,calls:[u]})}),i}_buildClassInputs(e){return this._singleClassInputs?this._buildSingleInputs(yt.classProp,this._singleClassInputs,e,null,!0):[]}_buildStyleInputs(e){return this._singleStyleInputs?this._buildSingleInputs(yt.styleProp,this._singleStyleInputs,e,Vi,!1):[]}buildUpdateLevelInstructions(e){const t=[];if(this.hasBindings){const n=this.buildStyleMapInstruction(e);n&&t.push(n);const s=this.buildClassMapInstruction(e);s&&t.push(s),t.push(...this._buildStyleInputs(e)),t.push(...this._buildClassInputs(e))}return t}}function Di(e,t){e.has(t)||e.set(t,e.size)}function $i(e){let t=!1;const n=e.indexOf("!important");-1!==n&&(e=n>0?e.substring(0,n):"",t=!0);let s=null,r=e;const i=e.lastIndexOf(".");return i>0&&(s=e.substr(i+1),r=e.substring(0,i)),{property:r,suffix:s,hasOverrideFlag:t}}function Vi(e){switch(Mn(e)){case 1:return yt.styleProp;case 3:return yt.stylePropInterpolate1;case 5:return yt.stylePropInterpolate2;case 7:return yt.stylePropInterpolate3;case 9:return yt.stylePropInterpolate4;case 11:return yt.stylePropInterpolate5;case 13:return yt.stylePropInterpolate6;case 15:return yt.stylePropInterpolate7;case 17:return yt.stylePropInterpolate8;default:return yt.stylePropInterpolateV}}!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.Keyword=2]="Keyword",e[e.String=3]="String",e[e.Operator=4]="Operator",e[e.Number=5]="Number",e[e.Error=6]="Error"}(Mi||(Mi={}));const Ui=["var","let","as","null","undefined","true","false","if","else","this"];class ji{tokenize(e){const t=new Ki(e),n=[];let s=t.scanToken();for(;null!=s;)n.push(s),s=t.scanToken();return n}}class qi{constructor(e,t,n,s,r){this.index=e,this.end=t,this.type=n,this.numValue=s,this.strValue=r}isCharacter(e){return this.type==Mi.Character&&this.numValue==e}isNumber(){return this.type==Mi.Number}isString(){return this.type==Mi.String}isOperator(e){return this.type==Mi.Operator&&this.strValue==e}isIdentifier(){return this.type==Mi.Identifier}isKeyword(){return this.type==Mi.Keyword}isKeywordLet(){return this.type==Mi.Keyword&&"let"==this.strValue}isKeywordAs(){return this.type==Mi.Keyword&&"as"==this.strValue}isKeywordNull(){return this.type==Mi.Keyword&&"null"==this.strValue}isKeywordUndefined(){return this.type==Mi.Keyword&&"undefined"==this.strValue}isKeywordTrue(){return this.type==Mi.Keyword&&"true"==this.strValue}isKeywordFalse(){return this.type==Mi.Keyword&&"false"==this.strValue}isKeywordThis(){return this.type==Mi.Keyword&&"this"==this.strValue}isError(){return this.type==Mi.Error}toNumber(){return this.type==Mi.Number?this.numValue:-1}toString(){switch(this.type){case Mi.Character:case Mi.Identifier:case Mi.Keyword:case Mi.Operator:case Mi.String:case Mi.Error:return this.strValue;case Mi.Number:return this.numValue.toString();default:return null}}}function Hi(e,t,n){return new qi(e,t,Mi.Character,n,String.fromCharCode(n))}function Wi(e,t,n){return new qi(e,t,Mi.Operator,0,n)}const zi=new qi(-1,-1,Mi.Character,0,"");class Ki{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){const e=this.input,t=this.length;let n=this.peek,s=this.index;for(;n<=32;){if(++s>=t){n=0;break}n=e.charCodeAt(s)}if(this.peek=n,this.index=s,s>=t)return null;if(Xi(n))return this.scanIdentifier();if(ss(n))return this.scanNumber(s);const r=s;switch(n){case 46:return this.advance(),ss(this.peek)?this.scanNumber(r):Hi(r,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(r,n);case 39:case 34:return this.scanString();case 35:case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(r,String.fromCharCode(n));case 63:return this.scanComplexOperator(r,"?",46,".");case 60:case 62:return this.scanComplexOperator(r,String.fromCharCode(n),61,"=");case 33:case 61:return this.scanComplexOperator(r,String.fromCharCode(n),61,"=",61,"=");case 38:return this.scanComplexOperator(r,"&",38,"&");case 124:return this.scanComplexOperator(r,"|",124,"|");case 160:for(;ns(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(n)}]`,0)}scanCharacter(e,t){return this.advance(),Hi(e,this.index,t)}scanOperator(e,t){return this.advance(),Wi(e,this.index,t)}scanComplexOperator(e,t,n,s,r,i){this.advance();let a=t;return this.peek==n&&(this.advance(),a+=s),null!=r&&this.peek==r&&(this.advance(),a+=i),Wi(e,this.index,a)}scanIdentifier(){const e=this.index;for(this.advance();Gi(this.peek);)this.advance();const t=this.input.substring(e,this.index);return Ui.indexOf(t)>-1?new qi(e,this.index,Mi.Keyword,0,t):function(e,t,n){return new qi(e,t,Mi.Identifier,0,n)}(e,this.index,t)}scanNumber(e){let t=this.index===e;for(this.advance();;){if(ss(this.peek));else if(46==this.peek)t=!1;else{if(101!=(n=this.peek)&&69!=n)break;if(this.advance(),Qi(this.peek)&&this.advance(),!ss(this.peek))return this.error("Invalid exponent",-1);t=!1}this.advance()}var n;const s=this.input.substring(e,this.index),r=t?function(e){const t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}(s):parseFloat(s);return new qi(e,this.index,Mi.Number,r,"")}scanString(){const e=this.index,t=this.peek;this.advance();let n="",s=this.index;const r=this.input;for(;this.peek!=t;)if(92==this.peek){let e;if(n+=r.substring(s,this.index),this.advance(),this.peek=this.peek,117==this.peek){const t=r.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(t))return this.error(`Invalid unicode escape [\\u${t}]`,0);e=parseInt(t,16);for(let e=0;e<5;e++)this.advance()}else e=Yi(this.peek),this.advance();n+=String.fromCharCode(e),s=this.index}else{if(0==this.peek)return this.error("Unterminated quote",0);this.advance()}const i=r.substring(s,this.index);return this.advance(),new qi(e,this.index,Mi.String,0,n+i)}error(e,t){const n=this.index+t;return function(e,t,n){return new qi(e,t,Mi.Error,0,n)}(n,this.index,`Lexer Error: ${e} at column ${n} in expression [${this.input}]`)}}function Xi(e){return 97<=e&&e<=122||65<=e&&e<=90||95==e||36==e}function Gi(e){return rs(e)||ss(e)||95==e||36==e}function Qi(e){return 45==e||43==e}function Yi(e){switch(e){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return e}}class Ji{constructor(e,t,n,s,r){this.strings=e,this.stringSpans=t,this.expressions=n,this.expressionsSpans=s,this.offsets=r}}class Zi{constructor(e,t,n){this.templateBindings=e,this.warnings=t,this.errors=n}}const ea=ta(jn);function ta(e){const t=Je(e.start)+"([\\s\\S]*?)"+Je(e.end);return new RegExp(t,"g")}class na{constructor(e){this._lexer=e,this.errors=[],this.simpleExpressionChecker=aa}parseAction(e,t,n,s=jn){this._checkNoInterpolation(e,t,s);const r=this._stripComments(e),i=this._lexer.tokenize(this._stripComments(e)),a=new ia(e,t,n,i,r.length,!0,this.errors,e.length-r.length).parseChain();return new Ks(a,e,t,n,this.errors)}parseBinding(e,t,n,s=jn){const r=this._parseBindingAst(e,t,n,s);return new Ks(r,e,t,n,this.errors)}checkSimpleExpression(e){const t=new this.simpleExpressionChecker;return e.visit(t),t.errors}parseSimpleBinding(e,t,n,s=jn){const r=this._parseBindingAst(e,t,n,s),i=this.checkSimpleExpression(r);return i.length>0&&this._reportError("Host binding expression cannot contain "+i.join(" "),e,t),new Ks(r,e,t,n,this.errors)}_reportError(e,t,n,s){this.errors.push(new Ss(e,t,n,s))}_parseBindingAst(e,t,n,s){const r=this._parseQuote(e,t,n);if(null!=r)return r;this._checkNoInterpolation(e,t,s);const i=this._stripComments(e),a=this._lexer.tokenize(i);return new ia(e,t,n,a,i.length,!1,this.errors,e.length-i.length).parseChain()}_parseQuote(e,t,n){if(null==e)return null;const s=e.indexOf(":");if(-1==s)return null;const r=e.substring(0,s).trim();if(!function(e){if(0==e.length)return!1;const t=new Ki(e);if(!Xi(t.peek))return!1;for(t.advance();0!==t.peek;){if(!Gi(t.peek))return!1;t.advance()}return!0}(r))return null;const i=e.substring(s+1),a=new xs(0,e.length);return new Cs(a,a.toAbsolute(n),r,i,t)}parseTemplateBindings(e,t,n,s,r){const i=this._lexer.tokenize(t);return new ia(t,n,r,i,t.length,!1,this.errors,0).parseTemplateBindings({source:e,span:new zs(s,s+e.length)})}parseInterpolation(e,t,n,s=jn){const r=this.splitInterpolation(e,t,s);if(null==r)return null;const i=[];for(let s=0;s<r.expressions.length;++s){const a=r.expressions[s],o=this._stripComments(a),l=this._lexer.tokenize(o),c=new ia(e,t,n,l,o.length,!1,this.errors,r.offsets[s]+(a.length-o.length)).parseChain();i.push(c)}return this.createInterpolationAst(r.strings,i,e,t,n)}parseInterpolationExpression(e,t,n){const s=this._stripComments(e),r=this._lexer.tokenize(s),i=new ia(e,t,n,r,s.length,!1,this.errors,0).parseChain();return this.createInterpolationAst(["",""],[i],e,t,n)}createInterpolationAst(e,t,n,s,r){const i=new xs(0,n.length),a=new Ds(i,i.toAbsolute(r),e,t);return new Ks(a,n,s,r,this.errors)}splitInterpolation(e,t,n=jn){const s=[],r=[],i=[],a=[],o=[];let l=0,c=!1,u=!1,{start:p,end:h}=n;for(;l<e.length;)if(c){const n=l,s=n+p.length,a=e.indexOf(h,s);if(-1===a){c=!1,u=!0;break}const d=a+h.length,m=e.substring(s,a);m.trim().length>0?r.push(m):(this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${l} in`,t),r.push("$implicit")),i.push(s),o.push({start:n,end:d}),l=d,c=!1}else{const t=l;l=e.indexOf(p,l),-1===l&&(l=e.length);const n=e.substring(t,l);s.push(n),a.push({start:t,end:l}),c=!0}return c||(u?(s[s.length-1]+=e.substring(l),a[a.length-1].end=e.length):(s.push(e.substring(l)),a.push({start:l,end:e.length}))),0===r.length?null:new Ji(s,a,r,o,i)}wrapLiteralPrimitive(e,t,n){const s=new xs(0,null==e?0:e.length);return new Ks(new Rs(s,s.toAbsolute(n),e),e,t,n,this.errors)}_stripComments(e){const t=this._commentStart(e);return null!=t?e.substring(0,t).trim():e}_commentStart(e){let t=null;for(let s=0;s<e.length-1;s++){const r=e.charCodeAt(s),i=e.charCodeAt(s+1);if(47===r&&47==i&&null==t)return s;t===r?t=null:null==t&&(39===(n=r)||34===n||96===n)&&(t=r)}var n;return null}_checkNoInterpolation(e,t,n){const s=(r=n)===jn?ea:ta(r);var r;const i=e.split(s);i.length>1&&this._reportError(`Got interpolation (${n.start}${n.end}) where expression was expected`,e,`at column ${this._findInterpolationErrorColumn(i,1,n)} in`,t)}_findInterpolationErrorColumn(e,t,n){let s="";for(let r=0;r<t;r++)s+=r%2==0?e[r]:`${n.start}${e[r]}${n.end}`;return s.length}}class sa extends na{constructor(){super(...arguments),this.simpleExpressionChecker=oa}}var ra;!function(e){e[e.None=0]="None",e[e.Writable=1]="Writable"}(ra||(ra={}));class ia{constructor(e,t,n,s,r,i,a,o){this.input=e,this.location=t,this.absoluteOffset=n,this.tokens=s,this.inputLength=r,this.parseAction=i,this.errors=a,this.offset=o,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=ra.None,this.sourceSpanCache=new Map,this.index=0}peek(e){const t=this.index+e;return t<this.tokens.length?this.tokens[t]:zi}get next(){return this.peek(0)}get atEOF(){return this.index>=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:0===this.tokens.length?this.inputLength+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e){return new xs(e,this.currentEndIndex)}sourceSpan(e){const t=`${e}@${this.inputIndex}`;return this.sourceSpanCache.has(t)||this.sourceSpanCache.set(t,this.span(e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(t)}advance(){this.index++}withContext(e,t){this.context|=e;const n=t();return this.context^=e,n}consumeOptionalCharacter(e){return!!this.next.isCharacter(e)&&(this.advance(),!0)}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error("Missing expected "+String.fromCharCode(e))}consumeOptionalOperator(e){return!!this.next.isOperator(e)&&(this.advance(),!0)}expectOperator(e){this.consumeOptionalOperator(e)||this.error("Missing expected operator "+e)}prettyPrintToken(e){return e===zi?"end of input":"token "+e}expectIdentifierOrKeyword(){const e=this.next;return e.isIdentifier()||e.isKeyword()?(this.advance(),e.toString()):(this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),"")}expectIdentifierOrKeywordOrString(){const e=this.next;return e.isIdentifier()||e.isKeyword()||e.isString()?(this.advance(),e.toString()):(this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),"")}parseChain(){const e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){const t=this.parsePipe();if(e.push(t),this.consumeOptionalCharacter(59))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else this.index<this.tokens.length&&this.error(`Unexpected token '${this.next}'`)}return 0==e.length?new ws(this.span(t),this.sourceSpan(t)):1==e.length?e[0]:new Is(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{const t=this.inputIndex,n=this.expectIdentifierOrKeyword(),s=this.sourceSpan(t),r=[];for(;this.consumeOptionalCharacter(58);)r.push(this.parseExpression());const{start:i}=e.span;e=new Os(this.span(i),this.sourceSpan(i),e,n,r,s)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){const e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){const n=this.parsePipe();let s;if(this.consumeOptionalCharacter(58))s=this.parsePipe();else{const t=this.input.substring(e,this.inputIndex);this.error(`Conditional expression ${t} requires all 3 expressions`),s=new ws(this.span(e),this.sourceSpan(e))}return new Ns(this.span(e),this.sourceSpan(e),t,n,s)}return t}parseLogicalOr(){let e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){const t=this.parseLogicalAnd(),{start:n}=e.span;e=new $s(this.span(n),this.sourceSpan(n),"||",e,t)}return e}parseLogicalAnd(){let e=this.parseEquality();for(;this.consumeOptionalOperator("&&");){const t=this.parseEquality(),{start:n}=e.span;e=new $s(this.span(n),this.sourceSpan(n),"&&",e,t)}return e}parseEquality(){let e=this.parseRelational();for(;this.next.type==Mi.Operator;){const t=this.next.strValue;switch(t){case"==":case"===":case"!=":case"!==":this.advance();const n=this.parseRelational(),{start:s}=e.span;e=new $s(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseRelational(){let e=this.parseAdditive();for(;this.next.type==Mi.Operator;){const t=this.next.strValue;switch(t){case"<":case">":case"<=":case">=":this.advance();const n=this.parseAdditive(),{start:s}=e.span;e=new $s(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseAdditive(){let e=this.parseMultiplicative();for(;this.next.type==Mi.Operator;){const t=this.next.strValue;switch(t){case"+":case"-":this.advance();let n=this.parseMultiplicative();const{start:s}=e.span;e=new $s(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseMultiplicative(){let e=this.parsePrefix();for(;this.next.type==Mi.Operator;){const t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();const{start:s}=e.span;e=new $s(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parsePrefix(){if(this.next.type==Mi.Operator){const e=this.inputIndex;let t;switch(this.next.strValue){case"+":return this.advance(),t=this.parsePrefix(),Vs.createPlus(this.span(e),this.sourceSpan(e),t);case"-":return this.advance(),t=this.parsePrefix(),Vs.createMinus(this.span(e),this.sourceSpan(e),t);case"!":return this.advance(),t=this.parsePrefix(),new Us(this.span(e),this.sourceSpan(e),t)}}return this.parseCallChain()}parseCallChain(){let e=this.parsePrimary();const t=e.span.start;for(;;)if(this.consumeOptionalCharacter(46))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.consumeOptionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.consumeOptionalCharacter(91))this.withContext(ra.Writable,()=>{this.rbracketsExpected++;const n=this.parsePipe();if(n instanceof ws&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("=")){const s=this.parseConditional();e=new Ls(this.span(t),this.sourceSpan(t),e,n,s)}else e=new Ms(this.span(t),this.sourceSpan(t),e,n)});else if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const n=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),e=new Ws(this.span(t),this.sourceSpan(t),e,n)}else{if(!this.consumeOptionalOperator("!"))return e;e=new js(this.span(t),this.sourceSpan(t),e)}}parsePrimary(){const e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const e=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),e}if(this.next.isKeywordNull())return this.advance(),new Rs(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new Rs(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new Rs(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new Rs(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new Ts(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;const t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new Fs(this.span(e),this.sourceSpan(e),t)}if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new bs(this.span(e),this.sourceSpan(e)),!1);if(this.next.isNumber()){const t=this.next.toNumber();return this.advance(),new Rs(this.span(e),this.sourceSpan(e),t)}if(this.next.isString()){const t=this.next.toString();return this.advance(),new Rs(this.span(e),this.sourceSpan(e),t)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new ws(this.span(e),this.sourceSpan(e))):(this.error("Unexpected token "+this.next),new ws(this.span(e),this.sourceSpan(e)))}parseExpressionList(e){const t=[];if(!this.next.isCharacter(e))do{t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){const e=[],t=[],n=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{const n=this.next.isString(),s=this.expectIdentifierOrKeywordOrString();e.push({key:s,quoted:n}),this.expectCharacter(58),t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new Bs(this.span(n),this.sourceSpan(n),e,t)}parseAccessMemberOrMethodCall(e,t=!1){const n=e.span.start,s=this.inputIndex,r=this.expectIdentifierOrKeyword(),i=this.sourceSpan(s);if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const s=this.parseCallArguments();this.expectCharacter(41),this.rparensExpected--;const a=this.span(n),o=this.sourceSpan(n);return t?new Hs(a,o,i,e,r,s):new qs(a,o,i,e,r,s)}if(t)return this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new ws(this.span(n),this.sourceSpan(n))):new ks(this.span(n),this.sourceSpan(n),i,e,r);if(this.consumeOptionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new ws(this.span(n),this.sourceSpan(n));const t=this.parseConditional();return new Ps(this.span(n),this.sourceSpan(n),i,e,r,t)}return new As(this.span(n),this.sourceSpan(n),i,e,r)}parseCallArguments(){if(this.next.isCharacter(41))return[];const e=[];do{e.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1;const n=this.currentAbsoluteOffset;do{e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-")}while(t);return{source:e,span:new zs(n,n+e.length)}}parseTemplateBindings(e){const t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){const n=this.parseLetBinding();if(n)t.push(n);else{const n=this.expectTemplateBindingKey(),s=this.parseAsBinding(n);s?t.push(s):(n.source=e.source+n.source[0].toUpperCase()+n.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(n)))}this.consumeStatementTerminator()}return new Zi(t,[],this.errors)}parseDirectiveKeywordBindings(e){const t=[];this.consumeOptionalCharacter(58);const n=this.getDirectiveBoundTarget();let s=this.currentAbsoluteOffset;const r=this.parseAsBinding(e);r||(this.consumeStatementTerminator(),s=this.currentAbsoluteOffset);const i=new zs(e.span.start,s);return t.push(new Gs(i,e,n)),r&&t.push(r),t}getDirectiveBoundTarget(){if(this.next===zi||this.peekKeywordAs()||this.peekKeywordLet())return null;const e=this.parsePipe(),{start:t,end:n}=e.span,s=this.input.substring(t,n);return new Ks(e,s,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();const t=this.expectTemplateBindingKey();this.consumeStatementTerminator();const n=new zs(e.span.start,this.currentAbsoluteOffset);return new Xs(n,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;const e=this.currentAbsoluteOffset;this.advance();const t=this.expectTemplateBindingKey();let n=null;this.consumeOptionalOperator("=")&&(n=this.expectTemplateBindingKey()),this.consumeStatementTerminator();const s=new zs(e,this.currentAbsoluteOffset);return new Xs(s,t,n)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new Ss(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return null==e&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(59)&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93))&&!(this.context&ra.Writable&&e.isOperator("="));)this.next.isError()&&this.errors.push(new Ss(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}}class aa{constructor(){this.errors=[]}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){}visitLiteralPrimitive(e,t){}visitPropertyRead(e,t){}visitPropertyWrite(e,t){}visitSafePropertyRead(e,t){}visitMethodCall(e,t){}visitSafeMethodCall(e,t){}visitFunctionCall(e,t){}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitUnary(e,t){}visitBinary(e,t){}visitPrefixNot(e,t){}visitNonNullAssert(e,t){}visitConditional(e,t){}visitPipe(e,t){this.errors.push("pipes")}visitKeyedRead(e,t){}visitKeyedWrite(e,t){}visitAll(e,t){return e.map(e=>e.visit(this,t))}visitChain(e,t){}visitQuote(e,t){}}class oa extends Qs{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}let la;function ca(){return la||(la={},ua(N.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),ua(N.STYLE,["*|style"]),ua(N.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","img|srcset","input|src","ins|cite","q|cite","source|src","source|srcset","track|src","video|poster","video|src"]),ua(N.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),la}function ua(e,t){for(const n of t)la[n.toLowerCase()]=e}const pa=["[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume",":svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type","select^[HTMLElement]|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","shadow^[HTMLElement]|","slot^[HTMLElement]|name","source^[HTMLElement]|media,sizes,src,srcset,type","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|#height,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],ha={class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"};class da extends class{}{constructor(){super(),this._schema={},pa.forEach(e=>{const t={},[n,s]=e.split("|"),r=s.split(","),[i,a]=n.split("^");i.split(",").forEach(e=>this._schema[e.toLowerCase()]=t);const o=a&&this._schema[a.toLowerCase()];o&&Object.keys(o).forEach(e=>{t[e]=o[e]}),r.forEach(e=>{if(e.length>0)switch(e[0]){case"*":break;case"!":t[e.substring(1)]="boolean";break;case"#":t[e.substring(1)]="number";break;case"%":t[e.substring(1)]="object";break;default:t[e]="string"}})})}hasProperty(e,t,n){if(n.some(e=>"no-errors-schema"===e.name))return!0;if(e.indexOf("-")>-1){if(h(e)||d(e))return!1;if(n.some(e=>"custom-elements"===e.name))return!0}return!!(this._schema[e.toLowerCase()]||this._schema.unknown)[t]}hasElement(e,t){if(t.some(e=>"no-errors-schema"===e.name))return!0;if(e.indexOf("-")>-1){if(h(e)||d(e))return!0;if(t.some(e=>"custom-elements"===e.name))return!0}return!!this._schema[e.toLowerCase()]}securityContext(e,t,n){n&&(t=this.getMappedPropName(t)),e=e.toLowerCase(),t=t.toLowerCase();let s=ca()[e+"|"+t];return s||(s=ca()["*|"+t],s||N.NONE)}getMappedPropName(e){return ha[e]||e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...\nIf '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Object.keys(this._schema)}normalizeAnimationStyleProperty(e){return e.replace(Xe,(...e)=>e[1].toUpperCase())}normalizeAnimationStyleValue(e,t,n){let s="";const r=n.toString().trim();let i=null;if(function(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}(e)&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&(i=`Please provide a CSS unit value for ${t}:${n}`)}return{error:i,value:r+s}}}const ma=/^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/;class ga{constructor(e){this.bindingParser=e,this.errors=[],this.styles=[],this.styleUrls=[],this.ngContentSelectors=[],this.inI18nBlock=!1}visitElement(e){const t=cn(e.i18n);t&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",e.sourceSpan),this.inI18nBlock=!0);const n=Pi(e);if(n.type===ki.SCRIPT)return null;if(n.type===ki.STYLE){const t=1===(s=e).children.length&&s.children[0]instanceof jr?s.children[0].value:null;return null!==t&&this.styles.push(t),null}if(n.type===ki.STYLESHEET&&function(e){if(null==e||0===e.length||"/"==e[0])return!1;const t=e.match(wi);return null===t||"package"==t[1]||"asset"==t[1]}(n.hrefAttr))return this.styleUrls.push(n.hrefAttr),null;var s;const r="ng-template"===p(e.name)[1],i=[],a=[],o=[],l=[],c=[],u={},h=[],d=[];let m=!1;for(const t of e.attrs){let e=!1;const n=fa(t.name);let s=!1;if(t.i18n&&(u[t.name]=t.i18n),n.startsWith("*")){m&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",t.sourceSpan),s=!0,m=!0;const e=t.value,r=n.substring("*".length),i=[];this.bindingParser.parseInlineTemplateBinding(r,e,t.sourceSpan,t.valueSpan?t.valueSpan.start.offset:t.sourceSpan.start.offset+t.name.length,[],h,i,!0),d.push(...i.map(e=>new kt(e.name,e.value,e.sourceSpan,e.keySpan,e.valueSpan)))}else e=this.parseAttribute(r,t,[],i,a,o,l);e||s||c.push(this.visitAttribute(t))}const g=Xr(n.nonBindable?va:this,e.children);let v;if(n.type===ki.NG_CONTENT){e.children&&!e.children.every(e=>function(e){return e instanceof jr&&0==e.value.trim().length}(e)||function(e){return e instanceof Kr}(e))&&this.reportError("<ng-content> element cannot have content.",e.sourceSpan);const t=n.selectAttr,s=e.attrs.map(e=>this.visitAttribute(e));v=new Pt(t,s,e.sourceSpan,e.i18n),this.ngContentSelectors.push(t)}else if(r){const t=this.extractAttributes(e.name,i,u);v=new At(e.name,c,t.bound,a,[],g,l,o,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}else{const t=this.extractAttributes(e.name,i,u);v=new Nt(e.name,c,t.bound,a,g,l,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}if(m){const n=this.extractAttributes("ng-template",h,u),s=[];n.literal.forEach(e=>s.push(e)),n.bound.forEach(e=>s.push(e));const i=v instanceof Nt?{attributes:v.attributes,inputs:v.inputs,outputs:v.outputs}:{attributes:[],inputs:[],outputs:[]};v=new At(v.name,i.attributes,i.inputs,i.outputs,s,[v],[],d,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,r&&t?void 0:e.i18n)}return t&&(this.inI18nBlock=!1),v}visitAttribute(e){return new bt(e.name,e.value,e.sourceSpan,e.valueSpan,e.i18n)}visitText(e){return this._visitTextWithInterpolation(e.value,e.sourceSpan,e.i18n)}visitExpansion(e){if(!e.i18n)return null;if(!cn(e.i18n))throw new Error(`Invalid type "${e.i18n.constructor}" for "i18n" property of ${e.sourceSpan.toString()}. Expected a "Message"`);const t=e.i18n,n={},s={};return Object.keys(t.placeholders).forEach(e=>{const r=t.placeholders[e];if(e.startsWith("VAR_")){const t=e.trim(),s=this.bindingParser.parseInterpolationExpression(r.text,r.sourceSpan);n[t]=new wt(s,r.sourceSpan)}else s[e]=this._visitTextWithInterpolation(r.text,r.sourceSpan)}),new Lt(n,s,e.sourceSpan,t)}visitExpansionCase(e){return null}visitComment(e){return null}extractAttributes(e,t,n){const s=[],r=[];return t.forEach(t=>{const i=n[t.name];if(t.isLiteral)r.push(new bt(t.name,t.expression.source||"",t.sourceSpan,void 0,i));else{const n=this.bindingParser.createBoundElementProperty(e,t,!0,!1);s.push(Tt.fromBoundElementProperty(n,i))}}),{bound:s,literal:r}}parseAttribute(e,t,n,s,r,i,a){const o=fa(t.name),l=t.value,c=t.sourceSpan,u=t.valueSpan?t.valueSpan.start.offset:c.start.offset;function p(e,n,s){const r=e.start.moveBy(n.length+(t.name.length-o.length)),i=r.moveBy(s.length);return new cs(r,i,r,s)}const h=o.match(ma);let d=!1;if(h){if(d=!0,null!=h[1]){const e=h[7],r=p(c,h[1],e);this.bindingParser.parsePropertyBinding(e,l,!1,c,u,t.valueSpan,n,s,r)}else if(h[2])if(e){const e=h[7],n=p(c,h[2],e);this.parseVariable(e,l,c,n,t.valueSpan,i)}else this.reportError('"let-" is only supported on ng-template elements.',c);else if(h[3])this.parseReference(h[7],l,c,t.valueSpan,a);else if(h[4]){const e=[];this.bindingParser.parseEvent(h[7],l,c,t.valueSpan||c,n,e),ya(e,r)}else if(h[5]){const e=h[7],i=p(c,h[5],e);this.bindingParser.parsePropertyBinding(e,l,!1,c,u,t.valueSpan,n,s,i),this.parseAssignmentEvent(e,l,c,t.valueSpan,n,r)}else if(h[6]){const e=p(c,"",o);this.bindingParser.parseLiteralAttr(o,l,c,u,t.valueSpan,n,s,e)}else if(h[8]){const e=p(c,"[(",h[8]);this.bindingParser.parsePropertyBinding(h[8],l,!1,c,u,t.valueSpan,n,s,e),this.parseAssignmentEvent(h[8],l,c,t.valueSpan,n,r)}else if(h[9]){const e=p(c,"[",h[9]);this.bindingParser.parsePropertyBinding(h[9],l,!1,c,u,t.valueSpan,n,s,e)}else if(h[10]){const e=[];this.bindingParser.parseEvent(h[10],l,c,t.valueSpan||c,n,e),ya(e,r)}}else{const e=p(c,"",o);d=this.bindingParser.parsePropertyInterpolation(o,l,c,t.valueSpan,n,s,e)}return d}_visitTextWithInterpolation(e,t,n){const s=Ei(e),r=this.bindingParser.parseInterpolation(s,t);return r?new wt(r,t,n):new Ct(s,t)}parseVariable(e,t,n,s,r,i){e.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',n):0===e.length&&this.reportError("Variable does not have a name",n),i.push(new kt(e,t,n,s,r))}parseReference(e,t,n,s,r){e.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',n):0===e.length&&this.reportError("Reference does not have a name",n),r.push(new Mt(e,t,n,s))}parseAssignmentEvent(e,t,n,s,r,i){const a=[];this.bindingParser.parseEvent(e+"Change",t+"=$event",n,s||n,r,a),ya(a,i)}reportError(e,t,n=us.ERROR){this.errors.push(new ms(t,e,n))}}const va=new class{visitElement(e){const t=Pi(e);if(t.type===ki.SCRIPT||t.type===ki.STYLE||t.type===ki.STYLESHEET)return null;const n=Xr(this,e.children,null);return new Nt(e.name,Xr(this,e.attrs),[],[],n,[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan)}visitComment(e){return null}visitAttribute(e){return new bt(e.name,e.value,e.sourceSpan,void 0,e.i18n)}visitText(e){return new Ct(e.value,e.sourceSpan)}visitExpansion(e){return null}visitExpansionCase(e){return null}};function fa(e){return/^data-/i.test(e)?e.substring(5):e}function ya(e,t){t.push(...e.map(e=>It.fromParsedEvent(e)))}var Sa;!function(e){e[e.ELEMENT=0]="ELEMENT",e[e.TEMPLATE=1]="TEMPLATE"}(Sa||(Sa={}));class xa{constructor(e,t,n=0,s=null,r,i){this.index=e,this.ref=t,this.level=n,this.templateIndex=s,this.meta=r,this.registry=i,this.bindings=new Set,this.placeholders=new Map,this.isEmitted=!1,this._unresolvedCtxCount=0,this._registry=i||{getUniqueId:mn(),icus:new Map},this.id=this._registry.getUniqueId()}appendTag(e,t,n,s){t.isVoid&&s||vn(this.placeholders,t.isVoid||!s?t.startName:t.closeName,{type:e,index:n,ctx:this.id,isVoid:t.isVoid,closed:s})}get icus(){return this._registry.icus}get isRoot(){return 0===this.level}get isResolved(){return 0===this._unresolvedCtxCount}getSerializedPlaceholders(){const e=new Map;return this.placeholders.forEach((t,n)=>e.set(n,t.map(wa))),e}appendBinding(e){this.bindings.add(e)}appendIcu(e,t){vn(this._registry.icus,e,t)}appendBoundText(e){fn(e,this.bindings.size,this.id).forEach((e,t)=>vn(this.placeholders,t,...e))}appendTemplate(e,t){this.appendTag(Sa.TEMPLATE,e,t,!1),this.appendTag(Sa.TEMPLATE,e,t,!0),this._unresolvedCtxCount++}appendElement(e,t,n){this.appendTag(Sa.ELEMENT,e,t,n)}appendProjection(e,t){this.appendTag(Sa.ELEMENT,e,t,!1),this.appendTag(Sa.ELEMENT,e,t,!0)}forkChildContext(e,t,n){return new xa(e,this.ref,this.level+1,t,n,this._registry)}reconcileChildContext(e){["start","close"].forEach(t=>{const n=(this.placeholders.get(e.meta[t+"Name"])||[]).find(Ca(this.id,e.templateIndex));n&&(n.ctx=e.id)}),e.placeholders.forEach((t,n)=>{const s=this.placeholders.get(n);if(!s)return void this.placeholders.set(n,t);const r=s.findIndex(Ca(e.id,e.templateIndex));if(r>=0){const e=n.startsWith("CLOSE");n.endsWith("NG-TEMPLATE")?s.splice(r+(e?0:1),0,...t):(t[e?t.length-1:0].tmpl=s[r],s.splice(r,1,...t))}else s.push(...t);this.placeholders.set(n,s)}),this._unresolvedCtxCount--}}function Ea(e,t,n,s){return dn(`${s?"/":""}${e}${t}`,n)}function _a(e,{index:t,ctx:n,isVoid:s},r){return s?Ea(e,t,n)+Ea(e,t,n,!0):Ea(e,t,n,r)}function Ca(e,t){return n=>"object"==typeof n&&n.type===Sa.TEMPLATE&&n.index===t&&n.ctx===e}function wa(e){const t=(e,t)=>_a("#",e,t),n=(e,t)=>_a("*",e,t);switch(e.type){case Sa.ELEMENT:return e.closed?t(e,!0)+(e.tmpl?n(e.tmpl,!0):""):e.tmpl?n(e.tmpl)+t(e)+(e.isVoid?n(e.tmpl,!0):""):t(e);case Sa.TEMPLATE:return n(e,e.closed);default:return e}}const ba=new class{visitText(e){return e.value}visitContainer(e){return e.children.map(e=>e.visit(this)).join("")}visitIcu(e){const t=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.expressionPlaceholder}, ${e.type}, ${t.join(" ")}}`}visitTagPlaceholder(e){return e.isVoid?this.formatPh(e.startName):`${this.formatPh(e.startName)}${e.children.map(e=>e.visit(this)).join("")}${this.formatPh(e.closeName)}`}visitPlaceholder(e){return this.formatPh(e.name)}visitIcuPlaceholder(e,t){return this.formatPh(e.name)}formatPh(e){return`{${Sn(e,!1)}}`}};function Ta(e){return e.visit(ba)}const Ia={A:"LINK",B:"BOLD_TEXT",BR:"LINE_BREAK",EM:"EMPHASISED_TEXT",H1:"HEADING_LEVEL1",H2:"HEADING_LEVEL2",H3:"HEADING_LEVEL3",H4:"HEADING_LEVEL4",H5:"HEADING_LEVEL5",H6:"HEADING_LEVEL6",HR:"HORIZONTAL_RULE",I:"ITALIC_TEXT",LI:"LIST_ITEM",LINK:"MEDIA_LINK",OL:"ORDERED_LIST",P:"PARAGRAPH",Q:"QUOTATION",S:"STRIKETHROUGH_TEXT",SMALL:"SMALL_TEXT",SUB:"SUBSTRIPT",SUP:"SUPERSCRIPT",TBODY:"TABLE_BODY",TD:"TABLE_CELL",TFOOT:"TABLE_FOOTER",TH:"TABLE_HEADER_CELL",THEAD:"TABLE_HEADER",TR:"TABLE_ROW",TT:"MONOSPACED_TEXT",U:"UNDERLINED_TEXT",UL:"UNORDERED_LIST"};class Na{constructor(){this._placeHolderNameCounts={},this._signatureToName={}}getStartTagPlaceholderName(e,t,n){const s=this._hashTag(e,t,n);if(this._signatureToName[s])return this._signatureToName[s];const r=e.toUpperCase(),i=Ia[r]||"TAG_"+r,a=this._generateUniqueName(n?i:"START_"+i);return this._signatureToName[s]=a,a}getCloseTagPlaceholderName(e){const t=this._hashClosingTag(e);if(this._signatureToName[t])return this._signatureToName[t];const n=e.toUpperCase(),s=this._generateUniqueName("CLOSE_"+(Ia[n]||"TAG_"+n));return this._signatureToName[t]=s,s}getPlaceholderName(e,t){const n=e.toUpperCase(),s=`PH: ${n}=${t}`;if(this._signatureToName[s])return this._signatureToName[s];const r=this._generateUniqueName(n);return this._signatureToName[s]=r,r}getUniquePlaceholder(e){return this._generateUniqueName(e.toUpperCase())}_hashTag(e,t,n){return"<"+e+Object.keys(t).sort().map(e=>` ${e}=${t[e]}`).join("")+(n?"/>":`></${e}>`)}_hashClosingTag(e){return this._hashTag("/"+e,{},!1)}_generateUniqueName(e){if(!this._placeHolderNameCounts.hasOwnProperty(e))return this._placeHolderNameCounts[e]=1,e;const t=this._placeHolderNameCounts[e];return this._placeHolderNameCounts[e]=t+1,`${e}_${t}`}}const Aa=new na(new ji);function Pa(e,t){return t}class ka{constructor(e,t){this._expressionParser=e,this._interpolationConfig=t}toI18nMessage(e,t="",n="",s="",r){const i={isIcu:1==e.length&&e[0]instanceof qr,icuDepth:0,placeholderRegistry:new Na,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:r||Pa},a=Xr(this,e,i);return new Rt(a,i.placeholderToContent,i.placeholderToMessage,t,n,s)}visitElement(e,t){var n;const s=Xr(this,e.children,t),r={};e.attrs.forEach(e=>{r[e.name]=e.value});const i=x(e.name).isVoid,a=t.placeholderRegistry.getStartTagPlaceholderName(e.name,r,i);t.placeholderToContent[a]={text:e.startSourceSpan.toString(),sourceSpan:e.startSourceSpan};let o="";i||(o=t.placeholderRegistry.getCloseTagPlaceholderName(e.name),t.placeholderToContent[o]={text:`</${e.name}>`,sourceSpan:null!==(n=e.endSourceSpan)&&void 0!==n?n:e.sourceSpan});const l=new $t(e.name,r,a,o,s,i,e.sourceSpan,e.startSourceSpan,e.endSourceSpan);return t.visitNodeFn(e,l)}visitAttribute(e,t){const n=this._visitTextWithInterpolation(e.value,e.sourceSpan,t);return t.visitNodeFn(e,n)}visitText(e,t){const n=this._visitTextWithInterpolation(e.value,e.sourceSpan,t);return t.visitNodeFn(e,n)}visitComment(e,t){return null}visitExpansion(e,t){t.icuDepth++;const n={},s=new Dt(e.switchValue,e.type,n,e.sourceSpan);if(e.cases.forEach(e=>{n[e.value]=new Bt(e.expression.map(e=>e.visit(this,t)),e.expSourceSpan)}),t.icuDepth--,t.isIcu||t.icuDepth>0){const n=t.placeholderRegistry.getUniquePlaceholder("VAR_"+e.type);return s.expressionPlaceholder=n,t.placeholderToContent[n]={text:e.switchValue,sourceSpan:e.switchValueSourceSpan},t.visitNodeFn(e,s)}const r=t.placeholderRegistry.getPlaceholderName("ICU",e.sourceSpan.toString());t.placeholderToMessage[r]=this.toI18nMessage([e],"","","",void 0);const i=new Ut(s,r,e.sourceSpan);return t.visitNodeFn(e,i)}visitExpansionCase(e,t){throw new Error("Unreachable code")}_visitTextWithInterpolation(e,t,n){const s=this._expressionParser.splitInterpolation(e,t.start.toString(),this._interpolationConfig);if(!s)return new Ft(e,t);const r=[],i=new Bt(r,t),{start:a,end:o}=this._interpolationConfig;for(let e=0;e<s.strings.length-1;e++){const i=s.expressions[e],l=i.split(La)[2]||"INTERPOLATION",c=n.placeholderRegistry.getPlaceholderName(l,i);if(s.strings[e].length){const n=Ma(t,s.stringSpans[e]);r.push(new Ft(s.strings[e],n))}const u=Ma(t,s.expressionsSpans[e]);r.push(new Vt(i,c,u)),n.placeholderToContent[c]={text:a+i+o,sourceSpan:u}}const l=s.strings.length-1;if(s.strings[l].length){const e=Ma(t,s.stringSpans[l]);r.push(new Ft(s.strings[l],e))}return i}}function Ma(e,{start:t,end:n}){return new cs(e.fullStart.moveBy(t),e.fullStart.moveBy(n))}const La=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g,Oa=(e,t)=>(e instanceof Ur&&(t instanceof Ut&&e.i18n instanceof Rt&&(t.previousMessage=e.i18n),e.i18n=t),t);class Ra{constructor(e=jn,t=!1,n=!1){this.interpolationConfig=e,this.keepI18nAttrs=t,this.enableI18nLegacyMessageIdFormat=n,this.hasI18nMeta=!1,this._createI18nMessage=function(e){const t=new ka(Aa,e);return(e,n,s,r,i)=>t.toI18nMessage(e,n,s,r,i)}(this.interpolationConfig)}_generateI18nMessage(e,t="",n){const{meaning:s,description:r,customId:i}=this._parseMetadata(t),a=this._createI18nMessage(e,s,r,i,n);return this._setMessageId(a,t),this._setLegacyIds(a,t),a}visitElement(e){if(function(e){return e.attrs.some(e=>ln(e.name))}(e)){this.hasI18nMeta=!0;const t=[],n={};for(const s of e.attrs)if("i18n"===s.name){const t=this._generateI18nMessage(e.children,e.i18n||s.value,Oa);t.nodes.length&&(e.i18n=t)}else s.name.startsWith("i18n-")?n[s.name.slice("i18n-".length)]=s.value:t.push(s);if(Object.keys(n).length)for(const e of t){const t=n[e.name];void 0!==t&&e.value&&(e.i18n=this._generateI18nMessage([e],e.i18n||t))}this.keepI18nAttrs||(e.attrs=t)}return Xr(this,e.children,e.i18n),e}visitExpansion(e,t){let n;const s=e.i18n;if(this.hasI18nMeta=!0,s instanceof Ut){const t=s.name;n=this._generateI18nMessage([e],s),hn(n).name=t}else n=this._generateI18nMessage([e],t||s);return e.i18n=n,e}visitText(e){return e}visitAttribute(e){return e}visitComment(e){return e}visitExpansionCase(e){return e}_parseMetadata(e){return"string"==typeof e?function(e=""){let t,n,s;if(e=e.trim()){const r=e.indexOf("@@"),i=e.indexOf("|");let a;[a,t]=r>-1?[e.slice(0,r),e.slice(r+2)]:[e,""],[n,s]=i>-1?[a.slice(0,i),a.slice(i+1)]:["",a]}return{customId:t,meaning:n,description:s}}(e):e instanceof Rt?e:{}}_setMessageId(e,t){e.id||(e.id=t instanceof Rt&&t.id||function(e){return e.id||qt(e)}(e))}_setLegacyIds(e,t){if(this.enableI18nLegacyMessageIdFormat)e.legacyIds=[jt(e),qt(e)];else if("string"!=typeof t){const n=t instanceof Rt?t:t instanceof Ut?t.previousMessage:void 0;e.legacyIds=n?n.legacyIds:[]}}}function Fa(e,t,n,s){const r=[We(function(e){return e.nodes.map(e=>e.visit(Ba,null)).join("")}(t))];Object.keys(s).length&&r.push(vs(s,!0));const i=n.set(Be("goog.getMsg").callFn(r)).toConstDecl(),a=function(e){const t=[];return e.description&&t.push({tagName:"desc",text:e.description}),e.meaning&&t.push({tagName:"meaning",text:e.meaning}),0==t.length?null:function(e=[]){return new Pe(e)}(t)}(t);return null!==a&&i.addLeadingComment(a),[i,new Oe(e.set(n))]}const Ba=new class{formatPh(e){return`{$${Sn(e)}}`}visitText(e){return e.value}visitContainer(e){return e.children.map(e=>e.visit(this)).join("")}visitIcu(e){return Ta(e)}visitTagPlaceholder(e){return e.isVoid?this.formatPh(e.startName):`${this.formatPh(e.startName)}${e.children.map(e=>e.visit(this)).join("")}${this.formatPh(e.closeName)}`}visitPlaceholder(e){return this.formatPh(e.name)}visitIcuPlaceholder(e,t){return this.formatPh(e.name)}};function Da(e,t,n){const{messageParts:s,placeHolders:r}=function(e){const t=[];return e.nodes.forEach(e=>e.visit($a,t)),function(e){const t=[],n=[];e[0]instanceof oe&&t.push(Va(e[0].sourceSpan.start));for(let s=0;s<e.length;s++){const r=e[s];r instanceof ae?t.push(r):(n.push(r),e[s-1]instanceof oe&&t.push(Va(e[s-1].sourceSpan.end)))}return e[e.length-1]instanceof oe&&t.push(Va(e[e.length-1].sourceSpan.end)),{messageParts:t,placeHolders:n}}(t)}(t),i=function(e){const t=e.nodes[0];return new cs(t.sourceSpan.start,e.nodes[e.nodes.length-1].sourceSpan.end,t.sourceSpan.fullStart,t.sourceSpan.details)}(t),a=r.map(e=>n[e.text]),o=function(e,t,n,s,r){return new le(e,t,n,s,r)}(t,s,r,a,i),l=e.set(o);return[new Oe(l)]}const $a=new class{visitText(e,t){t[t.length-1]instanceof ae?t[t.length-1].text+=e.value:t.push(new ae(e.value,e.sourceSpan))}visitContainer(e,t){e.children.forEach(e=>e.visit(this,t))}visitIcu(e,t){t.push(new ae(Ta(e),e.sourceSpan))}visitTagPlaceholder(e,t){var n,s;t.push(this.createPlaceholderPiece(e.startName,null!==(n=e.startSourceSpan)&&void 0!==n?n:e.sourceSpan)),e.isVoid||(e.children.forEach(e=>e.visit(this,t)),t.push(this.createPlaceholderPiece(e.closeName,null!==(s=e.endSourceSpan)&&void 0!==s?s:e.sourceSpan)))}visitPlaceholder(e,t){t.push(this.createPlaceholderPiece(e.name,e.sourceSpan))}visitIcuPlaceholder(e,t){t.push(this.createPlaceholderPiece(e.name,e.sourceSpan))}createPlaceholderPiece(e,t){return new oe(Sn(e,!1),t)}};function Va(e){return new ae("",new cs(e,e))}const Ua=new Set(["$event"]),ja=new Map([["window",yt.resolveWindow],["document",yt.resolveDocument],["body",yt.resolveBody]]),qa=[" ","\n","\r","\t"];function Ha(e,t){return He(Be("rf").bitwiseAnd(We(e),null,!1),t)}function Wa(e,t=null,n=null){const{type:s,name:r,target:i,phase:a,handler:o}=e;if(i&&!ja.has(i))throw new Error(`Unexpected global target '${i}' defined for '${r}' event.\n Supported list of global targets: ${Array.from(ja.keys())}.`);const l=new Set,c=null===n||0===n.bindingLevel?Be("ctx"):n.getOrCreateSharedContextVar(0),u=function(e,t,n,s,r,i,a,o){e||(e=new hr(Ua));const l=function(e,t){const n=new ur(e);return t.visit(n)}({createLiteralArrayConverter:e=>e=>Ue(e),createLiteralMapConverter:e=>t=>je(e.map((e,n)=>({key:e.key,value:t[n],quoted:e.quoted}))),createPipeConverter:e=>{throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: "+e)}},n),c=new pr(e,t,"b",()=>Ye("Unexpected interpolation"),i,a),u=[];!function e(t,n){Array.isArray(t)?t.forEach(t=>e(t,n)):n.push(t)}(l.visit(c,ds.Statement),u),function(e,t,n){for(let t=e-1;t>=0;t--)n.unshift(or("b",t))}(c.temporaryCount,0,u),c.usesImplicitReceiver&&e.notifyImplicitReceiverUse();const p=u.length-1;let h=null;if(p>=0){const e=(d=u[p])instanceof Oe?d.expr:d instanceof Re?d.value:null;e&&(h=Be("pd_b"),u[p]=h.set(e.cast(B).notIdentical(We(!1))).toDeclStmt(null,[Ae.Final]))}var d;return new nr(u,h)}(n,c,o,0,0,e.handlerSpan,l),p=[];n&&(p.push(...n.restoreViewStatement()),p.push(...n.variableDeclarations())),p.push(...u.render3Stmts);const h=1===s?function(e,t){return`@${e}.${t}`}(r,a):r,d=t&&mt(t),m=[];l.has("$event")&&m.push(new ye("$event",B));const g=qe(m,p,D,null,d),v=[We(h),g];return i&&v.push(We(!1),De(ja.get(i))),v}class za{constructor(e,t,n=0,s,r,i,a,o,l,c,u,p,h,d,m={prepareStatements:[],constExpressions:[]}){this.constantPool=e,this.level=n,this.contextName=s,this.i18nContext=r,this.templateIndex=i,this.templateName=a,this.directiveMatcher=o,this.directives=l,this.pipeTypeByName=c,this.pipes=u,this._namespace=p,this.i18nUseExternalIds=d,this._constants=m,this._dataIndex=0,this._bindingContext=0,this._prefixCode=[],this._creationCodeFns=[],this._updateCodeFns=[],this._currentIndex=0,this._tempVariables=[],this._nestedTemplateFns=[],this._unsupported=wn,this.i18n=null,this._pureFunctionSlots=0,this._bindingSlots=0,this._ngContentReservedSlots=[],this._ngContentSelectorsOffset=0,this._implicitReceiverExpr=null,this.visitReference=bn,this.visitVariable=bn,this.visitTextAttribute=bn,this.visitBoundAttribute=bn,this.visitBoundEvent=bn,this._bindingScope=t.nestedScope(n),this.fileBasedI18nSuffix=h.replace(/[^A-Za-z0-9]/g,"_")+"_",this._valueConverter=new Ka(e,()=>this.allocateDataSlot(),e=>this.allocatePureFunctionSlots(e),(e,t,n,s)=>{const r=c.get(e);r&&this.pipes.add(r),this._bindingScope.set(this.level,t,s),this.creationInstruction(null,yt.pipe,[We(n),We(e)])})}buildTemplateFunction(e,t,n=0,s){this._ngContentSelectorsOffset=n,this._namespace!==yt.namespaceHTML&&this.creationInstruction(null,this._namespace),t.forEach(e=>this.registerContextVariables(e));const r=this.i18nContext||cn(s)&&!un(s)&&!(1===(i=e).length&&i[0]instanceof Nt&&e[0].i18n===s);var i;const a=oo(e);if(r&&this.i18nStart(null,s,a),Ot(this,e),this._pureFunctionSlots+=this._bindingSlots,this._valueConverter.updatePipeSlotOffsets(this._bindingSlots),this._nestedTemplateFns.forEach(e=>e()),0===this.level&&this._ngContentReservedSlots.length){const e=[];if(this._ngContentReservedSlots.length>1||"*"!==this._ngContentReservedSlots[0]){const t=this._ngContentReservedSlots.map(e=>"*"!==e?L(e):e);e.push(this.constantPool.getConstLiteral(Tn(t),!0))}this.creationInstruction(null,yt.projectionDef,e,!0)}r&&this.i18nEnd(null,a);const o=this._creationCodeFns.map(e=>e()),l=this._updateCodeFns.map(e=>e()),c=this._bindingScope.viewSnapshotStatements(),u=this._bindingScope.variableDeclarations().concat(this._tempVariables),p=o.length>0?[Ha(1,c.concat(o))]:[],h=l.length>0?[Ha(2,u.concat(l))]:[];return qe([new ye("rf",V),new ye("ctx",null)],[...this._prefixCode,...p,...h],D,null,this.templateName)}getLocal(e){return this._bindingScope.get(e)}notifyImplicitReceiverUse(){this._bindingScope.notifyImplicitReceiverUse()}i18nTranslate(e,t={},n,s){const r=n||this.i18nGenerateMainBlockVar(),i=function(e,t,n,s={},r){const i=[En(t),He(lo(),Fa(t,e,n,yn(s,!0)),Da(t,e,yn(s,!1)))];return r&&i.push(new Oe(t.set(r(t)))),i}(e,r,this.i18nGenerateClosureVar(e.id),t,s);return this._constants.prepareStatements.push(...i),r}registerContextVariables(e){const t=this._bindingScope.freshReferenceName(),n=this.level,s=Be(e.name+t);this._bindingScope.set(n,e.name,s,1,(t,r)=>{let i;return i=t.bindingLevel===n?Be("ctx"):t.getSharedContextName(n)||Ya(r),[s.set(i.prop(e.value||"$implicit")).toConstDecl()]})}i18nAppendBindings(e){e.length>0&&e.forEach(e=>this.i18n.appendBinding(e))}i18nBindProps(e){const t={};return Object.keys(e).forEach(n=>{const s=e[n];if(s instanceof Ct)t[n]=We(s.value);else{const e=s.value.visit(this._valueConverter);if(this.allocateBindingSlots(e),e instanceof Ds){const{strings:s,expressions:r}=e,{id:i,bindings:a}=this.i18n,o=function(e,t=0,n=0){if(!e.length)return"";let s="";const r=e.length-1;for(let i=0;i<r;i++)s+=`${e[i]}${dn(t+i,n)}`;return s+=e[r],s}(s,a.size,i);this.i18nAppendBindings(r),t[n]=We(o)}}}),t}i18nGenerateMainBlockVar(){return Be(this.constantPool.uniqueName("i18n_"))}i18nGenerateClosureVar(e){let t;const n=this.fileBasedI18nSuffix.toUpperCase();if(this.i18nUseExternalIds){const s=xn("EXTERNAL_"),r=this.constantPool.uniqueName(n);t=`${s}${mt(e)}$$${r}`}else{const e=xn(n);t=this.constantPool.uniqueName(e)}return Be(t)}i18nUpdateRef(e){const{icus:t,meta:n,isRoot:s,isResolved:r,isEmitted:i}=e;if(s&&r&&!i&&!un(n)){e.isEmitted=!0;const s=e.getSerializedPlaceholders();let r,i={},a=s.size?gn(s):{};t.size&&t.forEach((e,t)=>{if(1===e.length)a[t]=e[0];else{const n=dn("I18N_EXP_"+t);a[t]=We(n),i[t]=Ue(e)}}),(Array.from(s.values()).some(e=>e.length>1)||Object.keys(i).length)&&(r=e=>{const t=[e];return Object.keys(i).length&&t.push(vs(i,!0)),Qa(null,yt.i18nPostprocess,t)}),this.i18nTranslate(n,a,e.ref,r)}}i18nStart(e=null,t,n){const s=this.allocateDataSlot();this.i18n=this.i18nContext?this.i18nContext.forkChildContext(s,this.templateIndex,t):new xa(s,this.i18nGenerateMainBlockVar(),0,this.templateIndex,t);const{id:r,ref:i}=this.i18n,a=[We(s),this.addToConsts(i)];r>0&&a.push(We(r)),this.creationInstruction(e,n?yt.i18n:yt.i18nStart,a)}i18nEnd(e=null,t){if(!this.i18n)throw new Error("i18nEnd is executed with no i18n context present");this.i18nContext?(this.i18nContext.reconcileChildContext(this.i18n),this.i18nUpdateRef(this.i18nContext)):this.i18nUpdateRef(this.i18n);const{index:n,bindings:s}=this.i18n;if(s.size){const t=[];s.forEach(n=>{t.push({sourceSpan:e,value:()=>this.convertPropertyBinding(n)})}),this.updateInstructionChainWithAdvance(this.getConstCount()-1,yt.i18nExp,t),this.updateInstruction(e,yt.i18nApply,[We(n)])}t||this.creationInstruction(e,yt.i18nEnd),this.i18n=null}i18nAttributesInstruction(e,t,n){let s=!1;const r=[],i=[];if(t.forEach(e=>{const t=e.i18n,a=e.value.visit(this._valueConverter);if(this.allocateBindingSlots(a),a instanceof Ds){const o=gn(fn(t));r.push(We(e.name),this.i18nTranslate(t,o)),a.expressions.forEach(e=>{s=!0,i.push({sourceSpan:n,value:()=>this.convertPropertyBinding(e)})})}}),i.length>0&&this.updateInstructionChainWithAdvance(e,yt.i18nExp,i),r.length>0){const e=We(this.allocateDataSlot()),t=this.addToConsts(Ue(r));this.creationInstruction(n,yt.i18nAttributes,[e,t]),s&&this.updateInstruction(n,yt.i18nApply,[e])}}getNamespaceInstruction(e){switch(e){case"math":return yt.namespaceMathML;case"svg":return yt.namespaceSVG;default:return yt.namespaceHTML}}addNamespaceInstruction(e,t){this._namespace=e,this.creationInstruction(t.startSourceSpan,e)}interpolatedUpdateInstruction(e,t,n,s,r,i){this.updateInstructionWithAdvance(t,s.sourceSpan,e,()=>[We(n),...this.getUpdateInstructionArguments(r),...i])}visitContent(e){const t=this.allocateDataSlot(),n=this._ngContentSelectorsOffset+this._ngContentReservedSlots.length,s=[We(t)];this._ngContentReservedSlots.push(e.selector);const r=e.attributes.filter(e=>"select"!==e.name.toLowerCase()),i=this.getAttributeExpressions(e.name,r,[],[]);i.length>0?s.push(We(n),Ue(i)):0!==n&&s.push(We(n)),this.creationInstruction(e.sourceSpan,yt.projection,s),this.i18n&&this.i18n.appendProjection(e.i18n,t)}visitElement(e){var t,n;const s=this.allocateDataSlot(),r=new Bi(null);let i=!1;const a=cn(e.i18n)&&!un(e.i18n),o=[],[l,c]=p(e.name),u=h(e.name);for(const t of e.attributes){const{name:e,value:n}=t;"ngNonBindable"===e?i=!0:"style"===e?r.registerStyleAttr(n):"class"===e?r.registerClassAttr(n):o.push(t)}this.matchDirectives(e.name,e);const d=[We(s)];u||d.push(We(c));const m=[],g=[];e.inputs.forEach(e=>{r.registerBoundInput(e)||(0===e.type&&e.i18n?g.push(e):m.push(e))});const v=this.getAttributeExpressions(e.name,o,m,e.outputs,r,[],g);d.push(this.addAttrsToConsts(v));const f=this.prepareRefsArray(e.references);d.push(this.addToConsts(f));const y=this._namespace,S=this.getNamespaceInstruction(l);S!==y&&this.addNamespaceInstruction(S,e),this.i18n&&this.i18n.appendElement(e.i18n,s);const x=!a&&this.i18n?!oo(e.children):e.children.length>0,E=!r.hasBindingsWithPipes&&0===e.outputs.length&&0===g.length&&!x,_=!E&&oo(e.children);if(E)this.creationInstruction(e.sourceSpan,u?yt.elementContainer:yt.element,Nn(d));else{if(this.creationInstruction(e.startSourceSpan,u?yt.elementContainerStart:yt.elementStart,Nn(d)),i&&this.creationInstruction(e.startSourceSpan,yt.disableBindings),g.length>0&&this.i18nAttributesInstruction(s,g,null!==(t=e.startSourceSpan)&&void 0!==t?t:e.sourceSpan),e.outputs.length>0){const t=e.outputs.map(t=>({sourceSpan:t.sourceSpan,params:this.prepareListenerParameter(e.name,t,s)}));this.creationInstructionChain(yt.listener,t)}a&&this.i18nStart(e.startSourceSpan,e.i18n,_)}const C=r.buildUpdateLevelInstructions(this._valueConverter),w=C.length-1;for(let e=0;e<=w;e++)this._bindingSlots+=this.processStylingUpdateInstruction(s,C[e]);const b=We(void 0),T=[],I=[];if(m.forEach(e=>{const t=e.type;if(4===t){const t=e.value.visit(this._valueConverter),n=!(t instanceof Rs&&!t.value);this.allocateBindingSlots(t),T.push({name:Et(e.name),sourceSpan:e.sourceSpan,value:()=>n?this.convertPropertyBinding(t):b})}else{if(e.i18n)return;const n=e.value.visit(this._valueConverter);if(void 0!==n){const r=[],[i,a]=p(e.name),o=ro(e.securityContext,1===t);if(o&&r.push(o),i){const e=We(i);o?r.push(e):r.push(We(null),e)}if(this.allocateBindingSlots(n),0===t)n instanceof Ds?this.interpolatedUpdateInstruction(to(n),s,a,e,n,r):T.push({name:a,sourceSpan:e.sourceSpan,value:()=>this.convertPropertyBinding(n),params:r});else if(1===t)if(n instanceof Ds&&Mn(n)>1)this.interpolatedUpdateInstruction(function(e){switch(Mn(e)){case 3:return yt.attributeInterpolate1;case 5:return yt.attributeInterpolate2;case 7:return yt.attributeInterpolate3;case 9:return yt.attributeInterpolate4;case 11:return yt.attributeInterpolate5;case 13:return yt.attributeInterpolate6;case 15:return yt.attributeInterpolate7;case 17:return yt.attributeInterpolate8;default:return yt.attributeInterpolateV}}(n),s,a,e,n,r);else{const t=n instanceof Ds?n.expressions[0]:n;I.push({name:a,sourceSpan:e.sourceSpan,value:()=>this.convertPropertyBinding(t),params:r})}else this.updateInstructionWithAdvance(s,e.sourceSpan,yt.classProp,()=>[We(s),We(a),this.convertPropertyBinding(n),...r])}}}),T.length>0&&this.updateInstructionChainWithAdvance(s,yt.property,T),I.length>0&&this.updateInstructionChainWithAdvance(s,yt.attribute,I),Ot(this,e.children),!a&&this.i18n&&this.i18n.appendElement(e.i18n,s,!0),!E){const t=null!==(n=e.endSourceSpan)&&void 0!==n?n:e.sourceSpan;a&&this.i18nEnd(t,_),i&&this.creationInstruction(t,yt.enableBindings),this.creationInstruction(t,u?yt.elementContainerEnd:yt.elementEnd)}}visitTemplate(e){var t;const n=this.allocateDataSlot();this.i18n&&this.i18n.appendTemplate(e.i18n,n);const s=mt(e.tagName||""),r=`${this.contextName}${s?"_"+s:""}_${n}`,i=r+"_Template",a=[We(n),Be(i),We(e.tagName?p(e.tagName)[1]:e.tagName)];this.matchDirectives("ng-template",e);const o=this.getAttributeExpressions("ng-template",e.attributes,e.inputs,e.outputs,void 0,e.templateAttrs);if(a.push(this.addAttrsToConsts(o)),e.references&&e.references.length){const t=this.prepareRefsArray(e.references);a.push(this.addToConsts(t)),a.push(De(yt.templateRefExtractor))}const l=new za(this.constantPool,this._bindingScope,this.level+1,r,this.i18n,n,i,this.directiveMatcher,this.directives,this.pipeTypeByName,this.pipes,this._namespace,this.fileBasedI18nSuffix,this.i18nUseExternalIds,this._constants);if(this._nestedTemplateFns.push(()=>{const t=l.buildTemplateFunction(e.children,e.variables,this._ngContentReservedSlots.length+this._ngContentSelectorsOffset,e.i18n);this.constantPool.statements.push(t.toDeclStmt(i)),l._ngContentReservedSlots.length&&this._ngContentReservedSlots.push(...l._ngContentReservedSlots)}),this.creationInstruction(e.sourceSpan,yt.templateCreate,()=>(a.splice(2,0,We(l.getConstCount()),We(l.getVarCount())),Nn(a))),this.templatePropertyBindings(n,e.templateAttrs),"ng-template"===e.tagName){const[s,r]=function(e,t){const n=[],s=[];for(const r of e)(t(r)?n:s).push(r);return[n,s]}(e.inputs,pn);if(s.length>0&&this.i18nAttributesInstruction(n,s,null!==(t=e.startSourceSpan)&&void 0!==t?t:e.sourceSpan),r.length>0&&this.templatePropertyBindings(n,r),e.outputs.length>0){const t=e.outputs.map(e=>({sourceSpan:e.sourceSpan,params:this.prepareListenerParameter("ng_template",e,n)}));this.creationInstructionChain(yt.listener,t)}}}visitBoundText(e){if(this.i18n){const t=e.value.visit(this._valueConverter);return this.allocateBindingSlots(t),void(t instanceof Ds&&(this.i18n.appendBoundText(e.i18n),this.i18nAppendBindings(t.expressions)))}const t=this.allocateDataSlot();this.creationInstruction(e.sourceSpan,yt.text,[We(t)]);const n=e.value.visit(this._valueConverter);this.allocateBindingSlots(n),n instanceof Ds?this.updateInstructionWithAdvance(t,e.sourceSpan,function(e){switch(Mn(e)){case 1:return yt.textInterpolate;case 3:return yt.textInterpolate1;case 5:return yt.textInterpolate2;case 7:return yt.textInterpolate3;case 9:return yt.textInterpolate4;case 11:return yt.textInterpolate5;case 13:return yt.textInterpolate6;case 15:return yt.textInterpolate7;case 17:return yt.textInterpolate8;default:return yt.textInterpolateV}}(n),()=>this.getUpdateInstructionArguments(n)):Ye("Text nodes should be interpolated and never bound directly.")}visitText(e){this.i18n||this.creationInstruction(e.sourceSpan,yt.text,[We(this.allocateDataSlot()),We(e.value)])}visitIcu(e){let t=!1;this.i18n||(t=!0,this.i18nStart(null,e.i18n,!0));const n=this.i18n,s=this.i18nBindProps(e.vars),r=this.i18nBindProps(e.placeholders),i=e.i18n,a=e=>{const t=yn(Object.assign(Object.assign({},s),r),!1);return Qa(null,yt.i18nPostprocess,[e,vs(t,!0)])};if(un(n.meta))this.i18nTranslate(i,{},n.ref,a);else{const e=this.i18nTranslate(i,{},void 0,a);n.appendIcu(hn(i).name,e)}return t&&this.i18nEnd(null,!0),null}allocateDataSlot(){return this._dataIndex++}getConstCount(){return this._dataIndex}getVarCount(){return this._pureFunctionSlots}getConsts(){return this._constants}getNgContentSelectors(){return this._ngContentReservedSlots.length?this.constantPool.getConstLiteral(Tn(this._ngContentReservedSlots),!0):null}bindingContext(){return""+this._bindingContext++}templatePropertyBindings(e,t){const n=[];t.forEach(t=>{if(t instanceof Tt){const s=t.value.visit(this._valueConverter);if(void 0!==s)if(this.allocateBindingSlots(s),s instanceof Ds){const n=[];this.interpolatedUpdateInstruction(to(s),e,t.name,t,s,n)}else n.push({name:t.name,sourceSpan:t.sourceSpan,value:()=>this.convertPropertyBinding(s)})}}),n.length>0&&this.updateInstructionChainWithAdvance(e,yt.property,n)}instructionFn(e,t,n,s,r=!1){e[r?"unshift":"push"](()=>{const e=Array.isArray(s)?s:s();return Qa(t,n,e).toStmt()})}processStylingUpdateInstruction(e,t){let n=0;if(t){const s=[];t.calls.forEach(e=>{n+=e.allocateBindingSlots,s.push({sourceSpan:e.sourceSpan,value:()=>e.params(t=>e.supportsInterpolation&&t instanceof Ds?this.getUpdateInstructionArguments(t):this.convertPropertyBinding(t))})}),this.updateInstructionChainWithAdvance(e,t.reference,s)}return n}creationInstruction(e,t,n,s){this.instructionFn(this._creationCodeFns,e,t,n||[],s)}creationInstructionChain(e,t){const n=t.length?t[0].sourceSpan:null;this._creationCodeFns.push(()=>kn(e,t.map(e=>e.params()),n).toStmt())}updateInstructionWithAdvance(e,t,n,s){this.addAdvanceInstructionIfNecessary(e,t),this.updateInstruction(t,n,s)}updateInstruction(e,t,n){this.instructionFn(this._updateCodeFns,e,t,n||[])}updateInstructionChain(e,t){const n=t.length?t[0].sourceSpan:null;this._updateCodeFns.push(()=>{const s=t.map(e=>{const t=e.value(),n=Array.isArray(t)?t:[t];return e.params&&n.push(...e.params),e.name&&n.unshift(We(e.name)),n});return kn(e,s,n).toStmt()})}updateInstructionChainWithAdvance(e,t,n){this.addAdvanceInstructionIfNecessary(e,n.length?n[0].sourceSpan:null),this.updateInstructionChain(t,n)}addAdvanceInstructionIfNecessary(e,t){if(e!==this._currentIndex){const n=e-this._currentIndex;if(n<1)throw new Error("advance instruction can only go forwards");this.instructionFn(this._updateCodeFns,t,yt.advance,[We(n)]),this._currentIndex=e}}allocatePureFunctionSlots(e){const t=this._pureFunctionSlots;return this._pureFunctionSlots+=e,t}allocateBindingSlots(e){this._bindingSlots+=e instanceof Ds?e.expressions.length:1}getImplicitReceiverExpr(){return this._implicitReceiverExpr?this._implicitReceiverExpr:this._implicitReceiverExpr=0===this.level?Be("ctx"):this._bindingScope.getOrCreateSharedContextVar(0)}convertPropertyBinding(e){const t=rr(this,this.getImplicitReceiverExpr(),e,this.bindingContext(),hs.Expression,()=>Ye("Unexpected interpolation")),n=t.currValExpr;return this._tempVariables.push(...t.stmts),n}getUpdateInstructionArguments(e){const{args:t,stmts:n}=function(e,t,n,s){const r=new pr(e,t,s,void 0),i=n.visit(r,ds.Expression);r.usesImplicitReceiver&&e.notifyImplicitReceiverUse();const a=ir(r,s);let o=i.args.slice(1);if(n instanceof Ds){const e=n.strings;3===o.length&&""===e[0]&&""===e[1]?o=[o[1]]:o.length>=19&&(o=[Ue(o)])}return{stmts:a,args:o}}(this,this.getImplicitReceiverExpr(),e,this.bindingContext());return this._tempVariables.push(...n),t}matchDirectives(e,t){if(this.directiveMatcher){const n=function(e,t){const n=new _,s=p(e)[1];return n.setElement(s),Object.getOwnPropertyNames(t).forEach(e=>{const s=p(e)[1],r=t[e];n.addAttribute(s,r),"class"===e.toLowerCase()&&r.trim().split(/\s+/).forEach(e=>n.addClassName(e))}),n}(e,function(e){const t={};return e instanceof At&&"ng-template"!==e.tagName?e.templateAttrs.forEach(e=>t[e.name]=""):(e.attributes.forEach(e=>{ln(e.name)||(t[e.name]=e.value)}),e.inputs.forEach(e=>{t[e.name]=""}),e.outputs.forEach(e=>{t[e.name]=""})),t}(t));this.directiveMatcher.match(n,(e,t)=>{this.directives.add(t)})}}getAttributeExpressions(e,t,n,s,r,i=[],a=[]){const o=new Set,l=[];let c;for(const n of t)"ngProjectAs"===n.name&&(c=n),n.i18n?l.push(We(n.name),this.i18nTranslate(n.i18n)):l.push(...Za(n.name),io(e,n));function u(e,t){"string"==typeof e?o.has(e)||(l.push(...Za(e)),void 0!==t&&l.push(t),o.add(e)):l.push(We(e))}if(c&&l.push(...function(e){const t=L(e.value)[0];return[We(5),Tn(t)]}(c)),r&&r.populateInitialStylingAttrs(l),n.length||s.length){const e=l.length;for(let e=0;e<n.length;e++){const t=n[e];4!==t.type&&1!==t.type&&u(t.name)}for(let e=0;e<s.length;e++){const t=s[e];1!==t.type&&u(t.name)}l.length!==e&&l.splice(e,0,We(3))}return i.length&&(l.push(We(4)),i.forEach(e=>u(e.name))),a.length&&(l.push(We(6)),a.forEach(e=>u(e.name))),l}addToConsts(e){if(ze(e))return Ne;const t=this._constants.constExpressions;for(let n=0;n<t.length;n++)if(t[n].isEquivalent(e))return We(n);return We(t.push(e)-1)}addAttrsToConsts(e){return e.length>0?this.addToConsts(Ue(e)):Ne}prepareRefsArray(e){return e&&0!==e.length?Tn(function e(t){return t.reduce((t,n)=>{const s=Array.isArray(n)?e(n):n;return t.concat(s)},[])}(e.map(e=>{const t=this.allocateDataSlot(),n=this._bindingScope.freshReferenceName(),s=this.level,r=Be(n);return this._bindingScope.set(s,e.name,r,0,(e,n)=>{const s=n>0?[Ya(n).toStmt()]:[],i=r.set(De(yt.reference).callFn([We(t)]));return s.concat(i.toConstDecl())},!0),[e.name,e.value]}))):Ne}prepareListenerParameter(e,t,n){return()=>{const s=t.name,r=1===t.type?_t(s,t.phase):mt(s),i=`${this.templateName}_${e}_${r}_${n}_listener`,a=this._bindingScope.nestedScope(this._bindingScope.bindingLevel,Ua);return Wa(t,i,a)}}}class Ka extends class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Ds(e.span,e.sourceSpan,e.strings,n):e}visitLiteralPrimitive(e,t){return e}visitPropertyRead(e,t){const n=e.receiver.visit(this);return n!==e.receiver?new As(e.span,e.sourceSpan,e.nameSpan,n,e.name):e}visitPropertyWrite(e,t){const n=e.receiver.visit(this),s=e.value.visit(this);return n!==e.receiver||s!==e.value?new Ps(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitSafePropertyRead(e,t){const n=e.receiver.visit(this);return n!==e.receiver?new ks(e.span,e.sourceSpan,e.nameSpan,n,e.name):e}visitMethodCall(e,t){const n=e.receiver.visit(this),s=this.visitAll(e.args);return n!==e.receiver||s!==e.args?new qs(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitSafeMethodCall(e,t){const n=e.receiver.visit(this),s=this.visitAll(e.args);return n!==e.receiver||s!==e.args?new Hs(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitFunctionCall(e,t){const n=e.target&&e.target.visit(this),s=this.visitAll(e.args);return n!==e.target||s!==e.args?new Ws(e.span,e.sourceSpan,n,s):e}visitLiteralArray(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Fs(e.span,e.sourceSpan,n):e}visitLiteralMap(e,t){const n=this.visitAll(e.values);return n!==e.values?new Bs(e.span,e.sourceSpan,e.keys,n):e}visitUnary(e,t){const n=e.expr.visit(this);if(n!==e.expr)switch(e.operator){case"+":return Vs.createPlus(e.span,e.sourceSpan,n);case"-":return Vs.createMinus(e.span,e.sourceSpan,n);default:throw new Error("Unknown unary operator "+e.operator)}return e}visitBinary(e,t){const n=e.left.visit(this),s=e.right.visit(this);return n!==e.left||s!==e.right?new $s(e.span,e.sourceSpan,e.operation,n,s):e}visitPrefixNot(e,t){const n=e.expression.visit(this);return n!==e.expression?new Us(e.span,e.sourceSpan,n):e}visitNonNullAssert(e,t){const n=e.expression.visit(this);return n!==e.expression?new js(e.span,e.sourceSpan,n):e}visitConditional(e,t){const n=e.condition.visit(this),s=e.trueExp.visit(this),r=e.falseExp.visit(this);return n!==e.condition||s!==e.trueExp||r!==e.falseExp?new Ns(e.span,e.sourceSpan,n,s,r):e}visitPipe(e,t){const n=e.exp.visit(this),s=this.visitAll(e.args);return n!==e.exp||s!==e.args?new Os(e.span,e.sourceSpan,n,e.name,s,e.nameSpan):e}visitKeyedRead(e,t){const n=e.obj.visit(this),s=e.key.visit(this);return n!==e.obj||s!==e.key?new Ms(e.span,e.sourceSpan,n,s):e}visitKeyedWrite(e,t){const n=e.obj.visit(this),s=e.key.visit(this),r=e.value.visit(this);return n!==e.obj||s!==e.key||r!==e.value?new Ls(e.span,e.sourceSpan,n,s,r):e}visitAll(e){const t=[];let n=!1;for(let s=0;s<e.length;++s){const r=e[s],i=r.visit(this);t[s]=i,n=n||i!==r}return n?t:e}visitChain(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Is(e.span,e.sourceSpan,n):e}visitQuote(e,t){return e}}{constructor(e,t,n,s){super(),this.constantPool=e,this.allocateSlot=t,this.allocatePureFunctionSlots=n,this.definePipe=s,this._pipeBindExprs=[]}visitPipe(e,t){const n=this.allocateSlot(),s="PIPE:"+n,r=this.allocatePureFunctionSlots(2+e.args.length),i=new As(e.span,e.sourceSpan,e.nameSpan,new bs(e.span,e.sourceSpan),s),{identifier:a,isVarLength:o}=function(e){const t=Xa[e.length];return{identifier:t||yt.pipeBindV,isVarLength:!t}}(e.args);this.definePipe(e.name,s,n,De(a));const l=[e.exp,...e.args],c=this.visitAll(o?[new Fs(e.span,e.sourceSpan,l)]:l),u=new Ws(e.span,e.sourceSpan,i,[new Rs(e.span,e.sourceSpan,n),new Rs(e.span,e.sourceSpan,r),...c]);return this._pipeBindExprs.push(u),u}updatePipeSlotOffsets(e){this._pipeBindExprs.forEach(t=>{t.args[1].value+=e})}visitLiteralArray(e,t){return new dr(e.span,e.sourceSpan,this.visitAll(e.expressions),e=>{const t=Ue(e);return Ja(this.constantPool,t,this.allocatePureFunctionSlots)})}visitLiteralMap(e,t){return new dr(e.span,e.sourceSpan,this.visitAll(e.values),t=>{const n=je(t.map((t,n)=>({key:e.keys[n].key,value:t,quoted:e.keys[n].quoted})));return Ja(this.constantPool,n,this.allocatePureFunctionSlots)})}}const Xa=[yt.pipeBind1,yt.pipeBind2,yt.pipeBind3,yt.pipeBind4],Ga=[yt.pureFunction0,yt.pureFunction1,yt.pureFunction2,yt.pureFunction3,yt.pureFunction4,yt.pureFunction5,yt.pureFunction6,yt.pureFunction7,yt.pureFunction8];function Qa(e,t,n){return De(t,null,e).callFn(n,e)}function Ya(e){return De(yt.nextContext).callFn(e>1?[We(e)]:[])}function Ja(e,t,n){const{literalFactory:s,literalFactoryArguments:r}=e.getLiteralFactory(t),i=n(1+r.length),{identifier:a,isVarLength:o}=function(e){const t=Ga[e.length];return{identifier:t||yt.pureFunctionV,isVarLength:!t}}(r),l=[We(i),s];return o?l.push(Ue(r)):l.push(...r),De(a).callFn(l)}function Za(e){const[t,n]=p(e),s=We(n);return t?[We(0),We(t),s]:[s]}class eo{constructor(e=0,t=null,n){if(this.bindingLevel=e,this.parent=t,this.globals=n,this.map=new Map,this.referenceNameIndex=0,this.restoreViewVariable=null,void 0!==n)for(const e of n)this.set(0,e,Be(e))}static createRootScope(){return new eo}get(e){let t=this;for(;t;){let n=t.map.get(e);if(null!=n)return t!==this&&(n={retrievalLevel:n.retrievalLevel,lhs:n.lhs,declareLocalCallback:n.declareLocalCallback,declare:!1,priority:n.priority,localRef:n.localRef},this.map.set(e,n),this.maybeGenerateSharedContextVar(n),this.maybeRestoreView(n.retrievalLevel,n.localRef)),n.declareLocalCallback&&!n.declare&&(n.declare=!0),n.lhs;t=t.parent}return 0===this.bindingLevel?null:this.getComponentProperty(e)}set(e,t,n,s=0,r,i){if(this.map.has(t)){if(i)return this;Ye(`The name ${t} is already defined in scope to be ${this.map.get(t)}`)}return this.map.set(t,{retrievalLevel:e,lhs:n,declare:!1,declareLocalCallback:r,priority:s,localRef:i||!1}),this}getLocal(e){return this.get(e)}notifyImplicitReceiverUse(){0!==this.bindingLevel&&(this.map.get("$$shared_ctx$$0").declare=!0)}nestedScope(e,t){const n=new eo(e,this,t);return e>0&&n.generateSharedContextVar(0),n}getOrCreateSharedContextVar(e){const t="$$shared_ctx$$"+e;return this.map.has(t)||this.generateSharedContextVar(e),this.map.get(t).lhs}getSharedContextName(e){const t=this.map.get("$$shared_ctx$$"+e);return t&&t.declare?t.lhs:null}maybeGenerateSharedContextVar(e){if(1===e.priority&&e.retrievalLevel<this.bindingLevel){const t=this.map.get("$$shared_ctx$$"+e.retrievalLevel);t?t.declare=!0:this.generateSharedContextVar(e.retrievalLevel)}}generateSharedContextVar(e){const t=Be("ctx"+this.freshReferenceName());this.map.set("$$shared_ctx$$"+e,{retrievalLevel:e,lhs:t,declareLocalCallback:(e,n)=>[t.set(Ya(n)).toConstDecl()],declare:!1,priority:2,localRef:!1})}getComponentProperty(e){const t=this.map.get("$$shared_ctx$$0");return t.declare=!0,this.maybeRestoreView(0,!1),t.lhs.prop(e)}maybeRestoreView(e,t){this.isListenerScope()&&(e<this.bindingLevel||t)&&(this.parent.restoreViewVariable||(this.parent.restoreViewVariable=Be(this.parent.freshReferenceName())),this.restoreViewVariable=this.parent.restoreViewVariable)}restoreViewStatement(){return this.restoreViewVariable?[Qa(null,yt.restoreView,[this.restoreViewVariable]).toStmt()]:[]}viewSnapshotStatements(){const e=Qa(null,yt.getCurrentView,[]);return this.restoreViewVariable?[this.restoreViewVariable.set(e).toConstDecl()]:[]}isListenerScope(){return this.parent&&this.parent.bindingLevel===this.bindingLevel}variableDeclarations(){let e=0;return Array.from(this.map.values()).filter(e=>e.declare).sort((e,t)=>t.retrievalLevel-e.retrievalLevel||t.priority-e.priority).reduce((t,n)=>{const s=this.bindingLevel-n.retrievalLevel,r=n.declareLocalCallback(this,s-e);return e=s,t.concat(r)},[])}freshReferenceName(){let e=this;for(;e.parent;)e=e.parent;return"_r"+e.referenceNameIndex++}}function to(e){switch(Mn(e)){case 1:return yt.propertyInterpolate;case 3:return yt.propertyInterpolate1;case 5:return yt.propertyInterpolate2;case 7:return yt.propertyInterpolate3;case 9:return yt.propertyInterpolate4;case 11:return yt.propertyInterpolate5;case 13:return yt.propertyInterpolate6;case 15:return yt.propertyInterpolate7;case 17:return yt.propertyInterpolate8;default:return yt.propertyInterpolateV}}const no=new da;function so(e=jn){return new bi(new sa(new ji),e,no,null,[])}function ro(e,t){switch(e){case N.HTML:return De(yt.sanitizeHtml);case N.SCRIPT:return De(yt.sanitizeScript);case N.STYLE:return t?De(yt.sanitizeStyle):null;case N.URL:return De(yt.sanitizeUrl);case N.RESOURCE_URL:return De(yt.sanitizeResourceUrl);default:return null}}function io(e,t){const n=Tn(t.value);switch(no.securityContext(e,t.name,!0)){case N.HTML:return De(yt.trustConstantHtml).callFn([n],t.valueSpan);case N.SCRIPT:return De(yt.trustConstantScript).callFn([n],t.valueSpan);case N.RESOURCE_URL:return De(yt.trustConstantResourceUrl).callFn([n],t.valueSpan);default:return n}}function ao(e){return e instanceof Ct||e instanceof wt||e instanceof Lt}function oo(e){return e.every(ao)}function lo(){return Ve(Be("ngI18nClosureMode")).notIdentical(We("undefined",U)).and(Be("ngI18nClosureMode"))}const co=/attr\.([^\]]+)/;function uo(e,t,n){const s=new Pn,r=L(e.selector);return s.set("type",e.internalType),r.length>0&&s.set("selectors",Tn(r)),e.queries.length>0&&s.set("contentQueries",function(e,t,n){const s=[],r=[],i=Cn(r,"_t");for(const n of e){s.push(De(n.static?yt.staticContentQuery:yt.contentQuery).callFn([Be("dirIndex"),...ho(n,t)]).toStmt());const e=i(),a=De(yt.loadQuery).callFn([]),o=De(yt.queryRefresh).callFn([e.set(a)]),l=Be("ctx").prop(n.propertyName).set(n.first?e.prop("first"):e);r.push(o.and(l).toStmt())}const a=n?n+"_ContentQueries":null;return qe([new ye("rf",V),new ye("ctx",null),new ye("dirIndex",null)],[Ha(1,s),Ha(2,r)],D,null,a)}(e.queries,t,e.name)),e.viewQueries.length&&s.set("viewQuery",function(e,t,n){const s=[],r=[],i=Cn(r,"_t");e.forEach(e=>{const n=De(e.static?yt.staticViewQuery:yt.viewQuery).callFn(ho(e,t));s.push(n.toStmt());const a=i(),o=De(yt.loadQuery).callFn([]),l=De(yt.queryRefresh).callFn([a.set(o)]),c=Be("ctx").prop(e.propertyName).set(e.first?a.prop("first"):a);r.push(l.and(c).toStmt())});const a=n?n+"_Query":null;return qe([new ye("rf",V),new ye("ctx",null)],[Ha(1,s),Ha(2,r)],D,null,a)}(e.viewQueries,t,e.name)),s.set("hostBindings",function(e,t,n,s,r,i,a){const o=Be("ctx"),l=new Bi(o),{styleAttr:c,classAttr:u}=e.specialAttributes;void 0!==c&&l.registerStyleAttr(c),void 0!==u&&l.registerClassAttr(u);const p=[],h=[],d=t,m=yo(e),g=n.createDirectiveHostEventAsts(m,d);if(g&&g.length){const e=function(e,t){const n=[],s=[],r=[];return e.forEach(e=>{let r=e.name&&mt(e.name);const i=1===e.type?_t(r,e.targetOrPhase):r,a=t&&r?`${t}_${i}_HostBindingHandler`:null,o=Wa(It.fromParsedEvent(e),a);1==e.type?s.push(o):n.push(o)}),s.length>0&&r.push(kn(yt.syntheticHostListener,s).toStmt()),n.length>0&&r.push(kn(yt.listener,n).toStmt()),r}(g,i);p.push(...e)}const v=n.createBoundHostProperties(m,d),f=[];let y,S=0;v&&v.forEach(e=>{l.registerInputBasedOnName(e.name,e.expression,d)?S+=2:(f.push(e),S++)});const x=()=>(y||(y=new Ka(s,()=>Ye("Unexpected node"),e=>{const t=S;return S+=e,t},()=>Ye("Unexpected pipe"))),y),E=[],_=[],C=[];f.forEach(e=>{const t=e.expression.visit(x()),s=fo(o,t),{bindingName:i,instruction:a,isAttribute:l}=function(e){let t,n=e.name;const s=n.match(co);return s?(n=s[1],t=yt.attribute):e.isAnimation?(n=Et(n),t=yt.syntheticHostProperty):t=yt.hostProperty,{bindingName:n,instruction:t,isAttribute:!!s}}(e),c=n.calcPossibleSecurityContexts(r,i,l).filter(e=>e!==N.NONE);let u=null;c.length&&(u=2===c.length&&c.indexOf(N.URL)>-1&&c.indexOf(N.RESOURCE_URL)>-1?De(yt.sanitizeUrlOrResourceUrl):ro(c[0],l));const p=[We(i),s.currValExpr];u&&p.push(u),h.push(...s.stmts),a===yt.hostProperty?E.push(p):a===yt.attribute?_.push(p):a===yt.syntheticHostProperty?C.push(p):h.push(De(a).callFn(p).toStmt())}),E.length>0&&h.push(kn(yt.hostProperty,E).toStmt()),_.length>0&&h.push(kn(yt.attribute,_).toStmt()),C.length>0&&h.push(kn(yt.syntheticHostProperty,C).toStmt());const w=function(e){const t=[];for(let n of Object.getOwnPropertyNames(e)){const s=e[n];t.push(We(n),s)}return t}(e.attributes);if(l.assignHostAttrs(w,a),l.hasBindings&&l.buildUpdateLevelInstructions(x()).forEach(e=>{if(e.calls.length>0){const t=[];e.calls.forEach(e=>{S+=Math.max(e.allocateBindingSlots-2,0),t.push(function(e,t,n){return e.params(e=>n(t,e).currValExpr)}(e,o,fo))}),h.push(kn(e.reference,t).toStmt())}}),S&&a.set("hostVars",We(S)),p.length>0||h.length>0){const e=i?i+"_HostBindings":null,t=[];return p.length>0&&t.push(Ha(1,p)),h.length>0&&t.push(Ha(2,h)),qe([new ye("rf",V),new ye("ctx",null)],t,D,null,e)}return null}(e.host,e.typeSourceSpan,n,t,e.selector||"",e.name,s)),s.set("inputs",In(e.inputs,!0)),s.set("outputs",In(e.outputs)),null!==e.exportAs&&s.set("exportAs",Ue(e.exportAs.map(e=>We(e)))),s}function po(e,t){const n=[],s=t.providers,r=t.viewProviders;if(s||r){const e=[s||new we([])];r&&e.push(r),n.push(De(yt.ProvidersFeature).callFn(e))}t.usesInheritance&&n.push(De(yt.InheritDefinitionFeature)),t.fullInheritance&&n.push(De(yt.CopyDefinitionFeature)),t.lifecycle.usesOnChanges&&n.push(De(yt.NgOnChangesFeature)),n.length&&e.set("features",Ue(n))}function ho(e,t){const n=[An(e,t),We(e.descendants)];return e.read&&n.push(e.read),n}function mo(e){return $e(je(Object.keys(e).map(t=>({key:t,value:We(Array.isArray(e[t])?e[t][0]:e[t]),quoted:!0}))))}function go(e){return e.length>0?$e(Ue(e.map(e=>We(e)))):j}function vo(e){const t=null!==e.selector?e.selector.replace(/\n/g,""):null;return[xt(e.type.type,e.typeArgumentCount),null!==t?(n=t,$e(We(n))):j,null!==e.exportAs?go(e.exportAs):j,mo(e.inputs),mo(e.outputs),go(e.queries.map(e=>e.propertyName))];var n}function fo(e,t){return rr(null,e,t,"b",hs.Expression,()=>Ye("Unexpected interpolation"))}function yo(e){return{hostAttributes:{},hostListeners:e.listeners,hostProperties:e.properties}}const So=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;class xo{get(e){return""}}const Eo=Object.keys({useClass:null})[0],_o=Object.keys({useFactory:null})[0],Co=Object.keys({useValue:null})[0],wo=Object.keys({useExisting:null})[0],bo=function(e){const t=new Y(e);return{value:t,type:t}};function To(e){return Object.assign(Object.assign({},e),{predicate:Array.isArray(e.predicate)?e.predicate:new Y(e.predicate),read:e.read?new Y(e.read):null,static:e.static})}function Io(e){const t=Oo(e.inputs||[]),n=Oo(e.outputs||[]),s=e.propMetadata,r={},i={};for(const e in s)s.hasOwnProperty(e)&&s[e].forEach(t=>{"Input"===t.ngMetadataName?r[e]=t.bindingPropertyName?[t.bindingPropertyName,e]:e:Lo(t)&&(i[e]=t.bindingPropertyName||e)});return Object.assign(Object.assign({},e),{typeSourceSpan:e.typeSourceSpan,type:bo(e.type),internalType:new Y(e.type),deps:Po(e.deps),host:ko(e.propMetadata,e.typeSourceSpan,e.host),inputs:Object.assign(Object.assign({},t),r),outputs:Object.assign(Object.assign({},n),i),queries:e.queries.map(To),providers:null!=e.providers?new Y(e.providers):null,viewQueries:e.viewQueries.map(To),fullInheritance:!1})}function No(e,t){return e.hasOwnProperty(t)?new Y(e[t]):void 0}function Ao(e){let t;return t=null===e.token?new re(null):e.resolved===Rn.Attribute?new re(e.token):new Y(e.token),{token:t,attribute:null,resolved:e.resolved,host:e.host,optional:e.optional,self:e.self,skipSelf:e.skipSelf}}function Po(e){return null==e?null:e.map(Ao)}function ko(e,t,n){const s=function(e){const t={},n={},s={},r={};for(const i of Object.keys(e)){const a=e[i],o=i.match(So);if(null===o)switch(i){case"class":if("string"!=typeof a)throw new Error("Class binding must be string");r.classAttr=a;break;case"style":if("string"!=typeof a)throw new Error("Style binding must be string");r.styleAttr=a;break;default:t[i]="string"==typeof a?We(a):a}else if(null!=o[1]){if("string"!=typeof a)throw new Error("Property binding must be string");s[o[1]]=a}else if(null!=o[2]){if("string"!=typeof a)throw new Error("Event binding must be string");n[o[2]]=a}}return{attributes:t,listeners:n,properties:s,specialAttributes:r}}(n||{}),r=function(e,t){const n=yo(e),s=so();return s.createDirectiveHostEventAsts(n,t),s.createBoundHostProperties(n,t),s.errors}(s,t);if(r.length)throw new Error(r.map(e=>e.msg).join("\n"));for(const t in e)e.hasOwnProperty(t)&&e[t].forEach(e=>{"HostBinding"===e.ngMetadataName?s.properties[e.hostPropertyName||t]=t:Mo(e)&&(s.listeners[e.eventName||t]=`${t}(${(e.args||[]).join(",")})`)});return s}function Mo(e){return"HostListener"===e.ngMetadataName}function Lo(e){return"Output"===e.ngMetadataName}function Oo(e){return e.reduce((e,t)=>{const[n,s]=t.split(",").map(e=>e.trim());return e[n]=s||n,e},{})}var Ro,Fo,Bo;new class{constructor(e){this.full=e;const t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}}("11.0.0"),function(e){e[e.Extract=0]="Extract",e[e.Merge=1]="Merge"}(Ro||(Ro={})),function(e){e[e.OnInit=0]="OnInit",e[e.OnDestroy=1]="OnDestroy",e[e.DoCheck=2]="DoCheck",e[e.OnChanges=3]="OnChanges",e[e.AfterContentInit=4]="AfterContentInit",e[e.AfterContentChecked=5]="AfterContentChecked",e[e.AfterViewInit=6]="AfterViewInit",e[e.AfterViewChecked=7]="AfterViewChecked"}(Fo||(Fo={})),Be("_l"),Be("_l"),Be("_v"),Be("_ck"),Be("_co"),Be("en"),Be("ad"),function(e){e[e.Scheme=1]="Scheme",e[e.UserInfo=2]="UserInfo",e[e.Domain=3]="Domain",e[e.Port=4]="Port",e[e.Path=5]="Path",e[e.QueryData=6]="QueryData",e[e.Fragment=7]="Fragment"}(Bo||(Bo={})),(st.ng||(st.ng={})).ɵcompilerFacade=new class{constructor(e=new es){this.jitEvaluator=e,this.R3ResolvedDependencyType=Rn,this.R3FactoryTarget=On,this.ResourceLoader=xo,this.elementSchemaRegistry=new da}compilePipe(e,t,n){const s=function(e){const t=[];return t.push({key:"name",value:We(e.pipeName),quoted:!1}),t.push({key:"type",value:e.type.value,quoted:!1}),t.push({key:"pure",value:We(e.pure),quoted:!1}),{expression:De(yt.definePipe).callFn([je(t)]),type:new F(De(yt.PipeDefWithMeta,[xt(e.type.type,e.typeArgumentCount),new F(new re(e.pipeName))]))}}({name:n.name,type:bo(n.type),internalType:new Y(n.type),typeArgumentCount:n.typeArgumentCount,deps:Po(n.deps),pipeName:n.pipeName,pure:n.pure});return this.jitExpression(s.expression,e,t,[])}compileInjectable(e,t,n){const{expression:s,statements:r}=function(e){let t=null;const n={name:e.name,type:e.type,internalType:e.internalType,typeArgumentCount:e.typeArgumentCount,deps:[],injectFn:dt.inject,target:On.Injectable};if(void 0!==e.useClass){const s=e.useClass.isEquivalent(e.internalType);let r=void 0;void 0!==e.userDeps&&(r=e.userDeps),t=void 0!==r?Fn(Object.assign(Object.assign({},n),{delegate:e.useClass,delegateDeps:r,delegateType:Ln.Class})):s?Fn(n):$n(e.type.value,e.useClass)}else t=void 0!==e.useFactory?void 0!==e.userDeps?Fn(Object.assign(Object.assign({},n),{delegate:e.useFactory,delegateDeps:e.userDeps||[],delegateType:Ln.Function})):{statements:[],factory:qe([],[new Re(e.useFactory.callFn([]))])}:void 0!==e.useValue?Fn(Object.assign(Object.assign({},n),{expression:e.useValue})):void 0!==e.useExisting?Fn(Object.assign(Object.assign({},n),{expression:De(dt.inject).callFn([e.useExisting])})):$n(e.type.value,e.internalType);const s={token:e.internalType,factory:t.factory};return null!==e.providedIn.value&&(s.providedIn=e.providedIn),{expression:De(dt.ɵɵdefineInjectable).callFn([St(s)]),type:new F(De(dt.InjectableDef,[xt(e.type.type,e.typeArgumentCount)])),statements:t.statements}}({name:n.name,type:bo(n.type),internalType:new Y(n.type),typeArgumentCount:n.typeArgumentCount,providedIn:(i=n.providedIn,null==i||"string"==typeof i?new re(i):new Y(i)),useClass:No(n,Eo),useFactory:No(n,_o),useValue:No(n,Co),useExisting:No(n,wo),userDeps:Po(n.userDeps)||void 0});var i;return this.jitExpression(s,e,t,r)}compileInjector(e,t,n){const s=function(e){const t=Fn({name:e.name,type:e.type,internalType:e.internalType,typeArgumentCount:0,deps:e.deps,injectFn:yt.inject,target:On.NgModule}),n={factory:t.factory};return null!==e.providers&&(n.providers=e.providers),e.imports.length>0&&(n.imports=Ue(e.imports)),{expression:De(yt.defineInjector).callFn([St(n)]),type:new F(De(yt.InjectorDef,[new F(e.type.type)])),statements:t.statements}}({name:n.name,type:bo(n.type),internalType:new Y(n.type),deps:Po(n.deps),providers:new Y(n.providers),imports:n.imports.map(e=>new Y(e))});return this.jitExpression(s.expression,e,t,s.statements)}compileNgModule(e,t,n){const s=function(e){const{internalType:t,type:n,bootstrap:s,declarations:r,imports:i,exports:a,schemas:o,containsForwardDecls:l,emitInline:c,id:u}=e,p=[],h={type:t};if(s.length&&(h.bootstrap=ys(s,l)),c)r.length&&(h.declarations=ys(r,l)),i.length&&(h.imports=ys(i,l)),a.length&&(h.exports=ys(a,l));else{const t=function(e){const{adjacentType:t,declarations:n,imports:s,exports:r,containsForwardDecls:i}=e,a={};if(n.length&&(a.declarations=ys(n,i)),s.length&&(a.imports=ys(s,i)),r.length&&(a.exports=ys(r,i)),0===Object.keys(a).length)return null;const o=function(e){const t=new de({name:"ngJitMode",moduleName:null}),n=new Ee(H.Identical,new Q(t),We("undefined")),s=new Ee(H.Or,n,t,void 0,void 0,!0);return new Ee(H.And,s,e)}(new ne(De(yt.setNgModuleScope),[t,St(a)])),l=new Se([],[o.toStmt()]);return new ne(l,[]).toStmt()}(e);null!==t&&p.push(t)}return o&&o.length&&(h.schemas=Ue(o.map(e=>e.value))),u&&(h.id=u),{expression:De(yt.defineNgModule).callFn([St(h)]),type:new F(De(yt.NgModuleDefWithMeta,[new F(n.type),fs(r),fs(i),fs(a)])),additionalStatements:p}}({type:bo(n.type),internalType:new Y(n.type),adjacentType:new Y(n.type),bootstrap:n.bootstrap.map(bo),declarations:n.declarations.map(bo),imports:n.imports.map(bo),exports:n.exports.map(bo),emitInline:!0,containsForwardDecls:!1,schemas:n.schemas?n.schemas.map(bo):null,id:n.id?new Y(n.id):null});return this.jitExpression(s.expression,e,t,[])}compileDirective(e,t,n){const s=new ot,r=so(),i=function(e,t,n){const s=uo(e,t,n);po(s,e);const r=De(yt.defineDirective).callFn([s.toLiteralMap()]),i=vo(e);return{expression:r,type:$e(De(yt.DirectiveDefWithMeta,i))}}(Io(n),s,r);return this.jitExpression(i.expression,e,t,s.statements)}compileComponent(e,t,n){const s=new ot,r=n.interpolation?Un.fromArray(n.interpolation):jn,i=function(e,t,n={}){const{interpolationConfig:s,preserveWhitespaces:r,enableI18nLegacyMessageIdFormat:i}=n,a=so(s),o=(new fi).parse(e,t,Object.assign(Object.assign({leadingTriviaChars:qa},n),{tokenizeExpansionForms:!0}));if(o.errors&&o.errors.length>0)return{interpolationConfig:s,preserveWhitespaces:r,template:e,errors:o.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};let l=o.rootNodes;const c=new Ra(s,!r,i);l=Xr(c,l),r||(l=Xr(new _i,l),c.hasI18nMeta&&(l=Xr(new Ra(s,!1),l)));const{nodes:u,errors:p,styleUrls:h,styles:d,ngContentSelectors:m}=function(e,t){const n=new ga(t);return{nodes:Xr(n,e),errors:t.errors.concat(n.errors),styleUrls:n.styleUrls,styles:n.styles,ngContentSelectors:n.ngContentSelectors}}(l,a);return{interpolationConfig:s,preserveWhitespaces:r,errors:p.length>0?p:null,template:e,nodes:u,styleUrls:h,styles:d,ngContentSelectors:m}}(n.template,t,{preserveWhitespaces:n.preserveWhitespaces,interpolationConfig:r});if(null!==i.errors){const e=i.errors.map(e=>e.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${n.name}: ${e}`)}const a=function(e,t,n){const s=uo(e,t,n);po(s,e);const r=e.selector&&_.parse(e.selector),i=r&&r[0];if(i){const e=i.getAttrs();e.length&&s.set("attrs",t.getConstLiteral(Ue(e.map(e=>We(null!=e?e:void 0))),!0))}let a=null;if(e.directives.length>0){const t=new C;for(const{selector:n,expression:s}of e.directives)t.addSelectables(_.parse(n),s);a=t}const o=e.name,l=o?o+"_Template":null,c=new Set,u=new Set,p=e.changeDetection,h=e.template,d=new za(t,eo.createRootScope(),0,o,null,null,l,a,c,e.pipes,u,yt.namespaceHTML,e.relativeContextFilePath,e.i18nUseExternalIds),m=d.buildTemplateFunction(h.nodes,[]),g=d.getNgContentSelectors();g&&s.set("ngContentSelectors",g),s.set("decls",We(d.getConstCount())),s.set("vars",We(d.getVarCount()));const{constExpressions:v,prepareStatements:f}=d.getConsts();if(v.length>0){let e=Ue(v);f.length>0&&(e=qe([],[...f,new Re(e)])),s.set("consts",e)}if(s.set("template",m),c.size){let t=Ue(Array.from(c));e.wrapDirectivesAndPipesInClosure&&(t=qe([],[new Re(t)])),s.set("directives",t)}if(u.size){let t=Ue(Array.from(u));e.wrapDirectivesAndPipesInClosure&&(t=qe([],[new Re(t)])),s.set("pipes",t)}if(null===e.encapsulation&&(e.encapsulation=T.Emulated),e.styles&&e.styles.length){const n=(e.encapsulation==T.Emulated?function(e,t,n){const s=new mr;return e.map(e=>s.shimCssText(e,"_ngcontent-%COMP%","_nghost-%COMP%"))}(e.styles):e.styles).map(e=>t.getConstLiteral(We(e)));s.set("styles",Ue(n))}else e.encapsulation===T.Emulated&&(e.encapsulation=T.None);e.encapsulation!==T.Emulated&&s.set("encapsulation",We(e.encapsulation)),null!==e.animations&&s.set("data",je([{key:"animation",value:e.animations,quoted:!1}])),null!=p&&p!==I.Default&&s.set("changeDetection",We(p));const y=De(yt.defineComponent).callFn([s.toLiteralMap()]),S=vo(e);return S.push(go(e.template.ngContentSelectors)),{expression:y,type:$e(De(yt.ComponentDefWithMeta,S))}}(Object.assign(Object.assign(Object.assign({},n),Io(n)),{selector:n.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:i,wrapDirectivesAndPipesInClosure:!1,styles:[...n.styles,...i.styles],encapsulation:n.encapsulation,interpolation:r,changeDetection:n.changeDetection,animations:null!=n.animations?new Y(n.animations):null,viewProviders:null!=n.viewProviders?new Y(n.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0}),s,so(r));return this.jitExpression(a.expression,e,`ng:///${n.name}.js`,s.statements)}compileFactory(e,t,n){const s=Fn({name:n.name,type:bo(n.type),internalType:new Y(n.type),typeArgumentCount:n.typeArgumentCount,deps:Po(n.deps),injectFn:"directiveInject"===n.injectFn?dt.directiveInject:dt.inject,target:n.target});return this.jitExpression(s.factory,e,t,s.statements)}createParseSourceSpan(e,t,n){return function(e,t,n){const s=new ls("",`in ${e} ${t} in ${n}`);return new cs(new os(s,-1,-1,-1),new os(s,-1,-1,-1))}(e,t,n)}jitExpression(e,t,n,s){const r=[...s,new Me("$def",e,void 0,[Ae.Exported])];return this.jitEvaluator.evaluateStatements(n,r,new gs(t),!0).$def}};const Do=Symbol("PROPERTY");function $o(e,t){const n=e.attributes.find(e=>e.name===t);if(n)return n.value;const s=e.inputs.find(e=>e.name===t);return s&&s.value instanceof Ks?s.value.ast instanceof Rs?s.value.ast.value:Do:null}var Vo=o({name:"accessibility-alt-text",meta:{type:"suggestion",docs:{description:"Enforces alternate text for elements which require the alt, aria-label, aria-labelledby attributes.",category:"Best Practices",recommended:!1},schema:[],messages:{accessibilityAltText:"<{{element}}/> element must have a text alternative."}},defaultOptions:[],create(e){const t=l(e);return{"Element[name=/^(img|area|object|input)$/]"(n){if(!function(e){return"img"===e.name?function(e){return e.attributes.some(({name:e})=>qo(e))||e.inputs.some(({name:e})=>qo(e))}(e):"object"===e.name?function(e){let t=!1,n=!1;for(const s of e.attributes)t="title"===s.name,n=jo(s.name);if(t||n)return!0;let s=!1,r=!1;for(const t of e.inputs)s="title"===t.name,r=jo(t.name);return!(!s&&!r)||e.children.length>0&&!!e.children[0].value}(e):"area"===e.name?Uo(e):function(e){return"image"!==$o(e,"type")||Uo(e)}(e)}(n)){const s=t.convertElementSourceSpanToLoc(e,n);e.report({loc:s,messageId:"accessibilityAltText",data:{element:n.name}})}}}}});function Uo(e){let t=!1,n=!1;for(const s of e.attributes)t=qo(s.name),n=jo(s.name);if(t||n)return!0;let s=!1,r=!1;for(const t of e.inputs)s=qo(t.name),r=jo(t.name);return s||r}function jo(e){return"aria-label"===e||"aria-labelledby"===e}function qo(e){return"alt"===e}const Ho=new Set(["innerHtml","innerHTML","innerText"]);var Wo=o({name:"accessibility-elements-content",meta:{type:"suggestion",docs:{description:"Ensures that the heading, anchor and button elements have content in it.",category:"Best Practices",recommended:!1},schema:[],messages:{accessibilityElementsContent:"<{{element}}/> should have content."}},defaultOptions:[],create(e){const t=l(e);return{"Element[name=/^(a|button|h1|h2|h3|h4|h5|h6)$/][children.length=0]"({inputs:n,name:s,sourceSpan:r}){if(n.some(({name:e})=>Ho.has(e)))return;const i=t.convertNodeSourceSpanToLoc(r);e.report({loc:i,messageId:"accessibilityElementsContent",data:{element:s}})}}}});const zo={items:{type:"string"},type:"array",uniqueItems:!0},Ko=["button","input","meter","output","progress","select","textarea"],Xo=["for","htmlFor"],Go=["label"];var Qo=o({name:"accessibility-label-for",meta:{type:"suggestion",docs:{description:"Ensures that a label element/component is associated with a form element",category:"Best Practices",recommended:!1},schema:[{additionalProperties:!1,properties:{controlComponents:zo,labelAttributes:zo,labelComponents:zo},type:"object"}],messages:{accessibilityLabelFor:"A label element/component must be associated with a form element"}},defaultOptions:[{controlComponents:Ko,labelAttributes:Xo,labelComponents:Go}],create(e,[t]){const n=l(e),{controlComponents:s,labelAttributes:r,labelComponents:i}=function({controlComponents:e,labelAttributes:t,labelComponents:n}){return{controlComponents:new Set([...Ko,...null!=e?e:[]]),labelAttributes:new Set([...Xo,...null!=t?t:[]]),labelComponents:new Set([...Go,...null!=n?n:[]])}}(t);var a;return{[`Element[name=${a=[...i],RegExp(`^(${a.join("|")})$`)}]`](t){const i=new Set([...t.attributes,...t.inputs].map(({name:e})=>e));if([...r].some(e=>i.has(e))||function(e,t){return Boolean([...e].some(e=>{return n=e,function e({children:t}){return t.some(t=>t instanceof Nt&&(t.name===n||e(t)))}(t);var n}))}(s,t))return;const a=n.convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:a,messageId:"accessibilityLabelFor"})}}}}),Yo=o({name:"accessibility-table-scope",meta:{type:"suggestion",docs:{description:"Ensures that scope is not used on any element except <th>",category:"Best Practices",recommended:!1},schema:[],messages:{accessibilityTableScope:"Scope attribute can only be on <th> element"}},defaultOptions:[],create(e){const t=l(e);return{'Element[name!="th"] > :matches(BoundAttribute[name="scope"], TextAttribute[name="scope"])'({sourceSpan:n}){const s=t.convertNodeSourceSpanToLoc(n);e.report({loc:s,messageId:"accessibilityTableScope"})}}}}),Jo=o({name:"accessibility-valid-aria",meta:{type:"suggestion",docs:{description:"Ensures that correct ARIA attributes and respective values are used",category:"Best Practices",recommended:!1},schema:[],messages:{accessibilityValidAria:"The `{{attribute}}` is an invalid ARIA attribute",accessibilityValidAriaValue:"The `{{attribute}}` has an invalid value. Check the valid values at https://raw.githack.com/w3c/aria/stable/#roles"}},defaultOptions:[],create(e){const t=l(e);return{"BoundAttribute[name=/^aria-.*/], TextAttribute[name=/^aria-.*/]"(n){const{name:r,sourceSpan:i}=n,a=s.aria.get(r),o=t.convertNodeSourceSpanToLoc(i);if(!a)return void e.report({loc:o,messageId:"accessibilityValidAria",data:{attribute:r}});const l=function(e){return e instanceof Tt?e.value.ast:e}(n);(function(e){return!function(e){return e instanceof Fs||e instanceof Bs}(e)&&!function(e){return e instanceof Rs||e instanceof bt}(e)})(l)||function({allowundefined:e,type:t,values:n},s){if(e&&el(s))return!0;switch(t){case"boolean":return Zo(s);case"tristate":return Zo(s)||el(s);case"id":case"idlist":return!0;case"integer":return r=s,!Number.isNaN(r)&&parseInt(Number(r))==r&&!Number.isNaN(parseInt(r,10));case"number":return function(e){return!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(e)}(s);case"string":return function(e){return"string"==typeof e}(s);case"token":case"tokenlist":{const e=Zo(s)?JSON.parse(s):s;return Boolean(null==n?void 0:n.includes(e))}}var r}(a,l.value)||e.report({loc:o,messageId:"accessibilityValidAriaValue",data:{attribute:r}})}}}});function Zo(e){return"boolean"==typeof e||"false"===e||"true"===e}function el(e){return null==e}const tl=/\[(.*)\]/;var nl=o({name:"banana-in-box",meta:{type:"suggestion",docs:{description:"Ensures that the two-way data binding syntax is correct",category:"Best Practices",recommended:"error"},fixable:"code",schema:[],messages:{bananaInBox:"Invalid binding syntax. Use [(expr)] instead"}},defaultOptions:[],create(e){const t=l(e),n=e.getSourceCode();return{BoundEvent({name:s,sourceSpan:r}){const i=s.match(tl);if(!i)return;const[,a]=i,o=`[(${a})]`,l=t.convertNodeSourceSpanToLoc(r),c=n.getIndexFromLoc(l.start);e.report({messageId:"bananaInBox",loc:l,fix:e=>e.replaceTextRange([c,c+s.length+2],o)})}}}});let sl=null;function rl(){return sl||(sl=new Set(s.dom.keys()))}const il=new Set(["presentation","none",Do]);function al(e){if("string"==typeof e){if("true"===e)return!0;if("false"===e)return!1}return e}let ol=null,ll=null,cl=null;var ul=o({name:"click-events-have-key-events",meta:{type:"suggestion",docs:{description:"Ensures that the click event is accompanied with at least one key event keyup, keydown or keypress.",category:"Best Practices",recommended:!1},schema:[],messages:{clickEventsHaveKeyEvents:"click must be accompanied by either keyup, keydown or keypress event for accessibility."}},defaultOptions:[],create:e=>({Element(t){if(!rl().has(t.name))return;if(function(e){const t=$o(e,"role");return null!==t&&il.has(t)}(t)||function(e){if("INPUT"===e.name.toUpperCase()){const t=$o(e,"type");if("string"==typeof t&&"HIDDEN"===t.toUpperCase())return!0}const t=al($o(e,"aria-hidden"));return t===Do||!0===t}(t)||function(e){return rl().has(e.name)&&function(e){function t(t){return e.name===t.name&&function(e=[],t){const n=[...t.attributes,...t.inputs];return e.every(e=>n.some(n=>"a"===t.name&&"routerLink"===n.name||e.name===n.name&&(!e.value||e.value===al($o(t,e.name)))))}(t.attributes,e)}return!!function(){if(null===ol){const e=[...s.roles.keys()],t=[...s.elementRoles],n=new Set(e.filter(e=>{const t=s.roles.get(e);return!t.abstract&&"progressbar"!==e&&t.superClass.some(e=>e.includes("widget"))}).concat("toolbar"));ol=t.reduce((e,[t,s])=>([...s].some(e=>n.has(e))&&e.push(t),e),[])}return ol}().some(t)||!function(){if(null===ll){const e=[...s.roles.keys()],t=[...s.elementRoles],n=new Set(e.filter(e=>{const t=s.roles.get(e);return!t.abstract&&"toolbar"!==e&&!t.superClass.some(e=>e.includes("widget"))}).concat("progressbar"));ll=t.reduce((e,[t,s])=>([...s].every(e=>n.has(e))&&e.push(t),e),[])}return ll}().some(t)&&!!function(){if(null===cl){const{AXObjects:e,elementAXObjects:t}=require("axobject-query"),n=new Set(Array.from(e.keys()).filter(t=>"widget"===e.get(t).type));cl=[...t].reduce((e,[t,s])=>([...s].every(e=>n.has(e))&&e.push(t),e),[])}return cl}().some(t)}(e)}(t))return;let n=!1,r=!1;for(const e of t.outputs)n="click"===e.name,r=e.name.startsWith("keyup")||e.name.startsWith("keydown")||e.name.startsWith("keypress");if(!n||r)return;const i=l(e).convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:i,messageId:"clickEventsHaveKeyEvents"})}})}),pl=o({name:"conditional-complexity",meta:{type:"suggestion",docs:{description:"The conditional complexity should not exceed a rational limit",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{maxComplexity:{minimum:1,type:"number"}},additionalProperties:!1}],messages:{"conditionalСomplexity":'The conditional complexity "{{totalComplexity}}" exceeds the defined limit "{{maxComplexity}}"'}},defaultOptions:[{maxComplexity:5}],create(e,[{maxComplexity:t}]){const n=e.getSourceCode(),s=l(e);return{BoundAttribute({value:{source:n},sourceSpan:r}){if(!n)return;const i=n.replace(/\s/g,""),a=ml(hl((dl||(dl=new na(new ji))).parseBinding(i,null,0).ast));if(a<=t)return;const o=s.convertNodeSourceSpanToLoc(r);e.report({loc:o,messageId:"conditionalСomplexity",data:{maxComplexity:t,totalComplexity:a}})},Interpolation({expressions:s}){for(const r of s){const s=ml(r);if(s<=t)continue;const{sourceSpan:{end:i,start:a}}=r,o={end:n.getLocFromIndex(i),start:n.getLocFromIndex(a)};e.report({loc:o,messageId:"conditionalСomplexity",data:{maxComplexity:t,totalComplexity:s}})}}}}});function hl(e){return e instanceof Os?e.exp:e}let dl=null;function ml(e){const t=hl(e);if(!(t instanceof $s||t instanceof Ns))return 0;let n=1;return t instanceof $s&&(t.left instanceof $s&&(n+=ml(t.left)),t.right instanceof $s&&(n+=ml(t.right))),t instanceof Ns&&(n+=ml(t.condition)+ml(t.trueExp)+ml(t.falseExp)),n}var gl=o({name:"cyclomatic-complexity",meta:{type:"suggestion",docs:{description:"Checks cyclomatic complexity against a specified limit. It is a quantitative measure of the number of linearly independent paths through a program's source code",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{maxComplexity:{type:"number",minimum:1}},additionalProperties:!1}],messages:{cyclomaticComplexity:'The cyclomatic complexity "{{totalComplexity}}" exceeds the defined limit "{{maxComplexity}}"'}},defaultOptions:[{maxComplexity:5}],create(e,[{maxComplexity:t}]){let n=0;const s=l(e);return{'BoundAttribute[name=/^(ngForOf|ngIf|ngSwitchCase)$/], TextAttribute[name="ngSwitchDefault"]'({sourceSpan:r}){if(n+=1,n<=t)return;const i=s.convertNodeSourceSpanToLoc(r);e.report({messageId:"cyclomaticComplexity",loc:i,data:{maxComplexity:t,totalComplexity:n}})}}}});const vl=["Text","Icu"],fl=["class","style","color","svgIcon","href","src","id","lang","charset","height","width","target","type","colspan","uiSref","uiSrefActive","ui-view","xmlns","stroke-width","stroke","fill","viewBox","tabindex","formControlName"],yl=[],Sl=/[A-Z]/i,xl={checkId:!0,checkText:!0,checkAttributes:!0,ignoreAttributes:[""],ignoreTags:[],boundTextAllowedPattern:""};var El=o({name:"i18n",meta:{type:"suggestion",docs:{description:"Helps to ensure following best practices for i18n. Checks for missing i18n attributes on elements and non-ignored attributes containing text. Can also highlight tags that do not use Custom ID (@@) feature. Default Config = "+JSON.stringify(xl),category:"Best Practices",recommended:!1},fixable:"code",schema:[{type:"object",properties:{checkId:{type:"boolean"},checkText:{type:"boolean"},checkAttributes:{type:"boolean"},ignoreAttributes:{type:"array",items:{type:"string"}},ignoreTags:{type:"array",items:{type:"string"}},boundTextAllowedPattern:{type:"string"}},additionalProperties:!1}],messages:{i18nId:"Missing custom message identifier. For more information visit https://angular.io/guide/i18n#use-a-custom-id-with-a-description",i18nIdOnAttrib:"Missing custom message identifier on attribute '{{attribName}}'. For more information visit https://angular.io/guide/i18n#use-a-custom-id-with-a-description",i18nText:"Each element containing text node should have an i18n attribute. See https://angular.io/guide/i18n",i18nAttrib:"Attribute '{{attribName}}' has no corresponding i18n attribute. See https://angular.io/guide/i18n#translate-attributes",i18nSuggestIgnore:"Add the attribute name '{{attribName}}' to the ignoreAttributes option in the eslint config."}},defaultOptions:[xl],create(e,[t]){const n=l(e),s=e.getSourceCode(),{checkId:r,checkText:i,checkAttributes:a,ignoreAttributes:o,ignoreTags:c,boundTextAllowedPattern:u}=t,p=c&&c.length>0?c:yl,h=u?new RegExp(u):Sl,d=[...fl];function m(t,o){const l=n.convertNodeSourceSpanToLoc(t.sourceSpan);let c=s.getIndexFromLoc(l.start)+1;c+=o.length,t.attributes.forEach(t=>{t.i18n?r&&!t.i18n.customId&&e.report({messageId:"i18nIdOnAttrib",loc:l,data:{attribName:t.name}}):!(a&&t.value&&"string"==typeof t.value&&t.value.length>0&&"true"!==t.value&&"false"!==t.value)||function(e){let t=e;return t.endsWith("px")&&(t=t.substr(0,t.length-2)),String(Number(t))===String(t)}(t.value)||t.name.startsWith(":xml")||d.includes(t.name)||d.includes(o+"["+t.name+"]")||e.report({messageId:"i18nAttrib",loc:l,data:{attribName:t.name},fix:e=>e.replaceTextRange([c,c]," i18n-"+t.name),suggest:[{messageId:"i18nSuggestIgnore",data:{attribName:t.name},fix:e=>e.insertTextBeforeRange([0,0],"")}]})}),t.i18n?r&&(t.i18n.customId||e.report({messageId:"i18nId",loc:l})):!i||p&&-1!==p.indexOf(t.name)||t.children&&t.children.some(e=>vl.includes(e.type)||"BoundText"===e.type&&h.test(e.value.ast.strings.join("").trim()))&&e.report({messageId:"i18nText",loc:l,fix:e=>e.replaceTextRange([c,c]," i18n")})}return o&&o.length>0&&d.push(...o),{Element(e){m(e,e.name)},Template(e){m(e,e.tagName)}}}}),_l=o({name:"mouse-events-have-key-events",meta:{type:"suggestion",docs:{description:"Ensures that the Mouse Events mouseover and mouseout are accompanied with Key Events focus and blur.",category:"Best Practices",recommended:!1},schema:[],messages:{mouseOverEventHasFocusEvent:"mouseover must be accompanied by focus event for accessibility.",mouseOutEventHasBlurEvent:"mouseout must be accompanied by blur event for accessibility"}},defaultOptions:[],create(e){const t=l(e);return{Element(n){let s=!1,r=!1,i=!1,a=!1;for(const e of n.outputs)s="mouseover"===e.name,r="mouseout"===e.name,i="focus"===e.name,a="blur"===e.name;if(!s&&!r)return;const o=t.convertNodeSourceSpanToLoc(n.sourceSpan);s&&!i&&e.report({loc:o,messageId:"mouseOverEventHasFocusEvent"}),r&&!a&&e.report({loc:o,messageId:"mouseOutEventHasBlurEvent"})}}}}),Cl=o({name:"no-any",meta:{type:"suggestion",docs:{description:'The use of "$any" nullifies the compile-time benefits of the Angular\'s type system.',category:"Best Practices",recommended:!1},schema:[],messages:{noAny:'Avoid using "$any" in templates'}},defaultOptions:[],create(e){c(e);const t=e.getSourceCode();return{'MethodCall[name="$any"][receiver.expression=undefined][receiver.name=undefined]'({sourceSpan:{end:n,start:s}}){const r={start:t.getLocFromIndex(s),end:t.getLocFromIndex(n)};e.report({messageId:"noAny",loc:r})}}}}),wl=o({name:"no-autofocus",meta:{type:"suggestion",docs:{description:"Ensure that autofocus attribute is not used",category:"Best Practices",recommended:!1},schema:[],messages:{noAutofocus:"autofocus attribute should not be used, as it reduces usability and accessibility for users"}},defaultOptions:[],create(e){const t=l(e);return{'TextAttribute[name="autofocus"], BoundAttribute[name="autofocus"]'(n){const s=t.convertNodeSourceSpanToLoc(n.sourceSpan);e.report({loc:s,messageId:"noAutofocus"})}}}}),bl=o({name:"no-call-expression",meta:{type:"suggestion",docs:{description:"Disallows calling expressions in templates, except for output handlers",category:"Best Practices",recommended:!1},schema:[],messages:{noCallExpression:"Avoid calling expressions in templates"}},defaultOptions:[],create(e){c(e);const t=e.getSourceCode();return{':not(BoundEvent) > * > :matches(MethodCall[name!="$any"], SafeMethodCall)'({sourceSpan:{end:n,start:s}}){const r={start:t.getLocFromIndex(s),end:t.getLocFromIndex(n)};e.report({messageId:"noCallExpression",loc:r})}}}}),Tl=o({name:"no-distracting-elements",meta:{type:"suggestion",docs:{description:"Enforces that no distracting elements are used",category:"Best Practices",recommended:!1},schema:[],messages:{noDistractingElements:"Do not use <{{element}}> elements as they can create visual accessibility issues and are deprecated"}},defaultOptions:[],create(e){const t=l(e);return{"Element[name=/^(blink|marquee)$/]"({name:n,sourceSpan:s}){const r=t.convertNodeSourceSpanToLoc(s);e.report({loc:r,messageId:"noDistractingElements",data:{element:n}})}}}}),Il=o({name:"no-duplicate-attributes",meta:{type:"problem",docs:{description:"Ensures that there are no duplicate input properties or output event listeners",category:"Possible Errors",recommended:!1},schema:[{type:"object",properties:{allowTwoWayDataBinding:{type:"boolean"}},additionalProperties:!1}],messages:{noDuplicateAttributes:'Duplicate attribute "{{attributeName}}"'}},defaultOptions:[{allowTwoWayDataBinding:!0}],create(e,[{allowTwoWayDataBinding:t}]){const n=l(e);return{Element({inputs:s,outputs:r,attributes:i}){[...Al([...s,...i]),...Al(t?r.filter(e=>!s.some(t=>t.sourceSpan.start===e.sourceSpan.start&&t.sourceSpan.end===e.sourceSpan.end)):r)].forEach(t=>{const s=n.convertNodeSourceSpanToLoc(t.sourceSpan);e.report({messageId:"noDuplicateAttributes",loc:s,data:{attributeName:Nl(t)}})})}}}});function Nl(e){if("type"in e)if("BoundAttribute"===e.type)switch(e.__originalType){case 2:return"class."+e.name;case 3:return`style.${e.name}${e.unit?"."+e.unit:""}`;case 4:return"@"+e.name}else if("BoundEvent"===e.type){if(1===e.__originalType)return`@${e.name}${e.phase?"."+e.phase:""}`;if(e.target)return`${e.target}:${e.name}`}return e.name}function Al(e){return e.filter(t=>e.some(e=>e!==t&&Nl(e)===Nl(t)))}var Pl=o({name:"no-negated-async",meta:{type:"suggestion",docs:{description:"Ensures that strict equality is used when evaluating negations on async pipe output",category:"Best Practices",recommended:"error"},schema:[],messages:{noNegatedAsync:"Async pipes should not be negated. Use (observable | async) === (false | null | undefined) to check its value instead",noLooseEquality:"Async pipes must use strict equality `===` when comparing with `false`"}},defaultOptions:[],create(e){c(e);const t=e.getSourceCode();return{"PrefixNot > BindingPipe[name=async]"({parent:{parent:{type:n},sourceSpan:{end:s,start:r}}}){const i=kl(n)?-1:0,a={start:t.getLocFromIndex(r+i),end:t.getLocFromIndex(s+i)};e.report({messageId:"noNegatedAsync",loc:a})},'Binary[operation="=="] > BindingPipe[name=async]'({parent:{parent:{type:n},sourceSpan:{end:s,start:r}}}){const i=kl(n)?-2:-1,a=kl(n)?-1:0,o={start:t.getLocFromIndex(r+i),end:t.getLocFromIndex(s+a)};e.report({messageId:"noLooseEquality",loc:o})}}}});function kl(e){return"Interpolation"===e}var Ml=o({name:"no-positive-tabindex",meta:{type:"suggestion",docs:{description:"Ensures that the tabindex attribute is not positive",category:"Best Practices",recommended:!1},schema:[],messages:{noPositiveTabindex:"tabindex attribute cannot be positive"}},defaultOptions:[],create(e){const t=l(e);return{'BoundAttribute[name="tabindex"][value.ast.value>0], TextAttribute[name="tabindex"][value>0]'({sourceSpan:n}){const s=t.convertNodeSourceSpanToLoc(n);e.report({loc:s,messageId:"noPositiveTabindex"})}}}});function Ll(){return(Ll=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}var Ol=o({name:"use-track-by-function",meta:{type:"suggestion",docs:{description:"Ensures trackBy function is used.",category:"Best Practices",recommended:!1},schema:[],messages:{useTrackByFunction:"Missing trackBy function in ngFor directive"}},defaultOptions:[],create(e){const t=l(e);return{'BoundAttribute.inputs[name="ngForOf"]'(n){if(n.parent.inputs.some(e=>"BoundAttribute"===e.type&&"ngForTrackBy"===e.name))return;const s=t.convertNodeSourceSpanToLoc(n.sourceSpan);e.report({messageId:"useTrackByFunction",loc:s})},'BoundAttribute.templateAttrs[name="ngForOf"]'(n){const s=n.parent.templateAttrs;if(s.some(e=>"BoundAttribute"===e.type&&"ngForTrackBy"===e.name))return;const r=t.convertNodeSourceSpanToLoc(s[0].sourceSpan).start,i=t.convertNodeSourceSpanToLoc(s[s.length-1].sourceSpan).end,a={start:Ll({},r,{column:r.column-1}),end:Ll({},i,{column:i.column+1})};e.report({messageId:"useTrackByFunction",loc:a})}}}});module.exports={configs:{all:{extends:"./configs/base.json",rules:{"@angular-eslint/template/accessibility-alt-text":"error","@angular-eslint/template/accessibility-elements-content":"error","@angular-eslint/template/accessibility-label-for":"error","@angular-eslint/template/accessibility-table-scope":"error","@angular-eslint/template/accessibility-valid-aria":"error","@angular-eslint/template/banana-in-box":"error","@angular-eslint/template/click-events-have-key-events":"error","@angular-eslint/template/conditional-complexity":"error","@angular-eslint/template/cyclomatic-complexity":"error","@angular-eslint/template/i18n":"error","@angular-eslint/template/mouse-events-have-key-events":"error","@angular-eslint/template/no-any":"error","@angular-eslint/template/no-autofocus":"error","@angular-eslint/template/no-call-expression":"error","@angular-eslint/template/no-distracting-elements":"error","@angular-eslint/template/no-duplicate-attributes":"error","@angular-eslint/template/no-negated-async":"error","@angular-eslint/template/no-positive-tabindex":"error","@angular-eslint/template/use-track-by-function":"error"}},base:{parser:"@angular-eslint/template-parser",plugins:["@angular-eslint/template"]},recommended:{extends:"./configs/base.json",rules:{"@angular-eslint/template/banana-in-box":"error","@angular-eslint/template/no-negated-async":"error"}},"process-inline-templates":{parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:2020,sourceType:"module"},plugins:["@angular-eslint/template"],processor:"@angular-eslint/template/extract-inline-html"}},processors:a,rules:{"accessibility-alt-text":Vo,"accessibility-elements-content":Wo,"accessibility-label-for":Qo,"accessibility-table-scope":Yo,"accessibility-valid-aria":Jo,"banana-in-box":nl,"conditional-complexity":pl,"click-events-have-key-events":ul,"cyclomatic-complexity":gl,i18n:El,"mouse-events-have-key-events":_l,"no-any":Cl,"no-autofocus":wl,"no-call-expression":bl,"no-distracting-elements":Tl,"no-duplicate-attributes":Il,"no-negated-async":Pl,"no-positive-tabindex":Ml,"use-track-by-function":Ol}};
|