@angular/language-service 8.0.0-rc.3 → 8.0.1
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/bundles/language-service.umd.js +184 -107
- package/bundles/language-service.umd.min.js +128 -128
- package/package.json +1 -1
- package/src/version.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v8.0.
|
|
2
|
+
* @license Angular v8.0.1
|
|
3
3
|
* (c) 2010-2019 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -25,28 +25,28 @@ var x,E,S=function(){function e(e){var t=this,n=void 0===e?{}:e,r=n.closedByChil
|
|
|
25
25
|
*
|
|
26
26
|
* Use of this source code is governed by an MIT-style license that can be
|
|
27
27
|
* found in the LICENSE file at https://angular.io/license
|
|
28
|
-
*/var T,N,k=new RegExp("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-.\\w*]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g"),A=function(){function e(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return e.parse=function(t){var n,r=[],i=function(e,t){t.notSelectors.length>0&&!t.element&&0==t.classNames.length&&0==t.attrs.length&&(t.element="*"),e.push(t)},o=new e,s=o,a=!1;for(k.lastIndex=0;n=k.exec(t);){if(n[1]){if(a)throw new Error("Nesting :not is not allowed in a selector");a=!0,s=new e,o.notSelectors.push(s)}if(n[2]&&s.setElement(n[2]),n[3]&&s.addClassName(n[3]),n[4]&&s.addAttribute(n[4],n[6]),n[7]&&(a=!1,s=o),n[8]){if(a)throw new Error("Multiple selectors in :not are not supported");i(r,o),o=s=new e}}return i(r,o),r},e.prototype.isElementSelector=function(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length},e.prototype.hasElementSelector=function(){return!!this.element},e.prototype.setElement=function(e){void 0===e&&(e=null),this.element=e},e.prototype.getMatchingElementTemplate=function(){for(var e=this.element||"div",t=this.classNames.length>0?' class="'+this.classNames.join(" ")+'"':"",n="",r=0;r<this.attrs.length;r+=2)n+=" "+this.attrs[r]+(""!==this.attrs[r+1]?'="'+this.attrs[r+1]+'"':"");return C(e).isVoid?"<"+e+t+n+"/>":"<"+e+t+n+"></"+e+">"},e.prototype.getAttrs=function(){var e=[];return this.classNames.length>0&&e.push("class",this.classNames.join(" ")),e.concat(this.attrs)},e.prototype.addAttribute=function(e,t){void 0===t&&(t=""),this.attrs.push(e,t&&t.toLowerCase()||"")},e.prototype.addClassName=function(e){this.classNames.push(e.toLowerCase())},e.prototype.toString=function(){var e=this.element||"";if(this.classNames&&this.classNames.forEach(function(t){return e+="."+t}),this.attrs)for(var t=0;t<this.attrs.length;t+=2){var n=this.attrs[t+1];e+="["+this.attrs[t]+(n?"="+n:"")+"]"}return this.notSelectors.forEach(function(t){return e+=":not("+t+")"}),e},e}(),P=function(){function e(){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=[]}return e.createNotMatcher=function(t){var n=new e;return n.addSelectables(t,null),n},e.prototype.addSelectables=function(e,t){var n=null;e.length>1&&(n=new I(e),this._listContexts.push(n));for(var r=0;r<e.length;r++)this._addSelectable(e[r],t,n)},e.prototype._addSelectable=function(e,t,n){var r=this,i=e.element,o=e.classNames,s=e.attrs,a=new M(e,t,n);if(i&&(0===s.length&&0===o.length?this._addTerminal(r._elementMap,i,a):r=this._addPartial(r._elementPartialMap,i)),o)for(var u=0;u<o.length;u++){var l=o[u];0===s.length&&u===o.length-1?this._addTerminal(r._classMap,l,a):r=this._addPartial(r._classPartialMap,l)}if(s)for(u=0;u<s.length;u+=2){var c=s[u],p=s[u+1];if(u===s.length-2){var h=r._attrValueMap,f=h.get(c);f||(f=new Map,h.set(c,f)),this._addTerminal(f,p,a)}else{var d=r._attrValuePartialMap,v=d.get(c);v||(v=new Map,d.set(c,v)),r=this._addPartial(v,p)}}},e.prototype._addTerminal=function(e,t,n){var r=e.get(t);r||e.set(t,r=[]),r.push(n)},e.prototype._addPartial=function(t,n){var r=t.get(n);return r||(r=new e,t.set(n,r)),r},e.prototype.match=function(e,t){for(var n=!1,r=e.element,i=e.classNames,o=e.attrs,s=0;s<this._listContexts.length;s++)this._listContexts[s].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,r,e,t)||n,n=this._matchPartial(this._elementPartialMap,r,e,t)||n,i)for(s=0;s<i.length;s++){var a=i[s];n=this._matchTerminal(this._classMap,a,e,t)||n,n=this._matchPartial(this._classPartialMap,a,e,t)||n}if(o)for(s=0;s<o.length;s+=2){var u=o[s],l=o[s+1],c=this._attrValueMap.get(u);l&&(n=this._matchTerminal(c,"",e,t)||n),n=this._matchTerminal(c,l,e,t)||n;var p=this._attrValuePartialMap.get(u);l&&(n=this._matchPartial(p,"",e,t)||n),n=this._matchPartial(p,l,e,t)||n}return n},e.prototype._matchTerminal=function(e,t,n,r){if(!e||"string"!=typeof t)return!1;var i=e.get(t)||[],o=e.get("*");if(o&&(i=i.concat(o)),0===i.length)return!1;for(var s=!1,a=0;a<i.length;a++)s=i[a].finalize(n,r)||s;return s},e.prototype._matchPartial=function(e,t,n,r){if(!e||"string"!=typeof t)return!1;var i=e.get(t);return!!i&&i.match(n,r)},e}(),I=function I(e){this.selectors=e,this.alreadyMatched=!1},M=function(){function e(e,t,n){this.selector=e,this.cbContext=t,this.listContext=n,this.notSelectors=e.notSelectors}return e.prototype.finalize=function(e,t){var n=!0;return!(this.notSelectors.length>0)||this.listContext&&this.listContext.alreadyMatched||(n=!P.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},e}(),O=re("Inject",function(e){return{token:e}}),R=re("InjectionToken",function(e){return{_desc:e,ngInjectableDef:void 0}}),D=re("Attribute",function(e){return{attributeName:e}}),L=re("ContentChildren",function(e,t){return void 0===t&&(t={}),a({selector:e,first:!1,isViewQuery:!1,descendants:!1},t)}),F=re("ContentChild",function(e,t){return void 0===t&&(t={}),a({selector:e,first:!0,isViewQuery:!1,descendants:!0},t)}),j=re("ViewChildren",function(e,t){return void 0===t&&(t={}),a({selector:e,first:!1,isViewQuery:!0,descendants:!0},t)}),V=re("ViewChild",function(e,t){return a({selector:e,first:!0,isViewQuery:!0,descendants:!0},t)}),H=re("Directive",function(e){return void 0===e&&(e={}),e});!function(e){e[e.Emulated=0]="Emulated",e[e.Native=1]="Native",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"}(T||(T={})),function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"}(N||(N={}));var B,U,q,K=re("Component",function(e){return void 0===e&&(e={}),a({changeDetection:N.Default},e)}),z=re("Pipe",function(e){return a({pure:!0},e)}),W=re("Input",function(e){return{bindingPropertyName:e}}),Q=re("Output",function(e){return{bindingPropertyName:e}})
|
|
28
|
+
*/var T,N,k=new RegExp("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-.\\w*]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g"),A=function(){function e(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return e.parse=function(t){var n,r=[],i=function(e,t){t.notSelectors.length>0&&!t.element&&0==t.classNames.length&&0==t.attrs.length&&(t.element="*"),e.push(t)},o=new e,s=o,a=!1;for(k.lastIndex=0;n=k.exec(t);){if(n[1]){if(a)throw new Error("Nesting :not is not allowed in a selector");a=!0,s=new e,o.notSelectors.push(s)}if(n[2]&&s.setElement(n[2]),n[3]&&s.addClassName(n[3]),n[4]&&s.addAttribute(n[4],n[6]),n[7]&&(a=!1,s=o),n[8]){if(a)throw new Error("Multiple selectors in :not are not supported");i(r,o),o=s=new e}}return i(r,o),r},e.prototype.isElementSelector=function(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length},e.prototype.hasElementSelector=function(){return!!this.element},e.prototype.setElement=function(e){void 0===e&&(e=null),this.element=e},e.prototype.getMatchingElementTemplate=function(){for(var e=this.element||"div",t=this.classNames.length>0?' class="'+this.classNames.join(" ")+'"':"",n="",r=0;r<this.attrs.length;r+=2)n+=" "+this.attrs[r]+(""!==this.attrs[r+1]?'="'+this.attrs[r+1]+'"':"");return C(e).isVoid?"<"+e+t+n+"/>":"<"+e+t+n+"></"+e+">"},e.prototype.getAttrs=function(){var e=[];return this.classNames.length>0&&e.push("class",this.classNames.join(" ")),e.concat(this.attrs)},e.prototype.addAttribute=function(e,t){void 0===t&&(t=""),this.attrs.push(e,t&&t.toLowerCase()||"")},e.prototype.addClassName=function(e){this.classNames.push(e.toLowerCase())},e.prototype.toString=function(){var e=this.element||"";if(this.classNames&&this.classNames.forEach(function(t){return e+="."+t}),this.attrs)for(var t=0;t<this.attrs.length;t+=2){var n=this.attrs[t+1];e+="["+this.attrs[t]+(n?"="+n:"")+"]"}return this.notSelectors.forEach(function(t){return e+=":not("+t+")"}),e},e}(),P=function(){function e(){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=[]}return e.createNotMatcher=function(t){var n=new e;return n.addSelectables(t,null),n},e.prototype.addSelectables=function(e,t){var n=null;e.length>1&&(n=new I(e),this._listContexts.push(n));for(var r=0;r<e.length;r++)this._addSelectable(e[r],t,n)},e.prototype._addSelectable=function(e,t,n){var r=this,i=e.element,o=e.classNames,s=e.attrs,a=new M(e,t,n);if(i&&(0===s.length&&0===o.length?this._addTerminal(r._elementMap,i,a):r=this._addPartial(r._elementPartialMap,i)),o)for(var u=0;u<o.length;u++){var l=o[u];0===s.length&&u===o.length-1?this._addTerminal(r._classMap,l,a):r=this._addPartial(r._classPartialMap,l)}if(s)for(u=0;u<s.length;u+=2){var c=s[u],p=s[u+1];if(u===s.length-2){var h=r._attrValueMap,f=h.get(c);f||(f=new Map,h.set(c,f)),this._addTerminal(f,p,a)}else{var d=r._attrValuePartialMap,v=d.get(c);v||(v=new Map,d.set(c,v)),r=this._addPartial(v,p)}}},e.prototype._addTerminal=function(e,t,n){var r=e.get(t);r||e.set(t,r=[]),r.push(n)},e.prototype._addPartial=function(t,n){var r=t.get(n);return r||(r=new e,t.set(n,r)),r},e.prototype.match=function(e,t){for(var n=!1,r=e.element,i=e.classNames,o=e.attrs,s=0;s<this._listContexts.length;s++)this._listContexts[s].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,r,e,t)||n,n=this._matchPartial(this._elementPartialMap,r,e,t)||n,i)for(s=0;s<i.length;s++){var a=i[s];n=this._matchTerminal(this._classMap,a,e,t)||n,n=this._matchPartial(this._classPartialMap,a,e,t)||n}if(o)for(s=0;s<o.length;s+=2){var u=o[s],l=o[s+1],c=this._attrValueMap.get(u);l&&(n=this._matchTerminal(c,"",e,t)||n),n=this._matchTerminal(c,l,e,t)||n;var p=this._attrValuePartialMap.get(u);l&&(n=this._matchPartial(p,"",e,t)||n),n=this._matchPartial(p,l,e,t)||n}return n},e.prototype._matchTerminal=function(e,t,n,r){if(!e||"string"!=typeof t)return!1;var i=e.get(t)||[],o=e.get("*");if(o&&(i=i.concat(o)),0===i.length)return!1;for(var s=!1,a=0;a<i.length;a++)s=i[a].finalize(n,r)||s;return s},e.prototype._matchPartial=function(e,t,n,r){if(!e||"string"!=typeof t)return!1;var i=e.get(t);return!!i&&i.match(n,r)},e}(),I=function I(e){this.selectors=e,this.alreadyMatched=!1},M=function(){function e(e,t,n){this.selector=e,this.cbContext=t,this.listContext=n,this.notSelectors=e.notSelectors}return e.prototype.finalize=function(e,t){var n=!0;return!(this.notSelectors.length>0)||this.listContext&&this.listContext.alreadyMatched||(n=!P.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},e}(),O=re("Inject",function(e){return{token:e}}),R=re("InjectionToken",function(e){return{_desc:e,ngInjectableDef:void 0}}),D=re("Attribute",function(e){return{attributeName:e}}),L=re("ContentChildren",function(e,t){return void 0===t&&(t={}),a({selector:e,first:!1,isViewQuery:!1,descendants:!1},t)}),F=re("ContentChild",function(e,t){return void 0===t&&(t={}),a({selector:e,first:!0,isViewQuery:!1,descendants:!0},t)}),j=re("ViewChildren",function(e,t){return void 0===t&&(t={}),a({selector:e,first:!1,isViewQuery:!0,descendants:!0},t)}),V=re("ViewChild",function(e,t){return a({selector:e,first:!0,isViewQuery:!0,descendants:!0},t)}),H=re("Directive",function(e){return void 0===e&&(e={}),e});!function(e){e[e.Emulated=0]="Emulated",e[e.Native=1]="Native",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"}(T||(T={})),function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"}(N||(N={}));var B,U,q,K=re("Component",function(e){return void 0===e&&(e={}),a({changeDetection:N.Default},e)}),z=re("Pipe",function(e){return a({pure:!0},e)}),W=re("Input",function(e){return{bindingPropertyName:e}}),Q=re("Output",function(e){return{bindingPropertyName:e}}),$=re("HostBinding",function(e){return{hostPropertyName:e}}),G=re("HostListener",function(e,t){return{eventName:e,args:t}}),X=re("NgModule",function(e){return e}),Y=re("Injectable",function(e){return void 0===e&&(e={}),e}),Z=re("Optional"),J=re("Self"),ee=re("SkipSelf"),te=re("Host"),ne=Function;function re(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t?t.apply(void 0,f(n)):{};return a({ngMetadataName:e},i)}return n.isTypeOf=function(t){return t&&t.ngMetadataName===e},n.ngMetadataName=e,n}function ie(e){var t=function n(e){var t=e.classNames&&e.classNames.length?f([8],e.classNames):[];return f([e.element&&"*"!==e.element?e.element:""],e.attrs,t)}(e),r=e.notSelectors&&e.notSelectors.length?e.notSelectors.map(function(e){return function t(e){var t=e.classNames&&e.classNames.length?f([8],e.classNames):[];return e.element?f([5,e.element],e.attrs,t):e.attrs.length?f([3],e.attrs,t):e.classNames&&e.classNames.length?f([9],e.classNames):[]}(e)}):[];return t.concat.apply(t,f(r))}function oe(e){return e?A.parse(e).map(ie):[]}
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright Google Inc. All Rights Reserved.
|
|
32
32
|
*
|
|
33
33
|
* Use of this source code is governed by an MIT-style license that can be
|
|
34
34
|
* found in the LICENSE file at https://angular.io/license
|
|
35
|
-
*/!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"}(B||(B={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"}(U||(U={})),function(e){e[e.Const=0]="Const"}(q||(q={}));var se,ae=function(){function e(e){void 0===e&&(e=null),this.modifiers=e,e||(this.modifiers=[])}return e.prototype.hasModifier=function(e){return-1!==this.modifiers.indexOf(e)},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"}(se||(se={}));var ue,le=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,n)||this;return r.name=t,r}return o(t,e),t.prototype.visitType=function(e,t){return e.visitBuiltinType(this,t)},t}(ae),ce=function(e){function t(t,n,r){void 0===n&&(n=null),void 0===r&&(r=null);var i=e.call(this,n)||this;return i.value=t,i.typeParams=r,i}return o(t,e),t.prototype.visitType=function(e,t){return e.visitExpressionType(this,t)},t}(ae),pe=(function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,n)||this;return r.of=t,r}o(t,e),t.prototype.visitType=function(e,t){return e.visitArrayType(this,t)}}(ae),function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,n)||this;return r.valueType=t||null,r}return o(t,e),t.prototype.visitType=function(e,t){return e.visitMapType(this,t)},t}(ae)),he=new le(se.Dynamic),fe=new le(se.Inferred),de=new le(se.Bool),ve=(new le(se.Int),new le(se.Number)),me=(new le(se.String),new le(se.Function),new le(se.None));function ye(e,t){return null==e||null==t?e==t:e.isEquivalent(t)}function ge(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(!e[r].isEquivalent(t[r]))return!1;return!0}!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"}(ue||(ue={}));var _e,be=function(){function e(e,t){this.type=e||null,this.sourceSpan=t||null}return e.prototype.prop=function(e,t){return new Be(this,e,null,t)},e.prototype.key=function(e,t,n){return new Ue(this,e,t,n)},e.prototype.callMethod=function(e,t,n){return new Ae(this,e,t,null,n)},e.prototype.callFn=function(e,t){return new Pe(this,e,null,t)},e.prototype.instantiate=function(e,t,n){return new Ie(this,e,t,n)},e.prototype.conditional=function(e,t,n){return void 0===t&&(t=null),new Re(this,e,t,null,n)},e.prototype.equals=function(e,t){return new He(ue.Equals,this,e,null,t)},e.prototype.notEquals=function(e,t){return new He(ue.NotEquals,this,e,null,t)},e.prototype.identical=function(e,t){return new He(ue.Identical,this,e,null,t)},e.prototype.notIdentical=function(e,t){return new He(ue.NotIdentical,this,e,null,t)},e.prototype.minus=function(e,t){return new He(ue.Minus,this,e,null,t)},e.prototype.plus=function(e,t){return new He(ue.Plus,this,e,null,t)},e.prototype.divide=function(e,t){return new He(ue.Divide,this,e,null,t)},e.prototype.multiply=function(e,t){return new He(ue.Multiply,this,e,null,t)},e.prototype.modulo=function(e,t){return new He(ue.Modulo,this,e,null,t)},e.prototype.and=function(e,t){return new He(ue.And,this,e,null,t)},e.prototype.bitwiseAnd=function(e,t,n){return void 0===n&&(n=!0),new He(ue.BitwiseAnd,this,e,null,t,n)},e.prototype.or=function(e,t){return new He(ue.Or,this,e,null,t)},e.prototype.lower=function(e,t){return new He(ue.Lower,this,e,null,t)},e.prototype.lowerEquals=function(e,t){return new He(ue.LowerEquals,this,e,null,t)},e.prototype.bigger=function(e,t){return new He(ue.Bigger,this,e,null,t)},e.prototype.biggerEquals=function(e,t){return new He(ue.BiggerEquals,this,e,null,t)},e.prototype.isBlank=function(e){return this.equals(Ge,e)},e.prototype.cast=function(e,t){return new Fe(this,e,t)},e.prototype.toStmt=function(){return new Ze(this,null)},e}();!function(e){e[e.This=0]="This",e[e.Super=1]="Super",e[e.CatchError=2]="CatchError",e[e.CatchStack=3]="CatchStack"}(_e||(_e={}));var we,xe=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return"string"==typeof t?(i.name=t,i.builtin=null):(i.name=null,i.builtin=t),i}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.name===e.name&&this.builtin===e.builtin},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitReadVarExpr(this,t)},t.prototype.set=function(e){if(!this.name)throw new Error("Built in variable "+this.builtin+" can not be assigned to.");return new Ce(this.name,e,null,this.sourceSpan)},t}(be),Ee=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.expr=t,i}return o(t,e),t.prototype.visitExpression=function(e,t){return e.visitTypeofExpr(this,t)},t.prototype.isEquivalent=function(e){return e instanceof t&&e.expr.isEquivalent(this.expr)},t.prototype.isConstant=function(){return this.expr.isConstant()},t}(be),Se=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.node=t,i}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.node===e.node},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitWrappedNodeExpr(this,t)},t}(be),Ce=function(e){function t(t,n,r,i){var o=e.call(this,r||n.type,i)||this;return o.name=t,o.value=n,o}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.name===e.name&&this.value.isEquivalent(e.value)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitWriteVarExpr(this,t)},t.prototype.toDeclStmt=function(e,t){return new Xe(this.name,this.value,e,t,this.sourceSpan)},t.prototype.toConstDecl=function(){return this.toDeclStmt(fe,[ke.Final])},t}(be),Te=function(e){function t(t,n,r,i,o){var s=e.call(this,i||r.type,o)||this;return s.receiver=t,s.index=n,s.value=r,s}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)&&this.value.isEquivalent(e.value)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitWriteKeyExpr(this,t)},t}(be),Ne=function(e){function t(t,n,r,i,o){var s=e.call(this,i||r.type,o)||this;return s.receiver=t,s.name=n,s.value=r,s}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.value.isEquivalent(e.value)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitWritePropExpr(this,t)},t}(be);!function(e){e[e.ConcatArray=0]="ConcatArray",e[e.SubscribeObservable=1]="SubscribeObservable",e[e.Bind=2]="Bind"}(we||(we={}));var ke,Ae=function(e){function t(t,n,r,i,o){var s=e.call(this,i,o)||this;return s.receiver=t,s.args=r,"string"==typeof n?(s.name=n,s.builtin=null):(s.name=null,s.builtin=n),s}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.builtin===e.builtin&&ge(this.args,e.args)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitInvokeMethodExpr(this,t)},t}(be),Pe=function(e){function t(t,n,r,i,o){void 0===o&&(o=!1);var s=e.call(this,r,i)||this;return s.fn=t,s.args=n,s.pure=o,s}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.fn.isEquivalent(e.fn)&&ge(this.args,e.args)&&this.pure===e.pure},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitInvokeFunctionExpr(this,t)},t}(be),Ie=function(e){function t(t,n,r,i){var o=e.call(this,r,i)||this;return o.classExpr=t,o.args=n,o}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.classExpr.isEquivalent(e.classExpr)&&ge(this.args,e.args)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitInstantiateExpr(this,t)},t}(be),Me=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.value=t,i}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.value===e.value},t.prototype.isConstant=function(){return!0},t.prototype.visitExpression=function(e,t){return e.visitLiteralExpr(this,t)},t}(be),Oe=function(e){function t(t,n,r,i){void 0===r&&(r=null);var o=e.call(this,n,i)||this;return o.value=t,o.typeParams=r,o}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.value.name===e.value.name&&this.value.moduleName===e.value.moduleName&&this.value.runtime===e.value.runtime},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitExternalExpr(this,t)},t}(be),Re=function(e){function t(t,n,r,i,o){void 0===r&&(r=null);var s=e.call(this,i||n.type,o)||this;return s.condition=t,s.falseCase=r,s.trueCase=n,s}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.condition.isEquivalent(e.condition)&&this.trueCase.isEquivalent(e.trueCase)&&ye(this.falseCase,e.falseCase)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitConditionalExpr(this,t)},t}(be),De=function(e){function t(t,n){var r=e.call(this,de,n)||this;return r.condition=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.condition.isEquivalent(e.condition)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitNotExpr(this,t)},t}(be),Le=function(e){function t(t,n){var r=e.call(this,t.type,n)||this;return r.condition=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.condition.isEquivalent(e.condition)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitAssertNotNullExpr(this,t)},t}(be),Fe=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.value=t,i}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.value.isEquivalent(e.value)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitCastExpr(this,t)},t}(be),je=function(){function e(e,t){void 0===t&&(t=null),this.name=e,this.type=t}return e.prototype.isEquivalent=function(e){return this.name===e.name},e}(),Ve=function(e){function t(t,n,r,i,o){var s=e.call(this,r,i)||this;return s.params=t,s.statements=n,s.name=o,s}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&ge(this.params,e.params)&&ge(this.statements,e.statements)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitFunctionExpr(this,t)},t.prototype.toDeclStmt=function(e,t){return void 0===t&&(t=null),new Ye(e,this.params,this.statements,this.type,t,this.sourceSpan)},t}(be),He=function(e){function t(t,n,r,i,o,s){void 0===s&&(s=!0);var a=e.call(this,i||n.type,o)||this;return a.operator=t,a.rhs=r,a.parens=s,a.lhs=n,a}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.operator===e.operator&&this.lhs.isEquivalent(e.lhs)&&this.rhs.isEquivalent(e.rhs)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitBinaryOperatorExpr(this,t)},t}(be),Be=function(e){function t(t,n,r,i){var o=e.call(this,r,i)||this;return o.receiver=t,o.name=n,o}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitReadPropExpr(this,t)},t.prototype.set=function(e){return new Ne(this.receiver,this.name,e,null,this.sourceSpan)},t}(be),Ue=function(e){function t(t,n,r,i){var o=e.call(this,r,i)||this;return o.receiver=t,o.index=n,o}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitReadKeyExpr(this,t)},t.prototype.set=function(e){return new Te(this.receiver,this.index,e,null,this.sourceSpan)},t}(be),qe=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.entries=t,i}return o(t,e),t.prototype.isConstant=function(){return this.entries.every(function(e){return e.isConstant()})},t.prototype.isEquivalent=function(e){return e instanceof t&&ge(this.entries,e.entries)},t.prototype.visitExpression=function(e,t){return e.visitLiteralArrayExpr(this,t)},t}(be),Ke=function(){function e(e,t,n){this.key=e,this.value=t,this.quoted=n}return e.prototype.isEquivalent=function(e){return this.key===e.key&&this.value.isEquivalent(e.value)},e}(),ze=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.entries=t,i.valueType=null,n&&(i.valueType=n.valueType),i}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&ge(this.entries,e.entries)},t.prototype.isConstant=function(){return this.entries.every(function(e){return e.value.isConstant()})},t.prototype.visitExpression=function(e,t){return e.visitLiteralMapExpr(this,t)},t}(be),We=function(e){function t(t,n){var r=e.call(this,t[t.length-1].type,n)||this;return r.parts=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&ge(this.parts,e.parts)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitCommaExpr(this,t)},t}(be),Qe=(new xe(_e.This,null,null),new xe(_e.Super,null,null),new xe(_e.CatchError,null,null),new xe(_e.CatchStack,null,null),new Me(null,null,null)),Ge=new Me(null,fe,null);!function(e){e[e.Final=0]="Final",e[e.Private=1]="Private",e[e.Exported=2]="Exported",e[e.Static=3]="Static"}(ke||(ke={}));var $e=function(){function e(e,t){this.modifiers=e||[],this.sourceSpan=t||null}return e.prototype.hasModifier=function(e){return-1!==this.modifiers.indexOf(e)},e}(),Xe=function(e){function t(t,n,r,i,o){void 0===i&&(i=null);var s=e.call(this,i,o)||this;return s.name=t,s.value=n,s.type=r||n&&n.type||null,s}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.name===e.name&&(this.value?!!e.value&&this.value.isEquivalent(e.value):!e.value)},t.prototype.visitStatement=function(e,t){return e.visitDeclareVarStmt(this,t)},t}($e),Ye=function(e){function t(t,n,r,i,o,s){void 0===o&&(o=null);var a=e.call(this,o,s)||this;return a.name=t,a.params=n,a.statements=r,a.type=i||null,a}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&ge(this.params,e.params)&&ge(this.statements,e.statements)},t.prototype.visitStatement=function(e,t){return e.visitDeclareFunctionStmt(this,t)},t}($e),Ze=function(e){function t(t,n){var r=e.call(this,null,n)||this;return r.expr=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.expr.isEquivalent(e.expr)},t.prototype.visitStatement=function(e,t){return e.visitExpressionStmt(this,t)},t}($e),Je=function(e){function t(t,n){var r=e.call(this,null,n)||this;return r.value=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.value.isEquivalent(e.value)},t.prototype.visitStatement=function(e,t){return e.visitReturnStmt(this,t)},t}($e),et=function(){function e(e,t){this.modifiers=t,t||(this.modifiers=[]),this.type=e||null}return e.prototype.hasModifier=function(e){return-1!==this.modifiers.indexOf(e)},e}(),tt=(function(e){function t(t,n,r,i){void 0===r&&(r=null);var o=e.call(this,n,r)||this;return o.name=t,o.initializer=i,o}o(t,e),t.prototype.isEquivalent=function(e){return this.name===e.name}}(et),function(e){function t(t,n,r,i,o){void 0===o&&(o=null);var s=e.call(this,i,o)||this;return s.name=t,s.params=n,s.body=r,s}return o(t,e),t.prototype.isEquivalent=function(e){return this.name===e.name&&ge(this.body,e.body)},t}(et)),nt=function(e){function t(t,n,r,i){void 0===i&&(i=null);var o=e.call(this,r,i)||this;return o.name=t,o.body=n,o}return o(t,e),t.prototype.isEquivalent=function(e){return this.name===e.name&&ge(this.body,e.body)},t}(et),rt=function(e){function t(t,n,r,i,o,s,a,u){void 0===a&&(a=null);var l=e.call(this,a,u)||this;return l.name=t,l.parent=n,l.fields=r,l.getters=i,l.constructorMethod=o,l.methods=s,l}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.name===e.name&&ye(this.parent,e.parent)&&ge(this.fields,e.fields)&&ge(this.getters,e.getters)&&this.constructorMethod.isEquivalent(e.constructorMethod)&&ge(this.methods,e.methods)},t.prototype.visitStatement=function(e,t){return e.visitDeclareClassStmt(this,t)},t}($e),it=function(e){function t(t,n,r,i){void 0===r&&(r=[]);var o=e.call(this,null,i)||this;return o.condition=t,o.trueCase=n,o.falseCase=r,o}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.condition.isEquivalent(e.condition)&&ge(this.trueCase,e.trueCase)&&ge(this.falseCase,e.falseCase)},t.prototype.visitStatement=function(e,t){return e.visitIfStmt(this,t)},t}($e),ot=(function(e){function t(t,n,r){void 0===n&&(n=!1);var i=e.call(this,null,r)||this;return i.comment=t,i.multiline=n,i}o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t},t.prototype.visitStatement=function(e,t){return e.visitCommentStmt(this,t)}}($e),function(e){function t(t,n){void 0===t&&(t=[]);var r=e.call(this,null,n)||this;return r.tags=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.toString()===e.toString()},t.prototype.visitStatement=function(e,t){return e.visitJSDocCommentStmt(this,t)},t.prototype.toString=function(){return function e(t){var n,r;if(0===t.length)return"";var i="*\n";try{for(var o=p(t),s=o.next();!s.done;s=o.next())i+=" *",i+=gt(s.value).replace(/\n/g,"\n * "),i+="\n"}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i+" "}
|
|
35
|
+
*/!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"}(B||(B={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"}(U||(U={})),function(e){e[e.Const=0]="Const"}(q||(q={}));var se,ae=function(){function e(e){void 0===e&&(e=null),this.modifiers=e,e||(this.modifiers=[])}return e.prototype.hasModifier=function(e){return-1!==this.modifiers.indexOf(e)},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"}(se||(se={}));var ue,le=function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,n)||this;return r.name=t,r}return o(t,e),t.prototype.visitType=function(e,t){return e.visitBuiltinType(this,t)},t}(ae),ce=function(e){function t(t,n,r){void 0===n&&(n=null),void 0===r&&(r=null);var i=e.call(this,n)||this;return i.value=t,i.typeParams=r,i}return o(t,e),t.prototype.visitType=function(e,t){return e.visitExpressionType(this,t)},t}(ae),pe=(function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,n)||this;return r.of=t,r}o(t,e),t.prototype.visitType=function(e,t){return e.visitArrayType(this,t)}}(ae),function(e){function t(t,n){void 0===n&&(n=null);var r=e.call(this,n)||this;return r.valueType=t||null,r}return o(t,e),t.prototype.visitType=function(e,t){return e.visitMapType(this,t)},t}(ae)),he=new le(se.Dynamic),fe=new le(se.Inferred),de=new le(se.Bool),ve=(new le(se.Int),new le(se.Number)),me=(new le(se.String),new le(se.Function),new le(se.None));function ye(e,t){return null==e||null==t?e==t:e.isEquivalent(t)}function ge(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(!e[r].isEquivalent(t[r]))return!1;return!0}!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"}(ue||(ue={}));var _e,be=function(){function e(e,t){this.type=e||null,this.sourceSpan=t||null}return e.prototype.prop=function(e,t){return new Be(this,e,null,t)},e.prototype.key=function(e,t,n){return new Ue(this,e,t,n)},e.prototype.callMethod=function(e,t,n){return new Ae(this,e,t,null,n)},e.prototype.callFn=function(e,t){return new Pe(this,e,null,t)},e.prototype.instantiate=function(e,t,n){return new Ie(this,e,t,n)},e.prototype.conditional=function(e,t,n){return void 0===t&&(t=null),new Re(this,e,t,null,n)},e.prototype.equals=function(e,t){return new He(ue.Equals,this,e,null,t)},e.prototype.notEquals=function(e,t){return new He(ue.NotEquals,this,e,null,t)},e.prototype.identical=function(e,t){return new He(ue.Identical,this,e,null,t)},e.prototype.notIdentical=function(e,t){return new He(ue.NotIdentical,this,e,null,t)},e.prototype.minus=function(e,t){return new He(ue.Minus,this,e,null,t)},e.prototype.plus=function(e,t){return new He(ue.Plus,this,e,null,t)},e.prototype.divide=function(e,t){return new He(ue.Divide,this,e,null,t)},e.prototype.multiply=function(e,t){return new He(ue.Multiply,this,e,null,t)},e.prototype.modulo=function(e,t){return new He(ue.Modulo,this,e,null,t)},e.prototype.and=function(e,t){return new He(ue.And,this,e,null,t)},e.prototype.bitwiseAnd=function(e,t,n){return void 0===n&&(n=!0),new He(ue.BitwiseAnd,this,e,null,t,n)},e.prototype.or=function(e,t){return new He(ue.Or,this,e,null,t)},e.prototype.lower=function(e,t){return new He(ue.Lower,this,e,null,t)},e.prototype.lowerEquals=function(e,t){return new He(ue.LowerEquals,this,e,null,t)},e.prototype.bigger=function(e,t){return new He(ue.Bigger,this,e,null,t)},e.prototype.biggerEquals=function(e,t){return new He(ue.BiggerEquals,this,e,null,t)},e.prototype.isBlank=function(e){return this.equals($e,e)},e.prototype.cast=function(e,t){return new Fe(this,e,t)},e.prototype.toStmt=function(){return new Ze(this,null)},e}();!function(e){e[e.This=0]="This",e[e.Super=1]="Super",e[e.CatchError=2]="CatchError",e[e.CatchStack=3]="CatchStack"}(_e||(_e={}));var we,xe=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return"string"==typeof t?(i.name=t,i.builtin=null):(i.name=null,i.builtin=t),i}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.name===e.name&&this.builtin===e.builtin},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitReadVarExpr(this,t)},t.prototype.set=function(e){if(!this.name)throw new Error("Built in variable "+this.builtin+" can not be assigned to.");return new Ce(this.name,e,null,this.sourceSpan)},t}(be),Ee=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.expr=t,i}return o(t,e),t.prototype.visitExpression=function(e,t){return e.visitTypeofExpr(this,t)},t.prototype.isEquivalent=function(e){return e instanceof t&&e.expr.isEquivalent(this.expr)},t.prototype.isConstant=function(){return this.expr.isConstant()},t}(be),Se=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.node=t,i}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.node===e.node},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitWrappedNodeExpr(this,t)},t}(be),Ce=function(e){function t(t,n,r,i){var o=e.call(this,r||n.type,i)||this;return o.name=t,o.value=n,o}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.name===e.name&&this.value.isEquivalent(e.value)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitWriteVarExpr(this,t)},t.prototype.toDeclStmt=function(e,t){return new Xe(this.name,this.value,e,t,this.sourceSpan)},t.prototype.toConstDecl=function(){return this.toDeclStmt(fe,[ke.Final])},t}(be),Te=function(e){function t(t,n,r,i,o){var s=e.call(this,i||r.type,o)||this;return s.receiver=t,s.index=n,s.value=r,s}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)&&this.value.isEquivalent(e.value)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitWriteKeyExpr(this,t)},t}(be),Ne=function(e){function t(t,n,r,i,o){var s=e.call(this,i||r.type,o)||this;return s.receiver=t,s.name=n,s.value=r,s}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.value.isEquivalent(e.value)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitWritePropExpr(this,t)},t}(be);!function(e){e[e.ConcatArray=0]="ConcatArray",e[e.SubscribeObservable=1]="SubscribeObservable",e[e.Bind=2]="Bind"}(we||(we={}));var ke,Ae=function(e){function t(t,n,r,i,o){var s=e.call(this,i,o)||this;return s.receiver=t,s.args=r,"string"==typeof n?(s.name=n,s.builtin=null):(s.name=null,s.builtin=n),s}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.builtin===e.builtin&&ge(this.args,e.args)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitInvokeMethodExpr(this,t)},t}(be),Pe=function(e){function t(t,n,r,i,o){void 0===o&&(o=!1);var s=e.call(this,r,i)||this;return s.fn=t,s.args=n,s.pure=o,s}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.fn.isEquivalent(e.fn)&&ge(this.args,e.args)&&this.pure===e.pure},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitInvokeFunctionExpr(this,t)},t}(be),Ie=function(e){function t(t,n,r,i){var o=e.call(this,r,i)||this;return o.classExpr=t,o.args=n,o}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.classExpr.isEquivalent(e.classExpr)&&ge(this.args,e.args)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitInstantiateExpr(this,t)},t}(be),Me=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.value=t,i}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.value===e.value},t.prototype.isConstant=function(){return!0},t.prototype.visitExpression=function(e,t){return e.visitLiteralExpr(this,t)},t}(be),Oe=function(e){function t(t,n,r,i){void 0===r&&(r=null);var o=e.call(this,n,i)||this;return o.value=t,o.typeParams=r,o}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.value.name===e.value.name&&this.value.moduleName===e.value.moduleName&&this.value.runtime===e.value.runtime},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitExternalExpr(this,t)},t}(be),Re=function(e){function t(t,n,r,i,o){void 0===r&&(r=null);var s=e.call(this,i||n.type,o)||this;return s.condition=t,s.falseCase=r,s.trueCase=n,s}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.condition.isEquivalent(e.condition)&&this.trueCase.isEquivalent(e.trueCase)&&ye(this.falseCase,e.falseCase)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitConditionalExpr(this,t)},t}(be),De=function(e){function t(t,n){var r=e.call(this,de,n)||this;return r.condition=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.condition.isEquivalent(e.condition)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitNotExpr(this,t)},t}(be),Le=function(e){function t(t,n){var r=e.call(this,t.type,n)||this;return r.condition=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.condition.isEquivalent(e.condition)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitAssertNotNullExpr(this,t)},t}(be),Fe=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.value=t,i}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.value.isEquivalent(e.value)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitCastExpr(this,t)},t}(be),je=function(){function e(e,t){void 0===t&&(t=null),this.name=e,this.type=t}return e.prototype.isEquivalent=function(e){return this.name===e.name},e}(),Ve=function(e){function t(t,n,r,i,o){var s=e.call(this,r,i)||this;return s.params=t,s.statements=n,s.name=o,s}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&ge(this.params,e.params)&&ge(this.statements,e.statements)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitFunctionExpr(this,t)},t.prototype.toDeclStmt=function(e,t){return void 0===t&&(t=null),new Ye(e,this.params,this.statements,this.type,t,this.sourceSpan)},t}(be),He=function(e){function t(t,n,r,i,o,s){void 0===s&&(s=!0);var a=e.call(this,i||n.type,o)||this;return a.operator=t,a.rhs=r,a.parens=s,a.lhs=n,a}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.operator===e.operator&&this.lhs.isEquivalent(e.lhs)&&this.rhs.isEquivalent(e.rhs)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitBinaryOperatorExpr(this,t)},t}(be),Be=function(e){function t(t,n,r,i){var o=e.call(this,r,i)||this;return o.receiver=t,o.name=n,o}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitReadPropExpr(this,t)},t.prototype.set=function(e){return new Ne(this.receiver,this.name,e,null,this.sourceSpan)},t}(be),Ue=function(e){function t(t,n,r,i){var o=e.call(this,r,i)||this;return o.receiver=t,o.index=n,o}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitReadKeyExpr(this,t)},t.prototype.set=function(e){return new Te(this.receiver,this.index,e,null,this.sourceSpan)},t}(be),qe=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.entries=t,i}return o(t,e),t.prototype.isConstant=function(){return this.entries.every(function(e){return e.isConstant()})},t.prototype.isEquivalent=function(e){return e instanceof t&&ge(this.entries,e.entries)},t.prototype.visitExpression=function(e,t){return e.visitLiteralArrayExpr(this,t)},t}(be),Ke=function(){function e(e,t,n){this.key=e,this.value=t,this.quoted=n}return e.prototype.isEquivalent=function(e){return this.key===e.key&&this.value.isEquivalent(e.value)},e}(),ze=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.entries=t,i.valueType=null,n&&(i.valueType=n.valueType),i}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&ge(this.entries,e.entries)},t.prototype.isConstant=function(){return this.entries.every(function(e){return e.value.isConstant()})},t.prototype.visitExpression=function(e,t){return e.visitLiteralMapExpr(this,t)},t}(be),We=function(e){function t(t,n){var r=e.call(this,t[t.length-1].type,n)||this;return r.parts=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&ge(this.parts,e.parts)},t.prototype.isConstant=function(){return!1},t.prototype.visitExpression=function(e,t){return e.visitCommaExpr(this,t)},t}(be),Qe=(new xe(_e.This,null,null),new xe(_e.Super,null,null),new xe(_e.CatchError,null,null),new xe(_e.CatchStack,null,null),new Me(null,null,null)),$e=new Me(null,fe,null);!function(e){e[e.Final=0]="Final",e[e.Private=1]="Private",e[e.Exported=2]="Exported",e[e.Static=3]="Static"}(ke||(ke={}));var Ge=function(){function e(e,t){this.modifiers=e||[],this.sourceSpan=t||null}return e.prototype.hasModifier=function(e){return-1!==this.modifiers.indexOf(e)},e}(),Xe=function(e){function t(t,n,r,i,o){void 0===i&&(i=null);var s=e.call(this,i,o)||this;return s.name=t,s.value=n,s.type=r||n&&n.type||null,s}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.name===e.name&&(this.value?!!e.value&&this.value.isEquivalent(e.value):!e.value)},t.prototype.visitStatement=function(e,t){return e.visitDeclareVarStmt(this,t)},t}(Ge),Ye=function(e){function t(t,n,r,i,o,s){void 0===o&&(o=null);var a=e.call(this,o,s)||this;return a.name=t,a.params=n,a.statements=r,a.type=i||null,a}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&ge(this.params,e.params)&&ge(this.statements,e.statements)},t.prototype.visitStatement=function(e,t){return e.visitDeclareFunctionStmt(this,t)},t}(Ge),Ze=function(e){function t(t,n){var r=e.call(this,null,n)||this;return r.expr=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.expr.isEquivalent(e.expr)},t.prototype.visitStatement=function(e,t){return e.visitExpressionStmt(this,t)},t}(Ge),Je=function(e){function t(t,n){var r=e.call(this,null,n)||this;return r.value=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.value.isEquivalent(e.value)},t.prototype.visitStatement=function(e,t){return e.visitReturnStmt(this,t)},t}(Ge),et=function(){function e(e,t){this.modifiers=t,t||(this.modifiers=[]),this.type=e||null}return e.prototype.hasModifier=function(e){return-1!==this.modifiers.indexOf(e)},e}(),tt=(function(e){function t(t,n,r,i){void 0===r&&(r=null);var o=e.call(this,n,r)||this;return o.name=t,o.initializer=i,o}o(t,e),t.prototype.isEquivalent=function(e){return this.name===e.name}}(et),function(e){function t(t,n,r,i,o){void 0===o&&(o=null);var s=e.call(this,i,o)||this;return s.name=t,s.params=n,s.body=r,s}return o(t,e),t.prototype.isEquivalent=function(e){return this.name===e.name&&ge(this.body,e.body)},t}(et)),nt=function(e){function t(t,n,r,i){void 0===i&&(i=null);var o=e.call(this,r,i)||this;return o.name=t,o.body=n,o}return o(t,e),t.prototype.isEquivalent=function(e){return this.name===e.name&&ge(this.body,e.body)},t}(et),rt=function(e){function t(t,n,r,i,o,s,a,u){void 0===a&&(a=null);var l=e.call(this,a,u)||this;return l.name=t,l.parent=n,l.fields=r,l.getters=i,l.constructorMethod=o,l.methods=s,l}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.name===e.name&&ye(this.parent,e.parent)&&ge(this.fields,e.fields)&&ge(this.getters,e.getters)&&this.constructorMethod.isEquivalent(e.constructorMethod)&&ge(this.methods,e.methods)},t.prototype.visitStatement=function(e,t){return e.visitDeclareClassStmt(this,t)},t}(Ge),it=function(e){function t(t,n,r,i){void 0===r&&(r=[]);var o=e.call(this,null,i)||this;return o.condition=t,o.trueCase=n,o.falseCase=r,o}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.condition.isEquivalent(e.condition)&&ge(this.trueCase,e.trueCase)&&ge(this.falseCase,e.falseCase)},t.prototype.visitStatement=function(e,t){return e.visitIfStmt(this,t)},t}(Ge),ot=(function(e){function t(t,n,r){void 0===n&&(n=!1);var i=e.call(this,null,r)||this;return i.comment=t,i.multiline=n,i}o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t},t.prototype.visitStatement=function(e,t){return e.visitCommentStmt(this,t)}}(Ge),function(e){function t(t,n){void 0===t&&(t=[]);var r=e.call(this,null,n)||this;return r.tags=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&this.toString()===e.toString()},t.prototype.visitStatement=function(e,t){return e.visitJSDocCommentStmt(this,t)},t.prototype.toString=function(){return function e(t){var n,r;if(0===t.length)return"";var i="*\n";try{for(var o=p(t),s=o.next();!s.done;s=o.next())i+=" *",i+=gt(s.value).replace(/\n/g,"\n * "),i+="\n"}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i+" "}
|
|
36
36
|
/**
|
|
37
37
|
* @license
|
|
38
38
|
* Copyright Google Inc. All Rights Reserved.
|
|
39
39
|
*
|
|
40
40
|
* Use of this source code is governed by an MIT-style license that can be
|
|
41
41
|
* found in the LICENSE file at https://angular.io/license
|
|
42
|
-
*/(this.tags)},t}($e)),st=function(e){function t(t,n,r){var i=e.call(this,null,r)||this;return i.bodyStmts=t,i.catchStmts=n,i}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&ge(this.bodyStmts,e.bodyStmts)&&ge(this.catchStmts,e.catchStmts)},t.prototype.visitStatement=function(e,t){return e.visitTryCatchStmt(this,t)},t}($e),at=function(e){function t(t,n){var r=e.call(this,null,n)||this;return r.error=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof st&&this.error.isEquivalent(e.error)},t.prototype.visitStatement=function(e,t){return e.visitThrowStmt(this,t)},t}($e),ut=function(){function e(){}return e.prototype.transformExpr=function(e,t){return e},e.prototype.transformStmt=function(e,t){return e},e.prototype.visitReadVarExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitWrappedNodeExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitTypeofExpr=function(e,t){return this.transformExpr(new Ee(e.expr.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWriteVarExpr=function(e,t){return this.transformExpr(new Ce(e.name,e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWriteKeyExpr=function(e,t){return this.transformExpr(new Te(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWritePropExpr=function(e,t){return this.transformExpr(new Ne(e.receiver.visitExpression(this,t),e.name,e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitInvokeMethodExpr=function(e,t){var n=e.builtin||e.name;return this.transformExpr(new Ae(e.receiver.visitExpression(this,t),n,this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitInvokeFunctionExpr=function(e,t){return this.transformExpr(new Pe(e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitInstantiateExpr=function(e,t){return this.transformExpr(new Ie(e.classExpr.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitExternalExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitConditionalExpr=function(e,t){return this.transformExpr(new Re(e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitNotExpr=function(e,t){return this.transformExpr(new De(e.condition.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitAssertNotNullExpr=function(e,t){return this.transformExpr(new Le(e.condition.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitCastExpr=function(e,t){return this.transformExpr(new Fe(e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitFunctionExpr=function(e,t){return this.transformExpr(new Ve(e.params,this.visitAllStatements(e.statements,t),e.type,e.sourceSpan),t)},e.prototype.visitBinaryOperatorExpr=function(e,t){return this.transformExpr(new He(e.operator,e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitReadPropExpr=function(e,t){return this.transformExpr(new Be(e.receiver.visitExpression(this,t),e.name,e.type,e.sourceSpan),t)},e.prototype.visitReadKeyExpr=function(e,t){return this.transformExpr(new Ue(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralArrayExpr=function(e,t){return this.transformExpr(new qe(this.visitAllExpressions(e.entries,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralMapExpr=function(e,t){var n=this,r=e.entries.map(function(e){return new Ke(e.key,e.value.visitExpression(n,t),e.quoted)}),i=new pe(e.valueType,null);return this.transformExpr(new ze(r,i,e.sourceSpan),t)},e.prototype.visitCommaExpr=function(e,t){return this.transformExpr(new We(this.visitAllExpressions(e.parts,t),e.sourceSpan),t)},e.prototype.visitAllExpressions=function(e,t){var n=this;return e.map(function(e){return e.visitExpression(n,t)})},e.prototype.visitDeclareVarStmt=function(e,t){var n=e.value&&e.value.visitExpression(this,t);return this.transformStmt(new Xe(e.name,n,e.type,e.modifiers,e.sourceSpan),t)},e.prototype.visitDeclareFunctionStmt=function(e,t){return this.transformStmt(new Ye(e.name,e.params,this.visitAllStatements(e.statements,t),e.type,e.modifiers,e.sourceSpan),t)},e.prototype.visitExpressionStmt=function(e,t){return this.transformStmt(new Ze(e.expr.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitReturnStmt=function(e,t){return this.transformStmt(new Je(e.value.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitDeclareClassStmt=function(e,t){var n=this,r=e.parent.visitExpression(this,t),i=e.getters.map(function(e){return new nt(e.name,n.visitAllStatements(e.body,t),e.type,e.modifiers)}),o=e.constructorMethod&&new tt(e.constructorMethod.name,e.constructorMethod.params,this.visitAllStatements(e.constructorMethod.body,t),e.constructorMethod.type,e.constructorMethod.modifiers),s=e.methods.map(function(e){return new tt(e.name,e.params,n.visitAllStatements(e.body,t),e.type,e.modifiers)});return this.transformStmt(new rt(e.name,r,e.fields,i,o,s,e.modifiers,e.sourceSpan),t)},e.prototype.visitIfStmt=function(e,t){return this.transformStmt(new it(e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t),e.sourceSpan),t)},e.prototype.visitTryCatchStmt=function(e,t){return this.transformStmt(new st(this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t),e.sourceSpan),t)},e.prototype.visitThrowStmt=function(e,t){return this.transformStmt(new at(e.error.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitCommentStmt=function(e,t){return this.transformStmt(e,t)},e.prototype.visitJSDocCommentStmt=function(e,t){return this.transformStmt(e,t)},e.prototype.visitAllStatements=function(e,t){var n=this;return e.map(function(e){return e.visitStatement(n,t)})},e}(),lt=function(){function e(){}return e.prototype.visitType=function(e,t){return e},e.prototype.visitExpression=function(e,t){return e.type&&e.type.visitType(this,t),e},e.prototype.visitBuiltinType=function(e,t){return this.visitType(e,t)},e.prototype.visitExpressionType=function(e,t){var n=this;return e.value.visitExpression(this,t),null!==e.typeParams&&e.typeParams.forEach(function(e){return n.visitType(e,t)}),this.visitType(e,t)},e.prototype.visitArrayType=function(e,t){return this.visitType(e,t)},e.prototype.visitMapType=function(e,t){return this.visitType(e,t)},e.prototype.visitWrappedNodeExpr=function(e,t){return e},e.prototype.visitTypeofExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitReadVarExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitWriteVarExpr=function(e,t){return e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitWriteKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitWritePropExpr=function(e,t){return e.receiver.visitExpression(this,t),e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitInvokeMethodExpr=function(e,t){return e.receiver.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitInvokeFunctionExpr=function(e,t){return e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitInstantiateExpr=function(e,t){return e.classExpr.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitLiteralExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitExternalExpr=function(e,t){var n=this;return e.typeParams&&e.typeParams.forEach(function(e){return e.visitType(n,t)}),this.visitExpression(e,t)},e.prototype.visitConditionalExpr=function(e,t){return e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitNotExpr=function(e,t){return e.condition.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitAssertNotNullExpr=function(e,t){return e.condition.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitCastExpr=function(e,t){return e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitFunctionExpr=function(e,t){return this.visitAllStatements(e.statements,t),this.visitExpression(e,t)},e.prototype.visitBinaryOperatorExpr=function(e,t){return e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitReadPropExpr=function(e,t){return e.receiver.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitReadKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitLiteralArrayExpr=function(e,t){return this.visitAllExpressions(e.entries,t),this.visitExpression(e,t)},e.prototype.visitLiteralMapExpr=function(e,t){var n=this;return e.entries.forEach(function(e){return e.value.visitExpression(n,t)}),this.visitExpression(e,t)},e.prototype.visitCommaExpr=function(e,t){return this.visitAllExpressions(e.parts,t),this.visitExpression(e,t)},e.prototype.visitAllExpressions=function(e,t){var n=this;e.forEach(function(e){return e.visitExpression(n,t)})},e.prototype.visitDeclareVarStmt=function(e,t){return e.value&&e.value.visitExpression(this,t),e.type&&e.type.visitType(this,t),e},e.prototype.visitDeclareFunctionStmt=function(e,t){return this.visitAllStatements(e.statements,t),e.type&&e.type.visitType(this,t),e},e.prototype.visitExpressionStmt=function(e,t){return e.expr.visitExpression(this,t),e},e.prototype.visitReturnStmt=function(e,t){return e.value.visitExpression(this,t),e},e.prototype.visitDeclareClassStmt=function(e,t){var n=this;return e.parent.visitExpression(this,t),e.getters.forEach(function(e){return n.visitAllStatements(e.body,t)}),e.constructorMethod&&this.visitAllStatements(e.constructorMethod.body,t),e.methods.forEach(function(e){return n.visitAllStatements(e.body,t)}),e},e.prototype.visitIfStmt=function(e,t){return e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t),e},e.prototype.visitTryCatchStmt=function(e,t){return this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t),e},e.prototype.visitThrowStmt=function(e,t){return e.error.visitExpression(this,t),e},e.prototype.visitCommentStmt=function(e,t){return e},e.prototype.visitJSDocCommentStmt=function(e,t){return e},e.prototype.visitAllStatements=function(e,t){var n=this;e.forEach(function(e){return e.visitStatement(n,t)})},e}();function ct(e,t,n){return new xe(e,t,n)}function pt(e,t,n){return void 0===t&&(t=null),new Oe(e,null,t,n)}function ht(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=null),new ce(e,t,n)}function ft(e,t,n){return new qe(e,t,n)}function dt(e,t){return void 0===t&&(t=null),new ze(e.map(function(e){return new Ke(e.key,e.value,e.quoted)}),t,null)}function vt(e,t,n,r,i){return new Ve(e,t,n,r,i)}function mt(e,t,n){return new it(e,t,n)}function yt(e,t,n){return new Me(e,t,n)}function gt(e){var 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}(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.varNames=new Set,t}o(t,e),t.prototype.visitDeclareFunctionStmt=function(e,t){return e},t.prototype.visitDeclareClassStmt=function(e,t){return e},t.prototype.visitReadVarExpr=function(e,t){return e.name&&this.varNames.add(e.name),null}})(lt),function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.externalReferences=[],t}o(t,e),t.prototype.visitExternalExpr=function(t,n){return this.externalReferences.push(t.value),e.prototype.visitExternalExpr.call(this,t,n)}}(lt),function(e){function t(t){var n=e.call(this)||this;return n.sourceSpan=t,n}o(t,e),t.prototype._clone=function(e){var t=Object.create(e.constructor.prototype);for(var n in e)t[n]=e[n];return t},t.prototype.transformExpr=function(e,t){return e.sourceSpan||((e=this._clone(e)).sourceSpan=this.sourceSpan),e},t.prototype.transformStmt=function(e,t){return e.sourceSpan||((e=this._clone(e)).sourceSpan=this.sourceSpan),e}}(ut);var _t=/-+([a-z0-9])/g;function bt(e,t){return wt(e,":",t)}function wt(e,t,n){var r=e.indexOf(t);return-1==r?n:[e.slice(0,r).trim(),e.slice(r+1).trim()]}function xt(e,t,n){return Array.isArray(e)?t.visitArray(e,n):function r(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Mt}(e)?t.visitStringMap(e,n):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?t.visitPrimitive(e,n):t.visitOther(e,n)}function Et(e){return null!=e}function St(e){return void 0===e?null:e}var Ct=function(){function e(){}return e.prototype.visitArray=function(e,t){var n=this;return e.map(function(e){return xt(e,n,t)})},e.prototype.visitStringMap=function(e,t){var n=this,r={};return Object.keys(e).forEach(function(i){r[i]=xt(e[i],n,t)}),r},e.prototype.visitPrimitive=function(e,t){return e},e.prototype.visitOther=function(e,t){return e},e}(),Tt=function(e,t){return Lt(e)?e.then(t):t(e)};function Nt(e){throw new Error("Internal Error: "+e)}function kt(e,t){var n=Error(e);return n[At]=!0,t&&(n[Pt]=t),n}var At="ngSyntaxError",Pt="ngParseErrors";function It(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}var Mt=Object.getPrototypeOf({});function Ot(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=55296&&r<=56319&&e.length>n+1){var i=e.charCodeAt(n+1);i>=56320&&i<=57343&&(n++,r=(r-55296<<10)+i-56320+65536)}r<=127?t+=String.fromCharCode(r):r<=2047?t+=String.fromCharCode(r>>6&31|192,63&r|128):r<=65535?t+=String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128):r<=2097151&&(t+=String.fromCharCode(r>>18&7|240,r>>12&63|128,r>>6&63|128,63&r|128))}return t}function Rt(e){if("string"==typeof e)return e;if(e instanceof Array)return"["+e.map(Rt).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;var t=e.toString();if(null==t)return""+t;var n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function Dt(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e}function Lt(e){return!!e&&"function"==typeof e.then}var Ft=function Ft(e){this.full=e;var t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")},jt="undefined"!=typeof window&&window,Vt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Ht="undefined"!=typeof global&&global||jt||Vt,Bt={},Ut=function(e){function t(t){var n=e.call(this,t.type)||this;return n.resolved=t,n.original=t,n}return o(t,e),t.prototype.visitExpression=function(e,t){return t===Bt?this.original.visitExpression(e,t):this.resolved.visitExpression(e,t)},t.prototype.isEquivalent=function(e){return e instanceof t&&this.resolved.isEquivalent(e.resolved)},t.prototype.isConstant=function(){return!0},t.prototype.fixup=function(e){this.resolved=e,this.shared=!0},t}(be),qt=function(){function 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}return e.prototype.getConstLiteral=function(e,t){if(e instanceof Me||e instanceof Ut)return e;var n=this.keyOf(e),r=this.literals.get(n),i=!1;if(r||(r=new Ut(e),this.literals.set(n,r),i=!0),!i&&!r.shared||i&&t){var o=this.freshName();this.statements.push(ct(o).set(e).toDeclStmt(fe,[ke.Final])),r.fixup(ct(o))}return r},e.prototype.getDefinition=function(e,t,n,r){void 0===r&&(r=!1);var i=this.definitionsOf(t),o=i.get(e),s=!1;if(!o){var a=this.propertyNameOf(t);o=new Ut(n.importExpr(e).prop(a)),i.set(e,o),s=!0}if(!s&&!o.shared||s&&r){var u=this.freshName();this.statements.push(ct(u).set(o.resolved).toDeclStmt(fe,[ke.Final])),o.fixup(ct(u))}return o},e.prototype.getLiteralFactory=function(e){if(e instanceof qe){var t=e.entries.map(function(e){return e.isConstant()?e:yt(null)}),n=this.keyOf(ft(t));return this._getLiteralFactory(n,e.entries,function(e){return ft(e)})}var r=dt(e.entries.map(function(e){return{key:e.key,value:e.value.isConstant()?e.value:yt(null),quoted:e.quoted}}));return n=this.keyOf(r),this._getLiteralFactory(n,e.entries.map(function(e){return e.value}),function(t){return dt(t.map(function(t,n){return{key:e.entries[n].key,value:t,quoted:e.entries[n].quoted}}))})},e.prototype._getLiteralFactory=function(e,t,n){var r=this,i=this.literalFactories.get(e),o=t.filter(function(e){return!e.isConstant()});if(!i){var s=t.map(function(e,t){return e.isConstant()?r.getConstLiteral(e,!0):ct("a"+t)}),a=vt(s.filter(Wt).map(function(e){return new je(e.name,he)}),[new Je(n(s))],fe),u=this.freshName();this.statements.push(ct(u).set(a).toDeclStmt(fe,[ke.Final])),i=ct(u),this.literalFactories.set(e,i)}return{literalFactory:i,literalFactoryArguments:o}},e.prototype.uniqueName=function(e){return""+e+this.nextNameIndex++},e.prototype.definitionsOf=function(e){switch(e){case 2:return this.componentDefinitions;case 1:return this.directiveDefinitions;case 0:return this.injectorDefinitions;case 3:return this.pipeDefinitions}return Nt("Unknown definition kind "+e),this.componentDefinitions},e.prototype.propertyNameOf=function(e){switch(e){case 2:return"ngComponentDef";case 1:return"ngDirectiveDef";case 0:return"ngInjectorDef";case 3:return"ngPipeDef"}return Nt("Unknown definition kind "+e),"<unknown>"},e.prototype.freshName=function(){return this.uniqueName("_c")},e.prototype.keyOf=function(e){return e.visitExpression(new Kt,Bt)},e}(),Kt=function(){function e(){this.visitWrappedNodeExpr=zt,this.visitWriteVarExpr=zt,this.visitWriteKeyExpr=zt,this.visitWritePropExpr=zt,this.visitInvokeMethodExpr=zt,this.visitInvokeFunctionExpr=zt,this.visitInstantiateExpr=zt,this.visitConditionalExpr=zt,this.visitNotExpr=zt,this.visitAssertNotNullExpr=zt,this.visitCastExpr=zt,this.visitFunctionExpr=zt,this.visitBinaryOperatorExpr=zt,this.visitReadPropExpr=zt,this.visitReadKeyExpr=zt,this.visitCommaExpr=zt}return e.prototype.visitLiteralExpr=function(e){return""+("string"==typeof e.value?'"'+e.value+'"':e.value)},e.prototype.visitLiteralArrayExpr=function(e,t){var n=this;return"["+e.entries.map(function(e){return e.visitExpression(n,t)}).join(",")+"]"},e.prototype.visitLiteralMapExpr=function(e,t){var n=this;return"{"+e.entries.map(function(e){return function(e){var t=e.quoted?'"':"";return""+t+e.key+t}(e)+":"+e.value.visitExpression(n,t)}).join(",")},e.prototype.visitExternalExpr=function(e){return e.value.moduleName?"EX:"+e.value.moduleName+":"+e.value.name:"EX:"+e.value.runtime.name},e.prototype.visitReadVarExpr=function(e){return"VAR:"+e.name},e.prototype.visitTypeofExpr=function(e,t){return"TYPEOF:"+e.expr.visitExpression(this,t)},e}();function zt(e){throw new Error("Invalid state: Visitor "+this.constructor.name+" doesn't handle "+e.constructor.name)}function Wt(e){return e instanceof xe}
|
|
42
|
+
*/(this.tags)},t}(Ge)),st=function(e){function t(t,n,r){var i=e.call(this,null,r)||this;return i.bodyStmts=t,i.catchStmts=n,i}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof t&&ge(this.bodyStmts,e.bodyStmts)&&ge(this.catchStmts,e.catchStmts)},t.prototype.visitStatement=function(e,t){return e.visitTryCatchStmt(this,t)},t}(Ge),at=function(e){function t(t,n){var r=e.call(this,null,n)||this;return r.error=t,r}return o(t,e),t.prototype.isEquivalent=function(e){return e instanceof st&&this.error.isEquivalent(e.error)},t.prototype.visitStatement=function(e,t){return e.visitThrowStmt(this,t)},t}(Ge),ut=function(){function e(){}return e.prototype.transformExpr=function(e,t){return e},e.prototype.transformStmt=function(e,t){return e},e.prototype.visitReadVarExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitWrappedNodeExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitTypeofExpr=function(e,t){return this.transformExpr(new Ee(e.expr.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWriteVarExpr=function(e,t){return this.transformExpr(new Ce(e.name,e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWriteKeyExpr=function(e,t){return this.transformExpr(new Te(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitWritePropExpr=function(e,t){return this.transformExpr(new Ne(e.receiver.visitExpression(this,t),e.name,e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitInvokeMethodExpr=function(e,t){var n=e.builtin||e.name;return this.transformExpr(new Ae(e.receiver.visitExpression(this,t),n,this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitInvokeFunctionExpr=function(e,t){return this.transformExpr(new Pe(e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitInstantiateExpr=function(e,t){return this.transformExpr(new Ie(e.classExpr.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitExternalExpr=function(e,t){return this.transformExpr(e,t)},e.prototype.visitConditionalExpr=function(e,t){return this.transformExpr(new Re(e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitNotExpr=function(e,t){return this.transformExpr(new De(e.condition.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitAssertNotNullExpr=function(e,t){return this.transformExpr(new Le(e.condition.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitCastExpr=function(e,t){return this.transformExpr(new Fe(e.value.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitFunctionExpr=function(e,t){return this.transformExpr(new Ve(e.params,this.visitAllStatements(e.statements,t),e.type,e.sourceSpan),t)},e.prototype.visitBinaryOperatorExpr=function(e,t){return this.transformExpr(new He(e.operator,e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitReadPropExpr=function(e,t){return this.transformExpr(new Be(e.receiver.visitExpression(this,t),e.name,e.type,e.sourceSpan),t)},e.prototype.visitReadKeyExpr=function(e,t){return this.transformExpr(new Ue(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralArrayExpr=function(e,t){return this.transformExpr(new qe(this.visitAllExpressions(e.entries,t),e.type,e.sourceSpan),t)},e.prototype.visitLiteralMapExpr=function(e,t){var n=this,r=e.entries.map(function(e){return new Ke(e.key,e.value.visitExpression(n,t),e.quoted)}),i=new pe(e.valueType,null);return this.transformExpr(new ze(r,i,e.sourceSpan),t)},e.prototype.visitCommaExpr=function(e,t){return this.transformExpr(new We(this.visitAllExpressions(e.parts,t),e.sourceSpan),t)},e.prototype.visitAllExpressions=function(e,t){var n=this;return e.map(function(e){return e.visitExpression(n,t)})},e.prototype.visitDeclareVarStmt=function(e,t){var n=e.value&&e.value.visitExpression(this,t);return this.transformStmt(new Xe(e.name,n,e.type,e.modifiers,e.sourceSpan),t)},e.prototype.visitDeclareFunctionStmt=function(e,t){return this.transformStmt(new Ye(e.name,e.params,this.visitAllStatements(e.statements,t),e.type,e.modifiers,e.sourceSpan),t)},e.prototype.visitExpressionStmt=function(e,t){return this.transformStmt(new Ze(e.expr.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitReturnStmt=function(e,t){return this.transformStmt(new Je(e.value.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitDeclareClassStmt=function(e,t){var n=this,r=e.parent.visitExpression(this,t),i=e.getters.map(function(e){return new nt(e.name,n.visitAllStatements(e.body,t),e.type,e.modifiers)}),o=e.constructorMethod&&new tt(e.constructorMethod.name,e.constructorMethod.params,this.visitAllStatements(e.constructorMethod.body,t),e.constructorMethod.type,e.constructorMethod.modifiers),s=e.methods.map(function(e){return new tt(e.name,e.params,n.visitAllStatements(e.body,t),e.type,e.modifiers)});return this.transformStmt(new rt(e.name,r,e.fields,i,o,s,e.modifiers,e.sourceSpan),t)},e.prototype.visitIfStmt=function(e,t){return this.transformStmt(new it(e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t),e.sourceSpan),t)},e.prototype.visitTryCatchStmt=function(e,t){return this.transformStmt(new st(this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t),e.sourceSpan),t)},e.prototype.visitThrowStmt=function(e,t){return this.transformStmt(new at(e.error.visitExpression(this,t),e.sourceSpan),t)},e.prototype.visitCommentStmt=function(e,t){return this.transformStmt(e,t)},e.prototype.visitJSDocCommentStmt=function(e,t){return this.transformStmt(e,t)},e.prototype.visitAllStatements=function(e,t){var n=this;return e.map(function(e){return e.visitStatement(n,t)})},e}(),lt=function(){function e(){}return e.prototype.visitType=function(e,t){return e},e.prototype.visitExpression=function(e,t){return e.type&&e.type.visitType(this,t),e},e.prototype.visitBuiltinType=function(e,t){return this.visitType(e,t)},e.prototype.visitExpressionType=function(e,t){var n=this;return e.value.visitExpression(this,t),null!==e.typeParams&&e.typeParams.forEach(function(e){return n.visitType(e,t)}),this.visitType(e,t)},e.prototype.visitArrayType=function(e,t){return this.visitType(e,t)},e.prototype.visitMapType=function(e,t){return this.visitType(e,t)},e.prototype.visitWrappedNodeExpr=function(e,t){return e},e.prototype.visitTypeofExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitReadVarExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitWriteVarExpr=function(e,t){return e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitWriteKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitWritePropExpr=function(e,t){return e.receiver.visitExpression(this,t),e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitInvokeMethodExpr=function(e,t){return e.receiver.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitInvokeFunctionExpr=function(e,t){return e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitInstantiateExpr=function(e,t){return e.classExpr.visitExpression(this,t),this.visitAllExpressions(e.args,t),this.visitExpression(e,t)},e.prototype.visitLiteralExpr=function(e,t){return this.visitExpression(e,t)},e.prototype.visitExternalExpr=function(e,t){var n=this;return e.typeParams&&e.typeParams.forEach(function(e){return e.visitType(n,t)}),this.visitExpression(e,t)},e.prototype.visitConditionalExpr=function(e,t){return e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitNotExpr=function(e,t){return e.condition.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitAssertNotNullExpr=function(e,t){return e.condition.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitCastExpr=function(e,t){return e.value.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitFunctionExpr=function(e,t){return this.visitAllStatements(e.statements,t),this.visitExpression(e,t)},e.prototype.visitBinaryOperatorExpr=function(e,t){return e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitReadPropExpr=function(e,t){return e.receiver.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitReadKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),this.visitExpression(e,t)},e.prototype.visitLiteralArrayExpr=function(e,t){return this.visitAllExpressions(e.entries,t),this.visitExpression(e,t)},e.prototype.visitLiteralMapExpr=function(e,t){var n=this;return e.entries.forEach(function(e){return e.value.visitExpression(n,t)}),this.visitExpression(e,t)},e.prototype.visitCommaExpr=function(e,t){return this.visitAllExpressions(e.parts,t),this.visitExpression(e,t)},e.prototype.visitAllExpressions=function(e,t){var n=this;e.forEach(function(e){return e.visitExpression(n,t)})},e.prototype.visitDeclareVarStmt=function(e,t){return e.value&&e.value.visitExpression(this,t),e.type&&e.type.visitType(this,t),e},e.prototype.visitDeclareFunctionStmt=function(e,t){return this.visitAllStatements(e.statements,t),e.type&&e.type.visitType(this,t),e},e.prototype.visitExpressionStmt=function(e,t){return e.expr.visitExpression(this,t),e},e.prototype.visitReturnStmt=function(e,t){return e.value.visitExpression(this,t),e},e.prototype.visitDeclareClassStmt=function(e,t){var n=this;return e.parent.visitExpression(this,t),e.getters.forEach(function(e){return n.visitAllStatements(e.body,t)}),e.constructorMethod&&this.visitAllStatements(e.constructorMethod.body,t),e.methods.forEach(function(e){return n.visitAllStatements(e.body,t)}),e},e.prototype.visitIfStmt=function(e,t){return e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t),e},e.prototype.visitTryCatchStmt=function(e,t){return this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t),e},e.prototype.visitThrowStmt=function(e,t){return e.error.visitExpression(this,t),e},e.prototype.visitCommentStmt=function(e,t){return e},e.prototype.visitJSDocCommentStmt=function(e,t){return e},e.prototype.visitAllStatements=function(e,t){var n=this;e.forEach(function(e){return e.visitStatement(n,t)})},e}();function ct(e,t,n){return new xe(e,t,n)}function pt(e,t,n){return void 0===t&&(t=null),new Oe(e,null,t,n)}function ht(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=null),new ce(e,t,n)}function ft(e,t,n){return new qe(e,t,n)}function dt(e,t){return void 0===t&&(t=null),new ze(e.map(function(e){return new Ke(e.key,e.value,e.quoted)}),t,null)}function vt(e,t,n,r,i){return new Ve(e,t,n,r,i)}function mt(e,t,n){return new it(e,t,n)}function yt(e,t,n){return new Me(e,t,n)}function gt(e){var 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}(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.varNames=new Set,t}o(t,e),t.prototype.visitDeclareFunctionStmt=function(e,t){return e},t.prototype.visitDeclareClassStmt=function(e,t){return e},t.prototype.visitReadVarExpr=function(e,t){return e.name&&this.varNames.add(e.name),null}})(lt),function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.externalReferences=[],t}o(t,e),t.prototype.visitExternalExpr=function(t,n){return this.externalReferences.push(t.value),e.prototype.visitExternalExpr.call(this,t,n)}}(lt),function(e){function t(t){var n=e.call(this)||this;return n.sourceSpan=t,n}o(t,e),t.prototype._clone=function(e){var t=Object.create(e.constructor.prototype);for(var n in e)t[n]=e[n];return t},t.prototype.transformExpr=function(e,t){return e.sourceSpan||((e=this._clone(e)).sourceSpan=this.sourceSpan),e},t.prototype.transformStmt=function(e,t){return e.sourceSpan||((e=this._clone(e)).sourceSpan=this.sourceSpan),e}}(ut);var _t=/-+([a-z0-9])/g;function bt(e,t){return wt(e,":",t)}function wt(e,t,n){var r=e.indexOf(t);return-1==r?n:[e.slice(0,r).trim(),e.slice(r+1).trim()]}function xt(e,t,n){return Array.isArray(e)?t.visitArray(e,n):function r(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Mt}(e)?t.visitStringMap(e,n):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?t.visitPrimitive(e,n):t.visitOther(e,n)}function Et(e){return null!=e}function St(e){return void 0===e?null:e}var Ct=function(){function e(){}return e.prototype.visitArray=function(e,t){var n=this;return e.map(function(e){return xt(e,n,t)})},e.prototype.visitStringMap=function(e,t){var n=this,r={};return Object.keys(e).forEach(function(i){r[i]=xt(e[i],n,t)}),r},e.prototype.visitPrimitive=function(e,t){return e},e.prototype.visitOther=function(e,t){return e},e}(),Tt=function(e,t){return Lt(e)?e.then(t):t(e)};function Nt(e){throw new Error("Internal Error: "+e)}function kt(e,t){var n=Error(e);return n[At]=!0,t&&(n[Pt]=t),n}var At="ngSyntaxError",Pt="ngParseErrors";function It(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}var Mt=Object.getPrototypeOf({});function Ot(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=55296&&r<=56319&&e.length>n+1){var i=e.charCodeAt(n+1);i>=56320&&i<=57343&&(n++,r=(r-55296<<10)+i-56320+65536)}r<=127?t+=String.fromCharCode(r):r<=2047?t+=String.fromCharCode(r>>6&31|192,63&r|128):r<=65535?t+=String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128):r<=2097151&&(t+=String.fromCharCode(r>>18&7|240,r>>12&63|128,r>>6&63|128,63&r|128))}return t}function Rt(e){if("string"==typeof e)return e;if(e instanceof Array)return"["+e.map(Rt).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;var t=e.toString();if(null==t)return""+t;var n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function Dt(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e}function Lt(e){return!!e&&"function"==typeof e.then}var Ft=function Ft(e){this.full=e;var t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")},jt="undefined"!=typeof window&&window,Vt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Ht="undefined"!=typeof global&&global||jt||Vt,Bt={},Ut=function(e){function t(t){var n=e.call(this,t.type)||this;return n.resolved=t,n.original=t,n}return o(t,e),t.prototype.visitExpression=function(e,t){return t===Bt?this.original.visitExpression(e,t):this.resolved.visitExpression(e,t)},t.prototype.isEquivalent=function(e){return e instanceof t&&this.resolved.isEquivalent(e.resolved)},t.prototype.isConstant=function(){return!0},t.prototype.fixup=function(e){this.resolved=e,this.shared=!0},t}(be),qt=function(){function 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}return e.prototype.getConstLiteral=function(e,t){if(e instanceof Me||e instanceof Ut)return e;var n=this.keyOf(e),r=this.literals.get(n),i=!1;if(r||(r=new Ut(e),this.literals.set(n,r),i=!0),!i&&!r.shared||i&&t){var o=this.freshName();this.statements.push(ct(o).set(e).toDeclStmt(fe,[ke.Final])),r.fixup(ct(o))}return r},e.prototype.getDefinition=function(e,t,n,r){void 0===r&&(r=!1);var i=this.definitionsOf(t),o=i.get(e),s=!1;if(!o){var a=this.propertyNameOf(t);o=new Ut(n.importExpr(e).prop(a)),i.set(e,o),s=!0}if(!s&&!o.shared||s&&r){var u=this.freshName();this.statements.push(ct(u).set(o.resolved).toDeclStmt(fe,[ke.Final])),o.fixup(ct(u))}return o},e.prototype.getLiteralFactory=function(e){if(e instanceof qe){var t=e.entries.map(function(e){return e.isConstant()?e:yt(null)}),n=this.keyOf(ft(t));return this._getLiteralFactory(n,e.entries,function(e){return ft(e)})}var r=dt(e.entries.map(function(e){return{key:e.key,value:e.value.isConstant()?e.value:yt(null),quoted:e.quoted}}));return n=this.keyOf(r),this._getLiteralFactory(n,e.entries.map(function(e){return e.value}),function(t){return dt(t.map(function(t,n){return{key:e.entries[n].key,value:t,quoted:e.entries[n].quoted}}))})},e.prototype._getLiteralFactory=function(e,t,n){var r=this,i=this.literalFactories.get(e),o=t.filter(function(e){return!e.isConstant()});if(!i){var s=t.map(function(e,t){return e.isConstant()?r.getConstLiteral(e,!0):ct("a"+t)}),a=vt(s.filter(Wt).map(function(e){return new je(e.name,he)}),[new Je(n(s))],fe),u=this.freshName();this.statements.push(ct(u).set(a).toDeclStmt(fe,[ke.Final])),i=ct(u),this.literalFactories.set(e,i)}return{literalFactory:i,literalFactoryArguments:o}},e.prototype.uniqueName=function(e){return""+e+this.nextNameIndex++},e.prototype.definitionsOf=function(e){switch(e){case 2:return this.componentDefinitions;case 1:return this.directiveDefinitions;case 0:return this.injectorDefinitions;case 3:return this.pipeDefinitions}return Nt("Unknown definition kind "+e),this.componentDefinitions},e.prototype.propertyNameOf=function(e){switch(e){case 2:return"ngComponentDef";case 1:return"ngDirectiveDef";case 0:return"ngInjectorDef";case 3:return"ngPipeDef"}return Nt("Unknown definition kind "+e),"<unknown>"},e.prototype.freshName=function(){return this.uniqueName("_c")},e.prototype.keyOf=function(e){return e.visitExpression(new Kt,Bt)},e}(),Kt=function(){function e(){this.visitWrappedNodeExpr=zt,this.visitWriteVarExpr=zt,this.visitWriteKeyExpr=zt,this.visitWritePropExpr=zt,this.visitInvokeMethodExpr=zt,this.visitInvokeFunctionExpr=zt,this.visitInstantiateExpr=zt,this.visitConditionalExpr=zt,this.visitNotExpr=zt,this.visitAssertNotNullExpr=zt,this.visitCastExpr=zt,this.visitFunctionExpr=zt,this.visitBinaryOperatorExpr=zt,this.visitReadPropExpr=zt,this.visitReadKeyExpr=zt,this.visitCommaExpr=zt}return e.prototype.visitLiteralExpr=function(e){return""+("string"==typeof e.value?'"'+e.value+'"':e.value)},e.prototype.visitLiteralArrayExpr=function(e,t){var n=this;return"["+e.entries.map(function(e){return e.visitExpression(n,t)}).join(",")+"]"},e.prototype.visitLiteralMapExpr=function(e,t){var n=this;return"{"+e.entries.map(function(e){return function(e){var t=e.quoted?'"':"";return""+t+e.key+t}(e)+":"+e.value.visitExpression(n,t)}).join(",")},e.prototype.visitExternalExpr=function(e){return e.value.moduleName?"EX:"+e.value.moduleName+":"+e.value.name:"EX:"+e.value.runtime.name},e.prototype.visitReadVarExpr=function(e){return"VAR:"+e.name},e.prototype.visitTypeofExpr=function(e,t){return"TYPEOF:"+e.expr.visitExpression(this,t)},e}();function zt(e){throw new Error("Invalid state: Visitor "+this.constructor.name+" doesn't handle "+e.constructor.name)}function Wt(e){return e instanceof xe}
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright Google Inc. All Rights Reserved.
|
|
46
46
|
*
|
|
47
47
|
* Use of this source code is governed by an MIT-style license that can be
|
|
48
48
|
* found in the LICENSE file at https://angular.io/license
|
|
49
|
-
*/var Qt="@angular/core"
|
|
49
|
+
*/var Qt="@angular/core",$t=function(){function e(){}return e.ANALYZE_FOR_ENTRY_COMPONENTS={name:"ANALYZE_FOR_ENTRY_COMPONENTS",moduleName:Qt},e.ElementRef={name:"ElementRef",moduleName:Qt},e.NgModuleRef={name:"NgModuleRef",moduleName:Qt},e.ViewContainerRef={name:"ViewContainerRef",moduleName:Qt},e.ChangeDetectorRef={name:"ChangeDetectorRef",moduleName:Qt},e.QueryList={name:"QueryList",moduleName:Qt},e.TemplateRef={name:"TemplateRef",moduleName:Qt},e.Renderer2={name:"Renderer2",moduleName:Qt},e.CodegenComponentFactoryResolver={name:"ɵCodegenComponentFactoryResolver",moduleName:Qt},e.ComponentFactoryResolver={name:"ComponentFactoryResolver",moduleName:Qt},e.ComponentFactory={name:"ComponentFactory",moduleName:Qt},e.ComponentRef={name:"ComponentRef",moduleName:Qt},e.NgModuleFactory={name:"NgModuleFactory",moduleName:Qt},e.createModuleFactory={name:"ɵcmf",moduleName:Qt},e.moduleDef={name:"ɵmod",moduleName:Qt},e.moduleProviderDef={name:"ɵmpd",moduleName:Qt},e.RegisterModuleFactoryFn={name:"ɵregisterModuleFactory",moduleName:Qt},e.inject={name:"ɵɵinject",moduleName:Qt},e.INJECTOR={name:"INJECTOR",moduleName:Qt},e.Injector={name:"Injector",moduleName:Qt},e.ɵɵdefineInjectable={name:"ɵɵdefineInjectable",moduleName:Qt},e.InjectableDef={name:"ɵɵInjectableDef",moduleName:Qt},e.ViewEncapsulation={name:"ViewEncapsulation",moduleName:Qt},e.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:Qt},e.SecurityContext={name:"SecurityContext",moduleName:Qt},e.LOCALE_ID={name:"LOCALE_ID",moduleName:Qt},e.TRANSLATIONS_FORMAT={name:"TRANSLATIONS_FORMAT",moduleName:Qt},e.inlineInterpolate={name:"ɵinlineInterpolate",moduleName:Qt},e.interpolate={name:"ɵinterpolate",moduleName:Qt},e.EMPTY_ARRAY={name:"ɵEMPTY_ARRAY",moduleName:Qt},e.EMPTY_MAP={name:"ɵEMPTY_MAP",moduleName:Qt},e.Renderer={name:"Renderer",moduleName:Qt},e.viewDef={name:"ɵvid",moduleName:Qt},e.elementDef={name:"ɵeld",moduleName:Qt},e.anchorDef={name:"ɵand",moduleName:Qt},e.textDef={name:"ɵted",moduleName:Qt},e.directiveDef={name:"ɵdid",moduleName:Qt},e.providerDef={name:"ɵprd",moduleName:Qt},e.queryDef={name:"ɵqud",moduleName:Qt},e.pureArrayDef={name:"ɵpad",moduleName:Qt},e.pureObjectDef={name:"ɵpod",moduleName:Qt},e.purePipeDef={name:"ɵppd",moduleName:Qt},e.pipeDef={name:"ɵpid",moduleName:Qt},e.nodeValue={name:"ɵnov",moduleName:Qt},e.ngContentDef={name:"ɵncd",moduleName:Qt},e.unwrapValue={name:"ɵunv",moduleName:Qt},e.createRendererType2={name:"ɵcrt",moduleName:Qt},e.RendererType2={name:"RendererType2",moduleName:Qt},e.ViewDefinition={name:"ɵViewDefinition",moduleName:Qt},e.createComponentFactory={name:"ɵccf",moduleName:Qt},e.setClassMetadata={name:"ɵsetClassMetadata",moduleName:Qt},e}();function Gt(e){return{identifier:{reference:e}}}function Xt(e,t){return Gt(e.resolveExternalReference(t))}
|
|
50
50
|
/**
|
|
51
51
|
* @license
|
|
52
52
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -76,7 +76,7 @@ var mn="@angular/core",yn=function(){function e(){}return e.NEW_METHOD="factory"
|
|
|
76
76
|
* Use of this source code is governed by an MIT-style license that can be
|
|
77
77
|
* found in the LICENSE file at https://angular.io/license
|
|
78
78
|
*/
|
|
79
|
-
function Vn(e){return e.id||function n(e){var t,n,r=Ot(e),i=function o(e,t){for(var n=Array(e.length+3>>>2),r=0;r<n.length;r++)n[r]=er(e,4*r,t);return n}(r,Bn.Big),s=8*r.length,a=new Array(80),u=h([1732584193,4023233417,2562383102,271733878,3285377520],5),l=u[0],c=u[1],p=u[2],f=u[3],d=u[4];i[s>>5]|=128<<24-s%32,i[15+(s+64>>9<<4)]=s;for(var v=0;v<i.length;v+=16){for(var m=h([l,c,p,f,d],5),y=m[0],g=m[1],_=m[2],b=m[3],w=m[4],x=0;x<80;x++){a[x]=x<16?i[v+x]:Zn(a[x-3]^a[x-8]^a[x-14]^a[x-16],1);var E=h(zn(x,c,p,f),2),S=E[0],C=E[1],T=[Zn(l,5),S,d,C,a[x]].reduce(
|
|
79
|
+
function Vn(e){return e.id||function n(e){var t,n,r=Ot(e),i=function o(e,t){for(var n=Array(e.length+3>>>2),r=0;r<n.length;r++)n[r]=er(e,4*r,t);return n}(r,Bn.Big),s=8*r.length,a=new Array(80),u=h([1732584193,4023233417,2562383102,271733878,3285377520],5),l=u[0],c=u[1],p=u[2],f=u[3],d=u[4];i[s>>5]|=128<<24-s%32,i[15+(s+64>>9<<4)]=s;for(var v=0;v<i.length;v+=16){for(var m=h([l,c,p,f,d],5),y=m[0],g=m[1],_=m[2],b=m[3],w=m[4],x=0;x<80;x++){a[x]=x<16?i[v+x]:Zn(a[x-3]^a[x-8]^a[x-14]^a[x-16],1);var E=h(zn(x,c,p,f),2),S=E[0],C=E[1],T=[Zn(l,5),S,d,C,a[x]].reduce(Gn);d=(t=h([f,p,Zn(c,30),l,T],5))[0],f=t[1],p=t[2],c=t[3],l=t[4]}l=(n=h([Gn(l,y),Gn(c,g),Gn(p,_),Gn(f,b),Gn(d,w)],5))[0],c=n[1],p=n[2],f=n[3],d=n[4]}return function N(e){for(var t="",n=0;n<e.length;n++){var r=Jn(e,n);t+=(r>>>4).toString(16)+(15&r).toString(16)}return t.toLowerCase()}(tr([l,c,p,f,d]))}(function t(e){return e.map(function(e){return e.visit(qn,null)})}(e.nodes).join("")+"["+e.meaning+"]")}function Hn(e){if(e.id)return e.id;var t=new Kn;return function n(e,t){var n,r=h(Wn(e),2),i=r[0],o=r[1];if(t){var s=h(Wn(t),2),a=s[0],u=s[1];i=(n=h(function c(e,t){var n=h(e,2),r=n[0],i=n[1],o=h(t,2),s=o[0],a=h(Xn(i,o[1]),2),u=a[0],l=a[1];return[Gn(Gn(r,s),u),l]}(function l(e,t){var n=h(e,2),r=n[0],i=n[1];return[r<<t|i>>>32-t,i<<t|r>>>32-t]}([i,o],1),[a,u]),2))[0],o=n[1]}return function p(e){for(var t="",n="1",r=e.length-1;r>=0;r--)t=nr(t,rr(Jn(e,r),n)),n=rr(256,n);return t.split("").reverse().join("")}(tr([2147483647&i,o]))}(e.nodes.map(function(e){return e.visit(t,null)}).join(""),e.meaning)}var Bn,Un=function(){function e(){}return e.prototype.visitText=function(e,t){return e.value},e.prototype.visitContainer=function(e,t){var n=this;return"["+e.children.map(function(e){return e.visit(n)}).join(", ")+"]"},e.prototype.visitIcu=function(e,t){var n=this,r=Object.keys(e.cases).map(function(t){return t+" {"+e.cases[t].visit(n)+"}"});return"{"+e.expression+", "+e.type+", "+r.join(", ")+"}"},e.prototype.visitTagPlaceholder=function(e,t){var n=this;return e.isVoid?'<ph tag name="'+e.startName+'"/>':'<ph tag name="'+e.startName+'">'+e.children.map(function(e){return e.visit(n)}).join(", ")+'</ph name="'+e.closeName+'">'},e.prototype.visitPlaceholder=function(e,t){return e.value?'<ph name="'+e.name+'">'+e.value+"</ph>":'<ph name="'+e.name+'"/>'},e.prototype.visitIcuPlaceholder=function(e,t){return'<ph icu name="'+e.name+'">'+e.value.visit(this)+"</ph>"},e}(),qn=new Un,Kn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visitIcu=function(e,t){var n=this,r=Object.keys(e.cases).map(function(t){return t+" {"+e.cases[t].visit(n)+"}"});return"{"+e.type+", "+r.join(", ")+"}"},t}(Un);function zn(e,t,n,r){return e<20?[t&n|~t&r,1518500249]:e<40?[t^n^r,1859775393]:e<60?[t&n|t&r|n&r,2400959708]:[t^n^r,3395469782]}function Wn(e){var t=Ot(e),n=h([Qn(t,0),Qn(t,102072)],2),r=n[0],i=n[1];return 0!=r||0!=i&&1!=i||(r^=319790063,i^=-1801410264),[r,i]}function Qn(e,t){var n,r,i=h([2654435769,2654435769],2),o=i[0],s=i[1],a=e.length;for(r=0;r+12<=a;r+=12)o=(n=h($n([o=Gn(o,er(e,r,Bn.Little)),s=Gn(s,er(e,r+4,Bn.Little)),t=Gn(t,er(e,r+8,Bn.Little))]),3))[0],s=n[1],t=n[2];return o=Gn(o,er(e,r,Bn.Little)),s=Gn(s,er(e,r+4,Bn.Little)),t=Gn(t,a),$n([o,s,t=Gn(t,er(e,r+8,Bn.Little)<<8)])[2]}function $n(e){var t=h(e,3),n=t[0],r=t[1],i=t[2];return n=Yn(n,r),n=Yn(n,i),n^=i>>>13,r=Yn(r,i),r=Yn(r,n),r^=n<<8,i=Yn(i,n),i=Yn(i,r),i^=r>>>13,n=Yn(n,r),n=Yn(n,i),n^=i>>>12,r=Yn(r,i),r=Yn(r,n),r^=n<<16,i=Yn(i,n),i=Yn(i,r),i^=r>>>5,n=Yn(n,r),n=Yn(n,i),n^=i>>>3,r=Yn(r,i),r=Yn(r,n),r^=n<<10,i=Yn(i,n),i=Yn(i,r),[n,r,i^=r>>>15]}function Gn(e,t){return Xn(e,t)[1]}function Xn(e,t){var n=(65535&e)+(65535&t),r=(e>>>16)+(t>>>16)+(n>>>16);return[r>>>16,r<<16|65535&n]}function Yn(e,t){var n=(65535&e)-(65535&t);return(e>>16)-(t>>16)+(n>>16)<<16|65535&n}function Zn(e,t){return e<<t|e>>>32-t}function Jn(e,t){return t>=e.length?0:255&e.charCodeAt(t)}function er(e,t,n){var r=0;if(n===Bn.Big)for(var i=0;i<4;i++)r+=Jn(e,t+i)<<24-8*i;else for(i=0;i<4;i++)r+=Jn(e,t+i)<<8*i;return r}function tr(e){return e.reduce(function(e,t){return e+function n(e){for(var t="",n=0;n<4;n++)t+=String.fromCharCode(e>>>8*(3-n)&255);return t}(t)},"")}function nr(e,t){for(var n="",r=Math.max(e.length,t.length),i=0,o=0;i<r||o;i++){var s=o+ +(e[i]||0)+ +(t[i]||0);s>=10?(o=1,n+=s-10):(o=0,n+=s)}return n}function rr(e,t){for(var n="",r=t;0!==e;e>>>=1)1&e&&(n=nr(n,r)),r=nr(r,r);return n}
|
|
80
80
|
/**
|
|
81
81
|
* @license
|
|
82
82
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -112,7 +112,7 @@ function Vn(e){return e.id||function n(e){var t,n,r=Ot(e),i=function o(e,t){for(
|
|
|
112
112
|
* Use of this source code is governed by an MIT-style license that can be
|
|
113
113
|
* found in the LICENSE file at https://angular.io/license
|
|
114
114
|
*/
|
|
115
|
-
var Hr=/-/,Br="_t",Ur="ctx",qr="rf";function Kr(e,t){var n=null;return function(){return n||(e.push(new Xe(Br,void 0,he)),n=ct(t)),n}}function zr(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 Wr(e){throw new Error("Invalid state: Visitor "+this.constructor.name+" doesn't handle "+e.constructor.name)}function Qr(e){return Array.isArray(e)?ft(e.map(Qr)):yt(e,fe)}function
|
|
115
|
+
var Hr=/-/,Br="_t",Ur="ctx",qr="rf";function Kr(e,t){var n=null;return function(){return n||(e.push(new Xe(Br,void 0,he)),n=ct(t)),n}}function zr(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 Wr(e){throw new Error("Invalid state: Visitor "+this.constructor.name+" doesn't handle "+e.constructor.name)}function Qr(e){return Array.isArray(e)?ft(e.map(Qr)):yt(e,fe)}function $r(e,t){return Object.getOwnPropertyNames(e).length>0?function n(e,t){return dt(Object.getOwnPropertyNames(e).map(function(n){var r,i,o,s,a,u=e[n];return Array.isArray(u)?(s=(r=h(u,2))[0],o=r[1]):(o=(i=h(bt(n,[n,u]),2))[0],s=i[1]),{key:a=o,quoted:Hr.test(a),value:t&&s!==o?ft([Qr(s),Qr(o)]):Qr(s)}}))}(e,t):null}function Gr(e){for(;(t=e[e.length-1])instanceof Me&&null===t.value;)e.pop();var t;return e}function Xr(e,t){if(Array.isArray(e.predicate)){var n=[];return e.predicate.forEach(function(e){var t=e.split(",").map(function(e){return yt(e.trim())});n.push.apply(n,f(t))}),t.getConstLiteral(ft(n),!0)}return e.predicate}var Yr,Zr,Jr=function(){function e(){this.values=[]}return e.prototype.set=function(e,t){t&&this.values.push({key:e,value:t,quoted:!1})},e.prototype.toLiteralMap=function(){return dt(this.values)},e}();function ei(e){var t=ct("t"),n=[],r=ri(e)?t:new He(ue.Or,t,e.type),i=null;if(null!==e.deps)"invalid"!==e.deps&&(i=new Ie(r,ti(e.deps,e.injectFn)));else{var o=ct("ɵ"+e.name+"_BaseFactory"),s=pt(yn.getInheritedFactory),a=o.set(s.callFn([e.type])).toDeclStmt(fe,[ke.Exported,ke.Final]);n.push(a),i=o.callFn([r])}var u=i,l=[],c=null;function p(n){var r,i=ct("r");return l.push(i.set(Qe).toDeclStmt()),r=null!==u?i.set(u).toStmt():ni(e.name),l.push(mt(t,[r],[i.set(n).toStmt()])),i}if(ri(e)&&e.delegateType===Yr.Factory){var h=ct("ɵ"+e.name+"_BaseFactory"),f=pt(yn.getFactoryOf);if(e.delegate.isEquivalent(e.type))throw new Error("Illegal state: compiling factory that delegates to itself");var d=h.set(f.callFn([e.delegate])).toDeclStmt(fe,[ke.Exported,ke.Final]);n.push(d),c=p(h.callFn([]))}else if(ri(e)){var v=ti(e.delegateDeps,e.injectFn);c=p(new(e.delegateType===Yr.Class?Ie:Pe)(e.delegate,v))}else c=function m(e){return void 0!==e.expression}
|
|
116
116
|
/**
|
|
117
117
|
* @license
|
|
118
118
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -155,14 +155,21 @@ function li(e,t){if(null!=t){if(!Array.isArray(t))throw new Error("Expected '"+e
|
|
|
155
155
|
*
|
|
156
156
|
* Use of this source code is governed by an MIT-style license that can be
|
|
157
157
|
* found in the LICENSE file at https://angular.io/license
|
|
158
|
-
*/var ki=function(e){function t(){return e.call(this,!1)||this}return o(t,e),t.prototype.visitDeclareClassStmt=function(e,t){var n=this;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(function(r){return n._visitClassGetter(e,r,t)}),e.methods.forEach(function(r){return n._visitClassMethod(e,r,t)}),t.popClass(),null},t.prototype._visitClassConstructor=function(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,"}")},t.prototype._visitClassGetter=function(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,"}});")},t.prototype._visitClassMethod=function(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,"};")},t.prototype.visitWrappedNodeExpr=function(e,t){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")},t.prototype.visitReadVarExpr=function(t,n){if(t.builtin===_e.This)n.print(t,"self");else{if(t.builtin===_e.Super)throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");e.prototype.visitReadVarExpr.call(this,t,n)}return null},t.prototype.visitDeclareVarStmt=function(e,t){return t.print(e,"var "+e.name),e.value&&(t.print(e," = "),e.value.visitExpression(this,t)),t.println(e,";"),null},t.prototype.visitCastExpr=function(e,t){return e.value.visitExpression(this,t),null},t.prototype.visitInvokeFunctionExpr=function(t,n){var r=t.fn;return r instanceof xe&&r.builtin===_e.Super?(n.currentClass.parent.visitExpression(this,n),n.print(t,".call(this"),t.args.length>0&&(n.print(t,", "),this.visitAllExpressions(t.args,n,",")),n.print(t,")")):e.prototype.visitInvokeFunctionExpr.call(this,t,n),null},t.prototype.visitFunctionExpr=function(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},t.prototype.visitDeclareFunctionStmt=function(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},t.prototype.visitTryCatchStmt=function(e,t){t.println(e,"try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println(e,"} catch ("+wi.name+") {"),t.incIndent();var n=[xi.set(wi.prop("stack")).toDeclStmt(null,[ke.Final])].concat(e.catchStmts);return this.visitAllStatements(n,t),t.decIndent(),t.println(e,"}"),null},t.prototype._visitParams=function(e,t){this.visitAllObjects(function(e){return t.print(null,e.name)},e,t,",")},t.prototype.getBuiltinMethodName=function(e){var t;switch(e){case we.ConcatArray:t="concat";break;case we.SubscribeObservable:t="subscribe";break;case we.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t},t}(Ci),Ai=function(){function e(){}return e.prototype.evaluateStatements=function(e,t,n,r){var i=new Pi(n),o=Si.createRoot();return
|
|
158
|
+
*/var ki=function(e){function t(){return e.call(this,!1)||this}return o(t,e),t.prototype.visitDeclareClassStmt=function(e,t){var n=this;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(function(r){return n._visitClassGetter(e,r,t)}),e.methods.forEach(function(r){return n._visitClassMethod(e,r,t)}),t.popClass(),null},t.prototype._visitClassConstructor=function(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,"}")},t.prototype._visitClassGetter=function(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,"}});")},t.prototype._visitClassMethod=function(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,"};")},t.prototype.visitWrappedNodeExpr=function(e,t){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")},t.prototype.visitReadVarExpr=function(t,n){if(t.builtin===_e.This)n.print(t,"self");else{if(t.builtin===_e.Super)throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");e.prototype.visitReadVarExpr.call(this,t,n)}return null},t.prototype.visitDeclareVarStmt=function(e,t){return t.print(e,"var "+e.name),e.value&&(t.print(e," = "),e.value.visitExpression(this,t)),t.println(e,";"),null},t.prototype.visitCastExpr=function(e,t){return e.value.visitExpression(this,t),null},t.prototype.visitInvokeFunctionExpr=function(t,n){var r=t.fn;return r instanceof xe&&r.builtin===_e.Super?(n.currentClass.parent.visitExpression(this,n),n.print(t,".call(this"),t.args.length>0&&(n.print(t,", "),this.visitAllExpressions(t.args,n,",")),n.print(t,")")):e.prototype.visitInvokeFunctionExpr.call(this,t,n),null},t.prototype.visitFunctionExpr=function(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},t.prototype.visitDeclareFunctionStmt=function(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},t.prototype.visitTryCatchStmt=function(e,t){t.println(e,"try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println(e,"} catch ("+wi.name+") {"),t.incIndent();var n=[xi.set(wi.prop("stack")).toDeclStmt(null,[ke.Final])].concat(e.catchStmts);return this.visitAllStatements(n,t),t.decIndent(),t.println(e,"}"),null},t.prototype._visitParams=function(e,t){this.visitAllObjects(function(e){return t.print(null,e.name)},e,t,",")},t.prototype.getBuiltinMethodName=function(e){var t;switch(e){case we.ConcatArray:t="concat";break;case we.SubscribeObservable:t="subscribe";break;case we.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t},t}(Ci),Ai=function(){function e(){}return e.prototype.evaluateStatements=function(e,t,n,r){var i=new Pi(n),o=Si.createRoot();return t.length>0&&!function s(e){return e.isEquivalent(yt("use strict").toStmt())}
|
|
159
159
|
/**
|
|
160
160
|
* @license
|
|
161
161
|
* Copyright Google Inc. All Rights Reserved.
|
|
162
162
|
*
|
|
163
163
|
* Use of this source code is governed by an MIT-style license that can be
|
|
164
164
|
* found in the LICENSE file at https://angular.io/license
|
|
165
|
-
*/function
|
|
165
|
+
*/(t[0])&&(t=f([yt("use strict").toStmt()],t)),i.visitAllStatements(t,o),i.createReturnStmt(o),this.evaluateCode(e,o,i.getArgs(),r)},e.prototype.evaluateCode=function(e,t,n,r){var i=t.toSource()+"\n//# sourceURL="+e,o=[],s=[];for(var a in n)s.push(n[a]),o.push(a);if(r){var u=(new(Function.bind.apply(Function,f([void 0],o.concat("return null;"))))).toString(),l=u.slice(0,u.indexOf("return null;")).split("\n").length-1;i+="\n"+t.toSourceMapGenerator(e,l).toJsComment()}var c=new(Function.bind.apply(Function,f([void 0],o.concat(i))));return this.executeFunction(c,s)},e.prototype.executeFunction=function(e,t){return e.apply(void 0,f(t))},e}(),Pi=function(e){function t(t){var n=e.call(this)||this;return n.reflector=t,n._evalArgNames=[],n._evalArgValues=[],n._evalExportedVars=[],n}return o(t,e),t.prototype.createReturnStmt=function(e){new Je(new ze(this._evalExportedVars.map(function(e){return new Ke(e,ct(e),!1)}))).visitStatement(this,e)},t.prototype.getArgs=function(){for(var e={},t=0;t<this._evalArgNames.length;t++)e[this._evalArgNames[t]]=this._evalArgValues[t];return e},t.prototype.visitExternalExpr=function(e,t){return this._emitReferenceToExternal(e,this.reflector.resolveExternalReference(e.value),t),null},t.prototype.visitWrappedNodeExpr=function(e,t){return this._emitReferenceToExternal(e,e.node,t),null},t.prototype.visitDeclareVarStmt=function(t,n){return t.hasModifier(ke.Exported)&&this._evalExportedVars.push(t.name),e.prototype.visitDeclareVarStmt.call(this,t,n)},t.prototype.visitDeclareFunctionStmt=function(t,n){return t.hasModifier(ke.Exported)&&this._evalExportedVars.push(t.name),e.prototype.visitDeclareFunctionStmt.call(this,t,n)},t.prototype.visitDeclareClassStmt=function(t,n){return t.hasModifier(ke.Exported)&&this._evalExportedVars.push(t.name),e.prototype.visitDeclareClassStmt.call(this,t,n)},t.prototype._emitReferenceToExternal=function(e,t,n){var r=this._evalArgValues.indexOf(t);if(-1===r){r=this._evalArgValues.length,this._evalArgValues.push(t);var i=rn({reference:t})||"val";this._evalArgNames.push("jit_"+i+"_"+r)}n.print(e,this._evalArgNames[r])},t}(ki),Ii=0,Mi=9,Oi=10,Ri=11,Di=12,Li=13,Fi=32,ji=34,Vi=36,Hi=39,Bi=43,Ui=45,qi=47,Ki=59,zi=61,Wi=62,Qi=48,$i=55,Gi=57,Xi=65,Yi=70,Zi=90,Ji=95,eo=97,to=102,no=110,ro=114,io=116,oo=118,so=122,ao=160;
|
|
166
|
+
/**
|
|
167
|
+
* @license
|
|
168
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
169
|
+
*
|
|
170
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
171
|
+
* found in the LICENSE file at https://angular.io/license
|
|
172
|
+
*/function uo(e){return e>=Mi&&e<=Fi||e==ao}function lo(e){return Qi<=e&&e<=Gi}function co(e){return e>=eo&&e<=so||e>=Xi&&e<=Zi}function po(e){return e===Oi||e===Li}function ho(e){return Qi<=e&&e<=$i}
|
|
166
173
|
/**
|
|
167
174
|
* @license
|
|
168
175
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -184,21 +191,21 @@ function li(e,t){if(null!=t){if(!Array.isArray(t))throw new Error("Expected '"+e
|
|
|
184
191
|
* Use of this source code is governed by an MIT-style license that can be
|
|
185
192
|
* found in the LICENSE file at https://angular.io/license
|
|
186
193
|
*/
|
|
187
|
-
var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,this.message="Parser Error: "+e+" "+n+" ["+t+"] in "+r},Eo=function Eo(e,t){this.start=e,this.end=t},So=function(){function e(e){this.span=e}return e.prototype.visit=function(e,t){return void 0===t&&(t=null),null},e.prototype.toString=function(){return"AST"},e}(),Co=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.prefix=n,o.uninterpretedExpression=r,o.location=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitQuote(this,t)},t.prototype.toString=function(){return"Quote"},t}(So),To=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visit=function(e,t){void 0===t&&(t=null)},t}(So),No=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitImplicitReceiver(this,t)},t}(So),ko=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expressions=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitChain(this,t)},t}(So),Ao=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.condition=n,o.trueExp=r,o.falseExp=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitConditional(this,t)},t}(So),Po=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.receiver=n,i.name=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPropertyRead(this,t)},t}(So),Io=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.receiver=n,o.name=r,o.value=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPropertyWrite(this,t)},t}(So),Mo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.receiver=n,i.name=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitSafePropertyRead(this,t)},t}(So),Oo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.obj=n,i.key=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitKeyedRead(this,t)},t}(So),Ro=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.obj=n,o.key=r,o.value=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitKeyedWrite(this,t)},t}(So),Do=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.exp=n,o.name=r,o.args=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPipe(this,t)},t}(So),Lo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.value=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralPrimitive(this,t)},t}(So),Fo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expressions=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralArray(this,t)},t}(So),jo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.keys=n,i.values=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralMap(this,t)},t}(So),Vo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.strings=n,i.expressions=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitInterpolation(this,t)},t}(So),Ho=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.operation=n,o.left=r,o.right=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitBinary(this,t)},t}(So),Bo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expression=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPrefixNot(this,t)},t}(So),Uo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expression=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitNonNullAssert(this,t)},t}(So),qo=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.receiver=n,o.name=r,o.args=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitMethodCall(this,t)},t}(So),Ko=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.receiver=n,o.name=r,o.args=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitSafeMethodCall(this,t)},t}(So),zo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.target=n,i.args=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitFunctionCall(this,t)},t}(So),Wo=function(e){function t(t,n,r,i){var o=e.call(this,new Eo(0,null==n?0:n.length))||this;return o.ast=t,o.source=n,o.location=r,o.errors=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),this.ast.visit(e,t)},t.prototype.toString=function(){return this.source+" in "+this.location},t}(So),Qo=function Qo(e,t,n,r,i){this.span=e,this.key=t,this.keyIsVar=n,this.name=r,this.expression=i},Go=function(){function e(){}return e.prototype.visitBinary=function(e,t){},e.prototype.visitChain=function(e,t){},e.prototype.visitConditional=function(e,t){},e.prototype.visitFunctionCall=function(e,t){},e.prototype.visitImplicitReceiver=function(e,t){},e.prototype.visitInterpolation=function(e,t){},e.prototype.visitKeyedRead=function(e,t){},e.prototype.visitKeyedWrite=function(e,t){},e.prototype.visitLiteralArray=function(e,t){},e.prototype.visitLiteralMap=function(e,t){},e.prototype.visitLiteralPrimitive=function(e,t){},e.prototype.visitMethodCall=function(e,t){},e.prototype.visitPipe=function(e,t){},e.prototype.visitPrefixNot=function(e,t){},e.prototype.visitNonNullAssert=function(e,t){},e.prototype.visitPropertyRead=function(e,t){},e.prototype.visitPropertyWrite=function(e,t){},e.prototype.visitQuote=function(e,t){},e.prototype.visitSafeMethodCall=function(e,t){},e.prototype.visitSafePropertyRead=function(e,t){},e}(),$o=function(){function e(){}return e.prototype.visitBinary=function(e,t){return e.left.visit(this),e.right.visit(this),null},e.prototype.visitChain=function(e,t){return this.visitAll(e.expressions,t)},e.prototype.visitConditional=function(e,t){return e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this),null},e.prototype.visitPipe=function(e,t){return e.exp.visit(this),this.visitAll(e.args,t),null},e.prototype.visitFunctionCall=function(e,t){return e.target.visit(this),this.visitAll(e.args,t),null},e.prototype.visitImplicitReceiver=function(e,t){return null},e.prototype.visitInterpolation=function(e,t){return this.visitAll(e.expressions,t)},e.prototype.visitKeyedRead=function(e,t){return e.obj.visit(this),e.key.visit(this),null},e.prototype.visitKeyedWrite=function(e,t){return e.obj.visit(this),e.key.visit(this),e.value.visit(this),null},e.prototype.visitLiteralArray=function(e,t){return this.visitAll(e.expressions,t)},e.prototype.visitLiteralMap=function(e,t){return this.visitAll(e.values,t)},e.prototype.visitLiteralPrimitive=function(e,t){return null},e.prototype.visitMethodCall=function(e,t){return e.receiver.visit(this),this.visitAll(e.args,t)},e.prototype.visitPrefixNot=function(e,t){return e.expression.visit(this),null},e.prototype.visitNonNullAssert=function(e,t){return e.expression.visit(this),null},e.prototype.visitPropertyRead=function(e,t){return e.receiver.visit(this),null},e.prototype.visitPropertyWrite=function(e,t){return e.receiver.visit(this),e.value.visit(this),null},e.prototype.visitSafePropertyRead=function(e,t){return e.receiver.visit(this),null},e.prototype.visitSafeMethodCall=function(e,t){return e.receiver.visit(this),this.visitAll(e.args,t)},e.prototype.visitAll=function(e,t){var n=this;return e.forEach(function(e){return e.visit(n,t)}),null},e.prototype.visitQuote=function(e,t){return null},e}(),Xo=function(){function e(){}return e.prototype.visitImplicitReceiver=function(e,t){return e},e.prototype.visitInterpolation=function(e,t){return new Vo(e.span,e.strings,this.visitAll(e.expressions))},e.prototype.visitLiteralPrimitive=function(e,t){return new Lo(e.span,e.value)},e.prototype.visitPropertyRead=function(e,t){return new Po(e.span,e.receiver.visit(this),e.name)},e.prototype.visitPropertyWrite=function(e,t){return new Io(e.span,e.receiver.visit(this),e.name,e.value.visit(this))},e.prototype.visitSafePropertyRead=function(e,t){return new Mo(e.span,e.receiver.visit(this),e.name)},e.prototype.visitMethodCall=function(e,t){return new qo(e.span,e.receiver.visit(this),e.name,this.visitAll(e.args))},e.prototype.visitSafeMethodCall=function(e,t){return new Ko(e.span,e.receiver.visit(this),e.name,this.visitAll(e.args))},e.prototype.visitFunctionCall=function(e,t){return new zo(e.span,e.target.visit(this),this.visitAll(e.args))},e.prototype.visitLiteralArray=function(e,t){return new Fo(e.span,this.visitAll(e.expressions))},e.prototype.visitLiteralMap=function(e,t){return new jo(e.span,e.keys,this.visitAll(e.values))},e.prototype.visitBinary=function(e,t){return new Ho(e.span,e.operation,e.left.visit(this),e.right.visit(this))},e.prototype.visitPrefixNot=function(e,t){return new Bo(e.span,e.expression.visit(this))},e.prototype.visitNonNullAssert=function(e,t){return new Uo(e.span,e.expression.visit(this))},e.prototype.visitConditional=function(e,t){return new Ao(e.span,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))},e.prototype.visitPipe=function(e,t){return new Do(e.span,e.exp.visit(this),e.name,this.visitAll(e.args))},e.prototype.visitKeyedRead=function(e,t){return new Oo(e.span,e.obj.visit(this),e.key.visit(this))},e.prototype.visitKeyedWrite=function(e,t){return new Ro(e.span,e.obj.visit(this),e.key.visit(this),e.value.visit(this))},e.prototype.visitAll=function(e){for(var t=new Array(e.length),n=0;n<e.length;++n)t[n]=e[n].visit(this);return t},e.prototype.visitChain=function(e,t){return new ko(e.span,this.visitAll(e.expressions))},e.prototype.visitQuote=function(e,t){return new Co(e.span,e.prefix,e.uninterpretedExpression,e.location)},e}(),Yo=function(){function e(){}return e.prototype.visitImplicitReceiver=function(e,t){return e},e.prototype.visitInterpolation=function(e,t){var n=this.visitAll(e.expressions);return n!==e.expressions?new Vo(e.span,e.strings,n):e},e.prototype.visitLiteralPrimitive=function(e,t){return e},e.prototype.visitPropertyRead=function(e,t){var n=e.receiver.visit(this);return n!==e.receiver?new Po(e.span,n,e.name):e},e.prototype.visitPropertyWrite=function(e,t){var n=e.receiver.visit(this),r=e.value.visit(this);return n!==e.receiver||r!==e.value?new Io(e.span,n,e.name,r):e},e.prototype.visitSafePropertyRead=function(e,t){var n=e.receiver.visit(this);return n!==e.receiver?new Mo(e.span,n,e.name):e},e.prototype.visitMethodCall=function(e,t){var n=e.receiver.visit(this),r=this.visitAll(e.args);return n!==e.receiver||r!==e.args?new qo(e.span,n,e.name,r):e},e.prototype.visitSafeMethodCall=function(e,t){var n=e.receiver.visit(this),r=this.visitAll(e.args);return n!==e.receiver||r!==e.args?new Ko(e.span,n,e.name,r):e},e.prototype.visitFunctionCall=function(e,t){var n=e.target&&e.target.visit(this),r=this.visitAll(e.args);return n!==e.target||r!==e.args?new zo(e.span,n,r):e},e.prototype.visitLiteralArray=function(e,t){var n=this.visitAll(e.expressions);return n!==e.expressions?new Fo(e.span,n):e},e.prototype.visitLiteralMap=function(e,t){var n=this.visitAll(e.values);return n!==e.values?new jo(e.span,e.keys,n):e},e.prototype.visitBinary=function(e,t){var n=e.left.visit(this),r=e.right.visit(this);return n!==e.left||r!==e.right?new Ho(e.span,e.operation,n,r):e},e.prototype.visitPrefixNot=function(e,t){var n=e.expression.visit(this);return n!==e.expression?new Bo(e.span,n):e},e.prototype.visitNonNullAssert=function(e,t){var n=e.expression.visit(this);return n!==e.expression?new Uo(e.span,n):e},e.prototype.visitConditional=function(e,t){var n=e.condition.visit(this),r=e.trueExp.visit(this),i=e.falseExp.visit(this);return n!==e.condition||r!==e.trueExp||i!==e.falseExp?new Ao(e.span,n,r,i):e},e.prototype.visitPipe=function(e,t){var n=e.exp.visit(this),r=this.visitAll(e.args);return n!==e.exp||r!==e.args?new Do(e.span,n,e.name,r):e},e.prototype.visitKeyedRead=function(e,t){var n=e.obj.visit(this),r=e.key.visit(this);return n!==e.obj||r!==e.key?new Oo(e.span,n,r):e},e.prototype.visitKeyedWrite=function(e,t){var n=e.obj.visit(this),r=e.key.visit(this),i=e.value.visit(this);return n!==e.obj||r!==e.key||i!==e.value?new Ro(e.span,n,r,i):e},e.prototype.visitAll=function(e){for(var t=new Array(e.length),n=!1,r=0;r<e.length;++r){var i=e[r],o=i.visit(this);t[r]=o,n=n||o!==i}return n?t:e},e.prototype.visitChain=function(e,t){var n=this.visitAll(e.expressions);return n!==e.expressions?new ko(e.span,n):e},e.prototype.visitQuote=function(e,t){return e},e}();function Zo(e,t,n){function r(e){t.visit&&t.visit(e,n)||e.visit(t,n)}function i(e){e.forEach(r)}e.visit({visitBinary:function(e){r(e.left),r(e.right)},visitChain:function(e){i(e.expressions)},visitConditional:function(e){r(e.condition),r(e.trueExp),r(e.falseExp)},visitFunctionCall:function(e){e.target&&r(e.target),i(e.args)},visitImplicitReceiver:function(e){},visitInterpolation:function(e){i(e.expressions)},visitKeyedRead:function(e){r(e.obj),r(e.key)},visitKeyedWrite:function(e){r(e.obj),r(e.key),r(e.obj)},visitLiteralArray:function(e){i(e.expressions)},visitLiteralMap:function(e){},visitLiteralPrimitive:function(e){},visitMethodCall:function(e){r(e.receiver),i(e.args)},visitPipe:function(e){r(e.exp),i(e.args)},visitPrefixNot:function(e){r(e.expression)},visitNonNullAssert:function(e){r(e.expression)},visitPropertyRead:function(e){r(e.receiver)},visitPropertyWrite:function(e){r(e.receiver),r(e.value)},visitQuote:function(e){},visitSafeMethodCall:function(e){r(e.receiver),i(e.args)},visitSafePropertyRead:function(e){r(e.receiver)}})}var Jo,es=function es(e,t,n,r){this.name=e,this.expression=t,this.type=n,this.sourceSpan=r,this.isLiteral=this.type===Jo.LITERAL_ATTR,this.isAnimation=this.type===Jo.ANIMATION};!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LITERAL_ATTR=1]="LITERAL_ATTR",e[e.ANIMATION=2]="ANIMATION"}(Jo||(Jo={}));var ts,ns,rs=function rs(e,t,n,r,i,o){this.name=e,this.targetOrPhase=t,this.type=n,this.handler=r,this.sourceSpan=i,this.handlerSpan=o},is=function is(e,t,n){this.name=e,this.value=t,this.sourceSpan=n},os=function os(e,t,n,r,i,o){this.name=e,this.type=t,this.securityContext=n,this.value=r,this.unit=i,this.sourceSpan=o},ss=function(){function e(){}return e.event=ct("$event"),e}(),as=function as(e,t){this.stmts=e,this.allowDefault=t,this.render3Stmts=e.map(function(e){return e instanceof Xe&&e.name==t.name&&e.value instanceof He?new Je(e.value.lhs.value):e})},us=function us(e,t){this.stmts=e,this.currValExpr=t};function ls(e,t,n,r,i,o){e||(e=new ys);var s=function a(e){return ct("currVal_"+e)}(r),u=new ms(e,t,r,o),l=n.visit(u,ns.Expression),c=cs(u,r);return 0===u.temporaryCount&&i==ts.TrySimple?new us([],l):(c.push(s.set(l).toDeclStmt(he,[ke.Final])),new us(c,s))}function cs(e,t){for(var n=[],r=0;r<e.temporaryCount;r++)n.push(hs(t,r));return n}function ps(e,t){return"tmp_"+e+"_"+t}function hs(e,t){return new Xe(ps(e,t),Qe)}function fs(e,t){if(e!==ns.Expression)throw new Error("Expected an expression, but saw "+t)}function ds(e,t){return e===ns.Statement?t.toStmt():t}!function(e){e[e.General=0]="General",e[e.TrySimple=1]="TrySimple"}(ts||(ts={})),function(e){e[e.Statement=0]="Statement",e[e.Expression=1]="Expression"}(ns||(ns={}));var vs=function(e){function t(t){var n=e.call(this)||this;return n._converterFactory=t,n}return o(t,e),t.prototype.visitPipe=function(e,t){var n=this,r=f([e.exp],e.args).map(function(e){return e.visit(n,t)});return new gs(e.span,r,this._converterFactory.createPipeConverter(e.name,r.length))},t.prototype.visitLiteralArray=function(e,t){var n=this,r=e.expressions.map(function(e){return e.visit(n,t)});return new gs(e.span,r,this._converterFactory.createLiteralArrayConverter(e.expressions.length))},t.prototype.visitLiteralMap=function(e,t){var n=this,r=e.values.map(function(e){return e.visit(n,t)});return new gs(e.span,r,this._converterFactory.createLiteralMapConverter(e.keys))},t}(Xo),ms=function(){function e(e,t,n,r,i){this._localResolver=e,this._implicitReceiver=t,this.bindingId=n,this.interpolationFunction=r,this.baseSourceSpan=i,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0}return e.prototype.visitBinary=function(e,t){var n;switch(e.operation){case"+":n=ue.Plus;break;case"-":n=ue.Minus;break;case"*":n=ue.Multiply;break;case"/":n=ue.Divide;break;case"%":n=ue.Modulo;break;case"&&":n=ue.And;break;case"||":n=ue.Or;break;case"==":n=ue.Equals;break;case"!=":n=ue.NotEquals;break;case"===":n=ue.Identical;break;case"!==":n=ue.NotIdentical;break;case"<":n=ue.Lower;break;case">":n=ue.Bigger;break;case"<=":n=ue.LowerEquals;break;case">=":n=ue.BiggerEquals;break;default:throw new Error("Unsupported operation "+e.operation)}return ds(t,new He(n,this._visit(e.left,ns.Expression),this._visit(e.right,ns.Expression),void 0,this.convertSourceSpan(e.span)))},e.prototype.visitChain=function(e,t){return function n(e,t){if(e!==ns.Statement)throw new Error("Expected a statement, but saw "+t)}(t,e),this.visitAll(e.expressions,t)},e.prototype.visitConditional=function(e,t){return ds(t,this._visit(e.condition,ns.Expression).conditional(this._visit(e.trueExp,ns.Expression),this._visit(e.falseExp,ns.Expression),this.convertSourceSpan(e.span)))},e.prototype.visitPipe=function(e,t){throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: "+e.name)},e.prototype.visitFunctionCall=function(e,t){var n=this.visitAll(e.args,ns.Expression);return ds(t,e instanceof gs?e.converter(n):this._visit(e.target,ns.Expression).callFn(n,this.convertSourceSpan(e.span)))},e.prototype.visitImplicitReceiver=function(e,t){return fs(t,e),this._implicitReceiver},e.prototype.visitInterpolation=function(e,t){fs(t,e);for(var n=[yt(e.expressions.length)],r=0;r<e.strings.length-1;r++)n.push(yt(e.strings[r])),n.push(this._visit(e.expressions[r],ns.Expression));return n.push(yt(e.strings[e.strings.length-1])),this.interpolationFunction?this.interpolationFunction(n):e.expressions.length<=9?pt(Gt.inlineInterpolate).callFn(n):pt(Gt.interpolate).callFn([n[0],ft(n.slice(1),void 0,this.convertSourceSpan(e.span))])},e.prototype.visitKeyedRead=function(e,t){var n=this.leftMostSafeNode(e);return n?this.convertSafeAccess(e,n,t):ds(t,this._visit(e.obj,ns.Expression).key(this._visit(e.key,ns.Expression)))},e.prototype.visitKeyedWrite=function(e,t){var n=this._visit(e.obj,ns.Expression),r=this._visit(e.key,ns.Expression),i=this._visit(e.value,ns.Expression);return ds(t,n.key(r).set(i))},e.prototype.visitLiteralArray=function(e,t){throw new Error("Illegal State: literal arrays should have been converted into functions")},e.prototype.visitLiteralMap=function(e,t){throw new Error("Illegal State: literal maps should have been converted into functions")},e.prototype.visitLiteralPrimitive=function(e,t){return ds(t,yt(e.value,null==e.value||!0===e.value||!0===e.value?fe:void 0,this.convertSourceSpan(e.span)))},e.prototype._getLocal=function(e){return this._localResolver.getLocal(e)},e.prototype.visitMethodCall=function(e,t){if(e.receiver instanceof No&&"$any"==e.name){if(1!=(r=this.visitAll(e.args,ns.Expression)).length)throw new Error("Invalid call to $any, expected 1 argument but received "+(r.length||"none"));return r[0].cast(he,this.convertSourceSpan(e.span))}var n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);var r=this.visitAll(e.args,ns.Expression),i=null,o=this._visit(e.receiver,ns.Expression);if(o===this._implicitReceiver){var s=this._getLocal(e.name);s&&(i=s.callFn(r))}return null==i&&(i=o.callMethod(e.name,r,this.convertSourceSpan(e.span))),ds(t,i)},e.prototype.visitPrefixNot=function(e,t){return ds(t,function n(e,t){return new De(e,t)}(this._visit(e.expression,ns.Expression)))},e.prototype.visitNonNullAssert=function(e,t){return ds(t,function n(e,t){return new Le(e,t)}(this._visit(e.expression,ns.Expression)))},e.prototype.visitPropertyRead=function(e,t){var n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);var r=null,i=this._visit(e.receiver,ns.Expression);return i===this._implicitReceiver&&(r=this._getLocal(e.name)),null==r&&(r=i.prop(e.name)),ds(t,r)},e.prototype.visitPropertyWrite=function(e,t){var n=this._visit(e.receiver,ns.Expression),r=null;if(n===this._implicitReceiver){var i=this._getLocal(e.name);if(i){if(!(i instanceof Be))throw new Error("Cannot assign to a reference or variable!");r=i}}return null===r&&(r=n.prop(e.name)),ds(t,r.set(this._visit(e.value,ns.Expression)))},e.prototype.visitSafePropertyRead=function(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)},e.prototype.visitSafeMethodCall=function(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)},e.prototype.visitAll=function(e,t){var n=this;return e.map(function(e){return n._visit(e,t)})},e.prototype.visitQuote=function(e,t){throw new Error("Quotes are not supported for evaluation!\n Statement: "+e.uninterpretedExpression+" located at "+e.location)},e.prototype._visit=function(e,t){return this._resultMap.get(e)||(this._nodeMap.get(e)||e).visit(this,t)},e.prototype.convertSafeAccess=function(e,t,n){var r=this._visit(t.receiver,ns.Expression),i=void 0;this.needsTemporary(t.receiver)&&(r=(i=this.allocateTemporary()).set(r),this._resultMap.set(t.receiver,i));var o=r.isBlank();this._nodeMap.set(t,t instanceof Ko?new qo(t.span,t.receiver,t.name,t.args):new Po(t.span,t.receiver,t.name));var s=this._visit(e,ns.Expression);return this._nodeMap.delete(t),i&&this.releaseTemporary(i),ds(n,o.conditional(yt(null),s))},e.prototype.leftMostSafeNode=function(e){var t=this,n=function(e,n){return(t._nodeMap.get(n)||n).visit(e)};return e.visit({visitBinary:function(e){return null},visitChain:function(e){return null},visitConditional:function(e){return null},visitFunctionCall:function(e){return null},visitImplicitReceiver:function(e){return null},visitInterpolation:function(e){return null},visitKeyedRead:function(e){return n(this,e.obj)},visitKeyedWrite:function(e){return null},visitLiteralArray:function(e){return null},visitLiteralMap:function(e){return null},visitLiteralPrimitive:function(e){return null},visitMethodCall:function(e){return n(this,e.receiver)},visitPipe:function(e){return null},visitPrefixNot:function(e){return null},visitNonNullAssert:function(e){return null},visitPropertyRead:function(e){return n(this,e.receiver)},visitPropertyWrite:function(e){return null},visitQuote:function(e){return null},visitSafeMethodCall:function(e){return n(this,e.receiver)||e},visitSafePropertyRead:function(e){return n(this,e.receiver)||e}})},e.prototype.needsTemporary=function(e){var t=this,n=function(e,n){return n&&(t._nodeMap.get(n)||n).visit(e)};return e.visit({visitBinary:function(e){return n(this,e.left)||n(this,e.right)},visitChain:function(e){return!1},visitConditional:function(e){return n(this,e.condition)||n(this,e.trueExp)||n(this,e.falseExp)},visitFunctionCall:function(e){return!0},visitImplicitReceiver:function(e){return!1},visitInterpolation:function(e){return function(e,t){return t.some(function(t){return n(e,t)})}(this,e.expressions)},visitKeyedRead:function(e){return!1},visitKeyedWrite:function(e){return!1},visitLiteralArray:function(e){return!0},visitLiteralMap:function(e){return!0},visitLiteralPrimitive:function(e){return!1},visitMethodCall:function(e){return!0},visitPipe:function(e){return!0},visitPrefixNot:function(e){return n(this,e.expression)},visitNonNullAssert:function(e){return n(this,e.expression)},visitPropertyRead:function(e){return!1},visitPropertyWrite:function(e){return!1},visitQuote:function(e){return!1},visitSafeMethodCall:function(e){return!0},visitSafePropertyRead:function(e){return!1}})},e.prototype.allocateTemporary=function(){var e=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new xe(ps(this.bindingId,e))},e.prototype.releaseTemporary=function(e){if(this._currentTemporary--,e.name!=ps(this.bindingId,this._currentTemporary))throw new Error("Temporary "+e.name+" released out of order")},e.prototype.convertSourceSpan=function(e){if(this.baseSourceSpan){var t=this.baseSourceSpan.start.moveBy(e.start),n=this.baseSourceSpan.start.moveBy(e.end);return new yo(t,n)}return null},e}(),ys=function(){function e(){}return e.prototype.getLocal=function(e){return e===ss.event.name?ss.event:null},e}(),gs=function(e){function t(t,n,r){var i=e.call(this,t,null,n)||this;return i.args=n,i.converter=r,i}return o(t,e),t}(zo),_s=function(){function e(){this.strictStyling=!0}return e.prototype.shimCssText=function(e,t,n){void 0===n&&(n="");var r=function i(e){return e.match(js)||[]}(e);return e=function o(e){return e.replace(Fs,"")}(e),e=this._insertDirectives(e),f([this._scopeCssText(e,t,n)],r).join("\n")},e.prototype._insertDirectives=function(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)},e.prototype._insertPolyfillDirectivesInCssText=function(e){return e.replace(ws,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[2]+"{"})},e.prototype._insertPolyfillRulesInCssText=function(e){return e.replace(xs,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0].replace(e[1],"").replace(e[2],"");return e[4]+n})},e.prototype._scopeCssText=function(e,t,n){var r=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"+r).trim()},e.prototype._extractUnscopedRulesFromCssText=function(e){var t,n="";for(Es.lastIndex=0;null!==(t=Es.exec(e));)n+=t[0].replace(t[2],"").replace(t[1],t[4])+"\n\n";return n},e.prototype._convertColonHost=function(e){return this._convertColonRule(e,Ns,this._colonHostPartReplacer)},e.prototype._convertColonHostContext=function(e){return this._convertColonRule(e,ks,this._colonHostContextPartReplacer)},e.prototype._convertColonRule=function(e,t,n){return e.replace(t,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[2]){for(var r=e[2].split(","),i=[],o=0;o<r.length;o++){var s=r[o].trim();if(!s)break;i.push(n(As,s,e[3]))}return i.join(",")}return As+e[3]})},e.prototype._colonHostContextPartReplacer=function(e,t,n){return t.indexOf(Ss)>-1?this._colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n},e.prototype._colonHostPartReplacer=function(e,t,n){return e+t.replace(Ss,"")+n},e.prototype._convertShadowDOMSelectors=function(e){return Is.reduce(function(e,t){return e.replace(t," ")},e)},e.prototype._scopeSelectors=function(e,t,n){var r=this;return function i(e,t){var n=function r(e){for(var t=e.split(Hs),n=[],r=[],i=0,o=[],s=0;s<t.length;s++){var a=t[s];a==Us&&i--,i>0?o.push(a):(o.length>0&&(r.push(o.join("")),n.push(qs),o=[]),n.push(a)),a==Bs&&i++}return o.length>0&&(r.push(o.join("")),n.push(qs)),new zs(n.join(""),r)}
|
|
194
|
+
var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,this.message="Parser Error: "+e+" "+n+" ["+t+"] in "+r},Eo=function Eo(e,t){this.start=e,this.end=t},So=function(){function e(e){this.span=e}return e.prototype.visit=function(e,t){return void 0===t&&(t=null),null},e.prototype.toString=function(){return"AST"},e}(),Co=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.prefix=n,o.uninterpretedExpression=r,o.location=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitQuote(this,t)},t.prototype.toString=function(){return"Quote"},t}(So),To=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visit=function(e,t){void 0===t&&(t=null)},t}(So),No=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitImplicitReceiver(this,t)},t}(So),ko=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expressions=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitChain(this,t)},t}(So),Ao=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.condition=n,o.trueExp=r,o.falseExp=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitConditional(this,t)},t}(So),Po=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.receiver=n,i.name=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPropertyRead(this,t)},t}(So),Io=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.receiver=n,o.name=r,o.value=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPropertyWrite(this,t)},t}(So),Mo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.receiver=n,i.name=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitSafePropertyRead(this,t)},t}(So),Oo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.obj=n,i.key=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitKeyedRead(this,t)},t}(So),Ro=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.obj=n,o.key=r,o.value=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitKeyedWrite(this,t)},t}(So),Do=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.exp=n,o.name=r,o.args=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPipe(this,t)},t}(So),Lo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.value=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralPrimitive(this,t)},t}(So),Fo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expressions=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralArray(this,t)},t}(So),jo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.keys=n,i.values=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralMap(this,t)},t}(So),Vo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.strings=n,i.expressions=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitInterpolation(this,t)},t}(So),Ho=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.operation=n,o.left=r,o.right=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitBinary(this,t)},t}(So),Bo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expression=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPrefixNot(this,t)},t}(So),Uo=function(e){function t(t,n){var r=e.call(this,t)||this;return r.expression=n,r}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitNonNullAssert(this,t)},t}(So),qo=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.receiver=n,o.name=r,o.args=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitMethodCall(this,t)},t}(So),Ko=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.receiver=n,o.name=r,o.args=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitSafeMethodCall(this,t)},t}(So),zo=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.target=n,i.args=r,i}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitFunctionCall(this,t)},t}(So),Wo=function(e){function t(t,n,r,i){var o=e.call(this,new Eo(0,null==n?0:n.length))||this;return o.ast=t,o.source=n,o.location=r,o.errors=i,o}return o(t,e),t.prototype.visit=function(e,t){return void 0===t&&(t=null),this.ast.visit(e,t)},t.prototype.toString=function(){return this.source+" in "+this.location},t}(So),Qo=function Qo(e,t,n,r,i){this.span=e,this.key=t,this.keyIsVar=n,this.name=r,this.expression=i},$o=function(){function e(){}return e.prototype.visitBinary=function(e,t){},e.prototype.visitChain=function(e,t){},e.prototype.visitConditional=function(e,t){},e.prototype.visitFunctionCall=function(e,t){},e.prototype.visitImplicitReceiver=function(e,t){},e.prototype.visitInterpolation=function(e,t){},e.prototype.visitKeyedRead=function(e,t){},e.prototype.visitKeyedWrite=function(e,t){},e.prototype.visitLiteralArray=function(e,t){},e.prototype.visitLiteralMap=function(e,t){},e.prototype.visitLiteralPrimitive=function(e,t){},e.prototype.visitMethodCall=function(e,t){},e.prototype.visitPipe=function(e,t){},e.prototype.visitPrefixNot=function(e,t){},e.prototype.visitNonNullAssert=function(e,t){},e.prototype.visitPropertyRead=function(e,t){},e.prototype.visitPropertyWrite=function(e,t){},e.prototype.visitQuote=function(e,t){},e.prototype.visitSafeMethodCall=function(e,t){},e.prototype.visitSafePropertyRead=function(e,t){},e}(),Go=function(){function e(){}return e.prototype.visitBinary=function(e,t){return e.left.visit(this),e.right.visit(this),null},e.prototype.visitChain=function(e,t){return this.visitAll(e.expressions,t)},e.prototype.visitConditional=function(e,t){return e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this),null},e.prototype.visitPipe=function(e,t){return e.exp.visit(this),this.visitAll(e.args,t),null},e.prototype.visitFunctionCall=function(e,t){return e.target.visit(this),this.visitAll(e.args,t),null},e.prototype.visitImplicitReceiver=function(e,t){return null},e.prototype.visitInterpolation=function(e,t){return this.visitAll(e.expressions,t)},e.prototype.visitKeyedRead=function(e,t){return e.obj.visit(this),e.key.visit(this),null},e.prototype.visitKeyedWrite=function(e,t){return e.obj.visit(this),e.key.visit(this),e.value.visit(this),null},e.prototype.visitLiteralArray=function(e,t){return this.visitAll(e.expressions,t)},e.prototype.visitLiteralMap=function(e,t){return this.visitAll(e.values,t)},e.prototype.visitLiteralPrimitive=function(e,t){return null},e.prototype.visitMethodCall=function(e,t){return e.receiver.visit(this),this.visitAll(e.args,t)},e.prototype.visitPrefixNot=function(e,t){return e.expression.visit(this),null},e.prototype.visitNonNullAssert=function(e,t){return e.expression.visit(this),null},e.prototype.visitPropertyRead=function(e,t){return e.receiver.visit(this),null},e.prototype.visitPropertyWrite=function(e,t){return e.receiver.visit(this),e.value.visit(this),null},e.prototype.visitSafePropertyRead=function(e,t){return e.receiver.visit(this),null},e.prototype.visitSafeMethodCall=function(e,t){return e.receiver.visit(this),this.visitAll(e.args,t)},e.prototype.visitAll=function(e,t){var n=this;return e.forEach(function(e){return e.visit(n,t)}),null},e.prototype.visitQuote=function(e,t){return null},e}(),Xo=function(){function e(){}return e.prototype.visitImplicitReceiver=function(e,t){return e},e.prototype.visitInterpolation=function(e,t){return new Vo(e.span,e.strings,this.visitAll(e.expressions))},e.prototype.visitLiteralPrimitive=function(e,t){return new Lo(e.span,e.value)},e.prototype.visitPropertyRead=function(e,t){return new Po(e.span,e.receiver.visit(this),e.name)},e.prototype.visitPropertyWrite=function(e,t){return new Io(e.span,e.receiver.visit(this),e.name,e.value.visit(this))},e.prototype.visitSafePropertyRead=function(e,t){return new Mo(e.span,e.receiver.visit(this),e.name)},e.prototype.visitMethodCall=function(e,t){return new qo(e.span,e.receiver.visit(this),e.name,this.visitAll(e.args))},e.prototype.visitSafeMethodCall=function(e,t){return new Ko(e.span,e.receiver.visit(this),e.name,this.visitAll(e.args))},e.prototype.visitFunctionCall=function(e,t){return new zo(e.span,e.target.visit(this),this.visitAll(e.args))},e.prototype.visitLiteralArray=function(e,t){return new Fo(e.span,this.visitAll(e.expressions))},e.prototype.visitLiteralMap=function(e,t){return new jo(e.span,e.keys,this.visitAll(e.values))},e.prototype.visitBinary=function(e,t){return new Ho(e.span,e.operation,e.left.visit(this),e.right.visit(this))},e.prototype.visitPrefixNot=function(e,t){return new Bo(e.span,e.expression.visit(this))},e.prototype.visitNonNullAssert=function(e,t){return new Uo(e.span,e.expression.visit(this))},e.prototype.visitConditional=function(e,t){return new Ao(e.span,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))},e.prototype.visitPipe=function(e,t){return new Do(e.span,e.exp.visit(this),e.name,this.visitAll(e.args))},e.prototype.visitKeyedRead=function(e,t){return new Oo(e.span,e.obj.visit(this),e.key.visit(this))},e.prototype.visitKeyedWrite=function(e,t){return new Ro(e.span,e.obj.visit(this),e.key.visit(this),e.value.visit(this))},e.prototype.visitAll=function(e){for(var t=new Array(e.length),n=0;n<e.length;++n)t[n]=e[n].visit(this);return t},e.prototype.visitChain=function(e,t){return new ko(e.span,this.visitAll(e.expressions))},e.prototype.visitQuote=function(e,t){return new Co(e.span,e.prefix,e.uninterpretedExpression,e.location)},e}(),Yo=function(){function e(){}return e.prototype.visitImplicitReceiver=function(e,t){return e},e.prototype.visitInterpolation=function(e,t){var n=this.visitAll(e.expressions);return n!==e.expressions?new Vo(e.span,e.strings,n):e},e.prototype.visitLiteralPrimitive=function(e,t){return e},e.prototype.visitPropertyRead=function(e,t){var n=e.receiver.visit(this);return n!==e.receiver?new Po(e.span,n,e.name):e},e.prototype.visitPropertyWrite=function(e,t){var n=e.receiver.visit(this),r=e.value.visit(this);return n!==e.receiver||r!==e.value?new Io(e.span,n,e.name,r):e},e.prototype.visitSafePropertyRead=function(e,t){var n=e.receiver.visit(this);return n!==e.receiver?new Mo(e.span,n,e.name):e},e.prototype.visitMethodCall=function(e,t){var n=e.receiver.visit(this),r=this.visitAll(e.args);return n!==e.receiver||r!==e.args?new qo(e.span,n,e.name,r):e},e.prototype.visitSafeMethodCall=function(e,t){var n=e.receiver.visit(this),r=this.visitAll(e.args);return n!==e.receiver||r!==e.args?new Ko(e.span,n,e.name,r):e},e.prototype.visitFunctionCall=function(e,t){var n=e.target&&e.target.visit(this),r=this.visitAll(e.args);return n!==e.target||r!==e.args?new zo(e.span,n,r):e},e.prototype.visitLiteralArray=function(e,t){var n=this.visitAll(e.expressions);return n!==e.expressions?new Fo(e.span,n):e},e.prototype.visitLiteralMap=function(e,t){var n=this.visitAll(e.values);return n!==e.values?new jo(e.span,e.keys,n):e},e.prototype.visitBinary=function(e,t){var n=e.left.visit(this),r=e.right.visit(this);return n!==e.left||r!==e.right?new Ho(e.span,e.operation,n,r):e},e.prototype.visitPrefixNot=function(e,t){var n=e.expression.visit(this);return n!==e.expression?new Bo(e.span,n):e},e.prototype.visitNonNullAssert=function(e,t){var n=e.expression.visit(this);return n!==e.expression?new Uo(e.span,n):e},e.prototype.visitConditional=function(e,t){var n=e.condition.visit(this),r=e.trueExp.visit(this),i=e.falseExp.visit(this);return n!==e.condition||r!==e.trueExp||i!==e.falseExp?new Ao(e.span,n,r,i):e},e.prototype.visitPipe=function(e,t){var n=e.exp.visit(this),r=this.visitAll(e.args);return n!==e.exp||r!==e.args?new Do(e.span,n,e.name,r):e},e.prototype.visitKeyedRead=function(e,t){var n=e.obj.visit(this),r=e.key.visit(this);return n!==e.obj||r!==e.key?new Oo(e.span,n,r):e},e.prototype.visitKeyedWrite=function(e,t){var n=e.obj.visit(this),r=e.key.visit(this),i=e.value.visit(this);return n!==e.obj||r!==e.key||i!==e.value?new Ro(e.span,n,r,i):e},e.prototype.visitAll=function(e){for(var t=new Array(e.length),n=!1,r=0;r<e.length;++r){var i=e[r],o=i.visit(this);t[r]=o,n=n||o!==i}return n?t:e},e.prototype.visitChain=function(e,t){var n=this.visitAll(e.expressions);return n!==e.expressions?new ko(e.span,n):e},e.prototype.visitQuote=function(e,t){return e},e}();function Zo(e,t,n){function r(e){t.visit&&t.visit(e,n)||e.visit(t,n)}function i(e){e.forEach(r)}e.visit({visitBinary:function(e){r(e.left),r(e.right)},visitChain:function(e){i(e.expressions)},visitConditional:function(e){r(e.condition),r(e.trueExp),r(e.falseExp)},visitFunctionCall:function(e){e.target&&r(e.target),i(e.args)},visitImplicitReceiver:function(e){},visitInterpolation:function(e){i(e.expressions)},visitKeyedRead:function(e){r(e.obj),r(e.key)},visitKeyedWrite:function(e){r(e.obj),r(e.key),r(e.obj)},visitLiteralArray:function(e){i(e.expressions)},visitLiteralMap:function(e){},visitLiteralPrimitive:function(e){},visitMethodCall:function(e){r(e.receiver),i(e.args)},visitPipe:function(e){r(e.exp),i(e.args)},visitPrefixNot:function(e){r(e.expression)},visitNonNullAssert:function(e){r(e.expression)},visitPropertyRead:function(e){r(e.receiver)},visitPropertyWrite:function(e){r(e.receiver),r(e.value)},visitQuote:function(e){},visitSafeMethodCall:function(e){r(e.receiver),i(e.args)},visitSafePropertyRead:function(e){r(e.receiver)}})}var Jo,es=function es(e,t,n,r){this.name=e,this.expression=t,this.type=n,this.sourceSpan=r,this.isLiteral=this.type===Jo.LITERAL_ATTR,this.isAnimation=this.type===Jo.ANIMATION};!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LITERAL_ATTR=1]="LITERAL_ATTR",e[e.ANIMATION=2]="ANIMATION"}(Jo||(Jo={}));var ts,ns,rs=function rs(e,t,n,r,i,o){this.name=e,this.targetOrPhase=t,this.type=n,this.handler=r,this.sourceSpan=i,this.handlerSpan=o},is=function is(e,t,n){this.name=e,this.value=t,this.sourceSpan=n},os=function os(e,t,n,r,i,o){this.name=e,this.type=t,this.securityContext=n,this.value=r,this.unit=i,this.sourceSpan=o},ss=function(){function e(){}return e.event=ct("$event"),e}(),as=function as(e,t){this.stmts=e,this.allowDefault=t,this.render3Stmts=e.map(function(e){return e instanceof Xe&&e.name==t.name&&e.value instanceof He?new Je(e.value.lhs.value):e})},us=function us(e,t){this.stmts=e,this.currValExpr=t};function ls(e,t,n,r,i,o){e||(e=new ys);var s=function a(e){return ct("currVal_"+e)}(r),u=new ms(e,t,r,o),l=n.visit(u,ns.Expression),c=cs(u,r);return u.usesImplicitReceiver&&e.notifyImplicitReceiverUse(),0===u.temporaryCount&&i==ts.TrySimple?new us([],l):(c.push(s.set(l).toDeclStmt(he,[ke.Final])),new us(c,s))}function cs(e,t){for(var n=[],r=0;r<e.temporaryCount;r++)n.push(hs(t,r));return n}function ps(e,t){return"tmp_"+e+"_"+t}function hs(e,t){return new Xe(ps(e,t),Qe)}function fs(e,t){if(e!==ns.Expression)throw new Error("Expected an expression, but saw "+t)}function ds(e,t){return e===ns.Statement?t.toStmt():t}!function(e){e[e.General=0]="General",e[e.TrySimple=1]="TrySimple"}(ts||(ts={})),function(e){e[e.Statement=0]="Statement",e[e.Expression=1]="Expression"}(ns||(ns={}));var vs=function(e){function t(t){var n=e.call(this)||this;return n._converterFactory=t,n}return o(t,e),t.prototype.visitPipe=function(e,t){var n=this,r=f([e.exp],e.args).map(function(e){return e.visit(n,t)});return new gs(e.span,r,this._converterFactory.createPipeConverter(e.name,r.length))},t.prototype.visitLiteralArray=function(e,t){var n=this,r=e.expressions.map(function(e){return e.visit(n,t)});return new gs(e.span,r,this._converterFactory.createLiteralArrayConverter(e.expressions.length))},t.prototype.visitLiteralMap=function(e,t){var n=this,r=e.values.map(function(e){return e.visit(n,t)});return new gs(e.span,r,this._converterFactory.createLiteralMapConverter(e.keys))},t}(Xo),ms=function(){function e(e,t,n,r,i){this._localResolver=e,this._implicitReceiver=t,this.bindingId=n,this.interpolationFunction=r,this.baseSourceSpan=i,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0,this.usesImplicitReceiver=!1}return e.prototype.visitBinary=function(e,t){var n;switch(e.operation){case"+":n=ue.Plus;break;case"-":n=ue.Minus;break;case"*":n=ue.Multiply;break;case"/":n=ue.Divide;break;case"%":n=ue.Modulo;break;case"&&":n=ue.And;break;case"||":n=ue.Or;break;case"==":n=ue.Equals;break;case"!=":n=ue.NotEquals;break;case"===":n=ue.Identical;break;case"!==":n=ue.NotIdentical;break;case"<":n=ue.Lower;break;case">":n=ue.Bigger;break;case"<=":n=ue.LowerEquals;break;case">=":n=ue.BiggerEquals;break;default:throw new Error("Unsupported operation "+e.operation)}return ds(t,new He(n,this._visit(e.left,ns.Expression),this._visit(e.right,ns.Expression),void 0,this.convertSourceSpan(e.span)))},e.prototype.visitChain=function(e,t){return function n(e,t){if(e!==ns.Statement)throw new Error("Expected a statement, but saw "+t)}(t,e),this.visitAll(e.expressions,t)},e.prototype.visitConditional=function(e,t){return ds(t,this._visit(e.condition,ns.Expression).conditional(this._visit(e.trueExp,ns.Expression),this._visit(e.falseExp,ns.Expression),this.convertSourceSpan(e.span)))},e.prototype.visitPipe=function(e,t){throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: "+e.name)},e.prototype.visitFunctionCall=function(e,t){var n=this.visitAll(e.args,ns.Expression);return ds(t,e instanceof gs?e.converter(n):this._visit(e.target,ns.Expression).callFn(n,this.convertSourceSpan(e.span)))},e.prototype.visitImplicitReceiver=function(e,t){return fs(t,e),this.usesImplicitReceiver=!0,this._implicitReceiver},e.prototype.visitInterpolation=function(e,t){fs(t,e);for(var n=[yt(e.expressions.length)],r=0;r<e.strings.length-1;r++)n.push(yt(e.strings[r])),n.push(this._visit(e.expressions[r],ns.Expression));return n.push(yt(e.strings[e.strings.length-1])),this.interpolationFunction?this.interpolationFunction(n):e.expressions.length<=9?pt($t.inlineInterpolate).callFn(n):pt($t.interpolate).callFn([n[0],ft(n.slice(1),void 0,this.convertSourceSpan(e.span))])},e.prototype.visitKeyedRead=function(e,t){var n=this.leftMostSafeNode(e);return n?this.convertSafeAccess(e,n,t):ds(t,this._visit(e.obj,ns.Expression).key(this._visit(e.key,ns.Expression)))},e.prototype.visitKeyedWrite=function(e,t){var n=this._visit(e.obj,ns.Expression),r=this._visit(e.key,ns.Expression),i=this._visit(e.value,ns.Expression);return ds(t,n.key(r).set(i))},e.prototype.visitLiteralArray=function(e,t){throw new Error("Illegal State: literal arrays should have been converted into functions")},e.prototype.visitLiteralMap=function(e,t){throw new Error("Illegal State: literal maps should have been converted into functions")},e.prototype.visitLiteralPrimitive=function(e,t){return ds(t,yt(e.value,null==e.value||!0===e.value||!0===e.value?fe:void 0,this.convertSourceSpan(e.span)))},e.prototype._getLocal=function(e){return this._localResolver.getLocal(e)},e.prototype.visitMethodCall=function(e,t){if(e.receiver instanceof No&&"$any"==e.name){if(1!=(r=this.visitAll(e.args,ns.Expression)).length)throw new Error("Invalid call to $any, expected 1 argument but received "+(r.length||"none"));return r[0].cast(he,this.convertSourceSpan(e.span))}var n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);var r=this.visitAll(e.args,ns.Expression),i=this.usesImplicitReceiver,o=null,s=this._visit(e.receiver,ns.Expression);if(s===this._implicitReceiver){var a=this._getLocal(e.name);a&&(this.usesImplicitReceiver=i,o=a.callFn(r))}return null==o&&(o=s.callMethod(e.name,r,this.convertSourceSpan(e.span))),ds(t,o)},e.prototype.visitPrefixNot=function(e,t){return ds(t,function n(e,t){return new De(e,t)}(this._visit(e.expression,ns.Expression)))},e.prototype.visitNonNullAssert=function(e,t){return ds(t,function n(e,t){return new Le(e,t)}(this._visit(e.expression,ns.Expression)))},e.prototype.visitPropertyRead=function(e,t){var n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);var r=null,i=this.usesImplicitReceiver,o=this._visit(e.receiver,ns.Expression);return o===this._implicitReceiver&&(r=this._getLocal(e.name))&&(this.usesImplicitReceiver=i),null==r&&(r=o.prop(e.name)),ds(t,r)},e.prototype.visitPropertyWrite=function(e,t){var n=this._visit(e.receiver,ns.Expression),r=this.usesImplicitReceiver,i=null;if(n===this._implicitReceiver){var o=this._getLocal(e.name);if(o){if(!(o instanceof Be))throw new Error("Cannot assign to a reference or variable!");i=o,this.usesImplicitReceiver=r}}return null===i&&(i=n.prop(e.name)),ds(t,i.set(this._visit(e.value,ns.Expression)))},e.prototype.visitSafePropertyRead=function(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)},e.prototype.visitSafeMethodCall=function(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)},e.prototype.visitAll=function(e,t){var n=this;return e.map(function(e){return n._visit(e,t)})},e.prototype.visitQuote=function(e,t){throw new Error("Quotes are not supported for evaluation!\n Statement: "+e.uninterpretedExpression+" located at "+e.location)},e.prototype._visit=function(e,t){return this._resultMap.get(e)||(this._nodeMap.get(e)||e).visit(this,t)},e.prototype.convertSafeAccess=function(e,t,n){var r=this._visit(t.receiver,ns.Expression),i=void 0;this.needsTemporary(t.receiver)&&(r=(i=this.allocateTemporary()).set(r),this._resultMap.set(t.receiver,i));var o=r.isBlank();this._nodeMap.set(t,t instanceof Ko?new qo(t.span,t.receiver,t.name,t.args):new Po(t.span,t.receiver,t.name));var s=this._visit(e,ns.Expression);return this._nodeMap.delete(t),i&&this.releaseTemporary(i),ds(n,o.conditional(yt(null),s))},e.prototype.leftMostSafeNode=function(e){var t=this,n=function(e,n){return(t._nodeMap.get(n)||n).visit(e)};return e.visit({visitBinary:function(e){return null},visitChain:function(e){return null},visitConditional:function(e){return null},visitFunctionCall:function(e){return null},visitImplicitReceiver:function(e){return null},visitInterpolation:function(e){return null},visitKeyedRead:function(e){return n(this,e.obj)},visitKeyedWrite:function(e){return null},visitLiteralArray:function(e){return null},visitLiteralMap:function(e){return null},visitLiteralPrimitive:function(e){return null},visitMethodCall:function(e){return n(this,e.receiver)},visitPipe:function(e){return null},visitPrefixNot:function(e){return null},visitNonNullAssert:function(e){return null},visitPropertyRead:function(e){return n(this,e.receiver)},visitPropertyWrite:function(e){return null},visitQuote:function(e){return null},visitSafeMethodCall:function(e){return n(this,e.receiver)||e},visitSafePropertyRead:function(e){return n(this,e.receiver)||e}})},e.prototype.needsTemporary=function(e){var t=this,n=function(e,n){return n&&(t._nodeMap.get(n)||n).visit(e)};return e.visit({visitBinary:function(e){return n(this,e.left)||n(this,e.right)},visitChain:function(e){return!1},visitConditional:function(e){return n(this,e.condition)||n(this,e.trueExp)||n(this,e.falseExp)},visitFunctionCall:function(e){return!0},visitImplicitReceiver:function(e){return!1},visitInterpolation:function(e){return function(e,t){return t.some(function(t){return n(e,t)})}(this,e.expressions)},visitKeyedRead:function(e){return!1},visitKeyedWrite:function(e){return!1},visitLiteralArray:function(e){return!0},visitLiteralMap:function(e){return!0},visitLiteralPrimitive:function(e){return!1},visitMethodCall:function(e){return!0},visitPipe:function(e){return!0},visitPrefixNot:function(e){return n(this,e.expression)},visitNonNullAssert:function(e){return n(this,e.expression)},visitPropertyRead:function(e){return!1},visitPropertyWrite:function(e){return!1},visitQuote:function(e){return!1},visitSafeMethodCall:function(e){return!0},visitSafePropertyRead:function(e){return!1}})},e.prototype.allocateTemporary=function(){var e=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new xe(ps(this.bindingId,e))},e.prototype.releaseTemporary=function(e){if(this._currentTemporary--,e.name!=ps(this.bindingId,this._currentTemporary))throw new Error("Temporary "+e.name+" released out of order")},e.prototype.convertSourceSpan=function(e){if(this.baseSourceSpan){var t=this.baseSourceSpan.start.moveBy(e.start),n=this.baseSourceSpan.start.moveBy(e.end);return new yo(t,n)}return null},e}(),ys=function(){function e(){}return e.prototype.notifyImplicitReceiverUse=function(){},e.prototype.getLocal=function(e){return e===ss.event.name?ss.event:null},e}(),gs=function(e){function t(t,n,r){var i=e.call(this,t,null,n)||this;return i.args=n,i.converter=r,i}return o(t,e),t}(zo),_s=function(){function e(){this.strictStyling=!0}return e.prototype.shimCssText=function(e,t,n){void 0===n&&(n="");var r=function i(e){return e.match(js)||[]}(e);return e=function o(e){return e.replace(Fs,"")}(e),e=this._insertDirectives(e),f([this._scopeCssText(e,t,n)],r).join("\n")},e.prototype._insertDirectives=function(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)},e.prototype._insertPolyfillDirectivesInCssText=function(e){return e.replace(ws,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[2]+"{"})},e.prototype._insertPolyfillRulesInCssText=function(e){return e.replace(xs,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0].replace(e[1],"").replace(e[2],"");return e[4]+n})},e.prototype._scopeCssText=function(e,t,n){var r=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"+r).trim()},e.prototype._extractUnscopedRulesFromCssText=function(e){var t,n="";for(Es.lastIndex=0;null!==(t=Es.exec(e));)n+=t[0].replace(t[2],"").replace(t[1],t[4])+"\n\n";return n},e.prototype._convertColonHost=function(e){return this._convertColonRule(e,Ns,this._colonHostPartReplacer)},e.prototype._convertColonHostContext=function(e){return this._convertColonRule(e,ks,this._colonHostContextPartReplacer)},e.prototype._convertColonRule=function(e,t,n){return e.replace(t,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[2]){for(var r=e[2].split(","),i=[],o=0;o<r.length;o++){var s=r[o].trim();if(!s)break;i.push(n(As,s,e[3]))}return i.join(",")}return As+e[3]})},e.prototype._colonHostContextPartReplacer=function(e,t,n){return t.indexOf(Ss)>-1?this._colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n},e.prototype._colonHostPartReplacer=function(e,t,n){return e+t.replace(Ss,"")+n},e.prototype._convertShadowDOMSelectors=function(e){return Is.reduce(function(e,t){return e.replace(t," ")},e)},e.prototype._scopeSelectors=function(e,t,n){var r=this;return function i(e,t){var n=function r(e){for(var t=e.split(Hs),n=[],r=[],i=0,o=[],s=0;s<t.length;s++){var a=t[s];a==Us&&i--,i>0?o.push(a):(o.length>0&&(r.push(o.join("")),n.push(qs),o=[]),n.push(a)),a==Bs&&i++}return o.length>0&&(r.push(o.join("")),n.push(qs)),new zs(n.join(""),r)}
|
|
188
195
|
/**
|
|
189
196
|
* @license
|
|
190
197
|
* Copyright Google Inc. All Rights Reserved.
|
|
191
198
|
*
|
|
192
199
|
* Use of this source code is governed by an MIT-style license that can be
|
|
193
200
|
* found in the LICENSE file at https://angular.io/license
|
|
194
|
-
*/(e),i=0;return n.escapedString.replace(Vs,function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=e[2],s="",a=e[4],u="";a&&a.startsWith("{"+qs)&&(s=n.blocks[i++],a=a.substring(qs.length+1),u="{");var l=t(new Ks(o,s));return""+e[1]+l.selector+e[3]+u+l.content+a})}(e,function(e){var i=e.selector,o=e.content;return"@"!=e.selector[0]?i=r._scopeSelector(e.selector,t,n,r.strictStyling):(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document"))&&(o=r._scopeSelectors(e.content,t,n)),new Ks(i,o)})},e.prototype._scopeSelector=function(e,t,n,r){var i=this;return e.split(",").map(function(e){return e.trim().split(Ms)}).map(function(e){var o=h(e),s=o[0],a=o.slice(1);return f([function(e){return i._selectorNeedsScoping(e,t)?r?i._applyStrictSelectorScope(e,t,n):i._applySelectorScope(e,t,n):e}(s)],a).join(" ")}).join(", ")},e.prototype._selectorNeedsScoping=function(e,t){return!this._makeScopeMatcher(t).test(e)},e.prototype._makeScopeMatcher=function(e){return e=e.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+e+")"+Os,"m")},e.prototype._applySelectorScope=function(e,t,n){return this._applySimpleSelectorScope(e,t,n)},e.prototype._applySimpleSelectorScope=function(e,t,n){if(Rs.lastIndex=0,Rs.test(e)){var r=this.strictStyling?"["+n+"]":t;return e.replace(Ps,function(e,t){return t.replace(/([^:]*)(:*)(.*)/,function(e,t,n,i){return t+r+n+i})}).replace(Rs,r+" ")}return t+" "+e},e.prototype._applyStrictSelectorScope=function(e,t,n){for(var r,i=this,o="["+(t=t.replace(/\[is=([^\]]*)\]/g,function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t[0]}))+"]",s=function(e){var r=e.trim();if(!r)return"";if(e.indexOf(As)>-1)r=i._applySimpleSelectorScope(e,t,n);else{var s=e.replace(Rs,"");if(s.length>0){var a=s.match(/([^:]*)(:*)(.*)/);a&&(r=a[1]+o+a[2]+a[3])}}return r},a=new bs(e),u="",l=0,c=/( |>|\+|~(?!=))\s*/g,p=!((e=a.content()).indexOf(As)>-1);null!==(r=c.exec(e));){var h=r[1],f=e.slice(l,r.index).trim();u+=((p=p||f.indexOf(As)>-1)?s(f):f)+" "+h+" ",l=c.lastIndex}var d=e.substring(l);return u+=(p=p||d.indexOf(As)>-1)?s(d):d,a.restore(u)},e.prototype._insertPolyfillHostInCssText=function(e){return e.replace(Ls,Cs).replace(Ds,Ss)},e}(),bs=function(){function e(e){var t=this;this.placeholders=[],this.index=0,e=e.replace(/(\[[^\]]*\])/g,function(e,n){var r="__ph-"+t.index+"__";return t.placeholders.push(n),t.index++,r}),this._content=e.replace(/(:nth-[-\w]+)(\([^)]+\))/g,function(e,n,r){var i="__ph-"+t.index+"__";return t.placeholders.push(r),t.index++,n+i})}return e.prototype.restore=function(e){var t=this;return e.replace(/__ph-(\d+)__/g,function(e,n){return t.placeholders[+n]})},e.prototype.content=function(){return this._content},e}(),ws=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,xs=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Es=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Ss="-shadowcsshost",Cs="-shadowcsscontext",Ts=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",Ns=new RegExp("("+Ss+Ts,"gim"),ks=new RegExp("("+Cs+Ts,"gim"),As=Ss+"-no-combinator",Ps=/-shadowcsshost-no-combinator([^\s]*)/,Is=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],Ms=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,Os="([>\\s~+[.,{:][\\s\\S]*)?$",Rs=/-shadowcsshost/gim,Ds=/:host/gim,Ls=/:host-context/gim,Fs=/\/\*\s*[\s\S]*?\*\//g,js=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,Vs=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,Hs=/([{}])/g,Bs="{",Us="}",qs="%BLOCK%",Ks=function Ks(e,t){this.selector=e,this.content=t},zs=function zs(e,t){this.escapedString=e,this.blocks=t},Ws=function(){function e(e,t){void 0===t&&(t=-1),this.path=e,this.position=t}return Object.defineProperty(e.prototype,"empty",{get:function(){return!this.path||!this.path.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"head",{get:function(){return this.path[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tail",{get:function(){return this.path[this.path.length-1]},enumerable:!0,configurable:!0}),e.prototype.parentOf=function(e){return e&&this.path[this.path.indexOf(e)-1]},e.prototype.childOf=function(e){return this.path[this.path.indexOf(e)+1]},e.prototype.first=function(e){for(var t=this.path.length-1;t>=0;t--){var n=this.path[t];if(n instanceof e)return n}},e.prototype.push=function(e){this.path.push(e)},e.prototype.pop=function(){return this.path.pop()},e}(),Qs=function(){function e(e,t,n){this.value=e,this.sourceSpan=t,this.i18n=n}return e.prototype.visit=function(e,t){return e.visitText(this,t)},e}()
|
|
201
|
+
*/(e),i=0;return n.escapedString.replace(Vs,function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=e[2],s="",a=e[4],u="";a&&a.startsWith("{"+qs)&&(s=n.blocks[i++],a=a.substring(qs.length+1),u="{");var l=t(new Ks(o,s));return""+e[1]+l.selector+e[3]+u+l.content+a})}(e,function(e){var i=e.selector,o=e.content;return"@"!=e.selector[0]?i=r._scopeSelector(e.selector,t,n,r.strictStyling):(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document"))&&(o=r._scopeSelectors(e.content,t,n)),new Ks(i,o)})},e.prototype._scopeSelector=function(e,t,n,r){var i=this;return e.split(",").map(function(e){return e.trim().split(Ms)}).map(function(e){var o=h(e),s=o[0],a=o.slice(1);return f([function(e){return i._selectorNeedsScoping(e,t)?r?i._applyStrictSelectorScope(e,t,n):i._applySelectorScope(e,t,n):e}(s)],a).join(" ")}).join(", ")},e.prototype._selectorNeedsScoping=function(e,t){return!this._makeScopeMatcher(t).test(e)},e.prototype._makeScopeMatcher=function(e){return e=e.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+e+")"+Os,"m")},e.prototype._applySelectorScope=function(e,t,n){return this._applySimpleSelectorScope(e,t,n)},e.prototype._applySimpleSelectorScope=function(e,t,n){if(Rs.lastIndex=0,Rs.test(e)){var r=this.strictStyling?"["+n+"]":t;return e.replace(Ps,function(e,t){return t.replace(/([^:]*)(:*)(.*)/,function(e,t,n,i){return t+r+n+i})}).replace(Rs,r+" ")}return t+" "+e},e.prototype._applyStrictSelectorScope=function(e,t,n){for(var r,i=this,o="["+(t=t.replace(/\[is=([^\]]*)\]/g,function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t[0]}))+"]",s=function(e){var r=e.trim();if(!r)return"";if(e.indexOf(As)>-1)r=i._applySimpleSelectorScope(e,t,n);else{var s=e.replace(Rs,"");if(s.length>0){var a=s.match(/([^:]*)(:*)(.*)/);a&&(r=a[1]+o+a[2]+a[3])}}return r},a=new bs(e),u="",l=0,c=/( |>|\+|~(?!=))\s*/g,p=!((e=a.content()).indexOf(As)>-1);null!==(r=c.exec(e));){var h=r[1],f=e.slice(l,r.index).trim();u+=((p=p||f.indexOf(As)>-1)?s(f):f)+" "+h+" ",l=c.lastIndex}var d=e.substring(l);return u+=(p=p||d.indexOf(As)>-1)?s(d):d,a.restore(u)},e.prototype._insertPolyfillHostInCssText=function(e){return e.replace(Ls,Cs).replace(Ds,Ss)},e}(),bs=function(){function e(e){var t=this;this.placeholders=[],this.index=0,e=e.replace(/(\[[^\]]*\])/g,function(e,n){var r="__ph-"+t.index+"__";return t.placeholders.push(n),t.index++,r}),this._content=e.replace(/(:nth-[-\w]+)(\([^)]+\))/g,function(e,n,r){var i="__ph-"+t.index+"__";return t.placeholders.push(r),t.index++,n+i})}return e.prototype.restore=function(e){var t=this;return e.replace(/__ph-(\d+)__/g,function(e,n){return t.placeholders[+n]})},e.prototype.content=function(){return this._content},e}(),ws=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,xs=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Es=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Ss="-shadowcsshost",Cs="-shadowcsscontext",Ts=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",Ns=new RegExp("("+Ss+Ts,"gim"),ks=new RegExp("("+Cs+Ts,"gim"),As=Ss+"-no-combinator",Ps=/-shadowcsshost-no-combinator([^\s]*)/,Is=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],Ms=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,Os="([>\\s~+[.,{:][\\s\\S]*)?$",Rs=/-shadowcsshost/gim,Ds=/:host/gim,Ls=/:host-context/gim,Fs=/\/\*\s*[\s\S]*?\*\//g,js=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,Vs=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,Hs=/([{}])/g,Bs="{",Us="}",qs="%BLOCK%",Ks=function Ks(e,t){this.selector=e,this.content=t},zs=function zs(e,t){this.escapedString=e,this.blocks=t},Ws=function(){function e(e,t){void 0===t&&(t=-1),this.path=e,this.position=t}return Object.defineProperty(e.prototype,"empty",{get:function(){return!this.path||!this.path.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"head",{get:function(){return this.path[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tail",{get:function(){return this.path[this.path.length-1]},enumerable:!0,configurable:!0}),e.prototype.parentOf=function(e){return e&&this.path[this.path.indexOf(e)-1]},e.prototype.childOf=function(e){return this.path[this.path.indexOf(e)+1]},e.prototype.first=function(e){for(var t=this.path.length-1;t>=0;t--){var n=this.path[t];if(n instanceof e)return n}},e.prototype.push=function(e){this.path.push(e)},e.prototype.pop=function(){return this.path.pop()},e}(),Qs=function(){function e(e,t,n){this.value=e,this.sourceSpan=t,this.i18n=n}return e.prototype.visit=function(e,t){return e.visitText(this,t)},e}(),$s=function(){function e(e,t,n,r,i,o){this.switchValue=e,this.type=t,this.cases=n,this.sourceSpan=r,this.switchValueSourceSpan=i,this.i18n=o}return e.prototype.visit=function(e,t){return e.visitExpansion(this,t)},e}(),Gs=function(){function e(e,t,n,r,i){this.value=e,this.expression=t,this.sourceSpan=n,this.valueSourceSpan=r,this.expSourceSpan=i}return e.prototype.visit=function(e,t){return e.visitExpansionCase(this,t)},e}(),Xs=function(){function e(e,t,n,r,i){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=r,this.i18n=i}return e.prototype.visit=function(e,t){return e.visitAttribute(this,t)},e}(),Ys=function(){function e(e,t,n,r,i,o,s){void 0===i&&(i=null),void 0===o&&(o=null),this.name=e,this.attrs=t,this.children=n,this.sourceSpan=r,this.startSourceSpan=i,this.endSourceSpan=o,this.i18n=s}return e.prototype.visit=function(e,t){return e.visitElement(this,t)},e}(),Zs=function(){function e(e,t){this.value=e,this.sourceSpan=t}return e.prototype.visit=function(e,t){return e.visitComment(this,t)},e}();function Js(e,t,n){void 0===n&&(n=null);var r=[],i=e.visit?function(t){return e.visit(t,n)||t.visit(e,n)}:function(t){return t.visit(e,n)};return t.forEach(function(e){var t=i(e);t&&r.push(t)}),r}var ea,ta=function(){function e(){}return e.prototype.visitElement=function(e,t){this.visitChildren(t,function(t){t(e.attrs),t(e.children)})},e.prototype.visitAttribute=function(e,t){},e.prototype.visitText=function(e,t){},e.prototype.visitComment=function(e,t){},e.prototype.visitExpansion=function(e,t){return this.visitChildren(t,function(t){t(e.cases)})},e.prototype.visitExpansionCase=function(e,t){},e.prototype.visitChildren=function(e,t){var n=[],r=this;return t(function i(t){t&&n.push(Js(r,t,e))}),[].concat.apply([],n)},e}();function na(e,t){var n=[];return Js(new(function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return o(r,e),r.prototype.visit=function(e,r){var i=function e(t){var n=t.sourceSpan.start.offset,r=t.sourceSpan.end.offset;return t instanceof Ys&&(t.endSourceSpan?r=t.endSourceSpan.end.offset:t.children&&t.children.length&&(r=e(t.children[t.children.length-1]).end)),{start:n,end:r}}(e);if(!(i.start<=t&&t<i.end))return!0;n.push(e)},r}(ta)),e),new Ws(n,t)}
|
|
195
202
|
/**
|
|
196
203
|
* @license
|
|
197
204
|
* Copyright Google Inc. All Rights Reserved.
|
|
198
205
|
*
|
|
199
206
|
* Use of this source code is governed by an MIT-style license that can be
|
|
200
207
|
* found in the LICENSE file at https://angular.io/license
|
|
201
|
-
*/!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.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_QUOTE=12]="ATTR_QUOTE",e[e.ATTR_VALUE=13]="ATTR_VALUE",e[e.DOC_TYPE=14]="DOC_TYPE",e[e.EXPANSION_FORM_START=15]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=16]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=17]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=18]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=19]="EXPANSION_FORM_END",e[e.EOF=20]="EOF"}(ea||(ea={}));var ra=function ra(e,t,n){this.type=e,this.parts=t,this.sourceSpan=n},ia=function(e){function t(t,n,r){var i=e.call(this,r,t)||this;return i.tokenType=n,i}return o(t,e),t}(go),oa=function oa(e,t){this.tokens=e,this.errors=t},sa=/\r\n?/g;function aa(e){return'Unexpected character "'+(e===Ii?"EOF":String.fromCharCode(e))+'"'}function ua(e){return'Unknown entity "'+e+'" - use the "&#<decimal>;" or "&#x<hex>;" syntax'}var la=function la(e){this.error=e},ca=function(){function e(e,t,n){this._getTagDefinition=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||fi,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(function(e){return e.codePointAt(0)||0});var r=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new ya(e,r):new ma(e,r);try{this._cursor.init()}catch(e){this.handleError(e)}}return e.prototype._processCarriageReturns=function(e){return e.replace(sa,"\n")},e.prototype.tokenize=function(){for(;this._cursor.peek()!==Ii;){var e=this._cursor.clone();try{this._attemptCharCode(60)?this._attemptCharCode(33)?this._attemptCharCode(91)?this._consumeCdata(e):this._attemptCharCode(Ui)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(qi)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}return this._beginToken(ea.EOF),this._endToken([]),new oa(function t(e){for(var t=[],n=void 0,r=0;r<e.length;r++){var i=e[r];n&&n.type==ea.TEXT&&i.type==ea.TEXT?(n.parts[0]+=i.parts[0],n.sourceSpan.end=i.sourceSpan.end):t.push(n=i)}return t}(this.tokens),this.errors)},e.prototype._tokenizeExpansionForm=function(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(function e(t){return t===zi||co(t)||lo(t)}(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},e.prototype._beginToken=function(e,t){void 0===t&&(t=this._cursor.clone()),this._currentTokenStart=t,this._currentTokenType=e},e.prototype._endToken=function(e,t){if(void 0===t&&(t=this._cursor.clone()),null===this._currentTokenStart)throw new ia("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 ia("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));var n=new ra(this._currentTokenType,e,this._cursor.getSpan(this._currentTokenStart,this._leadingTriviaCodePoints));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n},e.prototype._createError=function(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var n=new ia(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new la(n)},e.prototype.handleError=function(e){if(e instanceof ga&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),!(e instanceof la))throw e;this.errors.push(e.error)},e.prototype._attemptCharCode=function(e){return this._cursor.peek()===e&&(this._cursor.advance(),!0)},e.prototype._attemptCharCodeCaseInsensitive=function(e){return!!function t(e,n){return va(e)==va(n)}(this._cursor.peek(),e)&&(this._cursor.advance(),!0)},e.prototype._requireCharCode=function(e){var t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(t))},e.prototype._attemptStr=function(e){var t=e.length;if(this._cursor.charsLeft()<t)return!1;for(var n=this._cursor.clone(),r=0;r<t;r++)if(!this._attemptCharCode(e.charCodeAt(r)))return this._cursor=n,!1;return!0},e.prototype._attemptStrCaseInsensitive=function(e){for(var t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0},e.prototype._requireStr=function(e){var t=this._cursor.clone();if(!this._attemptStr(e))throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(t))},e.prototype._attemptCharCodeUntilFn=function(e){for(;!e(this._cursor.peek());)this._cursor.advance()},e.prototype._requireCharCodeUntilFn=function(e,t){var n=this._cursor.clone();if(this._attemptCharCodeUntilFn(e),this._cursor.clone().diff(n)<t)throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(n))},e.prototype._attemptUntilChar=function(e){for(;this._cursor.peek()!==e;)this._cursor.advance()},e.prototype._readChar=function(e){if(e&&38===this._cursor.peek())return this._decodeEntity();var t=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),t},e.prototype._decodeEntity=function(){var e=this._cursor.clone();if(this._cursor.advance(),!this._attemptCharCode(35)){var t=this._cursor.clone();if(this._attemptCharCodeUntilFn(da),this._cursor.peek()!=Ki)return this._cursor=t,"&";var n=this._cursor.getChars(t);this._cursor.advance();var r=b[n];if(!r)throw this._createError(ua(n),this._cursor.getSpan(e));return r}var i=this._attemptCharCode(120)||this._attemptCharCode(88),o=this._cursor.clone();if(this._attemptCharCodeUntilFn(fa),this._cursor.peek()!=Ki)throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan());var s=this._cursor.getChars(o);this._cursor.advance();try{var a=parseInt(s,i?16:10);return String.fromCharCode(a)}catch(t){throw this._createError(ua(this._cursor.getChars(e)),this._cursor.getSpan())}},e.prototype._consumeRawText=function(e,t){this._beginToken(e?ea.ESCAPABLE_RAW_TEXT:ea.RAW_TEXT);for(var n=[];;){var r=this._cursor.clone(),i=t();if(this._cursor=r,i)break;n.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(n.join(""))])},e.prototype._consumeComment=function(e){var t=this;this._beginToken(ea.COMMENT_START,e),this._requireCharCode(Ui),this._endToken([]),this._consumeRawText(!1,function(){return t._attemptStr("--\x3e")}),this._beginToken(ea.COMMENT_END),this._requireStr("--\x3e"),this._endToken([])},e.prototype._consumeCdata=function(e){var t=this;this._beginToken(ea.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,function(){return t._attemptStr("]]>")}),this._beginToken(ea.CDATA_END),this._requireStr("]]>"),this._endToken([])},e.prototype._consumeDocType=function(e){this._beginToken(ea.DOC_TYPE,e);var t=this._cursor.clone();this._attemptUntilChar(Wi);var n=this._cursor.getChars(t);this._cursor.advance(),this._endToken([n])},e.prototype._consumePrefixAndName=function(){for(var e,t,n=this._cursor.clone(),r="";58!==this._cursor.peek()&&!(((e=this._cursor.peek())<eo||so<e)&&(e<Xi||Zi<e)&&(e<Qi||e>$i));)this._cursor.advance();return 58===this._cursor.peek()?(r=this._cursor.getChars(n),this._cursor.advance(),t=this._cursor.clone()):t=n,this._requireCharCodeUntilFn(ha,""===r?0:1),[r,this._cursor.getChars(t)]},e.prototype._consumeTagOpen=function(e){var t,n,r,i=this.tokens.length,o=this._cursor.clone();try{if(!co(this._cursor.peek()))throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(e));for(n=(r=this._consumeTagOpenStart(e)).parts[0],t=r.parts[1],this._attemptCharCodeUntilFn(pa);this._cursor.peek()!==qi&&this._cursor.peek()!==Wi;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(pa),this._attemptCharCode(zi)&&(this._attemptCharCodeUntilFn(pa),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(pa);this._consumeTagOpenEnd()}catch(t){if(t instanceof la)return this._cursor=o,r&&(this.tokens.length=i),this._beginToken(ea.TEXT,e),void this._endToken(["<"]);throw t}var a=this._getTagDefinition(t).contentType;a===s.RAW_TEXT?this._consumeRawTextWithTagClose(n,t,!1):a===s.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,t,!0)},e.prototype._consumeRawTextWithTagClose=function(e,t,n){var r=this;this._consumeRawText(n,function(){return!!r._attemptCharCode(60)&&!!r._attemptCharCode(qi)&&(r._attemptCharCodeUntilFn(pa),!!r._attemptStrCaseInsensitive(t)&&(r._attemptCharCodeUntilFn(pa),r._attemptCharCode(Wi)))}),this._beginToken(ea.TAG_CLOSE),this._requireCharCodeUntilFn(function(e){return e===Wi},3),this._cursor.advance(),this._endToken([e,t])},e.prototype._consumeTagOpenStart=function(e){this._beginToken(ea.TAG_OPEN_START,e);var t=this._consumePrefixAndName();return this._endToken(t)},e.prototype._consumeAttributeName=function(){var e=this._cursor.peek();if(e===Hi||e===ji)throw this._createError(aa(e),this._cursor.getSpan());this._beginToken(ea.ATTR_NAME);var t=this._consumePrefixAndName();this._endToken(t)},e.prototype._consumeAttributeValue=function(){var e;if(this._cursor.peek()===Hi||this._cursor.peek()===ji){this._beginToken(ea.ATTR_QUOTE);var t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(ea.ATTR_VALUE);for(var n=[];this._cursor.peek()!==t;)n.push(this._readChar(!0));e=n.join(""),this._endToken([this._processCarriageReturns(e)]),this._beginToken(ea.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(ea.ATTR_VALUE);var r=this._cursor.clone();this._requireCharCodeUntilFn(ha,1),e=this._cursor.getChars(r),this._endToken([this._processCarriageReturns(e)])}},e.prototype._consumeTagOpenEnd=function(){var e=this._attemptCharCode(qi)?ea.TAG_OPEN_END_VOID:ea.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(Wi),this._endToken([])},e.prototype._consumeTagClose=function(e){this._beginToken(ea.TAG_CLOSE,e),this._attemptCharCodeUntilFn(pa);var t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(pa),this._requireCharCode(Wi),this._endToken(t)},e.prototype._consumeExpansionFormStart=function(){this._beginToken(ea.EXPANSION_FORM_START),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(ea.EXPANSION_FORM_START),this._beginToken(ea.RAW_TEXT);var e=this._readUntil(44);this._endToken([e]),this._requireCharCode(44),this._attemptCharCodeUntilFn(pa),this._beginToken(ea.RAW_TEXT);var t=this._readUntil(44);this._endToken([t]),this._requireCharCode(44),this._attemptCharCodeUntilFn(pa)},e.prototype._consumeExpansionCaseStart=function(){this._beginToken(ea.EXPANSION_CASE_VALUE);var e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(pa),this._beginToken(ea.EXPANSION_CASE_EXP_START),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(pa),this._expansionCaseStack.push(ea.EXPANSION_CASE_EXP_START)},e.prototype._consumeExpansionCaseEnd=function(){this._beginToken(ea.EXPANSION_CASE_EXP_END),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(pa),this._expansionCaseStack.pop()},e.prototype._consumeExpansionFormEnd=function(){this._beginToken(ea.EXPANSION_FORM_END),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()},e.prototype._consumeText=function(){var e=this._cursor.clone();this._beginToken(ea.TEXT,e);var t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])},e.prototype._isTextEnd=function(){if(60===this._cursor.peek()||this._cursor.peek()===Ii)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(125===this._cursor.peek()&&this._isInExpansionCase())return!0}return!1},e.prototype._readUntil=function(e){var t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)},e.prototype._isInExpansionCase=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===ea.EXPANSION_CASE_EXP_START},e.prototype._isInExpansionForm=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===ea.EXPANSION_FORM_START},e.prototype.isExpansionFormStart=function(){if(123!==this._cursor.peek())return!1;if(this._interpolationConfig){var e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0},e}();function pa(e){return!uo(e)||e===Ii}function ha(e){return uo(e)||e===Wi||e===qi||e===Hi||e===ji||e===zi}function fa(e){return e==Ki||e==Ii||!function t(e){return e>=eo&&e<=to||e>=Xi&&e<=Yi||lo(e)}(e)}function da(e){return e==Ki||e==Ii||!co(e)}function va(e){return e>=eo&&e<=so?e-eo+Xi:e}var ma=function(){function e(t,n){if(t instanceof e)this.file=t.file,this.input=t.input,this.end=t.end,this.state=a({},t.state);else{if(!n)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=t,this.input=t.content,this.end=n.endPos,this.state={peek:-1,offset:n.startPos,line:n.startLine,column:n.startCol}}}return e.prototype.clone=function(){return new e(this)},e.prototype.peek=function(){return this.state.peek},e.prototype.charsLeft=function(){return this.end-this.state.offset},e.prototype.diff=function(e){return this.state.offset-e.state.offset},e.prototype.advance=function(){this.advanceState(this.state)},e.prototype.init=function(){this.updatePeek(this.state)},e.prototype.getSpan=function(e,t){if(e=e||this,t)for(e=e.clone();this.diff(e)>0&&-1!==t.indexOf(e.peek());)e.advance();return new yo(new vo(e.file,e.state.offset,e.state.line,e.state.column),new vo(this.file,this.state.offset,this.state.line,this.state.column))},e.prototype.getChars=function(e){return this.input.substring(e.state.offset,this.state.offset)},e.prototype.charAt=function(e){return this.input.charCodeAt(e)},e.prototype.advanceState=function(e){if(e.offset>=this.end)throw this.state=e,new ga('Unexpected character "EOF"',this);var t=this.charAt(e.offset);t===Oi?(e.line++,e.column=0):po(t)||e.column++,e.offset++,this.updatePeek(e)},e.prototype.updatePeek=function(e){e.peek=e.offset>=this.end?Ii:this.charAt(e.offset)},e}(),ya=function(e){function t(n,r){var i=this;return n instanceof t?(i=e.call(this,n)||this).internalState=a({},n.internalState):(i=e.call(this,n,r)||this).internalState=i.state,i}return o(t,e),t.prototype.advance=function(){this.state=this.internalState,e.prototype.advance.call(this),this.processEscapeSequence()},t.prototype.init=function(){e.prototype.init.call(this),this.processEscapeSequence()},t.prototype.clone=function(){return new t(this)},t.prototype.getChars=function(e){for(var t=e.clone(),n="";t.internalState.offset<this.internalState.offset;)n+=String.fromCodePoint(t.peek()),t.advance();return n},t.prototype.processEscapeSequence=function(){var e=this,t=function(){return e.internalState.peek};if(92===t())if(this.internalState=a({},this.state),this.advanceState(this.internalState),t()===no)this.state.peek=Oi;else if(t()===ro)this.state.peek=Li;else if(t()===oo)this.state.peek=Ri;else if(t()===io)this.state.peek=Mi;else if(98===t())this.state.peek=8;else if(t()===to)this.state.peek=Di;else if(117===t())if(this.advanceState(this.internalState),123===t()){this.advanceState(this.internalState);for(var n=this.clone(),r=0;125!==t();)this.advanceState(this.internalState),r++;this.state.peek=this.decodeHexDigits(n,r)}else n=this.clone(),this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(n,4);else if(120===t())this.advanceState(this.internalState),n=this.clone(),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(n,2);else if(ho(t())){for(var i="",o=0,s=this.clone();ho(t())&&o<3;)s=this.clone(),i+=String.fromCodePoint(t()),this.advanceState(this.internalState),o++;this.state.peek=parseInt(i,8),this.internalState=s.internalState}else po(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek},t.prototype.decodeHexDigits=function(e,t){var n=this.input.substr(e.internalState.offset,t),r=parseInt(n,16);if(isNaN(r))throw e.state=e.internalState,new ga("Invalid hexadecimal escape sequence",e);return r},t}(ma),ga=function ga(e,t){this.msg=e,this.cursor=t},_a=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.elementName=t,i}return o(t,e),t.create=function(e,n,r){return new t(e,n,r)},t}(go),ba=function ba(e,t){this.rootNodes=e,this.errors=t},wa=function(){function e(e){this.getTagDefinition=e}return e.prototype.parse=function(e,t,n){var r=function i(e,t,n,r){return void 0===r&&(r={}),new ca(new mo(e,t),n,r).tokenize()}(e,t,this.getTagDefinition,n),o=new xa(r.tokens,this.getTagDefinition).build();return new ba(o.rootNodes,r.errors.concat(o.errors))},e}(),xa=function(){function e(e,t){this.tokens=e,this.getTagDefinition=t,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return e.prototype.build=function(){for(;this._peek.type!==ea.EOF;)this._peek.type===ea.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===ea.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===ea.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===ea.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===ea.TEXT||this._peek.type===ea.RAW_TEXT||this._peek.type===ea.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===ea.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new ba(this._rootNodes,this._errors)},e.prototype._advance=function(){var e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e},e.prototype._advanceIf=function(e){return this._peek.type===e?this._advance():null},e.prototype._consumeCdata=function(e){this._consumeText(this._advance()),this._advanceIf(ea.CDATA_END)},e.prototype._consumeComment=function(e){var t=this._advanceIf(ea.RAW_TEXT);this._advanceIf(ea.COMMENT_END);var n=null!=t?t.parts[0].trim():null;this._addToParent(new Zs(n,e.sourceSpan))},e.prototype._consumeExpansion=function(e){for(var t=this._advance(),n=this._advance(),r=[];this._peek.type===ea.EXPANSION_CASE_VALUE;){var i=this._parseExpansionCase();if(!i)return;r.push(i)}if(this._peek.type===ea.EXPANSION_FORM_END){var o=new yo(e.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new Gs(t.parts[0],n.parts[0],r,o,t.sourceSpan)),this._advance()}else this._errors.push(_a.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."))},e.prototype._parseExpansionCase=function(){var t=this._advance();if(this._peek.type!==ea.EXPANSION_CASE_EXP_START)return this._errors.push(_a.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;var n=this._advance(),r=this._collectExpansionExpTokens(n);if(!r)return null;var i=this._advance();r.push(new ra(ea.EOF,[],i.sourceSpan));var o=new e(r,this.getTagDefinition).build();if(o.errors.length>0)return this._errors=this._errors.concat(o.errors),null;var s=new yo(t.sourceSpan.start,i.sourceSpan.end),a=new yo(n.sourceSpan.start,i.sourceSpan.end);return new $s(t.parts[0],o.rootNodes,s,t.sourceSpan,a)},e.prototype._collectExpansionExpTokens=function(e){for(var t=[],n=[ea.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==ea.EXPANSION_FORM_START&&this._peek.type!==ea.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===ea.EXPANSION_CASE_EXP_END){if(!Ea(n,ea.EXPANSION_CASE_EXP_START))return this._errors.push(_a.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===ea.EXPANSION_FORM_END){if(!Ea(n,ea.EXPANSION_FORM_START))return this._errors.push(_a.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===ea.EOF)return this._errors.push(_a.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}},e.prototype._consumeText=function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var n=this._getParentElement();null!=n&&0==n.children.length&&this.getTagDefinition(n.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new Qs(t,e.sourceSpan))},e.prototype._closeVoidElement=function(){var e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()},e.prototype._consumeStartTag=function(e){for(var t=e.parts[0],n=e.parts[1],r=[];this._peek.type===ea.ATTR_NAME;)r.push(this._consumeAttr(this._advance()));var i=this._getElementFullName(t,n,this._getParentElement()),o=!1;if(this._peek.type===ea.TAG_OPEN_END_VOID){this._advance(),o=!0;var s=this.getTagDefinition(i);s.canSelfClose||null!==g(i)||s.isVoid||this._errors.push(_a.create(i,e.sourceSpan,'Only void and foreign elements can be self closed "'+e.parts[1]+'"'))}else this._peek.type===ea.TAG_OPEN_END&&(this._advance(),o=!1);var a=new yo(e.sourceSpan.start,this._peek.sourceSpan.start),u=new Ys(i,r,[],a,a,void 0);this._pushElement(u),o&&(this._popElement(i),u.endSourceSpan=a)},e.prototype._pushElement=function(e){var t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)},e.prototype._consumeEndTag=function(e){var t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),this.getTagDefinition(t).isVoid?this._errors.push(_a.create(t,e.sourceSpan,'Void elements do not have end tags "'+e.parts[1]+'"')):this._popElement(t)||this._errors.push(_a.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'))},e.prototype._popElement=function(e){for(var t=this._elementStack.length-1;t>=0;t--){var n=this._elementStack[t];if(n.name==e)return this._elementStack.splice(t,this._elementStack.length-t),!0;if(!this.getTagDefinition(n.name).closedByParent)return!1}return!1},e.prototype._consumeAttr=function(e){var t=_(e.parts[0],e.parts[1]),n=e.sourceSpan.end,r="",i=void 0;if(this._peek.type===ea.ATTR_QUOTE&&this._advance(),this._peek.type===ea.ATTR_VALUE){var o=this._advance();r=o.parts[0],n=o.sourceSpan.end,i=o.sourceSpan}return this._peek.type===ea.ATTR_QUOTE&&(n=this._advance().sourceSpan.end),new Xs(t,r,new yo(e.sourceSpan.start,n),i)},e.prototype._getParentElement=function(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null},e.prototype._getParentElementSkippingContainers=function(){for(var e=null,t=this._elementStack.length-1;t>=0;t--){if(!v(this._elementStack[t].name))return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:null,container:e}},e.prototype._addToParent=function(e){var t=this._getParentElement();null!=t?t.children.push(e):this._rootNodes.push(e)},e.prototype._insertBeforeContainer=function(e,t,n){if(t){if(e){var r=e.children.indexOf(t);e.children[r]=n}else this._rootNodes.push(n);n.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,n)}else this._addToParent(n),this._elementStack.push(n)},e.prototype._getElementFullName=function(e,t,n){return""===e&&""===(e=this.getTagDefinition(t).implicitNamespacePrefix||"")&&null!=n&&(e=g(n.name)),_(e,t)},e}();function Ea(e,t){return e.length>0&&e[e.length-1]===t}
|
|
208
|
+
*/!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.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_QUOTE=12]="ATTR_QUOTE",e[e.ATTR_VALUE=13]="ATTR_VALUE",e[e.DOC_TYPE=14]="DOC_TYPE",e[e.EXPANSION_FORM_START=15]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=16]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=17]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=18]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=19]="EXPANSION_FORM_END",e[e.EOF=20]="EOF"}(ea||(ea={}));var ra=function ra(e,t,n){this.type=e,this.parts=t,this.sourceSpan=n},ia=function(e){function t(t,n,r){var i=e.call(this,r,t)||this;return i.tokenType=n,i}return o(t,e),t}(go),oa=function oa(e,t){this.tokens=e,this.errors=t},sa=/\r\n?/g;function aa(e){return'Unexpected character "'+(e===Ii?"EOF":String.fromCharCode(e))+'"'}function ua(e){return'Unknown entity "'+e+'" - use the "&#<decimal>;" or "&#x<hex>;" syntax'}var la=function la(e){this.error=e},ca=function(){function e(e,t,n){this._getTagDefinition=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||fi,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(function(e){return e.codePointAt(0)||0});var r=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new ya(e,r):new ma(e,r);try{this._cursor.init()}catch(e){this.handleError(e)}}return e.prototype._processCarriageReturns=function(e){return e.replace(sa,"\n")},e.prototype.tokenize=function(){for(;this._cursor.peek()!==Ii;){var e=this._cursor.clone();try{this._attemptCharCode(60)?this._attemptCharCode(33)?this._attemptCharCode(91)?this._consumeCdata(e):this._attemptCharCode(Ui)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(qi)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}return this._beginToken(ea.EOF),this._endToken([]),new oa(function t(e){for(var t=[],n=void 0,r=0;r<e.length;r++){var i=e[r];n&&n.type==ea.TEXT&&i.type==ea.TEXT?(n.parts[0]+=i.parts[0],n.sourceSpan.end=i.sourceSpan.end):t.push(n=i)}return t}(this.tokens),this.errors)},e.prototype._tokenizeExpansionForm=function(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(function e(t){return t===zi||co(t)||lo(t)}(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},e.prototype._beginToken=function(e,t){void 0===t&&(t=this._cursor.clone()),this._currentTokenStart=t,this._currentTokenType=e},e.prototype._endToken=function(e,t){if(void 0===t&&(t=this._cursor.clone()),null===this._currentTokenStart)throw new ia("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 ia("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));var n=new ra(this._currentTokenType,e,this._cursor.getSpan(this._currentTokenStart,this._leadingTriviaCodePoints));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n},e.prototype._createError=function(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var n=new ia(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new la(n)},e.prototype.handleError=function(e){if(e instanceof ga&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),!(e instanceof la))throw e;this.errors.push(e.error)},e.prototype._attemptCharCode=function(e){return this._cursor.peek()===e&&(this._cursor.advance(),!0)},e.prototype._attemptCharCodeCaseInsensitive=function(e){return!!function t(e,n){return va(e)==va(n)}(this._cursor.peek(),e)&&(this._cursor.advance(),!0)},e.prototype._requireCharCode=function(e){var t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(t))},e.prototype._attemptStr=function(e){var t=e.length;if(this._cursor.charsLeft()<t)return!1;for(var n=this._cursor.clone(),r=0;r<t;r++)if(!this._attemptCharCode(e.charCodeAt(r)))return this._cursor=n,!1;return!0},e.prototype._attemptStrCaseInsensitive=function(e){for(var t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0},e.prototype._requireStr=function(e){var t=this._cursor.clone();if(!this._attemptStr(e))throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(t))},e.prototype._attemptCharCodeUntilFn=function(e){for(;!e(this._cursor.peek());)this._cursor.advance()},e.prototype._requireCharCodeUntilFn=function(e,t){var n=this._cursor.clone();if(this._attemptCharCodeUntilFn(e),this._cursor.clone().diff(n)<t)throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(n))},e.prototype._attemptUntilChar=function(e){for(;this._cursor.peek()!==e;)this._cursor.advance()},e.prototype._readChar=function(e){if(e&&38===this._cursor.peek())return this._decodeEntity();var t=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),t},e.prototype._decodeEntity=function(){var e=this._cursor.clone();if(this._cursor.advance(),!this._attemptCharCode(35)){var t=this._cursor.clone();if(this._attemptCharCodeUntilFn(da),this._cursor.peek()!=Ki)return this._cursor=t,"&";var n=this._cursor.getChars(t);this._cursor.advance();var r=b[n];if(!r)throw this._createError(ua(n),this._cursor.getSpan(e));return r}var i=this._attemptCharCode(120)||this._attemptCharCode(88),o=this._cursor.clone();if(this._attemptCharCodeUntilFn(fa),this._cursor.peek()!=Ki)throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan());var s=this._cursor.getChars(o);this._cursor.advance();try{var a=parseInt(s,i?16:10);return String.fromCharCode(a)}catch(t){throw this._createError(ua(this._cursor.getChars(e)),this._cursor.getSpan())}},e.prototype._consumeRawText=function(e,t){this._beginToken(e?ea.ESCAPABLE_RAW_TEXT:ea.RAW_TEXT);for(var n=[];;){var r=this._cursor.clone(),i=t();if(this._cursor=r,i)break;n.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(n.join(""))])},e.prototype._consumeComment=function(e){var t=this;this._beginToken(ea.COMMENT_START,e),this._requireCharCode(Ui),this._endToken([]),this._consumeRawText(!1,function(){return t._attemptStr("--\x3e")}),this._beginToken(ea.COMMENT_END),this._requireStr("--\x3e"),this._endToken([])},e.prototype._consumeCdata=function(e){var t=this;this._beginToken(ea.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,function(){return t._attemptStr("]]>")}),this._beginToken(ea.CDATA_END),this._requireStr("]]>"),this._endToken([])},e.prototype._consumeDocType=function(e){this._beginToken(ea.DOC_TYPE,e);var t=this._cursor.clone();this._attemptUntilChar(Wi);var n=this._cursor.getChars(t);this._cursor.advance(),this._endToken([n])},e.prototype._consumePrefixAndName=function(){for(var e,t,n=this._cursor.clone(),r="";58!==this._cursor.peek()&&!(((e=this._cursor.peek())<eo||so<e)&&(e<Xi||Zi<e)&&(e<Qi||e>Gi));)this._cursor.advance();return 58===this._cursor.peek()?(r=this._cursor.getChars(n),this._cursor.advance(),t=this._cursor.clone()):t=n,this._requireCharCodeUntilFn(ha,""===r?0:1),[r,this._cursor.getChars(t)]},e.prototype._consumeTagOpen=function(e){var t,n,r,i=this.tokens.length,o=this._cursor.clone();try{if(!co(this._cursor.peek()))throw this._createError(aa(this._cursor.peek()),this._cursor.getSpan(e));for(n=(r=this._consumeTagOpenStart(e)).parts[0],t=r.parts[1],this._attemptCharCodeUntilFn(pa);this._cursor.peek()!==qi&&this._cursor.peek()!==Wi;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(pa),this._attemptCharCode(zi)&&(this._attemptCharCodeUntilFn(pa),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(pa);this._consumeTagOpenEnd()}catch(t){if(t instanceof la)return this._cursor=o,r&&(this.tokens.length=i),this._beginToken(ea.TEXT,e),void this._endToken(["<"]);throw t}var a=this._getTagDefinition(t).contentType;a===s.RAW_TEXT?this._consumeRawTextWithTagClose(n,t,!1):a===s.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,t,!0)},e.prototype._consumeRawTextWithTagClose=function(e,t,n){var r=this;this._consumeRawText(n,function(){return!!r._attemptCharCode(60)&&!!r._attemptCharCode(qi)&&(r._attemptCharCodeUntilFn(pa),!!r._attemptStrCaseInsensitive(t)&&(r._attemptCharCodeUntilFn(pa),r._attemptCharCode(Wi)))}),this._beginToken(ea.TAG_CLOSE),this._requireCharCodeUntilFn(function(e){return e===Wi},3),this._cursor.advance(),this._endToken([e,t])},e.prototype._consumeTagOpenStart=function(e){this._beginToken(ea.TAG_OPEN_START,e);var t=this._consumePrefixAndName();return this._endToken(t)},e.prototype._consumeAttributeName=function(){var e=this._cursor.peek();if(e===Hi||e===ji)throw this._createError(aa(e),this._cursor.getSpan());this._beginToken(ea.ATTR_NAME);var t=this._consumePrefixAndName();this._endToken(t)},e.prototype._consumeAttributeValue=function(){var e;if(this._cursor.peek()===Hi||this._cursor.peek()===ji){this._beginToken(ea.ATTR_QUOTE);var t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(ea.ATTR_VALUE);for(var n=[];this._cursor.peek()!==t;)n.push(this._readChar(!0));e=n.join(""),this._endToken([this._processCarriageReturns(e)]),this._beginToken(ea.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(ea.ATTR_VALUE);var r=this._cursor.clone();this._requireCharCodeUntilFn(ha,1),e=this._cursor.getChars(r),this._endToken([this._processCarriageReturns(e)])}},e.prototype._consumeTagOpenEnd=function(){var e=this._attemptCharCode(qi)?ea.TAG_OPEN_END_VOID:ea.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(Wi),this._endToken([])},e.prototype._consumeTagClose=function(e){this._beginToken(ea.TAG_CLOSE,e),this._attemptCharCodeUntilFn(pa);var t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(pa),this._requireCharCode(Wi),this._endToken(t)},e.prototype._consumeExpansionFormStart=function(){this._beginToken(ea.EXPANSION_FORM_START),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(ea.EXPANSION_FORM_START),this._beginToken(ea.RAW_TEXT);var e=this._readUntil(44);this._endToken([e]),this._requireCharCode(44),this._attemptCharCodeUntilFn(pa),this._beginToken(ea.RAW_TEXT);var t=this._readUntil(44);this._endToken([t]),this._requireCharCode(44),this._attemptCharCodeUntilFn(pa)},e.prototype._consumeExpansionCaseStart=function(){this._beginToken(ea.EXPANSION_CASE_VALUE);var e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(pa),this._beginToken(ea.EXPANSION_CASE_EXP_START),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(pa),this._expansionCaseStack.push(ea.EXPANSION_CASE_EXP_START)},e.prototype._consumeExpansionCaseEnd=function(){this._beginToken(ea.EXPANSION_CASE_EXP_END),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(pa),this._expansionCaseStack.pop()},e.prototype._consumeExpansionFormEnd=function(){this._beginToken(ea.EXPANSION_FORM_END),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()},e.prototype._consumeText=function(){var e=this._cursor.clone();this._beginToken(ea.TEXT,e);var t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])},e.prototype._isTextEnd=function(){if(60===this._cursor.peek()||this._cursor.peek()===Ii)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(125===this._cursor.peek()&&this._isInExpansionCase())return!0}return!1},e.prototype._readUntil=function(e){var t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)},e.prototype._isInExpansionCase=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===ea.EXPANSION_CASE_EXP_START},e.prototype._isInExpansionForm=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===ea.EXPANSION_FORM_START},e.prototype.isExpansionFormStart=function(){if(123!==this._cursor.peek())return!1;if(this._interpolationConfig){var e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0},e}();function pa(e){return!uo(e)||e===Ii}function ha(e){return uo(e)||e===Wi||e===qi||e===Hi||e===ji||e===zi}function fa(e){return e==Ki||e==Ii||!function t(e){return e>=eo&&e<=to||e>=Xi&&e<=Yi||lo(e)}(e)}function da(e){return e==Ki||e==Ii||!co(e)}function va(e){return e>=eo&&e<=so?e-eo+Xi:e}var ma=function(){function e(t,n){if(t instanceof e)this.file=t.file,this.input=t.input,this.end=t.end,this.state=a({},t.state);else{if(!n)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=t,this.input=t.content,this.end=n.endPos,this.state={peek:-1,offset:n.startPos,line:n.startLine,column:n.startCol}}}return e.prototype.clone=function(){return new e(this)},e.prototype.peek=function(){return this.state.peek},e.prototype.charsLeft=function(){return this.end-this.state.offset},e.prototype.diff=function(e){return this.state.offset-e.state.offset},e.prototype.advance=function(){this.advanceState(this.state)},e.prototype.init=function(){this.updatePeek(this.state)},e.prototype.getSpan=function(e,t){if(e=e||this,t)for(e=e.clone();this.diff(e)>0&&-1!==t.indexOf(e.peek());)e.advance();return new yo(new vo(e.file,e.state.offset,e.state.line,e.state.column),new vo(this.file,this.state.offset,this.state.line,this.state.column))},e.prototype.getChars=function(e){return this.input.substring(e.state.offset,this.state.offset)},e.prototype.charAt=function(e){return this.input.charCodeAt(e)},e.prototype.advanceState=function(e){if(e.offset>=this.end)throw this.state=e,new ga('Unexpected character "EOF"',this);var t=this.charAt(e.offset);t===Oi?(e.line++,e.column=0):po(t)||e.column++,e.offset++,this.updatePeek(e)},e.prototype.updatePeek=function(e){e.peek=e.offset>=this.end?Ii:this.charAt(e.offset)},e}(),ya=function(e){function t(n,r){var i=this;return n instanceof t?(i=e.call(this,n)||this).internalState=a({},n.internalState):(i=e.call(this,n,r)||this).internalState=i.state,i}return o(t,e),t.prototype.advance=function(){this.state=this.internalState,e.prototype.advance.call(this),this.processEscapeSequence()},t.prototype.init=function(){e.prototype.init.call(this),this.processEscapeSequence()},t.prototype.clone=function(){return new t(this)},t.prototype.getChars=function(e){for(var t=e.clone(),n="";t.internalState.offset<this.internalState.offset;)n+=String.fromCodePoint(t.peek()),t.advance();return n},t.prototype.processEscapeSequence=function(){var e=this,t=function(){return e.internalState.peek};if(92===t())if(this.internalState=a({},this.state),this.advanceState(this.internalState),t()===no)this.state.peek=Oi;else if(t()===ro)this.state.peek=Li;else if(t()===oo)this.state.peek=Ri;else if(t()===io)this.state.peek=Mi;else if(98===t())this.state.peek=8;else if(t()===to)this.state.peek=Di;else if(117===t())if(this.advanceState(this.internalState),123===t()){this.advanceState(this.internalState);for(var n=this.clone(),r=0;125!==t();)this.advanceState(this.internalState),r++;this.state.peek=this.decodeHexDigits(n,r)}else n=this.clone(),this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(n,4);else if(120===t())this.advanceState(this.internalState),n=this.clone(),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(n,2);else if(ho(t())){for(var i="",o=0,s=this.clone();ho(t())&&o<3;)s=this.clone(),i+=String.fromCodePoint(t()),this.advanceState(this.internalState),o++;this.state.peek=parseInt(i,8),this.internalState=s.internalState}else po(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek},t.prototype.decodeHexDigits=function(e,t){var n=this.input.substr(e.internalState.offset,t),r=parseInt(n,16);if(isNaN(r))throw e.state=e.internalState,new ga("Invalid hexadecimal escape sequence",e);return r},t}(ma),ga=function ga(e,t){this.msg=e,this.cursor=t},_a=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.elementName=t,i}return o(t,e),t.create=function(e,n,r){return new t(e,n,r)},t}(go),ba=function ba(e,t){this.rootNodes=e,this.errors=t},wa=function(){function e(e){this.getTagDefinition=e}return e.prototype.parse=function(e,t,n){var r=function i(e,t,n,r){return void 0===r&&(r={}),new ca(new mo(e,t),n,r).tokenize()}(e,t,this.getTagDefinition,n),o=new xa(r.tokens,this.getTagDefinition).build();return new ba(o.rootNodes,r.errors.concat(o.errors))},e}(),xa=function(){function e(e,t){this.tokens=e,this.getTagDefinition=t,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return e.prototype.build=function(){for(;this._peek.type!==ea.EOF;)this._peek.type===ea.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===ea.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===ea.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===ea.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===ea.TEXT||this._peek.type===ea.RAW_TEXT||this._peek.type===ea.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===ea.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new ba(this._rootNodes,this._errors)},e.prototype._advance=function(){var e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e},e.prototype._advanceIf=function(e){return this._peek.type===e?this._advance():null},e.prototype._consumeCdata=function(e){this._consumeText(this._advance()),this._advanceIf(ea.CDATA_END)},e.prototype._consumeComment=function(e){var t=this._advanceIf(ea.RAW_TEXT);this._advanceIf(ea.COMMENT_END);var n=null!=t?t.parts[0].trim():null;this._addToParent(new Zs(n,e.sourceSpan))},e.prototype._consumeExpansion=function(e){for(var t=this._advance(),n=this._advance(),r=[];this._peek.type===ea.EXPANSION_CASE_VALUE;){var i=this._parseExpansionCase();if(!i)return;r.push(i)}if(this._peek.type===ea.EXPANSION_FORM_END){var o=new yo(e.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new $s(t.parts[0],n.parts[0],r,o,t.sourceSpan)),this._advance()}else this._errors.push(_a.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."))},e.prototype._parseExpansionCase=function(){var t=this._advance();if(this._peek.type!==ea.EXPANSION_CASE_EXP_START)return this._errors.push(_a.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;var n=this._advance(),r=this._collectExpansionExpTokens(n);if(!r)return null;var i=this._advance();r.push(new ra(ea.EOF,[],i.sourceSpan));var o=new e(r,this.getTagDefinition).build();if(o.errors.length>0)return this._errors=this._errors.concat(o.errors),null;var s=new yo(t.sourceSpan.start,i.sourceSpan.end),a=new yo(n.sourceSpan.start,i.sourceSpan.end);return new Gs(t.parts[0],o.rootNodes,s,t.sourceSpan,a)},e.prototype._collectExpansionExpTokens=function(e){for(var t=[],n=[ea.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==ea.EXPANSION_FORM_START&&this._peek.type!==ea.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===ea.EXPANSION_CASE_EXP_END){if(!Ea(n,ea.EXPANSION_CASE_EXP_START))return this._errors.push(_a.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===ea.EXPANSION_FORM_END){if(!Ea(n,ea.EXPANSION_FORM_START))return this._errors.push(_a.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===ea.EOF)return this._errors.push(_a.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}},e.prototype._consumeText=function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var n=this._getParentElement();null!=n&&0==n.children.length&&this.getTagDefinition(n.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new Qs(t,e.sourceSpan))},e.prototype._closeVoidElement=function(){var e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()},e.prototype._consumeStartTag=function(e){for(var t=e.parts[0],n=e.parts[1],r=[];this._peek.type===ea.ATTR_NAME;)r.push(this._consumeAttr(this._advance()));var i=this._getElementFullName(t,n,this._getParentElement()),o=!1;if(this._peek.type===ea.TAG_OPEN_END_VOID){this._advance(),o=!0;var s=this.getTagDefinition(i);s.canSelfClose||null!==g(i)||s.isVoid||this._errors.push(_a.create(i,e.sourceSpan,'Only void and foreign elements can be self closed "'+e.parts[1]+'"'))}else this._peek.type===ea.TAG_OPEN_END&&(this._advance(),o=!1);var a=new yo(e.sourceSpan.start,this._peek.sourceSpan.start),u=new Ys(i,r,[],a,a,void 0);this._pushElement(u),o&&(this._popElement(i),u.endSourceSpan=a)},e.prototype._pushElement=function(e){var t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)},e.prototype._consumeEndTag=function(e){var t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),this.getTagDefinition(t).isVoid?this._errors.push(_a.create(t,e.sourceSpan,'Void elements do not have end tags "'+e.parts[1]+'"')):this._popElement(t)||this._errors.push(_a.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'))},e.prototype._popElement=function(e){for(var t=this._elementStack.length-1;t>=0;t--){var n=this._elementStack[t];if(n.name==e)return this._elementStack.splice(t,this._elementStack.length-t),!0;if(!this.getTagDefinition(n.name).closedByParent)return!1}return!1},e.prototype._consumeAttr=function(e){var t=_(e.parts[0],e.parts[1]),n=e.sourceSpan.end,r="",i=void 0;if(this._peek.type===ea.ATTR_QUOTE&&this._advance(),this._peek.type===ea.ATTR_VALUE){var o=this._advance();r=o.parts[0],n=o.sourceSpan.end,i=o.sourceSpan}return this._peek.type===ea.ATTR_QUOTE&&(n=this._advance().sourceSpan.end),new Xs(t,r,new yo(e.sourceSpan.start,n),i)},e.prototype._getParentElement=function(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null},e.prototype._getParentElementSkippingContainers=function(){for(var e=null,t=this._elementStack.length-1;t>=0;t--){if(!v(this._elementStack[t].name))return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:null,container:e}},e.prototype._addToParent=function(e){var t=this._getParentElement();null!=t?t.children.push(e):this._rootNodes.push(e)},e.prototype._insertBeforeContainer=function(e,t,n){if(t){if(e){var r=e.children.indexOf(t);e.children[r]=n}else this._rootNodes.push(n);n.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,n)}else this._addToParent(n),this._elementStack.push(n)},e.prototype._getElementFullName=function(e,t,n){return""===e&&""===(e=this.getTagDefinition(t).implicitNamespacePrefix||"")&&null!=n&&(e=g(n.name)),_(e,t)},e}();function Ea(e,t){return e.length>0&&e[e.length-1]===t}
|
|
202
209
|
/**
|
|
203
210
|
* @license
|
|
204
211
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -219,21 +226,21 @@ var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,t
|
|
|
219
226
|
*
|
|
220
227
|
* Use of this source code is governed by an MIT-style license that can be
|
|
221
228
|
* found in the LICENSE file at https://angular.io/license
|
|
222
|
-
*/(e,this.errors)},e.prototype.visitExpansionCase=function(e,t){throw new Error("Should not be reached")},e}(),ja=function(){function e(e,t,n){this.value=e,this.ngContentIndex=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitText(this,t)},e}(),Va=function(){function e(e,t,n){this.value=e,this.ngContentIndex=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitBoundText(this,t)},e}(),Ha=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitAttr(this,t)},e}(),Ba=((Oa={})[4]=4,Oa[1]=1,Oa[2]=2,Oa[0]=0,Oa[3]=3,Oa),Ua=function(){function e(e,t,n,r,i,o){this.name=e,this.type=t,this.securityContext=n,this.value=r,this.unit=i,this.sourceSpan=o,this.isAnimation=4===this.type}return e.fromBoundProperty=function(t){return new e(t.name,Ba[t.type],t.securityContext,t.value,t.unit,t.sourceSpan)},e.prototype.visit=function(e,t){return e.visitElementProperty(this,t)},e}(),qa=function(){function e(t,n,r,i,o,s){this.name=t,this.target=n,this.phase=r,this.handler=i,this.sourceSpan=o,this.handlerSpan=s,this.fullName=e.calcFullName(this.name,this.target,this.phase),this.isAnimation=!!this.phase}return e.calcFullName=function(e,t,n){return t?t+":"+e:n?"@"+e+"."+n:e},e.fromParsedEvent=function(t){return new e(t.name,0===t.type?t.targetOrPhase:null,1===t.type?t.targetOrPhase:null,t.handler,t.sourceSpan,t.handlerSpan)},e.prototype.visit=function(e,t){return e.visitEvent(this,t)},e}(),Ka=function(){function e(e,t,n,r){this.name=e,this.value=t,this.originalValue=n,this.sourceSpan=r}return e.prototype.visit=function(e,t){return e.visitReference(this,t)},e}(),za=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.fromParsedVariable=function(t){return new e(t.name,t.value,t.sourceSpan)},e.prototype.visit=function(e,t){return e.visitVariable(this,t)},e}(),Wa=function(){function e(e,t,n,r,i,o,s,a,u,l,c,p,h){this.name=e,this.attrs=t,this.inputs=n,this.outputs=r,this.references=i,this.directives=o,this.providers=s,this.hasViewContainer=a,this.queryMatches=u,this.children=l,this.ngContentIndex=c,this.sourceSpan=p,this.endSourceSpan=h}return e.prototype.visit=function(e,t){return e.visitElement(this,t)},e}(),Qa=function(){function e(e,t,n,r,i,o,s,a,u,l,c){this.attrs=e,this.outputs=t,this.references=n,this.variables=r,this.directives=i,this.providers=o,this.hasViewContainer=s,this.queryMatches=a,this.children=u,this.ngContentIndex=l,this.sourceSpan=c}return e.prototype.visit=function(e,t){return e.visitEmbeddedTemplate(this,t)},e}()
|
|
229
|
+
*/(e,this.errors)},e.prototype.visitExpansionCase=function(e,t){throw new Error("Should not be reached")},e}(),ja=function(){function e(e,t,n){this.value=e,this.ngContentIndex=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitText(this,t)},e}(),Va=function(){function e(e,t,n){this.value=e,this.ngContentIndex=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitBoundText(this,t)},e}(),Ha=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitAttr(this,t)},e}(),Ba=((Oa={})[4]=4,Oa[1]=1,Oa[2]=2,Oa[0]=0,Oa[3]=3,Oa),Ua=function(){function e(e,t,n,r,i,o){this.name=e,this.type=t,this.securityContext=n,this.value=r,this.unit=i,this.sourceSpan=o,this.isAnimation=4===this.type}return e.fromBoundProperty=function(t){return new e(t.name,Ba[t.type],t.securityContext,t.value,t.unit,t.sourceSpan)},e.prototype.visit=function(e,t){return e.visitElementProperty(this,t)},e}(),qa=function(){function e(t,n,r,i,o,s){this.name=t,this.target=n,this.phase=r,this.handler=i,this.sourceSpan=o,this.handlerSpan=s,this.fullName=e.calcFullName(this.name,this.target,this.phase),this.isAnimation=!!this.phase}return e.calcFullName=function(e,t,n){return t?t+":"+e:n?"@"+e+"."+n:e},e.fromParsedEvent=function(t){return new e(t.name,0===t.type?t.targetOrPhase:null,1===t.type?t.targetOrPhase:null,t.handler,t.sourceSpan,t.handlerSpan)},e.prototype.visit=function(e,t){return e.visitEvent(this,t)},e}(),Ka=function(){function e(e,t,n,r){this.name=e,this.value=t,this.originalValue=n,this.sourceSpan=r}return e.prototype.visit=function(e,t){return e.visitReference(this,t)},e}(),za=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.fromParsedVariable=function(t){return new e(t.name,t.value,t.sourceSpan)},e.prototype.visit=function(e,t){return e.visitVariable(this,t)},e}(),Wa=function(){function e(e,t,n,r,i,o,s,a,u,l,c,p,h){this.name=e,this.attrs=t,this.inputs=n,this.outputs=r,this.references=i,this.directives=o,this.providers=s,this.hasViewContainer=a,this.queryMatches=u,this.children=l,this.ngContentIndex=c,this.sourceSpan=p,this.endSourceSpan=h}return e.prototype.visit=function(e,t){return e.visitElement(this,t)},e}(),Qa=function(){function e(e,t,n,r,i,o,s,a,u,l,c){this.attrs=e,this.outputs=t,this.references=n,this.variables=r,this.directives=i,this.providers=o,this.hasViewContainer=s,this.queryMatches=a,this.children=u,this.ngContentIndex=l,this.sourceSpan=c}return e.prototype.visit=function(e,t){return e.visitEmbeddedTemplate(this,t)},e}(),$a=function(){function e(e,t,n,r){this.directiveName=e,this.templateName=t,this.value=n,this.sourceSpan=r}return e.prototype.visit=function(e,t){return e.visitDirectiveProperty(this,t)},e}(),Ga=function(){function e(e,t,n,r,i,o){this.directive=e,this.inputs=t,this.hostProperties=n,this.hostEvents=r,this.contentQueryStartId=i,this.sourceSpan=o}return e.prototype.visit=function(e,t){return e.visitDirective(this,t)},e}(),Xa=function(){function e(e,t,n,r,i,o,s,a){this.token=e,this.multiProvider=t,this.eager=n,this.providers=r,this.providerType=i,this.lifecycleHooks=o,this.sourceSpan=s,this.isModule=a}return e.prototype.visit=function(e,t){return null},e}();!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"}(Ra||(Ra={}));var Ya=function(){function e(e,t,n){this.index=e,this.ngContentIndex=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitNgContent(this,t)},e}(),Za=function(){function e(){}return e.prototype.visitNgContent=function(e,t){},e.prototype.visitEmbeddedTemplate=function(e,t){},e.prototype.visitElement=function(e,t){},e.prototype.visitReference=function(e,t){},e.prototype.visitVariable=function(e,t){},e.prototype.visitEvent=function(e,t){},e.prototype.visitElementProperty=function(e,t){},e.prototype.visitAttr=function(e,t){},e.prototype.visitBoundText=function(e,t){},e.prototype.visitText=function(e,t){},e.prototype.visitDirective=function(e,t){},e.prototype.visitDirectiveProperty=function(e,t){},e}(),Ja=function(e){function t(){return e.call(this)||this}return o(t,e),t.prototype.visitEmbeddedTemplate=function(e,t){return this.visitChildren(t,function(t){t(e.attrs),t(e.references),t(e.variables),t(e.directives),t(e.providers),t(e.children)})},t.prototype.visitElement=function(e,t){return this.visitChildren(t,function(t){t(e.attrs),t(e.inputs),t(e.outputs),t(e.references),t(e.directives),t(e.providers),t(e.children)})},t.prototype.visitDirective=function(e,t){return this.visitChildren(t,function(t){t(e.inputs),t(e.hostProperties),t(e.hostEvents)})},t.prototype.visitChildren=function(e,t){var n=[],r=this;return t(function i(t){t&&t.length&&n.push(eu(r,t,e))}),[].concat.apply([],n)},t}(Za);function eu(e,t,n){void 0===n&&(n=null);var r=[],i=e.visit?function(t){return e.visit(t,n)||t.visit(e,n)}:function(t){return t.visit(e,n)};return t.forEach(function(e){var t=i(e);t&&r.push(t)}),r}
|
|
223
230
|
/**
|
|
224
231
|
* @license
|
|
225
232
|
* Copyright Google Inc. All Rights Reserved.
|
|
226
233
|
*
|
|
227
234
|
* Use of this source code is governed by an MIT-style license that can be
|
|
228
235
|
* found in the LICENSE file at https://angular.io/license
|
|
229
|
-
*/var tu=function(e){function t(t,n){return e.call(this,n,t)||this}return o(t,e),t}(go),nu=function nu(e,t){var n=this;this.reflector=e,this.component=t,this.errors=[],this.viewQueries=function r(e){var t=1,n=new Map;return e.viewQueries&&e.viewQueries.forEach(function(e){return ou(n,{meta:e,queryId:t++})}),n}(t),this.viewProviders=new Map,t.viewProviders.forEach(function(e){null==n.viewProviders.get(sn(e.token))&&n.viewProviders.set(sn(e.token),!0)})},ru=function(){function e(e,t,n,r,i,o,s,a,u){var l=this;this.viewContext=e,this._parent=t,this._isViewRoot=n,this._directiveAsts=r,this._sourceSpan=u,this._transformedProviders=new Map,this._seenProviders=new Map,this._queriedTokens=new Map,this.transformedHasViewContainer=!1,this._attrs={},i.forEach(function(e){return l._attrs[e.name]=e.value});var c=r.map(function(e){return e.directive});if(this._allProviders=function p(e,t,n){var r=new Map;return e.forEach(function(e){iu([{token:{identifier:e.type},useClass:e.type}],e.isComponent?Ra.Component:Ra.Directive,!0,t,n,r,!1)}),e.filter(function(e){return e.isComponent}).concat(e.filter(function(e){return!e.isComponent})).forEach(function(e){iu(e.providers,Ra.PublicService,!1,t,n,r,!1),iu(e.viewProviders,Ra.PrivateService,!1,t,n,r,!1)}),r}(c,u,e.errors),this._contentQueries=function h(e,t){var n=e,r=new Map;return t.forEach(function(e,t){e.queries&&e.queries.forEach(function(e){return ou(r,{meta:e,queryId:n++})})}),r}(a,c),Array.from(this._allProviders.values()).forEach(function(e){l._addQueryReadsTo(e.token,e.token,l._queriedTokens)}),s){var f=Xt(this.viewContext.reflector
|
|
236
|
+
*/var tu=function(e){function t(t,n){return e.call(this,n,t)||this}return o(t,e),t}(go),nu=function nu(e,t){var n=this;this.reflector=e,this.component=t,this.errors=[],this.viewQueries=function r(e){var t=1,n=new Map;return e.viewQueries&&e.viewQueries.forEach(function(e){return ou(n,{meta:e,queryId:t++})}),n}(t),this.viewProviders=new Map,t.viewProviders.forEach(function(e){null==n.viewProviders.get(sn(e.token))&&n.viewProviders.set(sn(e.token),!0)})},ru=function(){function e(e,t,n,r,i,o,s,a,u){var l=this;this.viewContext=e,this._parent=t,this._isViewRoot=n,this._directiveAsts=r,this._sourceSpan=u,this._transformedProviders=new Map,this._seenProviders=new Map,this._queriedTokens=new Map,this.transformedHasViewContainer=!1,this._attrs={},i.forEach(function(e){return l._attrs[e.name]=e.value});var c=r.map(function(e){return e.directive});if(this._allProviders=function p(e,t,n){var r=new Map;return e.forEach(function(e){iu([{token:{identifier:e.type},useClass:e.type}],e.isComponent?Ra.Component:Ra.Directive,!0,t,n,r,!1)}),e.filter(function(e){return e.isComponent}).concat(e.filter(function(e){return!e.isComponent})).forEach(function(e){iu(e.providers,Ra.PublicService,!1,t,n,r,!1),iu(e.viewProviders,Ra.PrivateService,!1,t,n,r,!1)}),r}(c,u,e.errors),this._contentQueries=function h(e,t){var n=e,r=new Map;return t.forEach(function(e,t){e.queries&&e.queries.forEach(function(e){return ou(r,{meta:e,queryId:n++})})}),r}(a,c),Array.from(this._allProviders.values()).forEach(function(e){l._addQueryReadsTo(e.token,e.token,l._queriedTokens)}),s){var f=Xt(this.viewContext.reflector,$t.TemplateRef);this._addQueryReadsTo(f,f,this._queriedTokens)}o.forEach(function(e){var t=e.value||Xt(l.viewContext.reflector,$t.ElementRef);l._addQueryReadsTo({value:e.name},t,l._queriedTokens)}),this._queriedTokens.get(this.viewContext.reflector.resolveExternalReference($t.ViewContainerRef))&&(this.transformedHasViewContainer=!0),Array.from(this._allProviders.values()).forEach(function(e){(e.eager||l._queriedTokens.get(sn(e.token)))&&l._getOrCreateLocalProvider(e.providerType,e.token,!0)})}return e.prototype.afterElement=function(){var e=this;Array.from(this._allProviders.values()).forEach(function(t){e._getOrCreateLocalProvider(t.providerType,t.token,!1)})},Object.defineProperty(e.prototype,"transformProviders",{get:function(){var e=[],t=[];return this._transformedProviders.forEach(function(n){n.eager?t.push(n):e.push(n)}),e.concat(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"transformedDirectiveAsts",{get:function(){var e=this.transformProviders.map(function(e){return e.token.identifier}),t=this._directiveAsts.slice();return t.sort(function(t,n){return e.indexOf(t.directive.type)-e.indexOf(n.directive.type)}),t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"queryMatches",{get:function(){var e=[];return this._queriedTokens.forEach(function(t){e.push.apply(e,f(t))}),e},enumerable:!0,configurable:!0}),e.prototype._addQueryReadsTo=function(e,t,n){this._getQueriesFor(e).forEach(function(e){var r=e.meta.read||t,i=sn(r),o=n.get(i);o||n.set(i,o=[]),o.push({queryId:e.queryId,value:r})})},e.prototype._getQueriesFor=function(e){for(var t,n=[],r=this,i=0;null!==r;)(t=r._contentQueries.get(sn(e)))&&n.push.apply(n,f(t.filter(function(e){return e.meta.descendants||i<=1}))),r._directiveAsts.length>0&&i++,r=r._parent;return(t=this.viewContext.viewQueries.get(sn(e)))&&n.push.apply(n,f(t)),n},e.prototype._getOrCreateLocalProvider=function(e,t,n){var r=this,i=this._allProviders.get(sn(t));if(!i||(e===Ra.Directive||e===Ra.PublicService)&&i.providerType===Ra.PrivateService||(e===Ra.PrivateService||e===Ra.PublicService)&&i.providerType===Ra.Builtin)return null;var o=this._transformedProviders.get(sn(t));if(o)return o;if(null!=this._seenProviders.get(sn(t)))return this.viewContext.errors.push(new tu("Cannot instantiate cyclic dependency! "+on(t),this._sourceSpan)),null;this._seenProviders.set(sn(t),!0);var s=i.providers.map(function(e){var t=e.useValue,o=e.useExisting,s=void 0;if(null!=e.useExisting){var a=r._getDependency(i.providerType,{token:e.useExisting},n);null!=a.token?o=a.token:(o=null,t=a.value)}else e.useFactory?s=(e.deps||e.useFactory.diDeps).map(function(e){return r._getDependency(i.providerType,e,n)}):e.useClass&&(s=(e.deps||e.useClass.diDeps).map(function(e){return r._getDependency(i.providerType,e,n)}));return function u(e,t){return{token:e.token,useClass:e.useClass,useExisting:t.useExisting,useFactory:e.useFactory,useValue:t.useValue,deps:t.deps,multi:e.multi}}(e,{useExisting:o,useValue:t,deps:s})});return o=function a(e,t){return new Xa(e.token,e.multiProvider,e.eager||t.eager,t.providers,e.providerType,e.lifecycleHooks,e.sourceSpan,e.isModule)}(i,{eager:n,providers:s}),this._transformedProviders.set(sn(t),o),o},e.prototype._getLocalDependency=function(e,t,n){if(void 0===n&&(n=!1),t.isAttribute){var r=this._attrs[t.token.value];return{isValue:!0,value:null==r?null:r}}if(null!=t.token){if(e===Ra.Directive||e===Ra.Component){if(sn(t.token)===this.viewContext.reflector.resolveExternalReference($t.Renderer)||sn(t.token)===this.viewContext.reflector.resolveExternalReference($t.ElementRef)||sn(t.token)===this.viewContext.reflector.resolveExternalReference($t.ChangeDetectorRef)||sn(t.token)===this.viewContext.reflector.resolveExternalReference($t.TemplateRef))return t;sn(t.token)===this.viewContext.reflector.resolveExternalReference($t.ViewContainerRef)&&(this.transformedHasViewContainer=!0)}if(sn(t.token)===this.viewContext.reflector.resolveExternalReference($t.Injector))return t;if(null!=this._getOrCreateLocalProvider(e,t.token,n))return t}return null},e.prototype._getDependency=function(e,t,n){void 0===n&&(n=!1);var r=this,i=n,o=null;if(t.isSkipSelf||(o=this._getLocalDependency(e,t,n)),t.isSelf)!o&&t.isOptional&&(o={isValue:!0,value:null});else{for(;!o&&r._parent;)r._isViewRoot&&(i=!1),o=(r=r._parent)._getLocalDependency(Ra.PublicService,t,i);o||(o=!t.isHost||this.viewContext.component.isHost||this.viewContext.component.type.reference===sn(t.token)||null!=this.viewContext.viewProviders.get(sn(t.token))?t:t.isOptional?{isValue:!0,value:null}:null)}return o||this.viewContext.errors.push(new tu("No provider for "+on(t.token),this._sourceSpan)),o},e}();function iu(e,t,n,r,i,o,s){e.forEach(function(e){var a=o.get(sn(e.token));null!=a&&!!a.multiProvider!=!!e.multi&&i.push(new tu("Mixing multi and non multi provider is not possible for token "+on(a.token),r)),a?(e.multi||(a.providers.length=0),a.providers.push(e)):(a=new Xa(e.token,!!e.multi,n||!(e.useClass||e.useExisting||e.useFactory),[e],t,e.token.identifier&&e.token.identifier.lifecycleHooks?e.token.identifier.lifecycleHooks:[],r,s),o.set(sn(e.token),a))})}function ou(e,t){t.meta.selectors.forEach(function(n){var r=e.get(sn(n));r||(r=[],e.set(sn(n),r)),r.push(t)})}
|
|
230
237
|
/**
|
|
231
238
|
* @license
|
|
232
239
|
* Copyright Google Inc. All Rights Reserved.
|
|
233
240
|
*
|
|
234
241
|
* Use of this source code is governed by an MIT-style license that can be
|
|
235
242
|
* found in the LICENSE file at https://angular.io/license
|
|
236
|
-
*/var su=function su(e,t){this.style=e,this.styleUrls=t};function au(e){if(null==e||0===e.length||"/"==e[0])return!1;var t=e.match(cu);return null===t||"package"==t[1]||"asset"==t[1]}var uu=/@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g,lu=/\/\*(?!#\s*(?:sourceURL|sourceMappingURL)=)[\s\S]+?\*\//g,cu=/^([^:\/?#]+):/,pu=function(){function e(e,t,n,r,i){if(this._exprParser=e,this._interpolationConfig=t,this._schemaRegistry=n,this.errors=i,this.pipesByName=null,this._usedPipes=new Map,r){var o=new Map;r.forEach(function(e){return o.set(e.name,e)}),this.pipesByName=o}}return Object.defineProperty(e.prototype,"interpolationConfig",{get:function(){return this._interpolationConfig},enumerable:!0,configurable:!0}),e.prototype.getUsedPipes=function(){return Array.from(this._usedPipes.values())},e.prototype.createBoundHostProperties=function(e,t){var n=this;if(e.hostProperties){var r=[];return Object.keys(e.hostProperties).forEach(function(i){var o=e.hostProperties[i];"string"==typeof o?n.parsePropertyBinding(i,o,!0,t,[],r):n._reportError('Value of the host property binding "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",t)}),r}return null},e.prototype.createDirectiveHostPropertyAsts=function(e,t,n){var r=this,i=this.createBoundHostProperties(e,n);return i&&i.map(function(e){return r.createBoundElementProperty(t,e)})},e.prototype.createDirectiveHostEventAsts=function(e,t){var n=this;if(e.hostListeners){var r=[];return Object.keys(e.hostListeners).forEach(function(i){var o=e.hostListeners[i];"string"==typeof o?n.parseEvent(i,o,t,t,[],r):n._reportError('Value of the host listener "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",t)}),r}return null},e.prototype.parseInterpolation=function(e,t){var n=t.start.toString();try{var r=this._exprParser.parseInterpolation(e,n,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,t),this._checkPipes(r,t),r}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype.parseInlineTemplateBinding=function(e,t,n,r,i,o){for(var s=this._parseTemplateBindings(e,t,n),a=0;a<s.length;a++){var u=s[a];u.keyIsVar?o.push(new is(u.key,u.name,n)):u.expression?this._parsePropertyAst(u.key,u.expression,n,r,i):(r.push([u.key,""]),this.parseLiteralAttr(u.key,null,n,r,i))}},e.prototype._parseTemplateBindings=function(e,t,n){var r=this,i=n.start.toString();try{var o=this._exprParser.parseTemplateBindings(e,t,i);return this._reportExpressionParserErrors(o.errors,n),o.templateBindings.forEach(function(e){e.expression&&r._checkPipes(e.expression,n)}),o.warnings.forEach(function(e){r._reportError(e,n,fo.WARNING)}),o.templateBindings}catch(e){return this._reportError(""+e,n),[]}},e.prototype.parseLiteralAttr=function(e,t,n,r,i){fu(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,fo.ERROR),this._parseAnimation(e,t,n,r,i)):i.push(new es(e,this._exprParser.wrapLiteralPrimitive(t,""),Jo.LITERAL_ATTR,n))},e.prototype.parsePropertyBinding=function(e,t,n,r,i,o){var s=!1;e.startsWith("animate-")?(s=!0,e=e.substring("animate-".length)):fu(e)&&(s=!0,e=e.substring(1)),s?this._parseAnimation(e,t,r,i,o):this._parsePropertyAst(e,this._parseBinding(t,n,r),r,i,o)},e.prototype.parsePropertyInterpolation=function(e,t,n,r,i){var o=this.parseInterpolation(t,n);return!!o&&(this._parsePropertyAst(e,o,n,r,i),!0)},e.prototype._parsePropertyAst=function(e,t,n,r,i){r.push([e,t.source]),i.push(new es(e,t,Jo.DEFAULT,n))},e.prototype._parseAnimation=function(e,t,n,r,i){var o=this._parseBinding(t||"undefined",!1,n);r.push([e,o.source]),i.push(new es(e,o,Jo.ANIMATION,n))},e.prototype._parseBinding=function(e,t,n){var r=(n&&n.start||"(unknown)").toString();try{var i=t?this._exprParser.parseSimpleBinding(e,r,this._interpolationConfig):this._exprParser.parseBinding(e,r,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)}},e.prototype.createBoundElementProperty=function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),t.isAnimation)return new os(t.name,4,B.NONE,t.expression,null,t.sourceSpan);var i=null,o=void 0,s=null,a=t.name.split("."),u=void 0;if(a.length>1)if("attr"==a[0]){s=a[1],n||this._validatePropertyOrAttributeName(s,t.sourceSpan,!0),u=du(this._schemaRegistry,e,s,!0);var l=s.indexOf(":");if(l>-1){var c=s.substring(0,l),p=s.substring(l+1);s=_(c,p)}o=1}else"class"==a[0]?(s=a[1],o=2,u=[B.NONE]):"style"==a[0]&&(i=a.length>2?a[2]:null,s=a[1],o=3,u=[B.STYLE]);if(null===s){var h=this._schemaRegistry.getMappedPropName(t.name);s=r?h:t.name,u=du(this._schemaRegistry,e,h,!1),o=0,n||this._validatePropertyOrAttributeName(h,t.sourceSpan,!1)}return new os(s,o,u[0],t.expression,i,t.sourceSpan)},e.prototype.parseEvent=function(e,t,n,r,i,o){fu(e)?(e=e.substr(1),this._parseAnimationEvent(e,t,n,r,o)):this._parseRegularEvent(e,t,n,r,i,o)},e.prototype.calcPossibleSecurityContexts=function(e,t,n){var r=this._schemaRegistry.getMappedPropName(t);return du(this._schemaRegistry,e,r,n)},e.prototype._parseAnimationEvent=function(e,t,n,r,i){var o=function s(e,t){return wt(e,".",t)}(e,[e,""]),a=o[0],u=o[1].toLowerCase();if(u)switch(u){case"start":case"done":var l=this._parseAction(t,r);i.push(new rs(a,u,1,l,n,r));break;default:this._reportError('The provided animation output phase value "'+u+'" 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)},e.prototype._parseRegularEvent=function(e,t,n,r,i,o){var s=h(bt(e,[null,e]),2),a=s[0],u=s[1],l=this._parseAction(t,r);i.push([e,l.source]),o.push(new rs(u,a,0,l,n,r))},e.prototype._parseAction=function(e,t){var n=(t&&t.start||"(unknown").toString();try{var r=this._exprParser.parseAction(e,n,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,t),!r||r.ast instanceof To?(this._reportError("Empty expressions are not allowed",t),this._exprParser.wrapLiteralPrimitive("ERROR",n)):(this._checkPipes(r,t),r)}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype._reportError=function(e,t,n){void 0===n&&(n=fo.ERROR),this.errors.push(new go(t,e,n))},e.prototype._reportExpressionParserErrors=function(e,t){var n,r;try{for(var i=p(e),o=i.next();!o.done;o=i.next())this._reportError(o.value.message,t)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype._checkPipes=function(e,t){var n=this;if(e&&this.pipesByName){var r=new hu;e.visit(r),r.pipes.forEach(function(e,r){var i=n.pipesByName.get(r);i?n._usedPipes.set(r,i):n._reportError("The pipe '"+r+"' could not be found",new yo(t.start.moveBy(e.span.start),t.start.moveBy(e.span.end)))})}},e.prototype._validatePropertyOrAttributeName=function(e,t,n){var r=n?this._schemaRegistry.validateAttribute(e):this._schemaRegistry.validateProperty(e);r.error&&this._reportError(r.msg,t,fo.ERROR)},e}(),hu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.pipes=new Map,t}return o(t,e),t.prototype.visitPipe=function(e,t){return this.pipes.set(e.name,e),e.exp.visit(this),this.visitAll(e.args,t),null},t}(
|
|
243
|
+
*/var su=function su(e,t){this.style=e,this.styleUrls=t};function au(e){if(null==e||0===e.length||"/"==e[0])return!1;var t=e.match(cu);return null===t||"package"==t[1]||"asset"==t[1]}var uu=/@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g,lu=/\/\*(?!#\s*(?:sourceURL|sourceMappingURL)=)[\s\S]+?\*\//g,cu=/^([^:\/?#]+):/,pu=function(){function e(e,t,n,r,i){if(this._exprParser=e,this._interpolationConfig=t,this._schemaRegistry=n,this.errors=i,this.pipesByName=null,this._usedPipes=new Map,r){var o=new Map;r.forEach(function(e){return o.set(e.name,e)}),this.pipesByName=o}}return Object.defineProperty(e.prototype,"interpolationConfig",{get:function(){return this._interpolationConfig},enumerable:!0,configurable:!0}),e.prototype.getUsedPipes=function(){return Array.from(this._usedPipes.values())},e.prototype.createBoundHostProperties=function(e,t){var n=this;if(e.hostProperties){var r=[];return Object.keys(e.hostProperties).forEach(function(i){var o=e.hostProperties[i];"string"==typeof o?n.parsePropertyBinding(i,o,!0,t,[],r):n._reportError('Value of the host property binding "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",t)}),r}return null},e.prototype.createDirectiveHostPropertyAsts=function(e,t,n){var r=this,i=this.createBoundHostProperties(e,n);return i&&i.map(function(e){return r.createBoundElementProperty(t,e)})},e.prototype.createDirectiveHostEventAsts=function(e,t){var n=this;if(e.hostListeners){var r=[];return Object.keys(e.hostListeners).forEach(function(i){var o=e.hostListeners[i];"string"==typeof o?n.parseEvent(i,o,t,t,[],r):n._reportError('Value of the host listener "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",t)}),r}return null},e.prototype.parseInterpolation=function(e,t){var n=t.start.toString();try{var r=this._exprParser.parseInterpolation(e,n,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,t),this._checkPipes(r,t),r}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype.parseInlineTemplateBinding=function(e,t,n,r,i,o){for(var s=this._parseTemplateBindings(e,t,n),a=0;a<s.length;a++){var u=s[a];u.keyIsVar?o.push(new is(u.key,u.name,n)):u.expression?this._parsePropertyAst(u.key,u.expression,n,r,i):(r.push([u.key,""]),this.parseLiteralAttr(u.key,null,n,r,i))}},e.prototype._parseTemplateBindings=function(e,t,n){var r=this,i=n.start.toString();try{var o=this._exprParser.parseTemplateBindings(e,t,i);return this._reportExpressionParserErrors(o.errors,n),o.templateBindings.forEach(function(e){e.expression&&r._checkPipes(e.expression,n)}),o.warnings.forEach(function(e){r._reportError(e,n,fo.WARNING)}),o.templateBindings}catch(e){return this._reportError(""+e,n),[]}},e.prototype.parseLiteralAttr=function(e,t,n,r,i){fu(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,fo.ERROR),this._parseAnimation(e,t,n,r,i)):i.push(new es(e,this._exprParser.wrapLiteralPrimitive(t,""),Jo.LITERAL_ATTR,n))},e.prototype.parsePropertyBinding=function(e,t,n,r,i,o){var s=!1;e.startsWith("animate-")?(s=!0,e=e.substring("animate-".length)):fu(e)&&(s=!0,e=e.substring(1)),s?this._parseAnimation(e,t,r,i,o):this._parsePropertyAst(e,this._parseBinding(t,n,r),r,i,o)},e.prototype.parsePropertyInterpolation=function(e,t,n,r,i){var o=this.parseInterpolation(t,n);return!!o&&(this._parsePropertyAst(e,o,n,r,i),!0)},e.prototype._parsePropertyAst=function(e,t,n,r,i){r.push([e,t.source]),i.push(new es(e,t,Jo.DEFAULT,n))},e.prototype._parseAnimation=function(e,t,n,r,i){var o=this._parseBinding(t||"undefined",!1,n);r.push([e,o.source]),i.push(new es(e,o,Jo.ANIMATION,n))},e.prototype._parseBinding=function(e,t,n){var r=(n&&n.start||"(unknown)").toString();try{var i=t?this._exprParser.parseSimpleBinding(e,r,this._interpolationConfig):this._exprParser.parseBinding(e,r,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)}},e.prototype.createBoundElementProperty=function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),t.isAnimation)return new os(t.name,4,B.NONE,t.expression,null,t.sourceSpan);var i=null,o=void 0,s=null,a=t.name.split("."),u=void 0;if(a.length>1)if("attr"==a[0]){s=a[1],n||this._validatePropertyOrAttributeName(s,t.sourceSpan,!0),u=du(this._schemaRegistry,e,s,!0);var l=s.indexOf(":");if(l>-1){var c=s.substring(0,l),p=s.substring(l+1);s=_(c,p)}o=1}else"class"==a[0]?(s=a[1],o=2,u=[B.NONE]):"style"==a[0]&&(i=a.length>2?a[2]:null,s=a[1],o=3,u=[B.STYLE]);if(null===s){var h=this._schemaRegistry.getMappedPropName(t.name);s=r?h:t.name,u=du(this._schemaRegistry,e,h,!1),o=0,n||this._validatePropertyOrAttributeName(h,t.sourceSpan,!1)}return new os(s,o,u[0],t.expression,i,t.sourceSpan)},e.prototype.parseEvent=function(e,t,n,r,i,o){fu(e)?(e=e.substr(1),this._parseAnimationEvent(e,t,n,r,o)):this._parseRegularEvent(e,t,n,r,i,o)},e.prototype.calcPossibleSecurityContexts=function(e,t,n){var r=this._schemaRegistry.getMappedPropName(t);return du(this._schemaRegistry,e,r,n)},e.prototype._parseAnimationEvent=function(e,t,n,r,i){var o=function s(e,t){return wt(e,".",t)}(e,[e,""]),a=o[0],u=o[1].toLowerCase();if(u)switch(u){case"start":case"done":var l=this._parseAction(t,r);i.push(new rs(a,u,1,l,n,r));break;default:this._reportError('The provided animation output phase value "'+u+'" 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)},e.prototype._parseRegularEvent=function(e,t,n,r,i,o){var s=h(bt(e,[null,e]),2),a=s[0],u=s[1],l=this._parseAction(t,r);i.push([e,l.source]),o.push(new rs(u,a,0,l,n,r))},e.prototype._parseAction=function(e,t){var n=(t&&t.start||"(unknown").toString();try{var r=this._exprParser.parseAction(e,n,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,t),!r||r.ast instanceof To?(this._reportError("Empty expressions are not allowed",t),this._exprParser.wrapLiteralPrimitive("ERROR",n)):(this._checkPipes(r,t),r)}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype._reportError=function(e,t,n){void 0===n&&(n=fo.ERROR),this.errors.push(new go(t,e,n))},e.prototype._reportExpressionParserErrors=function(e,t){var n,r;try{for(var i=p(e),o=i.next();!o.done;o=i.next())this._reportError(o.value.message,t)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype._checkPipes=function(e,t){var n=this;if(e&&this.pipesByName){var r=new hu;e.visit(r),r.pipes.forEach(function(e,r){var i=n.pipesByName.get(r);i?n._usedPipes.set(r,i):n._reportError("The pipe '"+r+"' could not be found",new yo(t.start.moveBy(e.span.start),t.start.moveBy(e.span.end)))})}},e.prototype._validatePropertyOrAttributeName=function(e,t,n){var r=n?this._schemaRegistry.validateAttribute(e):this._schemaRegistry.validateProperty(e);r.error&&this._reportError(r.msg,t,fo.ERROR)},e}(),hu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.pipes=new Map,t}return o(t,e),t.prototype.visitPipe=function(e,t){return this.pipes.set(e.name,e),e.exp.visit(this),this.visitAll(e.args,t),null},t}(Go);function fu(e){return"@"==e[0]}function du(e,t,n,r){var i=[];return A.parse(t).forEach(function(t){var o=t.element?[t.element]:e.allKnownElementNames(),s=new Set(t.notSelectors.filter(function(e){return e.isElementSelector()}).map(function(e){return e.element})),a=o.filter(function(e){return!s.has(e)});i.push.apply(i,f(a.map(function(t){return e.securityContext(t,n,r)})))}),0===i.length?[B.NONE]:Array.from(new Set(i)).sort()}
|
|
237
244
|
/**
|
|
238
245
|
* @license
|
|
239
246
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -254,14 +261,14 @@ var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,t
|
|
|
254
261
|
*
|
|
255
262
|
* Use of this source code is governed by an MIT-style license that can be
|
|
256
263
|
* found in the LICENSE file at https://angular.io/license
|
|
257
|
-
*/(a)),this.tryParseHtml(this.expandHtml(a),e,n,r,i)},e.prototype.tryParseHtml=function(e,t,n,r,i){var o,s=e.errors,a=[];if(e.rootNodes.length>0){var u=Uu(n),l=Uu(r),c=new nu(this._reflector,t),p=void 0;t.template&&t.template.interpolation&&(p={start:t.template.interpolation[0],end:t.template.interpolation[1]});var h=new pu(this._exprParser,p,this._schemaRegistry,l,s),d=new Ru(this._reflector,this._config,c,u,h,this._schemaRegistry,i,s);o=Js(d,e.rootNodes,Vu),s.push.apply(s,f(c.errors)),a.push.apply(a,f(h.getUsedPipes()))}else o=[];return this._assertNoReferenceDuplicationOnTemplate(o,s),s.length>0?new Mu(o,a,s):(this.transforms&&this.transforms.forEach(function(e){o=eu(e,o)}),new Mu(o,a,s))},e.prototype.expandHtml=function(e,t){void 0===t&&(t=!1);var n=e.errors;if(0==n.length||t){var r=Ma(e.rootNodes);n.push.apply(n,f(r.errors)),e=new ba(r.nodes,n)}return e},e.prototype.getInterpolationConfig=function(e){if(e.template)return hi.fromArray(e.template.interpolation)},e.prototype._assertNoReferenceDuplicationOnTemplate=function(e,t){var n=[];e.filter(function(e){return!!e.references}).forEach(function(e){return e.references.forEach(function(e){var r=e.name;if(n.indexOf(r)<0)n.push(r);else{var i=new Iu('Reference "#'+r+'" is defined several times',e.sourceSpan,fo.ERROR);t.push(i)}})})},e}(),Ru=function(){function e(e,t,n,r,i,o,s,a){var u=this;this.reflector=e,this.config=t,this.providerViewContext=n,this._bindingParser=i,this._schemaRegistry=o,this._schemas=s,this._targetErrors=a,this.selectorMatcher=new P,this.directivesIndex=new Map,this.ngContentCount=0,this.contentQueryStartId=n.component.viewQueries.length+1,r.forEach(function(e,t){var n=A.parse(e.selector);u.selectorMatcher.addSelectables(n,e),u.directivesIndex.set(e,t)})}return e.prototype.visitExpansion=function(e,t){return null},e.prototype.visitExpansionCase=function(e,t){return null},e.prototype.visitText=function(e,t){var n=t.findNgContentIndex(Pu()),r=Aa(e.value),i=this._bindingParser.parseInterpolation(r,e.sourceSpan);return i?new Va(i,n,e.sourceSpan):new ja(r,n,e.sourceSpan)},e.prototype.visitAttribute=function(e,t){return new Ha(e.name,e.value,e.sourceSpan)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitElement=function(e,t){var n=this,r=this.contentQueryStartId,i=e.name,o=Cu(e);if(o.type===vu.SCRIPT||o.type===vu.STYLE)return null;if(o.type===vu.STYLESHEET&&au(o.hrefAttr))return null;var s=[],a=[],u=[],l=[],c=[],p=[],h=[],d=[],v=!1,m=[],g=y(e.name);e.attrs.forEach(function(e){var t,r,i=n._parseAttr(g,e,s,a,c,u,l);l.push.apply(l,f([].map(function(e){return za.fromParsedVariable(e)})));var o=n._normalizeAttributeName(e.name);o.startsWith("*")&&(t=e.value,r=o.substring("*".length));var y=null!=t;if(y){v&&n._reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",e.sourceSpan),v=!0;var _=[];n._bindingParser.parseInlineTemplateBinding(r,t,e.sourceSpan,h,p,_),d.push.apply(d,f(_.map(function(e){return za.fromParsedVariable(e)})))}i||y||(m.push(n.visitAttribute(e,null)),s.push([e.name,e.value]))});var _=ju(i,s),b=this._parseDirectives(this.selectorMatcher,_),w=b.directives,x=b.matchElement,E=[],S=new Set,C=this._createDirectiveAsts(g,e.name,w,a,u,e.sourceSpan,E,S),T=this._createElementPropertyAsts(e.name,a,S),N=new ru(this.providerViewContext,t.providerContext,t.isTemplateElement||v,C,m,E,g,r,e.sourceSpan),k=Js(o.nonBindable?Hu:this,e.children,Fu.create(g,C,g?t.providerContext:N));N.afterElement();var P,I=""!=o.projectAs?A.parse(o.projectAs)[0]:_,M=t.findNgContentIndex(I);if(o.type===vu.NG_CONTENT)e.children&&!e.children.every(Bu)&&this._reportError("<ng-content> element cannot have content.",e.sourceSpan),P=new Ya(this.ngContentCount++,v?null:M,e.sourceSpan);else if(g)this._assertAllEventsPublishedByDirectives(C,c),this._assertNoComponentsNorElementBindingsOnTemplate(C,T,e.sourceSpan),P=new Qa(m,c,E,l,N.transformedDirectiveAsts,N.transformProviders,N.transformedHasViewContainer,N.queryMatches,k,v?null:M,e.sourceSpan);else{this._assertElementExists(x,e),this._assertOnlyOneComponent(C,e.sourceSpan);var O=v?null:t.findNgContentIndex(I);P=new Wa(i,m,T,c,E,N.transformedDirectiveAsts,N.transformProviders,N.transformedHasViewContainer,N.queryMatches,k,v?null:O,e.sourceSpan,e.endSourceSpan||null)}if(v){var R=this.contentQueryStartId,D=ju("ng-template",h),L=this._parseDirectives(this.selectorMatcher,D).directives,F=new Set,j=this._createDirectiveAsts(!0,i,L,p,[],e.sourceSpan,[],F),V=this._createElementPropertyAsts(i,p,F);this._assertNoComponentsNorElementBindingsOnTemplate(j,V,e.sourceSpan);var H=new ru(this.providerViewContext,t.providerContext,t.isTemplateElement,j,[],[],!0,R,e.sourceSpan);H.afterElement(),P=new Qa([],[],[],d,H.transformedDirectiveAsts,H.transformProviders,H.transformedHasViewContainer,H.queryMatches,[P],M,e.sourceSpan)}return P},e.prototype._parseAttr=function(e,t,n,r,i,o,s){var a=this._normalizeAttributeName(t.name),u=t.value,l=t.sourceSpan,c=[],p=a.match(ku),h=!1;return null!==p?(h=!0,null!=p[1]?this._bindingParser.parsePropertyBinding(p[7],u,!1,l,n,r):p[2]?e?this._parseVariable(p[7],u,l,s):this._reportError('"let-" is only supported on ng-template elements.',l):p[3]?this._parseReference(p[7],u,l,o):p[4]?this._bindingParser.parseEvent(p[7],u,l,t.valueSpan||l,n,c):p[5]?(this._bindingParser.parsePropertyBinding(p[7],u,!1,l,n,r),this._parseAssignmentEvent(p[7],u,l,t.valueSpan||l,n,c)):p[6]?this._bindingParser.parseLiteralAttr(a,u,l,n,r):p[8]?(this._bindingParser.parsePropertyBinding(p[8],u,!1,l,n,r),this._parseAssignmentEvent(p[8],u,l,t.valueSpan||l,n,c)):p[9]?this._bindingParser.parsePropertyBinding(p[9],u,!1,l,n,r):p[10]&&this._bindingParser.parseEvent(p[10],u,l,t.valueSpan||l,n,c)):h=this._bindingParser.parsePropertyInterpolation(a,u,l,n,r),h||this._bindingParser.parseLiteralAttr(a,u,l,n,r),i.push.apply(i,f(c.map(function(e){return qa.fromParsedEvent(e)}))),h},e.prototype._normalizeAttributeName=function(e){return/^data-/i.test(e)?e.substring(5):e},e.prototype._parseVariable=function(e,t,n,r){e.indexOf("-")>-1&&this._reportError('"-" is not allowed in variable names',n),r.push(new za(e,t,n))},e.prototype._parseReference=function(e,t,n,r){e.indexOf("-")>-1&&this._reportError('"-" is not allowed in reference names',n),r.push(new Lu(e,t,n))},e.prototype._parseAssignmentEvent=function(e,t,n,r,i,o){this._bindingParser.parseEvent(e+"Change",t+"=$event",n,r,i,o)},e.prototype._parseDirectives=function(e,t){var n=this,r=new Array(this.directivesIndex.size),i=!1;return e.match(t,function(e,t){r[n.directivesIndex.get(t)]=t,i=i||e.hasElementSelector()}),{directives:r.filter(function(e){return!!e}),matchElement:i}},e.prototype._createDirectiveAsts=function(e,t,n,r,i,o,s,a){var u=this,l=new Set,c=null,p=n.map(function(e){var n=new yo(o.start,o.end,"Directive "+rn(e.type));e.isComponent&&(c=e);var p=[],h=u._bindingParser.createDirectiveHostPropertyAsts(e,t,n).map(function(e){return Ua.fromBoundProperty(e)});h=u._checkPropertiesInSchema(t,h);var f=u._bindingParser.createDirectiveHostEventAsts(e,n);u._createDirectivePropertyAsts(e.inputs,r,p,a),i.forEach(function(t){(0===t.value.length&&e.isComponent||t.isReferenceToDirective(e))&&(s.push(new Ka(t.name,$t(e.type.reference),t.value,t.sourceSpan)),l.add(t.name))});var d=f.map(function(e){return qa.fromParsedEvent(e)}),v=u.contentQueryStartId;return u.contentQueryStartId+=e.queries.length,new $a(e,p,h,d,v,n)});return i.forEach(function(t){if(t.value.length>0)l.has(t.name)||u._reportError('There is no directive with "exportAs" set to "'+t.value+'"',t.sourceSpan);else if(!c){var n=null;e&&(n=Xt(u.reflector,Gt.TemplateRef)),s.push(new Ka(t.name,n,t.value,t.sourceSpan))}}),p},e.prototype._createDirectivePropertyAsts=function(e,t,n,r){if(e){var i=new Map;t.forEach(function(e){var t=i.get(e.name);t&&!t.isLiteral||i.set(e.name,e)}),Object.keys(e).forEach(function(t){var o=i.get(e[t]);o&&(r.add(o.name),qu(o.expression)||n.push(new Ga(t,o.name,o.expression,o.sourceSpan)))})}},e.prototype._createElementPropertyAsts=function(e,t,n){var r=this,i=[];return t.forEach(function(t){if(!t.isLiteral&&!n.has(t.name)){var o=r._bindingParser.createBoundElementProperty(e,t);i.push(Ua.fromBoundProperty(o))}}),this._checkPropertiesInSchema(e,i)},e.prototype._findComponentDirectives=function(e){return e.filter(function(e){return e.directive.isComponent})},e.prototype._findComponentDirectiveNames=function(e){return this._findComponentDirectives(e).map(function(e){return rn(e.directive.type)})},e.prototype._assertOnlyOneComponent=function(e,t){var n=this._findComponentDirectiveNames(e);n.length>1&&this._reportError("More than one component matched on this element.\nMake sure that only one component's selector can match a given element.\nConflicting components: "+n.join(","),t)},e.prototype._assertElementExists=function(e,t){var n=t.name.replace(/^:xhtml:/,"");if(!e&&!this._schemaRegistry.hasElement(n,this._schemas)){var r="'"+n+"' is not a known element:\n";r+="1. If '"+n+"' is an Angular component, then verify that it is part of this module.\n",n.indexOf("-")>-1?r+="2. If '"+n+"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.":r+="2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.",this._reportError(r,t.sourceSpan)}},e.prototype._assertNoComponentsNorElementBindingsOnTemplate=function(e,t,n){var r=this,i=this._findComponentDirectiveNames(e);i.length>0&&this._reportError("Components on an embedded template: "+i.join(","),n),t.forEach(function(e){r._reportError("Property binding "+e.name+' not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations".',n)})},e.prototype._assertAllEventsPublishedByDirectives=function(e,t){var n=this,r=new Set;e.forEach(function(e){Object.keys(e.directive.outputs).forEach(function(t){r.add(e.directive.outputs[t])})}),t.forEach(function(e){null==e.target&&r.has(e.name)||n._reportError("Event binding "+e.fullName+' not emitted by any directive on an embedded template. Make sure that the event name is spelled correctly and all directives are listed in the "@NgModule.declarations".',e.sourceSpan)})},e.prototype._checkPropertiesInSchema=function(e,t){var n=this;return t.filter(function(t){if(0===t.type&&!n._schemaRegistry.hasProperty(e,t.name,n._schemas)){var r="Can't bind to '"+t.name+"' since it isn't a known property of '"+e+"'.";e.startsWith("ng-")?r+="\n1. If '"+t.name+"' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.\n2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.":e.indexOf("-")>-1&&(r+="\n1. If '"+e+"' is an Angular component and it has '"+t.name+"' input, then verify that it is part of this module.\n2. If '"+e+"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.\n3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component."),n._reportError(r,t.sourceSpan)}return!qu(t.value)})},e.prototype._reportError=function(e,t,n){void 0===n&&(n=fo.ERROR),this._targetErrors.push(new go(t,e,n))},e}(),Du=function(){function e(){}return e.prototype.visitElement=function(e,t){var n=Cu(e);if(n.type===vu.SCRIPT||n.type===vu.STYLE||n.type===vu.STYLESHEET)return null;var r=e.attrs.map(function(e){return[e.name,e.value]}),i=ju(e.name,r),o=t.findNgContentIndex(i),s=Js(this,e.children,Vu);return new Wa(e.name,Js(this,e.attrs),[],[],[],[],[],!1,[],s,o,e.sourceSpan,e.endSourceSpan)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitAttribute=function(e,t){return new Ha(e.name,e.value,e.sourceSpan)},e.prototype.visitText=function(e,t){var n=t.findNgContentIndex(Pu());return new ja(e.value,n,e.sourceSpan)},e.prototype.visitExpansion=function(e,t){return e},e.prototype.visitExpansionCase=function(e,t){return e},e}(),Lu=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.prototype.isReferenceToDirective=function(e){return-1!==function t(e){return e?e.split(",").map(function(e){return e.trim()}):[]}(e.exportAs).indexOf(this.value)},e}(),Fu=function(){function e(e,t,n,r){this.isTemplateElement=e,this._ngContentIndexMatcher=t,this._wildcardNgContentIndex=n,this.providerContext=r}return e.create=function(t,n,r){var i=new P,o=null,s=n.find(function(e){return e.directive.isComponent});if(s)for(var a=s.directive.template.ngContentSelectors,u=0;u<a.length;u++)"*"===a[u]?o=u:i.addSelectables(A.parse(a[u]),u);return new e(t,i,o,r)},e.prototype.findNgContentIndex=function(e){var t=[];return this._ngContentIndexMatcher.match(e,function(e,n){t.push(n)}),t.sort(),null!=this._wildcardNgContentIndex&&t.push(this._wildcardNgContentIndex),t.length>0?t[0]:null},e}();function ju(e,t){var n=new A,r=d(e)[1];n.setElement(r);for(var i=0;i<t.length;i++){var o=t[i][0],s=d(o)[1],a=t[i][1];n.addAttribute(s,a),o.toLowerCase()==Au&&a.trim().split(/\s+/g).forEach(function(e){return n.addClassName(e)})}return n}var Vu=new Fu(!0,new P,null,null),Hu=new Du;function Bu(e){return e instanceof Qs&&0==e.value.trim().length}function Uu(e){var t=new Map;return e.forEach(function(e){t.get(e.type.reference)||t.set(e.type.reference,e)}),Array.from(t.values())}function qu(e){return e instanceof Wo&&(e=e.ast),e instanceof To}
|
|
264
|
+
*/(a)),this.tryParseHtml(this.expandHtml(a),e,n,r,i)},e.prototype.tryParseHtml=function(e,t,n,r,i){var o,s=e.errors,a=[];if(e.rootNodes.length>0){var u=Uu(n),l=Uu(r),c=new nu(this._reflector,t),p=void 0;t.template&&t.template.interpolation&&(p={start:t.template.interpolation[0],end:t.template.interpolation[1]});var h=new pu(this._exprParser,p,this._schemaRegistry,l,s),d=new Ru(this._reflector,this._config,c,u,h,this._schemaRegistry,i,s);o=Js(d,e.rootNodes,Vu),s.push.apply(s,f(c.errors)),a.push.apply(a,f(h.getUsedPipes()))}else o=[];return this._assertNoReferenceDuplicationOnTemplate(o,s),s.length>0?new Mu(o,a,s):(this.transforms&&this.transforms.forEach(function(e){o=eu(e,o)}),new Mu(o,a,s))},e.prototype.expandHtml=function(e,t){void 0===t&&(t=!1);var n=e.errors;if(0==n.length||t){var r=Ma(e.rootNodes);n.push.apply(n,f(r.errors)),e=new ba(r.nodes,n)}return e},e.prototype.getInterpolationConfig=function(e){if(e.template)return hi.fromArray(e.template.interpolation)},e.prototype._assertNoReferenceDuplicationOnTemplate=function(e,t){var n=[];e.filter(function(e){return!!e.references}).forEach(function(e){return e.references.forEach(function(e){var r=e.name;if(n.indexOf(r)<0)n.push(r);else{var i=new Iu('Reference "#'+r+'" is defined several times',e.sourceSpan,fo.ERROR);t.push(i)}})})},e}(),Ru=function(){function e(e,t,n,r,i,o,s,a){var u=this;this.reflector=e,this.config=t,this.providerViewContext=n,this._bindingParser=i,this._schemaRegistry=o,this._schemas=s,this._targetErrors=a,this.selectorMatcher=new P,this.directivesIndex=new Map,this.ngContentCount=0,this.contentQueryStartId=n.component.viewQueries.length+1,r.forEach(function(e,t){var n=A.parse(e.selector);u.selectorMatcher.addSelectables(n,e),u.directivesIndex.set(e,t)})}return e.prototype.visitExpansion=function(e,t){return null},e.prototype.visitExpansionCase=function(e,t){return null},e.prototype.visitText=function(e,t){var n=t.findNgContentIndex(Pu()),r=Aa(e.value),i=this._bindingParser.parseInterpolation(r,e.sourceSpan);return i?new Va(i,n,e.sourceSpan):new ja(r,n,e.sourceSpan)},e.prototype.visitAttribute=function(e,t){return new Ha(e.name,e.value,e.sourceSpan)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitElement=function(e,t){var n=this,r=this.contentQueryStartId,i=e.name,o=Cu(e);if(o.type===vu.SCRIPT||o.type===vu.STYLE)return null;if(o.type===vu.STYLESHEET&&au(o.hrefAttr))return null;var s=[],a=[],u=[],l=[],c=[],p=[],h=[],d=[],v=!1,m=[],g=y(e.name);e.attrs.forEach(function(e){var t,r,i=n._parseAttr(g,e,s,a,c,u,l);l.push.apply(l,f([].map(function(e){return za.fromParsedVariable(e)})));var o=n._normalizeAttributeName(e.name);o.startsWith("*")&&(t=e.value,r=o.substring("*".length));var y=null!=t;if(y){v&&n._reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",e.sourceSpan),v=!0;var _=[];n._bindingParser.parseInlineTemplateBinding(r,t,e.sourceSpan,h,p,_),d.push.apply(d,f(_.map(function(e){return za.fromParsedVariable(e)})))}i||y||(m.push(n.visitAttribute(e,null)),s.push([e.name,e.value]))});var _=ju(i,s),b=this._parseDirectives(this.selectorMatcher,_),w=b.directives,x=b.matchElement,E=[],S=new Set,C=this._createDirectiveAsts(g,e.name,w,a,u,e.sourceSpan,E,S),T=this._createElementPropertyAsts(e.name,a,S),N=new ru(this.providerViewContext,t.providerContext,t.isTemplateElement||v,C,m,E,g,r,e.sourceSpan),k=Js(o.nonBindable?Hu:this,e.children,Fu.create(g,C,g?t.providerContext:N));N.afterElement();var P,I=""!=o.projectAs?A.parse(o.projectAs)[0]:_,M=t.findNgContentIndex(I);if(o.type===vu.NG_CONTENT)e.children&&!e.children.every(Bu)&&this._reportError("<ng-content> element cannot have content.",e.sourceSpan),P=new Ya(this.ngContentCount++,v?null:M,e.sourceSpan);else if(g)this._assertAllEventsPublishedByDirectives(C,c),this._assertNoComponentsNorElementBindingsOnTemplate(C,T,e.sourceSpan),P=new Qa(m,c,E,l,N.transformedDirectiveAsts,N.transformProviders,N.transformedHasViewContainer,N.queryMatches,k,v?null:M,e.sourceSpan);else{this._assertElementExists(x,e),this._assertOnlyOneComponent(C,e.sourceSpan);var O=v?null:t.findNgContentIndex(I);P=new Wa(i,m,T,c,E,N.transformedDirectiveAsts,N.transformProviders,N.transformedHasViewContainer,N.queryMatches,k,v?null:O,e.sourceSpan,e.endSourceSpan||null)}if(v){var R=this.contentQueryStartId,D=ju("ng-template",h),L=this._parseDirectives(this.selectorMatcher,D).directives,F=new Set,j=this._createDirectiveAsts(!0,i,L,p,[],e.sourceSpan,[],F),V=this._createElementPropertyAsts(i,p,F);this._assertNoComponentsNorElementBindingsOnTemplate(j,V,e.sourceSpan);var H=new ru(this.providerViewContext,t.providerContext,t.isTemplateElement,j,[],[],!0,R,e.sourceSpan);H.afterElement(),P=new Qa([],[],[],d,H.transformedDirectiveAsts,H.transformProviders,H.transformedHasViewContainer,H.queryMatches,[P],M,e.sourceSpan)}return P},e.prototype._parseAttr=function(e,t,n,r,i,o,s){var a=this._normalizeAttributeName(t.name),u=t.value,l=t.sourceSpan,c=[],p=a.match(ku),h=!1;return null!==p?(h=!0,null!=p[1]?this._bindingParser.parsePropertyBinding(p[7],u,!1,l,n,r):p[2]?e?this._parseVariable(p[7],u,l,s):this._reportError('"let-" is only supported on ng-template elements.',l):p[3]?this._parseReference(p[7],u,l,o):p[4]?this._bindingParser.parseEvent(p[7],u,l,t.valueSpan||l,n,c):p[5]?(this._bindingParser.parsePropertyBinding(p[7],u,!1,l,n,r),this._parseAssignmentEvent(p[7],u,l,t.valueSpan||l,n,c)):p[6]?this._bindingParser.parseLiteralAttr(a,u,l,n,r):p[8]?(this._bindingParser.parsePropertyBinding(p[8],u,!1,l,n,r),this._parseAssignmentEvent(p[8],u,l,t.valueSpan||l,n,c)):p[9]?this._bindingParser.parsePropertyBinding(p[9],u,!1,l,n,r):p[10]&&this._bindingParser.parseEvent(p[10],u,l,t.valueSpan||l,n,c)):h=this._bindingParser.parsePropertyInterpolation(a,u,l,n,r),h||this._bindingParser.parseLiteralAttr(a,u,l,n,r),i.push.apply(i,f(c.map(function(e){return qa.fromParsedEvent(e)}))),h},e.prototype._normalizeAttributeName=function(e){return/^data-/i.test(e)?e.substring(5):e},e.prototype._parseVariable=function(e,t,n,r){e.indexOf("-")>-1&&this._reportError('"-" is not allowed in variable names',n),r.push(new za(e,t,n))},e.prototype._parseReference=function(e,t,n,r){e.indexOf("-")>-1&&this._reportError('"-" is not allowed in reference names',n),r.push(new Lu(e,t,n))},e.prototype._parseAssignmentEvent=function(e,t,n,r,i,o){this._bindingParser.parseEvent(e+"Change",t+"=$event",n,r,i,o)},e.prototype._parseDirectives=function(e,t){var n=this,r=new Array(this.directivesIndex.size),i=!1;return e.match(t,function(e,t){r[n.directivesIndex.get(t)]=t,i=i||e.hasElementSelector()}),{directives:r.filter(function(e){return!!e}),matchElement:i}},e.prototype._createDirectiveAsts=function(e,t,n,r,i,o,s,a){var u=this,l=new Set,c=null,p=n.map(function(e){var n=new yo(o.start,o.end,"Directive "+rn(e.type));e.isComponent&&(c=e);var p=[],h=u._bindingParser.createDirectiveHostPropertyAsts(e,t,n).map(function(e){return Ua.fromBoundProperty(e)});h=u._checkPropertiesInSchema(t,h);var f=u._bindingParser.createDirectiveHostEventAsts(e,n);u._createDirectivePropertyAsts(e.inputs,r,p,a),i.forEach(function(t){(0===t.value.length&&e.isComponent||t.isReferenceToDirective(e))&&(s.push(new Ka(t.name,Gt(e.type.reference),t.value,t.sourceSpan)),l.add(t.name))});var d=f.map(function(e){return qa.fromParsedEvent(e)}),v=u.contentQueryStartId;return u.contentQueryStartId+=e.queries.length,new Ga(e,p,h,d,v,n)});return i.forEach(function(t){if(t.value.length>0)l.has(t.name)||u._reportError('There is no directive with "exportAs" set to "'+t.value+'"',t.sourceSpan);else if(!c){var n=null;e&&(n=Xt(u.reflector,$t.TemplateRef)),s.push(new Ka(t.name,n,t.value,t.sourceSpan))}}),p},e.prototype._createDirectivePropertyAsts=function(e,t,n,r){if(e){var i=new Map;t.forEach(function(e){var t=i.get(e.name);t&&!t.isLiteral||i.set(e.name,e)}),Object.keys(e).forEach(function(t){var o=i.get(e[t]);o&&(r.add(o.name),qu(o.expression)||n.push(new $a(t,o.name,o.expression,o.sourceSpan)))})}},e.prototype._createElementPropertyAsts=function(e,t,n){var r=this,i=[];return t.forEach(function(t){if(!t.isLiteral&&!n.has(t.name)){var o=r._bindingParser.createBoundElementProperty(e,t);i.push(Ua.fromBoundProperty(o))}}),this._checkPropertiesInSchema(e,i)},e.prototype._findComponentDirectives=function(e){return e.filter(function(e){return e.directive.isComponent})},e.prototype._findComponentDirectiveNames=function(e){return this._findComponentDirectives(e).map(function(e){return rn(e.directive.type)})},e.prototype._assertOnlyOneComponent=function(e,t){var n=this._findComponentDirectiveNames(e);n.length>1&&this._reportError("More than one component matched on this element.\nMake sure that only one component's selector can match a given element.\nConflicting components: "+n.join(","),t)},e.prototype._assertElementExists=function(e,t){var n=t.name.replace(/^:xhtml:/,"");if(!e&&!this._schemaRegistry.hasElement(n,this._schemas)){var r="'"+n+"' is not a known element:\n";r+="1. If '"+n+"' is an Angular component, then verify that it is part of this module.\n",n.indexOf("-")>-1?r+="2. If '"+n+"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.":r+="2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.",this._reportError(r,t.sourceSpan)}},e.prototype._assertNoComponentsNorElementBindingsOnTemplate=function(e,t,n){var r=this,i=this._findComponentDirectiveNames(e);i.length>0&&this._reportError("Components on an embedded template: "+i.join(","),n),t.forEach(function(e){r._reportError("Property binding "+e.name+' not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations".',n)})},e.prototype._assertAllEventsPublishedByDirectives=function(e,t){var n=this,r=new Set;e.forEach(function(e){Object.keys(e.directive.outputs).forEach(function(t){r.add(e.directive.outputs[t])})}),t.forEach(function(e){null==e.target&&r.has(e.name)||n._reportError("Event binding "+e.fullName+' not emitted by any directive on an embedded template. Make sure that the event name is spelled correctly and all directives are listed in the "@NgModule.declarations".',e.sourceSpan)})},e.prototype._checkPropertiesInSchema=function(e,t){var n=this;return t.filter(function(t){if(0===t.type&&!n._schemaRegistry.hasProperty(e,t.name,n._schemas)){var r="Can't bind to '"+t.name+"' since it isn't a known property of '"+e+"'.";e.startsWith("ng-")?r+="\n1. If '"+t.name+"' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.\n2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.":e.indexOf("-")>-1&&(r+="\n1. If '"+e+"' is an Angular component and it has '"+t.name+"' input, then verify that it is part of this module.\n2. If '"+e+"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.\n3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component."),n._reportError(r,t.sourceSpan)}return!qu(t.value)})},e.prototype._reportError=function(e,t,n){void 0===n&&(n=fo.ERROR),this._targetErrors.push(new go(t,e,n))},e}(),Du=function(){function e(){}return e.prototype.visitElement=function(e,t){var n=Cu(e);if(n.type===vu.SCRIPT||n.type===vu.STYLE||n.type===vu.STYLESHEET)return null;var r=e.attrs.map(function(e){return[e.name,e.value]}),i=ju(e.name,r),o=t.findNgContentIndex(i),s=Js(this,e.children,Vu);return new Wa(e.name,Js(this,e.attrs),[],[],[],[],[],!1,[],s,o,e.sourceSpan,e.endSourceSpan)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitAttribute=function(e,t){return new Ha(e.name,e.value,e.sourceSpan)},e.prototype.visitText=function(e,t){var n=t.findNgContentIndex(Pu());return new ja(e.value,n,e.sourceSpan)},e.prototype.visitExpansion=function(e,t){return e},e.prototype.visitExpansionCase=function(e,t){return e},e}(),Lu=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.prototype.isReferenceToDirective=function(e){return-1!==function t(e){return e?e.split(",").map(function(e){return e.trim()}):[]}(e.exportAs).indexOf(this.value)},e}(),Fu=function(){function e(e,t,n,r){this.isTemplateElement=e,this._ngContentIndexMatcher=t,this._wildcardNgContentIndex=n,this.providerContext=r}return e.create=function(t,n,r){var i=new P,o=null,s=n.find(function(e){return e.directive.isComponent});if(s)for(var a=s.directive.template.ngContentSelectors,u=0;u<a.length;u++)"*"===a[u]?o=u:i.addSelectables(A.parse(a[u]),u);return new e(t,i,o,r)},e.prototype.findNgContentIndex=function(e){var t=[];return this._ngContentIndexMatcher.match(e,function(e,n){t.push(n)}),t.sort(),null!=this._wildcardNgContentIndex&&t.push(this._wildcardNgContentIndex),t.length>0?t[0]:null},e}();function ju(e,t){var n=new A,r=d(e)[1];n.setElement(r);for(var i=0;i<t.length;i++){var o=t[i][0],s=d(o)[1],a=t[i][1];n.addAttribute(s,a),o.toLowerCase()==Au&&a.trim().split(/\s+/g).forEach(function(e){return n.addClassName(e)})}return n}var Vu=new Fu(!0,new P,null,null),Hu=new Du;function Bu(e){return e instanceof Qs&&0==e.value.trim().length}function Uu(e){var t=new Map;return e.forEach(function(e){t.get(e.type.reference)||t.set(e.type.reference,e)}),Array.from(t.values())}function qu(e){return e instanceof Wo&&(e=e.ast),e instanceof To}
|
|
258
265
|
/**
|
|
259
266
|
* @license
|
|
260
267
|
* Copyright Google Inc. All Rights Reserved.
|
|
261
268
|
*
|
|
262
269
|
* Use of this source code is governed by an MIT-style license that can be
|
|
263
270
|
* found in the LICENSE file at https://angular.io/license
|
|
264
|
-
*/function Ku(e){var t=e.charCodeAt(0);if(t==e.charCodeAt(e.length-1)&&(39==t||34==t)){var n=e.substring(1,e.length-1);-1==n.indexOf("'")&&-1==n.indexOf('"')&&(e=n)}return e}function zu(e){return e.replace(/[a-z][A-Z]/g,function(e){return e.charAt(0)+"-"+e.charAt(1)}).toLowerCase()}var Wu,Qu="!important"
|
|
271
|
+
*/function Ku(e){var t=e.charCodeAt(0);if(t==e.charCodeAt(e.length-1)&&(39==t||34==t)){var n=e.substring(1,e.length-1);-1==n.indexOf("'")&&-1==n.indexOf('"')&&(e=n)}return e}function zu(e){return e.replace(/[a-z][A-Z]/g,function(e){return e.charAt(0)+"-"+e.charAt(1)}).toLowerCase()}var Wu,Qu="!important",$u=function(){function e(e,t){this._elementIndexExpr=e,this._directiveExpr=t,this._hasInitialValues=!1,this.hasBindings=!1,this._classMapInput=null,this._styleMapInput=null,this._singleStyleInputs=null,this._singleClassInputs=null,this._lastStylingInput=null,this._stylesIndex=new Map,this._classesIndex=new Map,this._initialStyleValues=[],this._initialClassValues=[],this._useDefaultSanitizer=!1}return e.prototype.registerBoundInput=function(e){var 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},e.prototype.registerInputBasedOnName=function(e,t,n){var r=null,i=e.substring(0,5),o="style"===i;if(o||!o&&"class"===i){var s="."!==e.charAt(5),a=e.substr(s?5:6);r=o?this.registerStyleInput(a,s,t,n):this.registerClassInput(a,s,t,n)}return r},e.prototype.registerStyleInput=function(e,t,n,r,i){if(qu(n))return null;var o=Zu(e),s=o.property,a={name:s,unit:i||o.unit,value:n,sourceSpan:r,hasOverrideFlag:o.hasOverrideFlag};return t?(this._useDefaultSanitizer=!0,this._styleMapInput=a):((this._singleStyleInputs=this._singleStyleInputs||[]).push(a),this._useDefaultSanitizer=this._useDefaultSanitizer||function u(e){return"background-image"===e||"background"===e||"border-image"===e||"filter"===e||"list-style"===e||"list-style-image"===e}(e),Gu(this._stylesIndex,s)),this._lastStylingInput=a,this.hasBindings=!0,a},e.prototype.registerClassInput=function(e,t,n,r){if(qu(n))return null;var i=Zu(e),o=i.property,s={name:o,value:n,sourceSpan:r,hasOverrideFlag:i.hasOverrideFlag,unit:null};return t?this._classMapInput=s:((this._singleClassInputs=this._singleClassInputs||[]).push(s),Gu(this._classesIndex,o)),this._lastStylingInput=s,this.hasBindings=!0,s},e.prototype.registerStyleAttr=function(e){this._initialStyleValues=function t(e){for(var t=[],n=0,r=0,i=0,o=0,s=0,a=null,u=!1;n<e.length;)switch(e.charCodeAt(n++)){case 40:r++;break;case 41:r--;break;case 39:u=u||o>0,0===i?i=39:39===i&&92!==e.charCodeAt(n-1)&&(i=0);break;case 34:u=u||o>0,0===i?i=34:34===i&&92!==e.charCodeAt(n-1)&&(i=0);break;case 58:a||0!==r||0!==i||(a=zu(e.substring(s,n-1).trim()),o=n);break;case 59:if(a&&o>0&&0===r&&0===i){var l=e.substring(o,n-1).trim();t.push(a,u?Ku(l):l),s=n,o=0,a=null,u=!1}}return a&&o&&(l=e.substr(o).trim(),t.push(a,u?Ku(l):l)),t}(e),this._hasInitialValues=!0},e.prototype.registerClassAttr=function(e){this._initialClassValues=e.trim().split(/\s+/g),this._hasInitialValues=!0},e.prototype.populateInitialStylingAttrs=function(e){if(this._initialClassValues.length){e.push(yt(1));for(var t=0;t<this._initialClassValues.length;t++)e.push(yt(this._initialClassValues[t]))}if(this._initialStyleValues.length)for(e.push(yt(2)),t=0;t<this._initialStyleValues.length;t+=2)e.push(yt(this._initialStyleValues[t]),yt(this._initialStyleValues[t+1]))},e.prototype.buildHostAttrsInstruction=function(e,t,n){var r=this;return this._directiveExpr&&(t.length||this._hasInitialValues)?{sourceSpan:e,reference:yn.elementHostAttrs,allocateBindingSlots:0,buildParams:function(){return r.populateInitialStylingAttrs(t),[t.some(function(e){return e instanceof Se})?ft(t):Xu(n,t)]}}:null},e.prototype.buildElementStylingInstruction=function(e,t){var n=this;return this.hasBindings?{sourceSpan:e,allocateBindingSlots:0,reference:this._directiveExpr?yn.elementHostStyling:yn.elementStyling,buildParams:function(){var e=n._singleStyleInputs?n._singleStyleInputs.map(function(e){return yt(e.name)}):[],r=n._singleClassInputs?n._singleClassInputs.map(function(e){return yt(e.name)}):[],i=[],o=0;return n._useDefaultSanitizer?o=3:e.length?o=2:r.length&&(o=1),Yu(i,r.length>0,Xu(t,r),1,o),Yu(i,e.length>0,Xu(t,e),2,o),Yu(i,n._useDefaultSanitizer,pt(yn.defaultStyleSanitizer),3,o),i}}:null},e.prototype.buildElementStylingMapInstruction=function(e){var t=this;if(this._classMapInput||this._styleMapInput){var n=this._classMapInput||this._styleMapInput,r=0,i=this._classMapInput?this._classMapInput.value.visit(e):null;i instanceof Vo&&(r+=i.expressions.length);var o=this._styleMapInput?this._styleMapInput.value.visit(e):null;o instanceof Vo&&(r+=o.expressions.length);var s=this._directiveExpr;return{sourceSpan:n.sourceSpan,reference:s?yn.elementHostStylingMap:yn.elementStylingMap,allocateBindingSlots:r,buildParams:function(e){var n=[];s||n.push(t._elementIndexExpr);var r=0;return o?r=2:i&&(r=1),Yu(n,i,i?e(i):null,1,r),Yu(n,o,o?e(o):null,2,r),n}}}return null},e.prototype._buildSingleInputs=function(e,t,n,r,i,o){var s=this,a=0;return n.map(function(n){var u=r.get(n.name),l=n.value.visit(o);return{sourceSpan:n.sourceSpan,allocateBindingSlots:a+=l instanceof Vo?l.expressions.length:0,reference:e,buildParams:function(e){var r=[];return t||r.push(s._elementIndexExpr),r.push(yt(u)),r.push(e(l)),i&&(n.unit?r.push(yt(n.unit)):n.hasOverrideFlag&&r.push(Qe)),n.hasOverrideFlag&&r.push(yt(!0)),r}}})},e.prototype._buildClassInputs=function(e){if(this._singleClassInputs){var t=!!this._directiveExpr;return this._buildSingleInputs(t?yn.elementHostClassProp:yn.elementClassProp,t,this._singleClassInputs,this._classesIndex,!1,e)}return[]},e.prototype._buildStyleInputs=function(e){if(this._singleStyleInputs){var t=!!this._directiveExpr;return this._buildSingleInputs(t?yn.elementHostStyleProp:yn.elementStyleProp,t,this._singleStyleInputs,this._stylesIndex,!0,e)}return[]},e.prototype._buildApplyFn=function(){var e=this,t=this._directiveExpr;return{sourceSpan:this._lastStylingInput?this._lastStylingInput.sourceSpan:null,reference:t?yn.elementHostStylingApply:yn.elementStylingApply,allocateBindingSlots:0,buildParams:function(){return t?[]:[e._elementIndexExpr]}}},e.prototype.buildUpdateLevelInstructions=function(e){var t=[];if(this.hasBindings){var n=this.buildElementStylingMapInstruction(e);n&&t.push(n),t.push.apply(t,f(this._buildStyleInputs(e))),t.push.apply(t,f(this._buildClassInputs(e))),t.push(this._buildApplyFn())}return t},e}();function Gu(e,t){e.has(t)||e.set(t,e.size)}function Xu(e,t){return t.length?e.getConstLiteral(ft(t),!0):Qe}function Yu(e,t,n,r,i){t&&n?e.push(n):r<i&&e.push(Qe)}function Zu(e){var t=!1,n=e.indexOf(Qu);-1!==n&&(e=n>0?e.substring(0,n):"",t=!0);var r="",i=e,o=e.lastIndexOf(".");return o>0&&(r=e.substr(o+1),i=e.substring(0,o)),{property:i,unit:r,hasOverrideFlag:t}}
|
|
265
272
|
/**
|
|
266
273
|
* @license
|
|
267
274
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -310,7 +317,7 @@ var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,t
|
|
|
310
317
|
*
|
|
311
318
|
* Use of this source code is governed by an MIT-style license that can be
|
|
312
319
|
* found in the LICENSE file at https://angular.io/license
|
|
313
|
-
*/var jl={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"},Vl=function(){function e(){this._placeHolderNameCounts={},this._signatureToName={}}return e.prototype.getStartTagPlaceholderName=function(e,t,n){var r=this._hashTag(e,t,n);if(this._signatureToName[r])return this._signatureToName[r];var i=e.toUpperCase(),o=jl[i]||"TAG_"+i,s=this._generateUniqueName(n?o:"START_"+o);return this._signatureToName[r]=s,s},e.prototype.getCloseTagPlaceholderName=function(e){var t=this._hashClosingTag(e);if(this._signatureToName[t])return this._signatureToName[t];var n=e.toUpperCase(),r=this._generateUniqueName("CLOSE_"+(jl[n]||"TAG_"+n));return this._signatureToName[t]=r,r},e.prototype.getPlaceholderName=function(e,t){var n=e.toUpperCase(),r="PH: "+n+"="+t;if(this._signatureToName[r])return this._signatureToName[r];var i=this._generateUniqueName(n);return this._signatureToName[r]=i,i},e.prototype.getUniquePlaceholder=function(e){return this._generateUniqueName(e.toUpperCase())},e.prototype._hashTag=function(e,t,n){return"<"+e+Object.keys(t).sort().map(function(e){return" "+e+"="+t[e]}).join("")+(n?"/>":"></"+e+">")},e.prototype._hashClosingTag=function(e){return this._hashTag("/"+e,{},!1)},e.prototype._generateUniqueName=function(e){if(!this._placeHolderNameCounts.hasOwnProperty(e))return this._placeHolderNameCounts[e]=1,e;var t=this._placeHolderNameCounts[e];return this._placeHolderNameCounts[e]=t+1,e+"_"+t},e}(),Hl=new dl(new el);function Bl(e){var t=new Ul(Hl,e);return function(e,n,r,i,o){return t.toI18nMessage(e,n,r,i,o)}}var Ul=function(){function e(e,t){this._expressionParser=e,this._interpolationConfig=t}return e.prototype.toI18nMessage=function(e,t,n,r,i){this._isIcu=1==e.length&&e[0]instanceof
|
|
320
|
+
*/var jl={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"},Vl=function(){function e(){this._placeHolderNameCounts={},this._signatureToName={}}return e.prototype.getStartTagPlaceholderName=function(e,t,n){var r=this._hashTag(e,t,n);if(this._signatureToName[r])return this._signatureToName[r];var i=e.toUpperCase(),o=jl[i]||"TAG_"+i,s=this._generateUniqueName(n?o:"START_"+o);return this._signatureToName[r]=s,s},e.prototype.getCloseTagPlaceholderName=function(e){var t=this._hashClosingTag(e);if(this._signatureToName[t])return this._signatureToName[t];var n=e.toUpperCase(),r=this._generateUniqueName("CLOSE_"+(jl[n]||"TAG_"+n));return this._signatureToName[t]=r,r},e.prototype.getPlaceholderName=function(e,t){var n=e.toUpperCase(),r="PH: "+n+"="+t;if(this._signatureToName[r])return this._signatureToName[r];var i=this._generateUniqueName(n);return this._signatureToName[r]=i,i},e.prototype.getUniquePlaceholder=function(e){return this._generateUniqueName(e.toUpperCase())},e.prototype._hashTag=function(e,t,n){return"<"+e+Object.keys(t).sort().map(function(e){return" "+e+"="+t[e]}).join("")+(n?"/>":"></"+e+">")},e.prototype._hashClosingTag=function(e){return this._hashTag("/"+e,{},!1)},e.prototype._generateUniqueName=function(e){if(!this._placeHolderNameCounts.hasOwnProperty(e))return this._placeHolderNameCounts[e]=1,e;var t=this._placeHolderNameCounts[e];return this._placeHolderNameCounts[e]=t+1,e+"_"+t},e}(),Hl=new dl(new el);function Bl(e){var t=new Ul(Hl,e);return function(e,n,r,i,o){return t.toI18nMessage(e,n,r,i,o)}}var Ul=function(){function e(e,t){this._expressionParser=e,this._interpolationConfig=t}return e.prototype.toI18nMessage=function(e,t,n,r,i){this._isIcu=1==e.length&&e[0]instanceof $s,this._icuDepth=0,this._placeholderRegistry=new Vl,this._placeholderToContent={},this._placeholderToMessage={},this._visitNodeFn=i;var o=Js(this,e,{});return new Pn(o,this._placeholderToContent,this._placeholderToMessage,t,n,r)},e.prototype._visitNode=function(e,t){return this._visitNodeFn&&this._visitNodeFn(e,t),t},e.prototype.visitElement=function(e,t){var n=Js(this,e.children),r={};e.attrs.forEach(function(e){r[e.name]=e.value});var i=C(e.name).isVoid,o=this._placeholderRegistry.getStartTagPlaceholderName(e.name,r,i);this._placeholderToContent[o]=e.sourceSpan.toString();var s="";i||(s=this._placeholderRegistry.getCloseTagPlaceholderName(e.name),this._placeholderToContent[s]="</"+e.name+">");var a=new Rn(e.name,r,o,s,n,i,e.sourceSpan);return this._visitNode(e,a)},e.prototype.visitAttribute=function(e,t){var n=this._visitTextWithInterpolation(e.value,e.sourceSpan);return this._visitNode(e,n)},e.prototype.visitText=function(e,t){var n=this._visitTextWithInterpolation(e.value,e.sourceSpan);return this._visitNode(e,n)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitExpansion=function(t,n){var r=this;this._icuDepth++;var i={},o=new On(t.switchValue,t.type,i,t.sourceSpan);if(t.cases.forEach(function(e){i[e.value]=new Mn(e.expression.map(function(e){return e.visit(r,{})}),e.expSourceSpan)}),this._icuDepth--,this._isIcu||this._icuDepth>0){var s=this._placeholderRegistry.getUniquePlaceholder("VAR_"+t.type);return o.expressionPlaceholder=s,this._placeholderToContent[s]=t.switchValue,this._visitNode(t,o)}var a=this._placeholderRegistry.getPlaceholderName("ICU",t.sourceSpan.toString()),u=new e(this._expressionParser,this._interpolationConfig);this._placeholderToMessage[a]=u.toI18nMessage([t],"","","");var l=new Ln(o,a,t.sourceSpan);return this._visitNode(t,l)},e.prototype.visitExpansionCase=function(e,t){throw new Error("Unreachable code")},e.prototype._visitTextWithInterpolation=function(e,t){var n=this._expressionParser.splitInterpolation(e,t.start.toString(),this._interpolationConfig);if(!n)return new In(e,t);for(var r=[],i=new Mn(r,t),o=this._interpolationConfig,s=o.start,a=o.end,u=0;u<n.strings.length-1;u++){var l=n.expressions[u],c=l.split(ql)[2]||"INTERPOLATION",p=this._placeholderRegistry.getPlaceholderName(c,l);n.strings[u].length&&r.push(new In(n.strings[u],t)),r.push(new Dn(l,p,t)),this._placeholderToContent[p]=s+l+a}var h=n.strings.length-1;return n.strings[h].length&&r.push(new In(n.strings[h],t)),i},e}(),ql=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g;
|
|
314
321
|
/**
|
|
315
322
|
* @license
|
|
316
323
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -318,35 +325,35 @@ var xo=function xo(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,t
|
|
|
318
325
|
* Use of this source code is governed by an MIT-style license that can be
|
|
319
326
|
* found in the LICENSE file at https://angular.io/license
|
|
320
327
|
*/
|
|
321
|
-
function Kl(e,t){e.i18n=t}var zl=function(){function e(e,t){void 0===e&&(e=fi),void 0===t&&(t=!1),this.interpolationConfig=e,this.keepI18nAttrs=t,this._createI18nMessage=Bl(e)}return e.prototype._generateI18nMessage=function(e,t,n){void 0===t&&(t="");var r="string"==typeof t?function i(e){var t,n,r,i,o;if(e){var s=e.indexOf("@@"),a=e.indexOf("|"),u=void 0;u=(t=h(s>-1?[e.slice(0,s),e.slice(s+2)]:[e,""],2))[0],r=t[1],i=(n=h(a>-1?[u.slice(0,a),u.slice(a+1)]:["",u],2))[0],o=n[1]}return{id:r,meaning:i,description:o}}(t):Ir(t),o=this._createI18nMessage(e,r.meaning||"",r.description||"",r.id||"",n);return o.id||(o.id="string"!=typeof t&&t.id||Hn(o)),o},e.prototype.visitElement=function(e,t){var n,r,i,o;if(function s(e){return e.attrs.some(function(e){return kr(e.name)})}(e)){var a=[],u={};try{for(var l=p(e.attrs),c=l.next();!c.done;c=l.next())if((v=c.value).name===Sr){var h=this._generateI18nMessage(e.children,e.i18n||v.value,Kl);h.nodes.length&&(e.i18n=h)}else v.name.startsWith(Cr)?u[v.name.slice(Cr.length)]=v.value:a.push(v)}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(Object.keys(u).length)try{for(var f=p(a),d=f.next();!d.done;d=f.next()){var v,m=u[(v=d.value).name];void 0!==m&&v.value&&(v.i18n=this._generateI18nMessage([v],v.i18n||m))}}catch(e){i={error:e}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}this.keepI18nAttrs||(e.attrs=a)}return Js(this,e.children),e},e.prototype.visitExpansion=function(e,t){var n,r=e.i18n;if(r instanceof Ln){var i=r.name;Mr(n=this._generateI18nMessage([e],r)).name=i}else n=this._generateI18nMessage([e],r);return e.i18n=n,e},e.prototype.visitText=function(e,t){return e},e.prototype.visitAttribute=function(e,t){return e},e.prototype.visitComment=function(e,t){return e},e.prototype.visitExpansionCase=function(e,t){return e},e}(),Wl=function(e){return"{$"+jr(e)+"}"},Ql=new(function(){function e(){}return e.prototype.visitText=function(e,t){return e.value},e.prototype.visitContainer=function(e,t){var n=this;return e.children.map(function(e){return e.visit(n)}).join("")},e.prototype.visitIcu=function(e,t){var n=this,r=Object.keys(e.cases).map(function(t){return t+" {"+e.cases[t].visit(n)+"}"});return"{"+e.expressionPlaceholder+", "+e.type+", "+r.join(" ")+"}"},e.prototype.visitTagPlaceholder=function(e,t){var n=this;return e.isVoid?Wl(e.startName):""+Wl(e.startName)+e.children.map(function(e){return e.visit(n)}).join("")+Wl(e.closeName)},e.prototype.visitPlaceholder=function(e,t){return Wl(e.name)},e.prototype.visitIcuPlaceholder=function(e,t){return Wl(e.name)},e}())
|
|
328
|
+
function Kl(e,t){e.i18n=t}var zl=function(){function e(e,t){void 0===e&&(e=fi),void 0===t&&(t=!1),this.interpolationConfig=e,this.keepI18nAttrs=t,this._createI18nMessage=Bl(e)}return e.prototype._generateI18nMessage=function(e,t,n){void 0===t&&(t="");var r="string"==typeof t?function i(e){var t,n,r,i,o;if(e){var s=e.indexOf("@@"),a=e.indexOf("|"),u=void 0;u=(t=h(s>-1?[e.slice(0,s),e.slice(s+2)]:[e,""],2))[0],r=t[1],i=(n=h(a>-1?[u.slice(0,a),u.slice(a+1)]:["",u],2))[0],o=n[1]}return{id:r,meaning:i,description:o}}(t):Ir(t),o=this._createI18nMessage(e,r.meaning||"",r.description||"",r.id||"",n);return o.id||(o.id="string"!=typeof t&&t.id||Hn(o)),o},e.prototype.visitElement=function(e,t){var n,r,i,o;if(function s(e){return e.attrs.some(function(e){return kr(e.name)})}(e)){var a=[],u={};try{for(var l=p(e.attrs),c=l.next();!c.done;c=l.next())if((v=c.value).name===Sr){var h=this._generateI18nMessage(e.children,e.i18n||v.value,Kl);h.nodes.length&&(e.i18n=h)}else v.name.startsWith(Cr)?u[v.name.slice(Cr.length)]=v.value:a.push(v)}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(Object.keys(u).length)try{for(var f=p(a),d=f.next();!d.done;d=f.next()){var v,m=u[(v=d.value).name];void 0!==m&&v.value&&(v.i18n=this._generateI18nMessage([v],v.i18n||m))}}catch(e){i={error:e}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}this.keepI18nAttrs||(e.attrs=a)}return Js(this,e.children),e},e.prototype.visitExpansion=function(e,t){var n,r=e.i18n;if(r instanceof Ln){var i=r.name;Mr(n=this._generateI18nMessage([e],r)).name=i}else n=this._generateI18nMessage([e],r);return e.i18n=n,e},e.prototype.visitText=function(e,t){return e},e.prototype.visitAttribute=function(e,t){return e},e.prototype.visitComment=function(e,t){return e},e.prototype.visitExpansionCase=function(e,t){return e},e}(),Wl=function(e){return"{$"+jr(e)+"}"},Ql=new(function(){function e(){}return e.prototype.visitText=function(e,t){return e.value},e.prototype.visitContainer=function(e,t){var n=this;return e.children.map(function(e){return e.visit(n)}).join("")},e.prototype.visitIcu=function(e,t){var n=this,r=Object.keys(e.cases).map(function(t){return t+" {"+e.cases[t].visit(n)+"}"});return"{"+e.expressionPlaceholder+", "+e.type+", "+r.join(" ")+"}"},e.prototype.visitTagPlaceholder=function(e,t){var n=this;return e.isVoid?Wl(e.startName):""+Wl(e.startName)+e.children.map(function(e){return e.visit(n)}).join("")+Wl(e.closeName)},e.prototype.visitPlaceholder=function(e,t){return Wl(e.name)},e.prototype.visitIcuPlaceholder=function(e,t){return Wl(e.name)},e}()),$l=new Map([["window",yn.resolveWindow],["document",yn.resolveDocument],["body",yn.resolveBody]]),Gl=[" ","\n","\r","\t"];
|
|
322
329
|
/**
|
|
323
330
|
* @license
|
|
324
331
|
* Copyright Google Inc. All Rights Reserved.
|
|
325
332
|
*
|
|
326
333
|
* Use of this source code is governed by an MIT-style license that can be
|
|
327
334
|
* found in the LICENSE file at https://angular.io/license
|
|
328
|
-
*/function Xl(e,t){return mt(ct(qr).bitwiseAnd(yt(e),null,!1),t)}function Yl(e,t,n
|
|
335
|
+
*/function Xl(e,t){return mt(ct(qr).bitwiseAnd(yt(e),null,!1),t)}function Yl(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=e.type,i=e.name,o=e.target,s=e.phase,a=e.handler;if(o&&!$l.has(o))throw new Error("Unexpected global target '"+o+"' defined for '"+i+"' event.\n Supported list of global targets: "+Array.from($l.keys())+".");var u=null===n||0===n.bindingLevel?ct(Ur):n.getOrCreateSharedContextVar(0),l=function c(e,t,n,r,i,o){e||(e=new ys);var s=function a(e,t){return function n(e,t){var n=new vs(e);return t.visit(n)}(e,t)}({createLiteralArrayConverter:function(e){return function(e){return ft(e)}},createLiteralMapConverter:function(e){return function(t){return dt(e.map(function(e,n){return{key:e.key,value:t[n],quoted:e.quoted}}))}},createPipeConverter:function(e){throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: "+e)}},n),u=new ms(e,t,r,i,o),l=[];!function e(t,n){Array.isArray(t)?t.forEach(function(t){return e(t,n)}):n.push(t)}(s.visit(u,ns.Statement),l),function c(e,t,n){for(var r=e-1;r>=0;r--)n.unshift(hs(t,r))}(u.temporaryCount,r,l),u.usesImplicitReceiver&&e.notifyImplicitReceiverUse();var p=l.length-1,h=null;if(p>=0){var f=function d(e){return e instanceof Ze?e.expr:e instanceof Je?e.value:null}(l[p]);f&&(h=function v(e){return ct("pd_"+e)}(r),l[p]=h.set(f.cast(he).notIdentical(yt(!1))).toDeclStmt(null,[ke.Final]))}return new as(l,h)}(n,u,a,"b",function(){return Nt("Unexpected interpolation")},e.handlerSpan),p=[];n&&(p.push.apply(p,f(n.restoreViewStatement())),p.push.apply(p,f(n.variableDeclarations()))),p.push.apply(p,f(l.render3Stmts));var h=1===r?function d(e,t){return""+si+e+"."+t}(i,s):i,v=t&&en(t),m=vt([new je("$event",he)],p,fe,null,v),y=[yt(h),m];return o&&y.push(yt(!1),pt($l.get(o))),y}var Zl=function(){function e(e,t,n,r,i,o,s,a,u,l,c,p,h,f){var d=this;void 0===n&&(n=0),this.constantPool=e,this.level=n,this.contextName=r,this.i18nContext=i,this.templateIndex=o,this.templateName=s,this.directiveMatcher=a,this.directives=u,this.pipeTypeByName=l,this.pipes=c,this._namespace=p,this.relativeContextFilePath=h,this.i18nUseExternalIds=f,this._dataIndex=0,this._bindingContext=0,this._prefixCode=[],this._creationCodeFns=[],this._updateCodeFns=[],this._lastNodeIndexWithFlush=-1,this._tempVariables=[],this._nestedTemplateFns=[],this._unsupported=zr,this.i18n=null,this._pureFunctionSlots=0,this._bindingSlots=0,this._ngContentReservedSlots=[],this._ngContentSelectorsOffset=0,this._implicitReceiverExpr=null,this.visitReference=Wr,this.visitVariable=Wr,this.visitTextAttribute=Wr,this.visitBoundAttribute=Wr,this.visitBoundEvent=Wr,this._bindingScope=t.nestedScope(n),this.fileBasedI18nSuffix=h.replace(/[^A-Za-z0-9]/g,"_")+"_",this._valueConverter=new Jl(e,function(){return d.allocateDataSlot()},function(e){return d.allocatePureFunctionSlots(e)},function(e,t,n,r){var i=l.get(e);i&&d.pipes.add(i),d._bindingScope.set(d.level,t,r),d.creationInstruction(null,yn.pipe,[yt(n),yt(e)])})}return e.prototype.registerContextVariables=function(e){var t=this._bindingScope.freshReferenceName(),n=this.level,r=ct(e.name+t);this._bindingScope.set(n,e.name,r,1,function(t,i){var o;return o=t.bindingLevel===n?ct(Ur):t.getSharedContextName(n)||rc(i),[r.set(o.prop(e.value||"$implicit")).toConstDecl()]})},e.prototype.buildTemplateFunction=function(e,t,n,r){var i=this;void 0===n&&(n=0),this._ngContentSelectorsOffset=n,this._namespace!==yn.namespaceHTML&&this.creationInstruction(null,this._namespace),t.forEach(function(e){return i.registerContextVariables(e)});var o=this.i18nContext||Ar(r)&&!Pr(r)&&!(function s(e){return 1===e.length&&e[0]instanceof En}(e)&&e[0].i18n===r),a=hc(e);if(o&&this.i18nStart(null,r,a),An(this,e),this._pureFunctionSlots+=this._bindingSlots,this._valueConverter.updatePipeSlotOffsets(this._bindingSlots),this._nestedTemplateFns.forEach(function(e){return e()}),0===this.level&&this._ngContentReservedSlots.length){var u=[];if(this._ngContentReservedSlots.length>1||"*"!==this._ngContentReservedSlots[0]){var l=this._ngContentReservedSlots.map(function(e){return"*"!==e?oe(e):e});u.push(this.constantPool.getConstLiteral(Qr(l),!0))}this.creationInstruction(null,yn.projectionDef,u,!0)}o&&this.i18nEnd(null,a);var c=this._creationCodeFns.map(function(e){return e()}),p=this._updateCodeFns.map(function(e){return e()}),h=this._bindingScope.viewSnapshotStatements(),d=this._bindingScope.variableDeclarations().concat(this._tempVariables),v=c.length>0?[Xl(1,h.concat(c))]:[],m=p.length>0?[Xl(2,d.concat(p))]:[];return vt([new je(qr,ve),new je(Ur,null)],f(this._prefixCode,v,m),fe,null,this.templateName)},e.prototype.getLocal=function(e){return this._bindingScope.get(e)},e.prototype.notifyImplicitReceiverUse=function(){this._bindingScope.notifyImplicitReceiverUse()},e.prototype.i18nTranslate=function(e,t,n,r){var i;void 0===t&&(t={});var o=n||ct(this.constantPool.uniqueName("I18N_")),s=this.i18nGenerateClosureVar(e.id),a={};t&&Object.keys(t).length&&Object.keys(t).forEach(function(e){return a[jr(e)]=t[e]});var u=Ir(e),l=function p(e,t,n,r,i,o){void 0===i&&(i={});var s=[];return s.push.apply(s,f(Nr(e,t,n,r,i))),o&&s.push(new Ze(e.set(o(e)))),s}(o,s,function c(e){return e.nodes.map(function(e){return e.visit(Ql,null)}).join("")}
|
|
329
336
|
/**
|
|
330
337
|
* @license
|
|
331
338
|
* Copyright Google Inc. All Rights Reserved.
|
|
332
339
|
*
|
|
333
340
|
* Use of this source code is governed by an MIT-style license that can be
|
|
334
341
|
* found in the LICENSE file at https://angular.io/license
|
|
335
|
-
*/(e),u,a,r);return(i=this.constantPool.statements).push.apply(i,f(l)),o},e.prototype.i18nAppendBindings=function(e){var t=this;e.length>0&&e.forEach(function(e){return t.i18n.appendBinding(e)})},e.prototype.i18nBindProps=function(e){var t=this,n={};return Object.keys(e).forEach(function(r){var i=e[r];if(i instanceof gn)n[r]=yt(i.value);else{var o=i.value.visit(t._valueConverter);if(t.allocateBindingSlots(o),o instanceof Vo){var s=o.expressions,a=t.i18n,u=function l(e,t,n){if(void 0===t&&(t=0),void 0===n&&(n=0),!e.length)return"";for(var r="",i=e.length-1,o=0;o<i;o++)r+=""+e[o]+Or(t+o,n);return r+e[i]}(o.strings,a.bindings.size,a.id);t.i18nAppendBindings(s),n[r]=yt(u)}}}),n},e.prototype.i18nGenerateClosureVar=function(e){var t,n=this.fileBasedI18nSuffix.toUpperCase();if(this.i18nUseExternalIds){var r=Vr("EXTERNAL_"),i=this.constantPool.uniqueName(n);t=""+r+en(e)+"$$"+i}else r=Vr(n),t=this.constantPool.uniqueName(r);return ct(t)},e.prototype.i18nUpdateRef=function(e){var t=e.icus,n=e.meta;if(e.isRoot&&e.isResolved&&!e.isEmitted&&!Pr(n)){e.isEmitted=!0;var r=e.getSerializedPlaceholders(),i={},o=r.size?Dr(r):{};t.size&&t.forEach(function(e,t){if(1===e.length)o[t]=e[0];else{var n=Or("I18N_EXP_"+t);o[t]=yt(n),i[t]=ft(e)}});var s=void 0;(Array.from(r.values()).some(function(e){return e.length>1})||Object.keys(i).length)&&(s=function(e){var t=[e];return Object.keys(i).length&&t.push(br(i,!0)),nc(null,yn.i18nPostprocess,t)}),this.i18nTranslate(n,o,e.ref,s)}},e.prototype.i18nStart=function(e,t,n){void 0===e&&(e=null);var r=this.allocateDataSlot();if(this.i18nContext)this.i18n=this.i18nContext.forkChildContext(r,this.templateIndex,t);else{var i=ct(this.constantPool.uniqueName("I18N_"));this.i18n=new Ol(r,i,0,this.templateIndex,t)}var o=this.i18n,s=o.id,a=o.ref,u=[yt(r),a];s>0&&u.push(yt(s)),this.creationInstruction(e,n?yn.i18n:yn.i18nStart,u)},e.prototype.i18nEnd=function(e,t){var n=this;if(void 0===e&&(e=null),!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);var r=this.i18n,i=r.index,o=r.bindings;o.size&&(o.forEach(function(t){n.updateInstruction(i,e,yn.i18nExp,function(){return[n.convertPropertyBinding(ct(Ur),t)]})}),this.updateInstruction(i,e,yn.i18nApply,[yt(i)])),t||this.creationInstruction(e,yn.i18nEnd),this.i18n=null},e.prototype.visitContent=function(e){this._hasNgContent=!0;var t=this.allocateDataSlot(),n="*"===e.selector?0:this._ngContentSelectors.push(e.selector)+this._ngContentSelectorsOffset,r=[yt(t)],i=[];e.attributes.forEach(function(e){var t=e.name,n=e.value;"ngProjectAs"===t?i.push.apply(i,f(ac(e))):"select"!==t.toLowerCase()&&i.push(yt(t),yt(n))}),i.length>0?r.push(yt(n),ft(i)):0!==n&&r.push(yt(n)),this.creationInstruction(e.sourceSpan,yn.projection,r)},e.prototype.getNamespaceInstruction=function(e){switch(e){case"math":return yn.namespaceMathML;case"svg":return yn.namespaceSVG;default:return yn.namespaceHTML}},e.prototype.addNamespaceInstruction=function(e,t){this._namespace=e,this.creationInstruction(t.sourceSpan,e)},e.prototype.visitElement=function(e){var t,n,r=this,i=this.allocateDataSlot(),o=new Gu(yt(i),null),s=!1,a=Ar(e.i18n)&&!Pr(e.i18n);if(a&&this.i18n)throw new Error("Could not mark an element as translatable inside of a translatable section");var u=[],l=[],c=h(d(e.name),2),m=c[0],y=c[1],g=v(e.name);try{for(var _=p(e.attributes),b=_.next();!b.done;b=_.next()){var w=b.value,x=w.name,E=w.value;"ngNonBindable"===x?s=!0:"style"===x?o.registerStyleAttr(E):"class"===x?o.registerClassAttr(E):(w.i18n&&u.push(w),l.push(w))}}catch(e){t={error:e}}finally{try{b&&!b.done&&(n=_.return)&&n.call(_)}finally{if(t)throw t.error}}this.matchDirectives(e.name,e);var S=[yt(i)];g||S.push(yt(y));var C=[],T=[];e.inputs.forEach(function(e){o.registerBoundInput(e)||(0===e.type&&e.i18n&&u.push(e),T.push(e))}),l.forEach(function(e){C.push.apply(C,"ngProjectAs"===e.name?f(ac(e)):f(oc(e.name),[yt(e.value)]))}),C.push.apply(C,f(this.prepareNonRenderAttrs(T,e.outputs,o))),S.push(this.toAttrsParam(C)),S.push(this.prepareRefsParameter(e.references));var N=this._namespace,k=this.getNamespaceInstruction(m);k!==N&&this.addNamespaceInstruction(k,e);var A=ct(Ur);this.i18n&&this.i18n.appendElement(e.i18n,i);var P=!o.hasBindings&&!g&&0===e.outputs.length&&0===u.length&&!(!a&&r.i18n?!hc(e.children):e.children.length>0),I=!P&&!o.hasBindings&&hc(e.children);if(P)this.creationInstruction(e.sourceSpan,yn.element,$r(S));else{if(this.creationInstruction(e.sourceSpan,g?yn.elementContainerStart:yn.elementStart,$r(S)),s&&this.creationInstruction(e.sourceSpan,yn.disableBindings),u.length){var M=!1,O=[];if(u.forEach(function(t){var n=t.i18n;if(t instanceof bn)O.push(yt(t.name),r.i18nTranslate(n));else{var o=t.value.visit(r._valueConverter);if(r.allocateBindingSlots(o),o instanceof Vo){var s=Dr(Fr(n));O.push(yt(t.name),r.i18nTranslate(n,s)),o.expressions.forEach(function(t){M=!0;var n=r.convertExpressionBinding(A,t);r.updateInstruction(i,e.sourceSpan,yn.i18nExp,[n])})}}}),O.length){var R=yt(this.allocateDataSlot()),D=this.constantPool.getConstLiteral(ft(O),!0);this.creationInstruction(e.sourceSpan,yn.i18nAttributes,[R,D]),M&&this.updateInstruction(i,e.sourceSpan,yn.i18nApply,[R])}}this.processStylingInstruction(A,o.buildElementStylingInstruction(e.sourceSpan,this.constantPool),!0),e.outputs.forEach(function(t){r.creationInstruction(t.sourceSpan,yn.listener,r.prepareListenerParameter(e.name,t,i))}),a&&this.i18nStart(e.sourceSpan,e.i18n,I)}o.buildUpdateLevelInstructions(this._valueConverter).forEach(function(e){r._bindingSlots+=e.allocateBindingSlots,r.processStylingInstruction(A,e,!1)});var L=yt(void 0);if(T.forEach(function(e){var t=e.type;if(4===t){var n=e.value.visit(r._valueConverter),o=!(n instanceof Lo&&!n.value);r.allocateBindingSlots(n);var s=ai(e.name);r.updateInstruction(i,e.sourceSpan,yn.property,function(){return[yt(s),o?r.convertPropertyBinding(A,n,!0):L]})}else{if(e.i18n)return;var a=e.value.visit(r._valueConverter);if(void 0!==a){var u=[],l=h(d(e.name),2),c=l[0],p=l[1],v=cc(e.securityContext,1===t);if(v&&u.push(v),c){var m=yt(c);v?u.push(m):u.push(yt(null),m)}r.allocateBindingSlots(a),0===t?a instanceof Vo?r.updateInstruction(i,e.sourceSpan,function y(e){switch(function t(e){var t=e.expressions,n=e.strings;return 1===t.length&&2===n.length&&""===n[0]&&""===n[1]?1:t.length+n.length}(e)){case 1:return yn.propertyInterpolate;case 3:return yn.propertyInterpolate1;case 5:return yn.propertyInterpolate2;case 7:return yn.propertyInterpolate3;case 9:return yn.propertyInterpolate4;case 11:return yn.propertyInterpolate5;case 13:return yn.propertyInterpolate6;case 15:return yn.propertyInterpolate7;case 17:return yn.propertyInterpolate8;default:return yn.propertyInterpolateV}}(a),function(){return f([yt(p)],r.getUpdateInstructionArguments(ct(Ur),a),u)}):r.updateInstruction(i,e.sourceSpan,yn.property,function(){return f([yt(p),r.convertPropertyBinding(A,a,!0)],u)}):r.updateInstruction(i,e.sourceSpan,2===t?yn.elementClassProp:yn.elementAttribute,function(){return f([yt(i),yt(p),r.convertPropertyBinding(A,a)],u)})}}}),An(this,e.children),!a&&this.i18n&&this.i18n.appendElement(e.i18n,i,!0),!P){var F=e.endSourceSpan||e.sourceSpan;a&&this.i18nEnd(F,I),s&&this.creationInstruction(F,yn.enableBindings),this.creationInstruction(F,g?yn.elementContainerEnd:yn.elementEnd)}},e.prototype.visitTemplate=function(t){var n=this,r=this.allocateDataSlot();this.i18n&&this.i18n.appendTemplate(t.i18n,r);var i=en(t.tagName||""),o=this.contextName+(i?"_"+i:"")+"_"+r,s=o+"_Template",a=[yt(r),ct(s),yt(t.tagName?d(t.tagName)[1]:t.tagName)];this.matchDirectives("ng-template",t);var u=[];t.attributes.forEach(function(e){u.push(Qr(e.name),Qr(e.value))}),u.push.apply(u,f(this.prepareNonRenderAttrs(t.inputs,t.outputs,void 0,t.templateAttrs))),a.push(this.toAttrsParam(u)),t.references&&t.references.length&&(a.push(this.prepareRefsParameter(t.references)),a.push(pt(yn.templateRefExtractor)));var l=new e(this.constantPool,this._bindingScope,this.level+1,o,this.i18n,r,s,this.directiveMatcher,this.directives,this.pipeTypeByName,this.pipes,this._namespace,this.fileBasedI18nSuffix,this.i18nUseExternalIds);this._nestedTemplateFns.push(function(){var e,r=l.buildTemplateFunction(t.children,t.variables,n._ngContentSelectors.length+n._ngContentSelectorsOffset,t.i18n);n.constantPool.statements.push(r.toDeclStmt(s,null)),l._hasNgContent&&(n._hasNgContent=!0,(e=n._ngContentSelectors).push.apply(e,f(l._ngContentSelectors)))}),this.creationInstruction(t.sourceSpan,yn.templateCreate,function(){return a.splice(2,0,yt(l.getConstCount()),yt(l.getVarCount())),$r(a)});var c=ct(Ur);this.templatePropertyBindings(t,r,c,t.templateAttrs),"ng-template"===t.tagName&&(this.templatePropertyBindings(t,r,c,t.inputs),t.outputs.forEach(function(e){n.creationInstruction(e.sourceSpan,yn.listener,n.prepareListenerParameter("ng_template",e,r))}))},e.prototype.visitBoundText=function(e){var t=this;if(this.i18n){var n=e.value.visit(this._valueConverter);return this.allocateBindingSlots(n),void(n instanceof Vo&&(this.i18n.appendBoundText(e.i18n),this.i18nAppendBindings(n.expressions)))}var r=this.allocateDataSlot();this.creationInstruction(e.sourceSpan,yn.text,[yt(r)]);var i=e.value.visit(this._valueConverter);this.allocateBindingSlots(i),this.updateInstruction(r,e.sourceSpan,yn.textBinding,function(){return[yt(r),t.convertPropertyBinding(ct(Ur),i)]})},e.prototype.visitText=function(e){this.i18n||this.creationInstruction(e.sourceSpan,yn.text,[yt(this.allocateDataSlot()),yt(e.value)])},e.prototype.visitIcu=function(e){var t=!1;this.i18n||(t=!0,this.i18nStart(null,e.i18n,!0));var n=this.i18n,r=this.i18nBindProps(e.vars),i=this.i18nBindProps(e.placeholders),o=e.i18n,s=function(e){return nc(null,yn.i18nPostprocess,[e,br(r,!0)])};if(Pr(n.meta))this.i18nTranslate(o,i,n.ref,s);else{var a=this.i18nTranslate(o,i,void 0,s);n.appendIcu(Mr(o).name,a)}return t&&this.i18nEnd(null,!0),null},e.prototype.allocateDataSlot=function(){return this._dataIndex++},e.prototype.getConstCount=function(){return this._dataIndex},e.prototype.getVarCount=function(){return this._pureFunctionSlots},e.prototype.getNgContentSelectors=function(){return this._hasNgContent?this.constantPool.getConstLiteral(Qr(this._ngContentSelectors),!0):null},e.prototype.bindingContext=function(){return""+this._bindingContext++},e.prototype.templatePropertyBindings=function(e,t,n,r){var i=this;r.forEach(function(r){if(r instanceof wn){var o=r.value.visit(i._valueConverter);i.allocateBindingSlots(o),i.updateInstruction(t,e.sourceSpan,yn.property,function(){return[yt(r.name),i.convertPropertyBinding(n,o,!0)]})}})},e.prototype.instructionFn=function(e,t,n,r,i){void 0===i&&(i=!1),e[i?"unshift":"push"](function(){var e=Array.isArray(r)?r:r();return nc(t,n,e).toStmt()})},e.prototype.processStylingInstruction=function(e,t,n){var r=this;if(t){var i=function(){return t.buildParams(function(t){return r.convertPropertyBinding(e,t,!0)})};n?this.creationInstruction(t.sourceSpan,t.reference,i):this.updateInstruction(-1,t.sourceSpan,t.reference,i)}},e.prototype.creationInstruction=function(e,t,n,r){this.instructionFn(this._creationCodeFns,e,t,n||[],r)},e.prototype.updateInstruction=function(e,t,n,r){this._lastNodeIndexWithFlush<e&&(this.instructionFn(this._updateCodeFns,t,yn.select,[yt(e)]),this._lastNodeIndexWithFlush=e),this.instructionFn(this._updateCodeFns,t,n,r||[])},e.prototype.allocatePureFunctionSlots=function(e){var t=this._pureFunctionSlots;return this._pureFunctionSlots+=e,t},e.prototype.allocateBindingSlots=function(e){this._bindingSlots+=e instanceof Vo?e.expressions.length:1},e.prototype.convertExpressionBinding=function(e,t){var n=ls(this,e,t,this.bindingContext(),ts.TrySimple).currValExpr;return pt(yn.bind).callFn([n])},e.prototype.convertPropertyBinding=function(e,t,n){var r,i=t instanceof Vo?uc:function(){return Nt("Unexpected interpolation")},o=ls(this,e,t,this.bindingContext(),ts.TrySimple,i);(r=this._tempVariables).push.apply(r,f(o.stmts));var s=o.currValExpr;return t instanceof Vo||n?s:pt(yn.bind).callFn([s])},e.prototype.getUpdateInstructionArguments=function(e,t){var n,r=function i(e,t,n,r){var i=new ms(e,t,r,void 0),o=n.visit(i,ns.Expression),s=cs(i,r),a=o.args.slice(1);if(n instanceof Vo){var u=n.strings;3===a.length&&""===u[0]&&""===u[1]?a=[a[1]]:a.length>=19&&(a=[ft(a)])}return{stmts:s,args:a}}(this,e,t,this.bindingContext()),o=r.args;return(n=this._tempVariables).push.apply(n,f(r.stmts)),o},e.prototype.matchDirectives=function(e,t){var n=this;if(this.directiveMatcher){var r=function o(e,t){var n=new A;return n.setElement(e),Object.getOwnPropertyNames(t).forEach(function(e){var r=t[e];n.addAttribute(e,r),"class"===e.toLowerCase()&&r.trim().split(/\s+/).forEach(function(e){return n.addClassName(e)})}),n}(e,function i(e){var t={};return e instanceof Sn&&"ng-template"!==e.tagName?e.templateAttrs.forEach(function(e){return t[e.name]=""}):(e.attributes.forEach(function(e){kr(e.name)||(t[e.name]=e.value)}),e.inputs.forEach(function(e){t[e.name]=""}),e.outputs.forEach(function(e){t[e.name]=""})),t}
|
|
342
|
+
*/(e),u,a,r);return(i=this.constantPool.statements).push.apply(i,f(l)),o},e.prototype.i18nAppendBindings=function(e){var t=this;e.length>0&&e.forEach(function(e){return t.i18n.appendBinding(e)})},e.prototype.i18nBindProps=function(e){var t=this,n={};return Object.keys(e).forEach(function(r){var i=e[r];if(i instanceof gn)n[r]=yt(i.value);else{var o=i.value.visit(t._valueConverter);if(t.allocateBindingSlots(o),o instanceof Vo){var s=o.expressions,a=t.i18n,u=function l(e,t,n){if(void 0===t&&(t=0),void 0===n&&(n=0),!e.length)return"";for(var r="",i=e.length-1,o=0;o<i;o++)r+=""+e[o]+Or(t+o,n);return r+e[i]}(o.strings,a.bindings.size,a.id);t.i18nAppendBindings(s),n[r]=yt(u)}}}),n},e.prototype.i18nGenerateClosureVar=function(e){var t,n=this.fileBasedI18nSuffix.toUpperCase();if(this.i18nUseExternalIds){var r=Vr("EXTERNAL_"),i=this.constantPool.uniqueName(n);t=""+r+en(e)+"$$"+i}else r=Vr(n),t=this.constantPool.uniqueName(r);return ct(t)},e.prototype.i18nUpdateRef=function(e){var t=e.icus,n=e.meta;if(e.isRoot&&e.isResolved&&!e.isEmitted&&!Pr(n)){e.isEmitted=!0;var r=e.getSerializedPlaceholders(),i={},o=r.size?Dr(r):{};t.size&&t.forEach(function(e,t){if(1===e.length)o[t]=e[0];else{var n=Or("I18N_EXP_"+t);o[t]=yt(n),i[t]=ft(e)}});var s=void 0;(Array.from(r.values()).some(function(e){return e.length>1})||Object.keys(i).length)&&(s=function(e){var t=[e];return Object.keys(i).length&&t.push(br(i,!0)),nc(null,yn.i18nPostprocess,t)}),this.i18nTranslate(n,o,e.ref,s)}},e.prototype.i18nStart=function(e,t,n){void 0===e&&(e=null);var r=this.allocateDataSlot();if(this.i18nContext)this.i18n=this.i18nContext.forkChildContext(r,this.templateIndex,t);else{var i=ct(this.constantPool.uniqueName("I18N_"));this.i18n=new Ol(r,i,0,this.templateIndex,t)}var o=this.i18n,s=o.id,a=o.ref,u=[yt(r),a];s>0&&u.push(yt(s)),this.creationInstruction(e,n?yn.i18n:yn.i18nStart,u)},e.prototype.i18nEnd=function(e,t){var n=this;if(void 0===e&&(e=null),!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);var r=this.i18n,i=r.index,o=r.bindings;o.size&&(o.forEach(function(t){n.updateInstruction(i,e,yn.i18nExp,function(){return[n.convertPropertyBinding(t)]})}),this.updateInstruction(i,e,yn.i18nApply,[yt(i)])),t||this.creationInstruction(e,yn.i18nEnd),this.i18n=null},e.prototype.visitContent=function(e){var t=this.allocateDataSlot(),n=this._ngContentSelectorsOffset+this._ngContentReservedSlots.length,r=[yt(t)],i=[];this._ngContentReservedSlots.push(e.selector),e.attributes.forEach(function(e){var t=e.name,n=e.value;"ngProjectAs"===t?i.push.apply(i,f(ac(e))):"select"!==t.toLowerCase()&&i.push(yt(t),yt(n))}),i.length>0?r.push(yt(n),ft(i)):0!==n&&r.push(yt(n)),this.creationInstruction(e.sourceSpan,yn.projection,r)},e.prototype.getNamespaceInstruction=function(e){switch(e){case"math":return yn.namespaceMathML;case"svg":return yn.namespaceSVG;default:return yn.namespaceHTML}},e.prototype.addNamespaceInstruction=function(e,t){this._namespace=e,this.creationInstruction(t.sourceSpan,e)},e.prototype.visitElement=function(e){var t,n,r=this,i=this.allocateDataSlot(),o=new $u(yt(i),null),s=!1,a=Ar(e.i18n)&&!Pr(e.i18n);if(a&&this.i18n)throw new Error("Could not mark an element as translatable inside of a translatable section");var u=[],l=[],c=h(d(e.name),2),m=c[0],y=c[1],g=v(e.name);try{for(var _=p(e.attributes),b=_.next();!b.done;b=_.next()){var w=b.value,x=w.name,E=w.value;"ngNonBindable"===x?s=!0:"style"===x?o.registerStyleAttr(E):"class"===x?o.registerClassAttr(E):(w.i18n&&u.push(w),l.push(w))}}catch(e){t={error:e}}finally{try{b&&!b.done&&(n=_.return)&&n.call(_)}finally{if(t)throw t.error}}this.matchDirectives(e.name,e);var S=[yt(i)];g||S.push(yt(y));var C=[],T=[];e.inputs.forEach(function(e){o.registerBoundInput(e)||(0===e.type&&e.i18n&&u.push(e),T.push(e))}),l.forEach(function(e){C.push.apply(C,"ngProjectAs"===e.name?f(ac(e)):f(oc(e.name),[yt(e.value)]))}),C.push.apply(C,f(this.prepareNonRenderAttrs(T,e.outputs,o))),S.push(this.toAttrsParam(C)),S.push(this.prepareRefsParameter(e.references));var N=this._namespace,k=this.getNamespaceInstruction(m);k!==N&&this.addNamespaceInstruction(k,e),this.i18n&&this.i18n.appendElement(e.i18n,i);var A=!o.hasBindings&&!g&&0===e.outputs.length&&0===u.length&&!(!a&&r.i18n?!hc(e.children):e.children.length>0),P=!A&&!o.hasBindings&&hc(e.children);if(A)this.creationInstruction(e.sourceSpan,yn.element,Gr(S));else{if(this.creationInstruction(e.sourceSpan,g?yn.elementContainerStart:yn.elementStart,Gr(S)),s&&this.creationInstruction(e.sourceSpan,yn.disableBindings),u.length){var I=!1,M=[];if(u.forEach(function(t){var n=t.i18n;if(t instanceof bn)M.push(yt(t.name),r.i18nTranslate(n));else{var o=t.value.visit(r._valueConverter);if(r.allocateBindingSlots(o),o instanceof Vo){var s=Dr(Fr(n));M.push(yt(t.name),r.i18nTranslate(n,s)),o.expressions.forEach(function(t){I=!0;var n=r.convertExpressionBinding(t);r.updateInstruction(i,e.sourceSpan,yn.i18nExp,[n])})}}}),M.length){var O=yt(this.allocateDataSlot()),R=this.constantPool.getConstLiteral(ft(M),!0);this.creationInstruction(e.sourceSpan,yn.i18nAttributes,[O,R]),I&&this.updateInstruction(i,e.sourceSpan,yn.i18nApply,[O])}}this.processStylingInstruction(o.buildElementStylingInstruction(e.sourceSpan,this.constantPool),!0),e.outputs.forEach(function(t){r.creationInstruction(t.sourceSpan,yn.listener,r.prepareListenerParameter(e.name,t,i))}),a&&this.i18nStart(e.sourceSpan,e.i18n,P)}o.buildUpdateLevelInstructions(this._valueConverter).forEach(function(e){r._bindingSlots+=e.allocateBindingSlots,r.processStylingInstruction(e,!1)});var D=yt(void 0);if(T.forEach(function(e){var t=e.type;if(4===t){var n=e.value.visit(r._valueConverter),o=!(n instanceof Lo&&!n.value);r.allocateBindingSlots(n);var s=ai(e.name);r.updateInstruction(i,e.sourceSpan,yn.property,function(){return[yt(s),o?r.convertPropertyBinding(n,!0):D]})}else{if(e.i18n)return;var a=e.value.visit(r._valueConverter);if(void 0!==a){var u=[],l=h(d(e.name),2),c=l[0],p=l[1],v=cc(e.securityContext,1===t);if(v&&u.push(v),c){var m=yt(c);v?u.push(m):u.push(yt(null),m)}r.allocateBindingSlots(a),0===t?a instanceof Vo?r.updateInstruction(i,e.sourceSpan,function y(e){switch(function t(e){var t=e.expressions,n=e.strings;return 1===t.length&&2===n.length&&""===n[0]&&""===n[1]?1:t.length+n.length}(e)){case 1:return yn.propertyInterpolate;case 3:return yn.propertyInterpolate1;case 5:return yn.propertyInterpolate2;case 7:return yn.propertyInterpolate3;case 9:return yn.propertyInterpolate4;case 11:return yn.propertyInterpolate5;case 13:return yn.propertyInterpolate6;case 15:return yn.propertyInterpolate7;case 17:return yn.propertyInterpolate8;default:return yn.propertyInterpolateV}}(a),function(){return f([yt(p)],r.getUpdateInstructionArguments(a),u)}):r.updateInstruction(i,e.sourceSpan,yn.property,function(){return f([yt(p),r.convertPropertyBinding(a,!0)],u)}):r.updateInstruction(i,e.sourceSpan,2===t?yn.elementClassProp:yn.elementAttribute,function(){return f([yt(i),yt(p),r.convertPropertyBinding(a)],u)})}}}),An(this,e.children),!a&&this.i18n&&this.i18n.appendElement(e.i18n,i,!0),!A){var L=e.endSourceSpan||e.sourceSpan;a&&this.i18nEnd(L,P),s&&this.creationInstruction(L,yn.enableBindings),this.creationInstruction(L,g?yn.elementContainerEnd:yn.elementEnd)}},e.prototype.visitTemplate=function(t){var n=this,r=this.allocateDataSlot();this.i18n&&this.i18n.appendTemplate(t.i18n,r);var i=en(t.tagName||""),o=this.contextName+(i?"_"+i:"")+"_"+r,s=o+"_Template",a=[yt(r),ct(s),yt(t.tagName?d(t.tagName)[1]:t.tagName)];this.matchDirectives("ng-template",t);var u=[];t.attributes.forEach(function(e){u.push(Qr(e.name),Qr(e.value))}),u.push.apply(u,f(this.prepareNonRenderAttrs(t.inputs,t.outputs,void 0,t.templateAttrs))),a.push(this.toAttrsParam(u)),t.references&&t.references.length&&(a.push(this.prepareRefsParameter(t.references)),a.push(pt(yn.templateRefExtractor)));var l=new e(this.constantPool,this._bindingScope,this.level+1,o,this.i18n,r,s,this.directiveMatcher,this.directives,this.pipeTypeByName,this.pipes,this._namespace,this.fileBasedI18nSuffix,this.i18nUseExternalIds);this._nestedTemplateFns.push(function(){var e,r=l.buildTemplateFunction(t.children,t.variables,n._ngContentReservedSlots.length+n._ngContentSelectorsOffset,t.i18n);n.constantPool.statements.push(r.toDeclStmt(s,null)),l._ngContentReservedSlots.length&&(e=n._ngContentReservedSlots).push.apply(e,f(l._ngContentReservedSlots))}),this.creationInstruction(t.sourceSpan,yn.templateCreate,function(){return a.splice(2,0,yt(l.getConstCount()),yt(l.getVarCount())),Gr(a)}),this.templatePropertyBindings(t,r,t.templateAttrs),"ng-template"===t.tagName&&(this.templatePropertyBindings(t,r,t.inputs),t.outputs.forEach(function(e){n.creationInstruction(e.sourceSpan,yn.listener,n.prepareListenerParameter("ng_template",e,r))}))},e.prototype.visitBoundText=function(e){var t=this;if(this.i18n){var n=e.value.visit(this._valueConverter);return this.allocateBindingSlots(n),void(n instanceof Vo&&(this.i18n.appendBoundText(e.i18n),this.i18nAppendBindings(n.expressions)))}var r=this.allocateDataSlot();this.creationInstruction(e.sourceSpan,yn.text,[yt(r)]);var i=e.value.visit(this._valueConverter);this.allocateBindingSlots(i),this.updateInstruction(r,e.sourceSpan,yn.textBinding,function(){return[yt(r),t.convertPropertyBinding(i)]})},e.prototype.visitText=function(e){this.i18n||this.creationInstruction(e.sourceSpan,yn.text,[yt(this.allocateDataSlot()),yt(e.value)])},e.prototype.visitIcu=function(e){var t=!1;this.i18n||(t=!0,this.i18nStart(null,e.i18n,!0));var n=this.i18n,r=this.i18nBindProps(e.vars),i=this.i18nBindProps(e.placeholders),o=e.i18n,s=function(e){return nc(null,yn.i18nPostprocess,[e,br(r,!0)])};if(Pr(n.meta))this.i18nTranslate(o,i,n.ref,s);else{var a=this.i18nTranslate(o,i,void 0,s);n.appendIcu(Mr(o).name,a)}return t&&this.i18nEnd(null,!0),null},e.prototype.allocateDataSlot=function(){return this._dataIndex++},e.prototype.getConstCount=function(){return this._dataIndex},e.prototype.getVarCount=function(){return this._pureFunctionSlots},e.prototype.getNgContentSelectors=function(){return this._ngContentReservedSlots.length?this.constantPool.getConstLiteral(Qr(this._ngContentReservedSlots),!0):null},e.prototype.bindingContext=function(){return""+this._bindingContext++},e.prototype.templatePropertyBindings=function(e,t,n){var r=this;n.forEach(function(n){if(n instanceof wn){var i=n.value.visit(r._valueConverter);r.allocateBindingSlots(i),r.updateInstruction(t,e.sourceSpan,yn.property,function(){return[yt(n.name),r.convertPropertyBinding(i,!0)]})}})},e.prototype.instructionFn=function(e,t,n,r,i){void 0===i&&(i=!1),e[i?"unshift":"push"](function(){var e=Array.isArray(r)?r:r();return nc(t,n,e).toStmt()})},e.prototype.processStylingInstruction=function(e,t){var n=this;if(e){var r=function(){return e.buildParams(function(e){return n.convertPropertyBinding(e,!0)})};t?this.creationInstruction(e.sourceSpan,e.reference,r):this.updateInstruction(-1,e.sourceSpan,e.reference,r)}},e.prototype.creationInstruction=function(e,t,n,r){this.instructionFn(this._creationCodeFns,e,t,n||[],r)},e.prototype.updateInstruction=function(e,t,n,r){this._lastNodeIndexWithFlush<e&&(this.instructionFn(this._updateCodeFns,t,yn.select,[yt(e)]),this._lastNodeIndexWithFlush=e),this.instructionFn(this._updateCodeFns,t,n,r||[])},e.prototype.allocatePureFunctionSlots=function(e){var t=this._pureFunctionSlots;return this._pureFunctionSlots+=e,t},e.prototype.allocateBindingSlots=function(e){this._bindingSlots+=e instanceof Vo?e.expressions.length:1},e.prototype.getImplicitReceiverExpr=function(){return this._implicitReceiverExpr?this._implicitReceiverExpr:this._implicitReceiverExpr=0===this.level?ct(Ur):this._bindingScope.getOrCreateSharedContextVar(0)},e.prototype.convertExpressionBinding=function(e){var t=ls(this,this.getImplicitReceiverExpr(),e,this.bindingContext(),ts.TrySimple).currValExpr;return pt(yn.bind).callFn([t])},e.prototype.convertPropertyBinding=function(e,t){var n,r=e instanceof Vo?uc:function(){return Nt("Unexpected interpolation")},i=ls(this,this.getImplicitReceiverExpr(),e,this.bindingContext(),ts.TrySimple,r),o=i.currValExpr;return(n=this._tempVariables).push.apply(n,f(i.stmts)),e instanceof Vo||t?o:pt(yn.bind).callFn([o])},e.prototype.getUpdateInstructionArguments=function(e){var t,n=function r(e,t,n,i){var o=new ms(e,t,i,void 0),s=n.visit(o,ns.Expression);o.usesImplicitReceiver&&e.notifyImplicitReceiverUse();var a=cs(o,i),u=s.args.slice(1);if(n instanceof Vo){var l=n.strings;3===u.length&&""===l[0]&&""===l[1]?u=[u[1]]:u.length>=19&&(u=[ft(u)])}return{stmts:a,args:u}}(this,this.getImplicitReceiverExpr(),e,this.bindingContext()),i=n.args;return(t=this._tempVariables).push.apply(t,f(n.stmts)),i},e.prototype.matchDirectives=function(e,t){var n=this;if(this.directiveMatcher){var r=function o(e,t){var n=new A;return n.setElement(e),Object.getOwnPropertyNames(t).forEach(function(e){var r=t[e];n.addAttribute(e,r),"class"===e.toLowerCase()&&r.trim().split(/\s+/).forEach(function(e){return n.addClassName(e)})}),n}(e,function i(e){var t={};return e instanceof Sn&&"ng-template"!==e.tagName?e.templateAttrs.forEach(function(e){return t[e.name]=""}):(e.attributes.forEach(function(e){kr(e.name)||(t[e.name]=e.value)}),e.inputs.forEach(function(e){t[e.name]=""}),e.outputs.forEach(function(e){t[e.name]=""})),t}
|
|
336
343
|
/**
|
|
337
344
|
* @license
|
|
338
345
|
* Copyright Google Inc. All Rights Reserved.
|
|
339
346
|
*
|
|
340
347
|
* Use of this source code is governed by an MIT-style license that can be
|
|
341
348
|
* found in the LICENSE file at https://angular.io/license
|
|
342
|
-
*/(t));this.directiveMatcher.match(r,function(e,t){n.directives.add(t)})}},e.prototype.prepareNonRenderAttrs=function(e,t,n,r){void 0===r&&(r=[]);var i=new Set,o=[];function s(e,t){"string"==typeof e?i.has(e)||(o.push.apply(o,f(oc(e))),void 0!==t&&o.push(t),i.add(e)):o.push(yt(e))}if(n&&n.populateInitialStylingAttrs(o),e.length||t.length){for(var a=o.length,u=0;u<e.length;u++){var l=e[u];4!==l.type&&s(l.name)}for(u=0;u<t.length;u++){var c=t[u];1!==c.type&&s(c.name)}o.length&&o.splice(a,0,yt(3))}return r.length&&(o.push(yt(4)),r.forEach(function(e){return s(e.name)})),o},e.prototype.toAttrsParam=function(e){return e.length>0?this.constantPool.getConstLiteral(ft(e),!0)
|
|
349
|
+
*/(t));this.directiveMatcher.match(r,function(e,t){n.directives.add(t)})}},e.prototype.prepareNonRenderAttrs=function(e,t,n,r){void 0===r&&(r=[]);var i=new Set,o=[];function s(e,t){"string"==typeof e?i.has(e)||(o.push.apply(o,f(oc(e))),void 0!==t&&o.push(t),i.add(e)):o.push(yt(e))}if(n&&n.populateInitialStylingAttrs(o),e.length||t.length){for(var a=o.length,u=0;u<e.length;u++){var l=e[u];4!==l.type&&s(l.name)}for(u=0;u<t.length;u++){var c=t[u];1!==c.type&&s(c.name)}o.length&&o.splice(a,0,yt(3))}return r.length&&(o.push(yt(4)),r.forEach(function(e){return s(e.name)})),o},e.prototype.toAttrsParam=function(e){return e.length>0?this.constantPool.getConstLiteral(ft(e),!0):$e},e.prototype.prepareRefsParameter=function(e){var t=this;if(!e||0===e.length)return $e;var n=vn(e.map(function(e){var n=t.allocateDataSlot(),r=t._bindingScope.freshReferenceName(),i=t.level,o=ct(r);return t._bindingScope.set(i,e.name,o,0,function(e,t){var r=t>0?[rc(t).toStmt()]:[],i=o.set(pt(yn.reference).callFn([yt(n)]));return r.concat(i.toConstDecl())},!0),[e.name,e.value]}));return this.constantPool.getConstLiteral(Qr(n),!0)},e.prototype.prepareListenerParameter=function(e,t,n){var r=this;return function(){var i=t.name,o=1===t.type?ui(i,t.phase):en(i),s=r.templateName+"_"+e+"_"+o+"_"+n+"_listener",a=r._bindingScope.nestedScope(r._bindingScope.bindingLevel);return Yl(t,s,a)}},e}(),Jl=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.constantPool=t,o.allocateSlot=n,o.allocatePureFunctionSlots=r,o.definePipe=i,o._pipeBindExprs=[],o}return o(t,e),t.prototype.visitPipe=function(e,t){var n=this.allocateSlot(),r="PIPE:"+n,i=this.allocatePureFunctionSlots(2+e.args.length),o=new Po(e.span,new No(e.span),r),s=function a(e){var t=ec[e.length];return{identifier:t||yn.pipeBindV,isVarLength:!t}}(e.args),u=s.isVarLength;this.definePipe(e.name,r,n,pt(s.identifier));var l=f([e.exp],e.args),c=this.visitAll(u?[new Fo(e.span,l)]:l),p=new zo(e.span,o,f([new Lo(e.span,n),new Lo(e.span,i)],c));return this._pipeBindExprs.push(p),p},t.prototype.updatePipeSlotOffsets=function(e){this._pipeBindExprs.forEach(function(t){t.args[1].value+=e})},t.prototype.visitLiteralArray=function(e,t){var n=this;return new gs(e.span,this.visitAll(e.expressions),function(e){var t=ft(e);return e.every(function(e){return e.isConstant()})?n.constantPool.getConstLiteral(t,!0):ic(n.constantPool,t,n.allocatePureFunctionSlots)})},t.prototype.visitLiteralMap=function(e,t){var n=this;return new gs(e.span,this.visitAll(e.values),function(t){var r=dt(t.map(function(t,n){return{key:e.keys[n].key,value:t,quoted:e.keys[n].quoted}}));return t.every(function(e){return e.isConstant()})?n.constantPool.getConstLiteral(r,!0):ic(n.constantPool,r,n.allocatePureFunctionSlots)})},t}(Yo),ec=[yn.pipeBind1,yn.pipeBind2,yn.pipeBind3,yn.pipeBind4],tc=[yn.pureFunction0,yn.pureFunction1,yn.pureFunction2,yn.pureFunction3,yn.pureFunction4,yn.pureFunction5,yn.pureFunction6,yn.pureFunction7,yn.pureFunction8];function nc(e,t,n){return pt(t,null,e).callFn(n,e)}function rc(e){return pt(yn.nextContext).callFn(e>1?[yt(e)]:[])}function ic(e,t,n){var r=e.getLiteralFactory(t),i=r.literalFactory,o=r.literalFactoryArguments,s=n(1+o.length);o.length>0||Nt("Expected arguments to a literal factory function");var a=function u(e){var t=tc[e.length];return{identifier:t||yn.pureFunctionV,isVarLength:!t}}(o),l=a.identifier,c=a.isVarLength,p=[yt(s),i];return c?p.push(ft(o)):p.push.apply(p,f(o)),pt(l).callFn(p)}function oc(e){var t=h(d(e),2),n=t[0],r=yt(t[1]);return n?[yt(0),yt(n),r]:[r]}var sc=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=null),this.bindingLevel=e,this.parent=t,this.map=new Map,this.referenceNameIndex=0,this.restoreViewVariable=null}return Object.defineProperty(e,"ROOT_SCOPE",{get:function(){return e._ROOT_SCOPE||(e._ROOT_SCOPE=(new e).set(0,"$event",ct("$event"))),e._ROOT_SCOPE},enumerable:!0,configurable:!0}),e.prototype.get=function(e){for(var t=this;t;){var n=t.map.get(e);if(null!=n)return t!==this&&(this.map.set(e,n={retrievalLevel:n.retrievalLevel,lhs:n.lhs,declareLocalCallback:n.declareLocalCallback,declare:!1,priority:n.priority,localRef:n.localRef}),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)},e.prototype.set=function(e,t,n,r,i,o){if(void 0===r&&(r=0),this.map.has(t)){if(o)return this;Nt("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:i,priority:r,localRef:o||!1}),this},e.prototype.getLocal=function(e){return this.get(e)},e.prototype.notifyImplicitReceiverUse=function(){0!==this.bindingLevel&&(this.map.get("$$shared_ctx$$0").declare=!0)},e.prototype.nestedScope=function(t){var n=new e(t,this);return t>0&&n.generateSharedContextVar(0),n},e.prototype.getOrCreateSharedContextVar=function(e){var t="$$shared_ctx$$"+e;return this.map.has(t)||this.generateSharedContextVar(e),this.map.get(t).lhs},e.prototype.getSharedContextName=function(e){var t=this.map.get("$$shared_ctx$$"+e);return t&&t.declare?t.lhs:null},e.prototype.maybeGenerateSharedContextVar=function(e){if(1===e.priority&&e.retrievalLevel<this.bindingLevel){var t=this.map.get("$$shared_ctx$$"+e.retrievalLevel);t?t.declare=!0:this.generateSharedContextVar(e.retrievalLevel)}},e.prototype.generateSharedContextVar=function(e){var t=ct(Ur+this.freshReferenceName());this.map.set("$$shared_ctx$$"+e,{retrievalLevel:e,lhs:t,declareLocalCallback:function(e,n){return[t.set(rc(n)).toConstDecl()]},declare:!1,priority:2,localRef:!1})},e.prototype.getComponentProperty=function(e){var t=this.map.get("$$shared_ctx$$0");return t.declare=!0,this.maybeRestoreView(0,!1),t.lhs.prop(e)},e.prototype.maybeRestoreView=function(e,t){this.isListenerScope()&&(e<this.bindingLevel||t)&&(this.parent.restoreViewVariable||(this.parent.restoreViewVariable=ct(this.parent.freshReferenceName())),this.restoreViewVariable=this.parent.restoreViewVariable)},e.prototype.restoreViewStatement=function(){return this.restoreViewVariable?[nc(null,yn.restoreView,[this.restoreViewVariable]).toStmt()]:[]},e.prototype.viewSnapshotStatements=function(){var e=nc(null,yn.getCurrentView,[]);return this.restoreViewVariable?[this.restoreViewVariable.set(e).toConstDecl()]:[]},e.prototype.isListenerScope=function(){return this.parent&&this.parent.bindingLevel===this.bindingLevel},e.prototype.variableDeclarations=function(){var e=this,t=0;return Array.from(this.map.values()).filter(function(e){return e.declare}).sort(function(e,t){return t.retrievalLevel-e.retrievalLevel||t.priority-e.priority}).reduce(function(n,r){var i=e.bindingLevel-r.retrievalLevel,o=r.declareLocalCallback(e,i-t);return t=i,n.concat(o)},[])},e.prototype.freshReferenceName=function(){for(var e=this;e.parent;)e=e.parent;return"_r"+e.referenceNameIndex++},e}();function ac(e){var t=oe(e.value)[0];return[yt(5),Qr(t)]}function uc(e){switch((e=e.slice(1)).length){case 3:return pt(yn.interpolation1).callFn(e);case 5:return pt(yn.interpolation2).callFn(e);case 7:return pt(yn.interpolation3).callFn(e);case 9:return pt(yn.interpolation4).callFn(e);case 11:return pt(yn.interpolation5).callFn(e);case 13:return pt(yn.interpolation6).callFn(e);case 15:return pt(yn.interpolation7).callFn(e);case 17:return pt(yn.interpolation8).callFn(e)}return e.length>=19&&e.length%2==1||Nt("Invalid interpolation argument length "+e.length),pt(yn.interpolationV).callFn([ft(e)])}function lc(e){return void 0===e&&(e=fi),new pu(new dl(new el),e,new Tl,null,[])}function cc(e,t){switch(e){case B.HTML:return pt(yn.sanitizeHtml);case B.SCRIPT:return pt(yn.sanitizeScript);case B.STYLE:return t?pt(yn.sanitizeStyle):null;case B.URL:return pt(yn.sanitizeUrl);case B.RESOURCE_URL:return pt(yn.sanitizeResourceUrl);default:return null}}function pc(e){return e instanceof gn||e instanceof _n||e instanceof kn}function hc(e){return e.every(pc)}
|
|
343
350
|
/**
|
|
344
351
|
* @license
|
|
345
352
|
* Copyright Google Inc. All Rights Reserved.
|
|
346
353
|
*
|
|
347
354
|
* Use of this source code is governed by an MIT-style license that can be
|
|
348
355
|
* found in the LICENSE file at https://angular.io/license
|
|
349
|
-
*/var fc=[],dc=/attr\.([^\]]+)/;function vc(e,t,n){var r=new Jr;r.set("type",e.type),r.set("selectors",function i(e){return Qr(oe(e))}(e.selector));var o=ei({name:e.name,type:e.type,deps:e.deps,injectFn:yn.directiveInject});r.set("factory",o.factory),e.queries.length>0&&r.set("contentQueries",gc(e.queries,t,e.name)),e.viewQueries.length&&r.set("viewQuery",xc(e.viewQueries,t,e.name));var s=Object.keys(e.host.properties).filter(function(e){var t=function n(e){return e.substring(0,5)}(e);return"style"!==t&&"class"!==t}).length,a=ct("elIndex"),u=ct(Ur),l=new
|
|
356
|
+
*/var fc=[],dc=/attr\.([^\]]+)/;function vc(e,t,n){var r=new Jr;r.set("type",e.type),r.set("selectors",function i(e){return Qr(oe(e))}(e.selector));var o=ei({name:e.name,type:e.type,deps:e.deps,injectFn:yn.directiveInject});r.set("factory",o.factory),e.queries.length>0&&r.set("contentQueries",gc(e.queries,t,e.name)),e.viewQueries.length&&r.set("viewQuery",xc(e.viewQueries,t,e.name));var s=Object.keys(e.host.properties).filter(function(e){var t=function n(e){return e.substring(0,5)}(e);return"style"!==t&&"class"!==t}).length,a=ct("elIndex"),u=ct(Ur),l=new $u(a,u),c=e.host.specialAttributes,h=c.styleAttr,d=c.classAttr;return void 0!==h&&l.registerStyleAttr(h),void 0!==d&&l.registerClassAttr(d),r.set("hostBindings",function v(e,t,n,r,i,o,s,a){var u,l=[],c=[],h=a,d=e.typeSourceSpan,v=Cc(e),m=function(){return u||(u=new Jl(s,function(){return Nt("Unexpected node")},function(e){var t=h;return h+=e,t},function(){return Nt("Unexpected pipe")})),u},y=o.createDirectiveHostEventAsts(v,d);if(y&&y.length){var g=function _(e,t){return e.map(function(e){var n=e.name&&en(e.name),r=1===e.type?ui(n,e.targetOrPhase):n,i=t.name&&n?t.name+"_"+r+"_HostBindingHandler":null,o=Yl(xn.fromParsedEvent(e),i);return pt(1==e.type?yn.componentHostSyntheticListener:yn.listener).callFn(o).toStmt()})}(y,e);l.push.apply(l,f(g))}(o.createBoundHostProperties(v,d)||[]).forEach(function(r){if(!i.registerInputBasedOnName(r.name,r.expression,r.sourceSpan)){var s=r.expression.visit(m()),a=Ec(n,s),u=function l(e){var t,n=e.name,r=n.match(dc);return r?(n=r[1],t=yn.elementAttribute):e.isAnimation?(n=ai(n),t=yn.componentHostSyntheticProperty):t=yn.property,{bindingName:n,instruction:t,isAttribute:!!r}}(r),p=u.bindingName,h=u.instruction,d=u.isAttribute,v=o.calcPossibleSecurityContexts(e.selector||"",p,d).filter(function(e){return e!==B.NONE}),y=null;v.length&&(y=2===v.length&&v.indexOf(B.URL)>-1&&v.indexOf(B.RESOURCE_URL)>-1?pt(yn.sanitizeUrlOrResourceUrl):cc(v[0],d));var g=h===yn.property?[yt(p),a.currValExpr]:[t,yt(p),pt(yn.bind).callFn([a.currValExpr])];y&&g.push(y),d||(y||g.push(yt(null)),g.push(yt(!0))),c.push.apply(c,f(a.stmts)),c.push(pt(h).callFn(g).toStmt())}});var b=function w(e){var t,n,r=[];try{for(var i=p(Object.getOwnPropertyNames(e)),o=i.next();!o.done;o=i.next()){var s=o.value,a=e[s];r.push(yt(s),a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(r),x=i.buildHostAttrsInstruction(null,b,s);if(x&&l.push(Sc(x,n,Ec)),i.hasBindings){var E=i.buildElementStylingInstruction(null,s);E&&l.push(Sc(E,n,Ec)),i.buildUpdateLevelInstructions(m()).forEach(function(e){c.push(Sc(e,n,Ec))})}if(h&&l.unshift(pt(yn.allocHostVars).callFn([yt(h)]).toStmt()),l.length>0||c.length>0){var S=e.name?e.name+"_HostBindings":null,C=[];return l.length>0&&C.push(Xl(1,l)),c.length>0&&C.push(Xl(2,c)),vt([new je(qr,ve),new je(Ur,null),new je(t.name,ve)],C,fe,null,S)}return null}(e,a,u,e.host.attributes,l,n,t,s)),r.set("inputs",$r(e.inputs,!0)),r.set("outputs",$r(e.outputs)),null!==e.exportAs&&r.set("exportAs",ft(e.exportAs.map(function(e){return yt(e)}))),{definitionMap:r,statements:o.statements}}function mc(e,t){var n=[],r=t.providers,i=t.viewProviders;if(r||i){var o=[r||new qe([])];i&&o.push(i),n.push(pt(yn.ProvidersFeature).callFn(o))}t.usesInheritance&&n.push(pt(yn.InheritDefinitionFeature)),t.lifecycle.usesOnChanges&&n.push(pt(yn.NgOnChangesFeature).callFn(fc)),n.length&&e.set("features",ft(n))}function yc(e,t){return[Xr(e,t),yt(e.descendants),e.read||yt(null)]}function gc(e,t,n){var r,i,o=[],s=[],a=Kr(s,Br);try{for(var u=p(e),l=u.next();!l.done;l=u.next()){var c=l.value,h=f([ct("dirIndex")],yc(c,t));o.push(pt(c.static?yn.staticContentQuery:yn.contentQuery).callFn(h).toStmt());var d=a(),v=pt(yn.loadContentQuery).callFn([]),m=pt(yn.queryRefresh).callFn([d.set(v)]),y=ct(Ur).prop(c.propertyName).set(c.first?d.prop("first"):d);s.push(m.and(y).toStmt())}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}var g=n?n+"_ContentQueries":null;return vt([new je(qr,ve),new je(Ur,null),new je("dirIndex",null)],[Xl(1,o),Xl(2,s)],fe,null,g)}function _c(e){return ht(dt(Object.keys(e).map(function(t){return{key:t,value:yt(Array.isArray(e[t])?e[t][0]:e[t]),quoted:!0}})))}function bc(e){return e.length>0?ht(ft(e.map(function(e){return yt(e)}))):me}function wc(e,t){var n,r=(e.selector||"").replace(/\n/g,"");return ht(pt(t,[oi(e.type,e.typeArgumentCount),(n=r,ht(yt(n))),null!==e.exportAs?bc(e.exportAs):me,_c(e.inputs),_c(e.outputs),bc(e.queries.map(function(e){return e.propertyName}))]))}function xc(e,t,n){var r=[],i=[],o=Kr(i,Br);e.forEach(function(e){var n=pt(e.static?yn.staticViewQuery:yn.viewQuery).callFn(yc(e,t));r.push(n.toStmt());var s=o(),a=pt(yn.loadViewQuery).callFn([]),u=pt(yn.queryRefresh).callFn([s.set(a)]),l=ct(Ur).prop(e.propertyName).set(e.first?s.prop("first"):s);i.push(u.and(l).toStmt())});var s=n?n+"_Query":null;return vt([new je(qr,ve),new je(Ur,null)],[Xl(1,r),Xl(2,i)],fe,null,s)}function Ec(e,t){return ls(null,e,t,"b",ts.TrySimple,function(){return Nt("Unexpected interpolation")})}function Sc(e,t,n){var r=e.buildParams(function(e){return n(t,e).currValExpr});return pt(e.reference,null,e.sourceSpan).callFn(r,e.sourceSpan).toStmt()}function Cc(e){return{hostAttributes:{},hostListeners:e.host.listeners,hostProperties:e.host.properties}}var Tc=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/,Nc=function(){function e(){}return e.prototype.get=function(e){return""},e}(),kc=function(){function e(e){void 0===e&&(e=new Ai),this.jitEvaluator=e,this.R3ResolvedDependencyType=Zr,this.ResourceLoader=Nc,this.elementSchemaRegistry=new Tl}return e.prototype.compilePipe=function(e,t,n){var r=function i(e){var t=[];t.push({key:"name",value:yt(e.pipeName),quoted:!1}),t.push({key:"type",value:e.type,quoted:!1});var n=ei({name:e.name,type:e.type,deps:e.deps,injectFn:yn.directiveInject});return t.push({key:"factory",value:n.factory,quoted:!1}),t.push({key:"pure",value:yt(e.pure),quoted:!1}),{expression:pt(yn.definePipe).callFn([dt(t)]),type:new ce(pt(yn.PipeDefWithMeta,[oi(e.type,e.typeArgumentCount),new ce(new Me(e.pipeName))])),statements:n.statements}}({name:n.name,type:new Se(n.type),typeArgumentCount:n.typeArgumentCount,deps:jc(n.deps),pipeName:n.pipeName,pure:n.pure});return this.jitExpression(r.expression,e,t,r.statements)},e.prototype.compileInjectable=function(e,t,n){var r,i=function o(e){var t=null,n={name:e.name,type:e.type,deps:e.ctorDeps,injectFn:$t.inject};if(void 0!==e.useClass){var r=e.useClass.isEquivalent(e.type),i=void 0;void 0!==e.userDeps&&(i=e.userDeps),t=ei(void 0!==i?a({},n,{delegate:e.useClass,delegateDeps:i,delegateType:Yr.Class}):r?n:a({},n,{delegate:e.useClass,delegateType:Yr.Factory}))}else t=ei(void 0!==e.useFactory?a({},n,{delegate:e.useFactory,delegateDeps:e.userDeps||[],delegateType:Yr.Function}):void 0!==e.useValue?a({},n,{expression:e.useValue}):void 0!==e.useExisting?a({},n,{expression:pt($t.inject).callFn([e.useExisting])}):n);var o=e.type,s=e.providedIn;return{expression:pt($t.ɵɵdefineInjectable).callFn([ii({token:o,factory:t.factory,providedIn:s})]),type:new ce(pt($t.InjectableDef,[oi(e.type,e.typeArgumentCount)])),statements:t.statements}}({name:n.name,type:new Se(n.type),typeArgumentCount:n.typeArgumentCount,providedIn:(r=n.providedIn,null==r||"string"==typeof r?new Me(r):new Se(r)),useClass:Lc(n,Ac),useFactory:Lc(n,Pc),useValue:Lc(n,Ic),useExisting:Lc(n,Mc),ctorDeps:jc(n.ctorDeps),userDeps:jc(n.userDeps)||void 0});return this.jitExpression(i.expression,e,t,i.statements)},e.prototype.compileInjector=function(e,t,n){var r=function i(e){var t=ei({name:e.name,type:e.type,deps:e.deps,injectFn:yn.inject}),n={factory:t.factory};return null!==e.providers&&(n.providers=e.providers),e.imports.length>0&&(n.imports=ft(e.imports)),{expression:pt(yn.defineInjector).callFn([ii(n)]),type:new ce(pt(yn.InjectorDef,[new ce(e.type)])),statements:t.statements}}({name:n.name,type:new Se(n.type),deps:jc(n.deps),providers:new Se(n.providers),imports:n.imports.map(function(e){return new Se(e)})});return this.jitExpression(r.expression,e,t,r.statements)},e.prototype.compileNgModule=function(e,t,n){var r=
|
|
350
357
|
/**
|
|
351
358
|
* @license
|
|
352
359
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -354,7 +361,7 @@ function Kl(e,t){e.i18n=t}var zl=function(){function e(e,t){void 0===e&&(e=fi),v
|
|
|
354
361
|
* Use of this source code is governed by an MIT-style license that can be
|
|
355
362
|
* found in the LICENSE file at https://angular.io/license
|
|
356
363
|
*/
|
|
357
|
-
function i(e){var t=e.type,n=e.bootstrap,r=e.declarations,i=e.imports,o=e.exports,s=e.schemas,a=e.containsForwardDecls,u=e.emitInline,l=[],c={type:t};if(n.length&&(c.bootstrap=wo(n,a)),u)r.length&&(c.declarations=wo(r,a)),i.length&&(c.imports=wo(i,a)),o.length&&(c.exports=wo(o,a));else{var p=function h(e){var t=e.type,n=e.declarations,r=e.imports,i=e.exports,o=e.containsForwardDecls,s={};return n.length&&(s.declarations=wo(n,o)),r.length&&(s.imports=wo(r,o)),i.length&&(s.exports=wo(i,o)),0===Object.keys(s).length?null:new Pe(pt(yn.setNgModuleScope),[t,ii(s)],void 0,void 0,!0).toStmt()}(e);null!==p&&l.push(p)}return s&&s.length&&(c.schemas=ft(s.map(function(e){return e.value}))),{expression:pt(yn.defineNgModule).callFn([ii(c)]),type:new ce(pt(yn.NgModuleDefWithMeta,[new ce(t),bo(r),bo(i),bo(o)])),additionalStatements:l}}({type:new Se(n.type),bootstrap:n.bootstrap.map(Oc),declarations:n.declarations.map(Oc),imports:n.imports.map(Oc),exports:n.exports.map(Oc),emitInline:!0,containsForwardDecls:!1,schemas:n.schemas?n.schemas.map(Oc):null});return this.jitExpression(r.expression,e,t,[])},e.prototype.compileDirective=function(e,t,n){var r=new qt,i=lc(),o=function s(e,t,n){var r=vc(e,t,n),i=r.definitionMap,o=r.statements;mc(i,e);var s=pt(yn.defineDirective).callFn([i.toLiteralMap()]);if(!e.selector)throw new Error("Directive "+e.name+" has no selector, please add it!");return{expression:s,type:wc(e,yn.DirectiveDefWithMeta),statements:o}}(Dc(n),r,i),a=f(r.statements,o.statements);return this.jitExpression(o.expression,e,t,a)},e.prototype.compileComponent=function(e,t,n){var r=new qt,i=n.interpolation?hi.fromArray(n.interpolation):fi,o=function s(e,t,n){void 0===n&&(n={});var r=n.interpolationConfig,i=n.preserveWhitespaces,o=lc(r),s=(new Sa).parse(e,t,a({},n,{tokenizeExpansionForms:!0,leadingTriviaChars
|
|
364
|
+
function i(e){var t=e.type,n=e.bootstrap,r=e.declarations,i=e.imports,o=e.exports,s=e.schemas,a=e.containsForwardDecls,u=e.emitInline,l=[],c={type:t};if(n.length&&(c.bootstrap=wo(n,a)),u)r.length&&(c.declarations=wo(r,a)),i.length&&(c.imports=wo(i,a)),o.length&&(c.exports=wo(o,a));else{var p=function h(e){var t=e.type,n=e.declarations,r=e.imports,i=e.exports,o=e.containsForwardDecls,s={};return n.length&&(s.declarations=wo(n,o)),r.length&&(s.imports=wo(r,o)),i.length&&(s.exports=wo(i,o)),0===Object.keys(s).length?null:new Pe(pt(yn.setNgModuleScope),[t,ii(s)],void 0,void 0,!0).toStmt()}(e);null!==p&&l.push(p)}return s&&s.length&&(c.schemas=ft(s.map(function(e){return e.value}))),{expression:pt(yn.defineNgModule).callFn([ii(c)]),type:new ce(pt(yn.NgModuleDefWithMeta,[new ce(t),bo(r),bo(i),bo(o)])),additionalStatements:l}}({type:new Se(n.type),bootstrap:n.bootstrap.map(Oc),declarations:n.declarations.map(Oc),imports:n.imports.map(Oc),exports:n.exports.map(Oc),emitInline:!0,containsForwardDecls:!1,schemas:n.schemas?n.schemas.map(Oc):null});return this.jitExpression(r.expression,e,t,[])},e.prototype.compileDirective=function(e,t,n){var r=new qt,i=lc(),o=function s(e,t,n){var r=vc(e,t,n),i=r.definitionMap,o=r.statements;mc(i,e);var s=pt(yn.defineDirective).callFn([i.toLiteralMap()]);if(!e.selector)throw new Error("Directive "+e.name+" has no selector, please add it!");return{expression:s,type:wc(e,yn.DirectiveDefWithMeta),statements:o}}(Dc(n),r,i),a=f(r.statements,o.statements);return this.jitExpression(o.expression,e,t,a)},e.prototype.compileComponent=function(e,t,n){var r=new qt,i=n.interpolation?hi.fromArray(n.interpolation):fi,o=function s(e,t,n){void 0===n&&(n={});var r=n.interpolationConfig,i=n.preserveWhitespaces,o=lc(r),s=(new Sa).parse(e,t,a({},n,{tokenizeExpansionForms:!0,leadingTriviaChars:Gl}));if(s.errors&&s.errors.length>0)return{errors:s.errors,nodes:[],styleUrls:[],styles:[]};var u=s.rootNodes;u=Js(new zl(r,!i),u),i||(u=Js(new Pa,u),u=Js(new zl(r,!1),u));var l=function c(e,t){var n=new Al(t),r=Js(n,e),i=t.errors.concat(n.errors),o=i.filter(function(e){return e.level===fo.ERROR});if(o.length>0)throw kt("Template parse errors:\n"+o.join("\n"),o);return{nodes:r,errors:i,styleUrls:n.styleUrls,styles:n.styles}}(u,o),p=l.errors;return p&&p.length>0?{errors:p,nodes:[],styleUrls:[],styles:[]}:{nodes:l.nodes,styleUrls:l.styleUrls,styles:l.styles}}(n.template,t,{preserveWhitespaces:n.preserveWhitespaces,interpolationConfig:i});if(void 0!==o.errors){var u=o.errors.map(function(e){return e.toString()}).join(", ");throw new Error("Errors during JIT compilation of template for "+n.name+": "+u)}var l=function c(e,t,n){var r,i,o=vc(e,t,n),s=o.definitionMap,a=o.statements;mc(s,e);var u=e.selector&&A.parse(e.selector),l=u&&u[0];if(l){var c=l.getAttrs();c.length&&s.set("attrs",t.getConstLiteral(ft(c.map(function(e){return yt(null!=e?e:void 0)})),!0))}var h=null;if(e.directives.length>0){var f=new P;try{for(var d=p(e.directives),v=d.next();!v.done;v=d.next()){var m=v.value,y=m.expression;f.addSelectables(A.parse(m.selector),y)}}catch(e){r={error:e}}finally{try{v&&!v.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}h=f}var g=e.name,_=g?g+"_Template":null,b=new Set,w=new Set,x=e.changeDetection,E=e.template,S=new Zl(t,sc.ROOT_SCOPE,0,g,null,null,_,h,b,e.pipes,w,yn.namespaceHTML,e.relativeContextFilePath,e.i18nUseExternalIds),C=S.buildTemplateFunction(E.nodes,[]),k=S.getNgContentSelectors();if(k&&s.set("ngContentSelectors",k),s.set("consts",yt(S.getConstCount())),s.set("vars",yt(S.getVarCount())),s.set("template",C),b.size){var I=ft(Array.from(b));e.wrapDirectivesAndPipesInClosure&&(I=vt([],[new Je(I)])),s.set("directives",I)}if(w.size){var M=ft(Array.from(w));e.wrapDirectivesAndPipesInClosure&&(M=vt([],[new Je(M)])),s.set("pipes",M)}if(null===e.encapsulation&&(e.encapsulation=T.Emulated),e.styles&&e.styles.length){var O=(e.encapsulation==T.Emulated?function R(e,t,n){var r=new _s;return e.map(function(e){return r.shimCssText(e,t,n)})}
|
|
358
365
|
/**
|
|
359
366
|
* @license
|
|
360
367
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -368,7 +375,7 @@ function i(e){var t=e.type,n=e.bootstrap,r=e.declarations,i=e.imports,o=e.export
|
|
|
368
375
|
*
|
|
369
376
|
* Use of this source code is governed by an MIT-style license that can be
|
|
370
377
|
* found in the LICENSE file at https://angular.io/license
|
|
371
|
-
*/(e,t,n)},e.prototype.jitExpression=function(e,t,n,r){var i=f(r,[new Xe("$def",e,void 0,[ke.Exported])]);return this.jitEvaluator.evaluateStatements(n,i,new _o(t),!0).$def},e}(),Ac=Object.keys({useClass:null})[0],Pc=Object.keys({useFactory:null})[0],Ic=Object.keys({useValue:null})[0],Mc=Object.keys({useExisting:null})[0],Oc=function(e){var t=new Se(e);return{value:t,type:t}};function Rc(e){return a({},e,{predicate:Array.isArray(e.predicate)?e.predicate:new Se(e.predicate),read:e.read?new Se(e.read):null,static:e.static})}function Dc(e){var t=Hc(e.inputs||[]),n=Hc(e.outputs||[]),r=e.propMetadata,i={},o={},s=function(e){r.hasOwnProperty(e)&&r[e].forEach(function(t){!function n(e){return"Input"===e.ngMetadataName}(t)?function r(e){return"Output"===e.ngMetadataName}(t)&&(o[e]=t.bindingPropertyName||e):i[e]=t.bindingPropertyName?[t.bindingPropertyName,e]:e})};for(var u in r)s(u);return a({},e,{typeSourceSpan:e.typeSourceSpan,type:new Se(e.type),deps:jc(e.deps),host:Vc(e.host,e.propMetadata,e.typeSourceSpan),inputs:a({},t,i),outputs:a({},n,o),queries:e.queries.map(Rc),providers:null!=e.providers?new Se(e.providers):null,viewQueries:e.viewQueries.map(Rc)})}function Lc(e,t){return e.hasOwnProperty(t)?new Se(e[t]):void 0}function Fc(e){return{token:null===e.token?new Me(null):e.resolved===Zr.Attribute?new Me(e.token):new Se(e.token),resolved:e.resolved,host:e.host,optional:e.optional,self:e.self,skipSelf:e.skipSelf}}function jc(e){return null==e?null:e.map(Fc)}function Vc(e,t,n){var r=function i(e){var t,n,r={},i={},o={},s={};try{for(var a=p(Object.keys(e)),u=a.next();!u.done;u=a.next()){var l=u.value,c=e[l],h=l.match(Tc);if(null===h)switch(l){case"class":if("string"!=typeof c)throw new Error("Class binding must be string");s.classAttr=c;break;case"style":if("string"!=typeof c)throw new Error("Style binding must be string");s.styleAttr=c;break;default:r[l]="string"==typeof c?yt(c):c}else if(null!=h[1]){if("string"!=typeof c)throw new Error("Property binding must be string");o[h[1]]=c}else if(null!=h[2]){if("string"!=typeof c)throw new Error("Event binding must be string");i[h[2]]=c}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return{attributes:r,listeners:i,properties:o,specialAttributes:s}}(e||{}),o=function s(e,t){var n=Cc({host:e}),r=lc();return r.createDirectiveHostEventAsts(n,t),r.createBoundHostProperties(n,t),r.errors}(r,n);if(o.length)throw new Error(o.map(function(e){return e.msg}).join("\n"));var a=function(e){t.hasOwnProperty(e)&&t[e].forEach(function(t){!function n(e){return"HostBinding"===e.ngMetadataName}(t)?function i(e){return"HostListener"===e.ngMetadataName}(t)&&(r.listeners[t.eventName||e]=e+"("+(t.args||[]).join(",")+")"):r.properties[t.hostPropertyName||e]=e})};for(var u in t)a(u);return r}function Hc(e){return e.reduce(function(e,t){var n=h(t.split(",").map(function(e){return e.trim()}),2),r=n[0];return e[r]=n[1]||r,e},{})}new Ft("8.0.
|
|
378
|
+
*/(e,t,n)},e.prototype.jitExpression=function(e,t,n,r){var i=f(r,[new Xe("$def",e,void 0,[ke.Exported])]);return this.jitEvaluator.evaluateStatements(n,i,new _o(t),!0).$def},e}(),Ac=Object.keys({useClass:null})[0],Pc=Object.keys({useFactory:null})[0],Ic=Object.keys({useValue:null})[0],Mc=Object.keys({useExisting:null})[0],Oc=function(e){var t=new Se(e);return{value:t,type:t}};function Rc(e){return a({},e,{predicate:Array.isArray(e.predicate)?e.predicate:new Se(e.predicate),read:e.read?new Se(e.read):null,static:e.static})}function Dc(e){var t=Hc(e.inputs||[]),n=Hc(e.outputs||[]),r=e.propMetadata,i={},o={},s=function(e){r.hasOwnProperty(e)&&r[e].forEach(function(t){!function n(e){return"Input"===e.ngMetadataName}(t)?function r(e){return"Output"===e.ngMetadataName}(t)&&(o[e]=t.bindingPropertyName||e):i[e]=t.bindingPropertyName?[t.bindingPropertyName,e]:e})};for(var u in r)s(u);return a({},e,{typeSourceSpan:e.typeSourceSpan,type:new Se(e.type),deps:jc(e.deps),host:Vc(e.host,e.propMetadata,e.typeSourceSpan),inputs:a({},t,i),outputs:a({},n,o),queries:e.queries.map(Rc),providers:null!=e.providers?new Se(e.providers):null,viewQueries:e.viewQueries.map(Rc)})}function Lc(e,t){return e.hasOwnProperty(t)?new Se(e[t]):void 0}function Fc(e){return{token:null===e.token?new Me(null):e.resolved===Zr.Attribute?new Me(e.token):new Se(e.token),resolved:e.resolved,host:e.host,optional:e.optional,self:e.self,skipSelf:e.skipSelf}}function jc(e){return null==e?null:e.map(Fc)}function Vc(e,t,n){var r=function i(e){var t,n,r={},i={},o={},s={};try{for(var a=p(Object.keys(e)),u=a.next();!u.done;u=a.next()){var l=u.value,c=e[l],h=l.match(Tc);if(null===h)switch(l){case"class":if("string"!=typeof c)throw new Error("Class binding must be string");s.classAttr=c;break;case"style":if("string"!=typeof c)throw new Error("Style binding must be string");s.styleAttr=c;break;default:r[l]="string"==typeof c?yt(c):c}else if(null!=h[1]){if("string"!=typeof c)throw new Error("Property binding must be string");o[h[1]]=c}else if(null!=h[2]){if("string"!=typeof c)throw new Error("Event binding must be string");i[h[2]]=c}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return{attributes:r,listeners:i,properties:o,specialAttributes:s}}(e||{}),o=function s(e,t){var n=Cc({host:e}),r=lc();return r.createDirectiveHostEventAsts(n,t),r.createBoundHostProperties(n,t),r.errors}(r,n);if(o.length)throw new Error(o.map(function(e){return e.msg}).join("\n"));var a=function(e){t.hasOwnProperty(e)&&t[e].forEach(function(t){!function n(e){return"HostBinding"===e.ngMetadataName}(t)?function i(e){return"HostListener"===e.ngMetadataName}(t)&&(r.listeners[t.eventName||e]=e+"("+(t.args||[]).join(",")+")"):r.properties[t.hostPropertyName||e]=e})};for(var u in t)a(u);return r}function Hc(e){return e.reduce(function(e,t){var n=h(t.split(",").map(function(e){return e.trim()}),2),r=n[0];return e[r]=n[1]||r,e},{})}new Ft("8.0.1");
|
|
372
379
|
/**
|
|
373
380
|
* @license
|
|
374
381
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -390,21 +397,21 @@ var Bc=function Bc(e){var t=void 0===e?{}:e,n=t.defaultEncapsulation,r=t.useJit,
|
|
|
390
397
|
*
|
|
391
398
|
* Use of this source code is governed by an MIT-style license that can be
|
|
392
399
|
* found in the LICENSE file at https://angular.io/license
|
|
393
|
-
*/var qc=function(){function e(e,t,n,r){this._resourceLoader=e,this._urlResolver=t,this._htmlParser=n,this._config=r,this._resourceLoaderCache=new Map}return e.prototype.clearCache=function(){this._resourceLoaderCache.clear()},e.prototype.clearCacheFor=function(e){var t=this;if(e.isComponent){var n=e.template;this._resourceLoaderCache.delete(n.templateUrl),n.externalStylesheets.forEach(function(e){t._resourceLoaderCache.delete(e.moduleUrl)})}},e.prototype._fetch=function(e){var t=this._resourceLoaderCache.get(e);return t||(t=this._resourceLoader.get(e),this._resourceLoaderCache.set(e,t)),t},e.prototype.normalizeTemplate=function(e){var t=this;if(Et(e.template)){if(Et(e.templateUrl))throw kt("'"+Rt(e.componentType)+"' component cannot define both template and templateUrl");if("string"!=typeof e.template)throw kt("The template specified for component "+Rt(e.componentType)+" is not a string")}else{if(!Et(e.templateUrl))throw kt("No template specified for component "+Rt(e.componentType));if("string"!=typeof e.templateUrl)throw kt("The templateUrl specified for component "+Rt(e.componentType)+" is not a string")}if(Et(e.preserveWhitespaces)&&"boolean"!=typeof e.preserveWhitespaces)throw kt("The preserveWhitespaces option for component "+Rt(e.componentType)+" must be a boolean");return Tt(this._preParseTemplate(e),function(n){return t._normalizeTemplateMetadata(e,n)})},e.prototype._preParseTemplate=function(e){var t,n,r=this;return null!=e.template?(t=e.template,n=e.moduleUrl):(n=this._urlResolver.resolve(e.moduleUrl,e.templateUrl),t=this._fetch(n)),Tt(t,function(t){return r._preparseLoadedTemplate(e,t,n)})},e.prototype._preparseLoadedTemplate=function(e,t,n){var r=!!e.template,i=hi.fromArray(e.interpolation),o=function s(e,t,n){var r;return r=n.isInline?t.type.reference instanceof Yt?t.type.reference.filePath+"."+t.type.reference.name+".html":rn(e)+"/"+rn(t.type)+".html":n.templateUrl,t.type.reference instanceof Yt?r:function i(e){return e.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}(r)}({reference:e.ngModuleType},{type:{reference:e.componentType}},{isInline:r,templateUrl:n}),a=this._htmlParser.parse(t,o,{tokenizeExpansionForms:!0,interpolationConfig:i});if(a.errors.length>0)throw kt("Template parse errors:\n"+a.errors.join("\n"));var u=this._normalizeStylesheet(new an({styles:e.styles,moduleUrl:e.moduleUrl})),l=new Kc;Js(l,a.rootNodes);var c=this._normalizeStylesheet(new an({styles:l.styles,styleUrls:l.styleUrls,moduleUrl:n}));return{template:t,templateUrl:n,isInline:r,htmlAst:a,styles:u.styles.concat(c.styles),inlineStyleUrls:u.styleUrls.concat(c.styleUrls),styleUrls:this._normalizeStylesheet(new an({styleUrls:e.styleUrls,moduleUrl:e.moduleUrl})).styleUrls,ngContentSelectors:l.ngContentSelectors}},e.prototype._normalizeTemplateMetadata=function(e,t){var n=this;return Tt(this._loadMissingExternalStylesheets(t.styleUrls.concat(t.inlineStyleUrls)),function(r){return n._normalizeLoadedTemplateMetadata(e,t,r)})},e.prototype._normalizeLoadedTemplateMetadata=function(e,t,n){var r=this,i=f(t.styles);this._inlineStyles(t.inlineStyleUrls,n,i);var o=t.styleUrls,s=o.map(function(e){var t=n.get(e),i=f(t.styles);return r._inlineStyles(t.styleUrls,n,i),new an({moduleUrl:e,styles:i})}),a=e.encapsulation;return null==a&&(a=this._config.defaultEncapsulation),a===T.Emulated&&0===i.length&&0===o.length&&(a=T.None),new un({encapsulation:a,template:t.template,templateUrl:t.templateUrl,htmlAst:t.htmlAst,styles:i,styleUrls:o,ngContentSelectors:t.ngContentSelectors,animations:e.animations,interpolation:e.interpolation,isInline:t.isInline,externalStylesheets:s,preserveWhitespaces:Uc(e.preserveWhitespaces,this._config.preserveWhitespaces)})},e.prototype._inlineStyles=function(e,t,n){var r=this;e.forEach(function(e){var i=t.get(e);i.styles.forEach(function(e){return n.push(e)}),r._inlineStyles(i.styleUrls,t,n)})},e.prototype._loadMissingExternalStylesheets=function(e,t){var n,r=this;return void 0===t&&(t=new Map),Tt((n=e.filter(function(e){return!t.has(e)}).map(function(e){return Tt(r._fetch(e),function(n){var i=r._normalizeStylesheet(new an({styles:[n],moduleUrl:e}));return t.set(e,i),r._loadMissingExternalStylesheets(i.styleUrls,t)})})).some(Lt)?Promise.all(n):n,function(e){return t})},e.prototype._normalizeStylesheet=function(e){var t=this,n=e.moduleUrl,r=e.styleUrls.filter(au).map(function(e){return t._urlResolver.resolve(n,e)}),i=e.styles.map(function(e){var i=function o(e,t,n){var r=[],i=n.replace(lu,"").replace(uu,function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=n[1]||n[2];return au(o)?(r.push(e.resolve(t,o)),""):n[0]});return new su(i,r)}(t._urlResolver,n,e);return r.push.apply(r,f(i.styleUrls)),i.style});return new an({styles:i,styleUrls:r,moduleUrl:n})},e}(),Kc=function(){function e(){this.ngContentSelectors=[],this.styles=[],this.styleUrls=[],this.ngNonBindableStackCount=0}return e.prototype.visitElement=function(e,t){var n=Cu(e);switch(n.type){case vu.NG_CONTENT:0===this.ngNonBindableStackCount&&this.ngContentSelectors.push(n.selectAttr);break;case vu.STYLE:var r="";e.children.forEach(function(e){e instanceof Qs&&(r+=e.value)}),this.styles.push(r);break;case vu.STYLESHEET:this.styleUrls.push(n.hrefAttr)}return n.nonBindable&&this.ngNonBindableStackCount++,Js(this,e.children),n.nonBindable&&this.ngNonBindableStackCount--,null},e.prototype.visitExpansion=function(e,t){Js(this,e.cases)},e.prototype.visitExpansionCase=function(e,t){Js(this,e.expression)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitAttribute=function(e,t){return null},e.prototype.visitText=function(e,t){return null},e}(),zc=[V,j,F,L],Wc=function(){function e(e){this._reflector=e}return e.prototype.isDirective=function(e){var t=this._reflector.annotations(Dt(e));return t&&t.some(Qc)},e.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=this._reflector.annotations(Dt(e));if(n){var r
|
|
400
|
+
*/var qc=function(){function e(e,t,n,r){this._resourceLoader=e,this._urlResolver=t,this._htmlParser=n,this._config=r,this._resourceLoaderCache=new Map}return e.prototype.clearCache=function(){this._resourceLoaderCache.clear()},e.prototype.clearCacheFor=function(e){var t=this;if(e.isComponent){var n=e.template;this._resourceLoaderCache.delete(n.templateUrl),n.externalStylesheets.forEach(function(e){t._resourceLoaderCache.delete(e.moduleUrl)})}},e.prototype._fetch=function(e){var t=this._resourceLoaderCache.get(e);return t||(t=this._resourceLoader.get(e),this._resourceLoaderCache.set(e,t)),t},e.prototype.normalizeTemplate=function(e){var t=this;if(Et(e.template)){if(Et(e.templateUrl))throw kt("'"+Rt(e.componentType)+"' component cannot define both template and templateUrl");if("string"!=typeof e.template)throw kt("The template specified for component "+Rt(e.componentType)+" is not a string")}else{if(!Et(e.templateUrl))throw kt("No template specified for component "+Rt(e.componentType));if("string"!=typeof e.templateUrl)throw kt("The templateUrl specified for component "+Rt(e.componentType)+" is not a string")}if(Et(e.preserveWhitespaces)&&"boolean"!=typeof e.preserveWhitespaces)throw kt("The preserveWhitespaces option for component "+Rt(e.componentType)+" must be a boolean");return Tt(this._preParseTemplate(e),function(n){return t._normalizeTemplateMetadata(e,n)})},e.prototype._preParseTemplate=function(e){var t,n,r=this;return null!=e.template?(t=e.template,n=e.moduleUrl):(n=this._urlResolver.resolve(e.moduleUrl,e.templateUrl),t=this._fetch(n)),Tt(t,function(t){return r._preparseLoadedTemplate(e,t,n)})},e.prototype._preparseLoadedTemplate=function(e,t,n){var r=!!e.template,i=hi.fromArray(e.interpolation),o=function s(e,t,n){var r;return r=n.isInline?t.type.reference instanceof Yt?t.type.reference.filePath+"."+t.type.reference.name+".html":rn(e)+"/"+rn(t.type)+".html":n.templateUrl,t.type.reference instanceof Yt?r:function i(e){return e.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}(r)}({reference:e.ngModuleType},{type:{reference:e.componentType}},{isInline:r,templateUrl:n}),a=this._htmlParser.parse(t,o,{tokenizeExpansionForms:!0,interpolationConfig:i});if(a.errors.length>0)throw kt("Template parse errors:\n"+a.errors.join("\n"));var u=this._normalizeStylesheet(new an({styles:e.styles,moduleUrl:e.moduleUrl})),l=new Kc;Js(l,a.rootNodes);var c=this._normalizeStylesheet(new an({styles:l.styles,styleUrls:l.styleUrls,moduleUrl:n}));return{template:t,templateUrl:n,isInline:r,htmlAst:a,styles:u.styles.concat(c.styles),inlineStyleUrls:u.styleUrls.concat(c.styleUrls),styleUrls:this._normalizeStylesheet(new an({styleUrls:e.styleUrls,moduleUrl:e.moduleUrl})).styleUrls,ngContentSelectors:l.ngContentSelectors}},e.prototype._normalizeTemplateMetadata=function(e,t){var n=this;return Tt(this._loadMissingExternalStylesheets(t.styleUrls.concat(t.inlineStyleUrls)),function(r){return n._normalizeLoadedTemplateMetadata(e,t,r)})},e.prototype._normalizeLoadedTemplateMetadata=function(e,t,n){var r=this,i=f(t.styles);this._inlineStyles(t.inlineStyleUrls,n,i);var o=t.styleUrls,s=o.map(function(e){var t=n.get(e),i=f(t.styles);return r._inlineStyles(t.styleUrls,n,i),new an({moduleUrl:e,styles:i})}),a=e.encapsulation;return null==a&&(a=this._config.defaultEncapsulation),a===T.Emulated&&0===i.length&&0===o.length&&(a=T.None),new un({encapsulation:a,template:t.template,templateUrl:t.templateUrl,htmlAst:t.htmlAst,styles:i,styleUrls:o,ngContentSelectors:t.ngContentSelectors,animations:e.animations,interpolation:e.interpolation,isInline:t.isInline,externalStylesheets:s,preserveWhitespaces:Uc(e.preserveWhitespaces,this._config.preserveWhitespaces)})},e.prototype._inlineStyles=function(e,t,n){var r=this;e.forEach(function(e){var i=t.get(e);i.styles.forEach(function(e){return n.push(e)}),r._inlineStyles(i.styleUrls,t,n)})},e.prototype._loadMissingExternalStylesheets=function(e,t){var n,r=this;return void 0===t&&(t=new Map),Tt((n=e.filter(function(e){return!t.has(e)}).map(function(e){return Tt(r._fetch(e),function(n){var i=r._normalizeStylesheet(new an({styles:[n],moduleUrl:e}));return t.set(e,i),r._loadMissingExternalStylesheets(i.styleUrls,t)})})).some(Lt)?Promise.all(n):n,function(e){return t})},e.prototype._normalizeStylesheet=function(e){var t=this,n=e.moduleUrl,r=e.styleUrls.filter(au).map(function(e){return t._urlResolver.resolve(n,e)}),i=e.styles.map(function(e){var i=function o(e,t,n){var r=[],i=n.replace(lu,"").replace(uu,function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=n[1]||n[2];return au(o)?(r.push(e.resolve(t,o)),""):n[0]});return new su(i,r)}(t._urlResolver,n,e);return r.push.apply(r,f(i.styleUrls)),i.style});return new an({styles:i,styleUrls:r,moduleUrl:n})},e}(),Kc=function(){function e(){this.ngContentSelectors=[],this.styles=[],this.styleUrls=[],this.ngNonBindableStackCount=0}return e.prototype.visitElement=function(e,t){var n=Cu(e);switch(n.type){case vu.NG_CONTENT:0===this.ngNonBindableStackCount&&this.ngContentSelectors.push(n.selectAttr);break;case vu.STYLE:var r="";e.children.forEach(function(e){e instanceof Qs&&(r+=e.value)}),this.styles.push(r);break;case vu.STYLESHEET:this.styleUrls.push(n.hrefAttr)}return n.nonBindable&&this.ngNonBindableStackCount++,Js(this,e.children),n.nonBindable&&this.ngNonBindableStackCount--,null},e.prototype.visitExpansion=function(e,t){Js(this,e.cases)},e.prototype.visitExpansionCase=function(e,t){Js(this,e.expression)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitAttribute=function(e,t){return null},e.prototype.visitText=function(e,t){return null},e}(),zc=[V,j,F,L],Wc=function(){function e(e){this._reflector=e}return e.prototype.isDirective=function(e){var t=this._reflector.annotations(Dt(e));return t&&t.some(Qc)},e.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=this._reflector.annotations(Dt(e));if(n){var r=$c(n,Qc);if(r){var i=this._reflector.propMetadata(e),o=this._reflector.guards(e);return this._mergeWithPropertyMetadata(r,i,o,e)}}if(t)throw new Error("No Directive annotation found on "+Rt(e));return null},e.prototype._mergeWithPropertyMetadata=function(e,t,n,r){var i=[],o=[],s={},a={};return Object.keys(t).forEach(function(e){var n=$c(t[e],function(e){return W.isTypeOf(e)});n&&i.push(n.bindingPropertyName?e+": "+n.bindingPropertyName:e);var r=$c(t[e],function(e){return Q.isTypeOf(e)});r&&o.push(r.bindingPropertyName?e+": "+r.bindingPropertyName:e),t[e].filter(function(e){return $.isTypeOf(e)}).forEach(function(t){if(t.hostPropertyName){var n=t.hostPropertyName[0];if("("===n)throw new Error("@HostBinding can not bind to events. Use @HostListener instead.");if("["===n)throw new Error("@HostBinding parameter should be a property name, 'class.<name>', or 'attr.<name>'.");s["["+t.hostPropertyName+"]"]=e}else s["["+e+"]"]=e}),t[e].filter(function(e){return G.isTypeOf(e)}).forEach(function(t){s["("+t.eventName+")"]=e+"("+(t.args||[]).join(",")+")"});var u=$c(t[e],function(e){return zc.some(function(t){return t.isTypeOf(e)})});u&&(a[e]=u)}),this._merge(e,i,o,s,a,n,r)},e.prototype._extractPublicName=function(e){return bt(e,[null,e])[1].trim()},e.prototype._dedupeBindings=function(e){for(var t=new Set,n=new Set,r=[],i=e.length-1;i>=0;i--){var o=e[i],s=this._extractPublicName(o);n.add(s),t.has(s)||(t.add(s),r.push(o))}return r.reverse()},e.prototype._merge=function(e,t,n,r,i,o,s){var u=this._dedupeBindings(e.inputs?e.inputs.concat(t):t),l=this._dedupeBindings(e.outputs?e.outputs.concat(n):n),c=e.host?a({},e.host,r):r,p=e.queries?a({},e.queries,i):i;return K.isTypeOf(e)?K({selector:e.selector,inputs:u,outputs:l,host:c,exportAs:e.exportAs,moduleId:e.moduleId,queries:p,changeDetection:e.changeDetection,providers:e.providers,viewProviders:e.viewProviders,entryComponents:e.entryComponents,template:e.template,templateUrl:e.templateUrl,styles:e.styles,styleUrls:e.styleUrls,encapsulation:e.encapsulation,animations:e.animations,interpolation:e.interpolation,preserveWhitespaces:e.preserveWhitespaces}):H({selector:e.selector,inputs:u,outputs:l,host:c,exportAs:e.exportAs,queries:p,providers:e.providers,guards:o})},e}();function Qc(e){return H.isTypeOf(e)||K.isTypeOf(e)}function $c(e,t){for(var n=e.length-1;n>=0;n--)if(t(e[n]))return e[n];return null}
|
|
394
401
|
/**
|
|
395
402
|
* @license
|
|
396
403
|
* Copyright Google Inc. All Rights Reserved.
|
|
397
404
|
*
|
|
398
405
|
* Use of this source code is governed by an MIT-style license that can be
|
|
399
406
|
* found in the LICENSE file at https://angular.io/license
|
|
400
|
-
*/var
|
|
407
|
+
*/var Gc,Xc=function(e){function t(t,n){return e.call(this,t,n)||this}return o(t,e),t}(go),Yc=/^i18n:?/,Zc="|",Jc="@@",ep=!1,tp=function tp(e,t){this.messages=e,this.errors=t};
|
|
401
408
|
/**
|
|
402
409
|
* @license
|
|
403
410
|
* Copyright Google Inc. All Rights Reserved.
|
|
404
411
|
*
|
|
405
412
|
* Use of this source code is governed by an MIT-style license that can be
|
|
406
413
|
* found in the LICENSE file at https://angular.io/license
|
|
407
|
-
*/!function(e){e[e.Extract=0]="Extract",e[e.Merge=1]="Merge"}(
|
|
414
|
+
*/!function(e){e[e.Extract=0]="Extract",e[e.Merge=1]="Merge"}(Gc||(Gc={}));var np=function(){function e(e,t){this._implicitTags=e,this._implicitAttrs=t}return e.prototype.extract=function(e,t){var n=this;return this._init(Gc.Extract,t),e.forEach(function(e){return e.visit(n,null)}),this._inI18nBlock&&this._reportError(e[e.length-1],"Unclosed block"),new tp(this._messages,this._errors)},e.prototype.merge=function(e,t,n){this._init(Gc.Merge,n),this._translations=t;var r=new Ys("wrapper",[],e,void 0,void 0,void 0).visit(this,null);return this._inI18nBlock&&this._reportError(e[e.length-1],"Unclosed block"),new ba(r.children,this._errors)},e.prototype.visitExpansionCase=function(e,t){var n=Js(this,e.expression,t);if(this._mode===Gc.Merge)return new Gs(e.value,n,e.sourceSpan,e.valueSourceSpan,e.expSourceSpan)},e.prototype.visitExpansion=function(e,t){this._mayBeAddBlockChildren(e);var n=this._inIcu;this._inIcu||(this._isInTranslatableSection&&this._addMessage([e]),this._inIcu=!0);var r=Js(this,e.cases,t);return this._mode===Gc.Merge&&(e=new $s(e.switchValue,e.type,r,e.sourceSpan,e.switchValueSourceSpan)),this._inIcu=n,e},e.prototype.visitComment=function(e,t){var n=function r(e){return!!(e instanceof Zs&&e.value&&e.value.startsWith("i18n"))}(e);if(n&&this._isInTranslatableSection)this._reportError(e,"Could not start a block inside a translatable section");else{var i=function o(e){return!!(e instanceof Zs&&e.value&&"/i18n"===e.value)}(e);if(!i||this._inI18nBlock){if(!this._inI18nNode&&!this._inIcu)if(this._inI18nBlock){if(i){if(this._depth==this._blockStartDepth){this._closeTranslatableSection(e,this._blockChildren),this._inI18nBlock=!1;var s=this._addMessage(this._blockChildren,this._blockMeaningAndDesc);return Js(this,this._translateMessage(e,s))}return void this._reportError(e,"I18N blocks should not cross element boundaries")}}else n&&(!ep&&console&&console.warn&&(ep=!0,console.warn("I18n comments are deprecated, use an <ng-container> element instead ("+e.sourceSpan.start+(e.sourceSpan.details?", "+e.sourceSpan.details:"")+")")),this._inI18nBlock=!0,this._blockStartDepth=this._depth,this._blockChildren=[],this._blockMeaningAndDesc=e.value.replace(Yc,"").trim(),this._openTranslatableSection(e))}else this._reportError(e,"Trying to close an unopened block")}},e.prototype.visitText=function(e,t){return this._isInTranslatableSection&&this._mayBeAddBlockChildren(e),e},e.prototype.visitElement=function(e,t){var n=this;this._mayBeAddBlockChildren(e),this._depth++;var r=this._inI18nNode,i=this._inImplicitNode,o=[],s=void 0,a=function u(e){return e.attrs.find(function(e){return"i18n"===e.name})||null}(e),l=a?a.value:"",c=this._implicitTags.some(function(t){return e.name===t})&&!this._inIcu&&!this._isInTranslatableSection,p=!i&&c;if(this._inImplicitNode=i||c,this._isInTranslatableSection||this._inIcu)(a||p)&&this._reportError(e,"Could not mark an element as translatable inside a translatable section"),this._mode==Gc.Extract&&Js(this,e.children);else{if(a||p){this._inI18nNode=!0;var h=this._addMessage(e.children,l);s=this._translateMessage(e,h)}if(this._mode==Gc.Extract){var f=a||p;f&&this._openTranslatableSection(e),Js(this,e.children),f&&this._closeTranslatableSection(e,e.children)}}if(this._mode===Gc.Merge&&(s||e.children).forEach(function(e){var r=e.visit(n,t);r&&!n._isInTranslatableSection&&(o=o.concat(r))}),this._visitAttributesOf(e),this._depth--,this._inI18nNode=r,this._inImplicitNode=i,this._mode===Gc.Merge){var d=this._translateAttributes(e);return new Ys(e.name,d,o,e.sourceSpan,e.startSourceSpan,e.endSourceSpan)}return null},e.prototype.visitAttribute=function(e,t){throw new Error("unreachable code")},e.prototype._init=function(e,t){this._mode=e,this._inI18nBlock=!1,this._inI18nNode=!1,this._depth=0,this._inIcu=!1,this._msgCountAtSectionStart=void 0,this._errors=[],this._messages=[],this._inImplicitNode=!1,this._createI18nMessage=Bl(t)},e.prototype._visitAttributesOf=function(e){var t=this,n={},r=this._implicitAttrs[e.name]||[];e.attrs.filter(function(e){return e.name.startsWith("i18n-")}).forEach(function(e){return n[e.name.slice("i18n-".length)]=e.value}),e.attrs.forEach(function(e){e.name in n?t._addMessage([e],n[e.name]):r.some(function(t){return e.name===t})&&t._addMessage([e])})},e.prototype._addMessage=function(e,t){if(0==e.length||1==e.length&&e[0]instanceof Xs&&!e[0].value)return null;var n=rp(t),r=this._createI18nMessage(e,n.meaning,n.description,n.id);return this._messages.push(r),r},e.prototype._translateMessage=function(e,t){if(t&&this._mode===Gc.Merge){var n=this._translations.get(t);if(n)return n;this._reportError(e,'Translation unavailable for message id="'+this._translations.digest(t)+'"')}return[]},e.prototype._translateAttributes=function(e){var t=this,n=e.attrs,r={};n.forEach(function(e){e.name.startsWith("i18n-")&&(r[e.name.slice("i18n-".length)]=rp(e.value))});var i=[];return n.forEach(function(n){if("i18n"!==n.name&&!n.name.startsWith("i18n-"))if(n.value&&""!=n.value&&r.hasOwnProperty(n.name)){var o=r[n.name],s=o.id,a=t._createI18nMessage([n],o.meaning,o.description,s),u=t._translations.get(a);u?0==u.length?i.push(new Xs(n.name,"",n.sourceSpan)):u[0]instanceof Qs?i.push(new Xs(n.name,u[0].value,n.sourceSpan)):t._reportError(e,'Unexpected translation for attribute "'+n.name+'" (id="'+(s||t._translations.digest(a))+'")'):t._reportError(e,'Translation unavailable for attribute "'+n.name+'" (id="'+(s||t._translations.digest(a))+'")')}else i.push(n)}),i},e.prototype._mayBeAddBlockChildren=function(e){this._inI18nBlock&&!this._inIcu&&this._depth==this._blockStartDepth&&this._blockChildren.push(e)},e.prototype._openTranslatableSection=function(e){this._isInTranslatableSection?this._reportError(e,"Unexpected section start"):this._msgCountAtSectionStart=this._messages.length},Object.defineProperty(e.prototype,"_isInTranslatableSection",{get:function(){return void 0!==this._msgCountAtSectionStart},enumerable:!0,configurable:!0}),e.prototype._closeTranslatableSection=function(e,t){if(this._isInTranslatableSection){var n=this._msgCountAtSectionStart;if(1==t.reduce(function(e,t){return e+(t instanceof Zs?0:1)},0))for(var r=this._messages.length-1;r>=n;r--){var i=this._messages[r].nodes;if(!(1==i.length&&i[0]instanceof In)){this._messages.splice(r,1);break}}this._msgCountAtSectionStart=void 0}else this._reportError(e,"Unexpected section end")},e.prototype._reportError=function(e,t){this._errors.push(new Xc(e.sourceSpan,t))},e}();function rp(e){if(!e)return{meaning:"",description:"",id:""};var t=e.indexOf(Jc),n=e.indexOf(Zc),r=h(t>-1?[e.slice(0,t),e.slice(t+2)]:[e,""],2),i=r[0],o=r[1],s=h(n>-1?[i.slice(0,n),i.slice(n+1)]:["",i],2);return{meaning:s[0],description:s[1],id:o}}
|
|
408
415
|
/**
|
|
409
416
|
* @license
|
|
410
417
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -460,7 +467,7 @@ var Bc=function Bc(e){var t=void 0===e?{}:e,n=t.defaultEncapsulation,r=t.useJit,
|
|
|
460
467
|
*
|
|
461
468
|
* Use of this source code is governed by an MIT-style license that can be
|
|
462
469
|
* found in the LICENSE file at https://angular.io/license
|
|
463
|
-
*/function Cp(e,t){void 0===t&&(t=!1);var n=Np(e,t);return n[0]+".ngfactory"+function r(e){return".tsx"===e?".ts":e}(n[1])}function Tp(e){return e.replace(xp,".")}function Np(e,t){if(void 0===t&&(t=!1),e.endsWith(".d.ts"))return[e.slice(0,-5),t?".ts":".d.ts"];var n=e.lastIndexOf(".");return-1!==n?[e.substring(0,n),e.substring(n)]:[e,""]}var kp,Ap=/\u0275\d+/;!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"}(kp||(kp={}));var Pp=[kp.OnInit,kp.OnDestroy,kp.DoCheck,kp.OnChanges,kp.AfterContentInit,kp.AfterContentChecked,kp.AfterViewInit,kp.AfterViewChecked],Ip=function(){function e(e,t,n,r,i,o,s,a,u,l,c,p){this._config=e,this._htmlParser=t,this._ngModuleResolver=n,this._directiveResolver=r,this._pipeResolver=i,this._summaryResolver=o,this._schemaRegistry=s,this._directiveNormalizer=a,this._console=u,this._staticSymbolCache=l,this._reflector=c,this._errorCollector=p,this._nonNormalizedDirectiveCache=new Map,this._directiveCache=new Map,this._summaryCache=new Map,this._pipeCache=new Map,this._ngModuleCache=new Map,this._ngModuleOfTypes=new Map,this._shallowModuleCache=new Map}return e.prototype.getReflector=function(){return this._reflector},e.prototype.clearCacheFor=function(e){var t=this._directiveCache.get(e);this._directiveCache.delete(e),this._nonNormalizedDirectiveCache.delete(e),this._summaryCache.delete(e),this._pipeCache.delete(e),this._ngModuleOfTypes.delete(e),this._ngModuleCache.clear(),t&&this._directiveNormalizer.clearCacheFor(t)},e.prototype.clearCache=function(){this._directiveCache.clear(),this._nonNormalizedDirectiveCache.clear(),this._summaryCache.clear(),this._pipeCache.clear(),this._ngModuleCache.clear(),this._ngModuleOfTypes.clear(),this._directiveNormalizer.clearCache()},e.prototype._createProxyClass=function(e,t){var n=null,r=function(){if(!n)throw new Error("Illegal state: Class "+t+" for type "+Rt(e)+" is not compiled yet!");return n.apply(this,arguments)};return r.setDelegate=function(e){n=e,r.prototype=e.prototype},r.overriddenName=t,r},e.prototype.getGeneratedClass=function(e,t){return e instanceof Yt?this._staticSymbolCache.get(Cp(e.filePath),t):this._createProxyClass(e,t)},e.prototype.getComponentViewClass=function(e){return this.getGeneratedClass(e,function t(e,n){return"View_"+rn({reference:e})+"_"+n}(e,0))},e.prototype.getHostComponentViewClass=function(e){return this.getGeneratedClass(e,function t(e){return"HostView_"+rn({reference:e})}(e))},e.prototype.getHostComponentType=function(e){var t=rn({reference:e})+"_Host";return e instanceof Yt?this._staticSymbolCache.get(e.filePath,t):this._createProxyClass(e,t)},e.prototype.getRendererType=function(e){return e instanceof Yt?this._staticSymbolCache.get(Cp(e.filePath),function t(e){return"RenderType_"+rn({reference:e})}(e)):{}},e.prototype.getComponentFactory=function(e,t,n,r){if(t instanceof Yt)return this._staticSymbolCache.get(Cp(t.filePath),function i(e){return rn({reference:e})+"NgFactory"}(t));var o=this.getHostComponentViewClass(t);return this._reflector.resolveExternalReference(
|
|
470
|
+
*/function Cp(e,t){void 0===t&&(t=!1);var n=Np(e,t);return n[0]+".ngfactory"+function r(e){return".tsx"===e?".ts":e}(n[1])}function Tp(e){return e.replace(xp,".")}function Np(e,t){if(void 0===t&&(t=!1),e.endsWith(".d.ts"))return[e.slice(0,-5),t?".ts":".d.ts"];var n=e.lastIndexOf(".");return-1!==n?[e.substring(0,n),e.substring(n)]:[e,""]}var kp,Ap=/\u0275\d+/;!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"}(kp||(kp={}));var Pp=[kp.OnInit,kp.OnDestroy,kp.DoCheck,kp.OnChanges,kp.AfterContentInit,kp.AfterContentChecked,kp.AfterViewInit,kp.AfterViewChecked],Ip=function(){function e(e,t,n,r,i,o,s,a,u,l,c,p){this._config=e,this._htmlParser=t,this._ngModuleResolver=n,this._directiveResolver=r,this._pipeResolver=i,this._summaryResolver=o,this._schemaRegistry=s,this._directiveNormalizer=a,this._console=u,this._staticSymbolCache=l,this._reflector=c,this._errorCollector=p,this._nonNormalizedDirectiveCache=new Map,this._directiveCache=new Map,this._summaryCache=new Map,this._pipeCache=new Map,this._ngModuleCache=new Map,this._ngModuleOfTypes=new Map,this._shallowModuleCache=new Map}return e.prototype.getReflector=function(){return this._reflector},e.prototype.clearCacheFor=function(e){var t=this._directiveCache.get(e);this._directiveCache.delete(e),this._nonNormalizedDirectiveCache.delete(e),this._summaryCache.delete(e),this._pipeCache.delete(e),this._ngModuleOfTypes.delete(e),this._ngModuleCache.clear(),t&&this._directiveNormalizer.clearCacheFor(t)},e.prototype.clearCache=function(){this._directiveCache.clear(),this._nonNormalizedDirectiveCache.clear(),this._summaryCache.clear(),this._pipeCache.clear(),this._ngModuleCache.clear(),this._ngModuleOfTypes.clear(),this._directiveNormalizer.clearCache()},e.prototype._createProxyClass=function(e,t){var n=null,r=function(){if(!n)throw new Error("Illegal state: Class "+t+" for type "+Rt(e)+" is not compiled yet!");return n.apply(this,arguments)};return r.setDelegate=function(e){n=e,r.prototype=e.prototype},r.overriddenName=t,r},e.prototype.getGeneratedClass=function(e,t){return e instanceof Yt?this._staticSymbolCache.get(Cp(e.filePath),t):this._createProxyClass(e,t)},e.prototype.getComponentViewClass=function(e){return this.getGeneratedClass(e,function t(e,n){return"View_"+rn({reference:e})+"_"+n}(e,0))},e.prototype.getHostComponentViewClass=function(e){return this.getGeneratedClass(e,function t(e){return"HostView_"+rn({reference:e})}(e))},e.prototype.getHostComponentType=function(e){var t=rn({reference:e})+"_Host";return e instanceof Yt?this._staticSymbolCache.get(e.filePath,t):this._createProxyClass(e,t)},e.prototype.getRendererType=function(e){return e instanceof Yt?this._staticSymbolCache.get(Cp(e.filePath),function t(e){return"RenderType_"+rn({reference:e})}(e)):{}},e.prototype.getComponentFactory=function(e,t,n,r){if(t instanceof Yt)return this._staticSymbolCache.get(Cp(t.filePath),function i(e){return rn({reference:e})+"NgFactory"}(t));var o=this.getHostComponentViewClass(t);return this._reflector.resolveExternalReference($t.createComponentFactory)(e,t,o,n,r,[])},e.prototype.initComponentFactory=function(e,t){var n;e instanceof Yt||(n=e.ngContentSelectors).push.apply(n,f(t))},e.prototype._loadSummary=function(e,t){var n=this._summaryCache.get(e);if(!n){var r=this._summaryResolver.resolveSummary(e);this._summaryCache.set(e,(n=r?r.type:null)||null)}return n&&n.summaryKind===t?n:null},e.prototype.getHostComponentMetadata=function(e,t){var n=this.getHostComponentType(e.type.reference);t||(t=this.getHostComponentViewClass(n));var r=A.parse(e.selector)[0].getMatchingElementTemplate(),i=this._htmlParser.parse(r,"");return ln.create({isHost:!0,type:{reference:n,diDeps:[],lifecycleHooks:[]},template:new un({encapsulation:T.None,template:r,templateUrl:"",htmlAst:i,styles:[],styleUrls:[],ngContentSelectors:[],animations:[],isInline:!0,externalStylesheets:[],interpolation:null,preserveWhitespaces:!1}),exportAs:null,changeDetection:N.Default,inputs:[],outputs:[],host:{},isComponent:!0,selector:"*",providers:[],viewProviders:[],queries:[],guards:{},viewQueries:[],componentViewType:t,rendererType:{id:"__Host__",encapsulation:T.None,styles:[],data:{}},entryComponents:[],componentFactory:null})},e.prototype.loadDirectiveMetadata=function(e,t,n){var r=this;if(this._directiveCache.has(t))return null;t=Dt(t);var i=this.getNonNormalizedDirectiveMetadata(t),o=i.metadata,s=function(e){var n=new ln({isHost:!1,type:o.type,isComponent:o.isComponent,selector:o.selector,exportAs:o.exportAs,changeDetection:o.changeDetection,inputs:o.inputs,outputs:o.outputs,hostListeners:o.hostListeners,hostProperties:o.hostProperties,hostAttributes:o.hostAttributes,providers:o.providers,viewProviders:o.viewProviders,queries:o.queries,guards:o.guards,viewQueries:o.viewQueries,entryComponents:o.entryComponents,componentViewType:o.componentViewType,rendererType:o.rendererType,componentFactory:o.componentFactory,template:e});return e&&r.initComponentFactory(o.componentFactory,e.ngContentSelectors),r._directiveCache.set(t,n),r._summaryCache.set(t,n.toSummary()),null};if(o.isComponent){var a=o.template,u=this._directiveNormalizer.normalizeTemplate({ngModuleType:e,componentType:t,moduleUrl:this._reflector.componentModuleUrl(t,i.annotation),encapsulation:a.encapsulation,template:a.template,templateUrl:a.templateUrl,styles:a.styles,styleUrls:a.styleUrls,animations:a.animations,interpolation:a.interpolation,preserveWhitespaces:a.preserveWhitespaces});return Lt(u)&&n?(this._reportError(function l(e){var t=Error("Can't compile synchronously as "+Rt(e)+" is still being loaded!");return t.ngComponentType=e,t}
|
|
464
471
|
/**
|
|
465
472
|
* @license
|
|
466
473
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -474,14 +481,14 @@ var Bc=function Bc(e){var t=void 0===e?{}:e,n=t.defaultEncapsulation,r=t.useJit,
|
|
|
474
481
|
*
|
|
475
482
|
* Use of this source code is governed by an MIT-style license that can be
|
|
476
483
|
* found in the LICENSE file at https://angular.io/license
|
|
477
|
-
*/(t),t),null):Tt(u,s)}return s(null),null},e.prototype.getNonNormalizedDirectiveMetadata=function(e){var t=this;if(!(e=Dt(e)))return null;var n=this._nonNormalizedDirectiveCache.get(e);if(n)return n;var r=this._directiveResolver.resolve(e,!1);if(!r)return null;var i=void 0;if(K.isTypeOf(r)){li("styles",(s=r).styles),li("styleUrls",s.styleUrls),pi("interpolation",s.interpolation);var o=s.animations;i=new un({encapsulation:St(s.encapsulation),template:St(s.template),templateUrl:St(s.templateUrl),htmlAst:null,styles:s.styles||[],styleUrls:s.styleUrls||[],animations:o||[],interpolation:St(s.interpolation),isInline:!!s.template,externalStylesheets:[],ngContentSelectors:[],preserveWhitespaces:St(r.preserveWhitespaces)})}var s,a=null,u=[],l=[],c=r.selector;K.isTypeOf(r)?(a=(s=r).changeDetection,s.viewProviders&&(u=this._getProvidersMetadata(s.viewProviders,l,'viewProviders for "'+Dp(e)+'"',[],e)),s.entryComponents&&(l=Mp(s.entryComponents).map(function(e){return t._getEntryComponentMetadata(e)}).concat(l)),c||(c=this._schemaRegistry.getDefaultComponentElementName())):c||(this._reportError(kt("Directive "+Dp(e)+" has no selector, please add it!"),e),c="error");var p=[];null!=r.providers&&(p=this._getProvidersMetadata(r.providers,l,'providers for "'+Dp(e)+'"',[],e));var h=[],f=[];null!=r.queries&&(h=this._getQueriesMetadata(r.queries,!1,e),f=this._getQueriesMetadata(r.queries,!0,e));var d=ln.create({isHost:!1,selector:c,exportAs:St(r.exportAs),isComponent:!!i,type:this._getTypeMetadata(e),template:i,changeDetection:a,inputs:r.inputs||[],outputs:r.outputs||[],host:r.host||{},providers:p||[],viewProviders:u||[],queries:h||[],guards:r.guards||{},viewQueries:f||[],entryComponents:l,componentViewType:i?this.getComponentViewClass(e):null,rendererType:i?this.getRendererType(e):null,componentFactory:null});return i&&(d.componentFactory=this.getComponentFactory(c,e,d.inputs,d.outputs)),this._nonNormalizedDirectiveCache.set(e,n={metadata:d,annotation:r}),n},e.prototype.getDirectiveMetadata=function(e){var t=this._directiveCache.get(e);return t||this._reportError(kt("Illegal state: getDirectiveMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Directive "+Dp(e)+"."),e),t},e.prototype.getDirectiveSummary=function(e){var t=this._loadSummary(e,tn.Directive);return t||this._reportError(kt("Illegal state: Could not load the summary for directive "+Dp(e)+"."),e),t},e.prototype.isDirective=function(e){return!!this._loadSummary(e,tn.Directive)||this._directiveResolver.isDirective(e)},e.prototype.isPipe=function(e){return!!this._loadSummary(e,tn.Pipe)||this._pipeResolver.isPipe(e)},e.prototype.isNgModule=function(e){return!!this._loadSummary(e,tn.NgModule)||this._ngModuleResolver.isNgModule(e)},e.prototype.getNgModuleSummary=function(e,t){void 0===t&&(t=null);var n=this._loadSummary(e,tn.NgModule);if(!n){var r=this.getNgModuleMetadata(e,!1,t);(n=r?r.toSummary():null)&&this._summaryCache.set(e,n)}return n},e.prototype.loadNgModuleDirectiveAndPipeMetadata=function(e,t,n){var r=this;void 0===n&&(n=!0);var i=this.getNgModuleMetadata(e,n),o=[];return i&&(i.declaredDirectives.forEach(function(n){var i=r.loadDirectiveMetadata(e,n.reference,t);i&&o.push(i)}),i.declaredPipes.forEach(function(e){return r._loadPipeMetadata(e.reference)})),Promise.all(o)},e.prototype.getShallowModuleMetadata=function(e){var t=this._shallowModuleCache.get(e);if(t)return t;var n
|
|
484
|
+
*/(t),t),null):Tt(u,s)}return s(null),null},e.prototype.getNonNormalizedDirectiveMetadata=function(e){var t=this;if(!(e=Dt(e)))return null;var n=this._nonNormalizedDirectiveCache.get(e);if(n)return n;var r=this._directiveResolver.resolve(e,!1);if(!r)return null;var i=void 0;if(K.isTypeOf(r)){li("styles",(s=r).styles),li("styleUrls",s.styleUrls),pi("interpolation",s.interpolation);var o=s.animations;i=new un({encapsulation:St(s.encapsulation),template:St(s.template),templateUrl:St(s.templateUrl),htmlAst:null,styles:s.styles||[],styleUrls:s.styleUrls||[],animations:o||[],interpolation:St(s.interpolation),isInline:!!s.template,externalStylesheets:[],ngContentSelectors:[],preserveWhitespaces:St(r.preserveWhitespaces)})}var s,a=null,u=[],l=[],c=r.selector;K.isTypeOf(r)?(a=(s=r).changeDetection,s.viewProviders&&(u=this._getProvidersMetadata(s.viewProviders,l,'viewProviders for "'+Dp(e)+'"',[],e)),s.entryComponents&&(l=Mp(s.entryComponents).map(function(e){return t._getEntryComponentMetadata(e)}).concat(l)),c||(c=this._schemaRegistry.getDefaultComponentElementName())):c||(this._reportError(kt("Directive "+Dp(e)+" has no selector, please add it!"),e),c="error");var p=[];null!=r.providers&&(p=this._getProvidersMetadata(r.providers,l,'providers for "'+Dp(e)+'"',[],e));var h=[],f=[];null!=r.queries&&(h=this._getQueriesMetadata(r.queries,!1,e),f=this._getQueriesMetadata(r.queries,!0,e));var d=ln.create({isHost:!1,selector:c,exportAs:St(r.exportAs),isComponent:!!i,type:this._getTypeMetadata(e),template:i,changeDetection:a,inputs:r.inputs||[],outputs:r.outputs||[],host:r.host||{},providers:p||[],viewProviders:u||[],queries:h||[],guards:r.guards||{},viewQueries:f||[],entryComponents:l,componentViewType:i?this.getComponentViewClass(e):null,rendererType:i?this.getRendererType(e):null,componentFactory:null});return i&&(d.componentFactory=this.getComponentFactory(c,e,d.inputs,d.outputs)),this._nonNormalizedDirectiveCache.set(e,n={metadata:d,annotation:r}),n},e.prototype.getDirectiveMetadata=function(e){var t=this._directiveCache.get(e);return t||this._reportError(kt("Illegal state: getDirectiveMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Directive "+Dp(e)+"."),e),t},e.prototype.getDirectiveSummary=function(e){var t=this._loadSummary(e,tn.Directive);return t||this._reportError(kt("Illegal state: Could not load the summary for directive "+Dp(e)+"."),e),t},e.prototype.isDirective=function(e){return!!this._loadSummary(e,tn.Directive)||this._directiveResolver.isDirective(e)},e.prototype.isPipe=function(e){return!!this._loadSummary(e,tn.Pipe)||this._pipeResolver.isPipe(e)},e.prototype.isNgModule=function(e){return!!this._loadSummary(e,tn.NgModule)||this._ngModuleResolver.isNgModule(e)},e.prototype.getNgModuleSummary=function(e,t){void 0===t&&(t=null);var n=this._loadSummary(e,tn.NgModule);if(!n){var r=this.getNgModuleMetadata(e,!1,t);(n=r?r.toSummary():null)&&this._summaryCache.set(e,n)}return n},e.prototype.loadNgModuleDirectiveAndPipeMetadata=function(e,t,n){var r=this;void 0===n&&(n=!0);var i=this.getNgModuleMetadata(e,n),o=[];return i&&(i.declaredDirectives.forEach(function(n){var i=r.loadDirectiveMetadata(e,n.reference,t);i&&o.push(i)}),i.declaredPipes.forEach(function(e){return r._loadPipeMetadata(e.reference)})),Promise.all(o)},e.prototype.getShallowModuleMetadata=function(e){var t=this._shallowModuleCache.get(e);if(t)return t;var n=$c(this._reflector.shallowAnnotations(e),X.isTypeOf);return t={type:this._getTypeMetadata(e),rawExports:n.exports,rawImports:n.imports,rawProviders:n.providers},this._shallowModuleCache.set(e,t),t},e.prototype.getNgModuleMetadata=function(e,t,n){var r=this;void 0===t&&(t=!0),void 0===n&&(n=null),e=Dt(e);var i=this._ngModuleCache.get(e);if(i)return i;var o=this._ngModuleResolver.resolve(e,t);if(!o)return null;var s=[],a=[],u=[],l=[],c=[],p=[],h=[],d=[],v=[];o.imports&&Mp(o.imports).forEach(function(t){var i=void 0;if(Op(t)?i=t:t&&t.ngModule&&(i=t.ngModule,t.providers&&p.push.apply(p,f(r._getProvidersMetadata(t.providers,h,"provider for the NgModule '"+Dp(i)+"'",[],t)))),i){if(!r._checkSelfImport(e,i))if(n||(n=new Set),n.has(i))r._reportError(kt(r._getTypeDescriptor(i)+" '"+Dp(t)+"' is imported recursively by the module '"+Dp(e)+"'."),e);else{n.add(i);var o=r.getNgModuleSummary(i,n);n.delete(i),o?l.push(o):r._reportError(kt("Unexpected "+r._getTypeDescriptor(t)+" '"+Dp(t)+"' imported by the module '"+Dp(e)+"'. Please add a @NgModule annotation."),e)}}else r._reportError(kt("Unexpected value '"+Dp(t)+"' imported by the module '"+Dp(e)+"'"),e)}),o.exports&&Mp(o.exports).forEach(function(t){if(Op(t))if(n||(n=new Set),n.has(t))r._reportError(kt(r._getTypeDescriptor(t)+" '"+Rt(t)+"' is exported recursively by the module '"+Dp(e)+"'"),e);else{n.add(t);var i=r.getNgModuleSummary(t,n);n.delete(t),i?c.push(i):a.push(r._getIdentifierMetadata(t))}else r._reportError(kt("Unexpected value '"+Dp(t)+"' exported by the module '"+Dp(e)+"'"),e)});var m=this._getTransitiveNgModuleMetadata(l,c);o.declarations&&Mp(o.declarations).forEach(function(t){if(Op(t)){var n=r._getIdentifierMetadata(t);if(r.isDirective(t))m.addDirective(n),s.push(n),r._addTypeToModule(t,e);else{if(!r.isPipe(t))return void r._reportError(kt("Unexpected "+r._getTypeDescriptor(t)+" '"+Dp(t)+"' declared by the module '"+Dp(e)+"'. Please add a @Pipe/@Directive/@Component annotation."),e);m.addPipe(n),m.pipes.push(n),u.push(n),r._addTypeToModule(t,e)}}else r._reportError(kt("Unexpected value '"+Dp(t)+"' declared by the module '"+Dp(e)+"'"),e)});var y=[],g=[];return a.forEach(function(t){if(m.directivesSet.has(t.reference))y.push(t),m.addExportedDirective(t);else{if(!m.pipesSet.has(t.reference))return void r._reportError(kt("Can't export "+r._getTypeDescriptor(t.reference)+" "+Dp(t.reference)+" from "+Dp(e)+" as it was neither declared nor imported!"),e);g.push(t),m.addExportedPipe(t)}}),o.providers&&p.push.apply(p,f(this._getProvidersMetadata(o.providers,h,"provider for the NgModule '"+Dp(e)+"'",[],e))),o.entryComponents&&h.push.apply(h,f(Mp(o.entryComponents).map(function(e){return r._getEntryComponentMetadata(e)}))),o.bootstrap&&Mp(o.bootstrap).forEach(function(t){Op(t)?d.push(r._getIdentifierMetadata(t)):r._reportError(kt("Unexpected value '"+Dp(t)+"' used in the bootstrap property of module '"+Dp(e)+"'"),e)}),h.push.apply(h,f(d.map(function(e){return r._getEntryComponentMetadata(e.reference)}))),o.schemas&&v.push.apply(v,f(Mp(o.schemas))),i=new pn({type:this._getTypeMetadata(e),providers:p,entryComponents:h,bootstrapComponents:d,schemas:v,declaredDirectives:s,exportedDirectives:y,declaredPipes:u,exportedPipes:g,importedModules:l,exportedModules:c,transitiveModule:m,id:o.id||null}),h.forEach(function(e){return m.addEntryComponent(e)}),p.forEach(function(e){return m.addProvider(e,i.type)}),m.addModule(i.type),this._ngModuleCache.set(e,i),i},e.prototype._checkSelfImport=function(e,t){return e===t&&(this._reportError(kt("'"+Dp(e)+"' module can't import itself"),e),!0)},e.prototype._getTypeDescriptor=function(e){if(Op(e)){if(this.isDirective(e))return"directive";if(this.isPipe(e))return"pipe";if(this.isNgModule(e))return"module"}return e.provide?"provider":"value"},e.prototype._addTypeToModule=function(e,t){var n=this._ngModuleOfTypes.get(e);n&&n!==t?this._reportError(kt("Type "+Dp(e)+" is part of the declarations of 2 modules: "+Dp(n)+" and "+Dp(t)+"! Please consider moving "+Dp(e)+" to a higher module that imports "+Dp(n)+" and "+Dp(t)+". You can also create a new NgModule that exports and includes "+Dp(e)+" then import that NgModule in "+Dp(n)+" and "+Dp(t)+"."),t):this._ngModuleOfTypes.set(e,t)},e.prototype._getTransitiveNgModuleMetadata=function(e,t){var n=new hn,r=new Map;return e.concat(t).forEach(function(e){e.modules.forEach(function(e){return n.addModule(e)}),e.entryComponents.forEach(function(e){return n.addEntryComponent(e)});var t=new Set;e.providers.forEach(function(e){var i=sn(e.provider.token),o=r.get(i);o||(o=new Set,r.set(i,o));var s=e.module.reference;!t.has(i)&&o.has(s)||(o.add(s),t.add(i),n.addProvider(e.provider,e.module))})}),t.forEach(function(e){e.exportedDirectives.forEach(function(e){return n.addExportedDirective(e)}),e.exportedPipes.forEach(function(e){return n.addExportedPipe(e)})}),e.forEach(function(e){e.exportedDirectives.forEach(function(e){return n.addDirective(e)}),e.exportedPipes.forEach(function(e){return n.addPipe(e)})}),n},e.prototype._getIdentifierMetadata=function(e){return{reference:e=Dt(e)}},e.prototype.isInjectable=function(e){return this._reflector.tryAnnotations(e).some(function(e){return Y.isTypeOf(e)})},e.prototype.getInjectableSummary=function(e){return{summaryKind:tn.Injectable,type:this._getTypeMetadata(e,null,!1)}},e.prototype.getInjectableMetadata=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!0);var r=this._loadSummary(e,tn.Injectable),i=r?r.type:this._getTypeMetadata(e,t,n),o=this._reflector.annotations(e).filter(function(e){return Y.isTypeOf(e)});if(0===o.length)return null;var s=o[o.length-1];return{symbol:e,type:i,providedIn:s.providedIn,useValue:s.useValue,useClass:s.useClass,useExisting:s.useExisting,useFactory:s.useFactory,deps:s.deps}},e.prototype._getTypeMetadata=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!0);var r,i,o=this._getIdentifierMetadata(e);return{reference:o.reference,diDeps:this._getDependenciesMetadata(o.reference,t,n),lifecycleHooks:(r=this._reflector,i=o.reference,Pp.filter(function(e){return function t(e,n,r){return e.hasLifecycleHook(r,function i(e){switch(e){case kp.OnInit:return"ngOnInit";case kp.OnDestroy:return"ngOnDestroy";case kp.DoCheck:return"ngDoCheck";case kp.OnChanges:return"ngOnChanges";case kp.AfterContentInit:return"ngAfterContentInit";case kp.AfterContentChecked:return"ngAfterContentChecked";case kp.AfterViewInit:return"ngAfterViewInit";case kp.AfterViewChecked:return"ngAfterViewChecked";default:throw new Error("unexpected "+e)}}
|
|
478
485
|
/**
|
|
479
486
|
* @license
|
|
480
487
|
* Copyright Google Inc. All Rights Reserved.
|
|
481
488
|
*
|
|
482
489
|
* Use of this source code is governed by an MIT-style license that can be
|
|
483
490
|
* found in the LICENSE file at https://angular.io/license
|
|
484
|
-
*/(n))}(r,e,i)}))}},e.prototype._getFactoryMetadata=function(e,t){return void 0===t&&(t=null),{reference:e=Dt(e),diDeps:this._getDependenciesMetadata(e,t)}},e.prototype.getPipeMetadata=function(e){var t=this._pipeCache.get(e);return t||this._reportError(kt("Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe "+Dp(e)+"."),e),t||null},e.prototype.getPipeSummary=function(e){var t=this._loadSummary(e,tn.Pipe);return t||this._reportError(kt("Illegal state: Could not load the summary for pipe "+Dp(e)+"."),e),t},e.prototype.getOrLoadPipeMetadata=function(e){var t=this._pipeCache.get(e);return t||(t=this._loadPipeMetadata(e)),t},e.prototype._loadPipeMetadata=function(e){e=Dt(e);var t=this._pipeResolver.resolve(e),n=new cn({type:this._getTypeMetadata(e),name:t.name,pure:!!t.pure});return this._pipeCache.set(e,n),this._summaryCache.set(e,n.toSummary()),n},e.prototype._getDependenciesMetadata=function(e,t,n){var r=this;void 0===n&&(n=!0);var i=!1,o=(t||this._reflector.parameters(e)||[]).map(function(e){var t=!1,n=!1,o=!1,s=!1,a=!1,u=null;return Array.isArray(e)?e.forEach(function(e){te.isTypeOf(e)?n=!0:J.isTypeOf(e)?o=!0:ee.isTypeOf(e)?s=!0:Z.isTypeOf(e)?a=!0:D.isTypeOf(e)?(t=!0,u=e.attributeName):O.isTypeOf(e)?u=e.token:R.isTypeOf(e)||e instanceof Yt?u=e:Op(e)&&null==u&&(u=e)}):u=e,null==u?(i=!0,{}):{isAttribute:t,isHost:n,isSelf:o,isSkipSelf:s,isOptional:a,token:r._getTokenMetadata(u)}});if(i){var s=o.map(function(e){return e.token?Dp(e.token):"?"}).join(", "),a="Can't resolve all parameters for "+Dp(e)+": ("+s+").";n||this._config.strictInjectionParameters?this._reportError(kt(a),e):this._console.warn("Warning: "+a+" This will become an error in Angular v6.x")}return o},e.prototype._getTokenMetadata=function(e){return"string"==typeof(e=Dt(e))?{value:e}:{identifier:{reference:e}}},e.prototype._getProvidersMetadata=function(e,t,n,r,i){var o=this;return void 0===r&&(r=[]),e.forEach(function(s,a){if(Array.isArray(s))o._getProvidersMetadata(s,t,n,r);else{var u=void 0;if((s=Dt(s))&&"object"==typeof s&&s.hasOwnProperty("provide"))o._validateProvider(s),u=new dn(s.provide,s);else{if(!Op(s)){if(void 0===s)return void o._reportError(kt("Encountered undefined provider! Usually this means you have a circular dependencies. This might be caused by using 'barrel' index.ts files."));var l=e.reduce(function(e,t,n){return n<a?e.push(""+Dp(t)):n==a?e.push("?"+Dp(t)+"?"):n==a+1&&e.push("..."),e},[]).join(", ");return void o._reportError(kt("Invalid "+(n||"provider")+" - only instances of Provider and Type are allowed, got: ["+l+"]"),i)}u=new dn(s,{useClass:s})}u.token===o._reflector.resolveExternalReference(Gt.ANALYZE_FOR_ENTRY_COMPONENTS)?t.push.apply(t,f(o._getEntryComponentsFromProvider(u,i))):r.push(o.getProviderMetadata(u))}}),r},e.prototype._validateProvider=function(e){e.hasOwnProperty("useClass")&&null==e.useClass&&this._reportError(kt("Invalid provider for "+Dp(e.provide)+". useClass cannot be "+e.useClass+".\n Usually it happens when:\n 1. There's a circular dependency (might be caused by using index.ts (barrel) files).\n 2. Class was used before it was declared. Use forwardRef in this case."))},e.prototype._getEntryComponentsFromProvider=function(e,t){var n=this,r=[],i=[];return e.useFactory||e.useExisting||e.useClass?(this._reportError(kt("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!"),t),[]):e.multi?(function o(e,t){xt(e,new Rp,t)}(e.useValue,i),i.forEach(function(e){var t=n._getEntryComponentMetadata(e.reference,!1);t&&r.push(t)}),r):(this._reportError(kt("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!"),t),[])},e.prototype._getEntryComponentMetadata=function(e,t){void 0===t&&(t=!0);var n=this.getNonNormalizedDirectiveMetadata(e);if(n&&n.metadata.isComponent)return{componentType:e,componentFactory:n.metadata.componentFactory};var r=this._loadSummary(e,tn.Directive);if(r&&r.isComponent)return{componentType:e,componentFactory:r.componentFactory};if(t)throw kt(e.name+" cannot be used as an entry component.");return null},e.prototype._getInjectableTypeMetadata=function(e,t){void 0===t&&(t=null);var n=this._loadSummary(e,tn.Injectable);return n?n.type:this._getTypeMetadata(e,t)},e.prototype.getProviderMetadata=function(e){var t=void 0,n=null,r=null,i=this._getTokenMetadata(e.token);return e.useClass?(t=(n=this._getInjectableTypeMetadata(e.useClass,e.dependencies)).diDeps,e.token===e.useClass&&(i={identifier:n})):e.useFactory&&(t=(r=this._getFactoryMetadata(e.useFactory,e.dependencies)).diDeps),{token:i,useClass:n,useValue:e.useValue,useFactory:r,useExisting:e.useExisting?this._getTokenMetadata(e.useExisting):void 0,deps:t,multi:e.multi}},e.prototype._getQueriesMetadata=function(e,t,n){var r=this,i=[];return Object.keys(e).forEach(function(o){var s=e[o];s.isViewQuery===t&&i.push(r._getQueryMetadata(s,o,n))}),i},e.prototype._queryVarBindings=function(e){return e.split(/\s*,\s*/)},e.prototype._getQueryMetadata=function(e,t,n){var r,i=this;return"string"==typeof e.selector?r=this._queryVarBindings(e.selector).map(function(e){return i._getTokenMetadata(e)}):e.selector?r=[this._getTokenMetadata(e.selector)]:(this._reportError(kt("Can't construct a query for the property \""+t+'" of "'+Dp(n)+"\" since the query selector wasn't defined."),n),r=[]),{selectors:r,first:e.first,descendants:e.descendants,propertyName:t,read:e.read?this._getTokenMetadata(e.read):null,static:e.static}},e.prototype._reportError=function(e,t,n){if(!this._errorCollector)throw e;this._errorCollector(e,t),n&&this._errorCollector(e,n)},e}();function Mp(e){return function t(e){return e?Array.from(new Set(e)):[]}(function e(t,n){if(void 0===n&&(n=[]),t)for(var r=0;r<t.length;r++){var i=Dt(t[r]);Array.isArray(i)?e(i,n):n.push(i)}return n}(e))}function Op(e){return e instanceof Yt||e instanceof ne}var Rp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visitOther=function(e,t){t.push({reference:e})},t}(Ct);function Dp(e){return e instanceof Yt?e.name+" in "+e.filePath:Rt(e)}ct("_l");var Lp=function(){function e(e){this._reflector=e}return e.prototype.isNgModule=function(e){return this._reflector.annotations(e).some(X.isTypeOf)},e.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=Gc(this._reflector.annotations(e),X.isTypeOf);if(n)return n;if(t)throw new Error("No NgModule metadata found for '"+Rt(e)+"'.");return null},e}(),Fp=(function(e){function t(t,n){var r=e.call(this,!1)||this;return r.referenceFilter=t,r.importFilter=n,r.typeExpression=0,r.importsWithPrefixes=new Map,r.reexports=new Map,r}o(t,e),t.prototype.visitType=function(e,t,n){void 0===n&&(n="any"),e?(this.typeExpression++,e.visitType(this,t),this.typeExpression--):t.print(null,n)},t.prototype.visitLiteralExpr=function(t,n){var r=t.value;return null==r&&t.type!=fe?(n.print(t,"("+r+" as any)"),null):e.prototype.visitLiteralExpr.call(this,t,n)},t.prototype.visitLiteralArrayExpr=function(t,n){0===t.entries.length&&n.print(t,"(");var r=e.prototype.visitLiteralArrayExpr.call(this,t,n);return 0===t.entries.length&&n.print(t," as any[])"),r},t.prototype.visitExternalExpr=function(e,t){return this._visitIdentifier(e.value,e.typeParams,t),null},t.prototype.visitAssertNotNullExpr=function(t,n){var r=e.prototype.visitAssertNotNullExpr.call(this,t,n);return n.print(t,"!"),r},t.prototype.visitDeclareVarStmt=function(e,t){if(e.hasModifier(ke.Exported)&&e.value instanceof Oe&&!e.type){var n=e.value.value,r=n.name,i=n.moduleName;if(i){var o=this.reexports.get(i);return o||this.reexports.set(i,o=[]),o.push({name:r,as:e.name}),null}}return e.hasModifier(ke.Exported)&&t.print(e,"export "),e.hasModifier(ke.Final)?t.print(e,"const"):t.print(e,"var"),t.print(e," "+e.name),this._printColonType(e.type,t),e.value&&(t.print(e," = "),e.value.visitExpression(this,t)),t.println(e,";"),null},t.prototype.visitWrappedNodeExpr=function(e,t){throw new Error("Cannot visit a WrappedNodeExpr when outputting Typescript.")},t.prototype.visitCastExpr=function(e,t){return t.print(e,"(<"),e.type.visitType(this,t),t.print(e,">"),e.value.visitExpression(this,t),t.print(e,")"),null},t.prototype.visitInstantiateExpr=function(e,t){return t.print(e,"new "),this.typeExpression++,e.classExpr.visitExpression(this,t),this.typeExpression--,t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null},t.prototype.visitDeclareClassStmt=function(e,t){var n=this;return t.pushClass(e),e.hasModifier(ke.Exported)&&t.print(e,"export "),t.print(e,"class "+e.name),null!=e.parent&&(t.print(e," extends "),this.typeExpression++,e.parent.visitExpression(this,t),this.typeExpression--),t.println(e," {"),t.incIndent(),e.fields.forEach(function(e){return n._visitClassField(e,t)}),null!=e.constructorMethod&&this._visitClassConstructor(e,t),e.getters.forEach(function(e){return n._visitClassGetter(e,t)}),e.methods.forEach(function(e){return n._visitClassMethod(e,t)}),t.decIndent(),t.println(e,"}"),t.popClass(),null},t.prototype._visitClassField=function(e,t){e.hasModifier(ke.Private)&&t.print(null,"/*private*/ "),e.hasModifier(ke.Static)&&t.print(null,"static "),t.print(null,e.name),this._printColonType(e.type,t),e.initializer&&(t.print(null," = "),e.initializer.visitExpression(this,t)),t.println(null,";")},t.prototype._visitClassGetter=function(e,t){e.hasModifier(ke.Private)&&t.print(null,"private "),t.print(null,"get "+e.name+"()"),this._printColonType(e.type,t),t.println(null," {"),t.incIndent(),this.visitAllStatements(e.body,t),t.decIndent(),t.println(null,"}")},t.prototype._visitClassConstructor=function(e,t){t.print(e,"constructor("),this._visitParams(e.constructorMethod.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.constructorMethod.body,t),t.decIndent(),t.println(e,"}")},t.prototype._visitClassMethod=function(e,t){e.hasModifier(ke.Private)&&t.print(null,"private "),t.print(null,e.name+"("),this._visitParams(e.params,t),t.print(null,")"),this._printColonType(e.type,t,"void"),t.println(null," {"),t.incIndent(),this.visitAllStatements(e.body,t),t.decIndent(),t.println(null,"}")},t.prototype.visitFunctionExpr=function(e,t){return e.name&&(t.print(e,"function "),t.print(e,e.name)),t.print(e,"("),this._visitParams(e.params,t),t.print(e,")"),this._printColonType(e.type,t,"void"),e.name||t.print(e," => "),t.println(e,"{"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print(e,"}"),null},t.prototype.visitDeclareFunctionStmt=function(e,t){return e.hasModifier(ke.Exported)&&t.print(e,"export "),t.print(e,"function "+e.name+"("),this._visitParams(e.params,t),t.print(e,")"),this._printColonType(e.type,t,"void"),t.println(e," {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println(e,"}"),null},t.prototype.visitTryCatchStmt=function(e,t){t.println(e,"try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println(e,"} catch ("+wi.name+") {"),t.incIndent();var n=[xi.set(wi.prop("stack",null)).toDeclStmt(null,[ke.Final])].concat(e.catchStmts);return this.visitAllStatements(n,t),t.decIndent(),t.println(e,"}"),null},t.prototype.visitBuiltinType=function(e,t){var n;switch(e.name){case se.Bool:n="boolean";break;case se.Dynamic:n="any";break;case se.Function:n="Function";break;case se.Number:case se.Int:n="number";break;case se.String:n="string";break;case se.None:n="never";break;default:throw new Error("Unsupported builtin type "+e.name)}return t.print(null,n),null},t.prototype.visitExpressionType=function(e,t){var n=this;return e.value.visitExpression(this,t),null!==e.typeParams&&(t.print(null,"<"),this.visitAllObjects(function(e){return n.visitType(e,t)},e.typeParams,t,","),t.print(null,">")),null},t.prototype.visitArrayType=function(e,t){return this.visitType(e.of,t),t.print(null,"[]"),null},t.prototype.visitMapType=function(e,t){return t.print(null,"{[key: string]:"),this.visitType(e.valueType,t),t.print(null,"}"),null},t.prototype.getBuiltinMethodName=function(e){var t;switch(e){case we.ConcatArray:t="concat";break;case we.SubscribeObservable:t="subscribe";break;case we.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t},t.prototype._visitParams=function(e,t){var n=this;this.visitAllObjects(function(e){t.print(null,e.name),n._printColonType(e.type,t)},e,t,",")},t.prototype._visitIdentifier=function(e,t,n){var r=this,i=e.name,o=e.moduleName;if(this.referenceFilter&&this.referenceFilter(e))n.print(null,"(null as any)");else{if(o&&(!this.importFilter||!this.importFilter(e))){var s=this.importsWithPrefixes.get(o);null==s&&this.importsWithPrefixes.set(o,s="i"+this.importsWithPrefixes.size),n.print(null,s+".")}n.print(null,i),this.typeExpression>0&&(t||[]).length>0&&(n.print(null,"<"),this.visitAllObjects(function(e){return e.visitType(r,n)},t,n,","),n.print(null,">"))}},t.prototype._printColonType=function(e,t,n){e!==fe&&(t.print(null,":"),this.visitType(e,t,n))}}(Ci),function(){function e(e){this._reflector=e}return e.prototype.isPipe=function(e){var t=this._reflector.annotations(Dt(e));return t&&t.some(z.isTypeOf)},e.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=this._reflector.annotations(Dt(e));if(n){var r=Gc(n,z.isTypeOf);if(r)return r}if(t)throw new Error("No Pipe decorator found on "+Rt(e));return null},e}()),jp=(ct("_l"),ct("_v"),ct("_ck"),ct("_co"),ct("en"),ct("ad"),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}o(t,e),t.prototype.convert=function(e,t){var n=this;return t?e.map(function(e){return e.visit(n,t)}):e},t.prototype.visitTagPlaceholder=function(e,t){var n=this,r=t.toPublicName(e.startName),i=e.closeName?t.toPublicName(e.closeName):e.closeName,o=e.children.map(function(e){return e.visit(n,t)});return new Rn(e.tag,e.attrs,r,i,o,e.isVoid,e.sourceSpan)},t.prototype.visitPlaceholder=function(e,t){return new Dn(e.value,t.toPublicName(e.name),e.sourceSpan)},t.prototype.visitIcuPlaceholder=function(e,t){return new Ln(e.value,t.toPublicName(e.name),e.sourceSpan)}}(Fn),/^(?!.*\.d\.ts$).*\.ts$/),Vp=function Vp(e,t){this.symbol=e,this.metadata=t},Hp=function(){function e(e,t,n,r){this.host=e,this.staticSymbolCache=t,this.summaryResolver=n,this.errorRecorder=r,this.metadataCache=new Map,this.resolvedSymbols=new Map,this.resolvedFilePaths=new Set,this.importAs=new Map,this.symbolResourcePaths=new Map,this.symbolFromFile=new Map,this.knownFileNameToModuleNames=new Map}return e.prototype.resolveSymbol=function(e){return e.members.length>0?this._resolveSymbolMembers(e):this._resolveSymbolFromSummary(e)||this.resolvedSymbols.get(e)||(this._createSymbolsOf(e.filePath),this.resolvedSymbols.get(e))},e.prototype.getImportAs=function(e,t){if(void 0===t&&(t=!0),e.members.length){var n=this.getStaticSymbol(e.filePath,e.name);return(o=this.getImportAs(n,t))?this.getStaticSymbol(o.filePath,o.name,e.members):null}var r=function i(e){return e.replace(Ep,".")}(e.filePath);if(r!==e.filePath){var o,s=function a(e){return e.replace(Sp,"")}(e.name);return n=this.getStaticSymbol(r,s,e.members),(o=this.getImportAs(n,t))?this.getStaticSymbol(function u(e,t){void 0===t&&(t=!1);var n=Np(Tp(e),t);return n[0]+".ngsummary"+n[1]}(o.filePath),function l(e){return e+"NgSummary"}(o.name),n.members):null}var c=t&&this.summaryResolver.getImportAs(e)||null;return c||(c=this.importAs.get(e)),c},e.prototype.getResourcePath=function(e){return this.symbolResourcePaths.get(e)||e.filePath},e.prototype.getTypeArity=function(e){if(function t(e){return xp.test(e)}(e.filePath))return null;for(var n=Up(this.resolveSymbol(e));n&&n.metadata instanceof Yt;)n=Up(this.resolveSymbol(n.metadata));return n&&n.metadata&&n.metadata.arity||null},e.prototype.getKnownModuleName=function(e){return this.knownFileNameToModuleNames.get(e)||null},e.prototype.recordImportAs=function(e,t){e.assertNoMembers(),t.assertNoMembers(),this.importAs.set(e,t)},e.prototype.recordModuleNameForFileName=function(e,t){this.knownFileNameToModuleNames.set(e,t)},e.prototype.invalidateFile=function(e){var t,n;this.metadataCache.delete(e),this.resolvedFilePaths.delete(e);var r=this.symbolFromFile.get(e);if(r){this.symbolFromFile.delete(e);try{for(var i=p(r),o=i.next();!o.done;o=i.next()){var s=o.value;this.resolvedSymbols.delete(s),this.importAs.delete(s),this.symbolResourcePaths.delete(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}},e.prototype.ignoreErrorsFor=function(e){var t=this.errorRecorder;this.errorRecorder=function(){};try{return e()}finally{this.errorRecorder=t}},e.prototype._resolveSymbolMembers=function(e){var t=e.members,n=this.resolveSymbol(this.getStaticSymbol(e.filePath,e.name));if(!n)return null;var r=Up(n.metadata);if(r instanceof Yt)return new Vp(e,this.getStaticSymbol(r.filePath,r.name,t));if(!r||"class"!==r.__symbolic){for(var i=r,o=0;o<t.length&&i;o++)i=i[t[o]];return new Vp(e,i)}return r.statics&&1===t.length?new Vp(e,r.statics[t[0]]):null},e.prototype._resolveSymbolFromSummary=function(e){var t=this.summaryResolver.resolveSummary(e);return t?new Vp(e,t.metadata):null},e.prototype.getStaticSymbol=function(e,t,n){return this.staticSymbolCache.get(e,t,n)},e.prototype.hasDecorators=function(e){var t=this.getModuleMetadata(e);return!!t.metadata&&Object.keys(t.metadata).some(function(e){var n=t.metadata[e];return n&&"class"===n.__symbolic&&n.decorators})},e.prototype.getSymbolsOf=function(e){var t=this.summaryResolver.getSymbolsOf(e);if(t)return t;this._createSymbolsOf(e);var n=[];return this.resolvedSymbols.forEach(function(t){t.symbol.filePath===e&&n.push(t.symbol)}),n},e.prototype._createSymbolsOf=function(e){var t,n,r=this;if(!this.resolvedFilePaths.has(e)){this.resolvedFilePaths.add(e);var i=[],o=this.getModuleMetadata(e);if(o.importAs&&this.knownFileNameToModuleNames.set(e,o.importAs),o.exports){var s=function(t){if(t.export)t.export.forEach(function(n){var o,s=o=Bp(o="string"==typeof n?n:n.as);"string"!=typeof n&&(s=Bp(n.name));var a=r.resolveModule(t.from,e);if(a){var u=r.getStaticSymbol(a,s),l=r.getStaticSymbol(e,o);i.push(r.createExport(l,u))}});else{var n=a.resolveModule(t.from,e);n&&a.getSymbolsOf(n).forEach(function(t){var n=r.getStaticSymbol(e,t.name);i.push(r.createExport(n,t))})}},a=this;try{for(var u=p(o.exports),l=u.next();!l.done;l=u.next())s(l.value)}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}}if(o.metadata){var c=new Set(Object.keys(o.metadata).map(Bp)),h=o.origins||{};Object.keys(o.metadata).forEach(function(t){var n=o.metadata[t],s=Bp(t),a=r.getStaticSymbol(e,s),u=h.hasOwnProperty(t)&&h[t];if(u){var l=r.resolveModule(u,e);l?r.symbolResourcePaths.set(a,l):r.reportError(new Error("Couldn't resolve original symbol for "+u+" from "+r.host.getOutputName(e)))}i.push(r.createResolvedSymbol(a,e,c,n))})}i.forEach(function(e){return r.resolvedSymbols.set(e.symbol,e)}),this.symbolFromFile.set(e,i.map(function(e){return e.symbol}))}},e.prototype.createResolvedSymbol=function(e,t,n,r){var i,s=this,u=jp.test(e.filePath);if(this.summaryResolver.isLibraryFile(e.filePath)&&!u&&r&&"class"===r.__symbolic)return new Vp(e,{__symbolic:"class",arity:r.arity});var l=function(){return i||(i=s.host.getOutputName(t.replace(/((\.ts)|(\.d\.ts)|)$/,".ts").replace(/^.*node_modules[\/\\]/,""))),i},c=this,p=xt(r,new(function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return o(i,r),i.prototype.visitStringMap=function(i,o){var s=i.__symbolic;if("function"===s){var u=o.length;o.push.apply(o,f(i.parameters||[]));var p=r.prototype.visitStringMap.call(this,i,o);return o.length=u,p}if("reference"!==s)return"error"===s?a({},i,{fileName:l()}):r.prototype.visitStringMap.call(this,i,o);var h=i.module,d=i.name?Bp(i.name):i.name;if(!d)return null;var v=void 0;return h?(v=c.resolveModule(h,e.filePath))?{__symbolic:"resolved",symbol:c.getStaticSymbol(v,d),line:i.line,character:i.character,fileName:l()}:{__symbolic:"error",message:"Could not resolve "+h+" relative to "+c.host.getMetadataFor(e.filePath)+".",line:i.line,character:i.character,fileName:l()}:o.indexOf(d)>=0?{__symbolic:"reference",name:d}:n.has(d)?c.getStaticSymbol(t,d):void 0},i}(Ct)),[]),h=Up(p);return h instanceof Yt?this.createExport(e,h):new Vp(e,p)},e.prototype.createExport=function(e,t){return e.assertNoMembers(),t.assertNoMembers(),this.summaryResolver.isLibraryFile(e.filePath)&&this.summaryResolver.isLibraryFile(t.filePath)&&this.importAs.set(t,this.getImportAs(e)||e),new Vp(e,t)},e.prototype.reportError=function(e,t,n){if(!this.errorRecorder)throw e;this.errorRecorder(e,t&&t.filePath||n)},e.prototype.getModuleMetadata=function(e){var t=this.metadataCache.get(e);if(!t){var n=this.host.getMetadataFor(e);if(n){var r=-1;n.forEach(function(e){e&&e.version>r&&(r=e.version,t=e)})}if(t||(t={__symbolic:"module",version:4,module:e,metadata:{}}),4!=t.version){var i=2==t.version?"Unsupported metadata version "+t.version+" for module "+e+". This module should be compiled with a newer version of ngc":"Metadata version mismatch for module "+this.host.getOutputName(e)+", found version "+t.version+", expected 4";this.reportError(new Error(i))}this.metadataCache.set(e,t)}return t},e.prototype.getSymbolByModule=function(e,t,n){var r=this.resolveModule(e,n);return r?this.getStaticSymbol(r,t):(this.reportError(new Error("Could not resolve module "+e+(n?" relative to "+this.host.getOutputName(n):""))),this.getStaticSymbol("ERROR:"+e,t))},e.prototype.resolveModule=function(e,t){try{return this.host.moduleNameToFileName(e,t)}catch(n){console.error("Could not resolve module '"+e+"' relative to file "+t),this.reportError(n,void 0,t)}return null},e}();
|
|
491
|
+
*/(n))}(r,e,i)}))}},e.prototype._getFactoryMetadata=function(e,t){return void 0===t&&(t=null),{reference:e=Dt(e),diDeps:this._getDependenciesMetadata(e,t)}},e.prototype.getPipeMetadata=function(e){var t=this._pipeCache.get(e);return t||this._reportError(kt("Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe "+Dp(e)+"."),e),t||null},e.prototype.getPipeSummary=function(e){var t=this._loadSummary(e,tn.Pipe);return t||this._reportError(kt("Illegal state: Could not load the summary for pipe "+Dp(e)+"."),e),t},e.prototype.getOrLoadPipeMetadata=function(e){var t=this._pipeCache.get(e);return t||(t=this._loadPipeMetadata(e)),t},e.prototype._loadPipeMetadata=function(e){e=Dt(e);var t=this._pipeResolver.resolve(e),n=new cn({type:this._getTypeMetadata(e),name:t.name,pure:!!t.pure});return this._pipeCache.set(e,n),this._summaryCache.set(e,n.toSummary()),n},e.prototype._getDependenciesMetadata=function(e,t,n){var r=this;void 0===n&&(n=!0);var i=!1,o=(t||this._reflector.parameters(e)||[]).map(function(e){var t=!1,n=!1,o=!1,s=!1,a=!1,u=null;return Array.isArray(e)?e.forEach(function(e){te.isTypeOf(e)?n=!0:J.isTypeOf(e)?o=!0:ee.isTypeOf(e)?s=!0:Z.isTypeOf(e)?a=!0:D.isTypeOf(e)?(t=!0,u=e.attributeName):O.isTypeOf(e)?u=e.token:R.isTypeOf(e)||e instanceof Yt?u=e:Op(e)&&null==u&&(u=e)}):u=e,null==u?(i=!0,{}):{isAttribute:t,isHost:n,isSelf:o,isSkipSelf:s,isOptional:a,token:r._getTokenMetadata(u)}});if(i){var s=o.map(function(e){return e.token?Dp(e.token):"?"}).join(", "),a="Can't resolve all parameters for "+Dp(e)+": ("+s+").";n||this._config.strictInjectionParameters?this._reportError(kt(a),e):this._console.warn("Warning: "+a+" This will become an error in Angular v6.x")}return o},e.prototype._getTokenMetadata=function(e){return"string"==typeof(e=Dt(e))?{value:e}:{identifier:{reference:e}}},e.prototype._getProvidersMetadata=function(e,t,n,r,i){var o=this;return void 0===r&&(r=[]),e.forEach(function(s,a){if(Array.isArray(s))o._getProvidersMetadata(s,t,n,r);else{var u=void 0;if((s=Dt(s))&&"object"==typeof s&&s.hasOwnProperty("provide"))o._validateProvider(s),u=new dn(s.provide,s);else{if(!Op(s)){if(void 0===s)return void o._reportError(kt("Encountered undefined provider! Usually this means you have a circular dependencies. This might be caused by using 'barrel' index.ts files."));var l=e.reduce(function(e,t,n){return n<a?e.push(""+Dp(t)):n==a?e.push("?"+Dp(t)+"?"):n==a+1&&e.push("..."),e},[]).join(", ");return void o._reportError(kt("Invalid "+(n||"provider")+" - only instances of Provider and Type are allowed, got: ["+l+"]"),i)}u=new dn(s,{useClass:s})}u.token===o._reflector.resolveExternalReference($t.ANALYZE_FOR_ENTRY_COMPONENTS)?t.push.apply(t,f(o._getEntryComponentsFromProvider(u,i))):r.push(o.getProviderMetadata(u))}}),r},e.prototype._validateProvider=function(e){e.hasOwnProperty("useClass")&&null==e.useClass&&this._reportError(kt("Invalid provider for "+Dp(e.provide)+". useClass cannot be "+e.useClass+".\n Usually it happens when:\n 1. There's a circular dependency (might be caused by using index.ts (barrel) files).\n 2. Class was used before it was declared. Use forwardRef in this case."))},e.prototype._getEntryComponentsFromProvider=function(e,t){var n=this,r=[],i=[];return e.useFactory||e.useExisting||e.useClass?(this._reportError(kt("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!"),t),[]):e.multi?(function o(e,t){xt(e,new Rp,t)}(e.useValue,i),i.forEach(function(e){var t=n._getEntryComponentMetadata(e.reference,!1);t&&r.push(t)}),r):(this._reportError(kt("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!"),t),[])},e.prototype._getEntryComponentMetadata=function(e,t){void 0===t&&(t=!0);var n=this.getNonNormalizedDirectiveMetadata(e);if(n&&n.metadata.isComponent)return{componentType:e,componentFactory:n.metadata.componentFactory};var r=this._loadSummary(e,tn.Directive);if(r&&r.isComponent)return{componentType:e,componentFactory:r.componentFactory};if(t)throw kt(e.name+" cannot be used as an entry component.");return null},e.prototype._getInjectableTypeMetadata=function(e,t){void 0===t&&(t=null);var n=this._loadSummary(e,tn.Injectable);return n?n.type:this._getTypeMetadata(e,t)},e.prototype.getProviderMetadata=function(e){var t=void 0,n=null,r=null,i=this._getTokenMetadata(e.token);return e.useClass?(t=(n=this._getInjectableTypeMetadata(e.useClass,e.dependencies)).diDeps,e.token===e.useClass&&(i={identifier:n})):e.useFactory&&(t=(r=this._getFactoryMetadata(e.useFactory,e.dependencies)).diDeps),{token:i,useClass:n,useValue:e.useValue,useFactory:r,useExisting:e.useExisting?this._getTokenMetadata(e.useExisting):void 0,deps:t,multi:e.multi}},e.prototype._getQueriesMetadata=function(e,t,n){var r=this,i=[];return Object.keys(e).forEach(function(o){var s=e[o];s.isViewQuery===t&&i.push(r._getQueryMetadata(s,o,n))}),i},e.prototype._queryVarBindings=function(e){return e.split(/\s*,\s*/)},e.prototype._getQueryMetadata=function(e,t,n){var r,i=this;return"string"==typeof e.selector?r=this._queryVarBindings(e.selector).map(function(e){return i._getTokenMetadata(e)}):e.selector?r=[this._getTokenMetadata(e.selector)]:(this._reportError(kt("Can't construct a query for the property \""+t+'" of "'+Dp(n)+"\" since the query selector wasn't defined."),n),r=[]),{selectors:r,first:e.first,descendants:e.descendants,propertyName:t,read:e.read?this._getTokenMetadata(e.read):null,static:e.static}},e.prototype._reportError=function(e,t,n){if(!this._errorCollector)throw e;this._errorCollector(e,t),n&&this._errorCollector(e,n)},e}();function Mp(e){return function t(e){return e?Array.from(new Set(e)):[]}(function e(t,n){if(void 0===n&&(n=[]),t)for(var r=0;r<t.length;r++){var i=Dt(t[r]);Array.isArray(i)?e(i,n):n.push(i)}return n}(e))}function Op(e){return e instanceof Yt||e instanceof ne}var Rp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.visitOther=function(e,t){t.push({reference:e})},t}(Ct);function Dp(e){return e instanceof Yt?e.name+" in "+e.filePath:Rt(e)}ct("_l");var Lp=function(){function e(e){this._reflector=e}return e.prototype.isNgModule=function(e){return this._reflector.annotations(e).some(X.isTypeOf)},e.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=$c(this._reflector.annotations(e),X.isTypeOf);if(n)return n;if(t)throw new Error("No NgModule metadata found for '"+Rt(e)+"'.");return null},e}(),Fp=(function(e){function t(t,n){var r=e.call(this,!1)||this;return r.referenceFilter=t,r.importFilter=n,r.typeExpression=0,r.importsWithPrefixes=new Map,r.reexports=new Map,r}o(t,e),t.prototype.visitType=function(e,t,n){void 0===n&&(n="any"),e?(this.typeExpression++,e.visitType(this,t),this.typeExpression--):t.print(null,n)},t.prototype.visitLiteralExpr=function(t,n){var r=t.value;return null==r&&t.type!=fe?(n.print(t,"("+r+" as any)"),null):e.prototype.visitLiteralExpr.call(this,t,n)},t.prototype.visitLiteralArrayExpr=function(t,n){0===t.entries.length&&n.print(t,"(");var r=e.prototype.visitLiteralArrayExpr.call(this,t,n);return 0===t.entries.length&&n.print(t," as any[])"),r},t.prototype.visitExternalExpr=function(e,t){return this._visitIdentifier(e.value,e.typeParams,t),null},t.prototype.visitAssertNotNullExpr=function(t,n){var r=e.prototype.visitAssertNotNullExpr.call(this,t,n);return n.print(t,"!"),r},t.prototype.visitDeclareVarStmt=function(e,t){if(e.hasModifier(ke.Exported)&&e.value instanceof Oe&&!e.type){var n=e.value.value,r=n.name,i=n.moduleName;if(i){var o=this.reexports.get(i);return o||this.reexports.set(i,o=[]),o.push({name:r,as:e.name}),null}}return e.hasModifier(ke.Exported)&&t.print(e,"export "),e.hasModifier(ke.Final)?t.print(e,"const"):t.print(e,"var"),t.print(e," "+e.name),this._printColonType(e.type,t),e.value&&(t.print(e," = "),e.value.visitExpression(this,t)),t.println(e,";"),null},t.prototype.visitWrappedNodeExpr=function(e,t){throw new Error("Cannot visit a WrappedNodeExpr when outputting Typescript.")},t.prototype.visitCastExpr=function(e,t){return t.print(e,"(<"),e.type.visitType(this,t),t.print(e,">"),e.value.visitExpression(this,t),t.print(e,")"),null},t.prototype.visitInstantiateExpr=function(e,t){return t.print(e,"new "),this.typeExpression++,e.classExpr.visitExpression(this,t),this.typeExpression--,t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null},t.prototype.visitDeclareClassStmt=function(e,t){var n=this;return t.pushClass(e),e.hasModifier(ke.Exported)&&t.print(e,"export "),t.print(e,"class "+e.name),null!=e.parent&&(t.print(e," extends "),this.typeExpression++,e.parent.visitExpression(this,t),this.typeExpression--),t.println(e," {"),t.incIndent(),e.fields.forEach(function(e){return n._visitClassField(e,t)}),null!=e.constructorMethod&&this._visitClassConstructor(e,t),e.getters.forEach(function(e){return n._visitClassGetter(e,t)}),e.methods.forEach(function(e){return n._visitClassMethod(e,t)}),t.decIndent(),t.println(e,"}"),t.popClass(),null},t.prototype._visitClassField=function(e,t){e.hasModifier(ke.Private)&&t.print(null,"/*private*/ "),e.hasModifier(ke.Static)&&t.print(null,"static "),t.print(null,e.name),this._printColonType(e.type,t),e.initializer&&(t.print(null," = "),e.initializer.visitExpression(this,t)),t.println(null,";")},t.prototype._visitClassGetter=function(e,t){e.hasModifier(ke.Private)&&t.print(null,"private "),t.print(null,"get "+e.name+"()"),this._printColonType(e.type,t),t.println(null," {"),t.incIndent(),this.visitAllStatements(e.body,t),t.decIndent(),t.println(null,"}")},t.prototype._visitClassConstructor=function(e,t){t.print(e,"constructor("),this._visitParams(e.constructorMethod.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.constructorMethod.body,t),t.decIndent(),t.println(e,"}")},t.prototype._visitClassMethod=function(e,t){e.hasModifier(ke.Private)&&t.print(null,"private "),t.print(null,e.name+"("),this._visitParams(e.params,t),t.print(null,")"),this._printColonType(e.type,t,"void"),t.println(null," {"),t.incIndent(),this.visitAllStatements(e.body,t),t.decIndent(),t.println(null,"}")},t.prototype.visitFunctionExpr=function(e,t){return e.name&&(t.print(e,"function "),t.print(e,e.name)),t.print(e,"("),this._visitParams(e.params,t),t.print(e,")"),this._printColonType(e.type,t,"void"),e.name||t.print(e," => "),t.println(e,"{"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print(e,"}"),null},t.prototype.visitDeclareFunctionStmt=function(e,t){return e.hasModifier(ke.Exported)&&t.print(e,"export "),t.print(e,"function "+e.name+"("),this._visitParams(e.params,t),t.print(e,")"),this._printColonType(e.type,t,"void"),t.println(e," {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println(e,"}"),null},t.prototype.visitTryCatchStmt=function(e,t){t.println(e,"try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println(e,"} catch ("+wi.name+") {"),t.incIndent();var n=[xi.set(wi.prop("stack",null)).toDeclStmt(null,[ke.Final])].concat(e.catchStmts);return this.visitAllStatements(n,t),t.decIndent(),t.println(e,"}"),null},t.prototype.visitBuiltinType=function(e,t){var n;switch(e.name){case se.Bool:n="boolean";break;case se.Dynamic:n="any";break;case se.Function:n="Function";break;case se.Number:case se.Int:n="number";break;case se.String:n="string";break;case se.None:n="never";break;default:throw new Error("Unsupported builtin type "+e.name)}return t.print(null,n),null},t.prototype.visitExpressionType=function(e,t){var n=this;return e.value.visitExpression(this,t),null!==e.typeParams&&(t.print(null,"<"),this.visitAllObjects(function(e){return n.visitType(e,t)},e.typeParams,t,","),t.print(null,">")),null},t.prototype.visitArrayType=function(e,t){return this.visitType(e.of,t),t.print(null,"[]"),null},t.prototype.visitMapType=function(e,t){return t.print(null,"{[key: string]:"),this.visitType(e.valueType,t),t.print(null,"}"),null},t.prototype.getBuiltinMethodName=function(e){var t;switch(e){case we.ConcatArray:t="concat";break;case we.SubscribeObservable:t="subscribe";break;case we.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t},t.prototype._visitParams=function(e,t){var n=this;this.visitAllObjects(function(e){t.print(null,e.name),n._printColonType(e.type,t)},e,t,",")},t.prototype._visitIdentifier=function(e,t,n){var r=this,i=e.name,o=e.moduleName;if(this.referenceFilter&&this.referenceFilter(e))n.print(null,"(null as any)");else{if(o&&(!this.importFilter||!this.importFilter(e))){var s=this.importsWithPrefixes.get(o);null==s&&this.importsWithPrefixes.set(o,s="i"+this.importsWithPrefixes.size),n.print(null,s+".")}n.print(null,i),this.typeExpression>0&&(t||[]).length>0&&(n.print(null,"<"),this.visitAllObjects(function(e){return e.visitType(r,n)},t,n,","),n.print(null,">"))}},t.prototype._printColonType=function(e,t,n){e!==fe&&(t.print(null,":"),this.visitType(e,t,n))}}(Ci),function(){function e(e){this._reflector=e}return e.prototype.isPipe=function(e){var t=this._reflector.annotations(Dt(e));return t&&t.some(z.isTypeOf)},e.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=this._reflector.annotations(Dt(e));if(n){var r=$c(n,z.isTypeOf);if(r)return r}if(t)throw new Error("No Pipe decorator found on "+Rt(e));return null},e}()),jp=(ct("_l"),ct("_v"),ct("_ck"),ct("_co"),ct("en"),ct("ad"),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}o(t,e),t.prototype.convert=function(e,t){var n=this;return t?e.map(function(e){return e.visit(n,t)}):e},t.prototype.visitTagPlaceholder=function(e,t){var n=this,r=t.toPublicName(e.startName),i=e.closeName?t.toPublicName(e.closeName):e.closeName,o=e.children.map(function(e){return e.visit(n,t)});return new Rn(e.tag,e.attrs,r,i,o,e.isVoid,e.sourceSpan)},t.prototype.visitPlaceholder=function(e,t){return new Dn(e.value,t.toPublicName(e.name),e.sourceSpan)},t.prototype.visitIcuPlaceholder=function(e,t){return new Ln(e.value,t.toPublicName(e.name),e.sourceSpan)}}(Fn),/^(?!.*\.d\.ts$).*\.ts$/),Vp=function Vp(e,t){this.symbol=e,this.metadata=t},Hp=function(){function e(e,t,n,r){this.host=e,this.staticSymbolCache=t,this.summaryResolver=n,this.errorRecorder=r,this.metadataCache=new Map,this.resolvedSymbols=new Map,this.resolvedFilePaths=new Set,this.importAs=new Map,this.symbolResourcePaths=new Map,this.symbolFromFile=new Map,this.knownFileNameToModuleNames=new Map}return e.prototype.resolveSymbol=function(e){return e.members.length>0?this._resolveSymbolMembers(e):this._resolveSymbolFromSummary(e)||this.resolvedSymbols.get(e)||(this._createSymbolsOf(e.filePath),this.resolvedSymbols.get(e))},e.prototype.getImportAs=function(e,t){if(void 0===t&&(t=!0),e.members.length){var n=this.getStaticSymbol(e.filePath,e.name);return(o=this.getImportAs(n,t))?this.getStaticSymbol(o.filePath,o.name,e.members):null}var r=function i(e){return e.replace(Ep,".")}(e.filePath);if(r!==e.filePath){var o,s=function a(e){return e.replace(Sp,"")}(e.name);return n=this.getStaticSymbol(r,s,e.members),(o=this.getImportAs(n,t))?this.getStaticSymbol(function u(e,t){void 0===t&&(t=!1);var n=Np(Tp(e),t);return n[0]+".ngsummary"+n[1]}(o.filePath),function l(e){return e+"NgSummary"}(o.name),n.members):null}var c=t&&this.summaryResolver.getImportAs(e)||null;return c||(c=this.importAs.get(e)),c},e.prototype.getResourcePath=function(e){return this.symbolResourcePaths.get(e)||e.filePath},e.prototype.getTypeArity=function(e){if(function t(e){return xp.test(e)}(e.filePath))return null;for(var n=Up(this.resolveSymbol(e));n&&n.metadata instanceof Yt;)n=Up(this.resolveSymbol(n.metadata));return n&&n.metadata&&n.metadata.arity||null},e.prototype.getKnownModuleName=function(e){return this.knownFileNameToModuleNames.get(e)||null},e.prototype.recordImportAs=function(e,t){e.assertNoMembers(),t.assertNoMembers(),this.importAs.set(e,t)},e.prototype.recordModuleNameForFileName=function(e,t){this.knownFileNameToModuleNames.set(e,t)},e.prototype.invalidateFile=function(e){var t,n;this.metadataCache.delete(e),this.resolvedFilePaths.delete(e);var r=this.symbolFromFile.get(e);if(r){this.symbolFromFile.delete(e);try{for(var i=p(r),o=i.next();!o.done;o=i.next()){var s=o.value;this.resolvedSymbols.delete(s),this.importAs.delete(s),this.symbolResourcePaths.delete(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}},e.prototype.ignoreErrorsFor=function(e){var t=this.errorRecorder;this.errorRecorder=function(){};try{return e()}finally{this.errorRecorder=t}},e.prototype._resolveSymbolMembers=function(e){var t=e.members,n=this.resolveSymbol(this.getStaticSymbol(e.filePath,e.name));if(!n)return null;var r=Up(n.metadata);if(r instanceof Yt)return new Vp(e,this.getStaticSymbol(r.filePath,r.name,t));if(!r||"class"!==r.__symbolic){for(var i=r,o=0;o<t.length&&i;o++)i=i[t[o]];return new Vp(e,i)}return r.statics&&1===t.length?new Vp(e,r.statics[t[0]]):null},e.prototype._resolveSymbolFromSummary=function(e){var t=this.summaryResolver.resolveSummary(e);return t?new Vp(e,t.metadata):null},e.prototype.getStaticSymbol=function(e,t,n){return this.staticSymbolCache.get(e,t,n)},e.prototype.hasDecorators=function(e){var t=this.getModuleMetadata(e);return!!t.metadata&&Object.keys(t.metadata).some(function(e){var n=t.metadata[e];return n&&"class"===n.__symbolic&&n.decorators})},e.prototype.getSymbolsOf=function(e){var t=this.summaryResolver.getSymbolsOf(e);if(t)return t;this._createSymbolsOf(e);var n=[];return this.resolvedSymbols.forEach(function(t){t.symbol.filePath===e&&n.push(t.symbol)}),n},e.prototype._createSymbolsOf=function(e){var t,n,r=this;if(!this.resolvedFilePaths.has(e)){this.resolvedFilePaths.add(e);var i=[],o=this.getModuleMetadata(e);if(o.importAs&&this.knownFileNameToModuleNames.set(e,o.importAs),o.exports){var s=function(t){if(t.export)t.export.forEach(function(n){var o,s=o=Bp(o="string"==typeof n?n:n.as);"string"!=typeof n&&(s=Bp(n.name));var a=r.resolveModule(t.from,e);if(a){var u=r.getStaticSymbol(a,s),l=r.getStaticSymbol(e,o);i.push(r.createExport(l,u))}});else{var n=a.resolveModule(t.from,e);n&&a.getSymbolsOf(n).forEach(function(t){var n=r.getStaticSymbol(e,t.name);i.push(r.createExport(n,t))})}},a=this;try{for(var u=p(o.exports),l=u.next();!l.done;l=u.next())s(l.value)}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}}if(o.metadata){var c=new Set(Object.keys(o.metadata).map(Bp)),h=o.origins||{};Object.keys(o.metadata).forEach(function(t){var n=o.metadata[t],s=Bp(t),a=r.getStaticSymbol(e,s),u=h.hasOwnProperty(t)&&h[t];if(u){var l=r.resolveModule(u,e);l?r.symbolResourcePaths.set(a,l):r.reportError(new Error("Couldn't resolve original symbol for "+u+" from "+r.host.getOutputName(e)))}i.push(r.createResolvedSymbol(a,e,c,n))})}i.forEach(function(e){return r.resolvedSymbols.set(e.symbol,e)}),this.symbolFromFile.set(e,i.map(function(e){return e.symbol}))}},e.prototype.createResolvedSymbol=function(e,t,n,r){var i,s=this,u=jp.test(e.filePath);if(this.summaryResolver.isLibraryFile(e.filePath)&&!u&&r&&"class"===r.__symbolic)return new Vp(e,{__symbolic:"class",arity:r.arity});var l=function(){return i||(i=s.host.getOutputName(t.replace(/((\.ts)|(\.d\.ts)|)$/,".ts").replace(/^.*node_modules[\/\\]/,""))),i},c=this,p=xt(r,new(function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return o(i,r),i.prototype.visitStringMap=function(i,o){var s=i.__symbolic;if("function"===s){var u=o.length;o.push.apply(o,f(i.parameters||[]));var p=r.prototype.visitStringMap.call(this,i,o);return o.length=u,p}if("reference"!==s)return"error"===s?a({},i,{fileName:l()}):r.prototype.visitStringMap.call(this,i,o);var h=i.module,d=i.name?Bp(i.name):i.name;if(!d)return null;var v=void 0;return h?(v=c.resolveModule(h,e.filePath))?{__symbolic:"resolved",symbol:c.getStaticSymbol(v,d),line:i.line,character:i.character,fileName:l()}:{__symbolic:"error",message:"Could not resolve "+h+" relative to "+c.host.getMetadataFor(e.filePath)+".",line:i.line,character:i.character,fileName:l()}:o.indexOf(d)>=0?{__symbolic:"reference",name:d}:n.has(d)?c.getStaticSymbol(t,d):void 0},i}(Ct)),[]),h=Up(p);return h instanceof Yt?this.createExport(e,h):new Vp(e,p)},e.prototype.createExport=function(e,t){return e.assertNoMembers(),t.assertNoMembers(),this.summaryResolver.isLibraryFile(e.filePath)&&this.summaryResolver.isLibraryFile(t.filePath)&&this.importAs.set(t,this.getImportAs(e)||e),new Vp(e,t)},e.prototype.reportError=function(e,t,n){if(!this.errorRecorder)throw e;this.errorRecorder(e,t&&t.filePath||n)},e.prototype.getModuleMetadata=function(e){var t=this.metadataCache.get(e);if(!t){var n=this.host.getMetadataFor(e);if(n){var r=-1;n.forEach(function(e){e&&e.version>r&&(r=e.version,t=e)})}if(t||(t={__symbolic:"module",version:4,module:e,metadata:{}}),4!=t.version){var i=2==t.version?"Unsupported metadata version "+t.version+" for module "+e+". This module should be compiled with a newer version of ngc":"Metadata version mismatch for module "+this.host.getOutputName(e)+", found version "+t.version+", expected 4";this.reportError(new Error(i))}this.metadataCache.set(e,t)}return t},e.prototype.getSymbolByModule=function(e,t,n){var r=this.resolveModule(e,n);return r?this.getStaticSymbol(r,t):(this.reportError(new Error("Could not resolve module "+e+(n?" relative to "+this.host.getOutputName(n):""))),this.getStaticSymbol("ERROR:"+e,t))},e.prototype.resolveModule=function(e,t){try{return this.host.moduleNameToFileName(e,t)}catch(n){console.error("Could not resolve module '"+e+"' relative to file "+t),this.reportError(n,void 0,t)}return null},e}();
|
|
485
492
|
/**
|
|
486
493
|
* @license
|
|
487
494
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -510,7 +517,7 @@ var Bc=function Bc(e){var t=void 0===e?{}:e,n=t.defaultEncapsulation,r=t.useJit,
|
|
|
510
517
|
* Use of this source code is governed by an MIT-style license that can be
|
|
511
518
|
* found in the LICENSE file at https://angular.io/license
|
|
512
519
|
*/
|
|
513
|
-
var zp="ngFormattedMessage",Wp="@angular/core",Qp=/^\$.*\$$/,Gp={__symbolic:"ignore"},$p=new Set(["useValue","useFactory","data","id","loadChildren"]);function Xp(e){return e&&"ignore"==e.__symbolic}var Yp=function(){function e(e,t,n,r,i){var o=this;void 0===n&&(n=[]),void 0===r&&(r=[]),this.summaryResolver=e,this.symbolResolver=t,this.errorRecorder=i,this.annotationCache=new Map,this.shallowAnnotationCache=new Map,this.propertyCache=new Map,this.parameterCache=new Map,this.methodCache=new Map,this.staticCache=new Map,this.conversionMap=new Map,this.resolvedExternalReferences=new Map,this.annotationForParentClassWithSummaryKind=new Map,this.initializeConversionMap(),n.forEach(function(e){return o._registerDecoratorOrConstructor(o.getStaticSymbol(e.filePath,e.name),e.ctor)}),r.forEach(function(e){return o._registerFunction(o.getStaticSymbol(e.filePath,e.name),e.fn)}),this.annotationForParentClassWithSummaryKind.set(tn.Directive,[H,K]),this.annotationForParentClassWithSummaryKind.set(tn.Pipe,[z]),this.annotationForParentClassWithSummaryKind.set(tn.NgModule,[X]),this.annotationForParentClassWithSummaryKind.set(tn.Injectable,[Y,z,H,K,X])}return e.prototype.componentModuleUrl=function(e){var t=this.findSymbolDeclaration(e);return this.symbolResolver.getResourcePath(t)},e.prototype.resolveExternalReference=function(e,t){var n=void 0;if(!t){var r=this.resolvedExternalReferences.get(n=e.moduleName+":"+e.name);if(r)return r}var i=this.symbolResolver.getSymbolByModule(e.moduleName,e.name,t),o=this.findSymbolDeclaration(i);return t||(this.symbolResolver.recordModuleNameForFileName(i.filePath,e.moduleName),this.symbolResolver.recordImportAs(o,i)),n&&this.resolvedExternalReferences.set(n,o),o},e.prototype.findDeclaration=function(e,t,n){return this.findSymbolDeclaration(this.symbolResolver.getSymbolByModule(e,t,n))},e.prototype.tryFindDeclaration=function(e,t,n){var r=this;return this.symbolResolver.ignoreErrorsFor(function(){return r.findDeclaration(e,t,n)})},e.prototype.findSymbolDeclaration=function(e){var t=this.symbolResolver.resolveSymbol(e);if(t){var n=t.metadata;if(n&&"resolved"===n.__symbolic&&(n=n.symbol),n instanceof Yt)return this.findSymbolDeclaration(t.metadata)}return e},e.prototype.tryAnnotations=function(e){var t=this.errorRecorder;this.errorRecorder=function(e,t){};try{return this.annotations(e)}finally{this.errorRecorder=t}},e.prototype.annotations=function(e){var t=this;return this._annotations(e,function(e,n){return t.simplify(e,n)},this.annotationCache)},e.prototype.shallowAnnotations=function(e){var t=this;return this._annotations(e,function(e,n){return t.simplify(e,n,!0)},this.shallowAnnotationCache)},e.prototype._annotations=function(e,t,n){var r=n.get(e);if(!r){r=[];var i=this.getTypeMetadata(e),o=this.findParentType(e,i);if(o){var s=this.annotations(o);r.push.apply(r,f(s))}var a=[];if(i.decorators&&(a=t(e,i.decorators))&&r.push.apply(r,f(a)),o&&!this.summaryResolver.isLibraryFile(e.filePath)&&this.summaryResolver.isLibraryFile(o.filePath)){var u=this.summaryResolver.resolveSummary(o);if(u&&u.type){var l=this.annotationForParentClassWithSummaryKind.get(u.type.summaryKind);l.some(function(e){return a.some(function(t){return e.isTypeOf(t)})})||this.reportError(ph(Jp("Class "+e.name+" in "+e.filePath+" extends from a "+tn[u.type.summaryKind]+" in another compilation unit without duplicating the decorator",void 0,"Please add a "+l.map(function(e){return e.ngMetadataName}).join(" or ")+" decorator to the class"),e),e)}}n.set(e,r.filter(function(e){return!!e}))}return r},e.prototype.propMetadata=function(e){var t=this,n=this.propertyCache.get(e);if(!n){var r=this.getTypeMetadata(e);n={};var i=this.findParentType(e,r);if(i){var o=this.propMetadata(i);Object.keys(o).forEach(function(e){n[e]=o[e]})}var s=r.members||{};Object.keys(s).forEach(function(r){var i=s[r].find(function(e){return"property"==e.__symbolic||"method"==e.__symbolic}),o=[];n[r]&&o.push.apply(o,f(n[r])),n[r]=o,i&&i.decorators&&o.push.apply(o,f(t.simplify(e,i.decorators)))}),this.propertyCache.set(e,n)}return n},e.prototype.parameters=function(e){var t=this;if(!(e instanceof Yt))return this.reportError(new Error("parameters received "+JSON.stringify(e)+" which is not a StaticSymbol"),e),[];try{var n=this.parameterCache.get(e);if(!n){var r=this.getTypeMetadata(e),i=this.findParentType(e,r),o=r?r.members:null,s=o?o.__ctor__:null;if(s){var a=s.find(function(e){return"constructor"==e.__symbolic}),u=a.parameters||[],l=this.simplify(e,a.parameterDecorators||[]);n=[],u.forEach(function(r,i){var o=[],s=t.trySimplify(e,r);s&&o.push(s);var a=l?l[i]:null;a&&o.push.apply(o,f(a)),n.push(o)})}else i&&(n=this.parameters(i));n||(n=[]),this.parameterCache.set(e,n)}return n}catch(t){throw console.error("Failed on type "+JSON.stringify(e)+" with error "+t),t}},e.prototype._methodNames=function(e){var t=this.methodCache.get(e);if(!t){var n=this.getTypeMetadata(e);t={};var r=this.findParentType(e,n);if(r){var i=this._methodNames(r);Object.keys(i).forEach(function(e){t[e]=i[e]})}var o=n.members||{};Object.keys(o).forEach(function(e){var n=o[e].some(function(e){return"method"==e.__symbolic});t[e]=t[e]||n}),this.methodCache.set(e,t)}return t},e.prototype._staticMembers=function(e){var t=this.staticCache.get(e);if(!t){var n=this.getTypeMetadata(e);t=Object.keys(n.statics||{}),this.staticCache.set(e,t)}return t},e.prototype.findParentType=function(e,t){var n=this.trySimplify(e,t.extends);if(n instanceof Yt)return n},e.prototype.hasLifecycleHook=function(e,t){e instanceof Yt||this.reportError(new Error("hasLifecycleHook received "+JSON.stringify(e)+" which is not a StaticSymbol"),e);try{return!!this._methodNames(e)[t]}catch(t){throw console.error("Failed on type "+JSON.stringify(e)+" with error "+t),t}},e.prototype.guards=function(e){var t,n;if(!(e instanceof Yt))return this.reportError(new Error("guards received "+JSON.stringify(e)+" which is not a StaticSymbol"),e),{};var r=this._staticMembers(e),i={};try{for(var o=p(r),s=o.next();!s.done;s=o.next()){var a=s.value;if(a.endsWith("TypeGuard")){var u=a.substr(0,a.length-"TypeGuard".length),l=void 0;u.endsWith("UseIf")?(u=a.substr(0,u.length-"UseIf".length),l="UseIf"):l=this.getStaticSymbol(e.filePath,e.name,[a]),i[u]=l}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i},e.prototype._registerDecoratorOrConstructor=function(e,t){this.conversionMap.set(e,function(e,n){return new(t.bind.apply(t,f([void 0],n)))})},e.prototype._registerFunction=function(e,t){this.conversionMap.set(e,function(e,n){return t.apply(void 0,n)})},e.prototype.initializeConversionMap=function(){this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Injectable"),Y),this.injectionToken=this.findDeclaration(Wp,"InjectionToken"),this.opaqueToken=this.findDeclaration(Wp,"OpaqueToken"),this.ROUTES=this.tryFindDeclaration("@angular/router","ROUTES"),this.ANALYZE_FOR_ENTRY_COMPONENTS=this.findDeclaration(Wp,"ANALYZE_FOR_ENTRY_COMPONENTS"),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Host"),te),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Self"),J),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"SkipSelf"),ee),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Inject"),O),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Optional"),Z),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Attribute"),D),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"ContentChild"),F),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"ContentChildren"),L),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"ViewChild"),V),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"ViewChildren"),j),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Input"),W),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Output"),Q),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Pipe"),z),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"HostBinding"),G),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"HostListener"),$),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Directive"),H),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Component"),K),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"NgModule"),X),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Host"),te),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Self"),J),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"SkipSelf"),ee),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Optional"),Z)},e.prototype.getStaticSymbol=function(e,t,n){return this.symbolResolver.getStaticSymbol(e,t,n)},e.prototype.trySimplify=function(e,t){var n=this.errorRecorder;this.errorRecorder=function(e,t){};var r=this.simplify(e,t);return this.errorRecorder=n,r},e.prototype.simplify=function(e,t,n){void 0===n&&(n=!1);var r,i=this,o=lh.empty,s=new Map;try{r=function e(t,n,r,a){function u(e){var t=i.symbolResolver.resolveSymbol(e);return t?t.metadata:null}function l(n){return e(t,n,r,0)}function c(n,o){if(n===t)return e(n,o,r+1,a);try{return e(n,o,r+1,a)}catch(e){if(!eh(e))throw e;var s=e.chain?"references '"+e.symbol.name+"'":function u(e){if(e.summary)return e.summary;switch(e.message){case th:if(e.context&&e.context.className)return"references non-exported class "+e.context.className;break;case nh:return"is not initialized";case rh:return"is a destructured variable";case ih:return"could not be resolved";case oh:return e.context&&e.context.name?"calls '"+e.context.name+"'":"calls a function";case sh:return e.context&&e.context.name?"references local variable "+e.context.name:"references a local variable"}return"contains the error"}(e);i.error({message:e.message,advise:e.advise,context:e.context,chain:{message:"'"+n.name+"' "+s,position:e.position,next:e.chain},symbol:n},t)}}return function n(h){var d,v,m,y;if(uh(h))return h;if(h instanceof Array){var g=[];try{for(var _=p(h),b=_.next();!b.done;b=_.next()){var w=b.value;if(w&&"spread"===w.__symbolic){var x=l(w.expression);if(Array.isArray(x)){try{for(var E=p(x),S=E.next();!S.done;S=E.next())g.push(S.value)}catch(e){m={error:e}}finally{try{S&&!S.done&&(y=E.return)&&y.call(E)}finally{if(m)throw m.error}}continue}}var C=n(w);Xp(C)||g.push(C)}}catch(e){d={error:e}}finally{try{b&&!b.done&&(v=_.return)&&v.call(_)}finally{if(d)throw d.error}}return g}if(h instanceof Yt)return h===i.injectionToken||i.conversionMap.has(h)||a>0&&!h.members.length?h:null!=(L=u(T=h))?c(T,L):T;if(h){if(h.__symbolic){var T=void 0;switch(h.__symbolic){case"binop":var N=n(h.left);if(Xp(N))return N;var k=n(h.right);if(Xp(k))return k;switch(h.operator){case"&&":return N&&k;case"||":return N||k;case"|":return N|k;case"^":return N^k;case"&":return N&k;case"==":return N==k;case"!=":return N!=k;case"===":return N===k;case"!==":return N!==k;case"<":return N<k;case">":return N>k;case"<=":return N<=k;case">=":return N>=k;case"<<":return N<<k;case">>":return N>>k;case"+":return N+k;case"-":return N-k;case"*":return N*k;case"/":return N/k;case"%":return N%k}return null;case"if":var A=n(h.condition);return n(A?h.thenExpression:h.elseExpression);case"pre":var P=n(h.operand);if(Xp(P))return P;switch(h.operator){case"+":return P;case"-":return-P;case"!":return!P;case"~":return~P}return null;case"index":var I=l(h.expression),M=l(h.index);return I&&uh(M)?I[M]:null;case"select":var O=h.member,R=t,D=n(h.expression);if(D instanceof Yt){var L,F=D.members.concat(O);return null!=(L=u(R=i.getStaticSymbol(D.filePath,D.name,F)))?c(R,L):R}return D&&uh(O)?c(R,D[O]):null;case"reference":var j=o.resolve(h.name);if(j!=lh.missing)return j;break;case"resolved":try{return n(h.symbol)}catch(e){throw eh(e)&&null!=h.fileName&&null!=h.line&&null!=h.character&&(e.position={fileName:h.fileName,line:h.line,column:h.character}),e}case"class":case"function":return t;case"new":case"call":if((T=e(t,h.expression,r+1,0))instanceof Yt){if(T===i.injectionToken||T===i.opaqueToken)return t;var V=h.arguments||[],H=i.conversionMap.get(T);if(H){var B=V.map(function(e){return c(t,e)}).map(function(e){return Xp(e)?void 0:e});return H(t,B)}return function U(e,a,u,l){if(a&&"function"==a.__symbolic){s.get(e)&&i.error({message:"Recursion is not supported",summary:"called '"+e.name+"' recursively",value:a},e);try{var p=a.value;if(p&&(0!=r||"error"!=p.__symbolic)){var h=a.parameters,d=a.defaults;u=u.map(function(e){return c(t,e)}).map(function(e){return Xp(e)?void 0:e}),d&&d.length>u.length&&u.push.apply(u,f(d.slice(u.length).map(function(e){return n(e)}))),s.set(e,!0);for(var v=lh.build(),m=0;m<h.length;m++)v.define(h[m],u[m]);var y,g=o;try{o=v.done(),y=c(e,p)}finally{o=g}return y}}finally{s.delete(e)}}if(0===r)return Gp;var _=void 0;if(l&&"resolved"==l.__symbolic){var b=l.line,w=l.character,x=l.fileName;null!=x&&null!=b&&null!=w&&(_={fileName:x,line:b,column:w})}i.error({message:oh,context:e,value:a,position:_},t)}(T,u(T),V,h.expression)}return Gp;case"error":var q=h.message;return i.error(null!=h.line?{message:q,context:h.context,value:h,position:{fileName:h.fileName,line:h.line,column:h.character}}:{message:q,context:h.context},t),Gp;case"ignore":return h}return null}return function K(e,t){if(!e)return{};var n={};return Object.keys(e).forEach(function(r){var i=t(e[r],r);Xp(i)||(Qp.test(r)?Object.defineProperty(n,r,{enumerable:!1,configurable:!0,value:i}):n[r]=i)}),n}(h,function(o,s){if($p.has(s)){if("useValue"===s&&"provide"in h){var u=n(h.provide);if(u===i.ROUTES||u==i.ANALYZE_FOR_ENTRY_COMPONENTS)return n(o)}return function l(n){return e(t,n,r,a+1)}(o)}return n(o)})}return Gp}(n)}(e,t,0,n?1:0)}catch(t){if(!this.errorRecorder)throw ph(t,e);this.reportError(t,e)}if(!Xp(r))return r},e.prototype.getTypeMetadata=function(e){var t=this.symbolResolver.resolveSymbol(e);return t&&t.metadata?t.metadata:{__symbolic:"class"}},e.prototype.reportError=function(e,t,n){if(!this.errorRecorder)throw e;this.errorRecorder(ph(e,t),t&&t.filePath||n)},e.prototype.error=function(e,t){this.reportError(Jp(e.message,e.summary,e.advise,e.position,e.symbol,e.context,e.chain),t)},e}(),Zp="ngMetadataError";function Jp(e,t,n,r,i,o,s){var a=kt(e);return a[Zp]=!0,n&&(a.advise=n),r&&(a.position=r),t&&(a.summary=t),o&&(a.context=o),s&&(a.chain=s),i&&(a.symbol=i),a}function eh(e){return!!e[Zp]}var th="Reference to non-exported class",nh="Variable not initialized",rh="Destructuring not supported",ih="Could not resolve type",oh="Function call not supported",sh="Reference to a local symbol",ah="Lambda not supported";function uh(e){return null===e||"function"!=typeof e&&"object"!=typeof e}var lh=function(){function e(){}return e.build=function(){var t=new Map;return{define:function(e,n){return t.set(e,n),this},done:function(){return t.size>0?new ch(t):e.empty}}},e.missing={},e.empty={resolve:function(t){return e.missing}},e}(),ch=function(e){function t(t){var n=e.call(this)||this;return n.bindings=t,n}return o(t,e),t.prototype.resolve=function(e){return this.bindings.has(e)?this.bindings.get(e):lh.missing},t}(lh);function ph(e,t){return eh(e)?function r(e){var t=kt(function e(t,n){if(void 0===n&&(n=0),!t)return"";var r=t.position?t.position.fileName+"("+(t.position.line+1)+","+(t.position.column+1)+")":"",i=(r&&0===n?r+": ":"")+t.message+(r&&0!==n?" at "+r:"");return""+function e(t){if(t<=0)return"";if(t<6)return[""," "," "," "," "," "][t];var n=e(Math.floor(t/2));return n+n+(t%2==1?" ":"")}(n)+i+(t.next&&"\n"+e(t.next,n+2)||"")}(e)+".");return t[zp]=!0,t.chain=e,t.position=e.position,t}(function e(t,n){return{message:function r(e,t){switch(e){case th:if(t&&t.className)return"References to a non-exported class are not supported in decorators but "+t.className+" was referenced.";break;case nh:return"Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler";case rh:return"Referencing an exported destructured variable or constant is not supported in decorators and this value is needed by the template compiler";case ih:if(t&&t.typeName)return"Could not resolve type "+t.typeName;break;case oh:return t&&t.name?"Function calls are not supported in decorators but '"+t.name+"' was called":"Function calls are not supported in decorators";case sh:if(t&&t.name)return"Reference to a local (non-exported) symbols are not supported in decorators but '"+t.name+"' was referenced";break;case ah:return"Function expressions are not supported in decorators"}return e}(t.message,t.context)+(t.symbol?" in '"+t.symbol.name+"'":""),position:t.position,next:t.next?e(t.next,n):n?{message:n}:void 0}}({message:"Error during template compile of '"+t.name+"'",position:e.position,next:{message:e.message,next:e.chain,context:e.context,symbol:e.symbol}},e.advise||function n(e,t){switch(e){case th:if(t&&t.className)return"Consider exporting '"+t.className+"'";break;case rh:return"Consider simplifying to avoid destructuring";case sh:if(t&&t.name)return"Consider exporting '"+t.name+"'";break;case ah:return"Consider changing the function expression into an exported function"}}(e.message,e.context))):e}
|
|
520
|
+
var zp="ngFormattedMessage",Wp="@angular/core",Qp=/^\$.*\$$/,$p={__symbolic:"ignore"},Gp=new Set(["useValue","useFactory","data","id","loadChildren"]);function Xp(e){return e&&"ignore"==e.__symbolic}var Yp=function(){function e(e,t,n,r,i){var o=this;void 0===n&&(n=[]),void 0===r&&(r=[]),this.summaryResolver=e,this.symbolResolver=t,this.errorRecorder=i,this.annotationCache=new Map,this.shallowAnnotationCache=new Map,this.propertyCache=new Map,this.parameterCache=new Map,this.methodCache=new Map,this.staticCache=new Map,this.conversionMap=new Map,this.resolvedExternalReferences=new Map,this.annotationForParentClassWithSummaryKind=new Map,this.initializeConversionMap(),n.forEach(function(e){return o._registerDecoratorOrConstructor(o.getStaticSymbol(e.filePath,e.name),e.ctor)}),r.forEach(function(e){return o._registerFunction(o.getStaticSymbol(e.filePath,e.name),e.fn)}),this.annotationForParentClassWithSummaryKind.set(tn.Directive,[H,K]),this.annotationForParentClassWithSummaryKind.set(tn.Pipe,[z]),this.annotationForParentClassWithSummaryKind.set(tn.NgModule,[X]),this.annotationForParentClassWithSummaryKind.set(tn.Injectable,[Y,z,H,K,X])}return e.prototype.componentModuleUrl=function(e){var t=this.findSymbolDeclaration(e);return this.symbolResolver.getResourcePath(t)},e.prototype.resolveExternalReference=function(e,t){var n=void 0;if(!t){var r=this.resolvedExternalReferences.get(n=e.moduleName+":"+e.name);if(r)return r}var i=this.symbolResolver.getSymbolByModule(e.moduleName,e.name,t),o=this.findSymbolDeclaration(i);return t||(this.symbolResolver.recordModuleNameForFileName(i.filePath,e.moduleName),this.symbolResolver.recordImportAs(o,i)),n&&this.resolvedExternalReferences.set(n,o),o},e.prototype.findDeclaration=function(e,t,n){return this.findSymbolDeclaration(this.symbolResolver.getSymbolByModule(e,t,n))},e.prototype.tryFindDeclaration=function(e,t,n){var r=this;return this.symbolResolver.ignoreErrorsFor(function(){return r.findDeclaration(e,t,n)})},e.prototype.findSymbolDeclaration=function(e){var t=this.symbolResolver.resolveSymbol(e);if(t){var n=t.metadata;if(n&&"resolved"===n.__symbolic&&(n=n.symbol),n instanceof Yt)return this.findSymbolDeclaration(t.metadata)}return e},e.prototype.tryAnnotations=function(e){var t=this.errorRecorder;this.errorRecorder=function(e,t){};try{return this.annotations(e)}finally{this.errorRecorder=t}},e.prototype.annotations=function(e){var t=this;return this._annotations(e,function(e,n){return t.simplify(e,n)},this.annotationCache)},e.prototype.shallowAnnotations=function(e){var t=this;return this._annotations(e,function(e,n){return t.simplify(e,n,!0)},this.shallowAnnotationCache)},e.prototype._annotations=function(e,t,n){var r=n.get(e);if(!r){r=[];var i=this.getTypeMetadata(e),o=this.findParentType(e,i);if(o){var s=this.annotations(o);r.push.apply(r,f(s))}var a=[];if(i.decorators&&(a=t(e,i.decorators))&&r.push.apply(r,f(a)),o&&!this.summaryResolver.isLibraryFile(e.filePath)&&this.summaryResolver.isLibraryFile(o.filePath)){var u=this.summaryResolver.resolveSummary(o);if(u&&u.type){var l=this.annotationForParentClassWithSummaryKind.get(u.type.summaryKind);l.some(function(e){return a.some(function(t){return e.isTypeOf(t)})})||this.reportError(ph(Jp("Class "+e.name+" in "+e.filePath+" extends from a "+tn[u.type.summaryKind]+" in another compilation unit without duplicating the decorator",void 0,"Please add a "+l.map(function(e){return e.ngMetadataName}).join(" or ")+" decorator to the class"),e),e)}}n.set(e,r.filter(function(e){return!!e}))}return r},e.prototype.propMetadata=function(e){var t=this,n=this.propertyCache.get(e);if(!n){var r=this.getTypeMetadata(e);n={};var i=this.findParentType(e,r);if(i){var o=this.propMetadata(i);Object.keys(o).forEach(function(e){n[e]=o[e]})}var s=r.members||{};Object.keys(s).forEach(function(r){var i=s[r].find(function(e){return"property"==e.__symbolic||"method"==e.__symbolic}),o=[];n[r]&&o.push.apply(o,f(n[r])),n[r]=o,i&&i.decorators&&o.push.apply(o,f(t.simplify(e,i.decorators)))}),this.propertyCache.set(e,n)}return n},e.prototype.parameters=function(e){var t=this;if(!(e instanceof Yt))return this.reportError(new Error("parameters received "+JSON.stringify(e)+" which is not a StaticSymbol"),e),[];try{var n=this.parameterCache.get(e);if(!n){var r=this.getTypeMetadata(e),i=this.findParentType(e,r),o=r?r.members:null,s=o?o.__ctor__:null;if(s){var a=s.find(function(e){return"constructor"==e.__symbolic}),u=a.parameters||[],l=this.simplify(e,a.parameterDecorators||[]);n=[],u.forEach(function(r,i){var o=[],s=t.trySimplify(e,r);s&&o.push(s);var a=l?l[i]:null;a&&o.push.apply(o,f(a)),n.push(o)})}else i&&(n=this.parameters(i));n||(n=[]),this.parameterCache.set(e,n)}return n}catch(t){throw console.error("Failed on type "+JSON.stringify(e)+" with error "+t),t}},e.prototype._methodNames=function(e){var t=this.methodCache.get(e);if(!t){var n=this.getTypeMetadata(e);t={};var r=this.findParentType(e,n);if(r){var i=this._methodNames(r);Object.keys(i).forEach(function(e){t[e]=i[e]})}var o=n.members||{};Object.keys(o).forEach(function(e){var n=o[e].some(function(e){return"method"==e.__symbolic});t[e]=t[e]||n}),this.methodCache.set(e,t)}return t},e.prototype._staticMembers=function(e){var t=this.staticCache.get(e);if(!t){var n=this.getTypeMetadata(e);t=Object.keys(n.statics||{}),this.staticCache.set(e,t)}return t},e.prototype.findParentType=function(e,t){var n=this.trySimplify(e,t.extends);if(n instanceof Yt)return n},e.prototype.hasLifecycleHook=function(e,t){e instanceof Yt||this.reportError(new Error("hasLifecycleHook received "+JSON.stringify(e)+" which is not a StaticSymbol"),e);try{return!!this._methodNames(e)[t]}catch(t){throw console.error("Failed on type "+JSON.stringify(e)+" with error "+t),t}},e.prototype.guards=function(e){var t,n;if(!(e instanceof Yt))return this.reportError(new Error("guards received "+JSON.stringify(e)+" which is not a StaticSymbol"),e),{};var r=this._staticMembers(e),i={};try{for(var o=p(r),s=o.next();!s.done;s=o.next()){var a=s.value;if(a.endsWith("TypeGuard")){var u=a.substr(0,a.length-"TypeGuard".length),l=void 0;u.endsWith("UseIf")?(u=a.substr(0,u.length-"UseIf".length),l="UseIf"):l=this.getStaticSymbol(e.filePath,e.name,[a]),i[u]=l}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i},e.prototype._registerDecoratorOrConstructor=function(e,t){this.conversionMap.set(e,function(e,n){return new(t.bind.apply(t,f([void 0],n)))})},e.prototype._registerFunction=function(e,t){this.conversionMap.set(e,function(e,n){return t.apply(void 0,n)})},e.prototype.initializeConversionMap=function(){this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Injectable"),Y),this.injectionToken=this.findDeclaration(Wp,"InjectionToken"),this.opaqueToken=this.findDeclaration(Wp,"OpaqueToken"),this.ROUTES=this.tryFindDeclaration("@angular/router","ROUTES"),this.ANALYZE_FOR_ENTRY_COMPONENTS=this.findDeclaration(Wp,"ANALYZE_FOR_ENTRY_COMPONENTS"),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Host"),te),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Self"),J),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"SkipSelf"),ee),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Inject"),O),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Optional"),Z),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Attribute"),D),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"ContentChild"),F),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"ContentChildren"),L),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"ViewChild"),V),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"ViewChildren"),j),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Input"),W),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Output"),Q),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Pipe"),z),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"HostBinding"),$),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"HostListener"),G),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Directive"),H),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Component"),K),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"NgModule"),X),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Host"),te),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Self"),J),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"SkipSelf"),ee),this._registerDecoratorOrConstructor(this.findDeclaration(Wp,"Optional"),Z)},e.prototype.getStaticSymbol=function(e,t,n){return this.symbolResolver.getStaticSymbol(e,t,n)},e.prototype.trySimplify=function(e,t){var n=this.errorRecorder;this.errorRecorder=function(e,t){};var r=this.simplify(e,t);return this.errorRecorder=n,r},e.prototype.simplify=function(e,t,n){void 0===n&&(n=!1);var r,i=this,o=lh.empty,s=new Map;try{r=function e(t,n,r,a){function u(e){var t=i.symbolResolver.resolveSymbol(e);return t?t.metadata:null}function l(n){return e(t,n,r,0)}function c(n,o){if(n===t)return e(n,o,r+1,a);try{return e(n,o,r+1,a)}catch(e){if(!eh(e))throw e;var s=e.chain?"references '"+e.symbol.name+"'":function u(e){if(e.summary)return e.summary;switch(e.message){case th:if(e.context&&e.context.className)return"references non-exported class "+e.context.className;break;case nh:return"is not initialized";case rh:return"is a destructured variable";case ih:return"could not be resolved";case oh:return e.context&&e.context.name?"calls '"+e.context.name+"'":"calls a function";case sh:return e.context&&e.context.name?"references local variable "+e.context.name:"references a local variable"}return"contains the error"}(e);i.error({message:e.message,advise:e.advise,context:e.context,chain:{message:"'"+n.name+"' "+s,position:e.position,next:e.chain},symbol:n},t)}}return function n(h){var d,v,m,y;if(uh(h))return h;if(h instanceof Array){var g=[];try{for(var _=p(h),b=_.next();!b.done;b=_.next()){var w=b.value;if(w&&"spread"===w.__symbolic){var x=l(w.expression);if(Array.isArray(x)){try{for(var E=p(x),S=E.next();!S.done;S=E.next())g.push(S.value)}catch(e){m={error:e}}finally{try{S&&!S.done&&(y=E.return)&&y.call(E)}finally{if(m)throw m.error}}continue}}var C=n(w);Xp(C)||g.push(C)}}catch(e){d={error:e}}finally{try{b&&!b.done&&(v=_.return)&&v.call(_)}finally{if(d)throw d.error}}return g}if(h instanceof Yt)return h===i.injectionToken||i.conversionMap.has(h)||a>0&&!h.members.length?h:null!=(L=u(T=h))?c(T,L):T;if(h){if(h.__symbolic){var T=void 0;switch(h.__symbolic){case"binop":var N=n(h.left);if(Xp(N))return N;var k=n(h.right);if(Xp(k))return k;switch(h.operator){case"&&":return N&&k;case"||":return N||k;case"|":return N|k;case"^":return N^k;case"&":return N&k;case"==":return N==k;case"!=":return N!=k;case"===":return N===k;case"!==":return N!==k;case"<":return N<k;case">":return N>k;case"<=":return N<=k;case">=":return N>=k;case"<<":return N<<k;case">>":return N>>k;case"+":return N+k;case"-":return N-k;case"*":return N*k;case"/":return N/k;case"%":return N%k}return null;case"if":var A=n(h.condition);return n(A?h.thenExpression:h.elseExpression);case"pre":var P=n(h.operand);if(Xp(P))return P;switch(h.operator){case"+":return P;case"-":return-P;case"!":return!P;case"~":return~P}return null;case"index":var I=l(h.expression),M=l(h.index);return I&&uh(M)?I[M]:null;case"select":var O=h.member,R=t,D=n(h.expression);if(D instanceof Yt){var L,F=D.members.concat(O);return null!=(L=u(R=i.getStaticSymbol(D.filePath,D.name,F)))?c(R,L):R}return D&&uh(O)?c(R,D[O]):null;case"reference":var j=o.resolve(h.name);if(j!=lh.missing)return j;break;case"resolved":try{return n(h.symbol)}catch(e){throw eh(e)&&null!=h.fileName&&null!=h.line&&null!=h.character&&(e.position={fileName:h.fileName,line:h.line,column:h.character}),e}case"class":case"function":return t;case"new":case"call":if((T=e(t,h.expression,r+1,0))instanceof Yt){if(T===i.injectionToken||T===i.opaqueToken)return t;var V=h.arguments||[],H=i.conversionMap.get(T);if(H){var B=V.map(function(e){return c(t,e)}).map(function(e){return Xp(e)?void 0:e});return H(t,B)}return function U(e,a,u,l){if(a&&"function"==a.__symbolic){s.get(e)&&i.error({message:"Recursion is not supported",summary:"called '"+e.name+"' recursively",value:a},e);try{var p=a.value;if(p&&(0!=r||"error"!=p.__symbolic)){var h=a.parameters,d=a.defaults;u=u.map(function(e){return c(t,e)}).map(function(e){return Xp(e)?void 0:e}),d&&d.length>u.length&&u.push.apply(u,f(d.slice(u.length).map(function(e){return n(e)}))),s.set(e,!0);for(var v=lh.build(),m=0;m<h.length;m++)v.define(h[m],u[m]);var y,g=o;try{o=v.done(),y=c(e,p)}finally{o=g}return y}}finally{s.delete(e)}}if(0===r)return $p;var _=void 0;if(l&&"resolved"==l.__symbolic){var b=l.line,w=l.character,x=l.fileName;null!=x&&null!=b&&null!=w&&(_={fileName:x,line:b,column:w})}i.error({message:oh,context:e,value:a,position:_},t)}(T,u(T),V,h.expression)}return $p;case"error":var q=h.message;return i.error(null!=h.line?{message:q,context:h.context,value:h,position:{fileName:h.fileName,line:h.line,column:h.character}}:{message:q,context:h.context},t),$p;case"ignore":return h}return null}return function K(e,t){if(!e)return{};var n={};return Object.keys(e).forEach(function(r){var i=t(e[r],r);Xp(i)||(Qp.test(r)?Object.defineProperty(n,r,{enumerable:!1,configurable:!0,value:i}):n[r]=i)}),n}(h,function(o,s){if(Gp.has(s)){if("useValue"===s&&"provide"in h){var u=n(h.provide);if(u===i.ROUTES||u==i.ANALYZE_FOR_ENTRY_COMPONENTS)return n(o)}return function l(n){return e(t,n,r,a+1)}(o)}return n(o)})}return $p}(n)}(e,t,0,n?1:0)}catch(t){if(!this.errorRecorder)throw ph(t,e);this.reportError(t,e)}if(!Xp(r))return r},e.prototype.getTypeMetadata=function(e){var t=this.symbolResolver.resolveSymbol(e);return t&&t.metadata?t.metadata:{__symbolic:"class"}},e.prototype.reportError=function(e,t,n){if(!this.errorRecorder)throw e;this.errorRecorder(ph(e,t),t&&t.filePath||n)},e.prototype.error=function(e,t){this.reportError(Jp(e.message,e.summary,e.advise,e.position,e.symbol,e.context,e.chain),t)},e}(),Zp="ngMetadataError";function Jp(e,t,n,r,i,o,s){var a=kt(e);return a[Zp]=!0,n&&(a.advise=n),r&&(a.position=r),t&&(a.summary=t),o&&(a.context=o),s&&(a.chain=s),i&&(a.symbol=i),a}function eh(e){return!!e[Zp]}var th="Reference to non-exported class",nh="Variable not initialized",rh="Destructuring not supported",ih="Could not resolve type",oh="Function call not supported",sh="Reference to a local symbol",ah="Lambda not supported";function uh(e){return null===e||"function"!=typeof e&&"object"!=typeof e}var lh=function(){function e(){}return e.build=function(){var t=new Map;return{define:function(e,n){return t.set(e,n),this},done:function(){return t.size>0?new ch(t):e.empty}}},e.missing={},e.empty={resolve:function(t){return e.missing}},e}(),ch=function(e){function t(t){var n=e.call(this)||this;return n.bindings=t,n}return o(t,e),t.prototype.resolve=function(e){return this.bindings.has(e)?this.bindings.get(e):lh.missing},t}(lh);function ph(e,t){return eh(e)?function r(e){var t=kt(function e(t,n){if(void 0===n&&(n=0),!t)return"";var r=t.position?t.position.fileName+"("+(t.position.line+1)+","+(t.position.column+1)+")":"",i=(r&&0===n?r+": ":"")+t.message+(r&&0!==n?" at "+r:"");return""+function e(t){if(t<=0)return"";if(t<6)return[""," "," "," "," "," "][t];var n=e(Math.floor(t/2));return n+n+(t%2==1?" ":"")}(n)+i+(t.next&&"\n"+e(t.next,n+2)||"")}(e)+".");return t[zp]=!0,t.chain=e,t.position=e.position,t}(function e(t,n){return{message:function r(e,t){switch(e){case th:if(t&&t.className)return"References to a non-exported class are not supported in decorators but "+t.className+" was referenced.";break;case nh:return"Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler";case rh:return"Referencing an exported destructured variable or constant is not supported in decorators and this value is needed by the template compiler";case ih:if(t&&t.typeName)return"Could not resolve type "+t.typeName;break;case oh:return t&&t.name?"Function calls are not supported in decorators but '"+t.name+"' was called":"Function calls are not supported in decorators";case sh:if(t&&t.name)return"Reference to a local (non-exported) symbols are not supported in decorators but '"+t.name+"' was referenced";break;case ah:return"Function expressions are not supported in decorators"}return e}(t.message,t.context)+(t.symbol?" in '"+t.symbol.name+"'":""),position:t.position,next:t.next?e(t.next,n):n?{message:n}:void 0}}({message:"Error during template compile of '"+t.name+"'",position:e.position,next:{message:e.message,next:e.chain,context:e.context,symbol:e.symbol}},e.advise||function n(e,t){switch(e){case th:if(t&&t.className)return"Consider exporting '"+t.className+"'";break;case rh:return"Consider simplifying to avoid destructuring";case sh:if(t&&t.name)return"Consider exporting '"+t.name+"'";break;case ah:return"Consider changing the function expression into an exported function"}}(e.message,e.context))):e}
|
|
514
521
|
/**
|
|
515
522
|
* @license
|
|
516
523
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -574,7 +581,7 @@ function dh(){return new gh(".")}var vh,mh,yh,gh=function(){function e(e){void 0
|
|
|
574
581
|
*
|
|
575
582
|
* Use of this source code is governed by an MIT-style license that can be
|
|
576
583
|
* found in the LICENSE file at https://angular.io/license
|
|
577
|
-
*/(e,n));var i=bh(n),o=this._packagePrefix;if(null!=o&&null!=i&&"package"==i[vh.Scheme]){var s=i[vh.Path];return(o=o.replace(/\/+$/,""))+"/"+s.replace(/^\/+/,"")}return n},e}(),_h=new RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function bh(e){return e.match(_h)}function wh(e){var t=e[vh.Path];return t=null==t?"":function n(e){if("/"==e)return"/";for(var t="/"==e[0]?"/":"",n="/"===e[e.length-1]?"/":"",r=e.split("/"),i=[],o=0,s=0;s<r.length;s++){var a=r[s];switch(a){case"":case".":break;case"..":i.length>0?i.pop():o++;break;default:i.push(a)}}if(""==t){for(;o-- >0;)i.unshift("..");0===i.length&&i.push(".")}return t+i.join("/")+n}(t),e[vh.Path]=t,function r(e,t,n,i,o,s,a){var u=[];return null!=e&&u.push(e+":"),null!=n&&(u.push("//"),null!=t&&u.push(t+"@"),u.push(n),null!=i&&u.push(":"+i)),null!=o&&u.push(o),null!=s&&u.push("?"+s),null!=a&&u.push("#"+a),u.join("")}(e[vh.Scheme],e[vh.UserInfo],e[vh.Domain],e[vh.Port],t,e[vh.QueryData],e[vh.Fragment])}!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"}(vh||(vh={})),function(e){function t(t,n,r,i,o,s,a){var u=e.call(this)||this;return u.bindings=t,u.symbols=n,u.usedPipes=r,u.nestingLevel=i,u.scope=o,u.template=s,u.level=a,u.pipesUsed=[],u.visitNode=function(e){return e.visit(u)},u}o(t,e),t.apply=function(e,n){var r=new Map,i=new Map,o=new Map,s=new Set;return new t(r,i,s,o,n,e instanceof Sn?e:null,0).ingest(e),{expressions:r,symbols:i,nestingLevel:o,usedPipes:s}},t.prototype.ingest=function(e){e instanceof Sn?(e.inputs.forEach(this.visitNode),e.outputs.forEach(this.visitNode),e.templateAttrs.forEach(this.visitNode),e.variables.forEach(this.visitNode),e.children.forEach(this.visitNode),this.nestingLevel.set(e,this.level)):e.forEach(this.visitNode)},t.prototype.visitElement=function(e){e.inputs.forEach(this.visitNode),e.outputs.forEach(this.visitNode),e.children.forEach(this.visitNode)},t.prototype.visitTemplate=function(e){e.inputs.forEach(this.visitNode),e.outputs.forEach(this.visitNode),e.templateAttrs.forEach(this.visitNode),e.references.forEach(this.visitNode);var n=this.scope.getChildScope(e);new t(this.bindings,this.symbols,this.usedPipes,this.nestingLevel,n,e,this.level+1).ingest(e)},t.prototype.visitVariable=function(e){null!==this.template&&this.symbols.set(e,this.template)},t.prototype.visitReference=function(e){null!==this.template&&this.symbols.set(e,this.template)},t.prototype.visitText=function(e){},t.prototype.visitContent=function(e){},t.prototype.visitTextAttribute=function(e){},t.prototype.visitIcu=function(e){},t.prototype.visitBoundAttribute=function(e){e.value.visit(this)},t.prototype.visitBoundEvent=function(e){e.handler.visit(this)},t.prototype.visitBoundText=function(e){e.value.visit(this)},t.prototype.visitPipe=function(t,n){return this.usedPipes.add(t.name),e.prototype.visitPipe.call(this,t,n)},t.prototype.visitPropertyRead=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitPropertyRead.call(this,t,n)},t.prototype.visitSafePropertyRead=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitSafePropertyRead.call(this,t,n)},t.prototype.visitPropertyWrite=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitPropertyWrite.call(this,t,n)},t.prototype.visitMethodCall=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitMethodCall.call(this,t,n)},t.prototype.visitSafeMethodCall=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitSafeMethodCall.call(this,t,n)},t.prototype.maybeMap=function(e,t,n){if(t.receiver instanceof No){var r=this.scope.lookup(n);null!==r&&this.bindings.set(t,r)}}}(
|
|
584
|
+
*/(e,n));var i=bh(n),o=this._packagePrefix;if(null!=o&&null!=i&&"package"==i[vh.Scheme]){var s=i[vh.Path];return(o=o.replace(/\/+$/,""))+"/"+s.replace(/^\/+/,"")}return n},e}(),_h=new RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function bh(e){return e.match(_h)}function wh(e){var t=e[vh.Path];return t=null==t?"":function n(e){if("/"==e)return"/";for(var t="/"==e[0]?"/":"",n="/"===e[e.length-1]?"/":"",r=e.split("/"),i=[],o=0,s=0;s<r.length;s++){var a=r[s];switch(a){case"":case".":break;case"..":i.length>0?i.pop():o++;break;default:i.push(a)}}if(""==t){for(;o-- >0;)i.unshift("..");0===i.length&&i.push(".")}return t+i.join("/")+n}(t),e[vh.Path]=t,function r(e,t,n,i,o,s,a){var u=[];return null!=e&&u.push(e+":"),null!=n&&(u.push("//"),null!=t&&u.push(t+"@"),u.push(n),null!=i&&u.push(":"+i)),null!=o&&u.push(o),null!=s&&u.push("?"+s),null!=a&&u.push("#"+a),u.join("")}(e[vh.Scheme],e[vh.UserInfo],e[vh.Domain],e[vh.Port],t,e[vh.QueryData],e[vh.Fragment])}!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"}(vh||(vh={})),function(e){function t(t,n,r,i,o,s,a){var u=e.call(this)||this;return u.bindings=t,u.symbols=n,u.usedPipes=r,u.nestingLevel=i,u.scope=o,u.template=s,u.level=a,u.pipesUsed=[],u.visitNode=function(e){return e.visit(u)},u}o(t,e),t.apply=function(e,n){var r=new Map,i=new Map,o=new Map,s=new Set;return new t(r,i,s,o,n,e instanceof Sn?e:null,0).ingest(e),{expressions:r,symbols:i,nestingLevel:o,usedPipes:s}},t.prototype.ingest=function(e){e instanceof Sn?(e.inputs.forEach(this.visitNode),e.outputs.forEach(this.visitNode),e.templateAttrs.forEach(this.visitNode),e.variables.forEach(this.visitNode),e.children.forEach(this.visitNode),this.nestingLevel.set(e,this.level)):e.forEach(this.visitNode)},t.prototype.visitElement=function(e){e.inputs.forEach(this.visitNode),e.outputs.forEach(this.visitNode),e.children.forEach(this.visitNode)},t.prototype.visitTemplate=function(e){e.inputs.forEach(this.visitNode),e.outputs.forEach(this.visitNode),e.templateAttrs.forEach(this.visitNode),e.references.forEach(this.visitNode);var n=this.scope.getChildScope(e);new t(this.bindings,this.symbols,this.usedPipes,this.nestingLevel,n,e,this.level+1).ingest(e)},t.prototype.visitVariable=function(e){null!==this.template&&this.symbols.set(e,this.template)},t.prototype.visitReference=function(e){null!==this.template&&this.symbols.set(e,this.template)},t.prototype.visitText=function(e){},t.prototype.visitContent=function(e){},t.prototype.visitTextAttribute=function(e){},t.prototype.visitIcu=function(e){},t.prototype.visitBoundAttribute=function(e){e.value.visit(this)},t.prototype.visitBoundEvent=function(e){e.handler.visit(this)},t.prototype.visitBoundText=function(e){e.value.visit(this)},t.prototype.visitPipe=function(t,n){return this.usedPipes.add(t.name),e.prototype.visitPipe.call(this,t,n)},t.prototype.visitPropertyRead=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitPropertyRead.call(this,t,n)},t.prototype.visitSafePropertyRead=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitSafePropertyRead.call(this,t,n)},t.prototype.visitPropertyWrite=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitPropertyWrite.call(this,t,n)},t.prototype.visitMethodCall=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitMethodCall.call(this,t,n)},t.prototype.visitSafeMethodCall=function(t,n){return this.maybeMap(n,t,t.name),e.prototype.visitSafeMethodCall.call(this,t,n)},t.prototype.maybeMap=function(e,t,n){if(t.receiver instanceof No){var r=this.scope.lookup(n);null!==r&&this.bindings.set(t,r)}}}(Go),
|
|
578
585
|
/**
|
|
579
586
|
* @license
|
|
580
587
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -597,7 +604,7 @@ function xh(e){(e.ng||(e.ng={})).ɵcompilerFacade=new kc}(Ht),function(e){e[e.An
|
|
|
597
604
|
* Use of this source code is governed by an MIT-style license that can be
|
|
598
605
|
* found in the LICENSE file at https://angular.io/license
|
|
599
606
|
*/
|
|
600
|
-
var Mh=n.ModifierFlags?function(e){return!!(n.getCombinedModifierFlags(e)&n.ModifierFlags.Private)}:function(e){return!!(e.flags&n.NodeFlags.Private)},Oh=n.ObjectFlags?function(e){return!!(e.flags&n.TypeFlags.Object&&e.objectFlags&n.ObjectFlags.Reference)}:function(e){return!!(e.flags&n.TypeFlags.Reference)},Rh=function(){function e(e,t,n,r){this.program=e,this.checker=t,this.source=n,this.fetchPipes=r,this.typeCache=new Map}return e.prototype.getTypeKind=function(e){return function e(t){var r,i;if(t){if(t.flags&n.TypeFlags.Any)return mh.Any;if(t.flags&(n.TypeFlags.String|n.TypeFlags.StringLike|n.TypeFlags.StringLiteral))return mh.String;if(t.flags&(n.TypeFlags.Number|n.TypeFlags.NumberLike))return mh.Number;if(t.flags&n.TypeFlags.Undefined)return mh.Undefined;if(t.flags&n.TypeFlags.Null)return mh.Null;if(t.flags&n.TypeFlags.Union){var o=null,s=t;if(s.types.length>0){o=e(s.types[0]);try{for(var a=p(s.types),u=a.next();!u.done;u=a.next())if(o!=e(u.value))return mh.Other}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}if(null!=o)return o}else if(t.flags&n.TypeFlags.TypeParameter)return mh.Unbound}return mh.Other}(this.getTsTypeOf(e))},e.prototype.getBuiltinType=function(e){var t=this.typeCache.get(e);if(!t){var n=Yh(e,{checker:this.checker,node:this.source,program:this.program});t=new jh(n,{program:this.program,checker:this.checker,node:this.source}),this.typeCache.set(e,t)}return t},e.prototype.getTypeUnion=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=void 0;if(e.length){n=e[0];for(var r=1;r<e.length;r++)if(e[r]!=n){n=void 0;break}}return n||this.getBuiltinType(mh.Any)},e.prototype.getArrayType=function(e){return this.getBuiltinType(mh.Any)},e.prototype.getElementType=function(e){if(e instanceof jh){var t=tf(e.tsType,"Array");if(t)return new jh(t,e.context)}},e.prototype.getNonNullableType=function(e){if(e instanceof jh&&"function"==typeof this.checker.getNonNullableType){var t=e.tsType,n=this.checker.getNonNullableType(t);if(n!=t)return new jh(n,e.context);if(n==t)return e}return this.getBuiltinType(mh.Any)},e.prototype.getPipes=function(){var e=this.pipesCache;return e||(e=this.pipesCache=this.fetchPipes()),e},e.prototype.getTemplateContext=function(e){var t={node:this.source,program:this.program,checker:this.checker},n=$h(e,t);if(n){var r=this.getTemplateRefContextType(n);if(r)return new Vh(r,t).members()}},e.prototype.getTypeSymbol=function(e){var t={node:this.source,program:this.program,checker:this.checker},n=$h(e,t);return n&&new Vh(n,t)},e.prototype.createSymbolTable=function(e){var t=new zh;return t.addAll(e.map(function(e){return new Hh(e)})),t},e.prototype.mergeSymbolTable=function(e){var t,n,r=new zh;try{for(var i=p(e),o=i.next();!o.done;o=i.next())r.addAll(o.value.values())}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},e.prototype.getSpanAt=function(e,t){return function r(e,t,i){if(null!=t&&null!=i){var o=n.getPositionOfLineAndCharacter(e,t,i),s=n.forEachChild(e,function e(t){if(t.kind>n.SyntaxKind.LastToken&&t.pos<=o&&t.end>o)return n.forEachChild(t,e)||t});if(s)return{start:s.getStart(),end:s.getEnd()}}}(this.source,e,t)},e.prototype.getTemplateRefContextType=function(e){var t,n,r=this.checker.getTypeOfSymbolAtLocation(e,this.source),i=r.symbol&&r.symbol.members&&nf(r.symbol.members,"__constructor");if(i){var o=i.declarations[0];try{for(var s=p(o.parameters),a=s.next();!a.done;a=s.next()){var u=this.checker.getTypeAtLocation(a.value.type);if("TemplateRef"==u.symbol.name&&Oh(u)&&u.typeArguments&&1===u.typeArguments.length)return u.typeArguments[0].symbol}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}},e.prototype.getTsTypeOf=function(e){var t=this.getTypeWrapper(e);return t&&t.tsType},e.prototype.getTypeWrapper=function(e){var t=void 0;return e instanceof jh?t=e:e.type instanceof jh&&(t=e.type),t},e}();function Dh(e){var t=e.getCallSignatures();return t&&0!=t.length}function Lh(e,t){return e.getCallSignatures().map(function(e){return new Bh(e,t)})}function Fh(e,t,n){var r=e.getCallSignatures();return r.length?new Bh(r[0],t):void 0}var jh=function(){function e(e,t){if(this.tsType=e,this.context=t,this.kind="type",this.language="typescript",this.type=void 0,this.container=void 0,this.public=!0,!e)throw Error("Internal: null type")}return Object.defineProperty(e.prototype,"name",{get:function(){var e=this.tsType.symbol;return e&&e.name||"<anonymous>"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"callable",{get:function(){return Dh(this.tsType)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nullable",{get:function(){return this.context.checker.getNonNullableType(this.tsType)!=this.tsType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){var e=this.tsType.getSymbol();return e?Jh(e):void 0},enumerable:!0,configurable:!0}),e.prototype.members=function(){return new Kh(this.tsType.getProperties(),this.context)},e.prototype.signatures=function(){return Lh(this.tsType,this.context)},e.prototype.selectSignature=function(e){return Fh(this.tsType,this.context)},e.prototype.indexed=function(e){},e}(),Vh=function(){function e(e,t){this.context=t,this.nullable=!1,this.language="typescript",this.symbol=e&&t&&e.flags&n.SymbolFlags.Alias?t.checker.getAliasedSymbol(e):e}return Object.defineProperty(e.prototype,"name",{get:function(){return this.symbol.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kind",{get:function(){return this.callable?"method":"property"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return new jh(this.tsType,this.context)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return function e(t,r){var i,o;if(t.getFlags()&n.SymbolFlags.ClassMember&&t.declarations)try{for(var s=p(t.declarations),a=s.next();!a.done;a=s.next()){var u=ef(a.value);if(u){var l=r.checker.getTypeAtLocation(u);if(l)return new jh(l,r)}}}catch(e){i={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}(this.symbol,this.context)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"public",{get:function(){return!function e(t){return!!t.valueDeclaration&&Mh(t.valueDeclaration)}(this.symbol)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"callable",{get:function(){return Dh(this.tsType)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return Jh(this.symbol)},enumerable:!0,configurable:!0}),e.prototype.members=function(){if(!this._members)if(0!=(this.symbol.flags&(n.SymbolFlags.Class|n.SymbolFlags.Interface))){var e=this.context.checker.getDeclaredTypeOfSymbol(this.symbol),t=new jh(e,this.context);this._members=t.members()}else this._members=new Kh(this.symbol.members,this.context);return this._members},e.prototype.signatures=function(){return Lh(this.tsType,this.context)},e.prototype.selectSignature=function(e){return Fh(this.tsType,this.context)},e.prototype.indexed=function(e){},Object.defineProperty(e.prototype,"tsType",{get:function(){var e=this._tsType;return e||(e=this._tsType=this.context.checker.getTypeOfSymbolAtLocation(this.symbol,this.context.node)),e},enumerable:!0,configurable:!0}),e}(),Hh=function(){function e(e){this.declaration=e,this.language="ng-template",this.nullable=!1,this.public=!0}return Object.defineProperty(e.prototype,"name",{get:function(){return this.declaration.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kind",{get:function(){return this.declaration.kind},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.declaration.type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"callable",{get:function(){return this.declaration.type.callable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return this.declaration.definition},enumerable:!0,configurable:!0}),e.prototype.members=function(){return this.declaration.type.members()},e.prototype.signatures=function(){return this.declaration.type.signatures()},e.prototype.selectSignature=function(e){return this.declaration.type.selectSignature(e)},e.prototype.indexed=function(e){},e}(),Bh=function(){function e(e,t){this.signature=e,this.context=t}return Object.defineProperty(e.prototype,"arguments",{get:function(){return new Kh(this.signature.getParameters(),this.context)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"result",{get:function(){return new jh(this.signature.getReturnType(),this.context)},enumerable:!0,configurable:!0}),e}(),Uh=function(){function e(e,t){this.signature=e,this.resultType=t}return Object.defineProperty(e.prototype,"arguments",{get:function(){return this.signature.arguments},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"result",{get:function(){return this.resultType},enumerable:!0,configurable:!0}),e}(),qh=function(e){return function(t){var n,r,i,o;if(function s(e,t,n){var r=Ph(e);return void 0!==n?Ih(Ph(t),r)<=0&&Ih(Ph(n),r)>=0:Ih(Ph(t),r)<=0}(e,"2.2")){var a=new Map;try{for(var u=p(t),l=u.next();!l.done;l=u.next())a.set((d=l.value).name,d)}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return a}var c={};try{for(var h=p(t),f=h.next();!f.done;f=h.next()){var d;c[(d=f.value).name]=d}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}return c}},Kh=function(){function e(e,t){if(this.context=t,e=e||[],Array.isArray(e)){this.symbols=e;var r=qh(n.version);this.symbolTable=r(e)}else this.symbols=function i(e){if(!e)return[];var t=e;if("function"==typeof t.values)return Array.from(t.values());var n=[],r="function"==typeof t.hasOwnProperty?function(e){return t.hasOwnProperty(e)}:function(e){return!!t[e]};for(var i in t)r(i)&&n.push(t[i]);return n}(e),this.symbolTable=e}return Object.defineProperty(e.prototype,"size",{get:function(){return this.symbols.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var t=nf(this.symbolTable,e);return t?new Vh(t,this.context):void 0},e.prototype.has=function(e){var t=this.symbolTable;return"function"==typeof t.has?t.has(e):null!=t[e]},e.prototype.values=function(){var e=this;return this.symbols.map(function(t){return new Vh(t,e.context)})},e}(),zh=function(){function e(){this.map=new Map,this._values=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.map.size},enumerable:!0,configurable:!0}),e.prototype.get=function(e){return this.map.get(e)},e.prototype.add=function(e){if(this.map.has(e.name)){var t=this.map.get(e.name);this._values[this._values.indexOf(t)]=e}this.map.set(e.name,e),this._values.push(e)},e.prototype.addAll=function(e){var t,n;try{for(var r=p(e),i=r.next();!i.done;i=r.next())this.add(i.value)}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.has=function(e){return this.map.has(e)},e.prototype.values=function(){return this._values},e}(),Wh=function(){function e(e,t){this.pipes=e,this.context=t}return Object.defineProperty(e.prototype,"size",{get:function(){return this.pipes.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var t=this.pipes.find(function(t){return t.name==e});if(t)return new Gh(t,this.context)},e.prototype.has=function(e){return null!=this.pipes.find(function(t){return t.name==e})},e.prototype.values=function(){var e=this;return this.pipes.map(function(t){return new Gh(t,e.context)})},e}(),Qh=/[\\\/]([^\\\/]+)[\\\/]\1\.d\.ts$/,Gh=function(){function e(e,t){this.pipe=e,this.context=t,this.kind="pipe",this.language="typescript",this.container=void 0,this.callable=!0,this.nullable=!1,this.public=!0}return Object.defineProperty(e.prototype,"name",{get:function(){return this.pipe.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return new jh(this.tsType,this.context)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){var e=this.tsType.getSymbol();return e?Jh(e):void 0},enumerable:!0,configurable:!0}),e.prototype.members=function(){return Xh.instance},e.prototype.signatures=function(){return Lh(this.tsType,this.context)},e.prototype.selectSignature=function(e){var t=Fh(this.tsType,this.context);if(1==e.length){var n=e[0];if(n instanceof jh){var r=void 0;switch(this.name){case"async":switch(n.name){case"Observable":case"Promise":case"EventEmitter":r=tf(n.tsType,n.name);break;default:r=Yh(mh.Any,this.context)}break;case"slice":r=tf(n.tsType,"Array")}r&&(t=new Uh(t,new jh(r,n.context)))}}return t},e.prototype.indexed=function(e){},Object.defineProperty(e.prototype,"tsType",{get:function(){var e=this._tsType;if(!e){var t=this.findClassSymbol(this.pipe.type.reference);t&&(e=this._tsType=this.findTransformMethodType(t)),e||(e=this._tsType=Yh(mh.Any,this.context))}return e},enumerable:!0,configurable:!0}),e.prototype.findClassSymbol=function(e){return $h(e,this.context)},e.prototype.findTransformMethodType=function(e){var t=this.context.checker.getDeclaredTypeOfSymbol(e);if(t){var n=t.getProperty("transform");if(n)return this.context.checker.getTypeOfSymbolAtLocation(n,this.context.node)}},e}();function $h(e,n){var r=n.program.getSourceFile(e.filePath);if(!r){var i=e.filePath;if(i.match(Qh)){var o=t.join(t.dirname(i),"index.d.ts");r=n.program.getSourceFile(o)}}if(r)return(n.checker.getExportsOfModule(r.module||r.symbol)||[]).find(function(t){return t.name==e.name})}var Xh=function(){function e(){this.size=0}return e.prototype.get=function(e){},e.prototype.has=function(e){return!1},e.prototype.values=function(){return[]},e.instance=new e,e}();function Yh(e,t){var r,i=t.checker,o=t.node;switch(e){case mh.Any:r=i.getTypeAtLocation(Zh({kind:n.SyntaxKind.AsExpression,expression:{kind:n.SyntaxKind.TrueKeyword},type:{kind:n.SyntaxKind.AnyKeyword}},o));break;case mh.Boolean:r=i.getTypeAtLocation(Zh({kind:n.SyntaxKind.TrueKeyword},o));break;case mh.Null:r=i.getTypeAtLocation(Zh({kind:n.SyntaxKind.NullKeyword},o));break;case mh.Number:var s={kind:n.SyntaxKind.NumericLiteral,text:o.getText()};Zh({kind:n.SyntaxKind.ExpressionStatement,expression:s},o),r=i.getTypeAtLocation(s);break;case mh.String:r=i.getTypeAtLocation(Zh({kind:n.SyntaxKind.NoSubstitutionTemplateLiteral,text:o.getText()},o));break;case mh.Undefined:r=i.getTypeAtLocation(Zh({kind:n.SyntaxKind.VoidExpression,expression:{kind:n.SyntaxKind.NumericLiteral}},o));break;default:throw new Error("Internal error, unhandled literal kind "+e+":"+mh[e])}return r}function Zh(e,t){return e.parent=t,n.forEachChild(e,function(t){return Zh(t,e)}),e}function Jh(e){var t=e.declarations;if(t)return t.map(function(e){return{fileName:e.getSourceFile().fileName,span:{start:e.getStart(),end:e.getEnd()}}})}function ef(e){for(;e;){switch(e.kind){case n.SyntaxKind.ClassDeclaration:case n.SyntaxKind.InterfaceDeclaration:return e;case n.SyntaxKind.SourceFile:return}e=e.parent}}function tf(e,t){if(e&&e.symbol&&e.symbol.name==t){var n=e.typeArguments;if(n&&n.length<=1)return n[0]}}function nf(e,t){var n=e;return"function"==typeof n.get?n.get(t):n[t]}
|
|
607
|
+
var Mh=n.ModifierFlags?function(e){return!!(n.getCombinedModifierFlags(e)&n.ModifierFlags.Private)}:function(e){return!!(e.flags&n.NodeFlags.Private)},Oh=n.ObjectFlags?function(e){return!!(e.flags&n.TypeFlags.Object&&e.objectFlags&n.ObjectFlags.Reference)}:function(e){return!!(e.flags&n.TypeFlags.Reference)},Rh=function(){function e(e,t,n,r){this.program=e,this.checker=t,this.source=n,this.fetchPipes=r,this.typeCache=new Map}return e.prototype.getTypeKind=function(e){return function e(t){var r,i;if(t){if(t.flags&n.TypeFlags.Any)return mh.Any;if(t.flags&(n.TypeFlags.String|n.TypeFlags.StringLike|n.TypeFlags.StringLiteral))return mh.String;if(t.flags&(n.TypeFlags.Number|n.TypeFlags.NumberLike))return mh.Number;if(t.flags&n.TypeFlags.Undefined)return mh.Undefined;if(t.flags&n.TypeFlags.Null)return mh.Null;if(t.flags&n.TypeFlags.Union){var o=null,s=t;if(s.types.length>0){o=e(s.types[0]);try{for(var a=p(s.types),u=a.next();!u.done;u=a.next())if(o!=e(u.value))return mh.Other}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}if(null!=o)return o}else if(t.flags&n.TypeFlags.TypeParameter)return mh.Unbound}return mh.Other}(this.getTsTypeOf(e))},e.prototype.getBuiltinType=function(e){var t=this.typeCache.get(e);if(!t){var n=Yh(e,{checker:this.checker,node:this.source,program:this.program});t=new jh(n,{program:this.program,checker:this.checker,node:this.source}),this.typeCache.set(e,t)}return t},e.prototype.getTypeUnion=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=void 0;if(e.length){n=e[0];for(var r=1;r<e.length;r++)if(e[r]!=n){n=void 0;break}}return n||this.getBuiltinType(mh.Any)},e.prototype.getArrayType=function(e){return this.getBuiltinType(mh.Any)},e.prototype.getElementType=function(e){if(e instanceof jh){var t=tf(e.tsType,"Array");if(t)return new jh(t,e.context)}},e.prototype.getNonNullableType=function(e){if(e instanceof jh&&"function"==typeof this.checker.getNonNullableType){var t=e.tsType,n=this.checker.getNonNullableType(t);if(n!=t)return new jh(n,e.context);if(n==t)return e}return this.getBuiltinType(mh.Any)},e.prototype.getPipes=function(){var e=this.pipesCache;return e||(e=this.pipesCache=this.fetchPipes()),e},e.prototype.getTemplateContext=function(e){var t={node:this.source,program:this.program,checker:this.checker},n=Gh(e,t);if(n){var r=this.getTemplateRefContextType(n);if(r)return new Vh(r,t).members()}},e.prototype.getTypeSymbol=function(e){var t={node:this.source,program:this.program,checker:this.checker},n=Gh(e,t);return n&&new Vh(n,t)},e.prototype.createSymbolTable=function(e){var t=new zh;return t.addAll(e.map(function(e){return new Hh(e)})),t},e.prototype.mergeSymbolTable=function(e){var t,n,r=new zh;try{for(var i=p(e),o=i.next();!o.done;o=i.next())r.addAll(o.value.values())}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},e.prototype.getSpanAt=function(e,t){return function r(e,t,i){if(null!=t&&null!=i){var o=n.getPositionOfLineAndCharacter(e,t,i),s=n.forEachChild(e,function e(t){if(t.kind>n.SyntaxKind.LastToken&&t.pos<=o&&t.end>o)return n.forEachChild(t,e)||t});if(s)return{start:s.getStart(),end:s.getEnd()}}}(this.source,e,t)},e.prototype.getTemplateRefContextType=function(e){var t,n,r=this.checker.getTypeOfSymbolAtLocation(e,this.source),i=r.symbol&&r.symbol.members&&nf(r.symbol.members,"__constructor");if(i){var o=i.declarations[0];try{for(var s=p(o.parameters),a=s.next();!a.done;a=s.next()){var u=this.checker.getTypeAtLocation(a.value.type);if("TemplateRef"==u.symbol.name&&Oh(u)&&u.typeArguments&&1===u.typeArguments.length)return u.typeArguments[0].symbol}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}},e.prototype.getTsTypeOf=function(e){var t=this.getTypeWrapper(e);return t&&t.tsType},e.prototype.getTypeWrapper=function(e){var t=void 0;return e instanceof jh?t=e:e.type instanceof jh&&(t=e.type),t},e}();function Dh(e){var t=e.getCallSignatures();return t&&0!=t.length}function Lh(e,t){return e.getCallSignatures().map(function(e){return new Bh(e,t)})}function Fh(e,t,n){var r=e.getCallSignatures();return r.length?new Bh(r[0],t):void 0}var jh=function(){function e(e,t){if(this.tsType=e,this.context=t,this.kind="type",this.language="typescript",this.type=void 0,this.container=void 0,this.public=!0,!e)throw Error("Internal: null type")}return Object.defineProperty(e.prototype,"name",{get:function(){var e=this.tsType.symbol;return e&&e.name||"<anonymous>"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"callable",{get:function(){return Dh(this.tsType)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nullable",{get:function(){return this.context.checker.getNonNullableType(this.tsType)!=this.tsType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){var e=this.tsType.getSymbol();return e?Jh(e):void 0},enumerable:!0,configurable:!0}),e.prototype.members=function(){return new Kh(this.tsType.getProperties(),this.context)},e.prototype.signatures=function(){return Lh(this.tsType,this.context)},e.prototype.selectSignature=function(e){return Fh(this.tsType,this.context)},e.prototype.indexed=function(e){},e}(),Vh=function(){function e(e,t){this.context=t,this.nullable=!1,this.language="typescript",this.symbol=e&&t&&e.flags&n.SymbolFlags.Alias?t.checker.getAliasedSymbol(e):e}return Object.defineProperty(e.prototype,"name",{get:function(){return this.symbol.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kind",{get:function(){return this.callable?"method":"property"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return new jh(this.tsType,this.context)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return function e(t,r){var i,o;if(t.getFlags()&n.SymbolFlags.ClassMember&&t.declarations)try{for(var s=p(t.declarations),a=s.next();!a.done;a=s.next()){var u=ef(a.value);if(u){var l=r.checker.getTypeAtLocation(u);if(l)return new jh(l,r)}}}catch(e){i={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}(this.symbol,this.context)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"public",{get:function(){return!function e(t){return!!t.valueDeclaration&&Mh(t.valueDeclaration)}(this.symbol)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"callable",{get:function(){return Dh(this.tsType)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return Jh(this.symbol)},enumerable:!0,configurable:!0}),e.prototype.members=function(){if(!this._members)if(0!=(this.symbol.flags&(n.SymbolFlags.Class|n.SymbolFlags.Interface))){var e=this.context.checker.getDeclaredTypeOfSymbol(this.symbol),t=new jh(e,this.context);this._members=t.members()}else this._members=new Kh(this.symbol.members,this.context);return this._members},e.prototype.signatures=function(){return Lh(this.tsType,this.context)},e.prototype.selectSignature=function(e){return Fh(this.tsType,this.context)},e.prototype.indexed=function(e){},Object.defineProperty(e.prototype,"tsType",{get:function(){var e=this._tsType;return e||(e=this._tsType=this.context.checker.getTypeOfSymbolAtLocation(this.symbol,this.context.node)),e},enumerable:!0,configurable:!0}),e}(),Hh=function(){function e(e){this.declaration=e,this.language="ng-template",this.nullable=!1,this.public=!0}return Object.defineProperty(e.prototype,"name",{get:function(){return this.declaration.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kind",{get:function(){return this.declaration.kind},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.declaration.type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"callable",{get:function(){return this.declaration.type.callable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return this.declaration.definition},enumerable:!0,configurable:!0}),e.prototype.members=function(){return this.declaration.type.members()},e.prototype.signatures=function(){return this.declaration.type.signatures()},e.prototype.selectSignature=function(e){return this.declaration.type.selectSignature(e)},e.prototype.indexed=function(e){},e}(),Bh=function(){function e(e,t){this.signature=e,this.context=t}return Object.defineProperty(e.prototype,"arguments",{get:function(){return new Kh(this.signature.getParameters(),this.context)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"result",{get:function(){return new jh(this.signature.getReturnType(),this.context)},enumerable:!0,configurable:!0}),e}(),Uh=function(){function e(e,t){this.signature=e,this.resultType=t}return Object.defineProperty(e.prototype,"arguments",{get:function(){return this.signature.arguments},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"result",{get:function(){return this.resultType},enumerable:!0,configurable:!0}),e}(),qh=function(e){return function(t){var n,r,i,o;if(function s(e,t,n){var r=Ph(e);return void 0!==n?Ih(Ph(t),r)<=0&&Ih(Ph(n),r)>=0:Ih(Ph(t),r)<=0}(e,"2.2")){var a=new Map;try{for(var u=p(t),l=u.next();!l.done;l=u.next())a.set((d=l.value).name,d)}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return a}var c={};try{for(var h=p(t),f=h.next();!f.done;f=h.next()){var d;c[(d=f.value).name]=d}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}return c}},Kh=function(){function e(e,t){if(this.context=t,e=e||[],Array.isArray(e)){this.symbols=e;var r=qh(n.version);this.symbolTable=r(e)}else this.symbols=function i(e){if(!e)return[];var t=e;if("function"==typeof t.values)return Array.from(t.values());var n=[],r="function"==typeof t.hasOwnProperty?function(e){return t.hasOwnProperty(e)}:function(e){return!!t[e]};for(var i in t)r(i)&&n.push(t[i]);return n}(e),this.symbolTable=e}return Object.defineProperty(e.prototype,"size",{get:function(){return this.symbols.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var t=nf(this.symbolTable,e);return t?new Vh(t,this.context):void 0},e.prototype.has=function(e){var t=this.symbolTable;return"function"==typeof t.has?t.has(e):null!=t[e]},e.prototype.values=function(){var e=this;return this.symbols.map(function(t){return new Vh(t,e.context)})},e}(),zh=function(){function e(){this.map=new Map,this._values=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.map.size},enumerable:!0,configurable:!0}),e.prototype.get=function(e){return this.map.get(e)},e.prototype.add=function(e){if(this.map.has(e.name)){var t=this.map.get(e.name);this._values[this._values.indexOf(t)]=e}this.map.set(e.name,e),this._values.push(e)},e.prototype.addAll=function(e){var t,n;try{for(var r=p(e),i=r.next();!i.done;i=r.next())this.add(i.value)}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.has=function(e){return this.map.has(e)},e.prototype.values=function(){return this._values},e}(),Wh=function(){function e(e,t){this.pipes=e,this.context=t}return Object.defineProperty(e.prototype,"size",{get:function(){return this.pipes.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var t=this.pipes.find(function(t){return t.name==e});if(t)return new $h(t,this.context)},e.prototype.has=function(e){return null!=this.pipes.find(function(t){return t.name==e})},e.prototype.values=function(){var e=this;return this.pipes.map(function(t){return new $h(t,e.context)})},e}(),Qh=/[\\\/]([^\\\/]+)[\\\/]\1\.d\.ts$/,$h=function(){function e(e,t){this.pipe=e,this.context=t,this.kind="pipe",this.language="typescript",this.container=void 0,this.callable=!0,this.nullable=!1,this.public=!0}return Object.defineProperty(e.prototype,"name",{get:function(){return this.pipe.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return new jh(this.tsType,this.context)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){var e=this.tsType.getSymbol();return e?Jh(e):void 0},enumerable:!0,configurable:!0}),e.prototype.members=function(){return Xh.instance},e.prototype.signatures=function(){return Lh(this.tsType,this.context)},e.prototype.selectSignature=function(e){var t=Fh(this.tsType,this.context);if(1==e.length){var n=e[0];if(n instanceof jh){var r=void 0;switch(this.name){case"async":switch(n.name){case"Observable":case"Promise":case"EventEmitter":r=tf(n.tsType,n.name);break;default:r=Yh(mh.Any,this.context)}break;case"slice":r=tf(n.tsType,"Array")}r&&(t=new Uh(t,new jh(r,n.context)))}}return t},e.prototype.indexed=function(e){},Object.defineProperty(e.prototype,"tsType",{get:function(){var e=this._tsType;if(!e){var t=this.findClassSymbol(this.pipe.type.reference);t&&(e=this._tsType=this.findTransformMethodType(t)),e||(e=this._tsType=Yh(mh.Any,this.context))}return e},enumerable:!0,configurable:!0}),e.prototype.findClassSymbol=function(e){return Gh(e,this.context)},e.prototype.findTransformMethodType=function(e){var t=this.context.checker.getDeclaredTypeOfSymbol(e);if(t){var n=t.getProperty("transform");if(n)return this.context.checker.getTypeOfSymbolAtLocation(n,this.context.node)}},e}();function Gh(e,n){var r=n.program.getSourceFile(e.filePath);if(!r){var i=e.filePath;if(i.match(Qh)){var o=t.join(t.dirname(i),"index.d.ts");r=n.program.getSourceFile(o)}}if(r)return(n.checker.getExportsOfModule(r.module||r.symbol)||[]).find(function(t){return t.name==e.name})}var Xh=function(){function e(){this.size=0}return e.prototype.get=function(e){},e.prototype.has=function(e){return!1},e.prototype.values=function(){return[]},e.instance=new e,e}();function Yh(e,t){var r,i=t.checker,o=t.node;switch(e){case mh.Any:r=i.getTypeAtLocation(Zh({kind:n.SyntaxKind.AsExpression,expression:{kind:n.SyntaxKind.TrueKeyword},type:{kind:n.SyntaxKind.AnyKeyword}},o));break;case mh.Boolean:r=i.getTypeAtLocation(Zh({kind:n.SyntaxKind.TrueKeyword},o));break;case mh.Null:r=i.getTypeAtLocation(Zh({kind:n.SyntaxKind.NullKeyword},o));break;case mh.Number:var s={kind:n.SyntaxKind.NumericLiteral,text:o.getText()};Zh({kind:n.SyntaxKind.ExpressionStatement,expression:s},o),r=i.getTypeAtLocation(s);break;case mh.String:r=i.getTypeAtLocation(Zh({kind:n.SyntaxKind.NoSubstitutionTemplateLiteral,text:o.getText()},o));break;case mh.Undefined:r=i.getTypeAtLocation(Zh({kind:n.SyntaxKind.VoidExpression,expression:{kind:n.SyntaxKind.NumericLiteral}},o));break;default:throw new Error("Internal error, unhandled literal kind "+e+":"+mh[e])}return r}function Zh(e,t){return e.parent=t,n.forEachChild(e,function(t){return Zh(t,e)}),e}function Jh(e){var t=e.declarations;if(t)return t.map(function(e){return{fileName:e.getSourceFile().fileName,span:{start:e.getStart(),end:e.getEnd()}}})}function ef(e){for(;e;){switch(e.kind){case n.SyntaxKind.ClassDeclaration:case n.SyntaxKind.InterfaceDeclaration:return e;case n.SyntaxKind.SourceFile:return}e=e.parent}}function tf(e,t){if(e&&e.symbol&&e.symbol.name==t){var n=e.typeArguments;if(n&&n.length<=1)return n[0]}}function nf(e,t){var n=e;return"function"==typeof n.get?n.get(t):n[t]}
|
|
601
608
|
/**
|
|
602
609
|
* @license
|
|
603
610
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -611,7 +618,7 @@ var Mh=n.ModifierFlags?function(e){return!!(n.getCombinedModifierFlags(e)&n.Modi
|
|
|
611
618
|
*
|
|
612
619
|
* Use of this source code is governed by an MIT-style license that can be
|
|
613
620
|
* found in the LICENSE file at https://angular.io/license
|
|
614
|
-
*/var cf=n.SyntaxKind.SpreadElement||n.SyntaxKind.SpreadElementExpression;function pf(e,t){var r=e.expression;if(r.kind===n.SyntaxKind.PropertyAccessExpression){var i=r.name;if(i.kind==n.SyntaxKind.Identifier)return i.text===t}return!1}function hf(e,t){var r=e.expression;return r.kind===n.SyntaxKind.Identifier&&r.text===t}function ff(e,t,n,r){if(!n.has(e)&&(n.set(e,t),t&&(function i(e){return e&&e.module&&!!e.name&&uf(e)}(e)||function o(e){return e&&e.module&&e.default&&uf(e)}(e))&&null==e.line)){var s=yf(t,r);null!=s.line&&(e.line=s.line),null!=s.character&&(e.character=s.character)}return e}function df(e,t){return!n.forEachChild(e,function(e){return!t(e)})}function vf(e){return Object(e)!==e}function mf(e){return void 0!==e}function yf(e,t){return e&&(t=t||function r(e){for(;e&&e.kind!=n.SyntaxKind.SourceFile;)e=e.parent;return e}(e))?n.getLineAndCharacterOfPosition(t,e.getStart(t)):{}}function gf(e,t,n,r){var i=a({__symbolic:"error",message:e},yf(t,r));return n&&(i.context=n),i}var _f=function(){function e(e,t,n,r){void 0===n&&(n={}),this.symbols=e,this.nodeMap=t,this.options=n,this.recordExport=r}return e.prototype.nameOf=function(e){if(e&&e.kind==n.SyntaxKind.Identifier)return e.text;var t=e&&this.evaluateNode(e);return lf(t)||"string"==typeof t?t:gf("Name expected",e,{received:e&&e.getText()||"<missing>"})},e.prototype.isFoldable=function(e){return this.isFoldableWorker(e,new Map)},e.prototype.isFoldableWorker=function(e,t){var r=this;if(e)switch(e.kind){case n.SyntaxKind.ObjectLiteralExpression:return df(e,function(e){return e.kind===n.SyntaxKind.PropertyAssignment&&r.isFoldableWorker(e.initializer,t)});case n.SyntaxKind.ArrayLiteralExpression:return df(e,function(e){return r.isFoldableWorker(e,t)});case n.SyntaxKind.CallExpression:var i=e;if(pf(i,"concat")&&1===xf(i.arguments).length){var o=i.expression.expression;if(this.isFoldableWorker(o,t)&&this.isFoldableWorker(i.arguments[0],t)){var s=this.evaluateNode(o);if(s&&Array.isArray(s))return!0}}return!(!hf(i,"CONST_EXPR")||1!==xf(i.arguments).length)&&this.isFoldableWorker(i.arguments[0],t);case n.SyntaxKind.NoSubstitutionTemplateLiteral:case n.SyntaxKind.StringLiteral:case n.SyntaxKind.NumericLiteral:case n.SyntaxKind.NullKeyword:case n.SyntaxKind.TrueKeyword:case n.SyntaxKind.FalseKeyword:case n.SyntaxKind.TemplateHead:case n.SyntaxKind.TemplateMiddle:case n.SyntaxKind.TemplateTail:return!0;case n.SyntaxKind.ParenthesizedExpression:return this.isFoldableWorker(e.expression,t);case n.SyntaxKind.BinaryExpression:var a=e;switch(a.operatorToken.kind){case n.SyntaxKind.PlusToken:case n.SyntaxKind.MinusToken:case n.SyntaxKind.AsteriskToken:case n.SyntaxKind.SlashToken:case n.SyntaxKind.PercentToken:case n.SyntaxKind.AmpersandAmpersandToken:case n.SyntaxKind.BarBarToken:return this.isFoldableWorker(a.left,t)&&this.isFoldableWorker(a.right,t);default:return!1}case n.SyntaxKind.PropertyAccessExpression:return this.isFoldableWorker(e.expression,t);case n.SyntaxKind.ElementAccessExpression:var u=e;return this.isFoldableWorker(u.expression,t)&&this.isFoldableWorker(u.argumentExpression,t);case n.SyntaxKind.Identifier:var l=this.symbols.resolve(e.text);if(void 0!==l&&vf(l))return!0;break;case n.SyntaxKind.TemplateExpression:return e.templateSpans.every(function(e){return r.isFoldableWorker(e.expression,t)})}return!1},e.prototype.evaluateNode=function(e,t){var r,i=this,o=this;function s(e,t){if(o.options.substituteExpression){var n=o.options.substituteExpression(e,t);o.recordExport&&n!=e&&sf(n)&&o.recordExport(n.name,e),e=n}return ff(e,t,o.nodeMap)}function u(e){return!o.options.verboseInvalidExpression&&lf(e)}var l=function(t,n){var r=i.symbols.resolve(t,n);return void 0===r?s({__symbolic:"reference",name:t},e):r&&uf(r)?s(a({},r),e):r};switch(e.kind){case n.SyntaxKind.ObjectLiteralExpression:var c={},h=[];return n.forEachChild(e,function(e){switch(e.kind){case n.SyntaxKind.ShorthandPropertyAssignment:case n.SyntaxKind.PropertyAssignment:var t=e;t.name.kind==n.SyntaxKind.StringLiteral&&h.push(t.name.text);var o=i.nameOf(t.name);if(u(o))return r=o,!0;var a=bf(t)?i.evaluateNode(t.initializer,!0):l(o,!0);if(u(a))return r=a,!0;c[o]=bf(t)?s(a,t.initializer):a}}),r||(this.options.quotedNames&&h.length&&(c.$quoted$=h),s(c,e));case n.SyntaxKind.ArrayLiteralExpression:var f=[];return n.forEachChild(e,function(e){var t,n,o=i.evaluateNode(e,!0);if(u(o))return r=o,!0;if(function s(e){return e&&"spread"===e.__symbolic}(o)&&Array.isArray(o.expression))try{for(var a=p(o.expression),l=a.next();!l.done;l=a.next())f.push(l.value)}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else f.push(o)}),r||s(f,e);case cf:return s({__symbolic:"spread",expression:this.evaluateNode(e.expression)},e);case n.SyntaxKind.CallExpression:var d=e;if(hf(d,"forwardRef")&&1===xf(d.arguments).length){var v=d.arguments[0];if(v.kind==n.SyntaxKind.ArrowFunction)return s(this.evaluateNode(v.body),e)}var m=xf(d.arguments).map(function(e){return i.evaluateNode(e)});if(this.isFoldable(d)&&pf(d,"concat")){var y=this.evaluateNode(d.expression.expression);return u(y)?y:y.concat(m[0])}if(hf(d,"CONST_EXPR")&&1===xf(d.arguments).length)return s(m[0],e);var g=this.evaluateNode(d.expression);if(u(g))return s(g,e);var _={__symbolic:"call",expression:g};return m&&m.length&&(_.arguments=m),s(_,e);case n.SyntaxKind.NewExpression:var b=e,w=xf(b.arguments).map(function(e){return i.evaluateNode(e)}),x=this.evaluateNode(b.expression);if(lf(x))return s(x,e);var E={__symbolic:"new",expression:x};return w.length&&(E.arguments=w),s(E,e);case n.SyntaxKind.PropertyAccessExpression:var S=e,C=this.evaluateNode(S.expression);if(u(C))return s(C,e);var T=this.nameOf(S.name);return u(T)?s(T,e):C&&this.isFoldable(S.expression)?C[T]:af(C)?s({__symbolic:"reference",module:C.module,name:T},e):s({__symbolic:"select",expression:C,member:T},e);case n.SyntaxKind.ElementAccessExpression:var N=e,k=this.evaluateNode(N.expression);if(u(k))return s(k,e);if(!N.argumentExpression)return s(gf("Expression form not supported",e),e);var A=this.evaluateNode(N.argumentExpression);return u(k)?s(k,e):this.isFoldable(N.expression)&&this.isFoldable(N.argumentExpression)?k[A]:s({__symbolic:"index",expression:k,index:A},e);case n.SyntaxKind.Identifier:return l(e.text,t);case n.SyntaxKind.TypeReference:var P=e,I=P.typeName,M=function(e){if(I.kind===n.SyntaxKind.QualifiedName){var t=e,r=i.evaluateNode(t.left);return af(r)?s({__symbolic:"reference",module:r.module,name:t.right.text},e):{__symbolic:"select",expression:r,member:t.right.text}}var o=I,a=i.symbols.resolve(o.text);return u(a)||uf(a)?s(a,e):s(gf("Could not resolve type",e,{typeName:o.text}),e)}(I);if(u(M))return s(M,e);if(!af(M)&&P.typeArguments&&P.typeArguments.length){var O=P.typeArguments.map(function(e){return i.evaluateNode(e)});M.arguments=O}return s(M,e);case n.SyntaxKind.UnionType:for(var R=e.types.filter(function(e){return e.kind!=n.SyntaxKind.NullKeyword&&e.kind!=n.SyntaxKind.UndefinedKeyword}).map(function(e){return i.evaluateNode(e)}),D=null,L=0;L<R.length;L++){var F=R[L];if(!uf(F))return F;D&&(F.name!=D.name||F.module!=D.module||F.arguments)||(D=F)}if(D)return D;break;case n.SyntaxKind.NoSubstitutionTemplateLiteral:case n.SyntaxKind.StringLiteral:case n.SyntaxKind.TemplateHead:case n.SyntaxKind.TemplateTail:case n.SyntaxKind.TemplateMiddle:return e.text;case n.SyntaxKind.NumericLiteral:return parseFloat(e.text);case n.SyntaxKind.AnyKeyword:return s({__symbolic:"reference",name:"any"},e);case n.SyntaxKind.StringKeyword:return s({__symbolic:"reference",name:"string"},e);case n.SyntaxKind.NumberKeyword:return s({__symbolic:"reference",name:"number"},e);case n.SyntaxKind.BooleanKeyword:return s({__symbolic:"reference",name:"boolean"},e);case n.SyntaxKind.ArrayType:return s({__symbolic:"reference",name:"Array",arguments:[this.evaluateNode(e.elementType)]},e);case n.SyntaxKind.NullKeyword:return null;case n.SyntaxKind.TrueKeyword:return!0;case n.SyntaxKind.FalseKeyword:return!1;case n.SyntaxKind.ParenthesizedExpression:case n.SyntaxKind.TypeAssertionExpression:return this.evaluateNode(e.expression);case n.SyntaxKind.PrefixUnaryExpression:var j=e,V=this.evaluateNode(j.operand);if(mf(V)&&vf(V))switch(j.operator){case n.SyntaxKind.PlusToken:return+V;case n.SyntaxKind.MinusToken:return-V;case n.SyntaxKind.TildeToken:return~V;case n.SyntaxKind.ExclamationToken:return!V}var H=void 0;switch(j.operator){case n.SyntaxKind.PlusToken:H="+";break;case n.SyntaxKind.MinusToken:H="-";break;case n.SyntaxKind.TildeToken:H="~";break;case n.SyntaxKind.ExclamationToken:H="!";break;default:return}return s({__symbolic:"pre",operator:H,operand:V},e);case n.SyntaxKind.BinaryExpression:var B=e,U=this.evaluateNode(B.left),q=this.evaluateNode(B.right);if(mf(U)&&mf(q)){if(vf(U)&&vf(q))switch(B.operatorToken.kind){case n.SyntaxKind.BarBarToken:return U||q;case n.SyntaxKind.AmpersandAmpersandToken:return U&&q;case n.SyntaxKind.AmpersandToken:return U&q;case n.SyntaxKind.BarToken:return U|q;case n.SyntaxKind.CaretToken:return U^q;case n.SyntaxKind.EqualsEqualsToken:return U==q;case n.SyntaxKind.ExclamationEqualsToken:return U!=q;case n.SyntaxKind.EqualsEqualsEqualsToken:return U===q;case n.SyntaxKind.ExclamationEqualsEqualsToken:return U!==q;case n.SyntaxKind.LessThanToken:return U<q;case n.SyntaxKind.GreaterThanToken:return U>q;case n.SyntaxKind.LessThanEqualsToken:return U<=q;case n.SyntaxKind.GreaterThanEqualsToken:return U>=q;case n.SyntaxKind.LessThanLessThanToken:return U<<q;case n.SyntaxKind.GreaterThanGreaterThanToken:return U>>q;case n.SyntaxKind.GreaterThanGreaterThanGreaterThanToken:return U>>>q;case n.SyntaxKind.PlusToken:return U+q;case n.SyntaxKind.MinusToken:return U-q;case n.SyntaxKind.AsteriskToken:return U*q;case n.SyntaxKind.SlashToken:return U/q;case n.SyntaxKind.PercentToken:return U%q}return s({__symbolic:"binop",operator:B.operatorToken.getText(),left:U,right:q},e)}break;case n.SyntaxKind.ConditionalExpression:var K=e,z=this.evaluateNode(K.condition),W=this.evaluateNode(K.whenTrue),Q=this.evaluateNode(K.whenFalse);return vf(z)?z?W:Q:s({__symbolic:"if",condition:z,thenExpression:W,elseExpression:Q},e);case n.SyntaxKind.FunctionExpression:case n.SyntaxKind.ArrowFunction:return s(gf("Lambda not supported",e),e);case n.SyntaxKind.TaggedTemplateExpression:return s(gf("Tagged template expressions are not supported in metadata",e),e);case n.SyntaxKind.TemplateExpression:var G=e;return this.isFoldable(e)?G.templateSpans.reduce(function(e,t){return e+i.evaluateNode(t.expression)+i.evaluateNode(t.literal)},this.evaluateNode(G.head)):G.templateSpans.reduce(function(e,t){var n=i.evaluateNode(t.expression),r=i.evaluateNode(t.literal);if(u(n))return n;if(u(r))return r;if("string"==typeof e&&"string"==typeof n&&"string"==typeof r)return e+n+r;var o=n;return""!==e&&(o={__symbolic:"binop",operator:"+",left:e,right:n}),""!=r&&(o={__symbolic:"binop",operator:"+",left:o,right:r}),o},this.evaluateNode(G.head));case n.SyntaxKind.AsExpression:return this.evaluateNode(e.expression);case n.SyntaxKind.ClassExpression:return{__symbolic:"class"}}return s(gf("Expression form not supported",e),e)},e}();function bf(e){return e.kind==n.SyntaxKind.PropertyAssignment}var wf=n.createNodeArray();function xf(e){return e||wf}
|
|
621
|
+
*/var cf=n.SyntaxKind.SpreadElement||n.SyntaxKind.SpreadElementExpression;function pf(e,t){var r=e.expression;if(r.kind===n.SyntaxKind.PropertyAccessExpression){var i=r.name;if(i.kind==n.SyntaxKind.Identifier)return i.text===t}return!1}function hf(e,t){var r=e.expression;return r.kind===n.SyntaxKind.Identifier&&r.text===t}function ff(e,t,n,r){if(!n.has(e)&&(n.set(e,t),t&&(function i(e){return e&&e.module&&!!e.name&&uf(e)}(e)||function o(e){return e&&e.module&&e.default&&uf(e)}(e))&&null==e.line)){var s=yf(t,r);null!=s.line&&(e.line=s.line),null!=s.character&&(e.character=s.character)}return e}function df(e,t){return!n.forEachChild(e,function(e){return!t(e)})}function vf(e){return Object(e)!==e}function mf(e){return void 0!==e}function yf(e,t){return e&&(t=t||function r(e){for(;e&&e.kind!=n.SyntaxKind.SourceFile;)e=e.parent;return e}(e))?n.getLineAndCharacterOfPosition(t,e.getStart(t)):{}}function gf(e,t,n,r){var i=a({__symbolic:"error",message:e},yf(t,r));return n&&(i.context=n),i}var _f=function(){function e(e,t,n,r){void 0===n&&(n={}),this.symbols=e,this.nodeMap=t,this.options=n,this.recordExport=r}return e.prototype.nameOf=function(e){if(e&&e.kind==n.SyntaxKind.Identifier)return e.text;var t=e&&this.evaluateNode(e);return lf(t)||"string"==typeof t?t:gf("Name expected",e,{received:e&&e.getText()||"<missing>"})},e.prototype.isFoldable=function(e){return this.isFoldableWorker(e,new Map)},e.prototype.isFoldableWorker=function(e,t){var r=this;if(e)switch(e.kind){case n.SyntaxKind.ObjectLiteralExpression:return df(e,function(e){return e.kind===n.SyntaxKind.PropertyAssignment&&r.isFoldableWorker(e.initializer,t)});case n.SyntaxKind.ArrayLiteralExpression:return df(e,function(e){return r.isFoldableWorker(e,t)});case n.SyntaxKind.CallExpression:var i=e;if(pf(i,"concat")&&1===xf(i.arguments).length){var o=i.expression.expression;if(this.isFoldableWorker(o,t)&&this.isFoldableWorker(i.arguments[0],t)){var s=this.evaluateNode(o);if(s&&Array.isArray(s))return!0}}return!(!hf(i,"CONST_EXPR")||1!==xf(i.arguments).length)&&this.isFoldableWorker(i.arguments[0],t);case n.SyntaxKind.NoSubstitutionTemplateLiteral:case n.SyntaxKind.StringLiteral:case n.SyntaxKind.NumericLiteral:case n.SyntaxKind.NullKeyword:case n.SyntaxKind.TrueKeyword:case n.SyntaxKind.FalseKeyword:case n.SyntaxKind.TemplateHead:case n.SyntaxKind.TemplateMiddle:case n.SyntaxKind.TemplateTail:return!0;case n.SyntaxKind.ParenthesizedExpression:return this.isFoldableWorker(e.expression,t);case n.SyntaxKind.BinaryExpression:var a=e;switch(a.operatorToken.kind){case n.SyntaxKind.PlusToken:case n.SyntaxKind.MinusToken:case n.SyntaxKind.AsteriskToken:case n.SyntaxKind.SlashToken:case n.SyntaxKind.PercentToken:case n.SyntaxKind.AmpersandAmpersandToken:case n.SyntaxKind.BarBarToken:return this.isFoldableWorker(a.left,t)&&this.isFoldableWorker(a.right,t);default:return!1}case n.SyntaxKind.PropertyAccessExpression:return this.isFoldableWorker(e.expression,t);case n.SyntaxKind.ElementAccessExpression:var u=e;return this.isFoldableWorker(u.expression,t)&&this.isFoldableWorker(u.argumentExpression,t);case n.SyntaxKind.Identifier:var l=this.symbols.resolve(e.text);if(void 0!==l&&vf(l))return!0;break;case n.SyntaxKind.TemplateExpression:return e.templateSpans.every(function(e){return r.isFoldableWorker(e.expression,t)})}return!1},e.prototype.evaluateNode=function(e,t){var r,i=this,o=this;function s(e,t){if(o.options.substituteExpression){var n=o.options.substituteExpression(e,t);o.recordExport&&n!=e&&sf(n)&&o.recordExport(n.name,e),e=n}return ff(e,t,o.nodeMap)}function u(e){return!o.options.verboseInvalidExpression&&lf(e)}var l=function(t,n){var r=i.symbols.resolve(t,n);return void 0===r?s({__symbolic:"reference",name:t},e):r&&uf(r)?s(a({},r),e):r};switch(e.kind){case n.SyntaxKind.ObjectLiteralExpression:var c={},h=[];return n.forEachChild(e,function(e){switch(e.kind){case n.SyntaxKind.ShorthandPropertyAssignment:case n.SyntaxKind.PropertyAssignment:var t=e;t.name.kind==n.SyntaxKind.StringLiteral&&h.push(t.name.text);var o=i.nameOf(t.name);if(u(o))return r=o,!0;var a=bf(t)?i.evaluateNode(t.initializer,!0):l(o,!0);if(u(a))return r=a,!0;c[o]=bf(t)?s(a,t.initializer):a}}),r||(this.options.quotedNames&&h.length&&(c.$quoted$=h),s(c,e));case n.SyntaxKind.ArrayLiteralExpression:var f=[];return n.forEachChild(e,function(e){var t,n,o=i.evaluateNode(e,!0);if(u(o))return r=o,!0;if(function s(e){return e&&"spread"===e.__symbolic}(o)&&Array.isArray(o.expression))try{for(var a=p(o.expression),l=a.next();!l.done;l=a.next())f.push(l.value)}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else f.push(o)}),r||s(f,e);case cf:return s({__symbolic:"spread",expression:this.evaluateNode(e.expression)},e);case n.SyntaxKind.CallExpression:var d=e;if(hf(d,"forwardRef")&&1===xf(d.arguments).length){var v=d.arguments[0];if(v.kind==n.SyntaxKind.ArrowFunction)return s(this.evaluateNode(v.body),e)}var m=xf(d.arguments).map(function(e){return i.evaluateNode(e)});if(this.isFoldable(d)&&pf(d,"concat")){var y=this.evaluateNode(d.expression.expression);return u(y)?y:y.concat(m[0])}if(hf(d,"CONST_EXPR")&&1===xf(d.arguments).length)return s(m[0],e);var g=this.evaluateNode(d.expression);if(u(g))return s(g,e);var _={__symbolic:"call",expression:g};return m&&m.length&&(_.arguments=m),s(_,e);case n.SyntaxKind.NewExpression:var b=e,w=xf(b.arguments).map(function(e){return i.evaluateNode(e)}),x=this.evaluateNode(b.expression);if(lf(x))return s(x,e);var E={__symbolic:"new",expression:x};return w.length&&(E.arguments=w),s(E,e);case n.SyntaxKind.PropertyAccessExpression:var S=e,C=this.evaluateNode(S.expression);if(u(C))return s(C,e);var T=this.nameOf(S.name);return u(T)?s(T,e):C&&this.isFoldable(S.expression)?C[T]:af(C)?s({__symbolic:"reference",module:C.module,name:T},e):s({__symbolic:"select",expression:C,member:T},e);case n.SyntaxKind.ElementAccessExpression:var N=e,k=this.evaluateNode(N.expression);if(u(k))return s(k,e);if(!N.argumentExpression)return s(gf("Expression form not supported",e),e);var A=this.evaluateNode(N.argumentExpression);return u(k)?s(k,e):this.isFoldable(N.expression)&&this.isFoldable(N.argumentExpression)?k[A]:s({__symbolic:"index",expression:k,index:A},e);case n.SyntaxKind.Identifier:return l(e.text,t);case n.SyntaxKind.TypeReference:var P=e,I=P.typeName,M=function(e){if(I.kind===n.SyntaxKind.QualifiedName){var t=e,r=i.evaluateNode(t.left);return af(r)?s({__symbolic:"reference",module:r.module,name:t.right.text},e):{__symbolic:"select",expression:r,member:t.right.text}}var o=I,a=i.symbols.resolve(o.text);return u(a)||uf(a)?s(a,e):s(gf("Could not resolve type",e,{typeName:o.text}),e)}(I);if(u(M))return s(M,e);if(!af(M)&&P.typeArguments&&P.typeArguments.length){var O=P.typeArguments.map(function(e){return i.evaluateNode(e)});M.arguments=O}return s(M,e);case n.SyntaxKind.UnionType:for(var R=e.types.filter(function(e){return e.kind!=n.SyntaxKind.NullKeyword&&e.kind!=n.SyntaxKind.UndefinedKeyword}).map(function(e){return i.evaluateNode(e)}),D=null,L=0;L<R.length;L++){var F=R[L];if(!uf(F))return F;D&&(F.name!=D.name||F.module!=D.module||F.arguments)||(D=F)}if(D)return D;break;case n.SyntaxKind.NoSubstitutionTemplateLiteral:case n.SyntaxKind.StringLiteral:case n.SyntaxKind.TemplateHead:case n.SyntaxKind.TemplateTail:case n.SyntaxKind.TemplateMiddle:return e.text;case n.SyntaxKind.NumericLiteral:return parseFloat(e.text);case n.SyntaxKind.AnyKeyword:return s({__symbolic:"reference",name:"any"},e);case n.SyntaxKind.StringKeyword:return s({__symbolic:"reference",name:"string"},e);case n.SyntaxKind.NumberKeyword:return s({__symbolic:"reference",name:"number"},e);case n.SyntaxKind.BooleanKeyword:return s({__symbolic:"reference",name:"boolean"},e);case n.SyntaxKind.ArrayType:return s({__symbolic:"reference",name:"Array",arguments:[this.evaluateNode(e.elementType)]},e);case n.SyntaxKind.NullKeyword:return null;case n.SyntaxKind.TrueKeyword:return!0;case n.SyntaxKind.FalseKeyword:return!1;case n.SyntaxKind.ParenthesizedExpression:case n.SyntaxKind.TypeAssertionExpression:return this.evaluateNode(e.expression);case n.SyntaxKind.PrefixUnaryExpression:var j=e,V=this.evaluateNode(j.operand);if(mf(V)&&vf(V))switch(j.operator){case n.SyntaxKind.PlusToken:return+V;case n.SyntaxKind.MinusToken:return-V;case n.SyntaxKind.TildeToken:return~V;case n.SyntaxKind.ExclamationToken:return!V}var H=void 0;switch(j.operator){case n.SyntaxKind.PlusToken:H="+";break;case n.SyntaxKind.MinusToken:H="-";break;case n.SyntaxKind.TildeToken:H="~";break;case n.SyntaxKind.ExclamationToken:H="!";break;default:return}return s({__symbolic:"pre",operator:H,operand:V},e);case n.SyntaxKind.BinaryExpression:var B=e,U=this.evaluateNode(B.left),q=this.evaluateNode(B.right);if(mf(U)&&mf(q)){if(vf(U)&&vf(q))switch(B.operatorToken.kind){case n.SyntaxKind.BarBarToken:return U||q;case n.SyntaxKind.AmpersandAmpersandToken:return U&&q;case n.SyntaxKind.AmpersandToken:return U&q;case n.SyntaxKind.BarToken:return U|q;case n.SyntaxKind.CaretToken:return U^q;case n.SyntaxKind.EqualsEqualsToken:return U==q;case n.SyntaxKind.ExclamationEqualsToken:return U!=q;case n.SyntaxKind.EqualsEqualsEqualsToken:return U===q;case n.SyntaxKind.ExclamationEqualsEqualsToken:return U!==q;case n.SyntaxKind.LessThanToken:return U<q;case n.SyntaxKind.GreaterThanToken:return U>q;case n.SyntaxKind.LessThanEqualsToken:return U<=q;case n.SyntaxKind.GreaterThanEqualsToken:return U>=q;case n.SyntaxKind.LessThanLessThanToken:return U<<q;case n.SyntaxKind.GreaterThanGreaterThanToken:return U>>q;case n.SyntaxKind.GreaterThanGreaterThanGreaterThanToken:return U>>>q;case n.SyntaxKind.PlusToken:return U+q;case n.SyntaxKind.MinusToken:return U-q;case n.SyntaxKind.AsteriskToken:return U*q;case n.SyntaxKind.SlashToken:return U/q;case n.SyntaxKind.PercentToken:return U%q}return s({__symbolic:"binop",operator:B.operatorToken.getText(),left:U,right:q},e)}break;case n.SyntaxKind.ConditionalExpression:var K=e,z=this.evaluateNode(K.condition),W=this.evaluateNode(K.whenTrue),Q=this.evaluateNode(K.whenFalse);return vf(z)?z?W:Q:s({__symbolic:"if",condition:z,thenExpression:W,elseExpression:Q},e);case n.SyntaxKind.FunctionExpression:case n.SyntaxKind.ArrowFunction:return s(gf("Lambda not supported",e),e);case n.SyntaxKind.TaggedTemplateExpression:return s(gf("Tagged template expressions are not supported in metadata",e),e);case n.SyntaxKind.TemplateExpression:var $=e;return this.isFoldable(e)?$.templateSpans.reduce(function(e,t){return e+i.evaluateNode(t.expression)+i.evaluateNode(t.literal)},this.evaluateNode($.head)):$.templateSpans.reduce(function(e,t){var n=i.evaluateNode(t.expression),r=i.evaluateNode(t.literal);if(u(n))return n;if(u(r))return r;if("string"==typeof e&&"string"==typeof n&&"string"==typeof r)return e+n+r;var o=n;return""!==e&&(o={__symbolic:"binop",operator:"+",left:e,right:n}),""!=r&&(o={__symbolic:"binop",operator:"+",left:o,right:r}),o},this.evaluateNode($.head));case n.SyntaxKind.AsExpression:return this.evaluateNode(e.expression);case n.SyntaxKind.ClassExpression:return{__symbolic:"class"}}return s(gf("Expression form not supported",e),e)},e}();function bf(e){return e.kind==n.SyntaxKind.PropertyAssignment}var wf=n.createNodeArray();function xf(e){return e||wf}
|
|
615
622
|
/**
|
|
616
623
|
* @license
|
|
617
624
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -697,14 +704,14 @@ return function t(e){return e&&!!e.start}(e)?{start:e.start.offset,end:e.end.off
|
|
|
697
704
|
*
|
|
698
705
|
* Use of this source code is governed by an MIT-style license that can be
|
|
699
706
|
* found in the LICENSE file at https://angular.io/license
|
|
700
|
-
*/function Hf(e,t,n){void 0===n&&(n=!1);var r=[],i=new(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return o(i,e),i.prototype.visit=function(e){(!n||e.span.start<e.span.end)&&Mf(t,e.span)&&(r.push(e),Zo(e,this))},i}(
|
|
707
|
+
*/function Hf(e,t,n){void 0===n&&(n=!1);var r=[],i=new(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return o(i,e),i.prototype.visit=function(e){(!n||e.span.start<e.span.end)&&Mf(t,e.span)&&(r.push(e),Zo(e,this))},i}($o));return e instanceof Wo&&(e=e.ast),i.visit(e),new Ws(r,t)}function Bf(e,t,n,r){var i=Hf(t,n);if(!i.empty){var o=e;return i.tail.visit({visitBinary:function(e){},visitChain:function(e){},visitConditional:function(e){},visitFunctionCall:function(e){},visitImplicitReceiver:function(e){},visitInterpolation:function(e){o=void 0},visitKeyedRead:function(e){},visitKeyedWrite:function(e){},visitLiteralArray:function(e){},visitLiteralMap:function(e){},visitLiteralPrimitive:function(e){},visitMethodCall:function(e){},visitPipe:function(e){n>=e.exp.span.end&&(!e.args||!e.args.length||n<e.args[0].span.start)&&(o=r.getPipes())},visitPrefixNot:function(e){},visitNonNullAssert:function(e){},visitPropertyRead:function(t){var n=s(t.receiver);o=n?n.members():e},visitPropertyWrite:function(t){var n=s(t.receiver);o=n?n.members():e},visitQuote:function(e){o=r.getBuiltinType(mh.Any).members()},visitSafeMethodCall:function(t){var n=s(t.receiver);o=n?n.members():e},visitSafePropertyRead:function(t){var n=s(t.receiver);o=n?n.members():e}}),o&&o.values()}function s(t){return new Sh(e,r,{}).getType(t)}}function Uf(e,t,n,r){var i=Hf(t,n,!0);if(!i.empty){var o=void 0,s=void 0;return i.tail.visit({visitBinary:function(e){},visitChain:function(e){},visitConditional:function(e){},visitFunctionCall:function(e){},visitImplicitReceiver:function(e){},visitInterpolation:function(e){},visitKeyedRead:function(e){},visitKeyedWrite:function(e){},visitLiteralArray:function(e){},visitLiteralMap:function(e){},visitLiteralPrimitive:function(e){},visitMethodCall:function(e){var t=a(e.receiver);o=t&&t.members().get(e.name),s=e.span},visitPipe:function(e){if(n>=e.exp.span.end&&(!e.args||!e.args.length||n<e.args[0].span.start)){var t=r.getPipes();t&&(o=t.get(e.name),s=e.span)}},visitPrefixNot:function(e){},visitNonNullAssert:function(e){},visitPropertyRead:function(e){var t=a(e.receiver);o=t&&t.members().get(e.name),s=e.span},visitPropertyWrite:function(e){var t=a(e.receiver);o=t&&t.members().get(e.name),s=e.span},visitQuote:function(e){},visitSafeMethodCall:function(e){var t=a(e.receiver);o=t&&t.members().get(e.name),s=e.span},visitSafePropertyRead:function(e){var t=a(e.receiver);o=t&&t.members().get(e.name),s=e.span}}),o&&s?{symbol:o,span:s}:void 0}function a(t){return new Sh(e,r,{}).getType(t)}}
|
|
701
708
|
/**
|
|
702
709
|
* @license
|
|
703
710
|
* Copyright Google Inc. All Rights Reserved.
|
|
704
711
|
*
|
|
705
712
|
* Use of this source code is governed by an MIT-style license that can be
|
|
706
713
|
* found in the LICENSE file at https://angular.io/license
|
|
707
|
-
*/!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning"}(kf||(kf={}));var qf=["ID","CDATA","NAME",["ltr","rtl"],["rect","circle","poly","default"],"NUMBER",["nohref"],["ismap"],["declare"],["DATA","REF","OBJECT"],["GET","POST"],"IDREF",["TEXT","PASSWORD","CHECKBOX","RADIO","SUBMIT","RESET","FILE","HIDDEN","IMAGE","BUTTON"],["checked"],["disabled"],["readonly"],["multiple"],["selected"],["button","submit","reset"],["void","above","below","hsides","lhs","rhs","vsides","box","border"],["none","groups","rows","cols","all"],["left","center","right","justify","char"],["top","middle","bottom","baseline"],"IDREFS",["row","col","rowgroup","colgroup"],["defer"]],Kf=[{id:0},{onclick:1,ondblclick:1,onmousedown:1,onmouseup:1,onmouseover:1,onmousemove:1,onmouseout:1,onkeypress:1,onkeydown:1,onkeyup:1},{lang:2,dir:3},{onload:1,onunload:1},{name:1},{href:1},{type:1},{alt:1},{tabindex:5},{media:1},{nohref:6},{usemap:1},{src:1},{onfocus:1,onblur:1},{charset:1},{declare:8,classid:1,codebase:1,data:1,codetype:1,archive:1,standby:1},{title:1},{value:1},{cite:1},{datetime:1},{accept:1},{shape:4,coords:1},{for:11},{action:1,method:10,enctype:1,onsubmit:1,onreset:1,"accept-charset":1},{valuetype:9},{longdesc:1},{width:1},{disabled:14},{readonly:15,onselect:1},{accesskey:1},{size:5,multiple:16},{onchange:1},{label:1},{selected:17},{type:12,checked:13,size:1,maxlength:5},{rows:5,cols:5},{type:18},{height:1},{summary:1,border:1,frame:19,rules:20,cellspacing:1,cellpadding:1,datapagesize:1},{align:21,char:1,charoff:1,valign:22},{span:5},{abbr:1,axis:1,headers:23,scope:24,rowspan:5,colspan:5},{profile:1},{"http-equiv":2,name:2,content:1,scheme:1},{class:1,style:1},{hreflang:2,rel:1,rev:1},{ismap:7},{defer:25,event:1,for:1}],zf={TT:[0,1,2,16,44],I:[0,1,2,16,44],B:[0,1,2,16,44],BIG:[0,1,2,16,44],SMALL:[0,1,2,16,44],EM:[0,1,2,16,44],STRONG:[0,1,2,16,44],DFN:[0,1,2,16,44],CODE:[0,1,2,16,44],SAMP:[0,1,2,16,44],KBD:[0,1,2,16,44],VAR:[0,1,2,16,44],CITE:[0,1,2,16,44],ABBR:[0,1,2,16,44],ACRONYM:[0,1,2,16,44],SUB:[0,1,2,16,44],SUP:[0,1,2,16,44],SPAN:[0,1,2,16,44],BDO:[0,2,16,44],BR:[0,16,44],BODY:[0,1,2,3,16,44],ADDRESS:[0,1,2,16,44],DIV:[0,1,2,16,44],A:[0,1,2,4,5,6,8,13,14,16,21,29,44,45],MAP:[0,1,2,4,16,44],AREA:[0,1,2,5,7,8,10,13,16,21,29,44],LINK:[0,1,2,5,6,9,14,16,44,45],IMG:[0,1,2,4,7,11,12,16,25,26,37,44,46],OBJECT:[0,1,2,4,6,8,11,15,16,26,37,44],PARAM:[0,4,6,17,24],HR:[0,1,2,16,44],P:[0,1,2,16,44],H1:[0,1,2,16,44],H2:[0,1,2,16,44],H3:[0,1,2,16,44],H4:[0,1,2,16,44],H5:[0,1,2,16,44],H6:[0,1,2,16,44],PRE:[0,1,2,16,44],Q:[0,1,2,16,18,44],BLOCKQUOTE:[0,1,2,16,18,44],INS:[0,1,2,16,18,19,44],DEL:[0,1,2,16,18,19,44],DL:[0,1,2,16,44],DT:[0,1,2,16,44],DD:[0,1,2,16,44],OL:[0,1,2,16,44],UL:[0,1,2,16,44],LI:[0,1,2,16,44],FORM:[0,1,2,4,16,20,23,44],LABEL:[0,1,2,13,16,22,29,44],INPUT:[0,1,2,4,7,8,11,12,13,16,17,20,27,28,29,31,34,44,46],SELECT:[0,1,2,4,8,13,16,27,30,31,44],OPTGROUP:[0,1,2,16,27,32,44],OPTION:[0,1,2,16,17,27,32,33,44],TEXTAREA:[0,1,2,4,8,13,16,27,28,29,31,35,44],FIELDSET:[0,1,2,16,44],LEGEND:[0,1,2,16,29,44],BUTTON:[0,1,2,4,8,13,16,17,27,29,36,44],TABLE:[0,1,2,16,26,38,44],CAPTION:[0,1,2,16,44],COLGROUP:[0,1,2,16,26,39,40,44],COL:[0,1,2,16,26,39,40,44],THEAD:[0,1,2,16,39,44],TBODY:[0,1,2,16,39,44],TFOOT:[0,1,2,16,39,44],TR:[0,1,2,16,39,44],TH:[0,1,2,16,39,41,44],TD:[0,1,2,16,39,41,44],HEAD:[2,42],TITLE:[2],BASE:[5],META:[2,43],STYLE:[2,6,9,16],SCRIPT:[6,12,14,47],NOSCRIPT:[0,1,2,16,44],HTML:[2]},Wf=[0,1,2,4],Qf=["[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:|"],Gf="event",$f="boolean",Xf="number",Yf="string",Zf="object",Jf=function(){function e(){var e=this;this.schema={},Qf.forEach(function(t){var n=t.split("|"),r=n[1].split(","),i=(n[0]+"^").split("^"),o={};i[0].split(",").forEach(function(t){return e.schema[t.toLowerCase()]=o});var s=i[1],a=s&&e.schema[s.toLowerCase()];if(a)for(var u in a)o[u]=a[u];r.forEach(function(e){""==e||(e.startsWith("*")?o[e.substring(1)]=Gf:e.startsWith("!")?o[e.substring(1)]=$f:e.startsWith("#")?o[e.substring(1)]=Xf:e.startsWith("%")?o[e.substring(1)]=Zf:o[e]=Yf)})})}return e.prototype.allKnownElements=function(){return Object.keys(this.schema)},e.prototype.eventsOf=function(e){var t=this.schema[e.toLowerCase()]||{};return Object.keys(t).filter(function(e){return t[e]===Gf})},e.prototype.propertiesOf=function(e){var t=this.schema[e.toLowerCase()]||{};return Object.keys(t).filter(function(e){return t[e]!==Gf})},e.prototype.typeOf=function(e,t){return(this.schema[e.toLowerCase()]||{})[t]},Object.defineProperty(e,"instance",{get:function(){var t=e._instance;return t||(t=e._instance=new e),t},enumerable:!0,configurable:!0}),e}(),ed={html:!0,script:!0,noscript:!0,base:!0,body:!0,title:!0,head:!0,link:!0};function td(e,t){var n=t.tail instanceof Ys?t.tail:t.parentOf(t.tail);if(n instanceof Ys)return nd(e,n.name,n)}function nd(e,t,n){return function r(e,t,n){var r=[],i=function o(e){return Object.keys(function t(e){var t,n,r={};if(e)try{for(var i=p(e),o=i.next();!o.done;o=i.next()){var s=Kf[o.value];for(var a in s)s.hasOwnProperty(a)&&(r[a]=qf[s[a]])}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(zf[e.toUpperCase()]||Wf)).sort()}(t)||[];i&&r.push.apply(r,f(i.map(function(e){return{name:e,fromHtml:!0}})));var s=function a(e){return Jf.instance.propertiesOf(e)}
|
|
714
|
+
*/!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning"}(kf||(kf={}));var qf=["ID","CDATA","NAME",["ltr","rtl"],["rect","circle","poly","default"],"NUMBER",["nohref"],["ismap"],["declare"],["DATA","REF","OBJECT"],["GET","POST"],"IDREF",["TEXT","PASSWORD","CHECKBOX","RADIO","SUBMIT","RESET","FILE","HIDDEN","IMAGE","BUTTON"],["checked"],["disabled"],["readonly"],["multiple"],["selected"],["button","submit","reset"],["void","above","below","hsides","lhs","rhs","vsides","box","border"],["none","groups","rows","cols","all"],["left","center","right","justify","char"],["top","middle","bottom","baseline"],"IDREFS",["row","col","rowgroup","colgroup"],["defer"]],Kf=[{id:0},{onclick:1,ondblclick:1,onmousedown:1,onmouseup:1,onmouseover:1,onmousemove:1,onmouseout:1,onkeypress:1,onkeydown:1,onkeyup:1},{lang:2,dir:3},{onload:1,onunload:1},{name:1},{href:1},{type:1},{alt:1},{tabindex:5},{media:1},{nohref:6},{usemap:1},{src:1},{onfocus:1,onblur:1},{charset:1},{declare:8,classid:1,codebase:1,data:1,codetype:1,archive:1,standby:1},{title:1},{value:1},{cite:1},{datetime:1},{accept:1},{shape:4,coords:1},{for:11},{action:1,method:10,enctype:1,onsubmit:1,onreset:1,"accept-charset":1},{valuetype:9},{longdesc:1},{width:1},{disabled:14},{readonly:15,onselect:1},{accesskey:1},{size:5,multiple:16},{onchange:1},{label:1},{selected:17},{type:12,checked:13,size:1,maxlength:5},{rows:5,cols:5},{type:18},{height:1},{summary:1,border:1,frame:19,rules:20,cellspacing:1,cellpadding:1,datapagesize:1},{align:21,char:1,charoff:1,valign:22},{span:5},{abbr:1,axis:1,headers:23,scope:24,rowspan:5,colspan:5},{profile:1},{"http-equiv":2,name:2,content:1,scheme:1},{class:1,style:1},{hreflang:2,rel:1,rev:1},{ismap:7},{defer:25,event:1,for:1}],zf={TT:[0,1,2,16,44],I:[0,1,2,16,44],B:[0,1,2,16,44],BIG:[0,1,2,16,44],SMALL:[0,1,2,16,44],EM:[0,1,2,16,44],STRONG:[0,1,2,16,44],DFN:[0,1,2,16,44],CODE:[0,1,2,16,44],SAMP:[0,1,2,16,44],KBD:[0,1,2,16,44],VAR:[0,1,2,16,44],CITE:[0,1,2,16,44],ABBR:[0,1,2,16,44],ACRONYM:[0,1,2,16,44],SUB:[0,1,2,16,44],SUP:[0,1,2,16,44],SPAN:[0,1,2,16,44],BDO:[0,2,16,44],BR:[0,16,44],BODY:[0,1,2,3,16,44],ADDRESS:[0,1,2,16,44],DIV:[0,1,2,16,44],A:[0,1,2,4,5,6,8,13,14,16,21,29,44,45],MAP:[0,1,2,4,16,44],AREA:[0,1,2,5,7,8,10,13,16,21,29,44],LINK:[0,1,2,5,6,9,14,16,44,45],IMG:[0,1,2,4,7,11,12,16,25,26,37,44,46],OBJECT:[0,1,2,4,6,8,11,15,16,26,37,44],PARAM:[0,4,6,17,24],HR:[0,1,2,16,44],P:[0,1,2,16,44],H1:[0,1,2,16,44],H2:[0,1,2,16,44],H3:[0,1,2,16,44],H4:[0,1,2,16,44],H5:[0,1,2,16,44],H6:[0,1,2,16,44],PRE:[0,1,2,16,44],Q:[0,1,2,16,18,44],BLOCKQUOTE:[0,1,2,16,18,44],INS:[0,1,2,16,18,19,44],DEL:[0,1,2,16,18,19,44],DL:[0,1,2,16,44],DT:[0,1,2,16,44],DD:[0,1,2,16,44],OL:[0,1,2,16,44],UL:[0,1,2,16,44],LI:[0,1,2,16,44],FORM:[0,1,2,4,16,20,23,44],LABEL:[0,1,2,13,16,22,29,44],INPUT:[0,1,2,4,7,8,11,12,13,16,17,20,27,28,29,31,34,44,46],SELECT:[0,1,2,4,8,13,16,27,30,31,44],OPTGROUP:[0,1,2,16,27,32,44],OPTION:[0,1,2,16,17,27,32,33,44],TEXTAREA:[0,1,2,4,8,13,16,27,28,29,31,35,44],FIELDSET:[0,1,2,16,44],LEGEND:[0,1,2,16,29,44],BUTTON:[0,1,2,4,8,13,16,17,27,29,36,44],TABLE:[0,1,2,16,26,38,44],CAPTION:[0,1,2,16,44],COLGROUP:[0,1,2,16,26,39,40,44],COL:[0,1,2,16,26,39,40,44],THEAD:[0,1,2,16,39,44],TBODY:[0,1,2,16,39,44],TFOOT:[0,1,2,16,39,44],TR:[0,1,2,16,39,44],TH:[0,1,2,16,39,41,44],TD:[0,1,2,16,39,41,44],HEAD:[2,42],TITLE:[2],BASE:[5],META:[2,43],STYLE:[2,6,9,16],SCRIPT:[6,12,14,47],NOSCRIPT:[0,1,2,16,44],HTML:[2]},Wf=[0,1,2,4],Qf=["[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:|"],$f="event",Gf="boolean",Xf="number",Yf="string",Zf="object",Jf=function(){function e(){var e=this;this.schema={},Qf.forEach(function(t){var n=t.split("|"),r=n[1].split(","),i=(n[0]+"^").split("^"),o={};i[0].split(",").forEach(function(t){return e.schema[t.toLowerCase()]=o});var s=i[1],a=s&&e.schema[s.toLowerCase()];if(a)for(var u in a)o[u]=a[u];r.forEach(function(e){""==e||(e.startsWith("*")?o[e.substring(1)]=$f:e.startsWith("!")?o[e.substring(1)]=Gf:e.startsWith("#")?o[e.substring(1)]=Xf:e.startsWith("%")?o[e.substring(1)]=Zf:o[e]=Yf)})})}return e.prototype.allKnownElements=function(){return Object.keys(this.schema)},e.prototype.eventsOf=function(e){var t=this.schema[e.toLowerCase()]||{};return Object.keys(t).filter(function(e){return t[e]===$f})},e.prototype.propertiesOf=function(e){var t=this.schema[e.toLowerCase()]||{};return Object.keys(t).filter(function(e){return t[e]!==$f})},e.prototype.typeOf=function(e,t){return(this.schema[e.toLowerCase()]||{})[t]},Object.defineProperty(e,"instance",{get:function(){var t=e._instance;return t||(t=e._instance=new e),t},enumerable:!0,configurable:!0}),e}(),ed={html:!0,script:!0,noscript:!0,base:!0,body:!0,title:!0,head:!0,link:!0};function td(e,t){var n=t.tail instanceof Ys?t.tail:t.parentOf(t.tail);if(n instanceof Ys)return nd(e,n.name,n)}function nd(e,t,n){return function r(e,t,n){var r=[],i=function o(e){return Object.keys(function t(e){var t,n,r={};if(e)try{for(var i=p(e),o=i.next();!o.done;o=i.next()){var s=Kf[o.value];for(var a in s)s.hasOwnProperty(a)&&(r[a]=qf[s[a]])}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(zf[e.toUpperCase()]||Wf)).sort()}(t)||[];i&&r.push.apply(r,f(i.map(function(e){return{name:e,fromHtml:!0}})));var s=function a(e){return Jf.instance.propertiesOf(e)}
|
|
708
715
|
/**
|
|
709
716
|
* @license
|
|
710
717
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -842,14 +849,14 @@ var Hd,Bd=void 0;function Ud(e){var t=Bd;return Bd=e,t}function qd(e){var t=Hd;r
|
|
|
842
849
|
*
|
|
843
850
|
* Use of this source code is governed by an MIT-style license that can be
|
|
844
851
|
* found in the LICENSE file at https://angular.io/license
|
|
845
|
-
*/var Qd=Function;function
|
|
852
|
+
*/var Qd=Function;function $d(e){return"function"==typeof e}
|
|
846
853
|
/**
|
|
847
854
|
* @license
|
|
848
855
|
* Copyright Google Inc. All Rights Reserved.
|
|
849
856
|
*
|
|
850
857
|
* Use of this source code is governed by an MIT-style license that can be
|
|
851
858
|
* found in the LICENSE file at https://angular.io/license
|
|
852
|
-
*/var
|
|
859
|
+
*/var Gd=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/,Xd=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,Yd=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,Zd=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{\s+super\(\.\.\.arguments\)/,Jd=function(){function e(e){this._reflect=e||jd.Reflect}return e.prototype.isReflectionEnabled=function(){return!0},e.prototype.factory=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new(e.bind.apply(e,f([void 0],t)))}},e.prototype._zipTypesAndAnnotations=function(e,t){var n;n=void 0===e?new Array(t.length):new Array(e.length);for(var r=0;r<n.length;r++)n[r]=void 0===e?[]:e[r]!=Object?[e[r]]:[],t&&null!=t[r]&&(n[r]=n[r].concat(t[r]));return n},e.prototype._ownParameters=function(e,t){var n=e.toString();if(Gd.exec(n)||Zd.exec(n)||Xd.exec(n)&&!Yd.exec(n))return null;if(e.parameters&&e.parameters!==t.parameters)return e.parameters;var r=e.ctorParameters;if(r&&r!==t.ctorParameters){var i="function"==typeof r?r():r,o=i.map(function(e){return e&&e.type}),s=i.map(function(e){return e&&ev(e.decorators)});return this._zipTypesAndAnnotations(o,s)}var a=e.hasOwnProperty(md)&&e[md],u=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",e);return u||a?this._zipTypesAndAnnotations(u,a):new Array(e.length).fill(void 0)},e.prototype.parameters=function(e){if(!$d(e))return[];var t=tv(e),n=this._ownParameters(e,t);return n||t===Object||(n=this.parameters(t)),n||[]},e.prototype._ownAnnotations=function(e,t){if(e.annotations&&e.annotations!==t.annotations){var n=e.annotations;return"function"==typeof n&&n.annotations&&(n=n.annotations),n}return e.decorators&&e.decorators!==t.decorators?ev(e.decorators):e.hasOwnProperty(vd)?e[vd]:null},e.prototype.annotations=function(e){if(!$d(e))return[];var t=tv(e),n=this._ownAnnotations(e,t)||[];return(t!==Object?this.annotations(t):[]).concat(n)},e.prototype._ownPropMetadata=function(e,t){if(e.propMetadata&&e.propMetadata!==t.propMetadata){var n=e.propMetadata;return"function"==typeof n&&n.propMetadata&&(n=n.propMetadata),n}if(e.propDecorators&&e.propDecorators!==t.propDecorators){var r=e.propDecorators,i={};return Object.keys(r).forEach(function(e){i[e]=ev(r[e])}),i}return e.hasOwnProperty(yd)?e[yd]:null},e.prototype.propMetadata=function(e){if(!$d(e))return{};var t=tv(e),n={};if(t!==Object){var r=this.propMetadata(t);Object.keys(r).forEach(function(e){n[e]=r[e]})}var i=this._ownPropMetadata(e,t);return i&&Object.keys(i).forEach(function(e){var t=[];n.hasOwnProperty(e)&&t.push.apply(t,f(n[e])),t.push.apply(t,f(i[e])),n[e]=t}),n},e.prototype.ownPropMetadata=function(e){return $d(e)&&this._ownPropMetadata(e,tv(e))||{}},e.prototype.hasLifecycleHook=function(e,t){return e instanceof Qd&&t in e.prototype},e.prototype.guards=function(e){return{}},e.prototype.getter=function(e){return new Function("o","return o."+e+";")},e.prototype.setter=function(e){return new Function("o","v","return o."+e+" = v;")},e.prototype.method=function(e){return new Function("o","args","if (!o."+e+") throw new Error('\""+e+"\" is undefined');\n return o."+e+".apply(o, args);")},e.prototype.importUri=function(e){return"object"==typeof e&&e.filePath?e.filePath:"./"+Od(e)},e.prototype.resourceUri=function(e){return"./"+Od(e)},e.prototype.resolveIdentifier=function(e,t,n,r){return r},e.prototype.resolveEnum=function(e,t){return e[t]},e}();function ev(e){return e?e.map(function(e){var t=e.type.annotationCls;return new(t.bind.apply(t,f([void 0],e.args?e.args:[])))}):[]}function tv(e){var t=e.prototype?Object.getPrototypeOf(e.prototype):null;return(t?t.constructor:null)||Object}
|
|
853
860
|
/**
|
|
854
861
|
* @license
|
|
855
862
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -870,14 +877,14 @@ var Hd,Bd=void 0;function Ud(e){var t=Bd;return Bd=e,t}function qd(e){var t=Hd;r
|
|
|
870
877
|
*
|
|
871
878
|
* Use of this source code is governed by an MIT-style license that can be
|
|
872
879
|
* found in the LICENSE file at https://angular.io/license
|
|
873
|
-
*/var ov=gd("Injectable",void 0,void 0,void 0,function(e,t){return sv(e,t)}),sv=function av(e,t){t&&void 0!==t.providedIn&&!Ad(e)&&(e.ngInjectableDef=kd({providedIn:t.providedIn,factory:iv(e,t)}))},uv=function(){function e(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.ngInjectableDef=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.ngInjectableDef=kd({providedIn:t.providedIn||"root",factory:t.factory}))}return e.prototype.toString=function(){return"InjectionToken "+this._desc},e}(),lv="__source",cv=new Object,pv=cv,hv=new uv("INJECTOR",-1),fv=function(){function e(){}return e.prototype.get=function(e,t){if(void 0===t&&(t=cv),t===cv){var n=new Error("NullInjectorError: No provider for "+Od(e)+"!");throw n.name="NullInjectorError",n}return t},e}(),dv=function(){function e(){}return e.create=function(e,t){return Array.isArray(e)?new
|
|
880
|
+
*/var ov=gd("Injectable",void 0,void 0,void 0,function(e,t){return sv(e,t)}),sv=function av(e,t){t&&void 0!==t.providedIn&&!Ad(e)&&(e.ngInjectableDef=kd({providedIn:t.providedIn,factory:iv(e,t)}))},uv=function(){function e(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.ngInjectableDef=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.ngInjectableDef=kd({providedIn:t.providedIn||"root",factory:t.factory}))}return e.prototype.toString=function(){return"InjectionToken "+this._desc},e}(),lv="__source",cv=new Object,pv=cv,hv=new uv("INJECTOR",-1),fv=function(){function e(){}return e.prototype.get=function(e,t){if(void 0===t&&(t=cv),t===cv){var n=new Error("NullInjectorError: No provider for "+Od(e)+"!");throw n.name="NullInjectorError",n}return t},e}(),dv=function(){function e(){}return e.create=function(e,t){return Array.isArray(e)?new Sv(e,t):new Sv(e.providers,e.parent,e.name||null)},e.THROW_IF_NOT_FOUND=cv,e.NULL=new fv,e.ngInjectableDef=kd({providedIn:"any",factory:function(){return Kd(hv)}}),e.__NG_ELEMENT_ID__=-1,e}(),vv=function(e){return e},mv=[],yv=vv,gv=function(){return Array.prototype.slice.call(arguments)},_v=Nd({provide:String,useValue:Nd}),bv="ngTokenPath",wv="ngTempTokenPath",xv=/\n/gm,Ev="ɵ",Sv=function(){function e(e,t,n){void 0===t&&(t=dv.NULL),void 0===n&&(n=null),this.parent=t,this.source=n;var r=this._records=new Map;r.set(dv,{token:dv,fn:vv,deps:mv,value:this,useNew:!1}),r.set(hv,{token:hv,fn:vv,deps:mv,value:this,useNew:!1}),function e(t,n){if(n)if((n=Ld(n))instanceof Array)for(var r=0;r<n.length;r++)e(t,n[r]);else{if("function"==typeof n)throw kv("Function/Class not supported",n);if(!n||"object"!=typeof n||!n.provide)throw kv("Unexpected provider",n);var i=Ld(n.provide),o=function s(e){var t=function n(e){var t=mv,n=e.deps;if(n&&n.length){t=[];for(var r=0;r<n.length;r++){var i=6;if((u=Ld(n[r]))instanceof Array)for(var o=0,s=u;o<s.length;o++){var a=s[o];a instanceof Sd||a==Sd?i|=1:a instanceof Td||a==Td?i&=-3:a instanceof Cd||a==Cd?i&=-5:u=a instanceof Ed?a.token:Ld(a)}t.push({token:u,options:i})}}else if(e.useExisting){var u;t=[{token:u=Ld(e.useExisting),options:6}]}else if(!(n||_v in e))throw kv("'deps' required",e);return t}(e),r=vv,i=mv,o=!1,s=Ld(e.provide);if(_v in e)i=e.useValue;else if(e.useFactory)r=e.useFactory;else if(e.useExisting);else if(e.useClass)o=!0,r=Ld(e.useClass);else{if("function"!=typeof s)throw kv("StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable",e);o=!0,r=s}return{deps:t,fn:r,useNew:o,value:i}}(n);if(!0===n.multi){var a=t.get(i);if(a){if(a.fn!==gv)throw Cv(i)}else t.set(i,a={token:n.provide,deps:[],useNew:!1,fn:gv,value:mv});a.deps.push({token:i=n,options:6})}var u=t.get(i);if(u&&u.fn==gv)throw Cv(i);t.set(i,o)}}(r,e)}return e.prototype.get=function(e,t,n){void 0===n&&(n=xd.Default);var r=this._records.get(e);try{return function e(t,n,r,i,o,s){try{return function a(t,n,r,i,o,s){var a,u;if(!n||s&xd.SkipSelf)s&xd.Self||(u=i.get(t,o,xd.Default));else{if((u=n.value)==yv)throw Error(Ev+"Circular dependency");if(u===mv){n.value=yv;var l=n.useNew,c=n.fn,p=n.deps,h=mv;if(p.length){h=[];for(var d=0;d<p.length;d++){var v=p[d],m=v.options,y=2&m?r.get(v.token):void 0;h.push(e(v.token,y,r,y||4&m?i:dv.NULL,1&m?null:dv.THROW_IF_NOT_FOUND,xd.Default))}}n.value=u=l?new((a=c).bind.apply(a,f([void 0],h))):c.apply(void 0,h)}}return u}(t,n,r,i,o,s)}catch(e){throw e instanceof Error||(e=new Error(e)),(e[wv]=e[wv]||[]).unshift(t),n&&n.value==yv&&(n.value=mv),e}}(e,r,this._records,this.parent,t,n)}catch(t){return Tv(t,e,"StaticInjectorError",this.source)}},e.prototype.toString=function(){var e=[];return this._records.forEach(function(t,n){return e.push(Od(n))}),"StaticInjector["+e.join(", ")+"]"},e}();function Cv(e){return kv("Cannot mix multi providers and regular providers",e)}function Tv(e,t,n,r){var i=e[wv];throw t[lv]&&i.unshift(t[lv]),e.message=Nv("\n"+e.message,i,n,r),e[bv]=i,e[wv]=null,e}function Nv(e,t,n,r){void 0===r&&(r=null),e=e&&"\n"===e.charAt(0)&&e.charAt(1)==Ev?e.substr(2):e;var i=Od(t);if(t instanceof Array)i=t.map(Od).join(" -> ");else if("object"==typeof t){var o=[];for(var s in t)if(t.hasOwnProperty(s)){var a=t[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):Od(a)))}i="{"+o.join(", ")+"}"}return n+(r?"("+r+")":"")+"["+i+"]: "+e.replace(xv,"\n ")}function kv(e,t){return new Error(Nv(e,t,"StaticInjectorError"))}
|
|
874
881
|
/**
|
|
875
882
|
* @license
|
|
876
883
|
* Copyright Google Inc. All Rights Reserved.
|
|
877
884
|
*
|
|
878
885
|
* Use of this source code is governed by an MIT-style license that can be
|
|
879
886
|
* found in the LICENSE file at https://angular.io/license
|
|
880
|
-
*/var
|
|
887
|
+
*/var Av="ngDebugContext",Pv="ngOriginalError",Iv="ngErrorLogger";function Mv(e){return e.length>1?" ("+
|
|
881
888
|
/**
|
|
882
889
|
* @license
|
|
883
890
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -885,7 +892,7 @@ var Hd,Bd=void 0;function Ud(e){var t=Bd;return Bd=e,t}function qd(e){var t=Hd;r
|
|
|
885
892
|
* Use of this source code is governed by an MIT-style license that can be
|
|
886
893
|
* found in the LICENSE file at https://angular.io/license
|
|
887
894
|
*/
|
|
888
|
-
function t(e){for(var t=[],n=0;n<e.length;++n){if(t.indexOf(e[n])>-1)return t.push(e[n]),t;t.push(e[n])}return t}(e.slice().reverse()).map(function(e){return Od(e.token)}).join(" -> ")+")":""}function
|
|
895
|
+
function t(e){for(var t=[],n=0;n<e.length;++n){if(t.indexOf(e[n])>-1)return t.push(e[n]),t;t.push(e[n])}return t}(e.slice().reverse()).map(function(e){return Od(e.token)}).join(" -> ")+")":""}function Ov(e,t,n,r){var i=[t],o=n(i),s=r?function a(e,t){var n=e+" caused by: "+(t instanceof Error?t.message:t),r=Error(n);return r[Pv]=t,r}(o,r):Error(o);return s.addKey=Rv,s.keys=i,s.injectors=[e],s.constructResolvingMessage=n,s[Pv]=r,s}function Rv(e,t){this.injectors.push(e),this.keys.push(t),this.message=this.constructResolvingMessage(this.keys)}function Dv(e,t){for(var n=[],r=0,i=t.length;r<i;r++){var o=t[r];n.push(o&&0!=o.length?o.map(Od).join(" "):"?")}return Error("Cannot resolve all parameters for '"+Od(e)+"'("+n.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+Od(e)+"' is decorated with Injectable.")}
|
|
889
896
|
/**
|
|
890
897
|
* @license
|
|
891
898
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -893,14 +900,14 @@ function t(e){for(var t=[],n=0;n<e.length;++n){if(t.indexOf(e[n])>-1)return t.pu
|
|
|
893
900
|
* Use of this source code is governed by an MIT-style license that can be
|
|
894
901
|
* found in the LICENSE file at https://angular.io/license
|
|
895
902
|
*/
|
|
896
|
-
var
|
|
903
|
+
var Lv=function(){function e(e,t){if(this.token=e,this.id=t,!e)throw new Error("Token must be defined!");this.displayName=Od(this.token)}return e.get=function(e){return Fv.get(Ld(e))},Object.defineProperty(e,"numberOfKeys",{get:function(){return Fv.numberOfKeys},enumerable:!0,configurable:!0}),e}(),Fv=new(function(){function e(){this._allKeys=new Map}return e.prototype.get=function(e){if(e instanceof Lv)return e;if(this._allKeys.has(e))return this._allKeys.get(e);var t=new Lv(e,Lv.numberOfKeys);return this._allKeys.set(e,t),t},Object.defineProperty(e.prototype,"numberOfKeys",{get:function(){return this._allKeys.size},enumerable:!0,configurable:!0}),e}()),jv=new(function(){function e(e){this.reflectionCapabilities=e}return e.prototype.updateCapabilities=function(e){this.reflectionCapabilities=e},e.prototype.factory=function(e){return this.reflectionCapabilities.factory(e)},e.prototype.parameters=function(e){return this.reflectionCapabilities.parameters(e)},e.prototype.annotations=function(e){return this.reflectionCapabilities.annotations(e)},e.prototype.propMetadata=function(e){return this.reflectionCapabilities.propMetadata(e)},e.prototype.hasLifecycleHook=function(e,t){return this.reflectionCapabilities.hasLifecycleHook(e,t)},e.prototype.getter=function(e){return this.reflectionCapabilities.getter(e)},e.prototype.setter=function(e){return this.reflectionCapabilities.setter(e)},e.prototype.method=function(e){return this.reflectionCapabilities.method(e)},e.prototype.importUri=function(e){return this.reflectionCapabilities.importUri(e)},e.prototype.resourceUri=function(e){return this.reflectionCapabilities.resourceUri(e)},e.prototype.resolveIdentifier=function(e,t,n,r){return this.reflectionCapabilities.resolveIdentifier(e,t,n,r)},e.prototype.resolveEnum=function(e,t){return this.reflectionCapabilities.resolveEnum(e,t)},e}())(new Jd),Vv=function(){function e(e,t,n){this.key=e,this.optional=t,this.visibility=n}return e.fromKey=function(t){return new e(t,!1,null)},e}(),Hv=[],Bv=function Bv(e,t,n){this.key=e,this.resolvedFactories=t,this.multiProvider=n,this.resolvedFactory=this.resolvedFactories[0]},Uv=function Uv(e,t){this.factory=e,this.dependencies=t};function qv(e){var t,n;if(e.useClass){var r=Ld(e.useClass);t=jv.factory(r),n=zv(r)}else e.useExisting?(t=function(e){return e},n=[Vv.fromKey(Lv.get(e.useExisting))]):e.useFactory?(t=e.useFactory,n=function i(e,t){if(t){var n=t.map(function(e){return[e]});return t.map(function(t){return Wv(e,t,n)})}return zv(e)}(e.useFactory,e.deps)):(t=function(){return e.useValue},n=Hv);return new Uv(t,n)}function Kv(e){return new Bv(Lv.get(e.provide),[qv(e)],e.multi||!1)}function zv(e){var t=jv.parameters(e);if(!t)return[];if(t.some(function(e){return null==e}))throw Dv(e,t);return t.map(function(n){return Wv(e,n,t)})}function Wv(e,t,n){var r=null,i=!1;if(!Array.isArray(t))return Qv(t instanceof Ed?t.token:t,i,null);for(var o=null,s=0;s<t.length;++s){var a=t[s];a instanceof Qd?r=a:a instanceof Ed?r=a.token:a instanceof Sd?i=!0:a instanceof Cd||a instanceof Td?o=a:a instanceof uv&&(r=a)}if(null!=(r=Ld(r)))return Qv(r,i,o);throw Dv(e,n)}function Qv(e,t,n){return new Vv(Lv.get(e),t,n)}
|
|
897
904
|
/**
|
|
898
905
|
* @license
|
|
899
906
|
* Copyright Google Inc. All Rights Reserved.
|
|
900
907
|
*
|
|
901
908
|
* Use of this source code is governed by an MIT-style license that can be
|
|
902
909
|
* found in the LICENSE file at https://angular.io/license
|
|
903
|
-
*/var $v,Xv,Yv,Zv
|
|
910
|
+
*/var $v,Gv,Xv,Yv,Zv=new Object,Jv=function(){function e(){}return e.resolve=function(e){return function t(e){var t=function n(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t.get(r.key.id);if(i){if(r.multiProvider!==i.multiProvider)throw Error("Cannot mix multi providers and regular providers, got: "+i+" "+r);if(r.multiProvider)for(var o=0;o<r.resolvedFactories.length;o++)i.resolvedFactories.push(r.resolvedFactories[o]);else t.set(r.key.id,r)}else{var s;s=r.multiProvider?new Bv(r.key,r.resolvedFactories.slice(),r.multiProvider):r,t.set(r.key.id,s)}}return t}(function e(t,n){return t.forEach(function(t){if(t instanceof Qd)n.push({provide:t,useClass:t});else if(t&&"object"==typeof t&&void 0!==t.provide)n.push(t);else{if(!(t instanceof Array))throw function r(e){return Error("Invalid provider - only instances of Provider and Type are allowed, got: "+e)}(t);e(t,n)}}),n}(e,[]).map(Kv),new Map);return Array.from(t.values())}(e)},e.resolveAndCreate=function(t,n){var r=e.resolve(t);return e.fromResolvedProviders(r,n)},e.fromResolvedProviders=function(e,t){return new em(e,t)},e}(),em=function(){function e(e,t){this._constructionCounter=0,this._providers=e,this.parent=t||null;var n=e.length;this.keyIds=new Array(n),this.objs=new Array(n);for(var r=0;r<n;r++)this.keyIds[r]=e[r].key.id,this.objs[r]=Zv}return e.prototype.get=function(e,t){return void 0===t&&(t=pv),this._getByKey(Lv.get(e),null,t)},e.prototype.resolveAndCreateChild=function(e){var t=Jv.resolve(e);return this.createChildFromResolved(t)},e.prototype.createChildFromResolved=function(t){var n=new e(t);return n.parent=this,n},e.prototype.resolveAndInstantiate=function(e){return this.instantiateResolved(Jv.resolve([e])[0])},e.prototype.instantiateResolved=function(e){return this._instantiateProvider(e)},e.prototype.getProviderAtIndex=function(e){if(e<0||e>=this._providers.length)throw function t(e){return Error("Index "+e+" is out-of-bounds.")}(e);return this._providers[e]},e.prototype._new=function(e){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw function t(e,n){return Ov(e,n,function(e){return"Cannot instantiate cyclic dependency!"+Mv(e)})}(this,e.key);return this._instantiateProvider(e)},e.prototype._getMaxNumberOfObjects=function(){return this.objs.length},e.prototype._instantiateProvider=function(e){if(e.multiProvider){for(var t=new Array(e.resolvedFactories.length),n=0;n<e.resolvedFactories.length;++n)t[n]=this._instantiate(e,e.resolvedFactories[n]);return t}return this._instantiate(e,e.resolvedFactories[0])},e.prototype._instantiate=function(e,t){var n,r,i=this,o=t.factory;try{n=t.dependencies.map(function(e){return i._getByReflectiveDependency(e)})}catch(t){throw t.addKey&&t.addKey(this,e.key),t}try{r=o.apply(void 0,f(n))}catch(t){throw function s(e,t,n,r){return Ov(e,r,function(e){var n=Od(e[0].token);return t.message+": Error during instantiation of "+n+"!"+Mv(e)+"."},t)}(this,t,0,e.key)}return r},e.prototype._getByReflectiveDependency=function(e){return this._getByKey(e.key,e.visibility,e.optional?null:pv)},e.prototype._getByKey=function(t,n,r){return t===e.INJECTOR_KEY?this:n instanceof Cd?this._getByKeySelf(t,r):this._getByKeyDefault(t,r,n)},e.prototype._getObjByKeyId=function(e){for(var t=0;t<this.keyIds.length;t++)if(this.keyIds[t]===e)return this.objs[t]===Zv&&(this.objs[t]=this._new(this._providers[t])),this.objs[t];return Zv},e.prototype._throwOrNull=function(e,t){if(t!==pv)return t;throw function n(e,t){return Ov(e,t,function(e){return"No provider for "+Od(e[0].token)+"!"+Mv(e)})}(this,e)},e.prototype._getByKeySelf=function(e,t){var n=this._getObjByKeyId(e.id);return n!==Zv?n:this._throwOrNull(e,t)},e.prototype._getByKeyDefault=function(t,n,r){var i;for(i=r instanceof Td?this.parent:this;i instanceof e;){var o=i,s=o._getObjByKeyId(t.id);if(s!==Zv)return s;i=o.parent}return null!==i?i.get(t.token,n):this._throwOrNull(t,n)},Object.defineProperty(e.prototype,"displayName",{get:function(){return"ReflectiveInjector(providers: ["+function e(t,n){for(var r=new Array(t._providers.length),i=0;i<t._providers.length;++i)r[i]=n(t.getProviderAtIndex(i));return r}
|
|
904
911
|
/**
|
|
905
912
|
* @license
|
|
906
913
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -921,7 +928,7 @@ var Fv=function(){function e(e,t){if(this.token=e,this.id=t,!e)throw new Error("
|
|
|
921
928
|
*
|
|
922
929
|
* Use of this source code is governed by an MIT-style license that can be
|
|
923
930
|
* found in the LICENSE file at https://angular.io/license
|
|
924
|
-
*/(this,function(e){return' "'+e.key.displayName+'" '}).join(", ")+"])"},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.displayName},e.INJECTOR_KEY=
|
|
931
|
+
*/(this,function(e){return' "'+e.key.displayName+'" '}).join(", ")+"])"},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.displayName},e.INJECTOR_KEY=Lv.get(dv),e}();new uv("AnalyzeForEntryComponents"),wd("ContentChildren",function(e,t){return void 0===t&&(t={}),a({selector:e,first:!1,isViewQuery:!1,descendants:!1},t)},Yv=function Yv(){}),wd("ContentChild",function(e,t){return void 0===t&&(t={}),a({selector:e,first:!0,isViewQuery:!1,descendants:!0},t)},Yv),wd("ViewChildren",function(e,t){return void 0===t&&(t={}),a({selector:e,first:!1,isViewQuery:!0,descendants:!0},t)},Yv),wd("ViewChild",function(e,t){return a({selector:e,first:!0,isViewQuery:!0,descendants:!0},t)},Yv),function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"}($v||($v={})),function(e){e[e.CheckOnce=0]="CheckOnce",e[e.Checked=1]="Checked",e[e.CheckAlways=2]="CheckAlways",e[e.Detached=3]="Detached",e[e.Errored=4]="Errored",e[e.Destroyed=5]="Destroyed"}(Gv||(Gv={})),function(e){e[e.Emulated=0]="Emulated",e[e.Native=1]="Native",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"}(Xv||(Xv={}));
|
|
925
932
|
/**
|
|
926
933
|
* @license
|
|
927
934
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -936,7 +943,7 @@ var Fv=function(){function e(e,t){if(this.token=e,this.id=t,!e)throw new Error("
|
|
|
936
943
|
* Use of this source code is governed by an MIT-style license that can be
|
|
937
944
|
* found in the LICENSE file at https://angular.io/license
|
|
938
945
|
*/
|
|
939
|
-
var
|
|
946
|
+
var tm=[],nm=Nd({ngComponentDef:Nd}),rm=(Nd({ngDirectiveDef:Nd}),Nd({ngPipeDef:Nd}),Nd({ngModuleDef:Nd})),im=(Nd({ngBaseDef:Nd}),Nd({__NG_ELEMENT_ID__:Nd}));
|
|
940
947
|
/**
|
|
941
948
|
* @license
|
|
942
949
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -944,7 +951,7 @@ var nm=[],rm=Nd({ngComponentDef:Nd}),im=(Nd({ngDirectiveDef:Nd}),Nd({ngPipeDef:N
|
|
|
944
951
|
* Use of this source code is governed by an MIT-style license that can be
|
|
945
952
|
* found in the LICENSE file at https://angular.io/license
|
|
946
953
|
*/
|
|
947
|
-
function
|
|
954
|
+
function om(e){return"function"==typeof e?e.name||e:"string"==typeof e?e:null==e?"":""+e}function sm(e){return"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type:om(e)}var am=("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(jd),um="�";function lm(e){return e.indexOf(um)>=0}
|
|
948
955
|
/**
|
|
949
956
|
* @license
|
|
950
957
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -952,7 +959,7 @@ function sm(e){return"function"==typeof e?e.name||e:"string"==typeof e?e:null==e
|
|
|
952
959
|
* Use of this source code is governed by an MIT-style license that can be
|
|
953
960
|
* found in the LICENSE file at https://angular.io/license
|
|
954
961
|
*/
|
|
955
|
-
var
|
|
962
|
+
var cm=0,pm=1,hm=2,fm=3,dm=4,vm=5,mm=6,ym=7,gm=8,_m=9,bm=10,wm=11,xm=12,Em=13,Sm=14,Cm=17,Tm=18,Nm=20,km=1,Am=2,Pm=7,Im=8,Mm="__ngContext__";
|
|
956
963
|
/**
|
|
957
964
|
* @license
|
|
958
965
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -960,7 +967,7 @@ var pm=0,hm=1,fm=2,dm=3,vm=4,mm=5,ym=6,gm=7,_m=8,bm=9,wm=10,xm=11,Em=12,Sm=13,Cm
|
|
|
960
967
|
* Use of this source code is governed by an MIT-style license that can be
|
|
961
968
|
* found in the LICENSE file at https://angular.io/license
|
|
962
969
|
*/
|
|
963
|
-
function
|
|
970
|
+
function Om(e){for(;Array.isArray(e);)e=e[cm];return e}function Rm(e){return Array.isArray(e)&&"object"==typeof e[km]}function Dm(e){return Array.isArray(e)&&!0===e[km]}function Lm(e,t){return Om(t[e.index])}function Fm(e,t){return t[pm].data[e+Nm]}function jm(e,t){var n=t[e];return Rm(n)?n:n[cm]}function Vm(e){return 1==(1&e.flags)}function Hm(e){return null!==e.template}function Bm(e){return e[Mm]}function Um(e){var t=Bm(e);return t?Array.isArray(t)?t:t.lView:null}function qm(e){e[Tm]=0}
|
|
964
971
|
/**
|
|
965
972
|
* @license
|
|
966
973
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -975,14 +982,14 @@ function Rm(e){for(;Array.isArray(e);)e=e[pm];return e}function Dm(e){return Arr
|
|
|
975
982
|
* Use of this source code is governed by an MIT-style license that can be
|
|
976
983
|
* found in the LICENSE file at https://angular.io/license
|
|
977
984
|
*/
|
|
978
|
-
var zm,Wm,Qm
|
|
985
|
+
var Km,zm,Wm,Qm=8,$m=8,Gm=9,Xm=-1,Ym=function Ym(e,t,n){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=n};function Zm(e,t,n,r,i,o){if(!r){var s=(3&e[hm])===i?t:n;s&&function a(e,t,n,r){for(var i=null!=r?r:-1,o=0,s=void 0!==r?65535&e[Tm]:0;s<t.length;s++)if("number"==typeof t[s+1]){if(o=t[s],null!=r&&o>=r)break}else t[s]<0&&(e[Tm]+=65536),(o<i||-1==i)&&(Jm(e,n,t,s),e[Tm]=(4294901760&e[Tm])+s+2),s++}(e,s,i,o),null==o&&(3&e[hm])===i&&3!==i&&(e[hm]&=1023,e[hm]+=1)}}function Jm(e,t,n,r){var i=n[r]<0,o=n[r+1],s=e[i?-n[r]:n[r]];i?e[hm]>>10<e[Tm]>>16&&(3&e[hm])===t&&(e[hm]+=1024,o.call(s)):o.call(s)}
|
|
979
986
|
/**
|
|
980
987
|
* @license
|
|
981
988
|
* Copyright Google Inc. All Rights Reserved.
|
|
982
989
|
*
|
|
983
990
|
* Use of this source code is governed by an MIT-style license that can be
|
|
984
991
|
* found in the LICENSE file at https://angular.io/license
|
|
985
|
-
*/function
|
|
992
|
+
*/function ey(){return Wm}function ty(){return Km}function ny(e){Km=e}function ry(e,t){Km=e,Wm=t}function iy(){return zm}function oy(e){zm=e}function sy(e){return void 0===e&&(e=Wm),4==(4&e[hm])}var ay=!1;function uy(){return ay}function ly(e){ay=e}function cy(e,t){var n=Wm;return Km=t,zm=!0,Wm=e,n}function py(e){var t=Wm[pm];if(sy(Wm))Wm[hm]&=-5;else try{qm(Wm),Zm(Wm,t.viewHooks,t.viewCheckHooks,ay,2,void 0)}finally{Wm[hm]&=-73,Wm[ym]=t.bindingStartIndex}cy(e,null)}var hy,fy=null;function dy(e){return!!e.listen}!function(e){e[e.Important=1]="Important",e[e.DashCase=2]="DashCase"}(hy||(hy={}));var vy={createRenderer:function(e,t){return document}};function my(e,t,n){return{lView:e,nodeIndex:t,native:n,component:void 0,directives:void 0,localRefs:void 0}}function yy(e,t){e[Mm]=t}function gy(e,t){for(var n=e[pm].firstChild;n;){if(Lm(n,e)===t)return n.index;n=_y(n)}return-1}function _y(e){if(e.child)return e.child;if(e.next)return e.next;for(;e.parent&&!e.parent.next;)e=e.parent;return e.parent&&e.parent.next}
|
|
986
993
|
/**
|
|
987
994
|
* @license
|
|
988
995
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -990,28 +997,28 @@ var zm,Wm,Qm,Gm,$m=8,Xm=8,Ym=9,Zm=-1,Jm=(Gm=function Gm(e,t,n){this.factory=e,th
|
|
|
990
997
|
* Use of this source code is governed by an MIT-style license that can be
|
|
991
998
|
* found in the LICENSE file at https://angular.io/license
|
|
992
999
|
*/
|
|
993
|
-
var
|
|
1000
|
+
var by=0;
|
|
994
1001
|
/**
|
|
995
1002
|
* @license
|
|
996
1003
|
* Copyright Google Inc. All Rights Reserved.
|
|
997
1004
|
*
|
|
998
1005
|
* Use of this source code is governed by an MIT-style license that can be
|
|
999
1006
|
* found in the LICENSE file at https://angular.io/license
|
|
1000
|
-
*/function
|
|
1007
|
+
*/function wy(e,t){for(var n=e,r=t[n],i=t;Array.isArray(r);)i=r,r=r[cm];if(function o(e){return Array.isArray(e)&&"number"==typeof e[km]}(i))return i;var s=Fm(e-Nm,t).stylingTemplate;return i!==t&&(n=cm),i[n]=s?function a(e,t){for(var n=t.slice(),r=0;r<10;r++){var i=t[r];Array.isArray(i)&&(n[r]=i.slice())}return n[0]=e,n[1]|=16,n}(r,s):function u(e,t,n,r){var i=[e||null,0,[],n||[null,null],r||[null,null],[0,0],[0],[0],null,null];return function o(e,t,n,r){void 0===n&&(n=-1);for(var i=e[2],o=2*t,s=o+2,a=i.length;a<s;a+=2)i.push(-1,null);var u=o+0;n>=0&&-1===i[u]&&(i[u]=n,i[o+1]=r||null)}(i,by),i}(r)}
|
|
1001
1008
|
/**
|
|
1002
1009
|
* @license
|
|
1003
1010
|
* Copyright Google Inc. All Rights Reserved.
|
|
1004
1011
|
*
|
|
1005
1012
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1006
1013
|
* found in the LICENSE file at https://angular.io/license
|
|
1007
|
-
*/function
|
|
1014
|
+
*/function xy(e){return 32767&e}function Ey(e,t){for(var n=function r(e){return e>>16}(e),i=t;n>0;)i=i[Cm],n--;return i}
|
|
1008
1015
|
/**
|
|
1009
1016
|
* @license
|
|
1010
1017
|
* Copyright Google Inc. All Rights Reserved.
|
|
1011
1018
|
*
|
|
1012
1019
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1013
1020
|
* found in the LICENSE file at https://angular.io/license
|
|
1014
|
-
*/function
|
|
1021
|
+
*/function Sy(e){var t=e[fm];return Dm(t)?t[fm]:t}function Cy(e){for(var t=e[mm];t&&2===t.type;)t=(e=e[Cm])[mm];return e}
|
|
1015
1022
|
/**
|
|
1016
1023
|
* @license
|
|
1017
1024
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1019,28 +1026,28 @@ var xy=0;
|
|
|
1019
1026
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1020
1027
|
* found in the LICENSE file at https://angular.io/license
|
|
1021
1028
|
*/
|
|
1022
|
-
var
|
|
1029
|
+
var Ty=!0;function Ny(e){var t=Ty;return Ty=e,t}var ky=255,Ay=0;function Py(e,t){e.push(0,0,0,0,0,0,0,0,t)}function Iy(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null==t[e.injectorIndex+$m]?-1:e.injectorIndex}function My(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;for(var n=t[mm],r=1;n&&-1===n.injectorIndex;)n=(t=t[Cm])?t[mm]:null,r++;return n?n.injectorIndex|r<<16:-1}function Oy(e,t,n,r,i){if(void 0===r&&(r=xd.Default),e){var o=function s(e){if("string"==typeof e)return e.charCodeAt(0)||0;var t=e[im];return"number"==typeof t&&t>0?t&ky:t}(n);if("function"==typeof o){var a=ty(),u=ey();ry(e,t);try{var l=o();if(null!=l||r&xd.Optional)return l;throw new Error("No provider for "+sm(n)+"!")}finally{ry(a,u)}}else if("number"==typeof o){if(-1===o)return new Vy(e,t);var c=null,p=Iy(e,t),h=Xm,f=r&xd.Host?Cy(t)[mm]:null;for((-1===p||r&xd.SkipSelf)&&(h=-1===p?My(e,t):t[p+$m],jy(r,!1)?(c=t[pm],p=xy(h),t=Ey(h,t)):p=-1);-1!==p;){h=t[p+$m];var d=t[pm];if(Fy(o,p,d.data)){var v=Dy(p,t,n,c,r,f);if(v!==Ry)return v}jy(r,t[pm].data[p+Qm]===f)&&Fy(o,p,t)?(c=d,p=xy(h),t=Ey(h,t)):p=-1}}}if(r&xd.Optional&&void 0===i&&(i=null),0==(r&(xd.Self|xd.Host))){var m=t[bm],y=qd(void 0);try{return m?m.get(n,i,r&xd.Optional):zd(n,i,r&xd.Optional)}finally{qd(y)}}if(r&xd.Optional)return i;throw new Error("NodeInjector: NOT_FOUND ["+sm(n)+"]")}var Ry={};function Dy(e,t,n,r,i,o){var s=t[pm],a=s.data[e+Qm],u=function l(e,t,n,r,i){for(var o=e.providerIndexes,s=t[pm].data,a=65535&o,u=e.directiveStart,l=o>>16,c=i?a+l:e.directiveEnd,p=r?a:a+l;p<c;p++){var h=s[p];if(p<u&&n===h||p>=u&&h.type===n)return p}if(i){var f=s[u];if(f&&Hm(f)&&f.type===n)return u}return null}(a,t,n,null==r?Vm(a)&&Ty:r!=s&&3===a.type,i&xd.Host&&o===a);return null!==u?Ly(s.data,t,u,a):Ry}function Ly(e,t,n,r){var i=t[n];if(function o(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)==Ym.prototype}
|
|
1023
1030
|
/**
|
|
1024
1031
|
* @license
|
|
1025
1032
|
* Copyright Google Inc. All Rights Reserved.
|
|
1026
1033
|
*
|
|
1027
1034
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1028
1035
|
* found in the LICENSE file at https://angular.io/license
|
|
1029
|
-
*/(i)){var s=i;if(s.resolving)throw new Error("Circular dep for "+
|
|
1036
|
+
*/(i)){var s=i;if(s.resolving)throw new Error("Circular dep for "+sm(e[n]));var a=Ny(s.canSeeViewProviders);s.resolving=!0;var u=void 0;s.injectImpl&&(u=qd(s.injectImpl));var l=ty(),c=ey();ry(r,t);try{i=t[n]=s.factory(null,e,t,r)}finally{s.injectImpl&&qd(u),Ny(a),s.resolving=!1,ry(l,c)}}return i}function Fy(e,t,n){var r=64&e,i=32&e;return!!((128&e?r?i?n[t+7]:n[t+6]:i?n[t+5]:n[t+4]:r?i?n[t+3]:n[t+2]:i?n[t+1]:n[t])&1<<e)}function jy(e,t){return!(e&xd.Self||e&xd.Host&&t)}var Vy=function(){function e(e,t){this._tNode=e,this._lView=t}return e.prototype.get=function(e,t){return Oy(this._tNode,this._lView,e,void 0,t)},e}();
|
|
1030
1037
|
/**
|
|
1031
1038
|
* @license
|
|
1032
1039
|
* Copyright Google Inc. All Rights Reserved.
|
|
1033
1040
|
*
|
|
1034
1041
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1035
1042
|
* found in the LICENSE file at https://angular.io/license
|
|
1036
|
-
*/function
|
|
1043
|
+
*/function Hy(e){return e[Av]}function By(e){return e[Pv]}function Uy(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e.error.apply(e,f(t))}
|
|
1037
1044
|
/**
|
|
1038
1045
|
* @license
|
|
1039
1046
|
* Copyright Google Inc. All Rights Reserved.
|
|
1040
1047
|
*
|
|
1041
1048
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1042
1049
|
* found in the LICENSE file at https://angular.io/license
|
|
1043
|
-
*/var
|
|
1050
|
+
*/var qy=function(){function e(){this._console=console}return e.prototype.handleError=function(e){var t=this._findOriginalError(e),n=this._findContext(e),r=function i(e){return e[Iv]||Uy}(e);r(this._console,"ERROR",e),t&&r(this._console,"ORIGINAL ERROR",t),n&&r(this._console,"ERROR CONTEXT",n)},e.prototype._findContext=function(e){return e?Hy(e)?Hy(e):this._findContext(By(e)):null},e.prototype._findOriginalError=function(e){for(var t=By(e);t&&By(t);)t=By(t);return t},e}(),Ky=!0;
|
|
1044
1051
|
/**
|
|
1045
1052
|
* @license
|
|
1046
1053
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1061,7 +1068,7 @@ var ky=!0;function Ay(e){var t=ky;return ky=e,t}var Py=255,Iy=0;function My(e,t)
|
|
|
1061
1068
|
*
|
|
1062
1069
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1063
1070
|
* found in the LICENSE file at https://angular.io/license
|
|
1064
|
-
*/function
|
|
1071
|
+
*/function zy(){return Ky}
|
|
1065
1072
|
/**
|
|
1066
1073
|
* @license
|
|
1067
1074
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1082,7 +1089,7 @@ var ky=!0;function Ay(e){var t=ky;return ky=e,t}var Py=255,Iy=0;function My(e,t)
|
|
|
1082
1089
|
*
|
|
1083
1090
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1084
1091
|
* found in the LICENSE file at https://angular.io/license
|
|
1085
|
-
*/function
|
|
1092
|
+
*/function Wy(e){var t,n,r={};try{for(var i=p(e.split(",")),o=i.next();!o.done;o=i.next())r[o.value]=!0}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function Qy(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i={};try{for(var o=p(n),s=o.next();!s.done;s=o.next()){var a=s.value;for(var u in a)a.hasOwnProperty(u)&&(i[u]=!0)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return i}var $y,Gy=Wy("area,br,col,hr,img,wbr"),Xy=Wy("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Yy=Wy("rp,rt"),Zy=Qy(Yy,Xy),Jy=Qy(Xy,Wy("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),eg=Qy(Yy,Wy("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video"));Qy(Gy,Jy,eg,Zy),Qy(Wy("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Wy("srcset"),Wy("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Wy("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),Wy("script,style,template"),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"}($y||($y={}));var tg=function tg(){},ng=/([A-Z])/g;
|
|
1086
1093
|
/**
|
|
1087
1094
|
* @license
|
|
1088
1095
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1103,28 +1110,28 @@ var ky=!0;function Ay(e){var t=ky;return ky=e,t}var Py=255,Iy=0;function My(e,t)
|
|
|
1103
1110
|
*
|
|
1104
1111
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1105
1112
|
* found in the LICENSE file at https://angular.io/license
|
|
1106
|
-
*/function
|
|
1113
|
+
*/function rg(e){try{return null!=e?e.toString().slice(0,30):e}catch(e){return"[ERROR] Exception while trying to serialize the value"}}
|
|
1107
1114
|
/**
|
|
1108
1115
|
* @license
|
|
1109
1116
|
* Copyright Google Inc. All Rights Reserved.
|
|
1110
1117
|
*
|
|
1111
1118
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1112
1119
|
* found in the LICENSE file at https://angular.io/license
|
|
1113
|
-
*/var
|
|
1120
|
+
*/var ig={marker:"element"},og={marker:"comment"};function sg(e){if(e){var t=e.debug;return function n(e,t){null==e&&function n(e){throw new Error("ASSERTION ERROR: "+e)}(t)}(t,"Object does not have a debug representation."),t}return e}function ag(e,t){void 0===t&&(t=!1);var n=Om(e);if(n){var r=n.nodeType===Node.TEXT_NODE,i=(r?n.textContent:n.outerHTML)||"";return t||r?i:i.split(n.innerHTML)[0]||null}return null}function ug(e){for(;Array.isArray(e);){if(e.length>=Nm-1)return e;e=e[cm]}return null}!function(){function e(e){this._raw_lView=e}Object.defineProperty(e.prototype,"flags",{get:function(){var e=this._raw_lView[hm];return{__raw__flags__:e,initPhaseState:3&e,creationMode:!!(4&e),firstViewPass:!!(8&e),checkAlways:!!(16&e),dirty:!!(64&e),attached:!!(128&e),destroyed:!!(256&e),isRoot:!!(512&e),indexWithinInitPhase:e>>10}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return sg(this._raw_lView[fm])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"host",{get:function(){return ag(this._raw_lView[cm],!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._raw_lView[_m]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nodes",{get:function(){var e=this._raw_lView;return function e(t,n){if(t){for(var r=[],i=t;i;){var o=n[t.index],s=Om(o),a=sg(ug(o));r.push({html:ag(s),native:s,nodes:e(t.child,n),component:a}),i=i.next}return r}return null}(e[pm].firstChild,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"__other__",{get:function(){return{tView:this._raw_lView[pm],cleanup:this._raw_lView[gm],injector:this._raw_lView[bm],rendererFactory:this._raw_lView[wm],renderer:this._raw_lView[xm],sanitizer:this._raw_lView[Em],childHead:sg(this._raw_lView[Sm]),next:sg(this._raw_lView[dm]),childTail:sg(this._raw_lView[15]),declarationView:sg(this._raw_lView[Cm]),contentQueries:this._raw_lView[16],queries:this._raw_lView[vm],tHost:this._raw_lView[mm],bindingIndex:this._raw_lView[ym]}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childViews",{get:function(){for(var e=[],t=this.__other__.childHead;t;)e.push(t),t=t.__other__.next;return e},enumerable:!0,configurable:!0})}(),function(){function e(e){this._raw_lContainer=e}Object.defineProperty(e.prototype,"activeIndex",{get:function(){return this._raw_lContainer[Am]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"views",{get:function(){return this._raw_lContainer[Im].map(sg)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return sg(this._raw_lContainer[fm])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"queries",{get:function(){return this._raw_lContainer[vm]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"host",{get:function(){return this._raw_lContainer[cm]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"native",{get:function(){return this._raw_lContainer[Pm]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"__other__",{get:function(){return{next:sg(this._raw_lContainer[dm])}},enumerable:!0,configurable:!0})}();var lg=function(){function e(e,t,n,r){this.__raw_opCode=e,this._lView=t,this.nodeIndex=n,this.type=r}return Object.defineProperty(e.prototype,"tNode",{get:function(){return Fm(this.nodeIndex,this._lView)},enumerable:!0,configurable:!0}),e}(),cg=(Object.defineProperty(function pg(e,t){this.__raw_opCodes=e,this.__lView=t}.prototype,"operations",{get:function(){for(var e=this.__lView,t=this.__raw_opCodes,n=[],r=0;r<t.length;r++){var i=t[r],o=void 0;if("string"==typeof i&&(o={__raw_opCode:i,type:"Create Text Node",nodeIndex:t[++r],text:i}),"number"==typeof i)switch(7&i){case 1:o=new lg(i,e,i>>>17,"AppendChild");break;case 0:o=new lg(i,e,i>>>3,"Select");break;case 5:var s=i>>>3;o=new lg(i,e,s,"ElementEnd");break;case 4:(o=new lg(i,e,s=i>>>3,"Attr")).attrName=t[++r],o.attrValue=t[++r]}if(!o)switch(i){case og:o={__raw_opCode:i,type:"COMMENT_MARKER",commentValue:t[++r],nodeIndex:t[++r]};break;case ig:o={__raw_opCode:i,type:"ELEMENT_MARKER"}}o||(o={__raw_opCode:i,type:"Unknown Op Code",code:i}),n.push(o)}return n},enumerable:!0,configurable:!0}),Object.defineProperty(function hg(e,t,n){this.__raw_opCodes=e,this.icus=t,this.__lView=n}.prototype,"operations",{get:function(){for(var e=this.__lView,t=this.__raw_opCodes,n=this.icus,r=[],i=0;i<t.length;i++){for(var o=t[i],s=t[++i],a="",u=i+1;u<=i+s;u++){var l=t[u];if("string"==typeof l)a+=l;else if("number"==typeof l)if(l<0)a+="�"+(-l-1)+"�";else{var c=l>>>2,p=void 0,h=void 0;switch(3&l){case 1:var f=t[++u],d=t[++u];r.push({__raw_opCode:l,checkBit:o,type:"Attr",attrValue:a,attrName:f,sanitizeFn:d});break;case 0:r.push({__raw_opCode:l,checkBit:o,type:"Text",nodeIndex:c,text:a});break;case 2:h=n[p=t[++u]];var v=new lg(l,e,c,"IcuSwitch");v.tIcuIndex=p,v.checkBit=o,v.mainBinding=a,v.tIcu=h,r.push(v);break;case 3:h=n[p=t[++u]],(v=new lg(l,e,c,"IcuUpdate")).tIcuIndex=p,v.checkBit=o,v.tIcu=h,r.push(v)}}}i+=s}return r},enumerable:!0,configurable:!0}),{});function fg(e,t,n,r,i,o,s){n=i&&n?i(t,n):n,o||s?(o&&o.setValue(t,n),s&&s.setValue(t,n)):n?(n=n.toString(),dy(r)?r.setStyle(e,t,n,hy.DashCase):e.style.setProperty(t,n)):dy(r)?r.removeStyle(e,t,hy.DashCase):e.style.removeProperty(t)}function dg(e,t,n,r,i,o){i||o?(i&&i.setValue(t,n),o&&o.setValue(t,n)):""!==t&&(n?dy(r)?r.addClass(e,t):e.classList.add(t):dy(r)?r.removeClass(e,t):e.classList.remove(t))}function vg(e,t){return 2==(2&e[t>=10?t+0:t])}function mg(e,t){return e[t+2]}function yg(e,t){return e[t+1]}
|
|
1114
1121
|
/**
|
|
1115
1122
|
* @license
|
|
1116
1123
|
* Copyright Google Inc. All Rights Reserved.
|
|
1117
1124
|
*
|
|
1118
1125
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1119
1126
|
* found in the LICENSE file at https://angular.io/license
|
|
1120
|
-
*/function
|
|
1127
|
+
*/function gg(e){var t=e[pm],n=sy(e);if(t.firstTemplatePass=!1,e[ym]=t.bindingStartIndex,!n){var r=uy();!function i(e,t,n,r){n||Zm(e,t.preOrderHooks,t.preOrderCheckHooks,n,0,void 0!==r?r:null)}(e,t,r,void 0),function o(e){for(var t=e[Sm];null!==t;t=t[dm])if(t.length<Nm&&-1===t[Am])for(var n=t,r=0;r<n[Im].length;r++){var i=n[Im][r];wg(i,i[pm],i[_m])}}(e),_g(t,e),qm(e),Zm(e,t.contentHooks,t.contentCheckHooks,r,1,void 0),function s(e,t){try{if(e.expandoInstructions)for(var n=t[ym]=e.expandoStartIndex,r=-1,i=-1,o=0;o<e.expandoInstructions.length;o++){var s=e.expandoInstructions[o];if("number"==typeof s)if(s<=0){i=-s;var a=e.expandoInstructions[++o];r=n+=Gm+a}else n+=s;else null!==s&&(t[ym]=n,s(2,Om(t[r]),i)),r++}}finally{}}(t,e)}n&&t.staticContentQueries&&_g(t,e),function a(e){if(null!=e)for(var t=0;t<e.length;t++)void 0,void 0,(function n(e){return 128==(128&e[hm])}(o=jm(e[t],i=ey()))||sy(i))&&80&o[hm]&&(function r(e){for(var t=e[pm],n=e.length;n<t.blueprint.length;n++)e[n]=t.blueprint[n]}(o),Pg(o,o[_m]));var i,o}(t.components)}function _g(e,t){if(null!=e.contentQueries)for(var n=0;n<e.contentQueries.length;n++){var r=e.contentQueries[n];e.data[r].contentQueries(2,t[r],r)}}function bg(e,t,n,r,i,o,s,a,u,l){var c=t.blueprint.slice();return c[cm]=i,c[hm]=140|r,qm(c),c[fm]=c[Cm]=e,c[_m]=n,c[wm]=s||e&&e[wm],c[xm]=a||e&&e[xm],c[Em]=u||e&&e[Em]||null,c[bm]=l||e&&e[bm]||null,c[mm]=o,c}function wg(e,t,n){var r,i=iy(),o=ty();if(512&e[hm])Ng(function s(e){return function t(e){for(var t=Rm(e)?e:Um(e);t&&!(512&t[hm]);)t=Sy(t);return t}(e)[_m]}(e));else try{oy(!0),ny(null),r=cy(e,e[mm]),qm(e),Eg(t.template,Sg(e),n),e[pm].firstTemplatePass=!1,gg(e)}finally{py(r),oy(i),ny(o)}}function xg(e,t,n){var r=e[wm],i=cy(e,e[mm]),o=!uy(),s=sy(e);try{o&&!s&&r.begin&&r.begin(),s&&(n&&Eg(n,1,t),gg(e),e[hm]&=-5),qm(e),n&&Eg(n,2,t),gg(e)}finally{o&&!s&&r.end&&r.end(),py(i)}}function Eg(e,t,n){!function r(){fy=null}();try{e(t,n)}finally{}}function Sg(e){return sy(e)?1:2}function Cg(e,t,n,r,i,o,s,a){var u=Nm+n,l=u+r,c=function p(e,t){var n=new Array(t).fill(null,0,e).fill(cg,e);return n[ym]=e,n}(u,l);return c[pm]={id:e,blueprint:c,template:t,viewQuery:s,node:null,data:c.slice().fill(null,u),bindingStartIndex:u,viewQueryStartIndex:l,expandoStartIndex:l,expandoInstructions:null,firstTemplatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof i?i():i,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:a}}function Tg(e,t,n,r,i){return{type:t,index:n,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,propertyMetadataStartIndex:-1,propertyMetadataEndIndex:-1,flags:0,providerIndexes:0,tagName:r,attrs:i,localNames:null,initialInputs:void 0,inputs:void 0,outputs:void 0,tViews:null,next:null,projectionNext:null,child:null,parent:e,stylingTemplate:null,projection:null,onElementCreationFns:null}}function Ng(e){for(var t=0;t<e.components.length;t++){var n=e.components[t];xg(Um(n),n)}}function kg(e,t){var n=e[wm];n.begin&&n.begin();try{sy(e)&&Pg(e,t),Pg(e,t)}catch(t){throw function r(e,t){var n=e[bm],r=n?n.get(qy,null):null;r&&r.handleError(t)}
|
|
1121
1128
|
/**
|
|
1122
1129
|
* @license
|
|
1123
1130
|
* Copyright Google Inc. All Rights Reserved.
|
|
1124
1131
|
*
|
|
1125
1132
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1126
1133
|
* found in the LICENSE file at https://angular.io/license
|
|
1127
|
-
*/(e,t),t}finally{n.end&&n.end()}}function
|
|
1134
|
+
*/(e,t),t}finally{n.end&&n.end()}}function Ag(e){Ng(e[_m])}function Pg(e,t){var n=e[pm],r=cy(e,e[mm]),i=n.template,o=sy(e);try{qm(e),o&&Ig(1,n,t),Eg(i,Sg(e),t),gg(e),o&&!n.staticViewQueries||Ig(2,n,t)}finally{py(r)}}function Ig(e,t,n){var r=t.viewQuery;r&&r(e,n)}var Mg=Promise.resolve(null),Og=[];function Rg(e,t,n,r,i){for(var o,s,a=e[pm].node,u=-1,l=e,c=a.child;c;){var h=null;if(3===c.type||4===c.type){Dg(t,n,r,Lm(c,l),c,i);var f=l[c.index];Dm(f)&&(Dg(t,n,r,f[Pm],c,i),f[Im].length&&(h=(l=f[Im][0])[pm].node,i=f[Pm]))}else if(0===c.type){var d=l[c.index];Dg(t,n,r,d[Pm],c,i),d[Im].length&&(h=(l=d[Im][0])[pm].node,i=d[Pm])}else if(1===c.type){var v=Cy(l),m=v[mm].projection[c.projection];if(Array.isArray(m))try{for(var y=p(m),g=y.next();!g.done;g=y.next())Dg(t,n,r,g.value,c,i)}catch(e){o={error:e}}finally{try{g&&!g.done&&(s=y.return)&&s.call(y)}finally{if(o)throw o.error}}else Og[++u]=c,Og[++u]=l,m&&(h=(l=v[fm])[pm].data[m.index])}else h=c.child;if(null===h)for(null===c.projectionNext&&2&c.flags&&(l=Og[u--],c=Og[u--]),h=2&c.flags?c.projectionNext:4===c.type&&c.child||c.next;!h;){if(null===(c=c.parent||l[mm])||c===a)return;if(0===c.type&&(i=(l=Sy(l))[c.index][Pm]),2===c.type){for(;!l[dm]&&l[fm]&&(!c.parent||!c.parent.next);){if(c===a)return;if(Dm(l=l[fm])){c=l[mm],i=(l=l[fm])[c.index][Pm];break}c=l[mm]}h=l[dm]?(l=l[dm])[mm]:4===c.type&&c.child||c.next}else h=c.next}c=h}}function Dg(e,t,n,r,i,o){0===e?function s(e,t,n,r){dy(e)?e.insertBefore(t,n,r):t.insertBefore(n,r,!0)}(t,n,r,o||null):1===e?function a(e,t,n){var r=function i(e,t){return dy(e)?e.parentNode(t):t.parentNode}(e,t);r&&function o(e,t,n,r){dy(e)?e.removeChild(t,n,r):t.removeChild(n)}(e,r,t,n)}
|
|
1128
1135
|
/**
|
|
1129
1136
|
* @license
|
|
1130
1137
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1173,7 +1180,7 @@ var ky=!0;function Ay(e){var t=ky;return ky=e,t}var Py=255,Iy=0;function My(e,t)
|
|
|
1173
1180
|
*
|
|
1174
1181
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1175
1182
|
* found in the LICENSE file at https://angular.io/license
|
|
1176
|
-
*/(t,r,
|
|
1183
|
+
*/(t,r,Vm(i)):2===e&&t.destroyNode(r)}function Lg(e,t){var n;return Rm(e)&&(n=e[mm])&&2===n.type?
|
|
1177
1184
|
/**
|
|
1178
1185
|
* @license
|
|
1179
1186
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1195,7 +1202,7 @@ var ky=!0;function Ay(e){var t=ky;return ky=e,t}var Py=255,Iy=0;function My(e,t)
|
|
|
1195
1202
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1196
1203
|
* found in the LICENSE file at https://angular.io/license
|
|
1197
1204
|
*/
|
|
1198
|
-
function r(e,t){var n=t[
|
|
1205
|
+
function r(e,t){var n=t[fm];return-1===e.index?Dm(n)?n:null:n}(n,e):e[fm]===t?null:e[fm]}function Fg(e){if(Rm(e)&&!(256&e[hm])){e[hm]&=-129,e[hm]|=256,function t(e){var t,n=e[pm];if(null!=n&&null!=(t=n.destroyHooks))for(var r=0;r<t.length;r+=2){var i=e[t[r]];i instanceof Ym||t[r+1].call(i)}}(e),function n(e){var t=e[pm].cleanup;if(null!=t){for(var n=e[gm],r=0;r<t.length-1;r+=2)if("string"==typeof t[r]){var i=t[r+1],o="function"==typeof i?i(e):Om(e[i]),s=t[r+3];"boolean"==typeof s?o.removeEventListener(t[r],n[t[r+2]],s):s>=0?n[s]():n[-s].unsubscribe(),r+=2}else t[r].call(n[t[r+1]]);e[gm]=null}}(e);var r=e[mm];r&&3===r.type&&dy(e[xm])&&e[xm].destroy(),function i(e){return Dm(e[fm])}(e)&&e[vm]&&e[vm].removeView()}}function jg(e){return!!e&&"function"==typeof e.then}
|
|
1199
1206
|
/**
|
|
1200
1207
|
* @license
|
|
1201
1208
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1224,7 +1231,7 @@ function r(e,t){var n=t[dm];return-1===e.index?Lm(n)?n:null:n}(n,e):e[dm]===t?nu
|
|
|
1224
1231
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1225
1232
|
* found in the LICENSE file at https://angular.io/license
|
|
1226
1233
|
*/
|
|
1227
|
-
var
|
|
1234
|
+
var Vg=null;function Hg(){if(!Vg){var e=jd.Symbol;if(e&&e.iterator)Vg=e.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),n=0;n<t.length;++n){var r=t[n];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&(Vg=r)}}return Vg}
|
|
1228
1235
|
/**
|
|
1229
1236
|
* @license
|
|
1230
1237
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1238,14 +1245,14 @@ var Bg=null;function Ug(){if(!Bg){var e=jd.Symbol;if(e&&e.iterator)Bg=e.iterator
|
|
|
1238
1245
|
*
|
|
1239
1246
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1240
1247
|
* found in the LICENSE file at https://angular.io/license
|
|
1241
|
-
*/function
|
|
1248
|
+
*/function Bg(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}
|
|
1242
1249
|
/**
|
|
1243
1250
|
* @license
|
|
1244
1251
|
* Copyright Google Inc. All Rights Reserved.
|
|
1245
1252
|
*
|
|
1246
1253
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1247
1254
|
* found in the LICENSE file at https://angular.io/license
|
|
1248
|
-
*/function
|
|
1255
|
+
*/function Ug(e,t){var n=Kg(e),r=Kg(t);return n&&r?function i(e,t,n){for(var r=e[Hg()](),i=t[Hg()]();;){var o=r.next(),s=i.next();if(o.done&&s.done)return!0;if(o.done||s.done)return!1;if(!n(o.value,s.value))return!1}}(e,t,Ug):!(n||!e||"object"!=typeof e&&"function"!=typeof e||r||!t||"object"!=typeof t&&"function"!=typeof t)||Bg(e,t)}var qg=function(){function e(e){this.wrapped=e}return e.wrap=function(t){return new e(t)},e.unwrap=function(t){return e.isWrapped(t)?t.wrapped:t},e.isWrapped=function(t){return t instanceof e},e}();function Kg(e){return!!zg(e)&&(Array.isArray(e)||!(e instanceof Map)&&Hg()in e)}function zg(e){return null!==e&&("function"==typeof e||"object"==typeof e)}
|
|
1249
1256
|
/**
|
|
1250
1257
|
* @license
|
|
1251
1258
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1301,7 +1308,7 @@ var Bg=null;function Ug(){if(!Bg){var e=jd.Symbol;if(e&&e.iterator)Bg=e.iterator
|
|
|
1301
1308
|
*
|
|
1302
1309
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1303
1310
|
* found in the LICENSE file at https://angular.io/license
|
|
1304
|
-
*/function
|
|
1311
|
+
*/function Wg(e,t){void 0===t&&(t=!0);var n=
|
|
1305
1312
|
/**
|
|
1306
1313
|
* @license
|
|
1307
1314
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1309,7 +1316,7 @@ var Bg=null;function Ug(){if(!Bg){var e=jd.Symbol;if(e&&e.iterator)Bg=e.iterator
|
|
|
1309
1316
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1310
1317
|
* found in the LICENSE file at https://angular.io/license
|
|
1311
1318
|
*/
|
|
1312
|
-
function r(e){var t=
|
|
1319
|
+
function r(e){var t=Bm(e);if(t){if(Array.isArray(t)){var n=t,r=void 0,i=void 0,o=void 0;if(function s(e){return e&&e.constructor&&e.constructor.ngComponentDef}(e)){if(-1==(r=function a(e,t){var n=e[pm].components;if(n)for(var r=0;r<n.length;r++){var i=n[r];if(jm(i,e)[_m]===t)return i}else if(jm(Nm,e)[_m]===t)return Nm;return-1}(n,e)))throw new Error("The provided component was not found in the application");i=e}else if(function u(e){return e&&e.constructor&&e.constructor.ngDirectiveDef}(e)){if(-1==(r=function l(e,t){for(var n=e[pm].firstChild;n;){for(var r=n.directiveEnd,i=n.directiveStart;i<r;i++)if(e[i]===t)return n.index;n=_y(n)}return-1}(n,e)))throw new Error("The provided directive was not found in the application");o=function c(e,t,n){var r=t[pm].data[e],i=r.directiveStart;return 0==i?tm:(!n&&1&r.flags&&i++,t.slice(i,r.directiveEnd))}(r,n,!1)}else if(-1==(r=gy(n,e)))return null;var p=Bm(g=Om(n[r])),h=p&&!Array.isArray(p)?p:my(n,r,g);if(i&&void 0===h.component&&(h.component=i,yy(h.component,h)),o&&void 0===h.directives){h.directives=o;for(var f=0;f<o.length;f++)yy(o[f],h)}yy(h.native,h),t=h}}else for(var d=e,v=d;v=v.parentNode;){var m=Bm(v);if(m){if(n=void 0,!(n=Array.isArray(m)?m:m.lView))return null;var y=gy(n,d);if(y>=0){var g;yy(g=Om(n[y]),h=my(n,y,g)),t=h;break}}}return t||null}(e);if(!n&&t)throw new Error("Invalid ng target");return n}function Qg(e){if(!(e instanceof Node))throw new Error("Expecting instance of DOM Node");return Wg(e)}function $g(e){return"boolean"==typeof e.useCapture}function Gg(e,t){return e.name==t.name?0:e.name<t.name?-1:1}function Xg(e,t){return{components:[],scheduler:e||am,clean:Mg,playerHandler:t||null,flags:0}}function Yg(e,t){var n=Um(e)[pm],r=n.data.length-1;!
|
|
1313
1320
|
/**
|
|
1314
1321
|
* @license
|
|
1315
1322
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1324,7 +1331,7 @@ function i(e,t,n,r,o,s){var a=t.onChanges,u=t.onInit,l=t.doCheck;o>=0&&(!n.preOr
|
|
|
1324
1331
|
*
|
|
1325
1332
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1326
1333
|
* found in the LICENSE file at https://angular.io/license
|
|
1327
|
-
*/var
|
|
1334
|
+
*/var Zg=function(){function e(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}return e.prototype.isFirstChange=function(){return this.firstChange},e}(),Jg=new uv("The presence of this token marks an injector as being the root injector."),e_={},t_={},n_=[],r_=void 0;
|
|
1328
1335
|
/**
|
|
1329
1336
|
* @license
|
|
1330
1337
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1345,7 +1352,7 @@ function i(e,t,n,r,o,s){var a=t.onChanges,u=t.onInit,l=t.doCheck;o>=0&&(!n.preOr
|
|
|
1345
1352
|
*
|
|
1346
1353
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1347
1354
|
* found in the LICENSE file at https://angular.io/license
|
|
1348
|
-
*/function
|
|
1355
|
+
*/function i_(){return void 0===r_&&(r_=new fv),r_}var o_=function(){function e(e,t,n,r){var i=this;void 0===r&&(r=null),this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var o=[];u_([e],function(e){return i.processInjectorType(e,[],o)}),t&&u_(t,function(n){return i.processProvider(n,e,t)}),this.records.set(hv,a_(void 0,this)),this.isRootInjector=this.records.has(Jg),this.injectorDefTypes.forEach(function(e){return i.get(e)}),this.source=r||(e instanceof Array?null:Od(e))}return Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(function(e){return e.ngOnDestroy()})}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}},e.prototype.get=function(e,t,n){void 0===t&&(t=dv.THROW_IF_NOT_FOUND),void 0===n&&(n=xd.Default),this.assertNotDestroyed();var r=Ud(this);try{if(!(n&xd.SkipSelf)){var i=this.records.get(e);if(void 0===i){var o=function s(e){return"function"==typeof e||"object"==typeof e&&e instanceof uv}
|
|
1349
1356
|
/**
|
|
1350
1357
|
* @license
|
|
1351
1358
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1359,7 +1366,7 @@ function i(e,t,n,r,o,s){var a=t.onChanges,u=t.onInit,l=t.doCheck;o>=0&&(!n.preOr
|
|
|
1359
1366
|
*
|
|
1360
1367
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1361
1368
|
* found in the LICENSE file at https://angular.io/license
|
|
1362
|
-
*/(e)&&Ad(e);o&&this.injectableDefInScope(o)&&(i=
|
|
1369
|
+
*/(e)&&Ad(e);o&&this.injectableDefInScope(o)&&(i=a_(s_(e),e_),this.records.set(e,i))}if(void 0!==i)return this.hydrate(e,i)}return(n&xd.Self?i_():this.parent).get(e,n&xd.Optional?null:t)}catch(t){if("NullInjectorError"===t.name){if((t[wv]=t[wv]||[]).unshift(Od(e)),r)throw t;return Tv(t,e,"R3InjectorError",this.source)}throw t}finally{Ud(r)}},e.prototype.assertNotDestroyed=function(){if(this._destroyed)throw new Error("Injector has already been destroyed.")},e.prototype.processInjectorType=function(e,t,n){var r=this;if(e=Ld(e)){var i=Pd(e),o=null==i&&e.ngModule||void 0,s=void 0===o?e:o,a=-1!==n.indexOf(s),u=void 0!==o&&e.providers||n_;if(void 0!==o&&(i=Pd(o)),null!=i){if(this.injectorDefTypes.add(s),this.records.set(s,a_(i.factory,e_)),null!=i.imports&&!a){n.push(s);try{u_(i.imports,function(e){return r.processInjectorType(e,t,n)})}finally{}}var l=i.providers;if(null!=l&&!a){var c=e;u_(l,function(e){return r.processProvider(e,c,l)})}var p=e.ngModule;u_(u,function(e){return r.processProvider(e,p,u)})}}},e.prototype.processProvider=function(e,t,n){var r=c_(e=Ld(e))?e:Ld(e&&e.provide),i=function o(e,t,n){var r=function i(e,t,n){var r=void 0;if(c_(e))return s_(Ld(e));if(l_(e))r=function(){return Ld(e.useValue)};else if(function i(e){return!(!e||!e.useExisting)}(e))r=function(){return Kd(Ld(e.useExisting))};else if(function o(e){return!(!e||!e.useFactory)}(e))r=function(){return e.useFactory.apply(e,f(Wd(e.deps||[])))};else{var s=Ld(e&&(e.useClass||e.provide));if(!s){var a="";throw t&&n&&(a=" - only instances of Provider and Type are allowed, got: ["+n.map(function(t){return t==e?"?"+e+"?":"..."}).join(", ")+"]"),new Error("Invalid provider for the NgModule '"+Od(t)+"'"+a)}if(!function u(e){return!!e.deps}(e))return s_(s);r=function(){return new(s.bind.apply(s,f([void 0],Wd(e.deps))))}}return r}(e,t,n);return l_(e)?a_(void 0,e.useValue):a_(r,e_)}(e,t,n);if(c_(e)||!0!==e.multi){var s=this.records.get(r);if(s&&void 0!==s.multi)throw new Error("Mixed multi-provider for "+Od(r))}else{var a=this.records.get(r);if(a){if(void 0===a.multi)throw new Error("Mixed multi-provider for "+r+".")}else(a=a_(void 0,e_,!0)).factory=function(){return Wd(a.multi)},this.records.set(r,a);r=e,a.multi.push(e)}this.records.set(r,i)},e.prototype.hydrate=function(e,t){if(t.value===t_)throw new Error("Cannot instantiate cyclic dependency! "+Od(e));return t.value===e_&&(t.value=t_,t.value=t.factory()),"object"==typeof t.value&&t.value&&function n(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(t.value)&&this.onDestroy.add(t.value),t.value},e.prototype.injectableDefInScope=function(e){return!!e.providedIn&&("string"==typeof e.providedIn?"any"===e.providedIn||"root"===e.providedIn&&this.isRootInjector:this.injectorDefTypes.has(e.providedIn))},e}();function s_(e){var t=Ad(e);if(null===t){var n=Pd(e);if(null!==n)return n.factory;if(e instanceof uv)throw new Error("Token "+Od(e)+" is missing an ngInjectableDef definition.");if(e instanceof Function){var r=e.length;if(r>0){var i=new Array(r).fill("?");throw new Error("Can't resolve all parameters for "+Od(e)+": ("+i.join(", ")+").")}return function(){return new e}}throw new Error("unreachable")}return t.factory}function a_(e,t,n){return void 0===n&&(n=!1),{factory:e,value:t,multi:n?[]:void 0}}function u_(e,t){e.forEach(function(e){return Array.isArray(e)?u_(e,t):t(e)})}function l_(e){return null!==e&&"object"==typeof e&&_v in e}function c_(e){return"function"==typeof e}var p_,h_=function h_(){},f_=function f_(){},d_=function(){function e(){}return e.prototype.resolveComponentFactory=function(e){
|
|
1363
1370
|
/**
|
|
1364
1371
|
* @license
|
|
1365
1372
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1367,14 +1374,14 @@ function i(e,t,n,r,o,s){var a=t.onChanges,u=t.onInit,l=t.doCheck;o>=0&&(!n.preOr
|
|
|
1367
1374
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1368
1375
|
* found in the LICENSE file at https://angular.io/license
|
|
1369
1376
|
*/
|
|
1370
|
-
throw function t(e){var t=Error("No component factory found for "+Od(e)+". Did you add it to @NgModule.entryComponents?");return t.ngComponent=e,t}(e)},e}(),
|
|
1377
|
+
throw function t(e){var t=Error("No component factory found for "+Od(e)+". Did you add it to @NgModule.entryComponents?");return t.ngComponent=e,t}(e)},e}(),v_=function(){function e(){}return e.NULL=new d_,e}(),m_=function(e){function t(t,n){var r=e.call(this)||this;return r.factory=t,r.ngModule=n,r.selector=t.selector,r.componentType=t.componentType,r.ngContentSelectors=t.ngContentSelectors,r.inputs=t.inputs,r.outputs=t.outputs,r}return o(t,e),t.prototype.create=function(e,t,n,r){return this.factory.create(e,t,n,r||this.ngModule)},t}(f_),y_=function y_(){},g_=function g_(){},__=function(e){function t(t){var n=e.call(this,t,null,-1)||this;return n._view=t,n}return o(t,e),t.prototype.detectChanges=function(){Ag(this._view)},t.prototype.checkNoChanges=function(){!function e(t){ly(!0);try{Ag(t)}finally{ly(!1)}}(this._view)},Object.defineProperty(t.prototype,"context",{get:function(){return null},enumerable:!0,configurable:!0}),t}(function(){function e(e,t,n){this._context=t,this._componentIndex=n,this._appRef=null,this._viewContainerRef=null,this._tViewNode=null,this._lView=e}return Object.defineProperty(e.prototype,"rootNodes",{get:function(){return null==this._lView[cm]?function e(t,n,r){for(var i=n.child;i;){var o=Lm(i,t);if(o&&r.push(o),4===i.type)e(t,i,r);else if(1===i.type)for(var s=Cy(t),a=s[mm],u=Sy(s),l=a.projection[i.projection];l&&u;)r.push(Lm(l,u)),l=l.next;i=i.next}return r}
|
|
1371
1378
|
/**
|
|
1372
1379
|
* @license
|
|
1373
1380
|
* Copyright Google Inc. All Rights Reserved.
|
|
1374
1381
|
*
|
|
1375
1382
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1376
1383
|
* found in the LICENSE file at https://angular.io/license
|
|
1377
|
-
*/(this._lView,this._lView[
|
|
1384
|
+
*/(this._lView,this._lView[mm],[]):[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._context?this._context:this._lookUpContext()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destroyed",{get:function(){return 256==(256&this._lView[hm])},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){var e=this._viewContainerRef.indexOf(this);e>-1&&this._viewContainerRef.detach(e),this._viewContainerRef=null}!function t(e){if(!(256&e[hm])){var t=e[xm];dy(t)&&t.destroyNode&&Rg(e,2,t,null),function n(e){var t=e[Sm];if(!t)return Fg(e);for(;t;){var n=null;if(Rm(t))n=t[Sm];else{var r=t[Im];r.length>0&&(n=r[0])}if(!n){for(;t&&!t[dm]&&t!==e;)Fg(t),t=Lg(t,e);Fg(t||e),n=t&&t[dm]}t=n}}(e)}}(this._lView)},e.prototype.onDestroy=function(e){!function t(e,n){(function r(e){return e[gm]||(e[gm]=[])})(e).push(n),e[pm].firstTemplatePass&&function i(e){return e[pm].cleanup||(e[pm].cleanup=[])}(e).push(e[gm].length-1,null)}(this._lView,e)},e.prototype.markForCheck=function(){!function e(t){for(;t;){t[hm]|=64;var n=Sy(t);if(0!=(512&t[hm])&&!n)return t;t=n}}(this._lView)},e.prototype.detach=function(){this._lView[hm]&=-129},e.prototype.reattach=function(){this._lView[hm]|=128},e.prototype.detectChanges=function(){kg(this._lView,this.context)},e.prototype.checkNoChanges=function(){!function e(t,n){ly(!0);try{kg(t,n)}finally{ly(!1)}}(this._lView,this.context)},e.prototype.attachToViewContainerRef=function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e},e.prototype.detachFromAppRef=function(){this._appRef=null,function e(t){Rg(t,1,t[xm],null)}(this._lView)},e.prototype.attachToAppRef=function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e},e.prototype._lookUpContext=function(){return this._context=Sy(this._lView)[this._componentIndex]},e}());
|
|
1378
1385
|
/**
|
|
1379
1386
|
* @license
|
|
1380
1387
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1382,28 +1389,28 @@ throw function t(e){var t=Error("No component factory found for "+Od(e)+". Did y
|
|
|
1382
1389
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1383
1390
|
* found in the LICENSE file at https://angular.io/license
|
|
1384
1391
|
*/
|
|
1385
|
-
function
|
|
1392
|
+
function b_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}
|
|
1386
1393
|
/**
|
|
1387
1394
|
* @license
|
|
1388
1395
|
* Copyright Google Inc. All Rights Reserved.
|
|
1389
1396
|
*
|
|
1390
1397
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1391
1398
|
* found in the LICENSE file at https://angular.io/license
|
|
1392
|
-
*/var
|
|
1399
|
+
*/var w_,x_=function(){function e(e){this.nativeElement=e}return e.__NG_ELEMENT_ID__=function(){return E_(e)},e}(),E_=b_,S_=function S_(){},C_=(new uv("Renderer2Interceptor"),function C_(){});!function(e){e[e.Important=1]="Important",e[e.DashCase=2]="DashCase"}(w_||(w_={}));var T_=function(){function e(){}return e.__NG_ELEMENT_ID__=function(){return N_()},e}(),N_=b_,k_=function Ft(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")},A_=new k_("8.0.1"),P_=function(){function e(){}return e.prototype.supports=function(e){return Kg(e)},e.prototype.create=function(e){return new M_(e)},e}(),I_=function(e,t){return t},M_=function(){function e(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||I_}return e.prototype.forEachItem=function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)},e.prototype.forEachOperation=function(e){for(var t=this._itHead,n=this._removalsHead,r=0,i=null;t||n;){var o=!n||t&&t.currentIndex<L_(n,r,i)?t:n,s=L_(o,r,i),a=o.currentIndex;if(o===n)r--,n=n._nextRemoved;else if(t=t._next,null==o.previousIndex)r++;else{i||(i=[]);var u=s-r,l=a-r;if(u!=l){for(var c=0;c<u;c++){var p=c<i.length?i[c]:i[c]=0,h=p+c;l<=h&&h<u&&(i[c]=p+1)}i[o.previousIndex]=l-u}}s!==a&&e(o,s,a)}},e.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)},e.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},e.prototype.forEachMovedItem=function(e){var t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)},e.prototype.forEachRemovedItem=function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},e.prototype.forEachIdentityChange=function(e){var t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)},e.prototype.diff=function(e){if(null==e&&(e=[]),!Kg(e))throw new Error("Error trying to diff '"+Od(e)+"'. Only arrays and iterables are allowed");return this.check(e)?this:null},e.prototype.onDestroy=function(){},e.prototype.check=function(e){var t=this;this._reset();var n,r,i,o=this._itHead,s=!1;if(Array.isArray(e)){this.length=e.length;for(var a=0;a<this.length;a++)i=this._trackByFn(a,r=e[a]),null!==o&&Bg(o.trackById,i)?(s&&(o=this._verifyReinsertion(o,r,i,a)),Bg(o.item,r)||this._addIdentityChange(o,r)):(o=this._mismatch(o,r,i,a),s=!0),o=o._next}else n=0,function u(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t(e[n]);else for(var r=e[Hg()](),i=void 0;!(i=r.next()).done;)t(i.value)}(e,function(e){i=t._trackByFn(n,e),null!==o&&Bg(o.trackById,i)?(s&&(o=t._verifyReinsertion(o,e,i,n)),Bg(o.item,e)||t._addIdentityChange(o,e)):(o=t._mismatch(o,e,i,n),s=!0),o=o._next,n++}),this.length=n;return this._truncate(o),this.collection=e,this.isDirty},Object.defineProperty(e.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead},enumerable:!0,configurable:!0}),e.prototype._reset=function(){if(this.isDirty){var e=void 0,t=void 0;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=t)e.previousIndex=e.currentIndex,t=e._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}},e.prototype._mismatch=function(e,t,n,r){var i;return null===e?i=this._itTail:(i=e._prev,this._remove(e)),null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(Bg(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,i,r)):null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Bg(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,i,r)):e=this._addAfter(new O_(t,n),i,r),e},e.prototype._verifyReinsertion=function(e,t,n,r){var i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==i?e=this._reinsertAfter(i,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e},e.prototype._truncate=function(e){for(;null!==e;){var t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)},e.prototype._reinsertAfter=function(e,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);var r=e._prevRemoved,i=e._nextRemoved;return null===r?this._removalsHead=i:r._nextRemoved=i,null===i?this._removalsTail=r:i._prevRemoved=r,this._insertAfter(e,t,n),this._addToMoves(e,n),e},e.prototype._moveAfter=function(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e},e.prototype._addAfter=function(e,t,n){return this._insertAfter(e,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e},e.prototype._insertAfter=function(e,t,n){var r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new D_),this._linkedRecords.put(e),e.currentIndex=n,e},e.prototype._remove=function(e){return this._addToRemovals(this._unlink(e))},e.prototype._unlink=function(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);var t=e._prev,n=e._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,e},e.prototype._addToMoves=function(e,t){return e.previousIndex===t?e:(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e,e)},e.prototype._addToRemovals=function(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new D_),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e},e.prototype._addIdentityChange=function(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e},e}(),O_=function O_(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null},R_=function(){function e(){this._head=null,this._tail=null}return e.prototype.add=function(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)},e.prototype.get=function(e,t){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<=n.currentIndex)&&Bg(n.trackById,e))return n;return null},e.prototype.remove=function(e){var t=e._prevDup,n=e._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head},e}(),D_=function(){function e(){this.map=new Map}return e.prototype.put=function(e){var t=e.trackById,n=this.map.get(t);n||(n=new R_,this.map.set(t,n)),n.add(e)},e.prototype.get=function(e,t){var n=this.map.get(e);return n?n.get(e,t):null},e.prototype.remove=function(e){var t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.map.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.map.clear()},e}();function L_(e,t,n){var r=e.previousIndex;if(null===r)return r;var i=0;return n&&r<n.length&&(i=n[r]),r+t+i}
|
|
1393
1400
|
/**
|
|
1394
1401
|
* @license
|
|
1395
1402
|
* Copyright Google Inc. All Rights Reserved.
|
|
1396
1403
|
*
|
|
1397
1404
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1398
1405
|
* found in the LICENSE file at https://angular.io/license
|
|
1399
|
-
*/var
|
|
1406
|
+
*/var F_=function(){function e(){}return e.prototype.supports=function(e){return e instanceof Map||zg(e)},e.prototype.create=function(){return new j_},e}(),j_=function(){function e(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead},enumerable:!0,configurable:!0}),e.prototype.forEachItem=function(e){var t;for(t=this._mapHead;null!==t;t=t._next)e(t)},e.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)},e.prototype.forEachChangedItem=function(e){var t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)},e.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},e.prototype.forEachRemovedItem=function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},e.prototype.diff=function(e){if(e){if(!(e instanceof Map||zg(e)))throw new Error("Error trying to diff '"+Od(e)+"'. Only maps and objects are allowed")}else e=new Map;return this.check(e)?this:null},e.prototype.onDestroy=function(){},e.prototype.check=function(e){var t=this;this._reset();var n=this._mapHead;if(this._appendAfter=null,this._forEach(e,function(e,r){if(n&&n.key===r)t._maybeAddToChanges(n,e),t._appendAfter=n,n=n._next;else{var i=t._getOrCreateRecordForKey(r,e);n=t._insertBeforeOrAppend(n,i)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(var r=n;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty},e.prototype._insertBeforeOrAppend=function(e,t){if(e){var n=e._prev;return t._next=e,t._prev=n,e._prev=t,n&&(n._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null},e.prototype._getOrCreateRecordForKey=function(e,t){if(this._records.has(e)){var n=this._records.get(e);this._maybeAddToChanges(n,t);var r=n._prev,i=n._next;return r&&(r._next=i),i&&(i._prev=r),n._next=null,n._prev=null,n}var o=new V_(e);return this._records.set(e,o),o.currentValue=t,this._addToAdditions(o),o},e.prototype._reset=function(){if(this.isDirty){var e=void 0;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}},e.prototype._maybeAddToChanges=function(e,t){Bg(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))},e.prototype._addToAdditions=function(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)},e.prototype._addToChanges=function(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)},e.prototype._forEach=function(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(function(n){return t(e[n],n)})},e}(),V_=function V_(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null},H_=function(){function e(e){this.factories=e}return e.create=function(t,n){if(null!=n){var r=n.factories.slice();t=t.concat(r)}return new e(t)},e.extend=function(t){return{provide:e,useFactory:function(n){if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return e.create(t,n)},deps:[[e,new Td,new Sd]]}},e.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(null!=t)return t;throw new Error("Cannot find a differ supporting object '"+e+"' of type '"+function n(e){return e.name||typeof e}
|
|
1400
1407
|
/**
|
|
1401
1408
|
* @license
|
|
1402
1409
|
* Copyright Google Inc. All Rights Reserved.
|
|
1403
1410
|
*
|
|
1404
1411
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1405
1412
|
* found in the LICENSE file at https://angular.io/license
|
|
1406
|
-
*/(e)+"'")},e.ngInjectableDef=kd({providedIn:"root",factory:function(){return new e([new
|
|
1413
|
+
*/(e)+"'")},e.ngInjectableDef=kd({providedIn:"root",factory:function(){return new e([new P_])}}),e}(),B_=function(){function e(e){this.factories=e}return e.create=function(t,n){if(n){var r=n.factories.slice();t=t.concat(r)}return new e(t)},e.extend=function(t){return{provide:e,useFactory:function(n){if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return e.create(t,n)},deps:[[e,new Td,new Sd]]}},e.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(t)return t;throw new Error("Cannot find a differ supporting object '"+e+"'")},e.ngInjectableDef=kd({providedIn:"root",factory:function(){return new e([new F_])}}),e}(),U_=function(){function e(){}return e.__NG_ELEMENT_ID__=function(){return q_()},e}(),q_=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},K_=[new F_],z_=new H_([new P_]),W_=new B_(K_),Q_=function(){function e(){}return e.__NG_ELEMENT_ID__=function(){return $_(e,x_)},e}(),$_=b_,G_=function(){function e(){}return e.__NG_ELEMENT_ID__=function(){return X_(e,x_)},e}(),X_=b_;
|
|
1407
1414
|
/**
|
|
1408
1415
|
* @license
|
|
1409
1416
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1411,35 +1418,35 @@ function x_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}
|
|
|
1411
1418
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1412
1419
|
* found in the LICENSE file at https://angular.io/license
|
|
1413
1420
|
*/
|
|
1414
|
-
function
|
|
1421
|
+
function Y_(e,t,n,r){var i="ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '"+t+"'. Current value: '"+n+"'.";return r&&(i+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),function o(e,t){var n=new Error(e);return Z_(n,t),n}(i,e)}function Z_(e,t){e[Av]=t,e[Iv]=t.logError.bind(t)}function J_(e){return new Error("ViewDestroyedError: Attempt to use a destroyed view: "+e)}
|
|
1415
1422
|
/**
|
|
1416
1423
|
* @license
|
|
1417
1424
|
* Copyright Google Inc. All Rights Reserved.
|
|
1418
1425
|
*
|
|
1419
1426
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1420
1427
|
* found in the LICENSE file at https://angular.io/license
|
|
1421
|
-
*/function
|
|
1428
|
+
*/function eb(e,t,n){var r=e.state,i=1792&r;return i===t?(e.state=-1793&r|n,e.initIndex=-1,!0):i===n}function tb(e,t,n){return(1792&e.state)===t&&e.initIndex<=n&&(e.initIndex=n+1,!0)}function nb(e,t){return e.nodes[t]}function rb(e,t){return e.nodes[t]}function ib(e,t){return e.nodes[t]}function ob(e,t){return e.nodes[t]}function sb(e,t){return e.nodes[t]}var ab={setCurrentNode:void 0,createRootView:void 0,createEmbeddedView:void 0,createComponentView:void 0,createNgModuleRef:void 0,overrideProvider:void 0,overrideComponentView:void 0,clearOverrides:void 0,checkAndUpdateView:void 0,checkNoChangesView:void 0,destroyView:void 0,resolveDep:void 0,createDebugContext:void 0,handleEvent:void 0,updateDirectives:void 0,updateRenderer:void 0,dirtyParentQueries:void 0},ub=function(){},lb=new Map;
|
|
1422
1429
|
/**
|
|
1423
1430
|
* @license
|
|
1424
1431
|
* Copyright Google Inc. All Rights Reserved.
|
|
1425
1432
|
*
|
|
1426
1433
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1427
1434
|
* found in the LICENSE file at https://angular.io/license
|
|
1428
|
-
*/function
|
|
1435
|
+
*/function cb(e){var t=lb.get(e);return t||(t=Od(e)+"_"+lb.size,lb.set(e,t)),t}function pb(e,t,n,r){return!(!(2&e.state)&&Bg(e.oldValues[t.bindingIndex+n],r))}function hb(e,t,n,r){return!!pb(e,t,n,r)&&(e.oldValues[t.bindingIndex+n]=r,!0)}function fb(e,t,n,r){var i=e.oldValues[t.bindingIndex+n];if(1&e.state||!Ug(i,r)){var o=t.bindings[n].name;throw Y_(ab.createDebugContext(e,t.nodeIndex),o+": "+i,o+": "+r,0!=(1&e.state))}}function db(e){for(var t=e;t;)2&t.def.flags&&(t.state|=8),t=t.viewContainerParent||t.parent}function vb(e,t){for(var n=e;n&&n!==t;)n.state|=64,n=n.viewContainerParent||n.parent}function mb(e,t,n,r){try{return db(33554432&e.def.nodes[t].flags?rb(e,t).componentView:e),ab.handleEvent(e,t,n,r)}catch(t){e.root.errorHandler.handleError(t)}}function yb(e){return e.parent?rb(e.parent,e.parentNodeDef.nodeIndex):null}function gb(e){return e.parent?e.parentNodeDef.parent:null}function _b(e,t){switch(201347067&t.flags){case 1:return rb(e,t.nodeIndex).renderElement;case 2:return nb(e,t.nodeIndex).renderText}}function bb(e){return!!e.parent&&!!(32768&e.parentNodeDef.flags)}function wb(e){return!(!e.parent||32768&e.parentNodeDef.flags)}function xb(e,t){return e.map(function(e){var n,r,i;return Array.isArray(e)?(i=(n=h(e,2))[0],r=n[1]):(i=0,r=e),r&&("function"==typeof r||"object"==typeof r)&&t&&Object.defineProperty(r,lv,{value:t,configurable:!0}),{flags:i,token:r,tokenKey:cb(r)}})}function Eb(e,t,n){var r=n.renderParent;return r?0==(1&r.flags)||0==(33554432&r.flags)||r.element.componentRendererType&&r.element.componentRendererType.encapsulation===Xv.Native?rb(e,n.renderParent.nodeIndex).renderElement:void 0:t}var Sb=new WeakMap;function Cb(e){var t=Sb.get(e);return t||((t=e(function(){return ub})).factory=e,Sb.set(e,t)),t}function Tb(e,t,n,r,i){3===t&&(n=e.renderer.parentNode(_b(e,e.def.lastRenderRootNode))),Nb(e,t,0,e.def.nodes.length-1,n,r,i)}function Nb(e,t,n,r,i,o,s){for(var a=n;a<=r;a++){var u=e.def.nodes[a];11&u.flags&&Ab(e,u,t,i,o,s),a+=u.childCount}}function kb(e,t,n,r,i,o){for(var s=e;s&&!bb(s);)s=s.parent;for(var a=s.parent,u=gb(s),l=u.nodeIndex+u.childCount,c=u.nodeIndex+1;c<=l;c++){var p=a.def.nodes[c];p.ngContentIndex===t&&Ab(a,p,n,r,i,o),c+=p.childCount}if(!a.parent){var h=e.root.projectableNodes[t];if(h)for(c=0;c<h.length;c++)Pb(e,h[c],n,r,i,o)}}function Ab(e,t,n,r,i,o){if(8&t.flags)kb(e,t.ngContent.index,n,r,i,o);else{var s=_b(e,t);if(3===n&&33554432&t.flags&&48&t.bindingFlags?(16&t.bindingFlags&&Pb(e,s,n,r,i,o),32&t.bindingFlags&&Pb(rb(e,t.nodeIndex).componentView,s,n,r,i,o)):Pb(e,s,n,r,i,o),16777216&t.flags)for(var a=rb(e,t.nodeIndex).viewContainer._embeddedViews,u=0;u<a.length;u++)Tb(a[u],n,r,i,o);1&t.flags&&!t.element.name&&Nb(e,n,t.nodeIndex+1,t.nodeIndex+t.childCount,r,i,o)}}function Pb(e,t,n,r,i,o){var s=e.renderer;switch(n){case 1:s.appendChild(r,t);break;case 2:s.insertBefore(r,t,i);break;case 3:s.removeChild(r,t);break;case 0:o.push(t)}}var Ib=/^:([^:]+):(.+)$/;function Mb(e){if(":"===e[0]){var t=e.match(Ib);return[t[1],t[2]]}return["",e]}
|
|
1429
1436
|
/**
|
|
1430
1437
|
* @license
|
|
1431
1438
|
* Copyright Google Inc. All Rights Reserved.
|
|
1432
1439
|
*
|
|
1433
1440
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1434
1441
|
* found in the LICENSE file at https://angular.io/license
|
|
1435
|
-
*/var
|
|
1442
|
+
*/var Ob=new Object,Rb=cb(dv),Db=cb(hv),Lb=cb(y_);function Fb(e,t,n){void 0===n&&(n=dv.THROW_IF_NOT_FOUND);var r=Ud(e);try{if(8&t.flags)return t.token;if(2&t.flags&&(n=null),1&t.flags)return e._parent.get(t.token,n);var i=t.tokenKey;switch(i){case Rb:case Db:case Lb:return e}var o,s=e._def.providersByKey[i];if(s){var a=e._providers[s.index];return void 0===a&&(a=e._providers[s.index]=jb(e,s)),a===Ob?void 0:a}if((o=Ad(t.token))&&function u(e,t){return null!=t.providedIn&&(function n(e,t){return e._def.modules.indexOf(t)>-1}(e,t.providedIn)||"root"===t.providedIn&&e._def.isRoot)}(e,o)){var l=e._providers.length;return e._def.providers[l]=e._def.providersByKey[t.tokenKey]={flags:5120,value:o.factory,deps:[],index:l,token:t.token},e._providers[l]=Ob,e._providers[l]=jb(e,e._def.providersByKey[t.tokenKey])}return 4&t.flags?n:e._parent.get(t.token,n)}finally{Ud(r)}}function jb(e,t){var n;switch(201347067&t.flags){case 512:n=function r(e,t,n){var r=n.length;switch(r){case 0:return new t;case 1:return new t(Fb(e,n[0]));case 2:return new t(Fb(e,n[0]),Fb(e,n[1]));case 3:return new t(Fb(e,n[0]),Fb(e,n[1]),Fb(e,n[2]));default:for(var i=new Array(r),o=0;o<r;o++)i[o]=Fb(e,n[o]);return new(t.bind.apply(t,f([void 0],i)))}}(e,t.value,t.deps);break;case 1024:n=function i(e,t,n){var r=n.length;switch(r){case 0:return t();case 1:return t(Fb(e,n[0]));case 2:return t(Fb(e,n[0]),Fb(e,n[1]));case 3:return t(Fb(e,n[0]),Fb(e,n[1]),Fb(e,n[2]));default:for(var i=Array(r),o=0;o<r;o++)i[o]=Fb(e,n[o]);return t.apply(void 0,f(i))}}(e,t.value,t.deps);break;case 2048:n=Fb(e,t.deps[0]);break;case 256:n=t.value}return n===Ob||null===n||"object"!=typeof n||131072&t.flags||"function"!=typeof n.ngOnDestroy||(t.flags|=131072),void 0===n?Ob:n}function Vb(e,t){var n=e.viewContainer._embeddedViews;if((null==t||t>=n.length)&&(t=n.length-1),t<0)return null;var r=n[t];return r.viewContainerParent=null,qb(n,t),ab.dirtyParentQueries(r),Bb(r),r}function Hb(e,t,n){var r=t?_b(t,t.def.lastRenderRootNode):e.renderElement,i=n.renderer.parentNode(r),o=n.renderer.nextSibling(r);Tb(n,2,i,o,void 0)}function Bb(e){Tb(e,3,null,null,void 0)}function Ub(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function qb(e,t){t>=e.length-1?e.pop():e.splice(t,1)}
|
|
1436
1443
|
/**
|
|
1437
1444
|
* @license
|
|
1438
1445
|
* Copyright Google Inc. All Rights Reserved.
|
|
1439
1446
|
*
|
|
1440
1447
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1441
1448
|
* found in the LICENSE file at https://angular.io/license
|
|
1442
|
-
*/var
|
|
1449
|
+
*/var Kb=new Object;!function(e){function t(t,n,r,i,o,s){var a=e.call(this)||this;return a.selector=t,a.componentType=n,a._inputs=i,a._outputs=o,a.ngContentSelectors=s,a.viewDefFactory=r,a}o(t,e),Object.defineProperty(t.prototype,"inputs",{get:function(){var e=[],t=this._inputs;for(var n in t)e.push({propName:n,templateName:t[n]});return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outputs",{get:function(){var e=[];for(var t in this._outputs)e.push({propName:t,templateName:this._outputs[t]});return e},enumerable:!0,configurable:!0}),t.prototype.create=function(e,t,n,r){if(!r)throw new Error("ngModule should be provided");var i=Cb(this.viewDefFactory),o=i.nodes[0].element.componentProvider.nodeIndex,s=ab.createRootView(e,t||[],n,i,r,Kb),a=ib(s,o).instance;return n&&s.renderer.setAttribute(rb(s,0).renderElement,"ng-version",A_.full),new zb(s,new Gb(s),a)}}(f_);var zb=function(e){function t(t,n,r){var i=e.call(this)||this;return i._view=t,i._viewRef=n,i._component=r,i._elDef=i._view.def.nodes[0],i.hostView=n,i.changeDetectorRef=n,i.instance=r,i}return o(t,e),Object.defineProperty(t.prototype,"location",{get:function(){return new x_(rb(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new Jb(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this._viewRef.destroy()},t.prototype.onDestroy=function(e){this._viewRef.onDestroy(e)},t}(h_);function Wb(e,t,n){return new Qb(e,t,n)}var Qb=function(){function e(e,t,n){this._view=e,this._elDef=t,this._data=n,this._embeddedViews=[]}return Object.defineProperty(e.prototype,"element",{get:function(){return new x_(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new Jb(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentInjector",{get:function(){for(var e=this._view,t=this._elDef.parent;!t&&e;)t=gb(e),e=e.parent;return e?new Jb(e,t):new Jb(this._view,null)},enumerable:!0,configurable:!0}),e.prototype.clear=function(){for(var e=this._embeddedViews.length-1;e>=0;e--){var t=Vb(this._data,e);ab.destroyView(t)}},e.prototype.get=function(e){var t=this._embeddedViews[e];if(t){var n=new Gb(t);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(e.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),e.prototype.createEmbeddedView=function(e,t,n){var r=e.createEmbeddedView(t||{});return this.insert(r,n),r},e.prototype.createComponent=function(e,t,n,r,i){var o=n||this.parentInjector;i||e instanceof m_||(i=o.get(y_));var s=e.create(o,r,void 0,i);return this.insert(s.hostView,t),s},e.prototype.insert=function(e,t){if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n=e;
|
|
1443
1450
|
/**
|
|
1444
1451
|
* @license
|
|
1445
1452
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1447,21 +1454,21 @@ function J_(e,t,n,r){var i="ExpressionChangedAfterItHasBeenCheckedError: Express
|
|
|
1447
1454
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1448
1455
|
* found in the LICENSE file at https://angular.io/license
|
|
1449
1456
|
*/
|
|
1450
|
-
return function r(e,t,n,i){var o=t.viewContainer._embeddedViews;null==n&&(n=o.length),i.viewContainerParent=e,
|
|
1457
|
+
return function r(e,t,n,i){var o=t.viewContainer._embeddedViews;null==n&&(n=o.length),i.viewContainerParent=e,Ub(o,n,i),function s(e,t){var n=yb(t);if(n&&n!==e&&!(16&t.state)){t.state|=16;var r=n.template._projectedViews;r||(r=n.template._projectedViews=[]),r.push(t),function i(e,t){if(!(4&t.flags)){e.nodeFlags|=4,t.flags|=4;for(var n=t.parent;n;)n.childFlags|=4,n=n.parent}}(t.parent.def,t.parentNodeDef)}}(t,i),ab.dirtyParentQueries(i),Hb(t,n>0?o[n-1]:null,i)}(this._view,this._data,t,n._view),n.attachToViewContainerRef(this),e},e.prototype.move=function(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n=this._embeddedViews.indexOf(e._view);return function r(e,t,n){var r=e.viewContainer._embeddedViews,i=r[t];qb(r,t),null==n&&(n=r.length),Ub(r,n,i),ab.dirtyParentQueries(i),Bb(i),Hb(e,n>0?r[n-1]:null,i)}(this._data,n,t),e},e.prototype.indexOf=function(e){return this._embeddedViews.indexOf(e._view)},e.prototype.remove=function(e){var t=Vb(this._data,e);t&&ab.destroyView(t)},e.prototype.detach=function(e){var t=Vb(this._data,e);return t?new Gb(t):null},e}();function $b(e){return new Gb(e)}var Gb=function(){function e(e){this._view=e,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(e.prototype,"rootNodes",{get:function(){return function e(t){var n=[];return Tb(t,0,void 0,void 0,n),n}(this._view)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),e.prototype.markForCheck=function(){db(this._view)},e.prototype.detach=function(){this._view.state&=-5},e.prototype.detectChanges=function(){var e=this._view.root.rendererFactory;e.begin&&e.begin();try{ab.checkAndUpdateView(this._view)}finally{e.end&&e.end()}},e.prototype.checkNoChanges=function(){ab.checkNoChangesView(this._view)},e.prototype.reattach=function(){this._view.state|=4},e.prototype.onDestroy=function(e){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(e)},e.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),ab.destroyView(this._view)},e.prototype.detachFromAppRef=function(){this._appRef=null,Bb(this._view),ab.dirtyParentQueries(this._view)},e.prototype.attachToAppRef=function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e},e.prototype.attachToViewContainerRef=function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e},e}();function Xb(e,t){return new Yb(e,t)}var Yb=function(e){function t(t,n){var r=e.call(this)||this;return r._parentView=t,r._def=n,r}return o(t,e),t.prototype.createEmbeddedView=function(e){return new Gb(ab.createEmbeddedView(this._parentView,this._def,this._def.element.template,e))},Object.defineProperty(t.prototype,"elementRef",{get:function(){return new x_(rb(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),t}(Q_);function Zb(e,t){return new Jb(e,t)}var Jb=function(){function e(e,t){this.view=e,this.elDef=t}return e.prototype.get=function(e,t){return void 0===t&&(t=dv.THROW_IF_NOT_FOUND),ab.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:e,tokenKey:cb(e)},t)},e}();function ew(e){return new tw(e.renderer)}var tw=function(){function e(e){this.delegate=e}return e.prototype.selectRootElement=function(e){return this.delegate.selectRootElement(e)},e.prototype.createElement=function(e,t){var n=h(Mb(t),2),r=this.delegate.createElement(n[1],n[0]);return e&&this.delegate.appendChild(e,r),r},e.prototype.createViewRoot=function(e){return e},e.prototype.createTemplateAnchor=function(e){var t=this.delegate.createComment("");return e&&this.delegate.appendChild(e,t),t},e.prototype.createText=function(e,t){var n=this.delegate.createText(t);return e&&this.delegate.appendChild(e,n),n},e.prototype.projectNodes=function(e,t){for(var n=0;n<t.length;n++)this.delegate.appendChild(e,t[n])},e.prototype.attachViewAfter=function(e,t){for(var n=this.delegate.parentNode(e),r=this.delegate.nextSibling(e),i=0;i<t.length;i++)this.delegate.insertBefore(n,t[i],r)},e.prototype.detachView=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=this.delegate.parentNode(n);this.delegate.removeChild(r,n)}},e.prototype.destroyView=function(e,t){for(var n=0;n<t.length;n++)this.delegate.destroyNode(t[n])},e.prototype.listen=function(e,t,n){return this.delegate.listen(e,t,n)},e.prototype.listenGlobal=function(e,t,n){return this.delegate.listen(e,t,n)},e.prototype.setElementProperty=function(e,t,n){this.delegate.setProperty(e,t,n)},e.prototype.setElementAttribute=function(e,t,n){var r=h(Mb(t),2),i=r[0],o=r[1];null!=n?this.delegate.setAttribute(e,o,n,i):this.delegate.removeAttribute(e,o,i)},e.prototype.setBindingDebugInfo=function(e,t,n){},e.prototype.setElementClass=function(e,t,n){n?this.delegate.addClass(e,t):this.delegate.removeClass(e,t)},e.prototype.setElementStyle=function(e,t,n){null!=n?this.delegate.setStyle(e,t,n):this.delegate.removeStyle(e,t)},e.prototype.invokeElementMethod=function(e,t,n){e[t].apply(e,n)},e.prototype.setText=function(e,t){this.delegate.setValue(e,t)},e.prototype.animate=function(){throw new Error("Renderer.animate is no longer supported!")},e}();function nw(e,t,n,r){return new rw(e,t,n,r)}var rw=function(){function e(e,t,n,r){this._moduleType=e,this._parent=t,this._bootstrapComponents=n,this._def=r,this._destroyListeners=[],this._destroyed=!1,this.injector=this,function i(e){for(var t=e._def,n=e._providers=new Array(t.providers.length),r=0;r<t.providers.length;r++){var i=t.providers[r];4096&i.flags||void 0===n[r]&&(n[r]=jb(e,i))}}(this)}return e.prototype.get=function(e,t,n){void 0===t&&(t=dv.THROW_IF_NOT_FOUND),void 0===n&&(n=xd.Default);var r=0;return n&xd.SkipSelf?r|=1:n&xd.Self&&(r|=4),Fb(this,{token:e,tokenKey:cb(e),flags:r},t)},Object.defineProperty(e.prototype,"instance",{get:function(){return this.get(this._moduleType)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentFactoryResolver",{get:function(){return this.get(v_)},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){if(this._destroyed)throw new Error("The ng module "+Od(this.instance.constructor)+" has already been destroyed.");this._destroyed=!0,function e(t,n){for(var r=t._def,i=new Set,o=0;o<r.providers.length;o++)if(131072&r.providers[o].flags){var s=t._providers[o];if(s&&s!==Ob){var a=s.ngOnDestroy;"function"!=typeof a||i.has(s)||(a.apply(s),i.add(s))}}}(this),this._destroyListeners.forEach(function(e){return e()})},e.prototype.onDestroy=function(e){this._destroyListeners.push(e)},e}(),iw=cb(S_),ow=cb(T_),sw=cb(x_),aw=cb(G_),uw=cb(Q_),lw=cb(U_),cw=cb(dv),pw=cb(hv);
|
|
1451
1458
|
/**
|
|
1452
1459
|
* @license
|
|
1453
1460
|
* Copyright Google Inc. All Rights Reserved.
|
|
1454
1461
|
*
|
|
1455
1462
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1456
1463
|
* found in the LICENSE file at https://angular.io/license
|
|
1457
|
-
*/function
|
|
1464
|
+
*/function hw(e,t){return mw(e,t)}function fw(e,t){for(var n=e;n.parent&&!bb(n);)n=n.parent;return yw(n.parent,gb(n),!0,t.provider.value,t.provider.deps)}function dw(e,t){var n,r=yw(e,t.parent,(32768&t.flags)>0,t.provider.value,t.provider.deps);if(t.outputs.length)for(var i=0;i<t.outputs.length;i++){var o=t.outputs[i],s=r[o.propName];if(!(n=s)||"function"!=typeof n.subscribe)throw new Error("@Output "+o.propName+" not initialized in '"+r.constructor.name+"'.");var a=s.subscribe(vw(e,t.parent.nodeIndex,o.eventName));e.disposables[t.outputIndex+i]=a.unsubscribe.bind(a)}return r}function vw(e,t,n){return function(r){return mb(e,t,n,r)}}function mw(e,t){var n=(8192&t.flags)>0,r=t.provider;switch(201347067&t.flags){case 512:return yw(e,t.parent,n,r.value,r.deps);case 1024:return function i(e,t,n,r,o){var s=o.length;switch(s){case 0:return r();case 1:return r(_w(e,t,n,o[0]));case 2:return r(_w(e,t,n,o[0]),_w(e,t,n,o[1]));case 3:return r(_w(e,t,n,o[0]),_w(e,t,n,o[1]),_w(e,t,n,o[2]));default:for(var a=Array(s),u=0;u<s;u++)a[u]=_w(e,t,n,o[u]);return r.apply(void 0,f(a))}}(e,t.parent,n,r.value,r.deps);case 2048:return _w(e,t.parent,n,r.deps[0]);case 256:return r.value}}function yw(e,t,n,r,i){var o=i.length;switch(o){case 0:return new r;case 1:return new r(_w(e,t,n,i[0]));case 2:return new r(_w(e,t,n,i[0]),_w(e,t,n,i[1]));case 3:return new r(_w(e,t,n,i[0]),_w(e,t,n,i[1]),_w(e,t,n,i[2]));default:for(var s=new Array(o),a=0;a<o;a++)s[a]=_w(e,t,n,i[a]);return new(r.bind.apply(r,f([void 0],s)))}}var gw={};function _w(e,t,n,r,i){if(void 0===i&&(i=dv.THROW_IF_NOT_FOUND),8&r.flags)return r.token;var o=e;2&r.flags&&(i=null);var s=r.tokenKey;s===lw&&(n=!(!t||!t.element.componentView)),t&&1&r.flags&&(n=!1,t=t.parent);for(var a=e;a;){if(t)switch(s){case iw:return ew(bw(a,t,n));case ow:return bw(a,t,n).renderer;case sw:return new x_(rb(a,t.nodeIndex).renderElement);case aw:return rb(a,t.nodeIndex).viewContainer;case uw:if(t.element.template)return rb(a,t.nodeIndex).template;break;case lw:return $b(bw(a,t,n));case cw:case pw:return Zb(a,t);default:var u=(n?t.element.allProviders:t.element.publicProviders)[s];if(u){var l=ib(a,u.nodeIndex);return l||(l={instance:mw(a,u)},a.nodes[u.nodeIndex]=l),l.instance}}n=bb(a),t=gb(a),a=a.parent,4&r.flags&&(a=null)}var c=o.root.injector.get(r.token,gw);return c!==gw||i===gw?c:o.root.ngModule.injector.get(r.token,i)}function bw(e,t,n){var r;if(n)r=rb(e,t.nodeIndex).componentView;else for(r=e;r.parent&&!bb(r);)r=r.parent;return r}function ww(e,t,n,r,i,o){if(32768&n.flags){var s=rb(e,n.parent.nodeIndex).componentView;2&s.def.flags&&(s.state|=8)}if(t.instance[n.bindings[r].name]=i,524288&n.flags){o=o||{};var a=qg.unwrap(e.oldValues[n.bindingIndex+r]);o[n.bindings[r].nonMinifiedName]=new Zg(a,i,0!=(2&e.state))}return e.oldValues[n.bindingIndex+r]=i,o}function xw(e,t){if(e.def.nodeFlags&t)for(var n=e.def.nodes,r=0,i=0;i<n.length;i++){var o=n[i],s=o.parent;for(!s&&o.flags&t&&Sw(e,i,o.flags&t,r++),0==(o.childFlags&t)&&(i+=o.childCount);s&&1&s.flags&&i===s.nodeIndex+s.childCount;)s.directChildFlags&t&&(r=Ew(e,s,t,r)),s=s.parent}}function Ew(e,t,n,r){for(var i=t.nodeIndex+1;i<=t.nodeIndex+t.childCount;i++){var o=e.def.nodes[i];o.flags&n&&Sw(e,i,o.flags&n,r++),i+=o.childCount}return r}function Sw(e,t,n,r){var i=ib(e,t);if(i){var o=i.instance;o&&(ab.setCurrentNode(e,t),1048576&n&&tb(e,512,r)&&o.ngAfterContentInit(),2097152&n&&o.ngAfterContentChecked(),4194304&n&&tb(e,768,r)&&o.ngAfterViewInit(),8388608&n&&o.ngAfterViewChecked(),131072&n&&o.ngOnDestroy())}}
|
|
1458
1465
|
/**
|
|
1459
1466
|
* @license
|
|
1460
1467
|
* Copyright Google Inc. All Rights Reserved.
|
|
1461
1468
|
*
|
|
1462
1469
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1463
1470
|
* found in the LICENSE file at https://angular.io/license
|
|
1464
|
-
*/var
|
|
1471
|
+
*/var Cw=function(e){function t(t){var n=e.call(this)||this;return n.ngModule=t,n}return o(t,e),t.prototype.resolveComponentFactory=function(e){var t=
|
|
1465
1472
|
/**
|
|
1466
1473
|
* @license
|
|
1467
1474
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1469,14 +1476,14 @@ return function r(e,t,n,i){var o=t.viewContainer._embeddedViews;null==n&&(n=o.le
|
|
|
1469
1476
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1470
1477
|
* found in the LICENSE file at https://angular.io/license
|
|
1471
1478
|
*/
|
|
1472
|
-
function n(e){return e[
|
|
1479
|
+
function n(e){return e[nm]||null}(e);return new Pw(t,this.ngModule)},t}(v_);function Tw(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push({propName:e[n],templateName:n});return t}var Nw,kw=new uv("ROOT_CONTEXT_TOKEN",{providedIn:"root",factory:function(){return Xg(Kd(Aw))}}),Aw=new uv("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return am}}),Pw=function(e){function t(t,n){var r=e.call(this)||this;return r.componentDef=t,r.ngModule=n,r.componentType=t.type,r.selector=t.selectors[0][0],r.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],r.isBoundToModule=!!n,r}return o(t,e),Object.defineProperty(t.prototype,"inputs",{get:function(){return Tw(this.componentDef.inputs)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outputs",{get:function(){return Tw(this.componentDef.outputs)},enumerable:!0,configurable:!0}),t.prototype.create=function(e,t,n,r){var i=void 0===n,s=(r=r||this.ngModule)?function a(e,t){return{get:function(n,r,i){var o=e.get(n,gw,i);return o!==gw||r===gw?o:t.get(n,r,i)}}}(e,r.injector):e,u=s.get(C_,vy),l=s.get(tg,null),c=i?function p(e,t){var n=t||ey()[xm],r=function i(){return fy}
|
|
1473
1480
|
/**
|
|
1474
1481
|
* @license
|
|
1475
1482
|
* Copyright Google Inc. All Rights Reserved.
|
|
1476
1483
|
*
|
|
1477
1484
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1478
1485
|
* found in the LICENSE file at https://angular.io/license
|
|
1479
|
-
*/();return
|
|
1486
|
+
*/();return dy(n)?n.createElement(e,r):null===r?n.createElement(e):n.createElementNS(r,e)}(this.selector,u.createRenderer(null,this.componentDef)):function h(e,t){var n=e.createRenderer(null,null);return"string"==typeof t?dy(n)?n.selectRootElement(t):n.querySelector(t):t}(u,n),f=this.componentDef.onPush?576:528,d="string"==typeof n&&/^#root-ng-internal-isolated-\d+/.test(n),v=i||d?Xg():s.get(kw),m=u.createRenderer(c,this.componentDef);n&&c&&(dy(m)?m.setAttribute(c,"ng-version",A_.full):c.setAttribute("ng-version",A_.full));var y,g,_=bg(null,Cg(-1,null,1,0,null,null,null,null),v,f,null,null,u,m,l,s),b=cy(_,null);try{var w=
|
|
1480
1487
|
/**
|
|
1481
1488
|
* @license
|
|
1482
1489
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1498,7 +1505,7 @@ function n(e){return e[rm]||null}(e);return new Mw(t,this.ngModule)},t}(y_);func
|
|
|
1498
1505
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1499
1506
|
* found in the LICENSE file at https://angular.io/license
|
|
1500
1507
|
*/
|
|
1501
|
-
function x(e,t,n,r,i,o){!function s(){
|
|
1508
|
+
function x(e,t,n,r,i,o){!function s(){zm=!1,Km=null}();var a=n[pm],u=function l(e,t,n,r,i){var o=ey(),s=o[pm],a=e+Nm;o[a]=n;var u=ty(),l=iy(),c=s.data[a];if(null==c){var p=l?u:u&&u.parent;c=s.data[a]=Tg(p&&p!==o[mm]?p:null,t,a,r,i)}return u&&(!l||null!=u.child||null===c.parent&&2!==u.type?l||(u.next=c):u.child=c),null==s.firstChild&&(s.firstChild=c),ny(c),oy(!0),c}(0,3,e,null,null),c=bg(n,function p(e,t,n,r,i,o,s){return e.ngPrivateData||(e.ngPrivateData=Cg(-1,e,t,n,r,i,o,s))}(t.template,t.consts,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas),null,t.onPush?64:16,n[Nm],u,r,i,o);return a.firstTemplatePass&&(function f(e,t,n){!function r(e,t,n){var r="string"!=typeof n?n[im]:n.charCodeAt(0)||0;null==r&&(r=n[im]=Ay++);var i=r&ky,o=1<<i,s=64&i,a=32&i,u=t.data;128&i?s?a?u[e+7]|=o:u[e+6]|=o:a?u[e+5]|=o:u[e+4]|=o:s?a?u[e+3]|=o:u[e+2]|=o:a?u[e+1]|=o:u[e]|=o}(e,t[pm],n)}(function h(e,t){var n=Iy(e,t);if(-1!==n)return n;var r=t[pm];r.firstTemplatePass&&(e.injectorIndex=t.length,Py(r.data,e),Py(t,null),Py(r.blueprint,null));var i=My(e,t),o=xy(i),s=Ey(i,t),a=e.injectorIndex;if(function u(e){return e!==Xm}(i))for(var l=s[pm].data,c=0;c<8;c++)t[a+c]=s[o+c]|l[o+c];return t[a+$m]=i,a}(u,n),n,t.type),u.flags=1,function d(e,t,n){e.flags=1&e.flags,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}(u,n.length,1),function v(e){var t=ey()[pm];(t.components||(t.components=[])).push(e.index)}(u)),n[Nm]=c}(c,this.componentDef,_,u,m);g=Fm(0,_),t&&(g.projection=t.map(function(e){return Array.from(e)})),y=function E(e,t,n,r,i){var o=n[pm],s=function a(e,t,n){var r=ty();e.firstTemplatePass&&(n.providersResolver&&n.providersResolver(n),function i(e,t,n){var r=-(t.index-Nm),i=e.data.length-(65535&t.providerIndexes);(e.expandoInstructions||(e.expandoInstructions=[])).push(r,i,n)}(e,r,1),function o(e,t,n,r){e.data.push(n);var i=new Ym(r,Hm(n),null);e.blueprint.push(i),t.push(i)}(e,t,n,n.factory));var s=Ly(e.data,t,t.length-1,r);return function a(e,t,n){var r=Lm(t,e);yy(n,e),r&&yy(r,e)}(t,r,s),s}(o,n,t);r.components.push(s),e[_m]=s,i&&i.forEach(function(e){return e(s,t)}),t.contentQueries&&t.contentQueries(1,s,n.length-1);var u=ty();if(o.firstTemplatePass&&t.hostBindings&&(function l(e,t,n,r,i){var o=t.length;e.hostBindings(1,n,r.index-Nm),o===t.length&&i&&t.push(e.hostBindings)}(t,o.expandoInstructions,s,u,o.firstTemplatePass),u.onElementCreationFns&&function c(e){var t;if(t=e.onElementCreationFns){for(var n=0;n<t.length;n++)t[n]();e.onElementCreationFns=null}}(u)),u.stylingTemplate){var p=e[cm];!function h(e,t,n,r){for(var i=t[4],o=r||2;o<i.length;)i[o+1]&&dg(e,i[o+0],!0,n,null),o+=3}(p,u.stylingTemplate,e[xm]),function f(e,t,n,r){for(var i=t[3],o=r||2;o<i.length;){var s=i[o+1];s&&fg(e,i[o+0],s,n,null),o+=3}}(p,u.stylingTemplate,e[xm])}return s}(w,this.componentDef,_,v,[Yg]),function S(e,t){e[Sm]?e[15][dm]=t:e[Sm]=t,e[15]=t}(_,w),gg(_)}finally{py(b)}var C=new Iw(this.componentType,y,function T(e,t,n){return p_||(p_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(e)),new p_(Lm(t,n))}(x_,g,_),_,g);return i&&(C.hostView._tViewNode.child=g),C},t}(f_),Iw=(new Cw,function(e){function t(t,n,r,i,o){var s=e.call(this)||this;return s.location=r,s._rootLView=i,s._tNode=o,s.destroyCbs=[],s.instance=n,s.hostView=s.changeDetectorRef=new __(i),s.hostView._tViewNode=function a(e,t,n,r){var i=e.node;return null==i&&(e.node=i=Tg(t,2,n,null,null)),r[mm]=i}(i[pm],null,-1,i),s.componentType=t,s}return o(t,e),Object.defineProperty(t.prototype,"injector",{get:function(){return new Vy(this._tNode,this._rootLView)},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.destroyCbs.forEach(function(e){return e()}),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy()},t.prototype.onDestroy=function(e){this.destroyCbs.push(e)},t}(h_));!function(e){e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other"}(Nw||(Nw={}));
|
|
1502
1509
|
/**
|
|
1503
1510
|
* @license
|
|
1504
1511
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1506,14 +1513,14 @@ function x(e,t,n,r,i,o){!function s(){Wm=!1,zm=null}();var a=n[hm],u=function l(
|
|
|
1506
1513
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1507
1514
|
* found in the LICENSE file at https://angular.io/license
|
|
1508
1515
|
*/
|
|
1509
|
-
|
|
1516
|
+
var Mw={provide:v_,useClass:Cw,deps:[y_]},Ow=function(e){function t(t,n){var r=e.call(this)||this;r._parent=n,r._bootstrapComponents=[],r.injector=r,r.destroyCbs=[];var i=function o(e,t){var n=e[rm]||null;if(!n&&!0===t)throw new Error("Type "+Od(e)+" does not have 'ngModuleDef' property.");return n}(t);return r._bootstrapComponents=function s(e){return e instanceof Function?e():e}
|
|
1510
1517
|
/**
|
|
1511
1518
|
* @license
|
|
1512
1519
|
* Copyright Google Inc. All Rights Reserved.
|
|
1513
1520
|
*
|
|
1514
1521
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1515
1522
|
* found in the LICENSE file at https://angular.io/license
|
|
1516
|
-
|
|
1523
|
+
*/(i.bootstrap),r._r3Injector=function a(e,t,n,r){return void 0===t&&(t=null),void 0===n&&(n=null),t=t||i_(),new o_(e,n,t,r)}(t,n,[{provide:y_,useValue:r},Mw],Od(t)),r.instance=r.get(t),r}return o(t,e),t.prototype.get=function(e,t,n){return void 0===t&&(t=dv.THROW_IF_NOT_FOUND),void 0===n&&(n=xd.Default),e===dv||e===y_||e===hv?this:this._r3Injector.get(e,t,n)},Object.defineProperty(t.prototype,"componentFactoryResolver",{get:function(){return this.get(v_)},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){var e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(function(e){return e()}),this.destroyCbs=null},t.prototype.onDestroy=function(e){this.destroyCbs.push(e)},t}(y_);
|
|
1517
1524
|
/**
|
|
1518
1525
|
* @license
|
|
1519
1526
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1521,14 +1528,6 @@ function x(e,t,n,r,i,o){!function s(){Wm=!1,zm=null}();var a=n[hm],u=function l(
|
|
|
1521
1528
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1522
1529
|
* found in the LICENSE file at https://angular.io/license
|
|
1523
1530
|
*/
|
|
1524
|
-
var Rw={provide:y_,useClass:Nw,deps:[__]},Dw=function(e){function t(t,n){var r=e.call(this)||this;r._parent=n,r._bootstrapComponents=[],r.injector=r,r.destroyCbs=[];var i=function o(e,t){var n=e[im]||null;if(!n&&!0===t)throw new Error("Type "+Od(e)+" does not have 'ngModuleDef' property.");return n}(t);return r._bootstrapComponents=function s(e){return e instanceof Function?e():e}
|
|
1525
|
-
/**
|
|
1526
|
-
* @license
|
|
1527
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
1528
|
-
*
|
|
1529
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
1530
|
-
* found in the LICENSE file at https://angular.io/license
|
|
1531
|
-
*/(i.bootstrap),r._r3Injector=function a(e,t,n,r){return void 0===t&&(t=null),void 0===n&&(n=null),t=t||s_(),new a_(e,n,t,r)}(t,n,[{provide:__,useValue:r},Rw],Od(t)),r.instance=r.get(t),r}return o(t,e),t.prototype.get=function(e,t,n){return void 0===t&&(t=dv.THROW_IF_NOT_FOUND),void 0===n&&(n=xd.Default),e===dv||e===__||e===hv?this:this._r3Injector.get(e,t,n)},Object.defineProperty(t.prototype,"componentFactoryResolver",{get:function(){return this.get(y_)},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){var e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(function(e){return e()}),this.destroyCbs=null},t.prototype.onDestroy=function(e){this.destroyCbs.push(e)},t}(__);
|
|
1532
1531
|
/**
|
|
1533
1532
|
* @license
|
|
1534
1533
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1543,6 +1542,7 @@ var Rw={provide:y_,useClass:Nw,deps:[__]},Dw=function(e){function t(t,n){var r=e
|
|
|
1543
1542
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1544
1543
|
* found in the LICENSE file at https://angular.io/license
|
|
1545
1544
|
*/
|
|
1545
|
+
function Rw(e){return"function"==typeof e}!function(e){function t(t){var n=e.call(this)||this;return n.moduleType=t,n}o(t,e),t.prototype.create=function(e){return new Ow(this.moduleType,e)}}(g_);let Dw=!1;const Lw={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){const e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else Dw&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Dw=e},get useDeprecatedSynchronousErrorHandling(){return Dw}};function Fw(e){setTimeout(()=>{throw e})}const jw={closed:!0,next(e){},error(e){if(Lw.useDeprecatedSynchronousErrorHandling)throw e;Fw(e)},complete(){}},Vw=Array.isArray||(e=>e&&"number"==typeof e.length);function Hw(e){return null!==e&&"object"==typeof e}function Bw(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((e,t)=>`${t+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e,this}Bw.prototype=Object.create(Error.prototype);const Uw=Bw;class qw{constructor(e){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}unsubscribe(){let e,t=!1;if(this.closed)return;let{_parent:n,_parents:r,_unsubscribe:i,_subscriptions:o}=this;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;let s=-1,a=r?r.length:0;for(;n;)n.remove(this),n=++s<a&&r[s]||null;if(Rw(i))try{i.call(this)}catch(n){t=!0,e=n instanceof Uw?Kw(n.errors):[n]}if(Vw(o))for(s=-1,a=o.length;++s<a;){const n=o[s];if(Hw(n))try{n.unsubscribe()}catch(n){t=!0,e=e||[],n instanceof Uw?e=e.concat(Kw(n.errors)):e.push(n)}}if(t)throw new Uw(e)}add(e){let t=e;switch(typeof e){case"function":t=new qw(e);case"object":if(t===this||t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof qw)){const e=t;(t=new qw)._subscriptions=[e]}break;default:if(!e)return qw.EMPTY;throw new Error("unrecognized teardown "+e+" added to Subscription.")}if(t._addParent(this)){const e=this._subscriptions;e?e.push(t):this._subscriptions=[t]}return t}remove(e){const t=this._subscriptions;if(t){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}}_addParent(e){let{_parent:t,_parents:n}=this;return t!==e&&(t?n?-1===n.indexOf(e)&&(n.push(e),!0):(this._parents=[e],!0):(this._parent=e,!0))}}function Kw(e){return e.reduce((e,t)=>e.concat(t instanceof Uw?t.errors:t),[])}qw.EMPTY=function(e){return e.closed=!0,e}(new qw);const zw="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class Ww extends qw{constructor(e,t,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=jw;break;case 1:if(!e){this.destination=jw;break}if("object"==typeof e){e instanceof Ww?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new Qw(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new Qw(this,e,t,n)}}[zw](){return this}static create(e,t,n){const r=new Ww(e,t,n);return r.syncErrorThrowable=!1,r}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parent:e,_parents:t}=this;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=e,this._parents=t,this}}class Qw extends Ww{constructor(e,t,n,r){let i;super(),this._parentSubscriber=e;let o=this;Rw(t)?i=t:t&&(i=t.next,n=t.error,r=t.complete,t!==jw&&(Rw((o=Object.create(t)).unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=i,this._error=n,this._complete=r}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:t}=this;Lw.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:n}=Lw;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):Fw(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;Fw(e)}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const t=()=>this._complete.call(this._context);Lw.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),Lw.useDeprecatedSynchronousErrorHandling)throw e;Fw(e)}}__tryOrSetError(e,t,n){if(!Lw.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return Lw.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(Fw(t),!0)}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}const $w="function"==typeof Symbol&&Symbol.observable||"@@observable";function Gw(){}class Xw{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const t=new Xw;return t.source=this,t.operator=e,t}subscribe(e,t,n){const{operator:r}=this,i=function o(e,t,n){if(e){if(e instanceof Ww)return e;if(e[zw])return e[zw]()}return e||t||n?new Ww(e,t,n):new Ww(jw)}(e,t,n);if(i.add(r?r.call(i,this.source):this.source||Lw.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),Lw.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i}_trySubscribe(e){try{return this._subscribe(e)}catch(t){Lw.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function t(e){for(;e;){const{closed:t,destination:n,isStopped:r}=e;if(t||r)return!1;e=n&&n instanceof Ww?n:null}return!0}(e)?e.error(t):console.warn(t)}}forEach(e,t){return new(t=Yw(t))((t,n)=>{let r;r=this.subscribe(t=>{try{e(t)}catch(e){n(e),r&&r.unsubscribe()}},n,t)})}_subscribe(e){const{source:t}=this;return t&&t.subscribe(e)}[$w](){return this}pipe(...e){return 0===e.length?this:function t(e){return e?1===e.length?e[0]:function t(n){return e.reduce((e,t)=>t(e),n)}:Gw}(e)(this)}toPromise(e){return new(e=Yw(e))((e,t)=>{let n;this.subscribe(e=>n=e,e=>t(e),()=>e(n))})}}function Yw(e){if(e||(e=Lw.Promise||Promise),!e)throw new Error("no Promise impl found");return e}function Zw(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}Xw.create=(e=>new Xw(e)),Zw.prototype=Object.create(Error.prototype);const Jw=Zw;class ex extends qw{constructor(e,t){super(),this.subject=e,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,t=e.observers;if(this.subject=null,!t||0===t.length||e.isStopped||e.closed)return;const n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}class tx extends Ww{constructor(e){super(e),this.destination=e}}class nx extends Xw{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[zw](){return new tx(this)}lift(e){const t=new rx(this,this);return t.operator=e,t}next(e){if(this.closed)throw new Jw;if(!this.isStopped){const{observers:t}=this,n=t.length,r=t.slice();for(let t=0;t<n;t++)r[t].next(e)}}error(e){if(this.closed)throw new Jw;this.hasError=!0,this.thrownError=e,this.isStopped=!0;const{observers:t}=this,n=t.length,r=t.slice();for(let t=0;t<n;t++)r[t].error(e);this.observers.length=0}complete(){if(this.closed)throw new Jw;this.isStopped=!0;const{observers:e}=this,t=e.length,n=e.slice();for(let e=0;e<t;e++)n[e].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(e){if(this.closed)throw new Jw;return super._trySubscribe(e)}_subscribe(e){if(this.closed)throw new Jw;return this.hasError?(e.error(this.thrownError),qw.EMPTY):this.isStopped?(e.complete(),qw.EMPTY):(this.observers.push(e),new ex(this,e))}asObservable(){const e=new Xw;return e.source=this,e}}nx.create=((e,t)=>new rx(e,t));class rx extends nx{constructor(e,t){super(),this.destination=e,this.source=t}next(e){const{destination:t}=this;t&&t.next&&t.next(e)}error(e){const{destination:t}=this;t&&t.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:t}=this;return t?this.source.subscribe(e):qw.EMPTY}}function ix(){return function e(t){return t.lift(new ox(t))}}class ox{constructor(e){this.connectable=e}call(e,t){const{connectable:n}=this;n._refCount++;const r=new sx(e,n),i=t.subscribe(r);return r.closed||(r.connection=n.connect()),i}}class sx extends Ww{constructor(e,t){super(e),this.connectable=t}_unsubscribe(){const{connectable:e}=this;if(!e)return void(this.connection=null);this.connectable=null;const t=e._refCount;if(t<=0)return void(this.connection=null);if(e._refCount=t-1,t>1)return void(this.connection=null);const{connection:n}=this,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}const ax=class extends Xw{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._refCount=0,this._isComplete=!1}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new qw).add(this.source.subscribe(new lx(this.getSubject(),this))),e.closed?(this._connection=null,e=qw.EMPTY):this._connection=e),e}refCount(){return ix()(this)}}.prototype,ux={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:ax._subscribe},_isComplete:{value:ax._isComplete,writable:!0},getSubject:{value:ax.getSubject},connect:{value:ax.connect},refCount:{value:ax.refCount}};class lx extends tx{constructor(e,t){super(e),this.connectable=t}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const e=this.connectable;if(e){this.connectable=null;const t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}class cx extends qw{constructor(e,t){super()}schedule(e,t=0){return this}}class px extends cx{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;const n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this}requestAsyncId(e,t,n=0){return setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,t,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r}_unsubscribe(){const e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}class hx{constructor(e,t=hx.now){this.SchedulerAction=e,this.now=t}schedule(e,t=0,n){return new this.SchedulerAction(this,e).schedule(n,t)}}hx.now=(()=>Date.now());class fx extends hx{constructor(e,t=hx.now){super(e,()=>fx.delegate&&fx.delegate!==this?fx.delegate.now():t()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(e,t=0,n){return fx.delegate&&fx.delegate!==this?fx.delegate.schedule(e,t,n):super.schedule(e,t,n)}flush(e){const{actions:t}=this;if(this.active)return void t.push(e);let n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}}new class extends fx{}(class extends px{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}schedule(e,t=0){return t>0?super.schedule(e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}execute(e,t){return t>0||this.closed?super.execute(e,t):this._execute(e,t)}requestAsyncId(e,t,n=0){return null!==n&&n>0||null===n&&this.delay>0?super.requestAsyncId(e,t,n):e.flush(this)}});const dx=e=>t=>{for(let n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.closed||t.complete()};function vx(e,t){return new Xw(t?n=>{const r=new qw;let i=0;return r.add(t.schedule(function(){i!==e.length?(n.next(e[i++]),n.closed||r.add(this.schedule())):n.complete()})),r}:dx(e))}var mx;!function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"}(mx||(mx={}));let yx=1;const gx={},_x={setImmediate(e){const t=yx++;return gx[t]=e,Promise.resolve().then(()=>(function e(t){const n=gx[t];n&&n()})(t)),t},clearImmediate(e){delete gx[e]}};function bx(e){return e}new class extends fx{flush(e){this.active=!0,this.scheduled=void 0;const{actions:t}=this;let n,r=-1,i=t.length;e=e||t.shift();do{if(n=e.execute(e.state,e.delay))break}while(++r<i&&(e=t.shift()));if(this.active=!1,n){for(;++r<i&&(e=t.shift());)e.unsubscribe();throw n}}}(class extends px{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,n=0){return null!==n&&n>0?super.requestAsyncId(e,t,n):(e.actions.push(this),e.scheduled||(e.scheduled=_x.setImmediate(e.flush.bind(e,null))))}recycleAsyncId(e,t,n=0){if(null!==n&&n>0||null===n&&this.delay>0)return super.recycleAsyncId(e,t,n);0===e.actions.length&&(_x.clearImmediate(t),e.scheduled=void 0)}}),new fx(px),new class extends fx{flush(e){this.active=!0,this.scheduled=void 0;const{actions:t}=this;let n,r=-1,i=t.length;e=e||t.shift();do{if(n=e.execute(e.state,e.delay))break}while(++r<i&&(e=t.shift()));if(this.active=!1,n){for(;++r<i&&(e=t.shift());)e.unsubscribe();throw n}}}(class extends px{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,n=0){return null!==n&&n>0?super.requestAsyncId(e,t,n):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(()=>e.flush(null))))}recycleAsyncId(e,t,n=0){if(null!==n&&n>0||null===n&&this.delay>0)return super.recycleAsyncId(e,t,n);0===e.actions.length&&(cancelAnimationFrame(t),e.scheduled=void 0)}});class wx{constructor(e,t){this.project=e,this.thisArg=t}call(e,t){return t.subscribe(new xx(e,this.project,this.thisArg))}}class xx extends Ww{constructor(e,t,n){super(e),this.project=t,this.count=0,this.thisArg=n||this}_next(e){let t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)}}class Ex extends Ww{notifyNext(e,t,n,r,i){this.destination.next(t)}notifyError(e,t){this.destination.error(e)}notifyComplete(e){this.destination.complete()}}class Sx extends Ww{constructor(e,t,n){super(),this.parent=e,this.outerValue=t,this.outerIndex=n,this.index=0}_next(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}_error(e){this.parent.notifyError(e,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}const Cx=e=>t=>(e.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Fw),t),Tx=function Nx(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}(),kx=e=>t=>{const n=e[Tx]();for(;;){const e=n.next();if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t},Ax=e=>t=>{const n=e[$w]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(t)},Px=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function Ix(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}const Mx=e=>{if(e instanceof Xw)return t=>e._isScalar?(t.next(e.value),void t.complete()):e.subscribe(t);if(e&&"function"==typeof e[$w])return Ax(e);if(Px(e))return dx(e);if(Ix(e))return Cx(e);if(e&&"function"==typeof e[Tx])return kx(e);{const t=Hw(e)?"an invalid object":`'${e}'`;throw new TypeError(`You provided ${t} where a stream was expected.`+" You can provide an Observable, Promise, Array, or Iterable.")}};class Ox{constructor(e,t=Number.POSITIVE_INFINITY){this.project=e,this.concurrent=t}call(e,t){return t.subscribe(new Rx(e,this.project,this.concurrent))}}class Rx extends Ex{constructor(e,t,n=Number.POSITIVE_INFINITY){super(e),this.project=t,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)}_tryNext(e){let t;const n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this.active++,this._innerSub(t,e,n)}_innerSub(e,t,n){const r=new Sx(this,void 0,void 0);this.destination.add(r),function i(e,t,n,r,o=new Sx(e,n,r)){o.closed||Mx(t)(o)}(this,e,t,n,r)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(e,t,n,r,i){this.destination.next(t)}notifyComplete(e){const t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}
|
|
1546
1546
|
/**
|
|
1547
1547
|
* @license
|
|
1548
1548
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1550,7 +1550,7 @@ var Rw={provide:y_,useClass:Nw,deps:[__]},Dw=function(e){function t(t,n){var r=e
|
|
|
1550
1550
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1551
1551
|
* found in the LICENSE file at https://angular.io/license
|
|
1552
1552
|
*/
|
|
1553
|
-
function Lw(e){return"function"==typeof e}!function(e){function t(t){var n=e.call(this)||this;return n.moduleType=t,n}o(t,e),t.prototype.create=function(e){return new Dw(this.moduleType,e)}}(b_);let Fw=!1;const jw={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){const e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else Fw&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Fw=e},get useDeprecatedSynchronousErrorHandling(){return Fw}};function Vw(e){setTimeout(()=>{throw e})}const Hw={closed:!0,next(e){},error(e){if(jw.useDeprecatedSynchronousErrorHandling)throw e;Vw(e)},complete(){}},Bw=Array.isArray||(e=>e&&"number"==typeof e.length);function Uw(e){return null!==e&&"object"==typeof e}function qw(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((e,t)=>`${t+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e,this}qw.prototype=Object.create(Error.prototype);const Kw=qw;class zw{constructor(e){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}unsubscribe(){let e,t=!1;if(this.closed)return;let{_parent:n,_parents:r,_unsubscribe:i,_subscriptions:o}=this;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;let s=-1,a=r?r.length:0;for(;n;)n.remove(this),n=++s<a&&r[s]||null;if(Lw(i))try{i.call(this)}catch(n){t=!0,e=n instanceof Kw?Ww(n.errors):[n]}if(Bw(o))for(s=-1,a=o.length;++s<a;){const n=o[s];if(Uw(n))try{n.unsubscribe()}catch(n){t=!0,e=e||[],n instanceof Kw?e=e.concat(Ww(n.errors)):e.push(n)}}if(t)throw new Kw(e)}add(e){let t=e;switch(typeof e){case"function":t=new zw(e);case"object":if(t===this||t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof zw)){const e=t;(t=new zw)._subscriptions=[e]}break;default:if(!e)return zw.EMPTY;throw new Error("unrecognized teardown "+e+" added to Subscription.")}if(t._addParent(this)){const e=this._subscriptions;e?e.push(t):this._subscriptions=[t]}return t}remove(e){const t=this._subscriptions;if(t){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}}_addParent(e){let{_parent:t,_parents:n}=this;return t!==e&&(t?n?-1===n.indexOf(e)&&(n.push(e),!0):(this._parents=[e],!0):(this._parent=e,!0))}}function Ww(e){return e.reduce((e,t)=>e.concat(t instanceof Kw?t.errors:t),[])}zw.EMPTY=function(e){return e.closed=!0,e}(new zw);const Qw="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class Gw extends zw{constructor(e,t,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Hw;break;case 1:if(!e){this.destination=Hw;break}if("object"==typeof e){e instanceof Gw?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new $w(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new $w(this,e,t,n)}}[Qw](){return this}static create(e,t,n){const r=new Gw(e,t,n);return r.syncErrorThrowable=!1,r}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parent:e,_parents:t}=this;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=e,this._parents=t,this}}class $w extends Gw{constructor(e,t,n,r){let i;super(),this._parentSubscriber=e;let o=this;Lw(t)?i=t:t&&(i=t.next,n=t.error,r=t.complete,t!==Hw&&(Lw((o=Object.create(t)).unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=i,this._error=n,this._complete=r}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:t}=this;jw.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:n}=jw;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):Vw(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;Vw(e)}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const t=()=>this._complete.call(this._context);jw.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),jw.useDeprecatedSynchronousErrorHandling)throw e;Vw(e)}}__tryOrSetError(e,t,n){if(!jw.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return jw.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(Vw(t),!0)}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}const Xw="function"==typeof Symbol&&Symbol.observable||"@@observable";function Yw(){}class Zw{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const t=new Zw;return t.source=this,t.operator=e,t}subscribe(e,t,n){const{operator:r}=this,i=function o(e,t,n){if(e){if(e instanceof Gw)return e;if(e[Qw])return e[Qw]()}return e||t||n?new Gw(e,t,n):new Gw(Hw)}(e,t,n);if(i.add(r?r.call(i,this.source):this.source||jw.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),jw.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i}_trySubscribe(e){try{return this._subscribe(e)}catch(t){jw.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function t(e){for(;e;){const{closed:t,destination:n,isStopped:r}=e;if(t||r)return!1;e=n&&n instanceof Gw?n:null}return!0}(e)?e.error(t):console.warn(t)}}forEach(e,t){return new(t=Jw(t))((t,n)=>{let r;r=this.subscribe(t=>{try{e(t)}catch(e){n(e),r&&r.unsubscribe()}},n,t)})}_subscribe(e){const{source:t}=this;return t&&t.subscribe(e)}[Xw](){return this}pipe(...e){return 0===e.length?this:function t(e){return e?1===e.length?e[0]:function t(n){return e.reduce((e,t)=>t(e),n)}:Yw}(e)(this)}toPromise(e){return new(e=Jw(e))((e,t)=>{let n;this.subscribe(e=>n=e,e=>t(e),()=>e(n))})}}function Jw(e){if(e||(e=jw.Promise||Promise),!e)throw new Error("no Promise impl found");return e}function ex(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}Zw.create=(e=>new Zw(e)),ex.prototype=Object.create(Error.prototype);const tx=ex;class nx extends zw{constructor(e,t){super(),this.subject=e,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,t=e.observers;if(this.subject=null,!t||0===t.length||e.isStopped||e.closed)return;const n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}class rx extends Gw{constructor(e){super(e),this.destination=e}}class ix extends Zw{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[Qw](){return new rx(this)}lift(e){const t=new ox(this,this);return t.operator=e,t}next(e){if(this.closed)throw new tx;if(!this.isStopped){const{observers:t}=this,n=t.length,r=t.slice();for(let t=0;t<n;t++)r[t].next(e)}}error(e){if(this.closed)throw new tx;this.hasError=!0,this.thrownError=e,this.isStopped=!0;const{observers:t}=this,n=t.length,r=t.slice();for(let t=0;t<n;t++)r[t].error(e);this.observers.length=0}complete(){if(this.closed)throw new tx;this.isStopped=!0;const{observers:e}=this,t=e.length,n=e.slice();for(let e=0;e<t;e++)n[e].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(e){if(this.closed)throw new tx;return super._trySubscribe(e)}_subscribe(e){if(this.closed)throw new tx;return this.hasError?(e.error(this.thrownError),zw.EMPTY):this.isStopped?(e.complete(),zw.EMPTY):(this.observers.push(e),new nx(this,e))}asObservable(){const e=new Zw;return e.source=this,e}}ix.create=((e,t)=>new ox(e,t));class ox extends ix{constructor(e,t){super(),this.destination=e,this.source=t}next(e){const{destination:t}=this;t&&t.next&&t.next(e)}error(e){const{destination:t}=this;t&&t.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:t}=this;return t?this.source.subscribe(e):zw.EMPTY}}function sx(){return function e(t){return t.lift(new ax(t))}}class ax{constructor(e){this.connectable=e}call(e,t){const{connectable:n}=this;n._refCount++;const r=new ux(e,n),i=t.subscribe(r);return r.closed||(r.connection=n.connect()),i}}class ux extends Gw{constructor(e,t){super(e),this.connectable=t}_unsubscribe(){const{connectable:e}=this;if(!e)return void(this.connection=null);this.connectable=null;const t=e._refCount;if(t<=0)return void(this.connection=null);if(e._refCount=t-1,t>1)return void(this.connection=null);const{connection:n}=this,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}const lx=class extends Zw{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._refCount=0,this._isComplete=!1}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new zw).add(this.source.subscribe(new px(this.getSubject(),this))),e.closed?(this._connection=null,e=zw.EMPTY):this._connection=e),e}refCount(){return sx()(this)}}.prototype,cx={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:lx._subscribe},_isComplete:{value:lx._isComplete,writable:!0},getSubject:{value:lx.getSubject},connect:{value:lx.connect},refCount:{value:lx.refCount}};class px extends rx{constructor(e,t){super(e),this.connectable=t}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const e=this.connectable;if(e){this.connectable=null;const t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}class hx extends zw{constructor(e,t){super()}schedule(e,t=0){return this}}class fx extends hx{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;const n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this}requestAsyncId(e,t,n=0){return setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,t,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r}_unsubscribe(){const e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}class dx{constructor(e,t=dx.now){this.SchedulerAction=e,this.now=t}schedule(e,t=0,n){return new this.SchedulerAction(this,e).schedule(n,t)}}dx.now=(()=>Date.now());class vx extends dx{constructor(e,t=dx.now){super(e,()=>vx.delegate&&vx.delegate!==this?vx.delegate.now():t()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(e,t=0,n){return vx.delegate&&vx.delegate!==this?vx.delegate.schedule(e,t,n):super.schedule(e,t,n)}flush(e){const{actions:t}=this;if(this.active)return void t.push(e);let n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}}new class extends vx{}(class extends fx{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}schedule(e,t=0){return t>0?super.schedule(e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}execute(e,t){return t>0||this.closed?super.execute(e,t):this._execute(e,t)}requestAsyncId(e,t,n=0){return null!==n&&n>0||null===n&&this.delay>0?super.requestAsyncId(e,t,n):e.flush(this)}});const mx=e=>t=>{for(let n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.closed||t.complete()};function yx(e,t){return new Zw(t?n=>{const r=new zw;let i=0;return r.add(t.schedule(function(){i!==e.length?(n.next(e[i++]),n.closed||r.add(this.schedule())):n.complete()})),r}:mx(e))}var gx;!function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"}(gx||(gx={}));let _x=1;const bx={},wx={setImmediate(e){const t=_x++;return bx[t]=e,Promise.resolve().then(()=>(function e(t){const n=bx[t];n&&n()})(t)),t},clearImmediate(e){delete bx[e]}};function xx(e){return e}new class extends vx{flush(e){this.active=!0,this.scheduled=void 0;const{actions:t}=this;let n,r=-1,i=t.length;e=e||t.shift();do{if(n=e.execute(e.state,e.delay))break}while(++r<i&&(e=t.shift()));if(this.active=!1,n){for(;++r<i&&(e=t.shift());)e.unsubscribe();throw n}}}(class extends fx{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,n=0){return null!==n&&n>0?super.requestAsyncId(e,t,n):(e.actions.push(this),e.scheduled||(e.scheduled=wx.setImmediate(e.flush.bind(e,null))))}recycleAsyncId(e,t,n=0){if(null!==n&&n>0||null===n&&this.delay>0)return super.recycleAsyncId(e,t,n);0===e.actions.length&&(wx.clearImmediate(t),e.scheduled=void 0)}}),new vx(fx),new class extends vx{flush(e){this.active=!0,this.scheduled=void 0;const{actions:t}=this;let n,r=-1,i=t.length;e=e||t.shift();do{if(n=e.execute(e.state,e.delay))break}while(++r<i&&(e=t.shift()));if(this.active=!1,n){for(;++r<i&&(e=t.shift());)e.unsubscribe();throw n}}}(class extends fx{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,n=0){return null!==n&&n>0?super.requestAsyncId(e,t,n):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(()=>e.flush(null))))}recycleAsyncId(e,t,n=0){if(null!==n&&n>0||null===n&&this.delay>0)return super.recycleAsyncId(e,t,n);0===e.actions.length&&(cancelAnimationFrame(t),e.scheduled=void 0)}});class Ex{constructor(e,t){this.project=e,this.thisArg=t}call(e,t){return t.subscribe(new Sx(e,this.project,this.thisArg))}}class Sx extends Gw{constructor(e,t,n){super(e),this.project=t,this.count=0,this.thisArg=n||this}_next(e){let t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)}}class Cx extends Gw{notifyNext(e,t,n,r,i){this.destination.next(t)}notifyError(e,t){this.destination.error(e)}notifyComplete(e){this.destination.complete()}}class Tx extends Gw{constructor(e,t,n){super(),this.parent=e,this.outerValue=t,this.outerIndex=n,this.index=0}_next(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}_error(e){this.parent.notifyError(e,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}const Nx=e=>t=>(e.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Vw),t),kx=function Ax(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}(),Px=e=>t=>{const n=e[kx]();for(;;){const e=n.next();if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t},Ix=e=>t=>{const n=e[Xw]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(t)},Mx=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function Ox(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}const Rx=e=>{if(e instanceof Zw)return t=>e._isScalar?(t.next(e.value),void t.complete()):e.subscribe(t);if(e&&"function"==typeof e[Xw])return Ix(e);if(Mx(e))return mx(e);if(Ox(e))return Nx(e);if(e&&"function"==typeof e[kx])return Px(e);{const t=Uw(e)?"an invalid object":`'${e}'`;throw new TypeError(`You provided ${t} where a stream was expected.`+" You can provide an Observable, Promise, Array, or Iterable.")}};class Dx{constructor(e,t=Number.POSITIVE_INFINITY){this.project=e,this.concurrent=t}call(e,t){return t.subscribe(new Lx(e,this.project,this.concurrent))}}class Lx extends Cx{constructor(e,t,n=Number.POSITIVE_INFINITY){super(e),this.project=t,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)}_tryNext(e){let t;const n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this.active++,this._innerSub(t,e,n)}_innerSub(e,t,n){const r=new Tx(this,void 0,void 0);this.destination.add(r),function i(e,t,n,r,o=new Tx(e,n,r)){o.closed||Rx(t)(o)}(this,e,t,n,r)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(e,t,n,r,i){this.destination.next(t)}notifyComplete(e){const t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}
|
|
1553
|
+
var Dx=function(e){function t(t){void 0===t&&(t=!1);var n=e.call(this)||this;return n.__isAsync=t,n}return o(t,e),t.prototype.emit=function(t){e.prototype.next.call(this,t)},t.prototype.subscribe=function(t,n,r){var i,o=function(e){return null},s=function(){return null};t&&"object"==typeof t?(i=this.__isAsync?function(e){setTimeout(function(){return t.next(e)})}:function(e){t.next(e)},t.error&&(o=this.__isAsync?function(e){setTimeout(function(){return t.error(e)})}:function(e){t.error(e)}),t.complete&&(s=this.__isAsync?function(){setTimeout(function(){return t.complete()})}:function(){t.complete()})):(i=this.__isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)},n&&(o=this.__isAsync?function(e){setTimeout(function(){return n(e)})}:function(e){n(e)}),r&&(s=this.__isAsync?function(){setTimeout(function(){return r()})}:function(){r()}));var a=e.prototype.subscribe.call(this,i,o,s);return t instanceof qw&&t.add(a),a},t}(nx),Lx=function(){function e(){this.dirty=!0,this._results=[],this.changes=new Dx,this.length=0}return e.prototype.map=function(e){return this._results.map(e)},e.prototype.filter=function(e){return this._results.filter(e)},e.prototype.find=function(e){return this._results.find(e)},e.prototype.reduce=function(e,t){return this._results.reduce(e,t)},e.prototype.forEach=function(e){this._results.forEach(e)},e.prototype.some=function(e){return this._results.some(e)},e.prototype.toArray=function(){return this._results.slice()},e.prototype[Hg()]=function(){return this._results[Hg()]()},e.prototype.toString=function(){return this._results.toString()},e.prototype.reset=function(e){this._results=
|
|
1554
1554
|
/**
|
|
1555
1555
|
* @license
|
|
1556
1556
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1558,21 +1558,21 @@ function Lw(e){return"function"==typeof e}!function(e){function t(t){var n=e.cal
|
|
|
1558
1558
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1559
1559
|
* found in the LICENSE file at https://angular.io/license
|
|
1560
1560
|
*/
|
|
1561
|
-
|
|
1561
|
+
function e(t,n){void 0===n&&(n=t);for(var r=0;r<t.length;r++){var i=t[r];Array.isArray(i)?(n===t&&(n=t.slice(0,r)),e(i,n)):n!==t&&n.push(i)}return n}
|
|
1562
1562
|
/**
|
|
1563
1563
|
* @license
|
|
1564
1564
|
* Copyright Google Inc. All Rights Reserved.
|
|
1565
1565
|
*
|
|
1566
1566
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1567
1567
|
* found in the LICENSE file at https://angular.io/license
|
|
1568
|
-
*/(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},e.prototype.notifyOnChanges=function(){this.changes.emit(this)},e.prototype.setDirty=function(){this.dirty=!0},e.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},e}(),
|
|
1568
|
+
*/(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},e.prototype.notifyOnChanges=function(){this.changes.emit(this)},e.prototype.setDirty=function(){this.dirty=!0},e.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},e}(),Fx=gd("Directive",function(e){return void 0===e&&(e={}),e},void 0,void 0,function(e,t){return Vx(e,t)}),jx=(gd("Component",function(e){return void 0===e&&(e={}),a({changeDetection:$v.Default},e)},Fx,void 0,function(e,t){return jx(e,t)}),gd("Pipe",function(e){return a({pure:!0},e)},void 0,void 0,function(e,t){return Hx(e,t)}),wd("Input",function(e){return{bindingPropertyName:e}}),wd("Output",function(e){return{bindingPropertyName:e}}),wd("HostBinding",function(e){return{hostPropertyName:e}}),wd("HostListener",function(e,t){return{eventName:e,args:t}}),b_),Vx=b_,Hx=b_,Bx=gd("NgModule",function(e){return e},void 0,void 0,function(e,t){return Ux(e,t)}),Ux=function qx(e,t){var n=t&&t.imports||[];t&&t.exports&&(n=f(n,[t.exports])),e.ngInjectorDef=function r(e){return{factory:e.factory,providers:e.providers||[],imports:e.imports||[]}}({factory:iv(e,{useClass:e}),providers:t&&t.providers,imports:n})};
|
|
1569
1569
|
/**
|
|
1570
1570
|
* @license
|
|
1571
1571
|
* Copyright Google Inc. All Rights Reserved.
|
|
1572
1572
|
*
|
|
1573
1573
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1574
1574
|
* found in the LICENSE file at https://angular.io/license
|
|
1575
|
-
*/class
|
|
1575
|
+
*/class Kx{constructor(e,t){this.subjectFactory=e,this.selector=t}call(e,t){const{selector:n}=this,r=this.subjectFactory(),i=n(r).subscribe(e);return i.add(t.subscribe(r)),i}}function zx(){return new nx}
|
|
1576
1576
|
/**
|
|
1577
1577
|
* @license
|
|
1578
1578
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1580,7 +1580,7 @@ var Fx=function(e){function t(t){void 0===t&&(t=!1);var n=e.call(this)||this;ret
|
|
|
1580
1580
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1581
1581
|
* found in the LICENSE file at https://angular.io/license
|
|
1582
1582
|
*/
|
|
1583
|
-
var
|
|
1583
|
+
var Wx=new uv("Application Initializer"),Qx=function(){function e(e){var t=this;this.appInits=e,this.initialized=!1,this.done=!1,this.donePromise=new Promise(function(e,n){t.resolve=e,t.reject=n})}return e.prototype.runInitializers=function(){var e=this;if(!this.initialized){var t=[],n=function(){e.done=!0,e.resolve()};if(this.appInits)for(var r=0;r<this.appInits.length;r++){var i=this.appInits[r]();jg(i)&&t.push(i)}Promise.all(t).then(function(){n()}).catch(function(t){e.reject(t)}),0===t.length&&n(),this.initialized=!0}},u([ov(),l(0,Ed(Wx)),l(0,Sd()),c("design:paramtypes",[Array])],e)}(),$x={provide:new uv("AppId"),useFactory:function Gx(){return""+Xx()+Xx()+Xx()},deps:[]};function Xx(){return String.fromCharCode(97+Math.floor(25*Math.random()))}new uv("Platform Initializer");var Yx=new uv("Platform ID"),Zx=new uv("appBootstrapListener"),Jx=(new uv("Application Packages Root URL"),function(){function e(){}return e.prototype.log=function(e){console.log(e)},e.prototype.warn=function(e){console.warn(e)},u([ov()],e)}());
|
|
1584
1584
|
/**
|
|
1585
1585
|
* @license
|
|
1586
1586
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1588,28 +1588,28 @@ var Gx=new uv("Application Initializer"),$x=function(){function e(e){var t=this;
|
|
|
1588
1588
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1589
1589
|
* found in the LICENSE file at https://angular.io/license
|
|
1590
1590
|
*/
|
|
1591
|
-
function
|
|
1591
|
+
function eE(){throw new Error("Runtime compiler is not loaded")}var tE,nE,rE=eE,iE=eE,oE=eE,sE=eE,aE=function(){function e(){this.compileModuleSync=rE,this.compileModuleAsync=iE,this.compileModuleAndAllComponentsSync=oE,this.compileModuleAndAllComponentsAsync=sE}return e.prototype.clearCache=function(){},e.prototype.clearCacheFor=function(e){},e.prototype.getModuleId=function(e){},u([ov()],e)}(),uE=(new uv("compilerOptions"),function uE(){}),lE=function cE(){var e=jd.wtf;return!(!e||!(tE=e.trace)||(nE=tE.events,0))}();function pE(e,t){return null}var hE=lE?function fE(e,t){return void 0===t&&(t=null),nE.createScope(e,t)}:function(e,t){return pE},dE=lE?function vE(e,t){return tE.leaveScope(e,t),t}
|
|
1592
1592
|
/**
|
|
1593
1593
|
* @license
|
|
1594
1594
|
* Copyright Google Inc. All Rights Reserved.
|
|
1595
1595
|
*
|
|
1596
1596
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1597
1597
|
* found in the LICENSE file at https://angular.io/license
|
|
1598
|
-
*/:function(e,t){return t},
|
|
1598
|
+
*/:function(e,t){return t},mE=Promise.resolve(0);function yE(e){"undefined"==typeof Zone?mE.then(function(){e&&e.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",e)}
|
|
1599
1599
|
/**
|
|
1600
1600
|
* @license
|
|
1601
1601
|
* Copyright Google Inc. All Rights Reserved.
|
|
1602
1602
|
*
|
|
1603
1603
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1604
1604
|
* found in the LICENSE file at https://angular.io/license
|
|
1605
|
-
*/var
|
|
1605
|
+
*/var gE=function(){function e(e){var t=e.enableLongStackTrace,n=void 0!==t&&t;if(this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Dx(!1),this.onMicrotaskEmpty=new Dx(!1),this.onStable=new Dx(!1),this.onError=new Dx(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),function r(e){e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:function(t,n,r,i,o,s){try{return xE(e),t.invokeTask(r,i,o,s)}finally{EE(e)}},onInvoke:function(t,n,r,i,o,s,a){try{return xE(e),t.invoke(r,i,o,s,a)}finally{EE(e)}},onHasTask:function(t,n,r,i){t.hasTask(r,i),n===r&&("microTask"==i.change?(e.hasPendingMicrotasks=i.microTask,wE(e)):"macroTask"==i.change&&(e.hasPendingMacrotasks=i.macroTask))},onHandleError:function(t,n,r,i){return t.handleError(r,i),e.runOutsideAngular(function(){return e.onError.emit(i)}),!1}})}(this)}return e.isInAngularZone=function(){return!0===Zone.current.get("isAngularZone")},e.assertInAngularZone=function(){if(!e.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")},e.assertNotInAngularZone=function(){if(e.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")},e.prototype.run=function(e,t,n){return this._inner.run(e,t,n)},e.prototype.runTask=function(e,t,n,r){var i=this._inner,o=i.scheduleEventTask("NgZoneEvent: "+r,e,bE,_E,_E);try{return i.runTask(o,t,n)}finally{i.cancelTask(o)}},e.prototype.runGuarded=function(e,t,n){return this._inner.runGuarded(e,t,n)},e.prototype.runOutsideAngular=function(e){return this._outer.run(e)},e}();function _E(){}var bE={};function wE(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(function(){return e.onStable.emit(null)})}finally{e.isStable=!0}}}function xE(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function EE(e){e._nesting--,wE(e)}var SE=function(){function e(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Dx,this.onMicrotaskEmpty=new Dx,this.onStable=new Dx,this.onError=new Dx}return e.prototype.run=function(e){return e()},e.prototype.runGuarded=function(e){return e()},e.prototype.runOutsideAngular=function(e){return e()},e.prototype.runTask=function(e){return e()},e}(),CE=function(){function e(e){var t=this;this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),e.run(function(){t.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}return e.prototype._watchAngularEvents=function(){var e=this;this._ngZone.onUnstable.subscribe({next:function(){e._didWork=!0,e._isZoneStable=!1}}),this._ngZone.runOutsideAngular(function(){e._ngZone.onStable.subscribe({next:function(){gE.assertNotInAngularZone(),yE(function(){e._isZoneStable=!0,e._runCallbacksIfReady()})}})})},e.prototype.increasePendingRequestCount=function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount},e.prototype.decreasePendingRequestCount=function(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount},e.prototype.isStable=function(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks},e.prototype._runCallbacksIfReady=function(){var e=this;if(this.isStable())yE(function(){for(;0!==e._callbacks.length;){var t=e._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(e._didWork)}e._didWork=!1});else{var t=this.getPendingTasks();this._callbacks=this._callbacks.filter(function(e){return!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)}),this._didWork=!0}},e.prototype.getPendingTasks=function(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(function(e){return{source:e.source,creationLocation:e.creationLocation,data:e.data}}):[]},e.prototype.addCallback=function(e,t,n){var r=this,i=-1;t&&t>0&&(i=setTimeout(function(){r._callbacks=r._callbacks.filter(function(e){return e.timeoutId!==i}),e(r._didWork,r.getPendingTasks())},t)),this._callbacks.push({doneCb:e,timeoutId:i,updateCb:n})},e.prototype.whenStable=function(e,t,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(e,t,n),this._runCallbacksIfReady()},e.prototype.getPendingRequestCount=function(){return this._pendingCount},e.prototype.findProviders=function(e,t,n){return[]},u([ov(),c("design:paramtypes",[gE])],e)}(),TE=function(){function e(){this._applications=new Map,NE.addToWindow(this)}return e.prototype.registerApplication=function(e,t){this._applications.set(e,t)},e.prototype.unregisterApplication=function(e){this._applications.delete(e)},e.prototype.unregisterAllApplications=function(){this._applications.clear()},e.prototype.getTestability=function(e){return this._applications.get(e)||null},e.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},e.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},e.prototype.findTestabilityInTree=function(e,t){return void 0===t&&(t=!0),NE.findTestabilityInTree(this,e,t)},u([ov(),c("design:paramtypes",[])],e)}(),NE=new(function(){function e(){}return e.prototype.addToWindow=function(e){},e.prototype.findTestabilityInTree=function(e,t,n){return null},e}());
|
|
1606
1606
|
/**
|
|
1607
1607
|
* @license
|
|
1608
1608
|
* Copyright Google Inc. All Rights Reserved.
|
|
1609
1609
|
*
|
|
1610
1610
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1611
1611
|
* found in the LICENSE file at https://angular.io/license
|
|
1612
|
-
*/new uv("AllowMultipleToken");var
|
|
1612
|
+
*/new uv("AllowMultipleToken");var kE=function(){function e(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return e.prototype.bootstrapModuleFactory=function(e,t){var n=this,r=function i(e){return"noop"===e?new SE:("zone.js"===e?void 0:e)||new gE({enableLongStackTrace:zy()})}(t?t.ngZone:void 0),o=[{provide:gE,useValue:r}];return r.run(function(){var t=dv.create({providers:o,parent:n.injector,name:e.moduleType.name}),i=e.create(t),s=i.injector.get(qy,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return i.onDestroy(function(){return IE(n._modules,i)}),r.runOutsideAngular(function(){return r.onError.subscribe({next:function(e){s.handleError(e)}})}),function a(e,t,n){try{var r=n();return jg(r)?r.catch(function(n){throw t.runOutsideAngular(function(){return e.handleError(n)}),n}):r}catch(n){throw t.runOutsideAngular(function(){return e.handleError(n)}),n}}(s,r,function(){var e=i.injector.get(Qx);return e.runInitializers(),e.donePromise.then(function(){return n._moduleDoBootstrap(i),i})})})},e.prototype.bootstrapModule=function(e,t){var n=this;void 0===t&&(t=[]);var r=AE({},t);return function i(e,t,n){return e.get(uE).createCompiler([t]).compileModuleAsync(n)}(this.injector,r,e).then(function(e){return n.bootstrapModuleFactory(e,r)})},e.prototype._moduleDoBootstrap=function(e){var t=e.injector.get(PE);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(function(e){return t.bootstrap(e)});else{if(!e.instance.ngDoBootstrap)throw new Error("The module "+Od(e.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');e.instance.ngDoBootstrap(t)}this._modules.push(e)},e.prototype.onDestroy=function(e){this._destroyListeners.push(e)},Object.defineProperty(e.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(e){return e.destroy()}),this._destroyListeners.forEach(function(e){return e()}),this._destroyed=!0},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),u([ov(),c("design:paramtypes",[dv])],e)}();function AE(e,t){return Array.isArray(t)?t.reduce(AE,e):a({},e,t)}var PE=function(){function e(e,t,n,r,i,o){var s=this;this._zone=e,this._console=t,this._injector=n,this._exceptionHandler=r,this._componentFactoryResolver=i,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=zy(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var a=new Xw(function(e){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){e.next(s._stable),e.complete()})}),u=new Xw(function(e){var t;s._zone.runOutsideAngular(function(){t=s._zone.onStable.subscribe(function(){gE.assertNotInAngularZone(),yE(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,e.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){gE.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){e.next(!1)}))});return function(){t.unsubscribe(),n.unsubscribe()}});this.isStable=function c(...e){let t=Number.POSITIVE_INFINITY,n=null,r=e[e.length-1];return function i(e){return e&&"function"==typeof e.schedule}(r)?(n=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(t=e.pop())):"number"==typeof r&&(t=e.pop()),null===n&&1===e.length&&e[0]instanceof Xw?e[0]:function o(e=Number.POSITIVE_INFINITY){return function e(t,n,r=Number.POSITIVE_INFINITY){return"function"==typeof n?i=>i.pipe(e((e,r)=>(function o(e,t){if(!t)return e instanceof Xw?e:new Xw(Mx(e));if(null!=e){if(function n(e){return e&&"function"==typeof e[$w]}(e))return function r(e,t){return new Xw(t?n=>{const r=new qw;return r.add(t.schedule(()=>{const i=e[$w]();r.add(i.subscribe({next(e){r.add(t.schedule(()=>n.next(e)))},error(e){r.add(t.schedule(()=>n.error(e)))},complete(){r.add(t.schedule(()=>n.complete()))}}))})),r}:Ax(e))}(e,t);if(Ix(e))return function i(e,t){return new Xw(t?n=>{const r=new qw;return r.add(t.schedule(()=>e.then(e=>{r.add(t.schedule(()=>{n.next(e),r.add(t.schedule(()=>n.complete()))}))},e=>{r.add(t.schedule(()=>n.error(e)))}))),r}:Cx(e))}(e,t);if(Px(e))return vx(e,t);if(function o(e){return e&&"function"==typeof e[Tx]}(e)||"string"==typeof e)return function s(e,t){if(!e)throw new Error("Iterable cannot be null");return new Xw(t?n=>{const r=new qw;let i;return r.add(()=>{i&&"function"==typeof i.return&&i.return()}),r.add(t.schedule(()=>{i=e[Tx](),r.add(t.schedule(function(){if(n.closed)return;let e,t;try{const r=i.next();e=r.value,t=r.done}catch(e){return void n.error(e)}t?n.complete():(n.next(e),this.schedule())}))})),r}:kx(e))}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")})(t(e,r)).pipe(function i(e,t){return function n(r){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new wx(e,t))}}((t,i)=>n(e,t,r,i))),r)):("number"==typeof n&&(r=n),e=>e.lift(new Ox(t,r)))}(bx,e)}(t)(vx(e,n))}(a,u.pipe(function l(){return e=>ix()(
|
|
1613
1613
|
/**
|
|
1614
1614
|
* @license
|
|
1615
1615
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1617,7 +1617,7 @@ function nE(){throw new Error("Runtime compiler is not loaded")}var rE,iE,oE=nE,
|
|
|
1617
1617
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1618
1618
|
* found in the LICENSE file at https://angular.io/license
|
|
1619
1619
|
*/
|
|
1620
|
-
function t(e,n){return function t(r){let i;if(i="function"==typeof e?e:function t(){return e},"function"==typeof n)return r.lift(new
|
|
1620
|
+
function t(e,n){return function t(r){let i;if(i="function"==typeof e?e:function t(){return e},"function"==typeof n)return r.lift(new Kx(i,n));const o=Object.create(r,ux);return o.source=r,o.subjectFactory=i,o}}(zx)(e))}()))}var t;return t=e,e.prototype.bootstrap=function(e,t){var n,r=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=e instanceof f_?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var i=function o(e){return e instanceof m_}(n)?null:this._injector.get(y_),s=n.create(dv.NULL,[],t||n.selector,i);s.onDestroy(function(){r._unloadComponent(s)});var a=s.injector.get(CE,null);return a&&s.injector.get(TE).registerApplication(s.location.nativeElement,a),this._loadComponent(s),zy()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),s},e.prototype.tick=function(){var e,n,r,i,o=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var s=t._tickScope();try{this._runningTick=!0;try{for(var a=p(this._views),u=a.next();!u.done;u=a.next())u.value.detectChanges()}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}if(this._enforceNoNewChanges)try{for(var l=p(this._views),c=l.next();!c.done;c=l.next())c.value.checkNoChanges()}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}catch(e){this._zone.runOutsideAngular(function(){return o._exceptionHandler.handleError(e)})}finally{this._runningTick=!1,dE(s)}},e.prototype.attachView=function(e){var t=e;this._views.push(t),t.attachToAppRef(this)},e.prototype.detachView=function(e){var t=e;IE(this._views,t),t.detachFromAppRef()},e.prototype._loadComponent=function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(Zx,[]).concat(this._bootstrapListeners).forEach(function(t){return t(e)})},e.prototype._unloadComponent=function(e){this.detachView(e.hostView),IE(this.components,e)},e.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(e){return e.destroy()})},Object.defineProperty(e.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),e._tickScope=hE("ApplicationRef#tick()"),t=u([ov(),c("design:paramtypes",[gE,Jx,dv,qy,v_,Qx])],e)}();function IE(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}
|
|
1621
1621
|
/**
|
|
1622
1622
|
* @license
|
|
1623
1623
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1638,14 +1638,14 @@ function t(e,n){return function t(r){let i;if(i="function"==typeof e?e:function
|
|
|
1638
1638
|
*
|
|
1639
1639
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1640
1640
|
* found in the LICENSE file at https://angular.io/license
|
|
1641
|
-
*/var
|
|
1641
|
+
*/var ME,OE=function OE(){},RE={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};function DE(e,t,n){if(!e)throw new Error("Cannot find '"+n+"' in '"+t+"'");return e}
|
|
1642
1642
|
/**
|
|
1643
1643
|
* @license
|
|
1644
1644
|
* Copyright Google Inc. All Rights Reserved.
|
|
1645
1645
|
*
|
|
1646
1646
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1647
1647
|
* found in the LICENSE file at https://angular.io/license
|
|
1648
|
-
*/!function(){function e(e,t){this._compiler=e,this._config=t||
|
|
1648
|
+
*/!function(){function e(e,t){this._compiler=e,this._config=t||RE}e.prototype.load=function(e){return this._compiler instanceof aE?this.loadFactory(e):this.loadAndCompile(e)},e.prototype.loadAndCompile=function(e){var t=this,n=h(e.split("#"),2),r=n[0],i=n[1];return void 0===i&&(i="default"),System.import(r).then(function(e){return e[i]}).then(function(e){return DE(e,r,i)}).then(function(e){return t._compiler.compileModuleAsync(e)})},e.prototype.loadFactory=function(e){var t=h(e.split("#"),2),n=t[0],r=t[1],i="NgFactory";return void 0===r&&(r="default",i=""),System.import(this._config.factoryPathPrefix+n+this._config.factoryPathSuffix).then(function(e){return e[r+i]}).then(function(e){return DE(e,n,r)})},e=u([ov(),l(1,Sd()),c("design:paramtypes",[aE,OE])],e)}(),ME=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(U_),o(function LE(){return null!==ME&&ME.apply(this,arguments)||this},ME);var FE=function FE(e,t){this.name=e,this.callback=t},jE=function(){function e(e,t,n){this.listeners=[],this.parent=null,this._debugContext=n,this.nativeNode=e,t&&t instanceof VE&&t.addChild(this)}return Object.defineProperty(e.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),e}(),VE=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.properties={},i.attributes={},i.classes={},i.styles={},i.childNodes=[],i.nativeElement=t,i}return o(t,e),t.prototype.addChild=function(e){e&&(this.childNodes.push(e),e.parent=this)},t.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);-1!==t&&(e.parent=null,this.childNodes.splice(t,1))},t.prototype.insertChildrenAfter=function(e,t){var n,r=this,i=this.childNodes.indexOf(e);-1!==i&&((n=this.childNodes).splice.apply(n,f([i+1,0],t)),t.forEach(function(t){t.parent&&t.parent.removeChild(t),e.parent=r}))},t.prototype.insertBefore=function(e,t){var n=this.childNodes.indexOf(e);-1===n?this.addChild(t):(t.parent&&t.parent.removeChild(t),t.parent=this,this.childNodes.splice(n,0,t))},t.prototype.query=function(e){return this.queryAll(e)[0]||null},t.prototype.queryAll=function(e){var t=[];return HE(this,e,t),t},t.prototype.queryAllNodes=function(e){var t=[];return BE(this,e,t),t},Object.defineProperty(t.prototype,"children",{get:function(){return this.childNodes.filter(function(e){return e instanceof t})},enumerable:!0,configurable:!0}),t.prototype.triggerEventHandler=function(e,t){this.listeners.forEach(function(n){n.name==e&&n.callback(t)})},t}(jE);function HE(e,t,n){e.childNodes.forEach(function(e){e instanceof VE&&(t(e)&&n.push(e),HE(e,t,n))})}function BE(e,t,n){e instanceof VE&&e.childNodes.forEach(function(e){t(e)&&n.push(e),e instanceof VE&&BE(e,t,n)})}var UE=function(){function e(e){this.nativeNode=e}return Object.defineProperty(e.prototype,"parent",{get:function(){var e=this.nativeNode.parentNode;return e?new qE(e):null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return function e(t){var n=Wg(t);return new Vy(n.lView[pm].data[n.nodeIndex],n.lView)}(this.nativeNode)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentInstance",{get:function(){var e=this.nativeNode;return e&&(function t(e){var t=Qg(e);return void 0===t.component&&(t.component=function n(e,t){var n=t[pm].data[e];return 1&n.flags?t[n.directiveStart]:null}(t.nodeIndex,t.lView)),t.component}(e)||function n(e){for(var t,n=Wg(e).lView;null===n[cm]&&(t=Sy(n));)n=t;return 512&n[hm]?null:n[_m]}(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return function e(t){return Qg(t).lView[_m]}(this.nativeNode)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"listeners",{get:function(){return function e(t){var n=Qg(t).lView,r=n[gm],i=n[pm].cleanup,o=[];if(i&&r)for(var s=0;s<i.length;){var a=i[s++],u=i[s++];if("string"==typeof a){var l=a,c=Om(n[u]),p=r[i[s++]],h=i[s++];t==c&&o.push({element:t,name:l,callback:p,useCapture:"boolean"==typeof h?h:!(h>=0)&&null})}}return o.sort(Gg),o}(this.nativeNode).filter($g)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"references",{get:function(){return function e(t){var n=Wg(t);return void 0===n.localRefs&&(n.localRefs=function r(e,t){var n=e[pm].data[t];if(n&&n.localNames){for(var r={},i=n.index+1,o=0;o<n.localNames.length;o+=2)r[n.localNames[o]]=e[i],i++;return r}return null}(n.lView,n.nodeIndex)),n.localRefs||{}}(this.nativeNode)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"providerTokens",{get:function(){return function e(t){var n=Wg(t,!1);if(!n)return[];for(var r,i=n.lView[pm],o=i.data[n.nodeIndex],s=[],a=o.directiveEnd,u=65535&o.providerIndexes;u<a;u++){var l=i.data[u];void 0!==(r=l).type&&void 0!==r.template&&void 0!==r.declaredInputs&&(l=l.type),s.push(l)}return s}(this.nativeNode)},enumerable:!0,configurable:!0}),e}(),qE=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"nativeElement",{get:function(){return this.nativeNode.nodeType==Node.ELEMENT_NODE?this.nativeNode:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.nativeElement.nodeName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){var e=Wg(this.nativeNode),t=e.lView,n=t[pm].data,r=n[e.nodeIndex],i=function o(e,t,n){for(var r={},i=function o(e,t){for(var n=e-1,r=t[n];"string"==typeof r&&!lm(r);)r=t[--n];return n+1}(e.propertyMetadataStartIndex,n);i<e.propertyMetadataEndIndex;){for(var s=void 0,a=n[i];!lm(a);)s=(s||"")+om(t[i])+n[i],a=n[++i];s=void 0===s?t[i]:s+=t[i];var u=a.split(um),l=u[0];l&&(r[l]=u[1]&&u[2]?u[1]+s+u[2]:s),i++}return r}(r,t,n),s=function u(e,t,n){for(var r={},i=e.directiveEnd,o=n[i];"string"==typeof o;)r[o.split(um)[0]]=t[i],o=n[++i];return r}(r,t,n),l=function c(e){var t,n,r=e.classes,i="";try{for(var o=p(Object.keys(r)),s=o.next();!s.done;s=o.next()){var a=s.value;r[a]&&(i=i?i+" "+a:a)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}(this),h=a({},i,s);return l&&(h.className=h.className?h.className+" "+l:l),h},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e={},t=this.nativeElement;if(t)for(var n=t.attributes,r=0;r<n.length;r++){var i=n[r];e[i.name]=i.value}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classes",{get:function(){var e={},t=this.nativeElement;if(t){var n=Qg(t),r=wy(n.nodeIndex,n.lView);if(r){for(var i=10;i<r.length;i+=4)if(vg(r,i)){var o=yg(r,i),s=mg(r,i);"boolean"==typeof s&&(e[o]=s)}}else{var a=t.classList;for(i=0;i<a.length;i++)e[a[i]]=!0}}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"styles",{get:function(){var e={},t=this.nativeElement;if(t){var n=Qg(t),r=wy(n.nodeIndex,n.lView);if(r){for(var i=10;i<r.length;i+=4)if(!vg(r,i)){var o=yg(r,i),s=mg(r,i);null!==s&&(e[o]=s)}}else{var a=t.style;for(i=0;i<a.length;i++){var u=a.item(i);e[u]=a.getPropertyValue(u)}}}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){for(var e=this.nativeNode.childNodes,t=[],n=0;n<e.length;n++)t.push(GE(e[n]));return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){var e=this.nativeElement;if(!e)return[];for(var t=e.children,n=[],r=0;r<t.length;r++)n.push(GE(t[r]));return n},enumerable:!0,configurable:!0}),t.prototype.query=function(e){return this.queryAll(e)[0]||null},t.prototype.queryAll=function(e){var t=[];return KE(this,e,t,!0),t},t.prototype.queryAllNodes=function(e){var t=[];return KE(this,e,t,!1),t},t.prototype.triggerEventHandler=function(e,t){this.listeners.forEach(function(n){n.name===e&&n.callback(t)})},t}(UE);function KE(e,t,n,r){var i=Wg(e.nativeNode);zE(i.lView[pm].data[i.nodeIndex],i.lView,t,n,r,e.nativeNode)}function zE(e,t,n,r,i,o){var s,a;if(3===e.type||4===e.type){QE(Lm(e,t),n,r,i,o),Vm(e)?(c=jm(e.index,t))&&c[pm].firstChild&&zE(c[pm].firstChild,c,n,r,i,o):e.child&&zE(e.child,t,n,r,i,o);var u=t[e.index];Dm(u)&&WE(u,n,r,i,o)}else if(0===e.type){var l=t[e.index];QE(l[Pm],n,r,i,o),WE(l,n,r,i,o)}else if(1===e.type){var c,h=(c=Cy(t))[mm].projection[e.projection];if(Array.isArray(h))try{for(var f=p(h),d=f.next();!d.done;d=f.next())QE(d.value,n,r,i,o)}catch(e){s={error:e}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(s)throw s.error}}else if(h){var v=c[fm];zE(v[pm].data[h.index],v,n,r,i,o)}}else e.child&&zE(e.child,t,n,r,i,o);var m=2&e.flags?e.projectionNext:e.next;m&&zE(m,t,n,r,i,o)}function WE(e,t,n,r,i){for(var o=0;o<e[Im].length;o++){var s=e[Im][o];zE(s[pm].node,s,t,n,r,i)}}function QE(e,t,n,r,i){if(i!==e){var o=XE(e);o&&(!r||o instanceof qE)&&t(o)&&n.push(o)}}var $E=new Map;function GE(e){return e instanceof Node?e.nodeType==Node.ELEMENT_NODE?new qE(e):new UE(e):null}var XE=function YE(e){return $E.get(e)||null};function ZE(e){$E.set(e.nativeNode,e)}!function JE(e,t,n){void 0===n&&(n=[]);new uv("Platform: "+t)}(0,"core",[{provide:Yx,useValue:"unknown"},{provide:kE,deps:[dv]},{provide:TE,deps:[]},{provide:Jx,deps:[]}]);
|
|
1649
1649
|
/**
|
|
1650
1650
|
* @license
|
|
1651
1651
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1660,7 +1660,7 @@ function t(e,n){return function t(r){let i;if(i="function"==typeof e?e:function
|
|
|
1660
1660
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1661
1661
|
* found in the LICENSE file at https://angular.io/license
|
|
1662
1662
|
*/
|
|
1663
|
-
var
|
|
1663
|
+
var eS,tS=new uv("LocaleId");new uv("Translations"),new uv("TranslationsFormat"),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"}(eS||(eS={}));var nS,rS=[{provide:PE,useClass:PE,deps:[gE,Jx,dv,qy,v_,Qx]},{provide:Aw,deps:[gE],useFactory:function iS(e){var t=[];return e.onStable.subscribe(function(){for(;t.length;)t.pop()()}),function(e){t.push(e)}}},{provide:Qx,useClass:Qx,deps:[[new Sd,Wx]]},{provide:aE,useClass:aE,deps:[]},$x,{provide:H_,useFactory:
|
|
1664
1664
|
/**
|
|
1665
1665
|
* @license
|
|
1666
1666
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1668,7 +1668,7 @@ var nS,rS=new uv("LocaleId");new uv("Translations"),new uv("TranslationsFormat")
|
|
|
1668
1668
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1669
1669
|
* found in the LICENSE file at https://angular.io/license
|
|
1670
1670
|
*/
|
|
1671
|
-
function
|
|
1671
|
+
function oS(){return z_},deps:[]},{provide:B_,useFactory:function sS(){return W_},deps:[]},{provide:tS,useFactory:function aS(e){return e||"en-US"},deps:[[new Ed(tS),new Sd,new Td]]}];
|
|
1672
1672
|
/**
|
|
1673
1673
|
* @license
|
|
1674
1674
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1676,21 +1676,21 @@ function aS(){return Q_},deps:[]},{provide:q_,useFactory:function uS(){return G_
|
|
|
1676
1676
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1677
1677
|
* found in the LICENSE file at https://angular.io/license
|
|
1678
1678
|
*/
|
|
1679
|
-
function
|
|
1679
|
+
function uS(e,t,n){var r,i=n.element,o=e.root.selectorOrNode,s=e.renderer;if(e.parent||!o){r=i.name?s.createElement(i.name,i.ns):s.createComment("");var a=Eb(e,t,n);a&&s.appendChild(a,r)}else r=s.selectRootElement(o,!!i.componentRendererType&&i.componentRendererType.encapsulation===Xv.ShadowDom);if(i.attrs)for(var u=0;u<i.attrs.length;u++){var l=h(i.attrs[u],3);s.setAttribute(r,l[1],l[2],l[0])}return r}function lS(e,t,n,r){for(var i=0;i<n.outputs.length;i++){var o=n.outputs[i],s=cS(e,n.nodeIndex,(p=o.eventName,(c=o.target)?c+":"+p:p)),a=o.target,u=e;"component"===o.target&&(a=null,u=t);var l=u.renderer.listen(a||r,o.eventName,s);e.disposables[n.outputIndex+i]=l}var c,p}function cS(e,t,n){return function(r){return mb(e,t,n,r)}}function pS(e,t,n,r){if(!hb(e,t,n,r))return!1;var i=t.bindings[n],o=rb(e,t.nodeIndex),s=o.renderElement,a=i.name;switch(15&i.flags){case 1:!function u(e,t,n,r,i,o){var s=t.securityContext,a=s?e.root.sanitizer.sanitize(s,o):o;a=null!=a?a.toString():null;var u=e.renderer;null!=o?u.setAttribute(n,i,a,r):u.removeAttribute(n,i,r)}(e,i,s,i.ns,a,r);break;case 2:!function l(e,t,n,r){var i=e.renderer;r?i.addClass(t,n):i.removeClass(t,n)}(e,s,a,r);break;case 4:!function c(e,t,n,r,i){var o=e.root.sanitizer.sanitize($y.STYLE,i);if(null!=o){o=o.toString();var s=t.suffix;null!=s&&(o+=s)}else o=null;var a=e.renderer;null!=o?a.setStyle(n,r,o):a.removeStyle(n,r)}(e,i,s,a,r);break;case 8:!function p(e,t,n,r,i){var o=t.securityContext,s=o?e.root.sanitizer.sanitize(o,i):i;e.renderer.setProperty(n,r,s)}
|
|
1680
1680
|
/**
|
|
1681
1681
|
* @license
|
|
1682
1682
|
* Copyright Google Inc. All Rights Reserved.
|
|
1683
1683
|
*
|
|
1684
1684
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1685
1685
|
* found in the LICENSE file at https://angular.io/license
|
|
1686
|
-
*/(33554432&t.flags&&32&i.flags?o.componentView:e,i,s,a,r)}return!0}function
|
|
1686
|
+
*/(33554432&t.flags&&32&i.flags?o.componentView:e,i,s,a,r)}return!0}function hS(e){for(var t=e.def.nodeMatchedQueries;e.parent&&wb(e);){var n=e.parentNodeDef;e=e.parent;for(var r=n.nodeIndex+n.childCount,i=0;i<=r;i++)67108864&(o=e.def.nodes[i]).flags&&536870912&o.flags&&(o.query.filterId&t)===o.query.filterId&&sb(e,i).setDirty(),!(1&o.flags&&i+o.childCount<n.nodeIndex)&&67108864&o.childFlags&&536870912&o.childFlags||(i+=o.childCount)}if(134217728&e.def.nodeFlags)for(i=0;i<e.def.nodes.length;i++){var o;134217728&(o=e.def.nodes[i]).flags&&536870912&o.flags&&sb(e,i).setDirty(),i+=o.childCount}}function fS(e,t){var n=sb(e,t.nodeIndex);if(n.dirty){var r,i=void 0;if(67108864&t.flags){var o=t.parent.parent;i=dS(e,o.nodeIndex,o.nodeIndex+o.childCount,t.query,[]),r=ib(e,t.parent.nodeIndex).instance}else 134217728&t.flags&&(i=dS(e,0,e.def.nodes.length-1,t.query,[]),r=e.component);n.reset(i);for(var s=t.query.bindings,a=!1,u=0;u<s.length;u++){var l=s[u],c=void 0;switch(l.bindingType){case 0:c=n.first;break;case 1:c=n,a=!0}r[l.propName]=c}a&&n.notifyOnChanges()}}function dS(e,t,n,r,i){for(var o=t;o<=n;o++){var s=e.def.nodes[o],a=s.matchedQueries[r.id];if(null!=a&&i.push(vS(e,s,a)),1&s.flags&&s.element.template&&(s.element.template.nodeMatchedQueries&r.filterId)===r.filterId){var u=rb(e,o);if((s.childMatchedQueries&r.filterId)===r.filterId&&(dS(e,o+1,o+s.childCount,r,i),o+=s.childCount),16777216&s.flags)for(var l=u.viewContainer._embeddedViews,c=0;c<l.length;c++){var p=l[c],h=yb(p);h&&h===u&&dS(p,0,p.def.nodes.length-1,r,i)}var f=u.template._projectedViews;if(f)for(c=0;c<f.length;c++){var d=f[c];dS(d,0,d.def.nodes.length-1,r,i)}}(s.childMatchedQueries&r.filterId)!==r.filterId&&(o+=s.childCount)}return i}function vS(e,t,n){if(null!=n)switch(n){case 1:return rb(e,t.nodeIndex).renderElement;case 0:return new x_(rb(e,t.nodeIndex).renderElement);case 2:return rb(e,t.nodeIndex).template;case 3:return rb(e,t.nodeIndex).viewContainer;case 4:return ib(e,t.nodeIndex).instance}}
|
|
1687
1687
|
/**
|
|
1688
1688
|
* @license
|
|
1689
1689
|
* Copyright Google Inc. All Rights Reserved.
|
|
1690
1690
|
*
|
|
1691
1691
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1692
1692
|
* found in the LICENSE file at https://angular.io/license
|
|
1693
|
-
*/function
|
|
1693
|
+
*/function mS(e,t,n){var r=Eb(e,t,n);r&&kb(e,n.ngContent.index,1,r,null,void 0)}
|
|
1694
1694
|
/**
|
|
1695
1695
|
* @license
|
|
1696
1696
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1705,21 +1705,21 @@ function cS(e,t,n){var r,i=n.element,o=e.root.selectorOrNode,s=e.renderer;if(e.p
|
|
|
1705
1705
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1706
1706
|
* found in the LICENSE file at https://angular.io/license
|
|
1707
1707
|
*/
|
|
1708
|
-
function
|
|
1708
|
+
function yS(e,t,n){var r,i=e.renderer;r=i.createText(n.text.prefix);var o=Eb(e,t,n);return o&&i.appendChild(o,r),{renderText:r}}function gS(e,t){return(null!=e?e.toString():"")+t.suffix}
|
|
1709
1709
|
/**
|
|
1710
1710
|
* @license
|
|
1711
1711
|
* Copyright Google Inc. All Rights Reserved.
|
|
1712
1712
|
*
|
|
1713
1713
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1714
1714
|
* found in the LICENSE file at https://angular.io/license
|
|
1715
|
-
*/function
|
|
1715
|
+
*/function _S(e,t,n,r){var i=xS(e.root,e.renderer,e,t,n);return ES(i,e.component,r),SS(i),i}function bS(e,t,n){var r=xS(e,e.renderer,null,null,t);return ES(r,n,n),SS(r),r}function wS(e,t,n,r){var i,o=t.element.componentRendererType;return i=o?e.root.rendererFactory.createRenderer(r,o):e.root.renderer,xS(e.root,i,e,t.element.componentProvider,n)}function xS(e,t,n,r,i){var o=new Array(i.nodes.length),s=i.outputCount?new Array(i.outputCount):null;return{def:i,parent:n,viewContainerParent:null,parentNodeDef:r,context:null,component:null,nodes:o,state:13,root:e,renderer:t,oldValues:new Array(i.bindingCount),disposables:s,initIndex:-1}}function ES(e,t,n){e.component=t,e.context=n}function SS(e){var t;bb(e)&&(t=rb(e.parent,e.parentNodeDef.parent.nodeIndex).renderElement);for(var n=e.def,r=e.nodes,i=0;i<n.nodes.length;i++){var o=n.nodes[i];ab.setCurrentNode(e,i);var s=void 0;switch(201347067&o.flags){case 1:var a=uS(e,t,o),u=void 0;if(33554432&o.flags){var l=Cb(o.element.componentView);u=ab.createComponentView(e,o,l,a)}lS(e,u,o,a),s={renderElement:a,componentView:u,viewContainer:null,template:o.element.template?Xb(e,o):void 0},16777216&o.flags&&(s.viewContainer=Wb(e,o,s));break;case 2:s=yS(e,t,o);break;case 512:case 1024:case 2048:case 256:(s=r[i])||4096&o.flags||(s={instance:hw(e,o)});break;case 16:s={instance:fw(e,o)};break;case 16384:(s=r[i])||(s={instance:dw(e,o)}),32768&o.flags&&ES(rb(e,o.parent.nodeIndex).componentView,s.instance,s.instance);break;case 32:case 64:case 128:s={value:void 0};break;case 67108864:case 134217728:s=new Lx;break;case 8:mS(e,t,o),s=void 0}r[i]=s}MS(e,nS.CreateViewNodes),LS(e,201326592,268435456,0)}function CS(e){kS(e),ab.updateDirectives(e,1),OS(e,nS.CheckNoChanges),ab.updateRenderer(e,1),MS(e,nS.CheckNoChanges),e.state&=-97}function TS(e){1&e.state?(e.state&=-2,e.state|=2):e.state&=-3,eb(e,0,256),kS(e),ab.updateDirectives(e,0),OS(e,nS.CheckAndUpdate),LS(e,67108864,536870912,0);var t=eb(e,256,512);xw(e,2097152|(t?1048576:0)),ab.updateRenderer(e,0),MS(e,nS.CheckAndUpdate),LS(e,134217728,536870912,0),xw(e,8388608|((t=eb(e,512,768))?4194304:0)),2&e.def.flags&&(e.state&=-9),e.state&=-97,eb(e,768,1024)}function NS(e,t,n,r,i,o,s,a,u,l,c,p,h){return 0===n?function d(e,t,n,r,i,o,s,a,u,l,c,p){switch(201347067&t.flags){case 1:return function h(e,t,n,r,i,o,s,a,u,l,c,p){var h=t.bindings.length,f=!1;return h>0&&pS(e,t,0,n)&&(f=!0),h>1&&pS(e,t,1,r)&&(f=!0),h>2&&pS(e,t,2,i)&&(f=!0),h>3&&pS(e,t,3,o)&&(f=!0),h>4&&pS(e,t,4,s)&&(f=!0),h>5&&pS(e,t,5,a)&&(f=!0),h>6&&pS(e,t,6,u)&&(f=!0),h>7&&pS(e,t,7,l)&&(f=!0),h>8&&pS(e,t,8,c)&&(f=!0),h>9&&pS(e,t,9,p)&&(f=!0),f}(e,t,n,r,i,o,s,a,u,l,c,p);case 2:return function f(e,t,n,r,i,o,s,a,u,l,c,p){var h=!1,f=t.bindings,d=f.length;if(d>0&&hb(e,t,0,n)&&(h=!0),d>1&&hb(e,t,1,r)&&(h=!0),d>2&&hb(e,t,2,i)&&(h=!0),d>3&&hb(e,t,3,o)&&(h=!0),d>4&&hb(e,t,4,s)&&(h=!0),d>5&&hb(e,t,5,a)&&(h=!0),d>6&&hb(e,t,6,u)&&(h=!0),d>7&&hb(e,t,7,l)&&(h=!0),d>8&&hb(e,t,8,c)&&(h=!0),d>9&&hb(e,t,9,p)&&(h=!0),h){var v=t.text.prefix;d>0&&(v+=gS(n,f[0])),d>1&&(v+=gS(r,f[1])),d>2&&(v+=gS(i,f[2])),d>3&&(v+=gS(o,f[3])),d>4&&(v+=gS(s,f[4])),d>5&&(v+=gS(a,f[5])),d>6&&(v+=gS(u,f[6])),d>7&&(v+=gS(l,f[7])),d>8&&(v+=gS(c,f[8])),d>9&&(v+=gS(p,f[9]));var m=nb(e,t.nodeIndex).renderText;e.renderer.setValue(m,v)}return h}(e,t,n,r,i,o,s,a,u,l,c,p);case 16384:return function d(e,t,n,r,i,o,s,a,u,l,c,p){var h=ib(e,t.nodeIndex),f=h.instance,d=!1,v=void 0,m=t.bindings.length;return m>0&&pb(e,t,0,n)&&(d=!0,v=ww(e,h,t,0,n,v)),m>1&&pb(e,t,1,r)&&(d=!0,v=ww(e,h,t,1,r,v)),m>2&&pb(e,t,2,i)&&(d=!0,v=ww(e,h,t,2,i,v)),m>3&&pb(e,t,3,o)&&(d=!0,v=ww(e,h,t,3,o,v)),m>4&&pb(e,t,4,s)&&(d=!0,v=ww(e,h,t,4,s,v)),m>5&&pb(e,t,5,a)&&(d=!0,v=ww(e,h,t,5,a,v)),m>6&&pb(e,t,6,u)&&(d=!0,v=ww(e,h,t,6,u,v)),m>7&&pb(e,t,7,l)&&(d=!0,v=ww(e,h,t,7,l,v)),m>8&&pb(e,t,8,c)&&(d=!0,v=ww(e,h,t,8,c,v)),m>9&&pb(e,t,9,p)&&(d=!0,v=ww(e,h,t,9,p,v)),v&&f.ngOnChanges(v),65536&t.flags&&tb(e,256,t.nodeIndex)&&f.ngOnInit(),262144&t.flags&&f.ngDoCheck(),d}(e,t,n,r,i,o,s,a,u,l,c,p);case 32:case 64:case 128:return function v(e,t,n,r,i,o,s,a,u,l,c,p){var h=t.bindings,f=!1,d=h.length;if(d>0&&hb(e,t,0,n)&&(f=!0),d>1&&hb(e,t,1,r)&&(f=!0),d>2&&hb(e,t,2,i)&&(f=!0),d>3&&hb(e,t,3,o)&&(f=!0),d>4&&hb(e,t,4,s)&&(f=!0),d>5&&hb(e,t,5,a)&&(f=!0),d>6&&hb(e,t,6,u)&&(f=!0),d>7&&hb(e,t,7,l)&&(f=!0),d>8&&hb(e,t,8,c)&&(f=!0),d>9&&hb(e,t,9,p)&&(f=!0),f){var v=ob(e,t.nodeIndex),m=void 0;switch(201347067&t.flags){case 32:m=new Array(h.length),d>0&&(m[0]=n),d>1&&(m[1]=r),d>2&&(m[2]=i),d>3&&(m[3]=o),d>4&&(m[4]=s),d>5&&(m[5]=a),d>6&&(m[6]=u),d>7&&(m[7]=l),d>8&&(m[8]=c),d>9&&(m[9]=p);break;case 64:m={},d>0&&(m[h[0].name]=n),d>1&&(m[h[1].name]=r),d>2&&(m[h[2].name]=i),d>3&&(m[h[3].name]=o),d>4&&(m[h[4].name]=s),d>5&&(m[h[5].name]=a),d>6&&(m[h[6].name]=u),d>7&&(m[h[7].name]=l),d>8&&(m[h[8].name]=c),d>9&&(m[h[9].name]=p);break;case 128:var y=n;switch(d){case 1:m=y.transform(n);break;case 2:m=y.transform(r);break;case 3:m=y.transform(r,i);break;case 4:m=y.transform(r,i,o);break;case 5:m=y.transform(r,i,o,s);break;case 6:m=y.transform(r,i,o,s,a);break;case 7:m=y.transform(r,i,o,s,a,u);break;case 8:m=y.transform(r,i,o,s,a,u,l);break;case 9:m=y.transform(r,i,o,s,a,u,l,c);break;case 10:m=y.transform(r,i,o,s,a,u,l,c,p)}}v.value=m}return f}(e,t,n,r,i,o,s,a,u,l,c,p);default:throw"unreachable"}}(e,t,r,i,o,s,a,u,l,c,p,h):function v(e,t,n){switch(201347067&t.flags){case 1:return function r(e,t,n){for(var r=!1,i=0;i<n.length;i++)pS(e,t,i,n[i])&&(r=!0);return r}(e,t,n);case 2:return function i(e,t,n){for(var r=t.bindings,i=!1,o=0;o<n.length;o++)hb(e,t,o,n[o])&&(i=!0);if(i){var s="";for(o=0;o<n.length;o++)s+=gS(n[o],r[o]);s=t.text.prefix+s;var a=nb(e,t.nodeIndex).renderText;e.renderer.setValue(a,s)}return i}(e,t,n);case 16384:return function o(e,t,n){for(var r=ib(e,t.nodeIndex),i=r.instance,o=!1,s=void 0,a=0;a<n.length;a++)pb(e,t,a,n[a])&&(o=!0,s=ww(e,r,t,a,n[a],s));return s&&i.ngOnChanges(s),65536&t.flags&&tb(e,256,t.nodeIndex)&&i.ngOnInit(),262144&t.flags&&i.ngDoCheck(),o}(e,t,n);case 32:case 64:case 128:return function s(e,t,n){for(var r=t.bindings,i=!1,o=0;o<n.length;o++)hb(e,t,o,n[o])&&(i=!0);if(i){var s=ob(e,t.nodeIndex),a=void 0;switch(201347067&t.flags){case 32:a=n;break;case 64:for(a={},o=0;o<n.length;o++)a[r[o].name]=n[o];break;case 128:var u=n[0],l=n.slice(1);a=u.transform.apply(u,f(l))}s.value=a}return i}(e,t,n);default:throw"unreachable"}}(e,t,r)}function kS(e){var t=e.def;if(4&t.nodeFlags)for(var n=0;n<t.nodes.length;n++){var r=t.nodes[n];if(4&r.flags){var i=rb(e,n).template._projectedViews;if(i)for(var o=0;o<i.length;o++){var s=i[o];s.state|=32,vb(s,e)}}else 0==(4&r.childFlags)&&(n+=r.childCount)}}function AS(e,t,n,r,i,o,s,a,u,l,c,p,h){return 0===n?function f(e,t,n,r,i,o,s,a,u,l,c,p){var h=t.bindings.length;h>0&&fb(e,t,0,n),h>1&&fb(e,t,1,r),h>2&&fb(e,t,2,i),h>3&&fb(e,t,3,o),h>4&&fb(e,t,4,s),h>5&&fb(e,t,5,a),h>6&&fb(e,t,6,u),h>7&&fb(e,t,7,l),h>8&&fb(e,t,8,c),h>9&&fb(e,t,9,p)}(e,t,r,i,o,s,a,u,l,c,p,h):function d(e,t,n){for(var r=0;r<n.length;r++)fb(e,t,r,n[r])}(e,t,r),!1}function PS(e,t){if(sb(e,t.nodeIndex).dirty)throw Y_(ab.createDebugContext(e,t.nodeIndex),"Query "+t.query.id+" not dirty","Query "+t.query.id+" dirty",0!=(1&e.state))}function IS(e){if(!(128&e.state)){if(OS(e,nS.Destroy),MS(e,nS.Destroy),xw(e,131072),e.disposables)for(var t=0;t<e.disposables.length;t++)e.disposables[t]();!function n(e){if(16&e.state){var t=yb(e);if(t){var n=t.template._projectedViews;n&&(qb(n,n.indexOf(e)),ab.dirtyParentQueries(e))}}}(e),e.renderer.destroyNode&&function r(e){for(var t=e.def.nodes.length,n=0;n<t;n++){var r=e.def.nodes[n];1&r.flags?e.renderer.destroyNode(rb(e,n).renderElement):2&r.flags?e.renderer.destroyNode(nb(e,n).renderText):(67108864&r.flags||134217728&r.flags)&&sb(e,n).destroy()}}(e),bb(e)&&e.renderer.destroy(),e.state|=128}}function MS(e,t){var n=e.def;if(33554432&n.nodeFlags)for(var r=0;r<n.nodes.length;r++){var i=n.nodes[r];33554432&i.flags?RS(rb(e,r).componentView,t):0==(33554432&i.childFlags)&&(r+=i.childCount)}}function OS(e,t){var n=e.def;if(16777216&n.nodeFlags)for(var r=0;r<n.nodes.length;r++){var i=n.nodes[r];if(16777216&i.flags)for(var o=rb(e,r).viewContainer._embeddedViews,s=0;s<o.length;s++)RS(o[s],t);else 0==(16777216&i.childFlags)&&(r+=i.childCount)}}function RS(e,t){var n=e.state;switch(t){case nS.CheckNoChanges:0==(128&n)&&(12==(12&n)?CS(e):64&n&&DS(e,nS.CheckNoChangesProjectedViews));break;case nS.CheckNoChangesProjectedViews:0==(128&n)&&(32&n?CS(e):64&n&&DS(e,t));break;case nS.CheckAndUpdate:0==(128&n)&&(12==(12&n)?TS(e):64&n&&DS(e,nS.CheckAndUpdateProjectedViews));break;case nS.CheckAndUpdateProjectedViews:0==(128&n)&&(32&n?TS(e):64&n&&DS(e,t));break;case nS.Destroy:IS(e);break;case nS.CreateViewNodes:SS(e)}}function DS(e,t){OS(e,t),MS(e,t)}function LS(e,t,n,r){if(e.def.nodeFlags&t&&e.def.nodeFlags&n)for(var i=e.def.nodes.length,o=0;o<i;o++){var s=e.def.nodes[o];if(s.flags&t&&s.flags&n)switch(ab.setCurrentNode(e,s.nodeIndex),r){case 0:fS(e,s);break;case 1:PS(e,s)}s.childFlags&t&&s.childFlags&n||(o+=s.childCount)}}
|
|
1716
1716
|
/**
|
|
1717
1717
|
* @license
|
|
1718
1718
|
* Copyright Google Inc. All Rights Reserved.
|
|
1719
1719
|
*
|
|
1720
1720
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1721
1721
|
* found in the LICENSE file at https://angular.io/license
|
|
1722
|
-
*/!function(){function e(e){}e=u([qx({providers:oS}),c("design:paramtypes",[ME])],e)}(),function(e){e[e.CreateViewNodes=0]="CreateViewNodes",e[e.CheckNoChanges=1]="CheckNoChanges",e[e.CheckNoChangesProjectedViews=2]="CheckNoChangesProjectedViews",e[e.CheckAndUpdate=3]="CheckAndUpdate",e[e.CheckAndUpdateProjectedViews=4]="CheckAndUpdateProjectedViews",e[e.Destroy=5]="Destroy"}(iS||(iS={}));var VS=!1;function HS(e,t,n,r,i,o){var s=i.injector.get(N_);return xS(US(e,i,s,t,n),r,o)}function BS(e,t,n,r,i,o){var s=i.injector.get(N_),a=US(e,i,new bC(s),t,n),u=nC(r);return gC(WS.create,xS,null,[a,u,o])}function US(e,t,n,r,i){var o=t.injector.get(rg),s=t.injector.get(zy),a=n.createRenderer(null,null);return{ngModule:t,injector:e,projectableNodes:r,selectorOrNode:i,sanitizer:o,rendererFactory:n,renderer:a,errorHandler:s}}function qS(e,t,n,r){var i=nC(n);return gC(WS.create,wS,null,[e,t,i,r])}function KS(e,t,n,r){return n=ZS.get(t.element.componentProvider.provider.token)||nC(n),gC(WS.create,ES,null,[e,t,n,r])}function zS(e,t,n,r){return iw(e,t,n,function i(e){var t=function n(e){var t=!1,n=!1;return 0===XS.size?{hasOverrides:t,hasDeprecatedOverrides:n}:(e.providers.forEach(function(e){var r=XS.get(e.token);3840&e.flags&&r&&(t=!0,n=n||r.deprecatedBehavior)}),e.modules.forEach(function(e){YS.forEach(function(r,i){Ad(i).providedIn===e&&(t=!0,n=n||r.deprecatedBehavior)})}),{hasOverrides:t,hasDeprecatedOverrides:n})}(e),r=t.hasDeprecatedOverrides;return t.hasOverrides?(function i(e){for(var t=0;t<e.providers.length;t++){var n=e.providers[t];r&&(n.flags|=4096);var i=XS.get(n.token);i&&(n.flags=-3841&n.flags|i.flags,n.deps=Sb(i.deps),n.value=i.value)}if(YS.size>0){var o=new Set(e.modules);YS.forEach(function(t,n){if(o.has(Ad(n).providedIn)){var i={token:n,flags:t.flags|(r?4096:0),deps:Sb(t.deps),value:t.value,index:e.providers.length};e.providers.push(i),e.providersByKey[hb(n)]=i}})}}(e=e.factory(function(){return cb})),e):e}(r))}var WS,QS,GS,$S,XS=new Map,YS=new Map,ZS=new Map;function JS(e){var t;XS.set(e.token,e),"function"==typeof e.token&&(t=Ad(e.token))&&"function"==typeof t.providedIn&&YS.set(e.token,e)}function eC(e,t){var n=Nb(function r(e){return e.viewDefFactory}(t)),i=Nb(n.nodes[0].element.componentView);ZS.set(e,i)}function tC(){XS.clear(),YS.clear(),ZS.clear()}function nC(e){if(0===XS.size)return e;var t=function n(e){for(var t=[],n=null,r=0;r<e.nodes.length;r++){var i=e.nodes[r];1&i.flags&&(n=i),n&&3840&i.flags&&XS.has(i.provider.token)&&(t.push(n.nodeIndex),n=null)}return t}(e);if(0===t.length)return e;e=e.factory(function(){return cb});for(var r=0;r<t.length;r++)i(e,t[r]);return e;function i(e,t){for(var n=t+1;n<e.nodes.length;n++){var r=e.nodes[n];if(1&r.flags)return;if(3840&r.flags){var i=r.provider,o=XS.get(i.token);o&&(r.flags=-3841&r.flags|o.flags,i.deps=Sb(o.deps),i.value=o.value)}}}}function rC(e,t,n,r,i,o,s,a,u,l,c,p,h){var f=e.def.nodes[t];return AS(e,f,n,r,i,o,s,a,u,l,c,p,h),224&f.flags?ab(e,t).value:void 0}function iC(e,t,n,r,i,o,s,a,u,l,c,p,h){var f=e.def.nodes[t];return IS(e,f,n,r,i,o,s,a,u,l,c,p,h),224&f.flags?ab(e,t).value:void 0}function oC(e){return gC(WS.detectChanges,kS,null,[e])}function sC(e){return gC(WS.checkNoChanges,NS,null,[e])}function aC(e){return gC(WS.destroy,OS,null,[e])}function uC(e,t){GS=e,$S=t}function lC(e,t,n,r){return uC(e,t),gC(WS.handleEvent,e.def.handleEvent,null,[e,t,n,r])}function cC(e,t){if(128&e.state)throw tb(WS[QS]);return uC(e,dC(e,0)),e.def.updateDirectives(function n(e,r,i){for(var o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];var a=e.def.nodes[r];return 0===t?hC(e,a,i,o):fC(e,a,i,o),16384&a.flags&&uC(e,dC(e,r)),224&a.flags?ab(e,a.nodeIndex).value:void 0},e)}function pC(e,t){if(128&e.state)throw tb(WS[QS]);return uC(e,vC(e,0)),e.def.updateRenderer(function n(e,r,i){for(var o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];var a=e.def.nodes[r];return 0===t?hC(e,a,i,o):fC(e,a,i,o),3&a.flags&&uC(e,vC(e,r)),224&a.flags?ab(e,a.nodeIndex).value:void 0},e)}function hC(e,t,n,r){if(AS.apply(void 0,f([e,t,n],r))){var i=1===n?r[0]:r;if(16384&t.flags){for(var o={},s=0;s<t.bindings.length;s++){var a=t.bindings[s],u=i[s];8&a.flags&&(o[(d=a.nonMinifiedName,"ng-reflect-"+function l(e){return e.replace(ig,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"-"+e[1].toLowerCase()})}(d.replace(/[$@]/g,"_")))]=og(u))}var c=t.parent,p=ob(e,c.nodeIndex).renderElement;if(c.element.name)for(var h in o)null!=(u=o[h])?e.renderer.setAttribute(p,h,u):e.renderer.removeAttribute(p,h);else e.renderer.setValue(p,"bindings="+JSON.stringify(o,null,2))}}var d}function fC(e,t,n,r){IS.apply(void 0,f([e,t,n],r))}function dC(e,t){for(var n=t;n<e.def.nodes.length;n++){var r=e.def.nodes[n];if(16384&r.flags&&r.bindings&&r.bindings.length)return n}return null}function vC(e,t){for(var n=t;n<e.def.nodes.length;n++){var r=e.def.nodes[n];if(3&r.flags&&r.bindings&&r.bindings.length)return n}return null}!function(e){e[e.create=0]="create",e[e.detectChanges=1]="detectChanges",e[e.checkNoChanges=2]="checkNoChanges",e[e.destroy=3]="destroy",e[e.handleEvent=4]="handleEvent"}(WS||(WS={}));var mC=function(){function e(e,t){this.view=e,this.nodeIndex=t,null==t&&(this.nodeIndex=t=0),this.nodeDef=e.def.nodes[t];for(var n=this.nodeDef,r=e;n&&0==(1&n.flags);)n=n.parent;if(!n)for(;!n&&r;)n=bb(r),r=r.parent;this.elDef=n,this.elView=r}return Object.defineProperty(e.prototype,"elOrCompView",{get:function(){return ob(this.elView,this.elDef.nodeIndex).componentView||this.view},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return ew(this.elView,this.elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"component",{get:function(){return this.elOrCompView.component},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this.elOrCompView.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"providerTokens",{get:function(){var e=[];if(this.elDef)for(var t=this.elDef.nodeIndex+1;t<=this.elDef.nodeIndex+this.elDef.childCount;t++){var n=this.elView.def.nodes[t];20224&n.flags&&e.push(n.provider.token),t+=n.childCount}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"references",{get:function(){var e={};if(this.elDef){yC(this.elView,this.elDef,e);for(var t=this.elDef.nodeIndex+1;t<=this.elDef.nodeIndex+this.elDef.childCount;t++){var n=this.elView.def.nodes[t];20224&n.flags&&yC(this.elView,n,e),t+=n.childCount}}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentRenderElement",{get:function(){var e=function t(e){for(;e&&!xb(e);)e=e.parent;return e.parent?ob(e.parent,bb(e).nodeIndex):null}(this.elOrCompView);return e?e.renderElement:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderNode",{get:function(){return 2&this.nodeDef.flags?wb(this.view,this.nodeDef):wb(this.elView,this.elDef)},enumerable:!0,configurable:!0}),e.prototype.logError=function(e){for(var t,n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];2&this.nodeDef.flags?(t=this.view.def,n=this.nodeDef.nodeIndex):(t=this.elView.def,n=this.elDef.nodeIndex);var o=function s(e,t){for(var n=-1,r=0;r<=t;r++)3&e.nodes[r].flags&&n++;return n}(t,n),a=-1;t.factory(function(){var t;return++a===o?(t=e.error).bind.apply(t,f([e],r)):cb}),a<o&&(e.error("Illegal state: the ViewDefinitionFactory did not call the logger!"),e.error.apply(e,f(r)))},e}();function yC(e,t,n){for(var r in t.references)n[r]=yS(e,t,t.references[r])}function gC(e,t,n,r){var i=QS,o=GS,s=$S;try{QS=e;var a=t.apply(n,r);return GS=o,$S=s,QS=i,a}catch(e){if(function u(e){return!!Uy(e)}(e)||!GS)throw e;throw function l(e,t){return e instanceof Error||(e=new Error(e.toString())),eb(e,t),e}(e,_C())}}function _C(){return GS?new mC(GS,$S):null}var bC=function(){function e(e){this.delegate=e}return e.prototype.createRenderer=function(e,t){return new wC(this.delegate.createRenderer(e,t))},e.prototype.begin=function(){this.delegate.begin&&this.delegate.begin()},e.prototype.end=function(){this.delegate.end&&this.delegate.end()},e.prototype.whenRenderingDone=function(){return this.delegate.whenRenderingDone?this.delegate.whenRenderingDone():Promise.resolve(null)},e}(),wC=function(){function e(e){this.delegate=e,this.debugContextFactory=_C,this.data=this.delegate.data}return e.prototype.createDebugContext=function(e){return this.debugContextFactory(e)},e.prototype.destroyNode=function(e){!function t(e){XE.delete(e.nativeNode)}(ZE(e)),this.delegate.destroyNode&&this.delegate.destroyNode(e)},e.prototype.destroy=function(){this.delegate.destroy()},e.prototype.createElement=function(e,t){var n=this.delegate.createElement(e,t),r=this.createDebugContext(n);if(r){var i=new BE(n,null,r);i.name=e,eS(i)}return n},e.prototype.createComment=function(e){var t=this.delegate.createComment(e),n=this.createDebugContext(t);return n&&eS(new HE(t,null,n)),t},e.prototype.createText=function(e){var t=this.delegate.createText(e),n=this.createDebugContext(t);return n&&eS(new HE(t,null,n)),t},e.prototype.appendChild=function(e,t){var n=ZE(e),r=ZE(t);n&&r&&n instanceof BE&&n.addChild(r),this.delegate.appendChild(e,t)},e.prototype.insertBefore=function(e,t,n){var r=ZE(e),i=ZE(t),o=ZE(n);r&&i&&r instanceof BE&&r.insertBefore(o,i),this.delegate.insertBefore(e,t,n)},e.prototype.removeChild=function(e,t){var n=ZE(e),r=ZE(t);n&&r&&n instanceof BE&&n.removeChild(r),this.delegate.removeChild(e,t)},e.prototype.selectRootElement=function(e,t){var n=this.delegate.selectRootElement(e,t),r=_C();return r&&eS(new BE(n,null,r)),n},e.prototype.setAttribute=function(e,t,n,r){var i=ZE(e);i&&i instanceof BE&&(i.attributes[r?r+":"+t:t]=n),this.delegate.setAttribute(e,t,n,r)},e.prototype.removeAttribute=function(e,t,n){var r=ZE(e);r&&r instanceof BE&&(r.attributes[n?n+":"+t:t]=null),this.delegate.removeAttribute(e,t,n)},e.prototype.addClass=function(e,t){var n=ZE(e);n&&n instanceof BE&&(n.classes[t]=!0),this.delegate.addClass(e,t)},e.prototype.removeClass=function(e,t){var n=ZE(e);n&&n instanceof BE&&(n.classes[t]=!1),this.delegate.removeClass(e,t)},e.prototype.setStyle=function(e,t,n,r){var i=ZE(e);i&&i instanceof BE&&(i.styles[t]=n),this.delegate.setStyle(e,t,n,r)},e.prototype.removeStyle=function(e,t,n){var r=ZE(e);r&&r instanceof BE&&(r.styles[t]=null),this.delegate.removeStyle(e,t,n)},e.prototype.setProperty=function(e,t,n){var r=ZE(e);r&&r instanceof BE&&(r.properties[t]=n),this.delegate.setProperty(e,t,n)},e.prototype.listen=function(e,t,n){if("string"!=typeof e){var r=ZE(e);r&&r.listeners.push(new VE(t,n))}return this.delegate.listen(e,t,n)},e.prototype.parentNode=function(e){return this.delegate.parentNode(e)},e.prototype.nextSibling=function(e){return this.delegate.nextSibling(e)},e.prototype.setValue=function(e,t){return this.delegate.setValue(e,t)},e}();!function(e){function t(t,n,r){var i=e.call(this)||this;return i.moduleType=t,i._bootstrapComponents=n,i._ngModuleDefFactory=r,i}o(t,e),t.prototype.create=function(e){!function t(){if(!VS){VS=!0;var e=Qy()?function t(){return{setCurrentNode:uC,createRootView:BS,createEmbeddedView:qS,createComponentView:KS,createNgModuleRef:zS,overrideProvider:JS,overrideComponentView:eC,clearOverrides:tC,checkAndUpdateView:oC,checkNoChangesView:sC,destroyView:aC,createDebugContext:function(e,t){return new mC(e,t)},handleEvent:lC,updateDirectives:cC,updateRenderer:pC}}():function n(){return{setCurrentNode:function(){},createRootView:HS,createEmbeddedView:wS,createComponentView:ES,createNgModuleRef:iw,overrideProvider:cb,overrideComponentView:cb,clearOverrides:cb,checkAndUpdateView:kS,checkNoChangesView:NS,destroyView:OS,createDebugContext:function(e,t){return new mC(e,t)},handleEvent:function(e,t,n,r){return e.def.handleEvent(e,t,n,r)},updateDirectives:function(e,t){return e.def.updateDirectives(0===t?rC:iC,e)},updateRenderer:function(e,t){return e.def.updateRenderer(0===t?rC:iC,e)}}}();lb.setCurrentNode=e.setCurrentNode,lb.createRootView=e.createRootView,lb.createEmbeddedView=e.createEmbeddedView,lb.createComponentView=e.createComponentView,lb.createNgModuleRef=e.createNgModuleRef,lb.overrideProvider=e.overrideProvider,lb.overrideComponentView=e.overrideComponentView,lb.clearOverrides=e.clearOverrides,lb.checkAndUpdateView=e.checkAndUpdateView,lb.checkNoChangesView=e.checkNoChangesView,lb.destroyView=e.destroyView,lb.resolveDep=ww,lb.createDebugContext=e.createDebugContext,lb.handleEvent=e.handleEvent,lb.updateDirectives=e.updateDirectives,lb.updateRenderer=e.updateRenderer,lb.dirtyParentQueries=dS}}();var n=
|
|
1722
|
+
*/!function(){function e(e){}e=u([Bx({providers:rS}),c("design:paramtypes",[PE])],e)}(),function(e){e[e.CreateViewNodes=0]="CreateViewNodes",e[e.CheckNoChanges=1]="CheckNoChanges",e[e.CheckNoChangesProjectedViews=2]="CheckNoChangesProjectedViews",e[e.CheckAndUpdate=3]="CheckAndUpdate",e[e.CheckAndUpdateProjectedViews=4]="CheckAndUpdateProjectedViews",e[e.Destroy=5]="Destroy"}(nS||(nS={}));var FS=!1;function jS(e,t,n,r,i,o){var s=i.injector.get(C_);return bS(HS(e,i,s,t,n),r,o)}function VS(e,t,n,r,i,o){var s=i.injector.get(C_),a=HS(e,i,new gC(s),t,n),u=eC(r);return mC(KS.create,bS,null,[a,u,o])}function HS(e,t,n,r,i){var o=t.injector.get(tg),s=t.injector.get(qy),a=n.createRenderer(null,null);return{ngModule:t,injector:e,projectableNodes:r,selectorOrNode:i,sanitizer:o,rendererFactory:n,renderer:a,errorHandler:s}}function BS(e,t,n,r){var i=eC(n);return mC(KS.create,_S,null,[e,t,i,r])}function US(e,t,n,r){return n=XS.get(t.element.componentProvider.provider.token)||eC(n),mC(KS.create,wS,null,[e,t,n,r])}function qS(e,t,n,r){return nw(e,t,n,function i(e){var t=function n(e){var t=!1,n=!1;return 0===$S.size?{hasOverrides:t,hasDeprecatedOverrides:n}:(e.providers.forEach(function(e){var r=$S.get(e.token);3840&e.flags&&r&&(t=!0,n=n||r.deprecatedBehavior)}),e.modules.forEach(function(e){GS.forEach(function(r,i){Ad(i).providedIn===e&&(t=!0,n=n||r.deprecatedBehavior)})}),{hasOverrides:t,hasDeprecatedOverrides:n})}(e),r=t.hasDeprecatedOverrides;return t.hasOverrides?(function i(e){for(var t=0;t<e.providers.length;t++){var n=e.providers[t];r&&(n.flags|=4096);var i=$S.get(n.token);i&&(n.flags=-3841&n.flags|i.flags,n.deps=xb(i.deps),n.value=i.value)}if(GS.size>0){var o=new Set(e.modules);GS.forEach(function(t,n){if(o.has(Ad(n).providedIn)){var i={token:n,flags:t.flags|(r?4096:0),deps:xb(t.deps),value:t.value,index:e.providers.length};e.providers.push(i),e.providersByKey[cb(n)]=i}})}}(e=e.factory(function(){return ub})),e):e}(r))}var KS,zS,WS,QS,$S=new Map,GS=new Map,XS=new Map;function YS(e){var t;$S.set(e.token,e),"function"==typeof e.token&&(t=Ad(e.token))&&"function"==typeof t.providedIn&&GS.set(e.token,e)}function ZS(e,t){var n=Cb(function r(e){return e.viewDefFactory}(t)),i=Cb(n.nodes[0].element.componentView);XS.set(e,i)}function JS(){$S.clear(),GS.clear(),XS.clear()}function eC(e){if(0===$S.size)return e;var t=function n(e){for(var t=[],n=null,r=0;r<e.nodes.length;r++){var i=e.nodes[r];1&i.flags&&(n=i),n&&3840&i.flags&&$S.has(i.provider.token)&&(t.push(n.nodeIndex),n=null)}return t}(e);if(0===t.length)return e;e=e.factory(function(){return ub});for(var r=0;r<t.length;r++)i(e,t[r]);return e;function i(e,t){for(var n=t+1;n<e.nodes.length;n++){var r=e.nodes[n];if(1&r.flags)return;if(3840&r.flags){var i=r.provider,o=$S.get(i.token);o&&(r.flags=-3841&r.flags|o.flags,i.deps=xb(o.deps),i.value=o.value)}}}}function tC(e,t,n,r,i,o,s,a,u,l,c,p,h){var f=e.def.nodes[t];return NS(e,f,n,r,i,o,s,a,u,l,c,p,h),224&f.flags?ob(e,t).value:void 0}function nC(e,t,n,r,i,o,s,a,u,l,c,p,h){var f=e.def.nodes[t];return AS(e,f,n,r,i,o,s,a,u,l,c,p,h),224&f.flags?ob(e,t).value:void 0}function rC(e){return mC(KS.detectChanges,TS,null,[e])}function iC(e){return mC(KS.checkNoChanges,CS,null,[e])}function oC(e){return mC(KS.destroy,IS,null,[e])}function sC(e,t){WS=e,QS=t}function aC(e,t,n,r){return sC(e,t),mC(KS.handleEvent,e.def.handleEvent,null,[e,t,n,r])}function uC(e,t){if(128&e.state)throw J_(KS[zS]);return sC(e,hC(e,0)),e.def.updateDirectives(function n(e,r,i){for(var o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];var a=e.def.nodes[r];return 0===t?cC(e,a,i,o):pC(e,a,i,o),16384&a.flags&&sC(e,hC(e,r)),224&a.flags?ob(e,a.nodeIndex).value:void 0},e)}function lC(e,t){if(128&e.state)throw J_(KS[zS]);return sC(e,fC(e,0)),e.def.updateRenderer(function n(e,r,i){for(var o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];var a=e.def.nodes[r];return 0===t?cC(e,a,i,o):pC(e,a,i,o),3&a.flags&&sC(e,fC(e,r)),224&a.flags?ob(e,a.nodeIndex).value:void 0},e)}function cC(e,t,n,r){if(NS.apply(void 0,f([e,t,n],r))){var i=1===n?r[0]:r;if(16384&t.flags){for(var o={},s=0;s<t.bindings.length;s++){var a=t.bindings[s],u=i[s];8&a.flags&&(o[(d=a.nonMinifiedName,"ng-reflect-"+function l(e){return e.replace(ng,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"-"+e[1].toLowerCase()})}(d.replace(/[$@]/g,"_")))]=rg(u))}var c=t.parent,p=rb(e,c.nodeIndex).renderElement;if(c.element.name)for(var h in o)null!=(u=o[h])?e.renderer.setAttribute(p,h,u):e.renderer.removeAttribute(p,h);else e.renderer.setValue(p,"bindings="+JSON.stringify(o,null,2))}}var d}function pC(e,t,n,r){AS.apply(void 0,f([e,t,n],r))}function hC(e,t){for(var n=t;n<e.def.nodes.length;n++){var r=e.def.nodes[n];if(16384&r.flags&&r.bindings&&r.bindings.length)return n}return null}function fC(e,t){for(var n=t;n<e.def.nodes.length;n++){var r=e.def.nodes[n];if(3&r.flags&&r.bindings&&r.bindings.length)return n}return null}!function(e){e[e.create=0]="create",e[e.detectChanges=1]="detectChanges",e[e.checkNoChanges=2]="checkNoChanges",e[e.destroy=3]="destroy",e[e.handleEvent=4]="handleEvent"}(KS||(KS={}));var dC=function(){function e(e,t){this.view=e,this.nodeIndex=t,null==t&&(this.nodeIndex=t=0),this.nodeDef=e.def.nodes[t];for(var n=this.nodeDef,r=e;n&&0==(1&n.flags);)n=n.parent;if(!n)for(;!n&&r;)n=gb(r),r=r.parent;this.elDef=n,this.elView=r}return Object.defineProperty(e.prototype,"elOrCompView",{get:function(){return rb(this.elView,this.elDef.nodeIndex).componentView||this.view},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return Zb(this.elView,this.elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"component",{get:function(){return this.elOrCompView.component},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this.elOrCompView.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"providerTokens",{get:function(){var e=[];if(this.elDef)for(var t=this.elDef.nodeIndex+1;t<=this.elDef.nodeIndex+this.elDef.childCount;t++){var n=this.elView.def.nodes[t];20224&n.flags&&e.push(n.provider.token),t+=n.childCount}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"references",{get:function(){var e={};if(this.elDef){vC(this.elView,this.elDef,e);for(var t=this.elDef.nodeIndex+1;t<=this.elDef.nodeIndex+this.elDef.childCount;t++){var n=this.elView.def.nodes[t];20224&n.flags&&vC(this.elView,n,e),t+=n.childCount}}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentRenderElement",{get:function(){var e=function t(e){for(;e&&!bb(e);)e=e.parent;return e.parent?rb(e.parent,gb(e).nodeIndex):null}(this.elOrCompView);return e?e.renderElement:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderNode",{get:function(){return 2&this.nodeDef.flags?_b(this.view,this.nodeDef):_b(this.elView,this.elDef)},enumerable:!0,configurable:!0}),e.prototype.logError=function(e){for(var t,n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];2&this.nodeDef.flags?(t=this.view.def,n=this.nodeDef.nodeIndex):(t=this.elView.def,n=this.elDef.nodeIndex);var o=function s(e,t){for(var n=-1,r=0;r<=t;r++)3&e.nodes[r].flags&&n++;return n}(t,n),a=-1;t.factory(function(){var t;return++a===o?(t=e.error).bind.apply(t,f([e],r)):ub}),a<o&&(e.error("Illegal state: the ViewDefinitionFactory did not call the logger!"),e.error.apply(e,f(r)))},e}();function vC(e,t,n){for(var r in t.references)n[r]=vS(e,t,t.references[r])}function mC(e,t,n,r){var i=zS,o=WS,s=QS;try{zS=e;var a=t.apply(n,r);return WS=o,QS=s,zS=i,a}catch(e){if(function u(e){return!!Hy(e)}(e)||!WS)throw e;throw function l(e,t){return e instanceof Error||(e=new Error(e.toString())),Z_(e,t),e}(e,yC())}}function yC(){return WS?new dC(WS,QS):null}var gC=function(){function e(e){this.delegate=e}return e.prototype.createRenderer=function(e,t){return new _C(this.delegate.createRenderer(e,t))},e.prototype.begin=function(){this.delegate.begin&&this.delegate.begin()},e.prototype.end=function(){this.delegate.end&&this.delegate.end()},e.prototype.whenRenderingDone=function(){return this.delegate.whenRenderingDone?this.delegate.whenRenderingDone():Promise.resolve(null)},e}(),_C=function(){function e(e){this.delegate=e,this.debugContextFactory=yC,this.data=this.delegate.data}return e.prototype.createDebugContext=function(e){return this.debugContextFactory(e)},e.prototype.destroyNode=function(e){!function t(e){$E.delete(e.nativeNode)}(XE(e)),this.delegate.destroyNode&&this.delegate.destroyNode(e)},e.prototype.destroy=function(){this.delegate.destroy()},e.prototype.createElement=function(e,t){var n=this.delegate.createElement(e,t),r=this.createDebugContext(n);if(r){var i=new VE(n,null,r);i.name=e,ZE(i)}return n},e.prototype.createComment=function(e){var t=this.delegate.createComment(e),n=this.createDebugContext(t);return n&&ZE(new jE(t,null,n)),t},e.prototype.createText=function(e){var t=this.delegate.createText(e),n=this.createDebugContext(t);return n&&ZE(new jE(t,null,n)),t},e.prototype.appendChild=function(e,t){var n=XE(e),r=XE(t);n&&r&&n instanceof VE&&n.addChild(r),this.delegate.appendChild(e,t)},e.prototype.insertBefore=function(e,t,n){var r=XE(e),i=XE(t),o=XE(n);r&&i&&r instanceof VE&&r.insertBefore(o,i),this.delegate.insertBefore(e,t,n)},e.prototype.removeChild=function(e,t){var n=XE(e),r=XE(t);n&&r&&n instanceof VE&&n.removeChild(r),this.delegate.removeChild(e,t)},e.prototype.selectRootElement=function(e,t){var n=this.delegate.selectRootElement(e,t),r=yC();return r&&ZE(new VE(n,null,r)),n},e.prototype.setAttribute=function(e,t,n,r){var i=XE(e);i&&i instanceof VE&&(i.attributes[r?r+":"+t:t]=n),this.delegate.setAttribute(e,t,n,r)},e.prototype.removeAttribute=function(e,t,n){var r=XE(e);r&&r instanceof VE&&(r.attributes[n?n+":"+t:t]=null),this.delegate.removeAttribute(e,t,n)},e.prototype.addClass=function(e,t){var n=XE(e);n&&n instanceof VE&&(n.classes[t]=!0),this.delegate.addClass(e,t)},e.prototype.removeClass=function(e,t){var n=XE(e);n&&n instanceof VE&&(n.classes[t]=!1),this.delegate.removeClass(e,t)},e.prototype.setStyle=function(e,t,n,r){var i=XE(e);i&&i instanceof VE&&(i.styles[t]=n),this.delegate.setStyle(e,t,n,r)},e.prototype.removeStyle=function(e,t,n){var r=XE(e);r&&r instanceof VE&&(r.styles[t]=null),this.delegate.removeStyle(e,t,n)},e.prototype.setProperty=function(e,t,n){var r=XE(e);r&&r instanceof VE&&(r.properties[t]=n),this.delegate.setProperty(e,t,n)},e.prototype.listen=function(e,t,n){if("string"!=typeof e){var r=XE(e);r&&r.listeners.push(new FE(t,n))}return this.delegate.listen(e,t,n)},e.prototype.parentNode=function(e){return this.delegate.parentNode(e)},e.prototype.nextSibling=function(e){return this.delegate.nextSibling(e)},e.prototype.setValue=function(e,t){return this.delegate.setValue(e,t)},e}();!function(e){function t(t,n,r){var i=e.call(this)||this;return i.moduleType=t,i._bootstrapComponents=n,i._ngModuleDefFactory=r,i}o(t,e),t.prototype.create=function(e){!function t(){if(!FS){FS=!0;var e=zy()?function t(){return{setCurrentNode:sC,createRootView:VS,createEmbeddedView:BS,createComponentView:US,createNgModuleRef:qS,overrideProvider:YS,overrideComponentView:ZS,clearOverrides:JS,checkAndUpdateView:rC,checkNoChangesView:iC,destroyView:oC,createDebugContext:function(e,t){return new dC(e,t)},handleEvent:aC,updateDirectives:uC,updateRenderer:lC}}():function n(){return{setCurrentNode:function(){},createRootView:jS,createEmbeddedView:_S,createComponentView:wS,createNgModuleRef:nw,overrideProvider:ub,overrideComponentView:ub,clearOverrides:ub,checkAndUpdateView:TS,checkNoChangesView:CS,destroyView:IS,createDebugContext:function(e,t){return new dC(e,t)},handleEvent:function(e,t,n,r){return e.def.handleEvent(e,t,n,r)},updateDirectives:function(e,t){return e.def.updateDirectives(0===t?tC:nC,e)},updateRenderer:function(e,t){return e.def.updateRenderer(0===t?tC:nC,e)}}}();ab.setCurrentNode=e.setCurrentNode,ab.createRootView=e.createRootView,ab.createEmbeddedView=e.createEmbeddedView,ab.createComponentView=e.createComponentView,ab.createNgModuleRef=e.createNgModuleRef,ab.overrideProvider=e.overrideProvider,ab.overrideComponentView=e.overrideComponentView,ab.clearOverrides=e.clearOverrides,ab.checkAndUpdateView=e.checkAndUpdateView,ab.checkNoChangesView=e.checkNoChangesView,ab.destroyView=e.destroyView,ab.resolveDep=_w,ab.createDebugContext=e.createDebugContext,ab.handleEvent=e.handleEvent,ab.updateDirectives=e.updateDirectives,ab.updateRenderer=e.updateRenderer,ab.dirtyParentQueries=hS}}();var n=
|
|
1723
1723
|
/**
|
|
1724
1724
|
* @license
|
|
1725
1725
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1727,21 +1727,21 @@ function _S(e,t,n){var r,i=e.renderer;r=i.createText(n.text.prefix);var o=Cb(e,t
|
|
|
1727
1727
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1728
1728
|
* found in the LICENSE file at https://angular.io/license
|
|
1729
1729
|
*/
|
|
1730
|
-
function r(e){var t=Array.from(e.providers),n=Array.from(e.modules),r={};for(var i in e.providersByKey)r[i]=e.providersByKey[i];return{factory:e.factory,isRoot:e.isRoot,providers:t,modules:n,providersByKey:r}}(Nb(this._ngModuleDefFactory));return lb.createNgModuleRef(this.moduleType,e||dv.NULL,this._bootstrapComponents,n)}}(b_);var xC=function(){function e(e,t){var n=this;this.host=e,this.getProgram=t,this.metadataCollector=new Tf({verboseInvalidExpression:!0}),e.directoryExists&&(this.directoryExists=function(e){return n.host.directoryExists(e)})}return e.prototype.fileExists=function(e){return!!this.host.getScriptSnapshot(e)},e.prototype.readFile=function(e){var t=this.host.getScriptSnapshot(e);if(t)return t.getText(0,t.getLength())},e.prototype.getSourceFileMetadata=function(e){var t=this.getProgram().getSourceFile(e);return t?this.metadataCollector.getMetadata(t):void 0},e.prototype.cacheMetadata=function(e){return e.endsWith(".d.ts")},e}(),EC=function(){function e(e,t,r){this.options=r,this.metadataReaderCache=function i(){return{data:new Map}}(),this.hostAdapter=new xC(t,e),this.moduleResolutionCache=n.createModuleResolutionCache(t.getCurrentDirectory(),function(e){return e})}return e.prototype.getMetadataFor=function(e){return function t(e,n,r){var i=r&&r.data.get(e);if(i)return i;if(n.fileExists(e))if(Af.test(e))(i=function o(e,t){var n=t.replace(Af,".metadata.json");if(e.fileExists(n))try{var r=JSON.parse(e.readFile(n)),i=r?Array.isArray(r)?r:[r]:[];if(i.length){var o=i.reduce(function(e,t){return e.version>t.version?e:t});o.version<rf&&i.push(Pf(e,o,t))}return i}catch(e){throw console.error("Failed to read JSON file "+n),e}}(n,e))||(i=[Pf(n,{__symbolic:"module",version:1,metadata:{}},e)]);else{var s=n.getSourceFileMetadata(e);i=s?[s]:[]}return!r||n.cacheMetadata&&!n.cacheMetadata(e)||r.data.set(e,i),i}(e,this.hostAdapter,this.metadataReaderCache)},e.prototype.moduleNameToFileName=function(e,r){if(!r){if(0===e.indexOf("."))throw new Error("Resolution of relative paths requires a containing file.");r=t.join(this.options.basePath,"index.ts").replace(/\\/g,"/")}var i=n.resolveModuleName(e,r,this.options,this.hostAdapter).resolvedModule;return i?i.resolvedFileName:null},e.prototype.getOutputName=function(e){return e},e}(),SC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.parse=function(){return new ba([],[])},t}(Sa),CC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.get=function(e){return Promise.resolve("")},t}(Nc),TC=function(){function e(e,t){this.host=e,this.tsService=t,this._staticSymbolCache=new Zt,this._typeCache=[],this.modulesOutOfDate=!0,this.fileVersions=new Map}return e.prototype.setSite=function(e){this.service=e},Object.defineProperty(e.prototype,"resolver",{get:function(){var e=this;this.validate();var t=this._resolver;if(!t){var n=new Lp(this.reflector),r=new Wc(this.reflector),i=new Fp(this.reflector),o=new Tl,s=new CC,a=dh(),u=new SC,l=new Bc({defaultEncapsulation:Yv.Emulated,useJit:!1}),c=new qc(s,a,u,l);t=this._resolver=new Ip(l,u,n,r,i,new fh,o,c,new tE,this._staticSymbolCache,this.reflector,function(t,n){return e.collectError(t,n&&n.filePath)})}return t},enumerable:!0,configurable:!0}),e.prototype.getTemplateReferences=function(){return this.ensureTemplateMap(),this.templateReferences||[]},e.prototype.getTemplateAt=function(e,t){var n=this.getSourceFile(e);if(n){this.context=n.fileName;var r=this.findNode(n,t);if(r)return this.getSourceFromNode(e,this.host.getScriptVersion(n.fileName),r)}else{this.ensureTemplateMap();var i=this.fileToComponent.get(e);if(i)return this.getSourceFromType(e,this.host.getScriptVersion(e),i)}},e.prototype.getAnalyzedModules=function(){return this.updateAnalyzedModules(),this.ensureAnalyzedModules()},e.prototype.ensureAnalyzedModules=function(){var e=this.analyzedModules;return e||(e=0===this.host.getScriptFileNames().length?{files:[],ngModuleByPipeOrDirective:new Map,ngModules:[]}:function t(e,n,r,i){return function s(e){var t=[],n=new Map,r=new Set;e.forEach(function(e){e.ngModules.forEach(function(e){t.push(e),e.declaredDirectives.forEach(function(t){return n.set(t.reference,e)}),e.declaredPipes.forEach(function(t){return n.set(t.reference,e)})}),e.directives.forEach(function(e){return r.add(e)}),e.pipes.forEach(function(e){return r.add(e)})});var i=[];return r.forEach(function(e){n.has(e)||i.push(e)}),{ngModules:t,ngModuleByPipeOrDirective:n,symbolsMissingModule:i,files:e}}(function o(e,t,n,r){var i=new Set,o=[],s=function(e){if(i.has(e)||!t.isSourceFile(e))return!1;i.add(e);var a=function u(e,t,n,r){var i=[],o=[],s=[],a=[],u=t.hasDecorators(r),l=!1;return r.endsWith(".d.ts")&&!u||t.getSymbolsOf(r).forEach(function(r){var u=t.resolveSymbol(r).metadata;if(u&&"error"!==u.__symbolic){var c=!1;if("class"===u.__symbolic)if(n.isDirective(r))c=!0,i.push(r);else if(n.isPipe(r))c=!0,o.push(r);else if(n.isNgModule(r)){var p=n.getNgModuleMetadata(r,!1);p&&(c=!0,a.push(p))}else if(n.isInjectable(r)){c=!0;var h=n.getInjectableMetadata(r,null,!1);h&&s.push(h)}c||(l=l||function f(e,t){var n=!1,r=function(){function t(){}return t.prototype.visitArray=function(e,t){var n=this;e.forEach(function(e){return xt(e,n,t)})},t.prototype.visitStringMap=function(e,t){var n=this;Object.keys(e).forEach(function(r){return xt(e[r],n,t)})},t.prototype.visitPrimitive=function(e,t){},t.prototype.visitOther=function(t,r){t instanceof Yt&&!e.isSourceFile(t.filePath)&&(n=!0)},t}();return xt(t,new r,null),n}(e,u))}}),{fileName:r,directives:i,pipes:o,ngModules:a,injectables:s,exportsNonSourceFiles:l}}(t,n,r,e);o.push(a),a.ngModules.forEach(function(e){e.transitiveModule.modules.forEach(function(e){return s(e.reference.filePath)})})};return e.forEach(function(e){return s(e)}),o}(e,n,r,i))}(this.program.getSourceFiles().map(function(e){return e.fileName}),{isSourceFile:function(e){return!0}},this.staticSymbolResolver,this.resolver),this.analyzedModules=e),e},e.prototype.getTemplates=function(e){var t=this;if(this.ensureTemplateMap(),!this.fileToComponent.get(e)){var r=this.host.getScriptVersion(e),i=[],o=function(s){var a=t.getSourceFromNode(e,r,s);a?i.push(a):n.forEachChild(s,o)},s=this.getSourceFile(e);return s&&(this.context=s.path||s.fileName,n.forEachChild(s,o)),i.length?i:void 0}var a=this.getTemplateAt(e,0);if(a)return[a]},e.prototype.getDeclarations=function(e){var t=this,r=[],i=this.getSourceFile(e);if(i){var o=function(e){var s=t.getDeclarationFromNode(i,e);s?r.push(s):n.forEachChild(e,o)};n.forEachChild(i,o)}return r},e.prototype.getSourceFile=function(e){return this.tsService.getProgram().getSourceFile(e)},e.prototype.updateAnalyzedModules=function(){this.validate(),this.modulesOutOfDate&&(this.analyzedModules=null,this._reflector=null,this.templateReferences=null,this.fileToComponent=null,this.ensureAnalyzedModules(),this.modulesOutOfDate=!1)},Object.defineProperty(e.prototype,"program",{get:function(){return this.tsService.getProgram()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checker",{get:function(){var e=this._checker;return e||(e=this._checker=this.program.getTypeChecker()),e},enumerable:!0,configurable:!0}),e.prototype.validate=function(){var e,t,n=this,r=this.program;if(this.lastProgram!==r){var i=function(e){return n._staticSymbolResolver.invalidateFile(e)};this.clearCaches();var o=new Set;try{for(var s=p(this.program.getSourceFiles()),a=s.next();!a.done;a=s.next()){var u=a.value.fileName;o.add(u);var l=this.host.getScriptVersion(u);l!=this.fileVersions.get(u)&&(this.fileVersions.set(u,l),this._staticSymbolResolver&&i(u))}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}var c=Array.from(this.fileVersions.keys()).filter(function(e){return!o.has(e)});c.forEach(function(e){return n.fileVersions.delete(e)}),this._staticSymbolResolver&&c.forEach(i),this.lastProgram=r}},e.prototype.clearCaches=function(){this._checker=null,this._typeCache=[],this._resolver=null,this.collectedErrors=null,this.modulesOutOfDate=!0},e.prototype.ensureTemplateMap=function(){var e,t,n,r;if(!this.fileToComponent||!this.templateReferences){var i=new Map,o=[],s=this.getAnalyzedModules(),a=dh();try{for(var u=p(s.ngModules),l=u.next();!l.done;l=u.next()){var c=l.value;try{for(var h=p(c.declaredDirectives),f=h.next();!f.done;f=h.next()){var d=f.value,v=this.resolver.getNonNormalizedDirectiveMetadata(d.reference).metadata;if(v.isComponent&&v.template&&v.template.templateUrl){var m=a.resolve(this.reflector.componentModuleUrl(d.reference),v.template.templateUrl);i.set(m,d.reference),o.push(m)}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}this.fileToComponent=i,this.templateReferences=o}},e.prototype.getSourceFromDeclaration=function(e,t,n,r,i,o,s,a){var u=void 0,l=this;if(o)return{version:t,source:n,span:r,type:i,get members(){return function e(t,n,r,i){var o=n.getTypeAtLocation(i);return new jh(o,{node:r,program:t,checker:n}).members()}(l.program,l.checker,a,o)},get query(){if(!u){var t=l.service.getPipesAt(e,s.getStart());u=function n(e,t,r,i){return new Rh(e,t,r,i)}(l.program,l.checker,a,function(){return function e(t,n,r,i){return new Wh(i,{program:n,checker:r,node:t})}(a,l.program,l.checker,t)})}return u}}},e.prototype.getSourceFromNode=function(e,t,r){switch(r.kind){case n.SyntaxKind.NoSubstitutionTemplateLiteral:case n.SyntaxKind.StringLiteral:var i=h(this.getTemplateClassDeclFromNode(r),2)[0];if(i&&i.name){var o=this.getSourceFile(e);if(o)return this.getSourceFromDeclaration(e,t,this.stringOf(r)||"",function s(e,t){return null==t&&(t=1),{start:e.start+t,end:e.end-t}}(NC(r)),this.reflector.getStaticSymbol(o.fileName,i.name.text),i,r,o)}}},e.prototype.getSourceFromType=function(e,t,n){var r=void 0,i=this.getTemplateClassFromStaticSymbol(n);if(i){var o=this.host.getScriptSnapshot(e);if(o){var s=o.getText(0,o.getLength());r=this.getSourceFromDeclaration(e,t,s,{start:0,end:s.length},n,i,i,i.getSourceFile())}}return r},Object.defineProperty(e.prototype,"reflectorHost",{get:function(){var e=this,n=this._reflectorHost;if(!n){if(!this.context){var i=this.host.getScriptFileNames();if(0===i.length)throw new Error("Internal error: no script file names found");this.context=i[0]}var o=this.tsService.getProgram().getSourceFile(this.context);if(!o)throw new Error("Internal error: no context could be determined");var s=function a(e){for(var n=t.dirname(e);r.existsSync(n);){var i=t.join(n,"tsconfig.json");if(r.existsSync(i))return i;var o=t.dirname(n);if(o===n)break;n=o}}(o.fileName),u=t.dirname(s||this.context),l={basePath:u,genDir:u},c=this.host.getCompilationSettings();c&&c.baseUrl&&(l.baseUrl=c.baseUrl),c&&c.paths&&(l.paths=c.paths),n=this._reflectorHost=new EC(function(){return e.tsService.getProgram()},this.host,l)}return n},enumerable:!0,configurable:!0}),e.prototype.collectError=function(e,t){if(t){var n=this.collectedErrors;n&&this.collectedErrors||(n=this.collectedErrors=new Map);var r=n.get(t);r||this.collectedErrors.set(t,r=[]),r.push(e)}},Object.defineProperty(e.prototype,"staticSymbolResolver",{get:function(){var e=this,t=this._staticSymbolResolver;return t||(this._summaryResolver=new hh({loadSummary:function(e){return null},isSourceFile:function(e){return!0},toSummaryFileName:function(e){return e},fromSummaryFileName:function(e){return e}},this._staticSymbolCache),t=this._staticSymbolResolver=new Hp(this.reflectorHost,this._staticSymbolCache,this._summaryResolver,function(t,n){return e.collectError(t,n)})),t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reflector",{get:function(){var e=this,t=this._reflector;return t||(t=this._reflector=new Yp(this._summaryResolver,this.staticSymbolResolver,[],[],function(t,n){return e.collectError(t,n)})),t},enumerable:!0,configurable:!0}),e.prototype.getTemplateClassFromStaticSymbol=function(e){var t=this.getSourceFile(e.filePath);if(t)return n.forEachChild(t,function(t){if(t.kind===n.SyntaxKind.ClassDeclaration&&null!=t.name&&t.name.text===e.name)return t})},e.prototype.getTemplateClassDeclFromNode=function(t){var r=t.parent;if(!r)return e.missingTemplate;if(r.kind!==n.SyntaxKind.PropertyAssignment)return e.missingTemplate;if("template"!==r.name.text)return e.missingTemplate;if(!(r=r.parent)||r.kind!==n.SyntaxKind.ObjectLiteralExpression)return e.missingTemplate;if(!(r=r.parent)||r.kind!==n.SyntaxKind.CallExpression)return e.missingTemplate;var i=r.parent;if(!i||i.kind!==n.SyntaxKind.Decorator)return e.missingTemplate;var o=i.parent;return o&&o.kind===n.SyntaxKind.ClassDeclaration?[o,r.expression]:e.missingTemplate},e.prototype.getCollectedErrors=function(e,t){var r=this.collectedErrors&&this.collectedErrors.get(t.fileName);return r&&r.map(function(r){var i=function o(e,t,r){if(null!=t&&null!=r){var i=n.getPositionOfLineAndCharacter(e,t,r),o=n.forEachChild(e,function e(t){if(t.kind>n.SyntaxKind.LastToken&&t.pos<=i&&t.end>i)return n.forEachChild(t,e)||t});if(o)return{start:o.getStart(),end:o.getEnd()}}}(t,r.line||r.position&&r.position.line,r.column||r.position&&r.position.column)||e;return function s(e){return!!e[zp]}
|
|
1730
|
+
function r(e){var t=Array.from(e.providers),n=Array.from(e.modules),r={};for(var i in e.providersByKey)r[i]=e.providersByKey[i];return{factory:e.factory,isRoot:e.isRoot,providers:t,modules:n,providersByKey:r}}(Cb(this._ngModuleDefFactory));return ab.createNgModuleRef(this.moduleType,e||dv.NULL,this._bootstrapComponents,n)}}(g_);var bC=function(){function e(e,t){var n=this;this.host=e,this.getProgram=t,this.metadataCollector=new Tf({verboseInvalidExpression:!0}),e.directoryExists&&(this.directoryExists=function(e){return n.host.directoryExists(e)})}return e.prototype.fileExists=function(e){return!!this.host.getScriptSnapshot(e)},e.prototype.readFile=function(e){var t=this.host.getScriptSnapshot(e);if(t)return t.getText(0,t.getLength())},e.prototype.getSourceFileMetadata=function(e){var t=this.getProgram().getSourceFile(e);return t?this.metadataCollector.getMetadata(t):void 0},e.prototype.cacheMetadata=function(e){return e.endsWith(".d.ts")},e}(),wC=function(){function e(e,t,r){this.options=r,this.metadataReaderCache=function i(){return{data:new Map}}(),this.hostAdapter=new bC(t,e),this.moduleResolutionCache=n.createModuleResolutionCache(t.getCurrentDirectory(),function(e){return e})}return e.prototype.getMetadataFor=function(e){return function t(e,n,r){var i=r&&r.data.get(e);if(i)return i;if(n.fileExists(e))if(Af.test(e))(i=function o(e,t){var n=t.replace(Af,".metadata.json");if(e.fileExists(n))try{var r=JSON.parse(e.readFile(n)),i=r?Array.isArray(r)?r:[r]:[];if(i.length){var o=i.reduce(function(e,t){return e.version>t.version?e:t});o.version<rf&&i.push(Pf(e,o,t))}return i}catch(e){throw console.error("Failed to read JSON file "+n),e}}(n,e))||(i=[Pf(n,{__symbolic:"module",version:1,metadata:{}},e)]);else{var s=n.getSourceFileMetadata(e);i=s?[s]:[]}return!r||n.cacheMetadata&&!n.cacheMetadata(e)||r.data.set(e,i),i}(e,this.hostAdapter,this.metadataReaderCache)},e.prototype.moduleNameToFileName=function(e,r){if(!r){if(0===e.indexOf("."))throw new Error("Resolution of relative paths requires a containing file.");r=t.join(this.options.basePath,"index.ts").replace(/\\/g,"/")}var i=n.resolveModuleName(e,r,this.options,this.hostAdapter).resolvedModule;return i?i.resolvedFileName:null},e.prototype.getOutputName=function(e){return e},e}(),xC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.parse=function(){return new ba([],[])},t}(Sa),EC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.get=function(e){return Promise.resolve("")},t}(Nc),SC=function(){function e(e,t){this.host=e,this.tsService=t,this._staticSymbolCache=new Zt,this._typeCache=[],this.modulesOutOfDate=!0,this.fileVersions=new Map}return e.prototype.setSite=function(e){this.service=e},Object.defineProperty(e.prototype,"resolver",{get:function(){var e=this;this.validate();var t=this._resolver;if(!t){var n=new Lp(this.reflector),r=new Wc(this.reflector),i=new Fp(this.reflector),o=new Tl,s=new EC,a=dh(),u=new xC,l=new Bc({defaultEncapsulation:Xv.Emulated,useJit:!1}),c=new qc(s,a,u,l);t=this._resolver=new Ip(l,u,n,r,i,new fh,o,c,new Jx,this._staticSymbolCache,this.reflector,function(t,n){return e.collectError(t,n&&n.filePath)})}return t},enumerable:!0,configurable:!0}),e.prototype.getTemplateReferences=function(){return this.ensureTemplateMap(),this.templateReferences||[]},e.prototype.getTemplateAt=function(e,t){var n=this.getSourceFile(e);if(n){this.context=n.fileName;var r=this.findNode(n,t);if(r)return this.getSourceFromNode(e,this.host.getScriptVersion(n.fileName),r)}else{this.ensureTemplateMap();var i=this.fileToComponent.get(e);if(i)return this.getSourceFromType(e,this.host.getScriptVersion(e),i)}},e.prototype.getAnalyzedModules=function(){return this.updateAnalyzedModules(),this.ensureAnalyzedModules()},e.prototype.ensureAnalyzedModules=function(){var e=this.analyzedModules;return e||(e=0===this.host.getScriptFileNames().length?{files:[],ngModuleByPipeOrDirective:new Map,ngModules:[]}:function t(e,n,r,i){return function s(e){var t=[],n=new Map,r=new Set;e.forEach(function(e){e.ngModules.forEach(function(e){t.push(e),e.declaredDirectives.forEach(function(t){return n.set(t.reference,e)}),e.declaredPipes.forEach(function(t){return n.set(t.reference,e)})}),e.directives.forEach(function(e){return r.add(e)}),e.pipes.forEach(function(e){return r.add(e)})});var i=[];return r.forEach(function(e){n.has(e)||i.push(e)}),{ngModules:t,ngModuleByPipeOrDirective:n,symbolsMissingModule:i,files:e}}(function o(e,t,n,r){var i=new Set,o=[],s=function(e){if(i.has(e)||!t.isSourceFile(e))return!1;i.add(e);var a=function u(e,t,n,r){var i=[],o=[],s=[],a=[],u=t.hasDecorators(r),l=!1;return r.endsWith(".d.ts")&&!u||t.getSymbolsOf(r).forEach(function(r){var u=t.resolveSymbol(r).metadata;if(u&&"error"!==u.__symbolic){var c=!1;if("class"===u.__symbolic)if(n.isDirective(r))c=!0,i.push(r);else if(n.isPipe(r))c=!0,o.push(r);else if(n.isNgModule(r)){var p=n.getNgModuleMetadata(r,!1);p&&(c=!0,a.push(p))}else if(n.isInjectable(r)){c=!0;var h=n.getInjectableMetadata(r,null,!1);h&&s.push(h)}c||(l=l||function f(e,t){var n=!1,r=function(){function t(){}return t.prototype.visitArray=function(e,t){var n=this;e.forEach(function(e){return xt(e,n,t)})},t.prototype.visitStringMap=function(e,t){var n=this;Object.keys(e).forEach(function(r){return xt(e[r],n,t)})},t.prototype.visitPrimitive=function(e,t){},t.prototype.visitOther=function(t,r){t instanceof Yt&&!e.isSourceFile(t.filePath)&&(n=!0)},t}();return xt(t,new r,null),n}(e,u))}}),{fileName:r,directives:i,pipes:o,ngModules:a,injectables:s,exportsNonSourceFiles:l}}(t,n,r,e);o.push(a),a.ngModules.forEach(function(e){e.transitiveModule.modules.forEach(function(e){return s(e.reference.filePath)})})};return e.forEach(function(e){return s(e)}),o}(e,n,r,i))}(this.program.getSourceFiles().map(function(e){return e.fileName}),{isSourceFile:function(e){return!0}},this.staticSymbolResolver,this.resolver),this.analyzedModules=e),e},e.prototype.getTemplates=function(e){var t=this;if(this.ensureTemplateMap(),!this.fileToComponent.get(e)){var r=this.host.getScriptVersion(e),i=[],o=function(s){var a=t.getSourceFromNode(e,r,s);a?i.push(a):n.forEachChild(s,o)},s=this.getSourceFile(e);return s&&(this.context=s.path||s.fileName,n.forEachChild(s,o)),i.length?i:void 0}var a=this.getTemplateAt(e,0);if(a)return[a]},e.prototype.getDeclarations=function(e){var t=this,r=[],i=this.getSourceFile(e);if(i){var o=function(e){var s=t.getDeclarationFromNode(i,e);s?r.push(s):n.forEachChild(e,o)};n.forEachChild(i,o)}return r},e.prototype.getSourceFile=function(e){return this.tsService.getProgram().getSourceFile(e)},e.prototype.updateAnalyzedModules=function(){this.validate(),this.modulesOutOfDate&&(this.analyzedModules=null,this._reflector=null,this.templateReferences=null,this.fileToComponent=null,this.ensureAnalyzedModules(),this.modulesOutOfDate=!1)},Object.defineProperty(e.prototype,"program",{get:function(){return this.tsService.getProgram()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checker",{get:function(){var e=this._checker;return e||(e=this._checker=this.program.getTypeChecker()),e},enumerable:!0,configurable:!0}),e.prototype.validate=function(){var e,t,n=this,r=this.program;if(this.lastProgram!==r){var i=function(e){return n._staticSymbolResolver.invalidateFile(e)};this.clearCaches();var o=new Set;try{for(var s=p(this.program.getSourceFiles()),a=s.next();!a.done;a=s.next()){var u=a.value.fileName;o.add(u);var l=this.host.getScriptVersion(u);l!=this.fileVersions.get(u)&&(this.fileVersions.set(u,l),this._staticSymbolResolver&&i(u))}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}var c=Array.from(this.fileVersions.keys()).filter(function(e){return!o.has(e)});c.forEach(function(e){return n.fileVersions.delete(e)}),this._staticSymbolResolver&&c.forEach(i),this.lastProgram=r}},e.prototype.clearCaches=function(){this._checker=null,this._typeCache=[],this._resolver=null,this.collectedErrors=null,this.modulesOutOfDate=!0},e.prototype.ensureTemplateMap=function(){var e,t,n,r;if(!this.fileToComponent||!this.templateReferences){var i=new Map,o=[],s=this.getAnalyzedModules(),a=dh();try{for(var u=p(s.ngModules),l=u.next();!l.done;l=u.next()){var c=l.value;try{for(var h=p(c.declaredDirectives),f=h.next();!f.done;f=h.next()){var d=f.value,v=this.resolver.getNonNormalizedDirectiveMetadata(d.reference).metadata;if(v.isComponent&&v.template&&v.template.templateUrl){var m=a.resolve(this.reflector.componentModuleUrl(d.reference),v.template.templateUrl);i.set(m,d.reference),o.push(m)}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}this.fileToComponent=i,this.templateReferences=o}},e.prototype.getSourceFromDeclaration=function(e,t,n,r,i,o,s,a){var u=void 0,l=this;if(o)return{version:t,source:n,span:r,type:i,get members(){return function e(t,n,r,i){var o=n.getTypeAtLocation(i);return new jh(o,{node:r,program:t,checker:n}).members()}(l.program,l.checker,a,o)},get query(){if(!u){var t=l.service.getPipesAt(e,s.getStart());u=function n(e,t,r,i){return new Rh(e,t,r,i)}(l.program,l.checker,a,function(){return function e(t,n,r,i){return new Wh(i,{program:n,checker:r,node:t})}(a,l.program,l.checker,t)})}return u}}},e.prototype.getSourceFromNode=function(e,t,r){switch(r.kind){case n.SyntaxKind.NoSubstitutionTemplateLiteral:case n.SyntaxKind.StringLiteral:var i=h(this.getTemplateClassDeclFromNode(r),2)[0];if(i&&i.name){var o=this.getSourceFile(e);if(o)return this.getSourceFromDeclaration(e,t,this.stringOf(r)||"",function s(e,t){return null==t&&(t=1),{start:e.start+t,end:e.end-t}}(CC(r)),this.reflector.getStaticSymbol(o.fileName,i.name.text),i,r,o)}}},e.prototype.getSourceFromType=function(e,t,n){var r=void 0,i=this.getTemplateClassFromStaticSymbol(n);if(i){var o=this.host.getScriptSnapshot(e);if(o){var s=o.getText(0,o.getLength());r=this.getSourceFromDeclaration(e,t,s,{start:0,end:s.length},n,i,i,i.getSourceFile())}}return r},Object.defineProperty(e.prototype,"reflectorHost",{get:function(){var e=this,n=this._reflectorHost;if(!n){if(!this.context){var i=this.host.getScriptFileNames();if(0===i.length)throw new Error("Internal error: no script file names found");this.context=i[0]}var o=this.tsService.getProgram().getSourceFile(this.context);if(!o)throw new Error("Internal error: no context could be determined");var s=function a(e){for(var n=t.dirname(e);r.existsSync(n);){var i=t.join(n,"tsconfig.json");if(r.existsSync(i))return i;var o=t.dirname(n);if(o===n)break;n=o}}(o.fileName),u=t.dirname(s||this.context),l={basePath:u,genDir:u},c=this.host.getCompilationSettings();c&&c.baseUrl&&(l.baseUrl=c.baseUrl),c&&c.paths&&(l.paths=c.paths),n=this._reflectorHost=new wC(function(){return e.tsService.getProgram()},this.host,l)}return n},enumerable:!0,configurable:!0}),e.prototype.collectError=function(e,t){if(t){var n=this.collectedErrors;n&&this.collectedErrors||(n=this.collectedErrors=new Map);var r=n.get(t);r||this.collectedErrors.set(t,r=[]),r.push(e)}},Object.defineProperty(e.prototype,"staticSymbolResolver",{get:function(){var e=this,t=this._staticSymbolResolver;return t||(this._summaryResolver=new hh({loadSummary:function(e){return null},isSourceFile:function(e){return!0},toSummaryFileName:function(e){return e},fromSummaryFileName:function(e){return e}},this._staticSymbolCache),t=this._staticSymbolResolver=new Hp(this.reflectorHost,this._staticSymbolCache,this._summaryResolver,function(t,n){return e.collectError(t,n)})),t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reflector",{get:function(){var e=this,t=this._reflector;return t||(t=this._reflector=new Yp(this._summaryResolver,this.staticSymbolResolver,[],[],function(t,n){return e.collectError(t,n)})),t},enumerable:!0,configurable:!0}),e.prototype.getTemplateClassFromStaticSymbol=function(e){var t=this.getSourceFile(e.filePath);if(t)return n.forEachChild(t,function(t){if(t.kind===n.SyntaxKind.ClassDeclaration&&null!=t.name&&t.name.text===e.name)return t})},e.prototype.getTemplateClassDeclFromNode=function(t){var r=t.parent;if(!r)return e.missingTemplate;if(r.kind!==n.SyntaxKind.PropertyAssignment)return e.missingTemplate;if("template"!==r.name.text)return e.missingTemplate;if(!(r=r.parent)||r.kind!==n.SyntaxKind.ObjectLiteralExpression)return e.missingTemplate;if(!(r=r.parent)||r.kind!==n.SyntaxKind.CallExpression)return e.missingTemplate;var i=r.parent;if(!i||i.kind!==n.SyntaxKind.Decorator)return e.missingTemplate;var o=i.parent;return o&&o.kind===n.SyntaxKind.ClassDeclaration?[o,r.expression]:e.missingTemplate},e.prototype.getCollectedErrors=function(e,t){var r=this.collectedErrors&&this.collectedErrors.get(t.fileName);return r&&r.map(function(r){var i=function o(e,t,r){if(null!=t&&null!=r){var i=n.getPositionOfLineAndCharacter(e,t,r),o=n.forEachChild(e,function e(t){if(t.kind>n.SyntaxKind.LastToken&&t.pos<=i&&t.end>i)return n.forEachChild(t,e)||t});if(o)return{start:o.getStart(),end:o.getEnd()}}}(t,r.line||r.position&&r.position.line,r.column||r.position&&r.position.column)||e;return function s(e){return!!e[zp]}
|
|
1731
1731
|
/**
|
|
1732
1732
|
* @license
|
|
1733
1733
|
* Copyright Google Inc. All Rights Reserved.
|
|
1734
1734
|
*
|
|
1735
1735
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1736
1736
|
* found in the LICENSE file at https://angular.io/license
|
|
1737
|
-
*/(r)?function a(e,t){return{message:e.chain?
|
|
1737
|
+
*/(r)?function a(e,t){return{message:e.chain?TC(e.chain):e.message,span:t}}
|
|
1738
1738
|
/**
|
|
1739
1739
|
* @license
|
|
1740
1740
|
* Copyright Google Inc. All Rights Reserved.
|
|
1741
1741
|
*
|
|
1742
1742
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1743
1743
|
* found in the LICENSE file at https://angular.io/license
|
|
1744
|
-
*/(r,i):{message:r.message,span:i}})||[]},e.prototype.getDeclarationFromNode=function(e,t){var r,i;if(t.kind==n.SyntaxKind.ClassDeclaration&&t.decorators&&t.name)try{for(var o=p(t.decorators),s=o.next();!s.done;s=o.next()){var a=s.value;if(a.expression&&a.expression.kind==n.SyntaxKind.CallExpression){var u=t;if(u.name){var l=a.expression.expression;if(this.checker.getTypeAtLocation(l)){var c=this.reflector.getStaticSymbol(e.fileName,u.name.text);try{if(this.resolver.isDirective(c)){var h=this.resolver.getNonNormalizedDirectiveMetadata(c).metadata;return{type:c,declarationSpan:f=
|
|
1744
|
+
*/(r,i):{message:r.message,span:i}})||[]},e.prototype.getDeclarationFromNode=function(e,t){var r,i;if(t.kind==n.SyntaxKind.ClassDeclaration&&t.decorators&&t.name)try{for(var o=p(t.decorators),s=o.next();!s.done;s=o.next()){var a=s.value;if(a.expression&&a.expression.kind==n.SyntaxKind.CallExpression){var u=t;if(u.name){var l=a.expression.expression;if(this.checker.getTypeAtLocation(l)){var c=this.reflector.getStaticSymbol(e.fileName,u.name.text);try{if(this.resolver.isDirective(c)){var h=this.resolver.getNonNormalizedDirectiveMetadata(c).metadata;return{type:c,declarationSpan:f=CC(l),metadata:h,errors:this.getCollectedErrors(f,e)}}}catch(t){var f;if(t.message)return this.collectError(t,e.fileName),{type:c,declarationSpan:f=CC(l),errors:this.getCollectedErrors(f,e)}}}}}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.stringOf=function(e){switch(e.kind){case n.SyntaxKind.NoSubstitutionTemplateLiteral:case n.SyntaxKind.StringLiteral:return e.text}},e.prototype.findNode=function(e,t){return function e(r){if(t>=r.getStart()&&t<r.getEnd())return n.forEachChild(r,e)||r}(e)},e.missingTemplate=[void 0,void 0],e}();
|
|
1745
1745
|
/**
|
|
1746
1746
|
* @license
|
|
1747
1747
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1797,7 +1797,7 @@ function r(e){var t=Array.from(e.providers),n=Array.from(e.modules),r={};for(var
|
|
|
1797
1797
|
*
|
|
1798
1798
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1799
1799
|
* found in the LICENSE file at https://angular.io/license
|
|
1800
|
-
*/function
|
|
1800
|
+
*/function CC(e){return{start:e.getStart(),end:e.getEnd()}}function TC(e){return{message:e.message,next:e.next?TC(e.next):void 0}}var NC=new WeakMap,kC=new k_("8.0.1");
|
|
1801
1801
|
/**
|
|
1802
1802
|
* @license
|
|
1803
1803
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1812,7 +1812,7 @@ function r(e){var t=Array.from(e.providers),n=Array.from(e.modules),r={};for(var
|
|
|
1812
1812
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1813
1813
|
* found in the LICENSE file at https://angular.io/license
|
|
1814
1814
|
*/
|
|
1815
|
-
e.createLanguageService=fd,e.TypeScriptServiceHost=
|
|
1815
|
+
e.createLanguageService=fd,e.TypeScriptServiceHost=SC,e.createLanguageServiceFromTypescript=
|
|
1816
1816
|
/**
|
|
1817
1817
|
* @license
|
|
1818
1818
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1820,7 +1820,7 @@ e.createLanguageService=fd,e.TypeScriptServiceHost=TC,e.createLanguageServiceFro
|
|
|
1820
1820
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1821
1821
|
* found in the LICENSE file at https://angular.io/license
|
|
1822
1822
|
*/
|
|
1823
|
-
function
|
|
1823
|
+
function AC(e,t){var n=new SC(e,t),r=fd(n);return n.setSite(r),r},e.VERSION=kC,e.getExternalFiles=function PC(e){var t=NC.get(e);if(t)return t.getTemplateReferences()},e.create=function IC(e){var t=e.languageService,r=Object.assign({},t),i=e.project.projectService.logger;function o(e,t){try{return t()}catch(t){return i.info("Failed to "+e+": "+t.toString()),i.info("Stack trace: "+t.stack),null}}var s=new SC(e.languageServiceHost,t),a=fd(s);return s.setSite(a),NC.set(e.project,s),r.getCompletionsAtPosition=function(e,n,r){var i=t.getCompletionsAtPosition(e,n,r)||{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:[]};return o("get completions",function(){var t,r,o,s=a.getCompletionsAt(e,n);if(s&&s.length){void 0===i&&(i={isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:[]});try{for(var u=p(s),l=u.next();!l.done;l=u.next())i.entries.push({kind:(o=l.value).kind,name:o.name,sortText:o.sort,kindModifiers:""})}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}}}),i},r.getQuickInfoAtPosition=function(e,n){var r=t.getQuickInfoAtPosition(e,n);return o("get quick info",function(){var t,i,o=a.getHoverAt(e,n);if(o){var s=[];try{for(var u=p(o.text),l=u.next();!l.done;l=u.next()){var c=l.value;s.push({kind:c.language||"angular",text:c.text})}}catch(e){t={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(t)throw t.error}}var h=r&&r.tags;r={displayParts:s,documentation:[],kind:"angular",kindModifiers:"what does this do?",textSpan:{start:o.span.start,length:o.span.end-o.span.start}},h&&(r.tags=h)}}),r},r.getSemanticDiagnostics=function(e){var r=t.getSemanticDiagnostics(e)||[];return o("get diagnostics",function(){i.info("Computing Angular semantic diagnostics...");var o=a.getDiagnostics(e);if(o&&o.length){var s=t.getProgram().getSourceFile(e);s&&r.push.apply(r,o.map(function(e){return function t(e,r){return{file:r,start:e.span.start,length:e.span.end-e.span.start,messageText:(i=e.message,"string"==typeof i?i:function e(t){return{messageText:t.message,category:n.DiagnosticCategory.Error,code:0,next:t.next?e(t.next):void 0}}(i)),category:n.DiagnosticCategory.Error,code:0,source:"ng"};var i}(e,s)}))}}),r},r.getDefinitionAtPosition=function(e,n){var r=t.getDefinitionAtPosition(e,n);return r&&r.length?r:o("get definition",function(){var t,i,o,s=a.getDefinitionAt(e,n);if(s&&s.length){o=r&&r.concat([])||[];try{for(var u=p(s),l=u.next();!l.done;l=u.next()){var c=l.value;o.push({fileName:c.fileName,textSpan:{start:c.span.start,length:c.span.end-c.span.start},name:"",kind:"definition",containerName:c.fileName,containerKind:"file"})}}catch(e){t={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(t)throw t.error}}}else o=r;return o})||[]},r}
|
|
1824
1824
|
/**
|
|
1825
1825
|
* @license
|
|
1826
1826
|
* Copyright Google Inc. All Rights Reserved.
|