@angular/language-service 7.1.0 → 7.1.4
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 +55 -34
- package/bundles/language-service.umd.min.js +102 -102
- package/index.js +1 -1
- package/language-service.js +1 -1
- package/package.json +1 -1
- package/src/common.js +1 -1
- package/src/completions.js +1 -1
- package/src/definitions.js +1 -1
- package/src/diagnostics.js +1 -1
- package/src/expressions.js +1 -1
- package/src/hover.js +1 -1
- package/src/html_info.js +1 -1
- package/src/language_service.js +1 -1
- package/src/locate_symbol.js +1 -1
- package/src/reflector_host.js +1 -1
- package/src/ts_plugin.js +1 -1
- package/src/types.js +1 -1
- package/src/typescript_host.js +1 -1
- package/src/utils.js +1 -1
- package/src/version.js +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v7.1.
|
|
2
|
+
* @license Angular v7.1.4
|
|
3
3
|
* (c) 2010-2018 Google, Inc. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -25,21 +25,21 @@ var w,E,S=function(){function t(t){var e=void 0===t?{}:t,n=e.closedByChildren,r=
|
|
|
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,P,A=new RegExp("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-.\\w*]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g"),N=function(){function t(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return t.parse=function(e){var n,r=[],i=function(t,e){e.notSelectors.length>0&&!e.element&&0==e.classNames.length&&0==e.attrs.length&&(e.element="*"),t.push(e)},o=new t,s=o,a=!1;for(A.lastIndex=0;n=A.exec(e);){if(n[1]){if(a)throw new Error("Nesting :not is not allowed in a selector");a=!0,s=new t,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 t}}return i(r,o),r},t.prototype.isElementSelector=function(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length},t.prototype.hasElementSelector=function(){return!!this.element},t.prototype.setElement=function(t){void 0===t&&(t=null),this.element=t},t.prototype.getMatchingElementTemplate=function(){for(var t=this.element||"div",e=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(t).isVoid?"<"+t+e+n+"/>":"<"+t+e+n+"></"+t+">"},t.prototype.getAttrs=function(){var t=[];return this.classNames.length>0&&t.push("class",this.classNames.join(" ")),t.concat(this.attrs)},t.prototype.addAttribute=function(t,e){void 0===e&&(e=""),this.attrs.push(t,e&&e.toLowerCase()||"")},t.prototype.addClassName=function(t){this.classNames.push(t.toLowerCase())},t.prototype.toString=function(){var t=this.element||"";if(this.classNames&&this.classNames.forEach(function(e){return t+="."+e}),this.attrs)for(var e=0;e<this.attrs.length;e+=2){var n=this.attrs[e+1];t+="["+this.attrs[e]+(n?"="+n:"")+"]"}return this.notSelectors.forEach(function(e){return t+=":not("+e+")"}),t},t}(),k=function(){function t(){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 t.createNotMatcher=function(e){var n=new t;return n.addSelectables(e,null),n},t.prototype.addSelectables=function(t,e){var n=null;t.length>1&&(n=new O(t),this._listContexts.push(n));for(var r=0;r<t.length;r++)this._addSelectable(t[r],e,n)},t.prototype._addSelectable=function(t,e,n){var r=this,i=t.element,o=t.classNames,s=t.attrs,a=new I(t,e,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 c=o[u];0===s.length&&u===o.length-1?this._addTerminal(r._classMap,c,a):r=this._addPartial(r._classPartialMap,c)}if(s)for(u=0;u<s.length;u+=2){var l=s[u],p=s[u+1];if(u===s.length-2){var h=r._attrValueMap,f=h.get(l);f||(f=new Map,h.set(l,f)),this._addTerminal(f,p,a)}else{var d=r._attrValuePartialMap,v=d.get(l);v||(v=new Map,d.set(l,v)),r=this._addPartial(v,p)}}},t.prototype._addTerminal=function(t,e,n){var r=t.get(e);r||t.set(e,r=[]),r.push(n)},t.prototype._addPartial=function(e,n){var r=e.get(n);return r||(r=new t,e.set(n,r)),r},t.prototype.match=function(t,e){for(var n=!1,r=t.element,i=t.classNames,o=t.attrs,s=0;s<this._listContexts.length;s++)this._listContexts[s].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,r,t,e)||n,n=this._matchPartial(this._elementPartialMap,r,t,e)||n,i)for(s=0;s<i.length;s++){var a=i[s];n=this._matchTerminal(this._classMap,a,t,e)||n,n=this._matchPartial(this._classPartialMap,a,t,e)||n}if(o)for(s=0;s<o.length;s+=2){var u=o[s],c=o[s+1],l=this._attrValueMap.get(u);c&&(n=this._matchTerminal(l,"",t,e)||n),n=this._matchTerminal(l,c,t,e)||n;var p=this._attrValuePartialMap.get(u);c&&(n=this._matchPartial(p,"",t,e)||n),n=this._matchPartial(p,c,t,e)||n}return n},t.prototype._matchTerminal=function(t,e,n,r){if(!t||"string"!=typeof e)return!1;var i=t.get(e)||[],o=t.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},t.prototype._matchPartial=function(t,e,n,r){if(!t||"string"!=typeof e)return!1;var i=t.get(e);return!!i&&i.match(n,r)},t}(),O=function O(t){this.selectors=t,this.alreadyMatched=!1},I=function(){function t(t,e,n){this.selector=t,this.cbContext=e,this.listContext=n,this.notSelectors=t.notSelectors}return t.prototype.finalize=function(t,e){var n=!0;return!(this.notSelectors.length>0)||this.listContext&&this.listContext.alreadyMatched||(n=!k.createNotMatcher(this.notSelectors).match(t,null)),!n||!e||this.listContext&&this.listContext.alreadyMatched||(this.listContext&&(this.listContext.alreadyMatched=!0),e(this.selector,this.cbContext)),n},t}(),M=rt("Inject",function(t){return{token:t}}),
|
|
28
|
+
*/var T,P,A=new RegExp("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-.\\w*]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g"),N=function(){function t(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return t.parse=function(e){var n,r=[],i=function(t,e){e.notSelectors.length>0&&!e.element&&0==e.classNames.length&&0==e.attrs.length&&(e.element="*"),t.push(e)},o=new t,s=o,a=!1;for(A.lastIndex=0;n=A.exec(e);){if(n[1]){if(a)throw new Error("Nesting :not is not allowed in a selector");a=!0,s=new t,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 t}}return i(r,o),r},t.prototype.isElementSelector=function(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length},t.prototype.hasElementSelector=function(){return!!this.element},t.prototype.setElement=function(t){void 0===t&&(t=null),this.element=t},t.prototype.getMatchingElementTemplate=function(){for(var t=this.element||"div",e=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(t).isVoid?"<"+t+e+n+"/>":"<"+t+e+n+"></"+t+">"},t.prototype.getAttrs=function(){var t=[];return this.classNames.length>0&&t.push("class",this.classNames.join(" ")),t.concat(this.attrs)},t.prototype.addAttribute=function(t,e){void 0===e&&(e=""),this.attrs.push(t,e&&e.toLowerCase()||"")},t.prototype.addClassName=function(t){this.classNames.push(t.toLowerCase())},t.prototype.toString=function(){var t=this.element||"";if(this.classNames&&this.classNames.forEach(function(e){return t+="."+e}),this.attrs)for(var e=0;e<this.attrs.length;e+=2){var n=this.attrs[e+1];t+="["+this.attrs[e]+(n?"="+n:"")+"]"}return this.notSelectors.forEach(function(e){return t+=":not("+e+")"}),t},t}(),k=function(){function t(){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 t.createNotMatcher=function(e){var n=new t;return n.addSelectables(e,null),n},t.prototype.addSelectables=function(t,e){var n=null;t.length>1&&(n=new O(t),this._listContexts.push(n));for(var r=0;r<t.length;r++)this._addSelectable(t[r],e,n)},t.prototype._addSelectable=function(t,e,n){var r=this,i=t.element,o=t.classNames,s=t.attrs,a=new I(t,e,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 c=o[u];0===s.length&&u===o.length-1?this._addTerminal(r._classMap,c,a):r=this._addPartial(r._classPartialMap,c)}if(s)for(u=0;u<s.length;u+=2){var l=s[u],p=s[u+1];if(u===s.length-2){var h=r._attrValueMap,f=h.get(l);f||(f=new Map,h.set(l,f)),this._addTerminal(f,p,a)}else{var d=r._attrValuePartialMap,v=d.get(l);v||(v=new Map,d.set(l,v)),r=this._addPartial(v,p)}}},t.prototype._addTerminal=function(t,e,n){var r=t.get(e);r||t.set(e,r=[]),r.push(n)},t.prototype._addPartial=function(e,n){var r=e.get(n);return r||(r=new t,e.set(n,r)),r},t.prototype.match=function(t,e){for(var n=!1,r=t.element,i=t.classNames,o=t.attrs,s=0;s<this._listContexts.length;s++)this._listContexts[s].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,r,t,e)||n,n=this._matchPartial(this._elementPartialMap,r,t,e)||n,i)for(s=0;s<i.length;s++){var a=i[s];n=this._matchTerminal(this._classMap,a,t,e)||n,n=this._matchPartial(this._classPartialMap,a,t,e)||n}if(o)for(s=0;s<o.length;s+=2){var u=o[s],c=o[s+1],l=this._attrValueMap.get(u);c&&(n=this._matchTerminal(l,"",t,e)||n),n=this._matchTerminal(l,c,t,e)||n;var p=this._attrValuePartialMap.get(u);c&&(n=this._matchPartial(p,"",t,e)||n),n=this._matchPartial(p,c,t,e)||n}return n},t.prototype._matchTerminal=function(t,e,n,r){if(!t||"string"!=typeof e)return!1;var i=t.get(e)||[],o=t.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},t.prototype._matchPartial=function(t,e,n,r){if(!t||"string"!=typeof e)return!1;var i=t.get(e);return!!i&&i.match(n,r)},t}(),O=function O(t){this.selectors=t,this.alreadyMatched=!1},I=function(){function t(t,e,n){this.selector=t,this.cbContext=e,this.listContext=n,this.notSelectors=t.notSelectors}return t.prototype.finalize=function(t,e){var n=!0;return!(this.notSelectors.length>0)||this.listContext&&this.listContext.alreadyMatched||(n=!k.createNotMatcher(this.notSelectors).match(t,null)),!n||!e||this.listContext&&this.listContext.alreadyMatched||(this.listContext&&(this.listContext.alreadyMatched=!0),e(this.selector,this.cbContext)),n},t}(),M=rt("Inject",function(t){return{token:t}}),D=rt("InjectionToken",function(t){return{_desc:t,ngInjectableDef:void 0}}),R=rt("Attribute",function(t){return{attributeName:t}}),L=rt("ContentChildren",function(t,e){return void 0===e&&(e={}),a({selector:t,first:!1,isViewQuery:!1,descendants:!1},e)}),j=rt("ContentChild",function(t,e){return void 0===e&&(e={}),a({selector:t,first:!0,isViewQuery:!1,descendants:!0},e)}),F=rt("ViewChildren",function(t,e){return void 0===e&&(e={}),a({selector:t,first:!1,isViewQuery:!0,descendants:!0},e)}),V=rt("ViewChild",function(t,e){return a({selector:t,first:!0,isViewQuery:!0,descendants:!0},e)}),B=rt("Directive",function(t){return void 0===t&&(t={}),t});!function(t){t[t.Emulated=0]="Emulated",t[t.Native=1]="Native",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(T||(T={})),function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"}(P||(P={}));var H,q,U,K=rt("Component",function(t){return void 0===t&&(t={}),a({changeDetection:P.Default},t)}),W=rt("Pipe",function(t){return a({pure:!0},t)}),z=rt("Input",function(t){return{bindingPropertyName:t}}),Q=rt("Output",function(t){return{bindingPropertyName:t}}),G=rt("HostBinding",function(t){return{hostPropertyName:t}}),X=rt("HostListener",function(t,e){return{eventName:t,args:e}}),$=rt("NgModule",function(t){return t}),Y=rt("Injectable",function(t){return void 0===t&&(t={}),t}),Z=rt("Optional"),J=rt("Self"),tt=rt("SkipSelf"),et=rt("Host"),nt=Function;function rt(t,e){var n=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e?e.apply(void 0,f(n)):{};return a({ngMetadataName:t},i)};return n.isTypeOf=function(e){return e&&e.ngMetadataName===t},n.ngMetadataName=t,n}function it(t){var e=function n(t){var e=t.classNames&&t.classNames.length?f([8],t.classNames):[];return f([t.element&&"*"!==t.element?t.element:""],t.attrs,e)}(t),r=t.notSelectors&&t.notSelectors.length?t.notSelectors.map(function(t){return function e(t){var e=t.classNames&&t.classNames.length?f([8],t.classNames):[];return t.element?f([5,t.element],t.attrs,e):t.attrs.length?f([3],t.attrs,e):t.classNames&&t.classNames.length?f([9],t.classNames):[]}(t)}):[];return e.concat.apply(e,f(r))}function ot(t){return N.parse(t).map(it)}
|
|
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(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"}(H||(H={})),function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"}(q||(q={})),function(t){t[t.Const=0]="Const"}(U||(U={}));var st,at=function(){function t(t){void 0===t&&(t=null),this.modifiers=t,t||(this.modifiers=[])}return t.prototype.hasModifier=function(t){return-1!==this.modifiers.indexOf(t)},t}();!function(t){t[t.Dynamic=0]="Dynamic",t[t.Bool=1]="Bool",t[t.String=2]="String",t[t.Int=3]="Int",t[t.Number=4]="Number",t[t.Function=5]="Function",t[t.Inferred=6]="Inferred",t[t.None=7]="None"}(st||(st={}));var ut,ct=function(t){function e(e,n){void 0===n&&(n=null);var r=t.call(this,n)||this;return r.name=e,r}return o(e,t),e.prototype.visitType=function(t,e){return t.visitBuiltinType(this,e)},e}(at),lt=function(t){function e(e,n,r){void 0===n&&(n=null),void 0===r&&(r=null);var i=t.call(this,n)||this;return i.value=e,i.typeParams=r,i}return o(e,t),e.prototype.visitType=function(t,e){return t.visitExpressionType(this,e)},e}(at),pt=(function(t){function e(e,n){void 0===n&&(n=null);var r=t.call(this,n)||this;return r.of=e,r}o(e,t),e.prototype.visitType=function(t,e){return t.visitArrayType(this,e)}}(at),function(t){function e(e,n){void 0===n&&(n=null);var r=t.call(this,n)||this;return r.valueType=e||null,r}return o(e,t),e.prototype.visitType=function(t,e){return t.visitMapType(this,e)},e}(at)),ht=new ct(st.Dynamic),ft=new ct(st.Inferred),dt=new ct(st.Bool),vt=(new ct(st.Int),new ct(st.Number)),yt=(new ct(st.String),new ct(st.Function),new ct(st.None));function mt(t,e){return null==t||null==e?t==e:t.isEquivalent(e)}function gt(t,e){var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(!t[r].isEquivalent(e[r]))return!1;return!0}!function(t){t[t.Equals=0]="Equals",t[t.NotEquals=1]="NotEquals",t[t.Identical=2]="Identical",t[t.NotIdentical=3]="NotIdentical",t[t.Minus=4]="Minus",t[t.Plus=5]="Plus",t[t.Divide=6]="Divide",t[t.Multiply=7]="Multiply",t[t.Modulo=8]="Modulo",t[t.And=9]="And",t[t.Or=10]="Or",t[t.BitwiseAnd=11]="BitwiseAnd",t[t.Lower=12]="Lower",t[t.LowerEquals=13]="LowerEquals",t[t.Bigger=14]="Bigger",t[t.BiggerEquals=15]="BiggerEquals"}(ut||(ut={}));var _t,bt=function(){function t(t,e){this.type=t||null,this.sourceSpan=e||null}return t.prototype.prop=function(t,e){return new Ht(this,t,null,e)},t.prototype.key=function(t,e,n){return new qt(this,t,e,n)},t.prototype.callMethod=function(t,e,n){return new Nt(this,t,e,null,n)},t.prototype.callFn=function(t,e){return new kt(this,t,null,e)},t.prototype.instantiate=function(t,e,n){return new Ot(this,t,e,n)},t.prototype.conditional=function(t,e,n){return void 0===e&&(e=null),new Rt(this,t,e,null,n)},t.prototype.equals=function(t,e){return new Bt(ut.Equals,this,t,null,e)},t.prototype.notEquals=function(t,e){return new Bt(ut.NotEquals,this,t,null,e)},t.prototype.identical=function(t,e){return new Bt(ut.Identical,this,t,null,e)},t.prototype.notIdentical=function(t,e){return new Bt(ut.NotIdentical,this,t,null,e)},t.prototype.minus=function(t,e){return new Bt(ut.Minus,this,t,null,e)},t.prototype.plus=function(t,e){return new Bt(ut.Plus,this,t,null,e)},t.prototype.divide=function(t,e){return new Bt(ut.Divide,this,t,null,e)},t.prototype.multiply=function(t,e){return new Bt(ut.Multiply,this,t,null,e)},t.prototype.modulo=function(t,e){return new Bt(ut.Modulo,this,t,null,e)},t.prototype.and=function(t,e){return new Bt(ut.And,this,t,null,e)},t.prototype.bitwiseAnd=function(t,e,n){return void 0===n&&(n=!0),new Bt(ut.BitwiseAnd,this,t,null,e,n)},t.prototype.or=function(t,e){return new Bt(ut.Or,this,t,null,e)},t.prototype.lower=function(t,e){return new Bt(ut.Lower,this,t,null,e)},t.prototype.lowerEquals=function(t,e){return new Bt(ut.LowerEquals,this,t,null,e)},t.prototype.bigger=function(t,e){return new Bt(ut.Bigger,this,t,null,e)},t.prototype.biggerEquals=function(t,e){return new Bt(ut.BiggerEquals,this,t,null,e)},t.prototype.isBlank=function(t){return this.equals(Gt,t)},t.prototype.cast=function(t,e){return new jt(this,t,e)},t.prototype.toStmt=function(){return new Zt(this,null)},t}();!function(t){t[t.This=0]="This",t[t.Super=1]="Super",t[t.CatchError=2]="CatchError",t[t.CatchStack=3]="CatchStack"}(_t||(_t={}));var xt,wt=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return"string"==typeof e?(i.name=e,i.builtin=null):(i.name=null,i.builtin=e),i}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.name===t.name&&this.builtin===t.builtin},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitReadVarExpr(this,e)},e.prototype.set=function(t){if(!this.name)throw new Error("Built in variable "+this.builtin+" can not be assigned to.");return new Ct(this.name,t,null,this.sourceSpan)},e}(bt),Et=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.expr=e,i}return o(e,t),e.prototype.visitExpression=function(t,e){return t.visitTypeofExpr(this,e)},e.prototype.isEquivalent=function(t){return t instanceof e&&t.expr.isEquivalent(this.expr)},e.prototype.isConstant=function(){return this.expr.isConstant()},e}(bt),St=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.node=e,i}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.node===t.node},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitWrappedNodeExpr(this,e)},e}(bt),Ct=function(t){function e(e,n,r,i){var o=t.call(this,r||n.type,i)||this;return o.name=e,o.value=n,o}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.name===t.name&&this.value.isEquivalent(t.value)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitWriteVarExpr(this,e)},e.prototype.toDeclStmt=function(t,e){return new $t(this.name,this.value,t,e,this.sourceSpan)},e.prototype.toConstDecl=function(){return this.toDeclStmt(ft,[At.Final])},e}(bt),Tt=function(t){function e(e,n,r,i,o){var s=t.call(this,i||r.type,o)||this;return s.receiver=e,s.index=n,s.value=r,s}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)&&this.value.isEquivalent(t.value)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitWriteKeyExpr(this,e)},e}(bt),Pt=function(t){function e(e,n,r,i,o){var s=t.call(this,i||r.type,o)||this;return s.receiver=e,s.name=n,s.value=r,s}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name&&this.value.isEquivalent(t.value)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitWritePropExpr(this,e)},e}(bt);!function(t){t[t.ConcatArray=0]="ConcatArray",t[t.SubscribeObservable=1]="SubscribeObservable",t[t.Bind=2]="Bind"}(xt||(xt={}));var At,Nt=function(t){function e(e,n,r,i,o){var s=t.call(this,i,o)||this;return s.receiver=e,s.args=r,"string"==typeof n?(s.name=n,s.builtin=null):(s.name=null,s.builtin=n),s}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name&&this.builtin===t.builtin&>(this.args,t.args)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitInvokeMethodExpr(this,e)},e}(bt),kt=function(t){function e(e,n,r,i,o){void 0===o&&(o=!1);var s=t.call(this,r,i)||this;return s.fn=e,s.args=n,s.pure=o,s}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.fn.isEquivalent(t.fn)&>(this.args,t.args)&&this.pure===t.pure},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitInvokeFunctionExpr(this,e)},e}(bt),Ot=function(t){function e(e,n,r,i){var o=t.call(this,r,i)||this;return o.classExpr=e,o.args=n,o}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.classExpr.isEquivalent(t.classExpr)&>(this.args,t.args)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitInstantiateExpr(this,e)},e}(bt),It=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.value=e,i}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.value===t.value},e.prototype.isConstant=function(){return!0},e.prototype.visitExpression=function(t,e){return t.visitLiteralExpr(this,e)},e}(bt),Mt=function(t){function e(e,n,r,i){void 0===r&&(r=null);var o=t.call(this,n,i)||this;return o.value=e,o.typeParams=r,o}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.value.name===t.value.name&&this.value.moduleName===t.value.moduleName&&this.value.runtime===t.value.runtime},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitExternalExpr(this,e)},e}(bt),Rt=function(t){function e(e,n,r,i,o){void 0===r&&(r=null);var s=t.call(this,i||n.type,o)||this;return s.condition=e,s.falseCase=r,s.trueCase=n,s}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.condition.isEquivalent(t.condition)&&this.trueCase.isEquivalent(t.trueCase)&&mt(this.falseCase,t.falseCase)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitConditionalExpr(this,e)},e}(bt),Dt=function(t){function e(e,n){var r=t.call(this,dt,n)||this;return r.condition=e,r}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.condition.isEquivalent(t.condition)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitNotExpr(this,e)},e}(bt),Lt=function(t){function e(e,n){var r=t.call(this,e.type,n)||this;return r.condition=e,r}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.condition.isEquivalent(t.condition)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitAssertNotNullExpr(this,e)},e}(bt),jt=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.value=e,i}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.value.isEquivalent(t.value)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitCastExpr(this,e)},e}(bt),Ft=function(){function t(t,e){void 0===e&&(e=null),this.name=t,this.type=e}return t.prototype.isEquivalent=function(t){return this.name===t.name},t}(),Vt=function(t){function e(e,n,r,i,o){var s=t.call(this,r,i)||this;return s.params=e,s.statements=n,s.name=o,s}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&>(this.params,t.params)&>(this.statements,t.statements)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitFunctionExpr(this,e)},e.prototype.toDeclStmt=function(t,e){return void 0===e&&(e=null),new Yt(t,this.params,this.statements,this.type,e,this.sourceSpan)},e}(bt),Bt=function(t){function e(e,n,r,i,o,s){void 0===s&&(s=!0);var a=t.call(this,i||n.type,o)||this;return a.operator=e,a.rhs=r,a.parens=s,a.lhs=n,a}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.operator===t.operator&&this.lhs.isEquivalent(t.lhs)&&this.rhs.isEquivalent(t.rhs)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitBinaryOperatorExpr(this,e)},e}(bt),Ht=function(t){function e(e,n,r,i){var o=t.call(this,r,i)||this;return o.receiver=e,o.name=n,o}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitReadPropExpr(this,e)},e.prototype.set=function(t){return new Pt(this.receiver,this.name,t,null,this.sourceSpan)},e}(bt),qt=function(t){function e(e,n,r,i){var o=t.call(this,r,i)||this;return o.receiver=e,o.index=n,o}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitReadKeyExpr(this,e)},e.prototype.set=function(t){return new Tt(this.receiver,this.index,t,null,this.sourceSpan)},e}(bt),Ut=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.entries=e,i}return o(e,t),e.prototype.isConstant=function(){return this.entries.every(function(t){return t.isConstant()})},e.prototype.isEquivalent=function(t){return t instanceof e&>(this.entries,t.entries)},e.prototype.visitExpression=function(t,e){return t.visitLiteralArrayExpr(this,e)},e}(bt),Kt=function(){function t(t,e,n){this.key=t,this.value=e,this.quoted=n}return t.prototype.isEquivalent=function(t){return this.key===t.key&&this.value.isEquivalent(t.value)},t}(),Wt=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.entries=e,i.valueType=null,n&&(i.valueType=n.valueType),i}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&>(this.entries,t.entries)},e.prototype.isConstant=function(){return this.entries.every(function(t){return t.value.isConstant()})},e.prototype.visitExpression=function(t,e){return t.visitLiteralMapExpr(this,e)},e}(bt),zt=function(t){function e(e,n){var r=t.call(this,e[e.length-1].type,n)||this;return r.parts=e,r}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&>(this.parts,t.parts)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitCommaExpr(this,e)},e}(bt),Qt=(new wt(_t.This,null,null),new wt(_t.Super,null,null),new wt(_t.CatchError,null,null),new wt(_t.CatchStack,null,null),new It(null,null,null)),Gt=new It(null,ft,null);!function(t){t[t.Final=0]="Final",t[t.Private=1]="Private",t[t.Exported=2]="Exported",t[t.Static=3]="Static"}(At||(At={}));var Xt=function(){function t(t,e){this.modifiers=t||[],this.sourceSpan=e||null}return t.prototype.hasModifier=function(t){return-1!==this.modifiers.indexOf(t)},t}(),$t=function(t){function e(e,n,r,i,o){void 0===i&&(i=null);var s=t.call(this,i,o)||this;return s.name=e,s.value=n,s.type=r||n&&n.type||null,s}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.name===t.name&&(this.value?!!t.value&&this.value.isEquivalent(t.value):!t.value)},e.prototype.visitStatement=function(t,e){return t.visitDeclareVarStmt(this,e)},e}(Xt),Yt=function(t){function e(e,n,r,i,o,s){void 0===o&&(o=null);var a=t.call(this,o,s)||this;return a.name=e,a.params=n,a.statements=r,a.type=i||null,a}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&>(this.params,t.params)&>(this.statements,t.statements)},e.prototype.visitStatement=function(t,e){return t.visitDeclareFunctionStmt(this,e)},e}(Xt),Zt=function(t){function e(e,n){var r=t.call(this,null,n)||this;return r.expr=e,r}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.expr.isEquivalent(t.expr)},e.prototype.visitStatement=function(t,e){return t.visitExpressionStmt(this,e)},e}(Xt),Jt=function(t){function e(e,n){var r=t.call(this,null,n)||this;return r.value=e,r}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.value.isEquivalent(t.value)},e.prototype.visitStatement=function(t,e){return t.visitReturnStmt(this,e)},e}(Xt),te=function(){function t(t,e){this.modifiers=e,e||(this.modifiers=[]),this.type=t||null}return t.prototype.hasModifier=function(t){return-1!==this.modifiers.indexOf(t)},t}(),ee=(function(t){function e(e,n,r,i){void 0===r&&(r=null);var o=t.call(this,n,r)||this;return o.name=e,o.initializer=i,o}o(e,t),e.prototype.isEquivalent=function(t){return this.name===t.name}}(te),function(t){function e(e,n,r,i,o){void 0===o&&(o=null);var s=t.call(this,i,o)||this;return s.name=e,s.params=n,s.body=r,s}return o(e,t),e.prototype.isEquivalent=function(t){return this.name===t.name&>(this.body,t.body)},e}(te)),ne=function(t){function e(e,n,r,i){void 0===i&&(i=null);var o=t.call(this,r,i)||this;return o.name=e,o.body=n,o}return o(e,t),e.prototype.isEquivalent=function(t){return this.name===t.name&>(this.body,t.body)},e}(te),re=function(t){function e(e,n,r,i,o,s,a,u){void 0===a&&(a=null);var c=t.call(this,a,u)||this;return c.name=e,c.parent=n,c.fields=r,c.getters=i,c.constructorMethod=o,c.methods=s,c}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.name===t.name&&mt(this.parent,t.parent)&>(this.fields,t.fields)&>(this.getters,t.getters)&&this.constructorMethod.isEquivalent(t.constructorMethod)&>(this.methods,t.methods)},e.prototype.visitStatement=function(t,e){return t.visitDeclareClassStmt(this,e)},e}(Xt),ie=function(t){function e(e,n,r,i){void 0===r&&(r=[]);var o=t.call(this,null,i)||this;return o.condition=e,o.trueCase=n,o.falseCase=r,o}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.condition.isEquivalent(t.condition)&>(this.trueCase,t.trueCase)&>(this.falseCase,t.falseCase)},e.prototype.visitStatement=function(t,e){return t.visitIfStmt(this,e)},e}(Xt),oe=(function(t){function e(e,n,r){void 0===n&&(n=!1);var i=t.call(this,null,r)||this;return i.comment=e,i.multiline=n,i}o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e},e.prototype.visitStatement=function(t,e){return t.visitCommentStmt(this,e)}}(Xt),function(t){function e(e,n){void 0===e&&(e=[]);var r=t.call(this,null,n)||this;return r.tags=e,r}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.toString()===t.toString()},e.prototype.visitStatement=function(t,e){return t.visitJSDocCommentStmt(this,e)},e.prototype.toString=function(){return function t(e){var n,r;if(0===e.length)return"";var i="*\n";try{for(var o=p(e),s=o.next();!s.done;s=o.next())i+=" *",i+=ge(s.value).replace(/\n/g,"\n * "),i+="\n"}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i+" "}
|
|
35
|
+
*/!function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"}(H||(H={})),function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"}(q||(q={})),function(t){t[t.Const=0]="Const"}(U||(U={}));var st,at=function(){function t(t){void 0===t&&(t=null),this.modifiers=t,t||(this.modifiers=[])}return t.prototype.hasModifier=function(t){return-1!==this.modifiers.indexOf(t)},t}();!function(t){t[t.Dynamic=0]="Dynamic",t[t.Bool=1]="Bool",t[t.String=2]="String",t[t.Int=3]="Int",t[t.Number=4]="Number",t[t.Function=5]="Function",t[t.Inferred=6]="Inferred",t[t.None=7]="None"}(st||(st={}));var ut,ct=function(t){function e(e,n){void 0===n&&(n=null);var r=t.call(this,n)||this;return r.name=e,r}return o(e,t),e.prototype.visitType=function(t,e){return t.visitBuiltinType(this,e)},e}(at),lt=function(t){function e(e,n,r){void 0===n&&(n=null),void 0===r&&(r=null);var i=t.call(this,n)||this;return i.value=e,i.typeParams=r,i}return o(e,t),e.prototype.visitType=function(t,e){return t.visitExpressionType(this,e)},e}(at),pt=(function(t){function e(e,n){void 0===n&&(n=null);var r=t.call(this,n)||this;return r.of=e,r}o(e,t),e.prototype.visitType=function(t,e){return t.visitArrayType(this,e)}}(at),function(t){function e(e,n){void 0===n&&(n=null);var r=t.call(this,n)||this;return r.valueType=e||null,r}return o(e,t),e.prototype.visitType=function(t,e){return t.visitMapType(this,e)},e}(at)),ht=new ct(st.Dynamic),ft=new ct(st.Inferred),dt=new ct(st.Bool),vt=(new ct(st.Int),new ct(st.Number)),yt=(new ct(st.String),new ct(st.Function),new ct(st.None));function mt(t,e){return null==t||null==e?t==e:t.isEquivalent(e)}function gt(t,e){var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(!t[r].isEquivalent(e[r]))return!1;return!0}!function(t){t[t.Equals=0]="Equals",t[t.NotEquals=1]="NotEquals",t[t.Identical=2]="Identical",t[t.NotIdentical=3]="NotIdentical",t[t.Minus=4]="Minus",t[t.Plus=5]="Plus",t[t.Divide=6]="Divide",t[t.Multiply=7]="Multiply",t[t.Modulo=8]="Modulo",t[t.And=9]="And",t[t.Or=10]="Or",t[t.BitwiseAnd=11]="BitwiseAnd",t[t.Lower=12]="Lower",t[t.LowerEquals=13]="LowerEquals",t[t.Bigger=14]="Bigger",t[t.BiggerEquals=15]="BiggerEquals"}(ut||(ut={}));var _t,bt=function(){function t(t,e){this.type=t||null,this.sourceSpan=e||null}return t.prototype.prop=function(t,e){return new Ht(this,t,null,e)},t.prototype.key=function(t,e,n){return new qt(this,t,e,n)},t.prototype.callMethod=function(t,e,n){return new Nt(this,t,e,null,n)},t.prototype.callFn=function(t,e){return new kt(this,t,null,e)},t.prototype.instantiate=function(t,e,n){return new Ot(this,t,e,n)},t.prototype.conditional=function(t,e,n){return void 0===e&&(e=null),new Dt(this,t,e,null,n)},t.prototype.equals=function(t,e){return new Bt(ut.Equals,this,t,null,e)},t.prototype.notEquals=function(t,e){return new Bt(ut.NotEquals,this,t,null,e)},t.prototype.identical=function(t,e){return new Bt(ut.Identical,this,t,null,e)},t.prototype.notIdentical=function(t,e){return new Bt(ut.NotIdentical,this,t,null,e)},t.prototype.minus=function(t,e){return new Bt(ut.Minus,this,t,null,e)},t.prototype.plus=function(t,e){return new Bt(ut.Plus,this,t,null,e)},t.prototype.divide=function(t,e){return new Bt(ut.Divide,this,t,null,e)},t.prototype.multiply=function(t,e){return new Bt(ut.Multiply,this,t,null,e)},t.prototype.modulo=function(t,e){return new Bt(ut.Modulo,this,t,null,e)},t.prototype.and=function(t,e){return new Bt(ut.And,this,t,null,e)},t.prototype.bitwiseAnd=function(t,e,n){return void 0===n&&(n=!0),new Bt(ut.BitwiseAnd,this,t,null,e,n)},t.prototype.or=function(t,e){return new Bt(ut.Or,this,t,null,e)},t.prototype.lower=function(t,e){return new Bt(ut.Lower,this,t,null,e)},t.prototype.lowerEquals=function(t,e){return new Bt(ut.LowerEquals,this,t,null,e)},t.prototype.bigger=function(t,e){return new Bt(ut.Bigger,this,t,null,e)},t.prototype.biggerEquals=function(t,e){return new Bt(ut.BiggerEquals,this,t,null,e)},t.prototype.isBlank=function(t){return this.equals(Gt,t)},t.prototype.cast=function(t,e){return new jt(this,t,e)},t.prototype.toStmt=function(){return new Zt(this,null)},t}();!function(t){t[t.This=0]="This",t[t.Super=1]="Super",t[t.CatchError=2]="CatchError",t[t.CatchStack=3]="CatchStack"}(_t||(_t={}));var xt,wt=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return"string"==typeof e?(i.name=e,i.builtin=null):(i.name=null,i.builtin=e),i}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.name===t.name&&this.builtin===t.builtin},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitReadVarExpr(this,e)},e.prototype.set=function(t){if(!this.name)throw new Error("Built in variable "+this.builtin+" can not be assigned to.");return new Ct(this.name,t,null,this.sourceSpan)},e}(bt),Et=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.expr=e,i}return o(e,t),e.prototype.visitExpression=function(t,e){return t.visitTypeofExpr(this,e)},e.prototype.isEquivalent=function(t){return t instanceof e&&t.expr.isEquivalent(this.expr)},e.prototype.isConstant=function(){return this.expr.isConstant()},e}(bt),St=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.node=e,i}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.node===t.node},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitWrappedNodeExpr(this,e)},e}(bt),Ct=function(t){function e(e,n,r,i){var o=t.call(this,r||n.type,i)||this;return o.name=e,o.value=n,o}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.name===t.name&&this.value.isEquivalent(t.value)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitWriteVarExpr(this,e)},e.prototype.toDeclStmt=function(t,e){return new $t(this.name,this.value,t,e,this.sourceSpan)},e.prototype.toConstDecl=function(){return this.toDeclStmt(ft,[At.Final])},e}(bt),Tt=function(t){function e(e,n,r,i,o){var s=t.call(this,i||r.type,o)||this;return s.receiver=e,s.index=n,s.value=r,s}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)&&this.value.isEquivalent(t.value)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitWriteKeyExpr(this,e)},e}(bt),Pt=function(t){function e(e,n,r,i,o){var s=t.call(this,i||r.type,o)||this;return s.receiver=e,s.name=n,s.value=r,s}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name&&this.value.isEquivalent(t.value)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitWritePropExpr(this,e)},e}(bt);!function(t){t[t.ConcatArray=0]="ConcatArray",t[t.SubscribeObservable=1]="SubscribeObservable",t[t.Bind=2]="Bind"}(xt||(xt={}));var At,Nt=function(t){function e(e,n,r,i,o){var s=t.call(this,i,o)||this;return s.receiver=e,s.args=r,"string"==typeof n?(s.name=n,s.builtin=null):(s.name=null,s.builtin=n),s}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name&&this.builtin===t.builtin&>(this.args,t.args)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitInvokeMethodExpr(this,e)},e}(bt),kt=function(t){function e(e,n,r,i,o){void 0===o&&(o=!1);var s=t.call(this,r,i)||this;return s.fn=e,s.args=n,s.pure=o,s}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.fn.isEquivalent(t.fn)&>(this.args,t.args)&&this.pure===t.pure},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitInvokeFunctionExpr(this,e)},e}(bt),Ot=function(t){function e(e,n,r,i){var o=t.call(this,r,i)||this;return o.classExpr=e,o.args=n,o}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.classExpr.isEquivalent(t.classExpr)&>(this.args,t.args)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitInstantiateExpr(this,e)},e}(bt),It=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.value=e,i}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.value===t.value},e.prototype.isConstant=function(){return!0},e.prototype.visitExpression=function(t,e){return t.visitLiteralExpr(this,e)},e}(bt),Mt=function(t){function e(e,n,r,i){void 0===r&&(r=null);var o=t.call(this,n,i)||this;return o.value=e,o.typeParams=r,o}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.value.name===t.value.name&&this.value.moduleName===t.value.moduleName&&this.value.runtime===t.value.runtime},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitExternalExpr(this,e)},e}(bt),Dt=function(t){function e(e,n,r,i,o){void 0===r&&(r=null);var s=t.call(this,i||n.type,o)||this;return s.condition=e,s.falseCase=r,s.trueCase=n,s}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.condition.isEquivalent(t.condition)&&this.trueCase.isEquivalent(t.trueCase)&&mt(this.falseCase,t.falseCase)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitConditionalExpr(this,e)},e}(bt),Rt=function(t){function e(e,n){var r=t.call(this,dt,n)||this;return r.condition=e,r}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.condition.isEquivalent(t.condition)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitNotExpr(this,e)},e}(bt),Lt=function(t){function e(e,n){var r=t.call(this,e.type,n)||this;return r.condition=e,r}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.condition.isEquivalent(t.condition)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitAssertNotNullExpr(this,e)},e}(bt),jt=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.value=e,i}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.value.isEquivalent(t.value)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitCastExpr(this,e)},e}(bt),Ft=function(){function t(t,e){void 0===e&&(e=null),this.name=t,this.type=e}return t.prototype.isEquivalent=function(t){return this.name===t.name},t}(),Vt=function(t){function e(e,n,r,i,o){var s=t.call(this,r,i)||this;return s.params=e,s.statements=n,s.name=o,s}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&>(this.params,t.params)&>(this.statements,t.statements)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitFunctionExpr(this,e)},e.prototype.toDeclStmt=function(t,e){return void 0===e&&(e=null),new Yt(t,this.params,this.statements,this.type,e,this.sourceSpan)},e}(bt),Bt=function(t){function e(e,n,r,i,o,s){void 0===s&&(s=!0);var a=t.call(this,i||n.type,o)||this;return a.operator=e,a.rhs=r,a.parens=s,a.lhs=n,a}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.operator===t.operator&&this.lhs.isEquivalent(t.lhs)&&this.rhs.isEquivalent(t.rhs)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitBinaryOperatorExpr(this,e)},e}(bt),Ht=function(t){function e(e,n,r,i){var o=t.call(this,r,i)||this;return o.receiver=e,o.name=n,o}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitReadPropExpr(this,e)},e.prototype.set=function(t){return new Pt(this.receiver,this.name,t,null,this.sourceSpan)},e}(bt),qt=function(t){function e(e,n,r,i){var o=t.call(this,r,i)||this;return o.receiver=e,o.index=n,o}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitReadKeyExpr(this,e)},e.prototype.set=function(t){return new Tt(this.receiver,this.index,t,null,this.sourceSpan)},e}(bt),Ut=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.entries=e,i}return o(e,t),e.prototype.isConstant=function(){return this.entries.every(function(t){return t.isConstant()})},e.prototype.isEquivalent=function(t){return t instanceof e&>(this.entries,t.entries)},e.prototype.visitExpression=function(t,e){return t.visitLiteralArrayExpr(this,e)},e}(bt),Kt=function(){function t(t,e,n){this.key=t,this.value=e,this.quoted=n}return t.prototype.isEquivalent=function(t){return this.key===t.key&&this.value.isEquivalent(t.value)},t}(),Wt=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.entries=e,i.valueType=null,n&&(i.valueType=n.valueType),i}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&>(this.entries,t.entries)},e.prototype.isConstant=function(){return this.entries.every(function(t){return t.value.isConstant()})},e.prototype.visitExpression=function(t,e){return t.visitLiteralMapExpr(this,e)},e}(bt),zt=function(t){function e(e,n){var r=t.call(this,e[e.length-1].type,n)||this;return r.parts=e,r}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&>(this.parts,t.parts)},e.prototype.isConstant=function(){return!1},e.prototype.visitExpression=function(t,e){return t.visitCommaExpr(this,e)},e}(bt),Qt=(new wt(_t.This,null,null),new wt(_t.Super,null,null),new wt(_t.CatchError,null,null),new wt(_t.CatchStack,null,null),new It(null,null,null)),Gt=new It(null,ft,null);!function(t){t[t.Final=0]="Final",t[t.Private=1]="Private",t[t.Exported=2]="Exported",t[t.Static=3]="Static"}(At||(At={}));var Xt=function(){function t(t,e){this.modifiers=t||[],this.sourceSpan=e||null}return t.prototype.hasModifier=function(t){return-1!==this.modifiers.indexOf(t)},t}(),$t=function(t){function e(e,n,r,i,o){void 0===i&&(i=null);var s=t.call(this,i,o)||this;return s.name=e,s.value=n,s.type=r||n&&n.type||null,s}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.name===t.name&&(this.value?!!t.value&&this.value.isEquivalent(t.value):!t.value)},e.prototype.visitStatement=function(t,e){return t.visitDeclareVarStmt(this,e)},e}(Xt),Yt=function(t){function e(e,n,r,i,o,s){void 0===o&&(o=null);var a=t.call(this,o,s)||this;return a.name=e,a.params=n,a.statements=r,a.type=i||null,a}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&>(this.params,t.params)&>(this.statements,t.statements)},e.prototype.visitStatement=function(t,e){return t.visitDeclareFunctionStmt(this,e)},e}(Xt),Zt=function(t){function e(e,n){var r=t.call(this,null,n)||this;return r.expr=e,r}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.expr.isEquivalent(t.expr)},e.prototype.visitStatement=function(t,e){return t.visitExpressionStmt(this,e)},e}(Xt),Jt=function(t){function e(e,n){var r=t.call(this,null,n)||this;return r.value=e,r}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.value.isEquivalent(t.value)},e.prototype.visitStatement=function(t,e){return t.visitReturnStmt(this,e)},e}(Xt),te=function(){function t(t,e){this.modifiers=e,e||(this.modifiers=[]),this.type=t||null}return t.prototype.hasModifier=function(t){return-1!==this.modifiers.indexOf(t)},t}(),ee=(function(t){function e(e,n,r,i){void 0===r&&(r=null);var o=t.call(this,n,r)||this;return o.name=e,o.initializer=i,o}o(e,t),e.prototype.isEquivalent=function(t){return this.name===t.name}}(te),function(t){function e(e,n,r,i,o){void 0===o&&(o=null);var s=t.call(this,i,o)||this;return s.name=e,s.params=n,s.body=r,s}return o(e,t),e.prototype.isEquivalent=function(t){return this.name===t.name&>(this.body,t.body)},e}(te)),ne=function(t){function e(e,n,r,i){void 0===i&&(i=null);var o=t.call(this,r,i)||this;return o.name=e,o.body=n,o}return o(e,t),e.prototype.isEquivalent=function(t){return this.name===t.name&>(this.body,t.body)},e}(te),re=function(t){function e(e,n,r,i,o,s,a,u){void 0===a&&(a=null);var c=t.call(this,a,u)||this;return c.name=e,c.parent=n,c.fields=r,c.getters=i,c.constructorMethod=o,c.methods=s,c}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.name===t.name&&mt(this.parent,t.parent)&>(this.fields,t.fields)&>(this.getters,t.getters)&&this.constructorMethod.isEquivalent(t.constructorMethod)&>(this.methods,t.methods)},e.prototype.visitStatement=function(t,e){return t.visitDeclareClassStmt(this,e)},e}(Xt),ie=function(t){function e(e,n,r,i){void 0===r&&(r=[]);var o=t.call(this,null,i)||this;return o.condition=e,o.trueCase=n,o.falseCase=r,o}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.condition.isEquivalent(t.condition)&>(this.trueCase,t.trueCase)&>(this.falseCase,t.falseCase)},e.prototype.visitStatement=function(t,e){return t.visitIfStmt(this,e)},e}(Xt),oe=(function(t){function e(e,n,r){void 0===n&&(n=!1);var i=t.call(this,null,r)||this;return i.comment=e,i.multiline=n,i}o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e},e.prototype.visitStatement=function(t,e){return t.visitCommentStmt(this,e)}}(Xt),function(t){function e(e,n){void 0===e&&(e=[]);var r=t.call(this,null,n)||this;return r.tags=e,r}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&&this.toString()===t.toString()},e.prototype.visitStatement=function(t,e){return t.visitJSDocCommentStmt(this,e)},e.prototype.toString=function(){return function t(e){var n,r;if(0===e.length)return"";var i="*\n";try{for(var o=p(e),s=o.next();!s.done;s=o.next())i+=" *",i+=ge(s.value).replace(/\n/g,"\n * "),i+="\n"}catch(t){n={error:t}}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)},e}(Xt)),se=function(t){function e(e,n,r){var i=t.call(this,null,r)||this;return i.bodyStmts=e,i.catchStmts=n,i}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&>(this.bodyStmts,t.bodyStmts)&>(this.catchStmts,t.catchStmts)},e.prototype.visitStatement=function(t,e){return t.visitTryCatchStmt(this,e)},e}(Xt),ae=function(t){function e(e,n){var r=t.call(this,null,n)||this;return r.error=e,r}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof se&&this.error.isEquivalent(t.error)},e.prototype.visitStatement=function(t,e){return t.visitThrowStmt(this,e)},e}(Xt),ue=function(){function t(){}return t.prototype.transformExpr=function(t,e){return t},t.prototype.transformStmt=function(t,e){return t},t.prototype.visitReadVarExpr=function(t,e){return this.transformExpr(t,e)},t.prototype.visitWrappedNodeExpr=function(t,e){return this.transformExpr(t,e)},t.prototype.visitTypeofExpr=function(t,e){return this.transformExpr(new Et(t.expr.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitWriteVarExpr=function(t,e){return this.transformExpr(new Ct(t.name,t.value.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitWriteKeyExpr=function(t,e){return this.transformExpr(new Tt(t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),t.value.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitWritePropExpr=function(t,e){return this.transformExpr(new Pt(t.receiver.visitExpression(this,e),t.name,t.value.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitInvokeMethodExpr=function(t,e){var n=t.builtin||t.name;return this.transformExpr(new Nt(t.receiver.visitExpression(this,e),n,this.visitAllExpressions(t.args,e),t.type,t.sourceSpan),e)},t.prototype.visitInvokeFunctionExpr=function(t,e){return this.transformExpr(new kt(t.fn.visitExpression(this,e),this.visitAllExpressions(t.args,e),t.type,t.sourceSpan),e)},t.prototype.visitInstantiateExpr=function(t,e){return this.transformExpr(new Ot(t.classExpr.visitExpression(this,e),this.visitAllExpressions(t.args,e),t.type,t.sourceSpan),e)},t.prototype.visitLiteralExpr=function(t,e){return this.transformExpr(t,e)},t.prototype.visitExternalExpr=function(t,e){return this.transformExpr(t,e)},t.prototype.visitConditionalExpr=function(t,e){return this.transformExpr(new Rt(t.condition.visitExpression(this,e),t.trueCase.visitExpression(this,e),t.falseCase.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitNotExpr=function(t,e){return this.transformExpr(new Dt(t.condition.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitAssertNotNullExpr=function(t,e){return this.transformExpr(new Lt(t.condition.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitCastExpr=function(t,e){return this.transformExpr(new jt(t.value.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitFunctionExpr=function(t,e){return this.transformExpr(new Vt(t.params,this.visitAllStatements(t.statements,e),t.type,t.sourceSpan),e)},t.prototype.visitBinaryOperatorExpr=function(t,e){return this.transformExpr(new Bt(t.operator,t.lhs.visitExpression(this,e),t.rhs.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitReadPropExpr=function(t,e){return this.transformExpr(new Ht(t.receiver.visitExpression(this,e),t.name,t.type,t.sourceSpan),e)},t.prototype.visitReadKeyExpr=function(t,e){return this.transformExpr(new qt(t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitLiteralArrayExpr=function(t,e){return this.transformExpr(new Ut(this.visitAllExpressions(t.entries,e),t.type,t.sourceSpan),e)},t.prototype.visitLiteralMapExpr=function(t,e){var n=this,r=t.entries.map(function(t){return new Kt(t.key,t.value.visitExpression(n,e),t.quoted)}),i=new pt(t.valueType,null);return this.transformExpr(new Wt(r,i,t.sourceSpan),e)},t.prototype.visitCommaExpr=function(t,e){return this.transformExpr(new zt(this.visitAllExpressions(t.parts,e),t.sourceSpan),e)},t.prototype.visitAllExpressions=function(t,e){var n=this;return t.map(function(t){return t.visitExpression(n,e)})},t.prototype.visitDeclareVarStmt=function(t,e){var n=t.value&&t.value.visitExpression(this,e);return this.transformStmt(new $t(t.name,n,t.type,t.modifiers,t.sourceSpan),e)},t.prototype.visitDeclareFunctionStmt=function(t,e){return this.transformStmt(new Yt(t.name,t.params,this.visitAllStatements(t.statements,e),t.type,t.modifiers,t.sourceSpan),e)},t.prototype.visitExpressionStmt=function(t,e){return this.transformStmt(new Zt(t.expr.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitReturnStmt=function(t,e){return this.transformStmt(new Jt(t.value.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitDeclareClassStmt=function(t,e){var n=this,r=t.parent.visitExpression(this,e),i=t.getters.map(function(t){return new ne(t.name,n.visitAllStatements(t.body,e),t.type,t.modifiers)}),o=t.constructorMethod&&new ee(t.constructorMethod.name,t.constructorMethod.params,this.visitAllStatements(t.constructorMethod.body,e),t.constructorMethod.type,t.constructorMethod.modifiers),s=t.methods.map(function(t){return new ee(t.name,t.params,n.visitAllStatements(t.body,e),t.type,t.modifiers)});return this.transformStmt(new re(t.name,r,t.fields,i,o,s,t.modifiers,t.sourceSpan),e)},t.prototype.visitIfStmt=function(t,e){return this.transformStmt(new ie(t.condition.visitExpression(this,e),this.visitAllStatements(t.trueCase,e),this.visitAllStatements(t.falseCase,e),t.sourceSpan),e)},t.prototype.visitTryCatchStmt=function(t,e){return this.transformStmt(new se(this.visitAllStatements(t.bodyStmts,e),this.visitAllStatements(t.catchStmts,e),t.sourceSpan),e)},t.prototype.visitThrowStmt=function(t,e){return this.transformStmt(new ae(t.error.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitCommentStmt=function(t,e){return this.transformStmt(t,e)},t.prototype.visitJSDocCommentStmt=function(t,e){return this.transformStmt(t,e)},t.prototype.visitAllStatements=function(t,e){var n=this;return t.map(function(t){return t.visitStatement(n,e)})},t}(),ce=function(){function t(){}return t.prototype.visitType=function(t,e){return t},t.prototype.visitExpression=function(t,e){return t.type&&t.type.visitType(this,e),t},t.prototype.visitBuiltinType=function(t,e){return this.visitType(t,e)},t.prototype.visitExpressionType=function(t,e){var n=this;return t.value.visitExpression(this,e),null!==t.typeParams&&t.typeParams.forEach(function(t){return n.visitType(t,e)}),this.visitType(t,e)},t.prototype.visitArrayType=function(t,e){return this.visitType(t,e)},t.prototype.visitMapType=function(t,e){return this.visitType(t,e)},t.prototype.visitWrappedNodeExpr=function(t,e){return t},t.prototype.visitTypeofExpr=function(t,e){return this.visitExpression(t,e)},t.prototype.visitReadVarExpr=function(t,e){return this.visitExpression(t,e)},t.prototype.visitWriteVarExpr=function(t,e){return t.value.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitWriteKeyExpr=function(t,e){return t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),t.value.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitWritePropExpr=function(t,e){return t.receiver.visitExpression(this,e),t.value.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitInvokeMethodExpr=function(t,e){return t.receiver.visitExpression(this,e),this.visitAllExpressions(t.args,e),this.visitExpression(t,e)},t.prototype.visitInvokeFunctionExpr=function(t,e){return t.fn.visitExpression(this,e),this.visitAllExpressions(t.args,e),this.visitExpression(t,e)},t.prototype.visitInstantiateExpr=function(t,e){return t.classExpr.visitExpression(this,e),this.visitAllExpressions(t.args,e),this.visitExpression(t,e)},t.prototype.visitLiteralExpr=function(t,e){return this.visitExpression(t,e)},t.prototype.visitExternalExpr=function(t,e){var n=this;return t.typeParams&&t.typeParams.forEach(function(t){return t.visitType(n,e)}),this.visitExpression(t,e)},t.prototype.visitConditionalExpr=function(t,e){return t.condition.visitExpression(this,e),t.trueCase.visitExpression(this,e),t.falseCase.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitNotExpr=function(t,e){return t.condition.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitAssertNotNullExpr=function(t,e){return t.condition.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitCastExpr=function(t,e){return t.value.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitFunctionExpr=function(t,e){return this.visitAllStatements(t.statements,e),this.visitExpression(t,e)},t.prototype.visitBinaryOperatorExpr=function(t,e){return t.lhs.visitExpression(this,e),t.rhs.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitReadPropExpr=function(t,e){return t.receiver.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitReadKeyExpr=function(t,e){return t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitLiteralArrayExpr=function(t,e){return this.visitAllExpressions(t.entries,e),this.visitExpression(t,e)},t.prototype.visitLiteralMapExpr=function(t,e){var n=this;return t.entries.forEach(function(t){return t.value.visitExpression(n,e)}),this.visitExpression(t,e)},t.prototype.visitCommaExpr=function(t,e){return this.visitAllExpressions(t.parts,e),this.visitExpression(t,e)},t.prototype.visitAllExpressions=function(t,e){var n=this;t.forEach(function(t){return t.visitExpression(n,e)})},t.prototype.visitDeclareVarStmt=function(t,e){return t.value&&t.value.visitExpression(this,e),t.type&&t.type.visitType(this,e),t},t.prototype.visitDeclareFunctionStmt=function(t,e){return this.visitAllStatements(t.statements,e),t.type&&t.type.visitType(this,e),t},t.prototype.visitExpressionStmt=function(t,e){return t.expr.visitExpression(this,e),t},t.prototype.visitReturnStmt=function(t,e){return t.value.visitExpression(this,e),t},t.prototype.visitDeclareClassStmt=function(t,e){var n=this;return t.parent.visitExpression(this,e),t.getters.forEach(function(t){return n.visitAllStatements(t.body,e)}),t.constructorMethod&&this.visitAllStatements(t.constructorMethod.body,e),t.methods.forEach(function(t){return n.visitAllStatements(t.body,e)}),t},t.prototype.visitIfStmt=function(t,e){return t.condition.visitExpression(this,e),this.visitAllStatements(t.trueCase,e),this.visitAllStatements(t.falseCase,e),t},t.prototype.visitTryCatchStmt=function(t,e){return this.visitAllStatements(t.bodyStmts,e),this.visitAllStatements(t.catchStmts,e),t},t.prototype.visitThrowStmt=function(t,e){return t.error.visitExpression(this,e),t},t.prototype.visitCommentStmt=function(t,e){return t},t.prototype.visitJSDocCommentStmt=function(t,e){return t},t.prototype.visitAllStatements=function(t,e){var n=this;t.forEach(function(t){return t.visitStatement(n,e)})},t}();function le(t,e,n){return new wt(t,e,n)}function pe(t,e,n){return void 0===e&&(e=null),new Mt(t,null,e,n)}function he(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),new lt(t,e,n)}function fe(t,e,n){return new Ut(t,e,n)}function de(t,e){return void 0===e&&(e=null),new Wt(t.map(function(t){return new Kt(t.key,t.value,t.quoted)}),e,null)}function ve(t,e,n,r,i){return new Vt(t,e,n,r,i)}function ye(t,e,n){return new ie(t,e,n)}function me(t,e,n){return new It(t,e,n)}function ge(t){var e="";if(t.tagName&&(e+=" @"+t.tagName),t.text){if(t.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');e+=" "+t.text.replace(/@/g,"\\@")}return e}(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.varNames=new Set,e}o(e,t),e.prototype.visitDeclareFunctionStmt=function(t,e){return t},e.prototype.visitDeclareClassStmt=function(t,e){return t},e.prototype.visitReadVarExpr=function(t,e){return t.name&&this.varNames.add(t.name),null}})(ce),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.externalReferences=[],e}o(e,t),e.prototype.visitExternalExpr=function(e,n){return this.externalReferences.push(e.value),t.prototype.visitExternalExpr.call(this,e,n)}}(ce),function(t){function e(e){var n=t.call(this)||this;return n.sourceSpan=e,n}o(e,t),e.prototype._clone=function(t){var e=Object.create(t.constructor.prototype);for(var n in t)e[n]=t[n];return e},e.prototype.transformExpr=function(t,e){return t.sourceSpan||((t=this._clone(t)).sourceSpan=this.sourceSpan),t},e.prototype.transformStmt=function(t,e){return t.sourceSpan||((t=this._clone(t)).sourceSpan=this.sourceSpan),t}}(ue);var _e=/-+([a-z0-9])/g;function be(t,e){return xe(t,":",e)}function xe(t,e,n){var r=t.indexOf(e);return-1==r?n:[t.slice(0,r).trim(),t.slice(r+1).trim()]}function we(t,e,n){return Array.isArray(t)?e.visitArray(t,n):function r(t){return"object"==typeof t&&null!==t&&Object.getPrototypeOf(t)===Ie}(t)?e.visitStringMap(t,n):null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t?e.visitPrimitive(t,n):e.visitOther(t,n)}function Ee(t){return null!==t&&void 0!==t}function Se(t){return void 0===t?null:t}var Ce=function(){function t(){}return t.prototype.visitArray=function(t,e){var n=this;return t.map(function(t){return we(t,n,e)})},t.prototype.visitStringMap=function(t,e){var n=this,r={};return Object.keys(t).forEach(function(i){r[i]=we(t[i],n,e)}),r},t.prototype.visitPrimitive=function(t,e){return t},t.prototype.visitOther=function(t,e){return t},t}(),Te=function(t,e){return Le(t)?t.then(e):e(t)};function Pe(t){throw new Error("Internal Error: "+t)}function Ae(t,e){var n=Error(t);return n[Ne]=!0,e&&(n[ke]=e),n}var Ne="ngSyntaxError",ke="ngParseErrors";function Oe(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}var Ie=Object.getPrototypeOf({});function Me(t){for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r>=55296&&r<=56319&&t.length>n+1){var i=t.charCodeAt(n+1);i>=56320&&i<=57343&&(n++,r=(r-55296<<10)+i-56320+65536)}r<=127?e+=String.fromCharCode(r):r<=2047?e+=String.fromCharCode(r>>6&31|192,63&r|128):r<=65535?e+=String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128):r<=2097151&&(e+=String.fromCharCode(r>>18&7|240,r>>12&63|128,r>>6&63|128,63&r|128))}return e}function Re(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(Re).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;var e=t.toString();if(null==e)return""+e;var n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function De(t){return"function"==typeof t&&t.hasOwnProperty("__forward_ref__")?t():t}function Le(t){return!!t&&"function"==typeof t.then}var je=function je(t){this.full=t;var e=t.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")},Fe="undefined"!=typeof window&&window,Ve="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Be="undefined"!=typeof global&&global||Fe||Ve,He={},qe=function(t){function e(e){var n=t.call(this,e.type)||this;return n.resolved=e,n.original=e,n}return o(e,t),e.prototype.visitExpression=function(t,e){return e===He?this.original.visitExpression(t,e):this.resolved.visitExpression(t,e)},e.prototype.isEquivalent=function(t){return t instanceof e&&this.resolved.isEquivalent(t.resolved)},e.prototype.isConstant=function(){return!0},e.prototype.fixup=function(t){this.resolved=t,this.shared=!0},e}(bt),Ue=function(){function t(){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 t.prototype.getConstLiteral=function(t,e){if(t instanceof It||t instanceof qe)return t;var n=this.keyOf(t),r=this.literals.get(n),i=!1;if(r||(r=new qe(t),this.literals.set(n,r),i=!0),!i&&!r.shared||i&&e){var o=this.freshName();this.statements.push(le(o).set(t).toDeclStmt(ft,[At.Final])),r.fixup(le(o))}return r},t.prototype.getDefinition=function(t,e,n,r){void 0===r&&(r=!1);var i=this.definitionsOf(e),o=i.get(t),s=!1;if(!o){var a=this.propertyNameOf(e);o=new qe(n.importExpr(t).prop(a)),i.set(t,o),s=!0}if(!s&&!o.shared||s&&r){var u=this.freshName();this.statements.push(le(u).set(o.resolved).toDeclStmt(ft,[At.Final])),o.fixup(le(u))}return o},t.prototype.getLiteralFactory=function(t){if(t instanceof Ut){var e=t.entries.map(function(t){return t.isConstant()?t:me(null)}),n=this.keyOf(fe(e));return this._getLiteralFactory(n,t.entries,function(t){return fe(t)})}var r=de(t.entries.map(function(t){return{key:t.key,value:t.value.isConstant()?t.value:me(null),quoted:t.quoted}}));return n=this.keyOf(r),this._getLiteralFactory(n,t.entries.map(function(t){return t.value}),function(e){return de(e.map(function(e,n){return{key:t.entries[n].key,value:e,quoted:t.entries[n].quoted}}))})},t.prototype._getLiteralFactory=function(t,e,n){var r=this,i=this.literalFactories.get(t),o=e.filter(function(t){return!t.isConstant()});if(!i){var s=e.map(function(t,e){return t.isConstant()?r.getConstLiteral(t,!0):le("a"+e)}),a=ve(s.filter(ze).map(function(t){return new Ft(t.name,ht)}),[new Jt(n(s))],ft),u=this.freshName();this.statements.push(le(u).set(a).toDeclStmt(ft,[At.Final])),i=le(u),this.literalFactories.set(t,i)}return{literalFactory:i,literalFactoryArguments:o}},t.prototype.uniqueName=function(t){return""+t+this.nextNameIndex++},t.prototype.definitionsOf=function(t){switch(t){case 2:return this.componentDefinitions;case 1:return this.directiveDefinitions;case 0:return this.injectorDefinitions;case 3:return this.pipeDefinitions}return Pe("Unknown definition kind "+t),this.componentDefinitions},t.prototype.propertyNameOf=function(t){switch(t){case 2:return"ngComponentDef";case 1:return"ngDirectiveDef";case 0:return"ngInjectorDef";case 3:return"ngPipeDef"}return Pe("Unknown definition kind "+t),"<unknown>"},t.prototype.freshName=function(){return this.uniqueName("_c")},t.prototype.keyOf=function(t){return t.visitExpression(new Ke,He)},t}(),Ke=function(){function t(){this.visitWrappedNodeExpr=We,this.visitWriteVarExpr=We,this.visitWriteKeyExpr=We,this.visitWritePropExpr=We,this.visitInvokeMethodExpr=We,this.visitInvokeFunctionExpr=We,this.visitInstantiateExpr=We,this.visitConditionalExpr=We,this.visitNotExpr=We,this.visitAssertNotNullExpr=We,this.visitCastExpr=We,this.visitFunctionExpr=We,this.visitBinaryOperatorExpr=We,this.visitReadPropExpr=We,this.visitReadKeyExpr=We,this.visitCommaExpr=We}return t.prototype.visitLiteralExpr=function(t){return""+("string"==typeof t.value?'"'+t.value+'"':t.value)},t.prototype.visitLiteralArrayExpr=function(t,e){var n=this;return"["+t.entries.map(function(t){return t.visitExpression(n,e)}).join(",")+"]"},t.prototype.visitLiteralMapExpr=function(t,e){var n=this;return"{"+t.entries.map(function(t){return function(t){var e=t.quoted?'"':"";return""+e+t.key+e}(t)+":"+t.value.visitExpression(n,e)}).join(",")},t.prototype.visitExternalExpr=function(t){return t.value.moduleName?"EX:"+t.value.moduleName+":"+t.value.name:"EX:"+t.value.runtime.name},t.prototype.visitReadVarExpr=function(t){return"VAR:"+t.name},t.prototype.visitTypeofExpr=function(t,e){return"TYPEOF:"+t.expr.visitExpression(this,e)},t}();function We(t){throw new Error("Invalid state: Visitor "+this.constructor.name+" doesn't handle "+t.constructor.name)}function ze(t){return t instanceof wt}
|
|
42
|
+
*/(this.tags)},e}(Xt)),se=function(t){function e(e,n,r){var i=t.call(this,null,r)||this;return i.bodyStmts=e,i.catchStmts=n,i}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof e&>(this.bodyStmts,t.bodyStmts)&>(this.catchStmts,t.catchStmts)},e.prototype.visitStatement=function(t,e){return t.visitTryCatchStmt(this,e)},e}(Xt),ae=function(t){function e(e,n){var r=t.call(this,null,n)||this;return r.error=e,r}return o(e,t),e.prototype.isEquivalent=function(t){return t instanceof se&&this.error.isEquivalent(t.error)},e.prototype.visitStatement=function(t,e){return t.visitThrowStmt(this,e)},e}(Xt),ue=function(){function t(){}return t.prototype.transformExpr=function(t,e){return t},t.prototype.transformStmt=function(t,e){return t},t.prototype.visitReadVarExpr=function(t,e){return this.transformExpr(t,e)},t.prototype.visitWrappedNodeExpr=function(t,e){return this.transformExpr(t,e)},t.prototype.visitTypeofExpr=function(t,e){return this.transformExpr(new Et(t.expr.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitWriteVarExpr=function(t,e){return this.transformExpr(new Ct(t.name,t.value.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitWriteKeyExpr=function(t,e){return this.transformExpr(new Tt(t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),t.value.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitWritePropExpr=function(t,e){return this.transformExpr(new Pt(t.receiver.visitExpression(this,e),t.name,t.value.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitInvokeMethodExpr=function(t,e){var n=t.builtin||t.name;return this.transformExpr(new Nt(t.receiver.visitExpression(this,e),n,this.visitAllExpressions(t.args,e),t.type,t.sourceSpan),e)},t.prototype.visitInvokeFunctionExpr=function(t,e){return this.transformExpr(new kt(t.fn.visitExpression(this,e),this.visitAllExpressions(t.args,e),t.type,t.sourceSpan),e)},t.prototype.visitInstantiateExpr=function(t,e){return this.transformExpr(new Ot(t.classExpr.visitExpression(this,e),this.visitAllExpressions(t.args,e),t.type,t.sourceSpan),e)},t.prototype.visitLiteralExpr=function(t,e){return this.transformExpr(t,e)},t.prototype.visitExternalExpr=function(t,e){return this.transformExpr(t,e)},t.prototype.visitConditionalExpr=function(t,e){return this.transformExpr(new Dt(t.condition.visitExpression(this,e),t.trueCase.visitExpression(this,e),t.falseCase.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitNotExpr=function(t,e){return this.transformExpr(new Rt(t.condition.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitAssertNotNullExpr=function(t,e){return this.transformExpr(new Lt(t.condition.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitCastExpr=function(t,e){return this.transformExpr(new jt(t.value.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitFunctionExpr=function(t,e){return this.transformExpr(new Vt(t.params,this.visitAllStatements(t.statements,e),t.type,t.sourceSpan),e)},t.prototype.visitBinaryOperatorExpr=function(t,e){return this.transformExpr(new Bt(t.operator,t.lhs.visitExpression(this,e),t.rhs.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitReadPropExpr=function(t,e){return this.transformExpr(new Ht(t.receiver.visitExpression(this,e),t.name,t.type,t.sourceSpan),e)},t.prototype.visitReadKeyExpr=function(t,e){return this.transformExpr(new qt(t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),t.type,t.sourceSpan),e)},t.prototype.visitLiteralArrayExpr=function(t,e){return this.transformExpr(new Ut(this.visitAllExpressions(t.entries,e),t.type,t.sourceSpan),e)},t.prototype.visitLiteralMapExpr=function(t,e){var n=this,r=t.entries.map(function(t){return new Kt(t.key,t.value.visitExpression(n,e),t.quoted)}),i=new pt(t.valueType,null);return this.transformExpr(new Wt(r,i,t.sourceSpan),e)},t.prototype.visitCommaExpr=function(t,e){return this.transformExpr(new zt(this.visitAllExpressions(t.parts,e),t.sourceSpan),e)},t.prototype.visitAllExpressions=function(t,e){var n=this;return t.map(function(t){return t.visitExpression(n,e)})},t.prototype.visitDeclareVarStmt=function(t,e){var n=t.value&&t.value.visitExpression(this,e);return this.transformStmt(new $t(t.name,n,t.type,t.modifiers,t.sourceSpan),e)},t.prototype.visitDeclareFunctionStmt=function(t,e){return this.transformStmt(new Yt(t.name,t.params,this.visitAllStatements(t.statements,e),t.type,t.modifiers,t.sourceSpan),e)},t.prototype.visitExpressionStmt=function(t,e){return this.transformStmt(new Zt(t.expr.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitReturnStmt=function(t,e){return this.transformStmt(new Jt(t.value.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitDeclareClassStmt=function(t,e){var n=this,r=t.parent.visitExpression(this,e),i=t.getters.map(function(t){return new ne(t.name,n.visitAllStatements(t.body,e),t.type,t.modifiers)}),o=t.constructorMethod&&new ee(t.constructorMethod.name,t.constructorMethod.params,this.visitAllStatements(t.constructorMethod.body,e),t.constructorMethod.type,t.constructorMethod.modifiers),s=t.methods.map(function(t){return new ee(t.name,t.params,n.visitAllStatements(t.body,e),t.type,t.modifiers)});return this.transformStmt(new re(t.name,r,t.fields,i,o,s,t.modifiers,t.sourceSpan),e)},t.prototype.visitIfStmt=function(t,e){return this.transformStmt(new ie(t.condition.visitExpression(this,e),this.visitAllStatements(t.trueCase,e),this.visitAllStatements(t.falseCase,e),t.sourceSpan),e)},t.prototype.visitTryCatchStmt=function(t,e){return this.transformStmt(new se(this.visitAllStatements(t.bodyStmts,e),this.visitAllStatements(t.catchStmts,e),t.sourceSpan),e)},t.prototype.visitThrowStmt=function(t,e){return this.transformStmt(new ae(t.error.visitExpression(this,e),t.sourceSpan),e)},t.prototype.visitCommentStmt=function(t,e){return this.transformStmt(t,e)},t.prototype.visitJSDocCommentStmt=function(t,e){return this.transformStmt(t,e)},t.prototype.visitAllStatements=function(t,e){var n=this;return t.map(function(t){return t.visitStatement(n,e)})},t}(),ce=function(){function t(){}return t.prototype.visitType=function(t,e){return t},t.prototype.visitExpression=function(t,e){return t.type&&t.type.visitType(this,e),t},t.prototype.visitBuiltinType=function(t,e){return this.visitType(t,e)},t.prototype.visitExpressionType=function(t,e){var n=this;return t.value.visitExpression(this,e),null!==t.typeParams&&t.typeParams.forEach(function(t){return n.visitType(t,e)}),this.visitType(t,e)},t.prototype.visitArrayType=function(t,e){return this.visitType(t,e)},t.prototype.visitMapType=function(t,e){return this.visitType(t,e)},t.prototype.visitWrappedNodeExpr=function(t,e){return t},t.prototype.visitTypeofExpr=function(t,e){return this.visitExpression(t,e)},t.prototype.visitReadVarExpr=function(t,e){return this.visitExpression(t,e)},t.prototype.visitWriteVarExpr=function(t,e){return t.value.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitWriteKeyExpr=function(t,e){return t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),t.value.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitWritePropExpr=function(t,e){return t.receiver.visitExpression(this,e),t.value.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitInvokeMethodExpr=function(t,e){return t.receiver.visitExpression(this,e),this.visitAllExpressions(t.args,e),this.visitExpression(t,e)},t.prototype.visitInvokeFunctionExpr=function(t,e){return t.fn.visitExpression(this,e),this.visitAllExpressions(t.args,e),this.visitExpression(t,e)},t.prototype.visitInstantiateExpr=function(t,e){return t.classExpr.visitExpression(this,e),this.visitAllExpressions(t.args,e),this.visitExpression(t,e)},t.prototype.visitLiteralExpr=function(t,e){return this.visitExpression(t,e)},t.prototype.visitExternalExpr=function(t,e){var n=this;return t.typeParams&&t.typeParams.forEach(function(t){return t.visitType(n,e)}),this.visitExpression(t,e)},t.prototype.visitConditionalExpr=function(t,e){return t.condition.visitExpression(this,e),t.trueCase.visitExpression(this,e),t.falseCase.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitNotExpr=function(t,e){return t.condition.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitAssertNotNullExpr=function(t,e){return t.condition.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitCastExpr=function(t,e){return t.value.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitFunctionExpr=function(t,e){return this.visitAllStatements(t.statements,e),this.visitExpression(t,e)},t.prototype.visitBinaryOperatorExpr=function(t,e){return t.lhs.visitExpression(this,e),t.rhs.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitReadPropExpr=function(t,e){return t.receiver.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitReadKeyExpr=function(t,e){return t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),this.visitExpression(t,e)},t.prototype.visitLiteralArrayExpr=function(t,e){return this.visitAllExpressions(t.entries,e),this.visitExpression(t,e)},t.prototype.visitLiteralMapExpr=function(t,e){var n=this;return t.entries.forEach(function(t){return t.value.visitExpression(n,e)}),this.visitExpression(t,e)},t.prototype.visitCommaExpr=function(t,e){return this.visitAllExpressions(t.parts,e),this.visitExpression(t,e)},t.prototype.visitAllExpressions=function(t,e){var n=this;t.forEach(function(t){return t.visitExpression(n,e)})},t.prototype.visitDeclareVarStmt=function(t,e){return t.value&&t.value.visitExpression(this,e),t.type&&t.type.visitType(this,e),t},t.prototype.visitDeclareFunctionStmt=function(t,e){return this.visitAllStatements(t.statements,e),t.type&&t.type.visitType(this,e),t},t.prototype.visitExpressionStmt=function(t,e){return t.expr.visitExpression(this,e),t},t.prototype.visitReturnStmt=function(t,e){return t.value.visitExpression(this,e),t},t.prototype.visitDeclareClassStmt=function(t,e){var n=this;return t.parent.visitExpression(this,e),t.getters.forEach(function(t){return n.visitAllStatements(t.body,e)}),t.constructorMethod&&this.visitAllStatements(t.constructorMethod.body,e),t.methods.forEach(function(t){return n.visitAllStatements(t.body,e)}),t},t.prototype.visitIfStmt=function(t,e){return t.condition.visitExpression(this,e),this.visitAllStatements(t.trueCase,e),this.visitAllStatements(t.falseCase,e),t},t.prototype.visitTryCatchStmt=function(t,e){return this.visitAllStatements(t.bodyStmts,e),this.visitAllStatements(t.catchStmts,e),t},t.prototype.visitThrowStmt=function(t,e){return t.error.visitExpression(this,e),t},t.prototype.visitCommentStmt=function(t,e){return t},t.prototype.visitJSDocCommentStmt=function(t,e){return t},t.prototype.visitAllStatements=function(t,e){var n=this;t.forEach(function(t){return t.visitStatement(n,e)})},t}();function le(t,e,n){return new wt(t,e,n)}function pe(t,e,n){return void 0===e&&(e=null),new Mt(t,null,e,n)}function he(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),new lt(t,e,n)}function fe(t,e,n){return new Ut(t,e,n)}function de(t,e){return void 0===e&&(e=null),new Wt(t.map(function(t){return new Kt(t.key,t.value,t.quoted)}),e,null)}function ve(t,e,n,r,i){return new Vt(t,e,n,r,i)}function ye(t,e,n){return new ie(t,e,n)}function me(t,e,n){return new It(t,e,n)}function ge(t){var e="";if(t.tagName&&(e+=" @"+t.tagName),t.text){if(t.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');e+=" "+t.text.replace(/@/g,"\\@")}return e}(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.varNames=new Set,e}o(e,t),e.prototype.visitDeclareFunctionStmt=function(t,e){return t},e.prototype.visitDeclareClassStmt=function(t,e){return t},e.prototype.visitReadVarExpr=function(t,e){return t.name&&this.varNames.add(t.name),null}})(ce),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.externalReferences=[],e}o(e,t),e.prototype.visitExternalExpr=function(e,n){return this.externalReferences.push(e.value),t.prototype.visitExternalExpr.call(this,e,n)}}(ce),function(t){function e(e){var n=t.call(this)||this;return n.sourceSpan=e,n}o(e,t),e.prototype._clone=function(t){var e=Object.create(t.constructor.prototype);for(var n in t)e[n]=t[n];return e},e.prototype.transformExpr=function(t,e){return t.sourceSpan||((t=this._clone(t)).sourceSpan=this.sourceSpan),t},e.prototype.transformStmt=function(t,e){return t.sourceSpan||((t=this._clone(t)).sourceSpan=this.sourceSpan),t}}(ue);var _e=/-+([a-z0-9])/g;function be(t,e){return xe(t,":",e)}function xe(t,e,n){var r=t.indexOf(e);return-1==r?n:[t.slice(0,r).trim(),t.slice(r+1).trim()]}function we(t,e,n){return Array.isArray(t)?e.visitArray(t,n):function r(t){return"object"==typeof t&&null!==t&&Object.getPrototypeOf(t)===Ie}(t)?e.visitStringMap(t,n):null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t?e.visitPrimitive(t,n):e.visitOther(t,n)}function Ee(t){return null!==t&&void 0!==t}function Se(t){return void 0===t?null:t}var Ce=function(){function t(){}return t.prototype.visitArray=function(t,e){var n=this;return t.map(function(t){return we(t,n,e)})},t.prototype.visitStringMap=function(t,e){var n=this,r={};return Object.keys(t).forEach(function(i){r[i]=we(t[i],n,e)}),r},t.prototype.visitPrimitive=function(t,e){return t},t.prototype.visitOther=function(t,e){return t},t}(),Te=function(t,e){return Le(t)?t.then(e):e(t)};function Pe(t){throw new Error("Internal Error: "+t)}function Ae(t,e){var n=Error(t);return n[Ne]=!0,e&&(n[ke]=e),n}var Ne="ngSyntaxError",ke="ngParseErrors";function Oe(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}var Ie=Object.getPrototypeOf({});function Me(t){for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r>=55296&&r<=56319&&t.length>n+1){var i=t.charCodeAt(n+1);i>=56320&&i<=57343&&(n++,r=(r-55296<<10)+i-56320+65536)}r<=127?e+=String.fromCharCode(r):r<=2047?e+=String.fromCharCode(r>>6&31|192,63&r|128):r<=65535?e+=String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128):r<=2097151&&(e+=String.fromCharCode(r>>18&7|240,r>>12&63|128,r>>6&63|128,63&r|128))}return e}function De(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(De).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;var e=t.toString();if(null==e)return""+e;var n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function Re(t){return"function"==typeof t&&t.hasOwnProperty("__forward_ref__")?t():t}function Le(t){return!!t&&"function"==typeof t.then}var je=function je(t){this.full=t;var e=t.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")},Fe="undefined"!=typeof window&&window,Ve="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Be="undefined"!=typeof global&&global||Fe||Ve,He={},qe=function(t){function e(e){var n=t.call(this,e.type)||this;return n.resolved=e,n.original=e,n}return o(e,t),e.prototype.visitExpression=function(t,e){return e===He?this.original.visitExpression(t,e):this.resolved.visitExpression(t,e)},e.prototype.isEquivalent=function(t){return t instanceof e&&this.resolved.isEquivalent(t.resolved)},e.prototype.isConstant=function(){return!0},e.prototype.fixup=function(t){this.resolved=t,this.shared=!0},e}(bt),Ue=function(){function t(){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 t.prototype.getConstLiteral=function(t,e){if(t instanceof It||t instanceof qe)return t;var n=this.keyOf(t),r=this.literals.get(n),i=!1;if(r||(r=new qe(t),this.literals.set(n,r),i=!0),!i&&!r.shared||i&&e){var o=this.freshName();this.statements.push(le(o).set(t).toDeclStmt(ft,[At.Final])),r.fixup(le(o))}return r},t.prototype.getDefinition=function(t,e,n,r){void 0===r&&(r=!1);var i=this.definitionsOf(e),o=i.get(t),s=!1;if(!o){var a=this.propertyNameOf(e);o=new qe(n.importExpr(t).prop(a)),i.set(t,o),s=!0}if(!s&&!o.shared||s&&r){var u=this.freshName();this.statements.push(le(u).set(o.resolved).toDeclStmt(ft,[At.Final])),o.fixup(le(u))}return o},t.prototype.getLiteralFactory=function(t){if(t instanceof Ut){var e=t.entries.map(function(t){return t.isConstant()?t:me(null)}),n=this.keyOf(fe(e));return this._getLiteralFactory(n,t.entries,function(t){return fe(t)})}var r=de(t.entries.map(function(t){return{key:t.key,value:t.value.isConstant()?t.value:me(null),quoted:t.quoted}}));return n=this.keyOf(r),this._getLiteralFactory(n,t.entries.map(function(t){return t.value}),function(e){return de(e.map(function(e,n){return{key:t.entries[n].key,value:e,quoted:t.entries[n].quoted}}))})},t.prototype._getLiteralFactory=function(t,e,n){var r=this,i=this.literalFactories.get(t),o=e.filter(function(t){return!t.isConstant()});if(!i){var s=e.map(function(t,e){return t.isConstant()?r.getConstLiteral(t,!0):le("a"+e)}),a=ve(s.filter(ze).map(function(t){return new Ft(t.name,ht)}),[new Jt(n(s))],ft),u=this.freshName();this.statements.push(le(u).set(a).toDeclStmt(ft,[At.Final])),i=le(u),this.literalFactories.set(t,i)}return{literalFactory:i,literalFactoryArguments:o}},t.prototype.uniqueName=function(t){return""+t+this.nextNameIndex++},t.prototype.definitionsOf=function(t){switch(t){case 2:return this.componentDefinitions;case 1:return this.directiveDefinitions;case 0:return this.injectorDefinitions;case 3:return this.pipeDefinitions}return Pe("Unknown definition kind "+t),this.componentDefinitions},t.prototype.propertyNameOf=function(t){switch(t){case 2:return"ngComponentDef";case 1:return"ngDirectiveDef";case 0:return"ngInjectorDef";case 3:return"ngPipeDef"}return Pe("Unknown definition kind "+t),"<unknown>"},t.prototype.freshName=function(){return this.uniqueName("_c")},t.prototype.keyOf=function(t){return t.visitExpression(new Ke,He)},t}(),Ke=function(){function t(){this.visitWrappedNodeExpr=We,this.visitWriteVarExpr=We,this.visitWriteKeyExpr=We,this.visitWritePropExpr=We,this.visitInvokeMethodExpr=We,this.visitInvokeFunctionExpr=We,this.visitInstantiateExpr=We,this.visitConditionalExpr=We,this.visitNotExpr=We,this.visitAssertNotNullExpr=We,this.visitCastExpr=We,this.visitFunctionExpr=We,this.visitBinaryOperatorExpr=We,this.visitReadPropExpr=We,this.visitReadKeyExpr=We,this.visitCommaExpr=We}return t.prototype.visitLiteralExpr=function(t){return""+("string"==typeof t.value?'"'+t.value+'"':t.value)},t.prototype.visitLiteralArrayExpr=function(t,e){var n=this;return"["+t.entries.map(function(t){return t.visitExpression(n,e)}).join(",")+"]"},t.prototype.visitLiteralMapExpr=function(t,e){var n=this;return"{"+t.entries.map(function(t){return function(t){var e=t.quoted?'"':"";return""+e+t.key+e}(t)+":"+t.value.visitExpression(n,e)}).join(",")},t.prototype.visitExternalExpr=function(t){return t.value.moduleName?"EX:"+t.value.moduleName+":"+t.value.name:"EX:"+t.value.runtime.name},t.prototype.visitReadVarExpr=function(t){return"VAR:"+t.name},t.prototype.visitTypeofExpr=function(t,e){return"TYPEOF:"+t.expr.visitExpression(this,e)},t}();function We(t){throw new Error("Invalid state: Visitor "+this.constructor.name+" doesn't handle "+t.constructor.name)}function ze(t){return t instanceof wt}
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -53,7 +53,7 @@ var w,E,S=function(){function t(t){var e=void 0===t?{}:t,n=e.closedByChildren,r=
|
|
|
53
53
|
*
|
|
54
54
|
* Use of this source code is governed by an MIT-style license that can be
|
|
55
55
|
* found in the LICENSE file at https://angular.io/license
|
|
56
|
-
*/var Ye=function(){function t(t,e,n){this.filePath=t,this.name=e,this.members=n}return t.prototype.assertNoMembers=function(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got "+JSON.stringify(this)+".")},t}(),Ze=function(){function t(){this.cache=new Map}return t.prototype.get=function(t,e,n){var r='"'+t+'".'+e+((n=n||[]).length?"."+n.join("."):""),i=this.cache.get(r);return i||(i=new Ye(t,e,n),this.cache.set(r,i)),i},t}(),Je=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function tn(t){return t.replace(/\W/g,"_")}var en,nn=0;function rn(t){if(!t||!t.reference)return null;var e=t.reference;if(e instanceof Ye)return e.name;if(e.__anonymousType)return e.__anonymousType;var n=
|
|
56
|
+
*/var Ye=function(){function t(t,e,n){this.filePath=t,this.name=e,this.members=n}return t.prototype.assertNoMembers=function(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got "+JSON.stringify(this)+".")},t}(),Ze=function(){function t(){this.cache=new Map}return t.prototype.get=function(t,e,n){var r='"'+t+'".'+e+((n=n||[]).length?"."+n.join("."):""),i=this.cache.get(r);return i||(i=new Ye(t,e,n),this.cache.set(r,i)),i},t}(),Je=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function tn(t){return t.replace(/\W/g,"_")}var en,nn=0;function rn(t){if(!t||!t.reference)return null;var e=t.reference;if(e instanceof Ye)return e.name;if(e.__anonymousType)return e.__anonymousType;var n=De(e);return n.indexOf("(")>=0?(n="anonymous_"+nn++,e.__anonymousType=n):n=tn(n),n}function on(t){return null!=t.value?tn(t.value):rn(t.identifier)}function sn(t){return null!=t.identifier?t.identifier.reference:t.value}!function(t){t[t.Pipe=0]="Pipe",t[t.Directive=1]="Directive",t[t.NgModule=2]="NgModule",t[t.Injectable=3]="Injectable"}(en||(en={}));var an=function an(t){var e=void 0===t?{}:t,n=e.styles,r=e.styleUrls;this.moduleUrl=e.moduleUrl||null,this.styles=fn(n),this.styleUrls=fn(r)},un=function(){function t(t){var e=t.template,n=t.templateUrl,r=t.htmlAst,i=t.styles,o=t.styleUrls,s=t.externalStylesheets,a=t.animations,u=t.ngContentSelectors,c=t.interpolation,l=t.isInline,p=t.preserveWhitespaces;if(this.encapsulation=t.encapsulation,this.template=e,this.templateUrl=n,this.htmlAst=r,this.styles=fn(i),this.styleUrls=fn(o),this.externalStylesheets=fn(s),this.animations=a?vn(a):[],this.ngContentSelectors=u||[],c&&2!=c.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=c,this.isInline=l,this.preserveWhitespaces=p}return t.prototype.toSummary=function(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}},t}(),cn=function(){function t(t){var e=t.type,n=t.isComponent,r=t.selector,i=t.exportAs,o=t.changeDetection,s=t.inputs,a=t.outputs,u=t.hostListeners,c=t.hostProperties,l=t.hostAttributes,p=t.providers,h=t.viewProviders,f=t.queries,d=t.guards,v=t.viewQueries,y=t.entryComponents,m=t.template,g=t.componentViewType,_=t.rendererType,b=t.componentFactory;this.isHost=!!t.isHost,this.type=e,this.isComponent=n,this.selector=r,this.exportAs=i,this.changeDetection=o,this.inputs=s,this.outputs=a,this.hostListeners=u,this.hostProperties=c,this.hostAttributes=l,this.providers=fn(p),this.viewProviders=fn(h),this.queries=fn(f),this.guards=d,this.viewQueries=fn(v),this.entryComponents=fn(y),this.template=m,this.componentViewType=g,this.rendererType=_,this.componentFactory=b}return t.create=function(e){var n=e.isHost,r=e.type,i=e.isComponent,o=e.selector,s=e.exportAs,a=e.changeDetection,u=e.inputs,c=e.outputs,l=e.host,p=e.providers,h=e.viewProviders,f=e.queries,d=e.guards,v=e.viewQueries,y=e.entryComponents,m=e.template,g=e.componentViewType,_=e.rendererType,b=e.componentFactory,x={},w={},E={};null!=l&&Object.keys(l).forEach(function(t){var e=l[t],n=t.match(Je);null===n?E[t]=e:null!=n[1]?w[n[1]]=e:null!=n[2]&&(x[n[2]]=e)});var S={};null!=u&&u.forEach(function(t){var e=be(t,[t,t]);S[e[0]]=e[1]});var C={};return null!=c&&c.forEach(function(t){var e=be(t,[t,t]);C[e[0]]=e[1]}),new t({isHost:n,type:r,isComponent:!!i,selector:o,exportAs:s,changeDetection:a,inputs:S,outputs:C,hostListeners:x,hostProperties:w,hostAttributes:E,providers:p,viewProviders:h,queries:f,guards:d,viewQueries:v,entryComponents:y,template:m,componentViewType:g,rendererType:_,componentFactory:b})},t.prototype.toSummary=function(){return{summaryKind:en.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.viewQueries,entryComponents:this.entryComponents,changeDetection:this.changeDetection,template:this.template&&this.template.toSummary(),componentViewType:this.componentViewType,rendererType:this.rendererType,componentFactory:this.componentFactory}},t}(),ln=function(){function t(t){var e=t.name,n=t.pure;this.type=t.type,this.name=e,this.pure=!!n}return t.prototype.toSummary=function(){return{summaryKind:en.Pipe,type:this.type,name:this.name,pure:this.pure}},t}(),pn=function(){function t(t){var e=t.providers,n=t.declaredDirectives,r=t.exportedDirectives,i=t.declaredPipes,o=t.exportedPipes,s=t.entryComponents,a=t.bootstrapComponents,u=t.importedModules,c=t.exportedModules,l=t.schemas,p=t.transitiveModule,h=t.id;this.type=t.type||null,this.declaredDirectives=fn(n),this.exportedDirectives=fn(r),this.declaredPipes=fn(i),this.exportedPipes=fn(o),this.providers=fn(e),this.entryComponents=fn(s),this.bootstrapComponents=fn(a),this.importedModules=fn(u),this.exportedModules=fn(c),this.schemas=fn(l),this.id=h||null,this.transitiveModule=p||null}return t.prototype.toSummary=function(){var t=this.transitiveModule;return{summaryKind:en.NgModule,type:this.type,entryComponents:t.entryComponents,providers:t.providers,modules:t.modules,exportedDirectives:t.exportedDirectives,exportedPipes:t.exportedPipes}},t}(),hn=function(){function t(){this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}return t.prototype.addProvider=function(t,e){this.providers.push({provider:t,module:e})},t.prototype.addDirective=function(t){this.directivesSet.has(t.reference)||(this.directivesSet.add(t.reference),this.directives.push(t))},t.prototype.addExportedDirective=function(t){this.exportedDirectivesSet.has(t.reference)||(this.exportedDirectivesSet.add(t.reference),this.exportedDirectives.push(t))},t.prototype.addPipe=function(t){this.pipesSet.has(t.reference)||(this.pipesSet.add(t.reference),this.pipes.push(t))},t.prototype.addExportedPipe=function(t){this.exportedPipesSet.has(t.reference)||(this.exportedPipesSet.add(t.reference),this.exportedPipes.push(t))},t.prototype.addModule=function(t){this.modulesSet.has(t.reference)||(this.modulesSet.add(t.reference),this.modules.push(t))},t.prototype.addEntryComponent=function(t){this.entryComponentsSet.has(t.componentType)||(this.entryComponentsSet.add(t.componentType),this.entryComponents.push(t))},t}();function fn(t){return t||[]}var dn=function dn(t,e){var n=e.useClass,r=e.useValue,i=e.useExisting,o=e.useFactory,s=e.deps,a=e.multi;this.token=t,this.useClass=n||null,this.useValue=r,this.useExisting=i,this.useFactory=o||null,this.dependencies=s||null,this.multi=!!a};function vn(t){return t.reduce(function(t,e){var n=Array.isArray(e)?vn(e):e;return t.concat(n)},[])}
|
|
57
57
|
/**
|
|
58
58
|
* @license
|
|
59
59
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -69,7 +69,7 @@ var yn="@angular/core",mn=function(){function t(){}return t.NEW_METHOD="factory"
|
|
|
69
69
|
* Use of this source code is governed by an MIT-style license that can be
|
|
70
70
|
* found in the LICENSE file at https://angular.io/license
|
|
71
71
|
*/
|
|
72
|
-
function Pn(t){return t.id||function n(t){var e,n,r=Me(t),i=function o(t,e){for(var n=Array(t.length+3>>>2),r=0;r<n.length;r++)n[r]=qn(t,4*r,e);return n}(r,Nn.Big),s=8*r.length,a=new Array(80),u=h([1732584193,4023233417,2562383102,271733878,3285377520],5),c=u[0],l=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 y=h([c,l,p,f,d],5),m=y[0],g=y[1],_=y[2],b=y[3],x=y[4],w=0;w<80;w++){a[w]=w<16?i[v+w]:Bn(a[w-3]^a[w-8]^a[w-14]^a[w-16],1);var E=h(Mn(w,l,p,f),2),S=E[0],C=E[1],T=[Bn(c,5),S,d,C,a[w]].reduce(jn);d=(e=h([f,p,Bn(l,30),c,T],5))[0],f=e[1],p=e[2],l=e[3],c=e[4]}c=(n=h([jn(c,m),jn(l,g),jn(p,_),jn(f,b),jn(d,x)],5))[0],l=n[1],p=n[2],f=n[3],d=n[4]}return function P(t){for(var e="",n=0;n<t.length;n++){var r=Hn(t,n);e+=(r>>>4).toString(16)+(15&r).toString(16)}return e.toLowerCase()}(Un([c,l,p,f,d]))}(function e(t){return t.map(function(t){return t.visit(On,null)})}(t.nodes).join("")+"["+t.meaning+"]")}function An(t){if(t.id)return t.id;var e=new In;return function n(t,e){var n,r=h(
|
|
72
|
+
function Pn(t){return t.id||function n(t){var e,n,r=Me(t),i=function o(t,e){for(var n=Array(t.length+3>>>2),r=0;r<n.length;r++)n[r]=qn(t,4*r,e);return n}(r,Nn.Big),s=8*r.length,a=new Array(80),u=h([1732584193,4023233417,2562383102,271733878,3285377520],5),c=u[0],l=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 y=h([c,l,p,f,d],5),m=y[0],g=y[1],_=y[2],b=y[3],x=y[4],w=0;w<80;w++){a[w]=w<16?i[v+w]:Bn(a[w-3]^a[w-8]^a[w-14]^a[w-16],1);var E=h(Mn(w,l,p,f),2),S=E[0],C=E[1],T=[Bn(c,5),S,d,C,a[w]].reduce(jn);d=(e=h([f,p,Bn(l,30),c,T],5))[0],f=e[1],p=e[2],l=e[3],c=e[4]}c=(n=h([jn(c,m),jn(l,g),jn(p,_),jn(f,b),jn(d,x)],5))[0],l=n[1],p=n[2],f=n[3],d=n[4]}return function P(t){for(var e="",n=0;n<t.length;n++){var r=Hn(t,n);e+=(r>>>4).toString(16)+(15&r).toString(16)}return e.toLowerCase()}(Un([c,l,p,f,d]))}(function e(t){return t.map(function(t){return t.visit(On,null)})}(t.nodes).join("")+"["+t.meaning+"]")}function An(t){if(t.id)return t.id;var e=new In;return function n(t,e){var n,r=h(Dn(t),2),i=r[0],o=r[1];if(e){var s=h(Dn(e),2),a=s[0],u=s[1];i=(n=h(function l(t,e){var n=h(t,2),r=n[0],i=n[1],o=h(e,2),s=o[0],a=h(Fn(i,o[1]),2),u=a[0],c=a[1];return[jn(jn(r,s),u),c]}(function c(t,e){var n=h(t,2),r=n[0],i=n[1];return[r<<e|i>>>32-e,i<<e|r>>>32-e]}([i,o],1),[a,u]),2))[0],o=n[1]}return function p(t){for(var e="",n="1",r=t.length-1;r>=0;r--)e=Kn(e,Wn(Hn(t,r),n)),n=Wn(256,n);return e.split("").reverse().join("")}(Un([2147483647&i,o]))}(t.nodes.map(function(t){return t.visit(e,null)}).join(""),t.meaning)}var Nn,kn=function(){function t(){}return t.prototype.visitText=function(t,e){return t.value},t.prototype.visitContainer=function(t,e){var n=this;return"["+t.children.map(function(t){return t.visit(n)}).join(", ")+"]"},t.prototype.visitIcu=function(t,e){var n=this,r=Object.keys(t.cases).map(function(e){return e+" {"+t.cases[e].visit(n)+"}"});return"{"+t.expression+", "+t.type+", "+r.join(", ")+"}"},t.prototype.visitTagPlaceholder=function(t,e){var n=this;return t.isVoid?'<ph tag name="'+t.startName+'"/>':'<ph tag name="'+t.startName+'">'+t.children.map(function(t){return t.visit(n)}).join(", ")+'</ph name="'+t.closeName+'">'},t.prototype.visitPlaceholder=function(t,e){return t.value?'<ph name="'+t.name+'">'+t.value+"</ph>":'<ph name="'+t.name+'"/>'},t.prototype.visitIcuPlaceholder=function(t,e){return'<ph icu name="'+t.name+'">'+t.value.visit(this)+"</ph>"},t}(),On=new kn,In=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.visitIcu=function(t,e){var n=this,r=Object.keys(t.cases).map(function(e){return e+" {"+t.cases[e].visit(n)+"}"});return"{"+t.type+", "+r.join(", ")+"}"},e}(kn);function Mn(t,e,n,r){return t<20?[e&n|~e&r,1518500249]:t<40?[e^n^r,1859775393]:t<60?[e&n|e&r|n&r,2400959708]:[e^n^r,3395469782]}function Dn(t){var e=Me(t),n=h([Rn(e,0),Rn(e,102072)],2),r=n[0],i=n[1];return 0!=r||0!=i&&1!=i||(r^=319790063,i^=-1801410264),[r,i]}function Rn(t,e){var n,r,i=h([2654435769,2654435769],2),o=i[0],s=i[1],a=t.length;for(r=0;r+12<=a;r+=12)o=(n=h(Ln([o=jn(o,qn(t,r,Nn.Little)),s=jn(s,qn(t,r+4,Nn.Little)),e=jn(e,qn(t,r+8,Nn.Little))]),3))[0],s=n[1],e=n[2];return Ln([o=jn(o,qn(t,r,Nn.Little)),s=jn(s,qn(t,r+4,Nn.Little)),e=jn(e=jn(e,a),qn(t,r+8,Nn.Little)<<8)])[2]}function Ln(t){var e=h(t,3),n=e[0],r=e[1],i=e[2];return n=Vn(n=Vn(n,r),i),n^=i>>>13,r=Vn(r=Vn(r,i),n),r^=n<<8,i=Vn(i=Vn(i,n),r),i^=r>>>13,n=Vn(n=Vn(n,r),i),n^=i>>>12,r=Vn(r=Vn(r,i),n),r^=n<<16,i=Vn(i=Vn(i,n),r),i^=r>>>5,n=Vn(n=Vn(n,r),i),n^=i>>>3,r=Vn(r=Vn(r,i),n),r^=n<<10,i=Vn(i=Vn(i,n),r),[n,r,i^=r>>>15]}function jn(t,e){return Fn(t,e)[1]}function Fn(t,e){var n=(65535&t)+(65535&e),r=(t>>>16)+(e>>>16)+(n>>>16);return[r>>>16,r<<16|65535&n]}function Vn(t,e){var n=(65535&t)-(65535&e);return(t>>16)-(e>>16)+(n>>16)<<16|65535&n}function Bn(t,e){return t<<e|t>>>32-e}function Hn(t,e){return e>=t.length?0:255&t.charCodeAt(e)}function qn(t,e,n){var r=0;if(n===Nn.Big)for(var i=0;i<4;i++)r+=Hn(t,e+i)<<24-8*i;else for(i=0;i<4;i++)r+=Hn(t,e+i)<<8*i;return r}function Un(t){return t.reduce(function(t,e){return t+function n(t){for(var e="",n=0;n<4;n++)e+=String.fromCharCode(t>>>8*(3-n)&255);return e}(e)},"")}function Kn(t,e){for(var n="",r=Math.max(t.length,e.length),i=0,o=0;i<r||o;i++){var s=o+ +(t[i]||0)+ +(e[i]||0);s>=10?(o=1,n+=s-10):(o=0,n+=s)}return n}function Wn(t,e){for(var n="",r=e;0!==t;t>>>=1)1&t&&(n=Kn(n,r)),r=Kn(r,r);return n}
|
|
73
73
|
/**
|
|
74
74
|
* @license
|
|
75
75
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -105,14 +105,14 @@ function Pn(t){return t.id||function n(t){var e,n,r=Me(t),i=function o(t,e){for(
|
|
|
105
105
|
* Use of this source code is governed by an MIT-style license that can be
|
|
106
106
|
* found in the LICENSE file at https://angular.io/license
|
|
107
107
|
*/
|
|
108
|
-
var Cr="_t",Tr="rf";function Pr(t,e){var n=null;return function(){return n||(t.push(new $t(Cr,void 0,ht)),n=le(e)),n}}function Ar(t){if(this)throw new Error("Builder "+this.constructor.name+" doesn't support "+t+" yet");throw new Error("Feature "+t+" is not supported yet")}function Nr(t){throw new Error("Invalid state: Visitor "+this.constructor.name+" doesn't handle "+void 0)}function kr(t){return Array.isArray(t)?fe(t.map(kr)):me(t,ft)}function Or(t){return Object.getOwnPropertyNames(t).length>0?function e(t,n){return void 0===n&&(n=!1),de(Object.getOwnPropertyNames(t).map(function(e){return{key:e,quoted:n,value:kr(t[e])}}))}(t):null}function Ir(t){for(;(e=t[t.length-1])instanceof It&&null===e.value;)t.pop();var e;return t}var Mr,Rr
|
|
108
|
+
var Cr="_t",Tr="rf";function Pr(t,e){var n=null;return function(){return n||(t.push(new $t(Cr,void 0,ht)),n=le(e)),n}}function Ar(t){if(this)throw new Error("Builder "+this.constructor.name+" doesn't support "+t+" yet");throw new Error("Feature "+t+" is not supported yet")}function Nr(t){throw new Error("Invalid state: Visitor "+this.constructor.name+" doesn't handle "+void 0)}function kr(t){return Array.isArray(t)?fe(t.map(kr)):me(t,ft)}function Or(t){return Object.getOwnPropertyNames(t).length>0?function e(t,n){return void 0===n&&(n=!1),de(Object.getOwnPropertyNames(t).map(function(e){return{key:e,quoted:n,value:kr(t[e])}}))}(t):null}function Ir(t){for(;(e=t[t.length-1])instanceof It&&null===e.value;)t.pop();var e;return t}var Mr,Dr,Rr=function(){function t(){this.values=[]}return t.prototype.set=function(t,e){e&&this.values.push({key:t,value:e,quoted:!1})},t.prototype.toLiteralMap=function(){return de(this.values)},t}();function Lr(t){var e=le("t"),n=[],r=Fr(t)?e:new Bt(ut.Or,e,t.type),i=null;if(null!==t.deps)i=new Ot(r,jr(t.deps,t.injectFn));else{var o=le("ɵ"+t.name+"_BaseFactory"),s=pe(mn.getInheritedFactory),a=o.set(s.callFn([t.type])).toDeclStmt(ft,[At.Exported,At.Final]);n.push(a),i=o.callFn([r])}var u=i,c=[],l=null;function p(t){var n=le("r");return c.push(n.set(Qt).toDeclStmt()),c.push(ye(e,[n.set(u).toStmt()],[n.set(t).toStmt()])),n}if(Fr(t)&&t.delegateType===Mr.Factory){var h=le("ɵ"+t.name+"_BaseFactory"),d=pe(mn.getFactoryOf);if(t.delegate.isEquivalent(t.type))throw new Error("Illegal state: compiling factory that delegates to itself");var v=h.set(d.callFn([t.delegate])).toDeclStmt(ft,[At.Exported,At.Final]);n.push(v),l=p(h.callFn([]))}else if(Fr(t)){var y=jr(t.delegateDeps,t.injectFn);l=p(new(t.delegateType===Mr.Class?Ot:kt)(t.delegate,y))}else if(function m(t){return void 0!==t.expression}
|
|
109
109
|
/**
|
|
110
110
|
* @license
|
|
111
111
|
* Copyright Google Inc. All Rights Reserved.
|
|
112
112
|
*
|
|
113
113
|
* Use of this source code is governed by an MIT-style license that can be
|
|
114
114
|
* found in the LICENSE file at https://angular.io/license
|
|
115
|
-
*/(t))l=p(t.expression);else if(t.extraStatementFn){var g=le("f");c.push(g.set(i).toDeclStmt()),l=g}else l=i;if(t.extraStatementFn){var _=t.extraStatementFn(l);c.push.apply(c,f(_))}return{factory:ve([new Ft("t",ht)],f(c,[new Jt(l)]),ft,void 0,t.name+"_Factory"),statements:n}}function jr(t,e){return t.map(function(t){return function n(t,e){switch(t.resolved){case
|
|
115
|
+
*/(t))l=p(t.expression);else if(t.extraStatementFn){var g=le("f");c.push(g.set(i).toDeclStmt()),l=g}else l=i;if(t.extraStatementFn){var _=t.extraStatementFn(l);c.push.apply(c,f(_))}return{factory:ve([new Ft("t",ht)],f(c,[new Jt(l)]),ft,void 0,t.name+"_Factory"),statements:n}}function jr(t,e){return t.map(function(t){return function n(t,e){switch(t.resolved){case Dr.Token:var n=0|(t.self?2:0)|(t.skipSelf?4:0)|(t.host?1:0)|(t.optional?8:0),r=[t.token];return(0!==n||t.optional)&&r.push(me(n)),pe(e).callFn(r);case Dr.Attribute:return pe(mn.injectAttribute).callFn([t.token]);default:return Ar("Unknown R3ResolvedDependencyType: "+Dr[t.resolved])}}(t,e)})}function Fr(t){return void 0!==t.delegateType}function Vr(t){return de(Object.keys(t).map(function(e){return{key:e,value:t[e],quoted:!1}}))}!function(t){t[t.Class=0]="Class",t[t.Function=1]="Function",t[t.Factory=2]="Factory"}(Mr||(Mr={})),function(t){t[t.Token=0]="Token",t[t.Attribute=1]="Attribute"}(Dr||(Dr={}));
|
|
116
116
|
/**
|
|
117
117
|
* @license
|
|
118
118
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -171,7 +171,7 @@ function s(t,e,n,r){var i=e.toSource()+"\n//# sourceURL="+t,o=[],s=[];for(var a
|
|
|
171
171
|
* Use of this source code is governed by an MIT-style license that can be
|
|
172
172
|
* found in the LICENSE file at https://angular.io/license
|
|
173
173
|
*/
|
|
174
|
-
var ii=function ii(t,e,n,r){this.input=e,this.errLocation=n,this.ctxLocation=r,this.message="Parser Error: "+t+" "+n+" ["+e+"] in "+r},oi=function oi(t,e){this.start=t,this.end=e},si=function(){function t(t){this.span=t}return t.prototype.visit=function(t,e){return void 0===e&&(e=null),null},t.prototype.toString=function(){return"AST"},t}(),ai=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.prefix=n,o.uninterpretedExpression=r,o.location=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitQuote(this,e)},e.prototype.toString=function(){return"Quote"},e}(si),ui=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.visit=function(t,e){void 0===e&&(e=null)},e}(si),ci=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitImplicitReceiver(this,e)},e}(si),li=function(t){function e(e,n){var r=t.call(this,e)||this;return r.expressions=n,r}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitChain(this,e)},e}(si),pi=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.condition=n,o.trueExp=r,o.falseExp=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitConditional(this,e)},e}(si),hi=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.receiver=n,i.name=r,i}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPropertyRead(this,e)},e}(si),fi=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.receiver=n,o.name=r,o.value=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPropertyWrite(this,e)},e}(si),di=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.receiver=n,i.name=r,i}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitSafePropertyRead(this,e)},e}(si),vi=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.obj=n,i.key=r,i}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitKeyedRead(this,e)},e}(si),yi=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.obj=n,o.key=r,o.value=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitKeyedWrite(this,e)},e}(si),mi=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.exp=n,o.name=r,o.args=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPipe(this,e)},e}(si),gi=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitLiteralPrimitive(this,e)},e}(si),_i=function(t){function e(e,n){var r=t.call(this,e)||this;return r.expressions=n,r}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitLiteralArray(this,e)},e}(si),bi=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keys=n,i.values=r,i}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitLiteralMap(this,e)},e}(si),xi=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.strings=n,i.expressions=r,i}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitInterpolation(this,e)},e}(si),wi=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.operation=n,o.left=r,o.right=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitBinary(this,e)},e}(si),Ei=function(t){function e(e,n){var r=t.call(this,e)||this;return r.expression=n,r}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPrefixNot(this,e)},e}(si),Si=function(t){function e(e,n){var r=t.call(this,e)||this;return r.expression=n,r}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitNonNullAssert(this,e)},e}(si),Ci=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.receiver=n,o.name=r,o.args=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitMethodCall(this,e)},e}(si),Ti=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.receiver=n,o.name=r,o.args=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitSafeMethodCall(this,e)},e}(si),Pi=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.target=n,i.args=r,i}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitFunctionCall(this,e)},e}(si),Ai=function(t){function e(e,n,r,i){var o=t.call(this,new oi(0,null==n?0:n.length))||this;return o.ast=e,o.source=n,o.location=r,o.errors=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),this.ast.visit(t,e)},e.prototype.toString=function(){return this.source+" in "+this.location},e}(si),Ni=function Ni(t,e,n,r,i){this.span=t,this.key=e,this.keyIsVar=n,this.name=r,this.expression=i},ki=function(){function t(){}return t.prototype.visitBinary=function(t,e){},t.prototype.visitChain=function(t,e){},t.prototype.visitConditional=function(t,e){},t.prototype.visitFunctionCall=function(t,e){},t.prototype.visitImplicitReceiver=function(t,e){},t.prototype.visitInterpolation=function(t,e){},t.prototype.visitKeyedRead=function(t,e){},t.prototype.visitKeyedWrite=function(t,e){},t.prototype.visitLiteralArray=function(t,e){},t.prototype.visitLiteralMap=function(t,e){},t.prototype.visitLiteralPrimitive=function(t,e){},t.prototype.visitMethodCall=function(t,e){},t.prototype.visitPipe=function(t,e){},t.prototype.visitPrefixNot=function(t,e){},t.prototype.visitNonNullAssert=function(t,e){},t.prototype.visitPropertyRead=function(t,e){},t.prototype.visitPropertyWrite=function(t,e){},t.prototype.visitQuote=function(t,e){},t.prototype.visitSafeMethodCall=function(t,e){},t.prototype.visitSafePropertyRead=function(t,e){},t}(),Oi=function(){function t(){}return t.prototype.visitBinary=function(t,e){return t.left.visit(this),t.right.visit(this),null},t.prototype.visitChain=function(t,e){return this.visitAll(t.expressions,e)},t.prototype.visitConditional=function(t,e){return t.condition.visit(this),t.trueExp.visit(this),t.falseExp.visit(this),null},t.prototype.visitPipe=function(t,e){return t.exp.visit(this),this.visitAll(t.args,e),null},t.prototype.visitFunctionCall=function(t,e){return t.target.visit(this),this.visitAll(t.args,e),null},t.prototype.visitImplicitReceiver=function(t,e){return null},t.prototype.visitInterpolation=function(t,e){return this.visitAll(t.expressions,e)},t.prototype.visitKeyedRead=function(t,e){return t.obj.visit(this),t.key.visit(this),null},t.prototype.visitKeyedWrite=function(t,e){return t.obj.visit(this),t.key.visit(this),t.value.visit(this),null},t.prototype.visitLiteralArray=function(t,e){return this.visitAll(t.expressions,e)},t.prototype.visitLiteralMap=function(t,e){return this.visitAll(t.values,e)},t.prototype.visitLiteralPrimitive=function(t,e){return null},t.prototype.visitMethodCall=function(t,e){return t.receiver.visit(this),this.visitAll(t.args,e)},t.prototype.visitPrefixNot=function(t,e){return t.expression.visit(this),null},t.prototype.visitNonNullAssert=function(t,e){return t.expression.visit(this),null},t.prototype.visitPropertyRead=function(t,e){return t.receiver.visit(this),null},t.prototype.visitPropertyWrite=function(t,e){return t.receiver.visit(this),t.value.visit(this),null},t.prototype.visitSafePropertyRead=function(t,e){return t.receiver.visit(this),null},t.prototype.visitSafeMethodCall=function(t,e){return t.receiver.visit(this),this.visitAll(t.args,e)},t.prototype.visitAll=function(t,e){var n=this;return t.forEach(function(t){return t.visit(n,e)}),null},t.prototype.visitQuote=function(t,e){return null},t}(),Ii=function(){function t(){}return t.prototype.visitImplicitReceiver=function(t,e){return t},t.prototype.visitInterpolation=function(t,e){return new xi(t.span,t.strings,this.visitAll(t.expressions))},t.prototype.visitLiteralPrimitive=function(t,e){return new gi(t.span,t.value)},t.prototype.visitPropertyRead=function(t,e){return new hi(t.span,t.receiver.visit(this),t.name)},t.prototype.visitPropertyWrite=function(t,e){return new fi(t.span,t.receiver.visit(this),t.name,t.value.visit(this))},t.prototype.visitSafePropertyRead=function(t,e){return new di(t.span,t.receiver.visit(this),t.name)},t.prototype.visitMethodCall=function(t,e){return new Ci(t.span,t.receiver.visit(this),t.name,this.visitAll(t.args))},t.prototype.visitSafeMethodCall=function(t,e){return new Ti(t.span,t.receiver.visit(this),t.name,this.visitAll(t.args))},t.prototype.visitFunctionCall=function(t,e){return new Pi(t.span,t.target.visit(this),this.visitAll(t.args))},t.prototype.visitLiteralArray=function(t,e){return new _i(t.span,this.visitAll(t.expressions))},t.prototype.visitLiteralMap=function(t,e){return new bi(t.span,t.keys,this.visitAll(t.values))},t.prototype.visitBinary=function(t,e){return new wi(t.span,t.operation,t.left.visit(this),t.right.visit(this))},t.prototype.visitPrefixNot=function(t,e){return new Ei(t.span,t.expression.visit(this))},t.prototype.visitNonNullAssert=function(t,e){return new Si(t.span,t.expression.visit(this))},t.prototype.visitConditional=function(t,e){return new pi(t.span,t.condition.visit(this),t.trueExp.visit(this),t.falseExp.visit(this))},t.prototype.visitPipe=function(t,e){return new mi(t.span,t.exp.visit(this),t.name,this.visitAll(t.args))},t.prototype.visitKeyedRead=function(t,e){return new vi(t.span,t.obj.visit(this),t.key.visit(this))},t.prototype.visitKeyedWrite=function(t,e){return new yi(t.span,t.obj.visit(this),t.key.visit(this),t.value.visit(this))},t.prototype.visitAll=function(t){for(var e=new Array(t.length),n=0;n<t.length;++n)e[n]=t[n].visit(this);return e},t.prototype.visitChain=function(t,e){return new li(t.span,this.visitAll(t.expressions))},t.prototype.visitQuote=function(t,e){return new ai(t.span,t.prefix,t.uninterpretedExpression,t.location)},t}(),Mi=function(){function t(){}return t.prototype.visitImplicitReceiver=function(t,e){return t},t.prototype.visitInterpolation=function(t,e){var n=this.visitAll(t.expressions);return n!==t.expressions?new xi(t.span,t.strings,n):t},t.prototype.visitLiteralPrimitive=function(t,e){return t},t.prototype.visitPropertyRead=function(t,e){var n=t.receiver.visit(this);return n!==t.receiver?new hi(t.span,n,t.name):t},t.prototype.visitPropertyWrite=function(t,e){var n=t.receiver.visit(this),r=t.value.visit(this);return n!==t.receiver||r!==t.value?new fi(t.span,n,t.name,r):t},t.prototype.visitSafePropertyRead=function(t,e){var n=t.receiver.visit(this);return n!==t.receiver?new di(t.span,n,t.name):t},t.prototype.visitMethodCall=function(t,e){var n=t.receiver.visit(this);return n!==t.receiver?new Ci(t.span,n,t.name,this.visitAll(t.args)):t},t.prototype.visitSafeMethodCall=function(t,e){var n=t.receiver.visit(this),r=this.visitAll(t.args);return n!==t.receiver||r!==t.args?new Ti(t.span,n,t.name,r):t},t.prototype.visitFunctionCall=function(t,e){var n=t.target&&t.target.visit(this),r=this.visitAll(t.args);return n!==t.target||r!==t.args?new Pi(t.span,n,r):t},t.prototype.visitLiteralArray=function(t,e){var n=this.visitAll(t.expressions);return n!==t.expressions?new _i(t.span,n):t},t.prototype.visitLiteralMap=function(t,e){var n=this.visitAll(t.values);return n!==t.values?new bi(t.span,t.keys,n):t},t.prototype.visitBinary=function(t,e){var n=t.left.visit(this),r=t.right.visit(this);return n!==t.left||r!==t.right?new wi(t.span,t.operation,n,r):t},t.prototype.visitPrefixNot=function(t,e){var n=t.expression.visit(this);return n!==t.expression?new Ei(t.span,n):t},t.prototype.visitNonNullAssert=function(t,e){var n=t.expression.visit(this);return n!==t.expression?new Si(t.span,n):t},t.prototype.visitConditional=function(t,e){var n=t.condition.visit(this),r=t.trueExp.visit(this),i=t.falseExp.visit(this);return n!==t.condition||r!==t.trueExp||i!=i?new pi(t.span,n,r,i):t},t.prototype.visitPipe=function(t,e){var n=t.exp.visit(this),r=this.visitAll(t.args);return n!==t.exp||r!==t.args?new mi(t.span,n,t.name,r):t},t.prototype.visitKeyedRead=function(t,e){var n=t.obj.visit(this),r=t.key.visit(this);return n!==t.obj||r!==t.key?new vi(t.span,n,r):t},t.prototype.visitKeyedWrite=function(t,e){var n=t.obj.visit(this),r=t.key.visit(this),i=t.value.visit(this);return n!==t.obj||r!==t.key||i!==t.value?new yi(t.span,n,r,i):t},t.prototype.visitAll=function(t){for(var e=new Array(t.length),n=!1,r=0;r<t.length;++r){var i=t[r],o=i.visit(this);e[r]=o,n=n||o!==i}return n?e:t},t.prototype.visitChain=function(t,e){var n=this.visitAll(t.expressions);return n!==t.expressions?new li(t.span,n):t},t.prototype.visitQuote=function(t,e){return t},t}();function Ri(t,e,n){function r(t){e.visit&&e.visit(t,n)||t.visit(e,n)}function i(t){t.forEach(r)}t.visit({visitBinary:function(t){r(t.left),r(t.right)},visitChain:function(t){i(t.expressions)},visitConditional:function(t){r(t.condition),r(t.trueExp),r(t.falseExp)},visitFunctionCall:function(t){t.target&&r(t.target),i(t.args)},visitImplicitReceiver:function(t){},visitInterpolation:function(t){i(t.expressions)},visitKeyedRead:function(t){r(t.obj),r(t.key)},visitKeyedWrite:function(t){r(t.obj),r(t.key),r(t.obj)},visitLiteralArray:function(t){i(t.expressions)},visitLiteralMap:function(t){},visitLiteralPrimitive:function(t){},visitMethodCall:function(t){r(t.receiver),i(t.args)},visitPipe:function(t){r(t.exp),i(t.args)},visitPrefixNot:function(t){r(t.expression)},visitNonNullAssert:function(t){r(t.expression)},visitPropertyRead:function(t){r(t.receiver)},visitPropertyWrite:function(t){r(t.receiver),r(t.value)},visitQuote:function(t){},visitSafeMethodCall:function(t){r(t.receiver),i(t.args)},visitSafePropertyRead:function(t){r(t.receiver)}})}var Di,Li=function Li(t,e,n,r){this.name=t,this.expression=e,this.type=n,this.sourceSpan=r,this.isLiteral=this.type===Di.LITERAL_ATTR,this.isAnimation=this.type===Di.ANIMATION};!function(t){t[t.DEFAULT=0]="DEFAULT",t[t.LITERAL_ATTR=1]="LITERAL_ATTR",t[t.ANIMATION=2]="ANIMATION"}(Di||(Di={}));var ji=function ji(t,e,n,r,i){this.name=t,this.targetOrPhase=e,this.type=n,this.handler=r,this.sourceSpan=i},Fi=function Fi(t,e,n){this.name=t,this.value=e,this.sourceSpan=n},Vi=function Vi(t,e,n,r,i,o){this.name=t,this.type=e,this.securityContext=n,this.value=r,this.unit=i,this.sourceSpan=o},Bi=function(){function t(){}return t.event=le("$event"),t}(),Hi=function Hi(t,e){this.stmts=t,this.allowDefault=e,this.render3Stmts=t.map(function(t){return t instanceof $t&&t.name==e.name&&t.value instanceof Bt?new Jt(t.value.lhs.value):t})};function qi(t,e,n,r,i){t||(t=new to);var o=function s(t,e){return function n(t,e){var n=new Zi(t);return e.visit(n)}(t,e)}({createLiteralArrayConverter:function(t){return function(t){return fe(t)}},createLiteralMapConverter:function(t){return function(e){return de(t.map(function(t,n){return{key:t.key,value:e[n],quoted:t.quoted}}))}},createPipeConverter:function(t){throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: "+t)}},n),a=new Ji(t,e,r,i),u=[];!function t(e,n){Array.isArray(e)?e.forEach(function(e){return t(e,n)}):n.push(e)}(o.visit(a,Ki.Statement),u),function c(t,e,n){for(var r=t-1;r>=0;r--)n.unshift(Gi(e,r))}(a.temporaryCount,r,u);var l=u.length-1,p=null;if(l>=0){var h=function f(t){return t instanceof Zt?t.expr:t instanceof Jt?t.value:null}(u[l]);h&&(p=function d(t){return le("pd_"+t)}(r),u[l]=p.set(h.cast(ht).notIdentical(me(!1))).toDeclStmt(null,[At.Final]))}return new Hi(u,p)}var Ui,Ki,Wi=function Wi(t,e){this.stmts=t,this.currValExpr=e};function zi(t,e,n,r,i,o){t||(t=new to);var s=function a(t){return le("currVal_"+t)}(r),u=[],c=new Ji(t,e,r,o),l=n.visit(c,Ki.Expression);if(c.temporaryCount)for(var p=0;p<c.temporaryCount;p++)u.push(Gi(r,p));else if(i==Ui.TrySimple)return new Wi([],l);return u.push(s.set(l).toDeclStmt(ht,[At.Final])),new Wi(u,s)}function Qi(t,e){return"tmp_"+t+"_"+e}function Gi(t,e){return new $t(Qi(t,e),Qt)}function Xi(t,e){if(t!==Ki.Expression)throw new Error("Expected an expression, but saw "+e)}function $i(t,e){return t===Ki.Statement?e.toStmt():e}!function(t){t[t.General=0]="General",t[t.TrySimple=1]="TrySimple"}(Ui||(Ui={})),function(t){t[t.Statement=0]="Statement",t[t.Expression=1]="Expression"}(Ki||(Ki={}));var Yi,Zi=function(t){function e(e){var n=t.call(this)||this;return n._converterFactory=e,n}return o(e,t),e.prototype.visitPipe=function(t,e){var n=this,r=f([t.exp],t.args).map(function(t){return t.visit(n,e)});return new eo(t.span,r,this._converterFactory.createPipeConverter(t.name,r.length))},e.prototype.visitLiteralArray=function(t,e){var n=this,r=t.expressions.map(function(t){return t.visit(n,e)});return new eo(t.span,r,this._converterFactory.createLiteralArrayConverter(t.expressions.length))},e.prototype.visitLiteralMap=function(t,e){var n=this,r=t.values.map(function(t){return t.visit(n,e)});return new eo(t.span,r,this._converterFactory.createLiteralMapConverter(t.keys))},e}(Ii),Ji=function(){function t(t,e,n,r){this._localResolver=t,this._implicitReceiver=e,this.bindingId=n,this.interpolationFunction=r,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0}return t.prototype.visitBinary=function(t,e){var n;switch(t.operation){case"+":n=ut.Plus;break;case"-":n=ut.Minus;break;case"*":n=ut.Multiply;break;case"/":n=ut.Divide;break;case"%":n=ut.Modulo;break;case"&&":n=ut.And;break;case"||":n=ut.Or;break;case"==":n=ut.Equals;break;case"!=":n=ut.NotEquals;break;case"===":n=ut.Identical;break;case"!==":n=ut.NotIdentical;break;case"<":n=ut.Lower;break;case">":n=ut.Bigger;break;case"<=":n=ut.LowerEquals;break;case">=":n=ut.BiggerEquals;break;default:throw new Error("Unsupported operation "+t.operation)}return $i(e,new Bt(n,this._visit(t.left,Ki.Expression),this._visit(t.right,Ki.Expression)))},t.prototype.visitChain=function(t,e){return function n(t,e){if(t!==Ki.Statement)throw new Error("Expected a statement, but saw "+e)}(e,t),this.visitAll(t.expressions,e)},t.prototype.visitConditional=function(t,e){return $i(e,this._visit(t.condition,Ki.Expression).conditional(this._visit(t.trueExp,Ki.Expression),this._visit(t.falseExp,Ki.Expression)))},t.prototype.visitPipe=function(t,e){throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: "+t.name)},t.prototype.visitFunctionCall=function(t,e){var n=this.visitAll(t.args,Ki.Expression);return $i(e,t instanceof eo?t.converter(n):this._visit(t.target,Ki.Expression).callFn(n))},t.prototype.visitImplicitReceiver=function(t,e){return Xi(e,t),this._implicitReceiver},t.prototype.visitInterpolation=function(t,e){Xi(e,t);for(var n=[me(t.expressions.length)],r=0;r<t.strings.length-1;r++)n.push(me(t.strings[r])),n.push(this._visit(t.expressions[r],Ki.Expression));return n.push(me(t.strings[t.strings.length-1])),this.interpolationFunction?this.interpolationFunction(n):t.expressions.length<=9?pe(Ge.inlineInterpolate).callFn(n):pe(Ge.interpolate).callFn([n[0],fe(n.slice(1))])},t.prototype.visitKeyedRead=function(t,e){var n=this.leftMostSafeNode(t);return n?this.convertSafeAccess(t,n,e):$i(e,this._visit(t.obj,Ki.Expression).key(this._visit(t.key,Ki.Expression)))},t.prototype.visitKeyedWrite=function(t,e){var n=this._visit(t.obj,Ki.Expression),r=this._visit(t.key,Ki.Expression),i=this._visit(t.value,Ki.Expression);return $i(e,n.key(r).set(i))},t.prototype.visitLiteralArray=function(t,e){throw new Error("Illegal State: literal arrays should have been converted into functions")},t.prototype.visitLiteralMap=function(t,e){throw new Error("Illegal State: literal maps should have been converted into functions")},t.prototype.visitLiteralPrimitive=function(t,e){return $i(e,me(t.value,null===t.value||void 0===t.value||!0===t.value||!0===t.value?ft:void 0))},t.prototype._getLocal=function(t){return this._localResolver.getLocal(t)},t.prototype.visitMethodCall=function(t,e){if(t.receiver instanceof ci&&"$any"==t.name){if(1!=(r=this.visitAll(t.args,Ki.Expression)).length)throw new Error("Invalid call to $any, expected 1 argument but received "+(r.length||"none"));return r[0].cast(ht)}var n=this.leftMostSafeNode(t);if(n)return this.convertSafeAccess(t,n,e);var r=this.visitAll(t.args,Ki.Expression),i=null,o=this._visit(t.receiver,Ki.Expression);if(o===this._implicitReceiver){var s=this._getLocal(t.name);s&&(i=s.callFn(r))}return null==i&&(i=o.callMethod(t.name,r)),$i(e,i)},t.prototype.visitPrefixNot=function(t,e){return $i(e,function n(t,e){return new Dt(t,e)}(this._visit(t.expression,Ki.Expression)))},t.prototype.visitNonNullAssert=function(t,e){return $i(e,function n(t,e){return new Lt(t,e)}(this._visit(t.expression,Ki.Expression)))},t.prototype.visitPropertyRead=function(t,e){var n=this.leftMostSafeNode(t);if(n)return this.convertSafeAccess(t,n,e);var r=null,i=this._visit(t.receiver,Ki.Expression);return i===this._implicitReceiver&&(r=this._getLocal(t.name)),null==r&&(r=i.prop(t.name)),$i(e,r)},t.prototype.visitPropertyWrite=function(t,e){var n=this._visit(t.receiver,Ki.Expression),r=null;if(n===this._implicitReceiver){var i=this._getLocal(t.name);if(i){if(!(i instanceof Ht))throw new Error("Cannot assign to a reference or variable!");r=i}}return null===r&&(r=n.prop(t.name)),$i(e,r.set(this._visit(t.value,Ki.Expression)))},t.prototype.visitSafePropertyRead=function(t,e){return this.convertSafeAccess(t,this.leftMostSafeNode(t),e)},t.prototype.visitSafeMethodCall=function(t,e){return this.convertSafeAccess(t,this.leftMostSafeNode(t),e)},t.prototype.visitAll=function(t,e){var n=this;return t.map(function(t){return n._visit(t,e)})},t.prototype.visitQuote=function(t,e){throw new Error("Quotes are not supported for evaluation!\n Statement: "+t.uninterpretedExpression+" located at "+t.location)},t.prototype._visit=function(t,e){return this._resultMap.get(t)||(this._nodeMap.get(t)||t).visit(this,e)},t.prototype.convertSafeAccess=function(t,e,n){var r=this._visit(e.receiver,Ki.Expression),i=void 0;this.needsTemporary(e.receiver)&&(r=(i=this.allocateTemporary()).set(r),this._resultMap.set(e.receiver,i));var o=r.isBlank();this._nodeMap.set(e,e instanceof Ti?new Ci(e.span,e.receiver,e.name,e.args):new hi(e.span,e.receiver,e.name));var s=this._visit(t,Ki.Expression);return this._nodeMap.delete(e),i&&this.releaseTemporary(i),$i(n,o.conditional(me(null),s))},t.prototype.leftMostSafeNode=function(t){var e=this,n=function(t,n){return(e._nodeMap.get(n)||n).visit(t)};return t.visit({visitBinary:function(t){return null},visitChain:function(t){return null},visitConditional:function(t){return null},visitFunctionCall:function(t){return null},visitImplicitReceiver:function(t){return null},visitInterpolation:function(t){return null},visitKeyedRead:function(t){return n(this,t.obj)},visitKeyedWrite:function(t){return null},visitLiteralArray:function(t){return null},visitLiteralMap:function(t){return null},visitLiteralPrimitive:function(t){return null},visitMethodCall:function(t){return n(this,t.receiver)},visitPipe:function(t){return null},visitPrefixNot:function(t){return null},visitNonNullAssert:function(t){return null},visitPropertyRead:function(t){return n(this,t.receiver)},visitPropertyWrite:function(t){return null},visitQuote:function(t){return null},visitSafeMethodCall:function(t){return n(this,t.receiver)||t},visitSafePropertyRead:function(t){return n(this,t.receiver)||t}})},t.prototype.needsTemporary=function(t){var e=this,n=function(t,n){return n&&(e._nodeMap.get(n)||n).visit(t)};return t.visit({visitBinary:function(t){return n(this,t.left)||n(this,t.right)},visitChain:function(t){return!1},visitConditional:function(t){return n(this,t.condition)||n(this,t.trueExp)||n(this,t.falseExp)},visitFunctionCall:function(t){return!0},visitImplicitReceiver:function(t){return!1},visitInterpolation:function(t){return function(t,e){return e.some(function(e){return n(t,e)})}(this,t.expressions)},visitKeyedRead:function(t){return!1},visitKeyedWrite:function(t){return!1},visitLiteralArray:function(t){return!0},visitLiteralMap:function(t){return!0},visitLiteralPrimitive:function(t){return!1},visitMethodCall:function(t){return!0},visitPipe:function(t){return!0},visitPrefixNot:function(t){return n(this,t.expression)},visitNonNullAssert:function(t){return n(this,t.expression)},visitPropertyRead:function(t){return!1},visitPropertyWrite:function(t){return!1},visitQuote:function(t){return!1},visitSafeMethodCall:function(t){return!0},visitSafePropertyRead:function(t){return!1}})},t.prototype.allocateTemporary=function(){var t=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new wt(Qi(this.bindingId,t))},t.prototype.releaseTemporary=function(t){if(this._currentTemporary--,t.name!=Qi(this.bindingId,this._currentTemporary))throw new Error("Temporary "+t.name+" released out of order")},t}(),to=function(){function t(){}return t.prototype.getLocal=function(t){return t===Bi.event.name?Bi.event:null},t}(),eo=function(t){function e(e,n,r){var i=t.call(this,e,null,n)||this;return i.args=n,i.converter=r,i}return o(e,t),e}(Pi);!function(t){t[t.OnInit=0]="OnInit",t[t.OnDestroy=1]="OnDestroy",t[t.DoCheck=2]="DoCheck",t[t.OnChanges=3]="OnChanges",t[t.AfterContentInit=4]="AfterContentInit",t[t.AfterContentChecked=5]="AfterContentChecked",t[t.AfterViewInit=6]="AfterViewInit",t[t.AfterViewChecked=7]="AfterViewChecked"}(Yi||(Yi={}));var no=[Yi.OnInit,Yi.OnDestroy,Yi.DoCheck,Yi.OnChanges,Yi.AfterContentInit,Yi.AfterContentChecked,Yi.AfterViewInit,Yi.AfterViewChecked],ro=0,io=9,oo=10,so=11,ao=12,uo=13,co=32,lo=34,po=36,ho=39,fo=43,vo=45,yo=47,mo=59,go=61,_o=62,bo=48,xo=57,wo=65,Eo=70,So=90,Co=95,To=97,Po=102,Ao=110,No=114,ko=116,Oo=118,Io=122,Mo=123,Ro=160;function Do(t){return t>=io&&t<=co||t==Ro}function Lo(t){return bo<=t&&t<=xo}function jo(t){return t>=To&&t<=Io||t>=wo&&t<=So}
|
|
174
|
+
var ii=function ii(t,e,n,r){this.input=e,this.errLocation=n,this.ctxLocation=r,this.message="Parser Error: "+t+" "+n+" ["+e+"] in "+r},oi=function oi(t,e){this.start=t,this.end=e},si=function(){function t(t){this.span=t}return t.prototype.visit=function(t,e){return void 0===e&&(e=null),null},t.prototype.toString=function(){return"AST"},t}(),ai=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.prefix=n,o.uninterpretedExpression=r,o.location=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitQuote(this,e)},e.prototype.toString=function(){return"Quote"},e}(si),ui=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.visit=function(t,e){void 0===e&&(e=null)},e}(si),ci=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitImplicitReceiver(this,e)},e}(si),li=function(t){function e(e,n){var r=t.call(this,e)||this;return r.expressions=n,r}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitChain(this,e)},e}(si),pi=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.condition=n,o.trueExp=r,o.falseExp=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitConditional(this,e)},e}(si),hi=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.receiver=n,i.name=r,i}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPropertyRead(this,e)},e}(si),fi=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.receiver=n,o.name=r,o.value=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPropertyWrite(this,e)},e}(si),di=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.receiver=n,i.name=r,i}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitSafePropertyRead(this,e)},e}(si),vi=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.obj=n,i.key=r,i}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitKeyedRead(this,e)},e}(si),yi=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.obj=n,o.key=r,o.value=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitKeyedWrite(this,e)},e}(si),mi=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.exp=n,o.name=r,o.args=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPipe(this,e)},e}(si),gi=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitLiteralPrimitive(this,e)},e}(si),_i=function(t){function e(e,n){var r=t.call(this,e)||this;return r.expressions=n,r}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitLiteralArray(this,e)},e}(si),bi=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keys=n,i.values=r,i}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitLiteralMap(this,e)},e}(si),xi=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.strings=n,i.expressions=r,i}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitInterpolation(this,e)},e}(si),wi=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.operation=n,o.left=r,o.right=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitBinary(this,e)},e}(si),Ei=function(t){function e(e,n){var r=t.call(this,e)||this;return r.expression=n,r}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPrefixNot(this,e)},e}(si),Si=function(t){function e(e,n){var r=t.call(this,e)||this;return r.expression=n,r}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitNonNullAssert(this,e)},e}(si),Ci=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.receiver=n,o.name=r,o.args=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitMethodCall(this,e)},e}(si),Ti=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.receiver=n,o.name=r,o.args=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitSafeMethodCall(this,e)},e}(si),Pi=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.target=n,i.args=r,i}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitFunctionCall(this,e)},e}(si),Ai=function(t){function e(e,n,r,i){var o=t.call(this,new oi(0,null==n?0:n.length))||this;return o.ast=e,o.source=n,o.location=r,o.errors=i,o}return o(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),this.ast.visit(t,e)},e.prototype.toString=function(){return this.source+" in "+this.location},e}(si),Ni=function Ni(t,e,n,r,i){this.span=t,this.key=e,this.keyIsVar=n,this.name=r,this.expression=i},ki=function(){function t(){}return t.prototype.visitBinary=function(t,e){},t.prototype.visitChain=function(t,e){},t.prototype.visitConditional=function(t,e){},t.prototype.visitFunctionCall=function(t,e){},t.prototype.visitImplicitReceiver=function(t,e){},t.prototype.visitInterpolation=function(t,e){},t.prototype.visitKeyedRead=function(t,e){},t.prototype.visitKeyedWrite=function(t,e){},t.prototype.visitLiteralArray=function(t,e){},t.prototype.visitLiteralMap=function(t,e){},t.prototype.visitLiteralPrimitive=function(t,e){},t.prototype.visitMethodCall=function(t,e){},t.prototype.visitPipe=function(t,e){},t.prototype.visitPrefixNot=function(t,e){},t.prototype.visitNonNullAssert=function(t,e){},t.prototype.visitPropertyRead=function(t,e){},t.prototype.visitPropertyWrite=function(t,e){},t.prototype.visitQuote=function(t,e){},t.prototype.visitSafeMethodCall=function(t,e){},t.prototype.visitSafePropertyRead=function(t,e){},t}(),Oi=function(){function t(){}return t.prototype.visitBinary=function(t,e){return t.left.visit(this),t.right.visit(this),null},t.prototype.visitChain=function(t,e){return this.visitAll(t.expressions,e)},t.prototype.visitConditional=function(t,e){return t.condition.visit(this),t.trueExp.visit(this),t.falseExp.visit(this),null},t.prototype.visitPipe=function(t,e){return t.exp.visit(this),this.visitAll(t.args,e),null},t.prototype.visitFunctionCall=function(t,e){return t.target.visit(this),this.visitAll(t.args,e),null},t.prototype.visitImplicitReceiver=function(t,e){return null},t.prototype.visitInterpolation=function(t,e){return this.visitAll(t.expressions,e)},t.prototype.visitKeyedRead=function(t,e){return t.obj.visit(this),t.key.visit(this),null},t.prototype.visitKeyedWrite=function(t,e){return t.obj.visit(this),t.key.visit(this),t.value.visit(this),null},t.prototype.visitLiteralArray=function(t,e){return this.visitAll(t.expressions,e)},t.prototype.visitLiteralMap=function(t,e){return this.visitAll(t.values,e)},t.prototype.visitLiteralPrimitive=function(t,e){return null},t.prototype.visitMethodCall=function(t,e){return t.receiver.visit(this),this.visitAll(t.args,e)},t.prototype.visitPrefixNot=function(t,e){return t.expression.visit(this),null},t.prototype.visitNonNullAssert=function(t,e){return t.expression.visit(this),null},t.prototype.visitPropertyRead=function(t,e){return t.receiver.visit(this),null},t.prototype.visitPropertyWrite=function(t,e){return t.receiver.visit(this),t.value.visit(this),null},t.prototype.visitSafePropertyRead=function(t,e){return t.receiver.visit(this),null},t.prototype.visitSafeMethodCall=function(t,e){return t.receiver.visit(this),this.visitAll(t.args,e)},t.prototype.visitAll=function(t,e){var n=this;return t.forEach(function(t){return t.visit(n,e)}),null},t.prototype.visitQuote=function(t,e){return null},t}(),Ii=function(){function t(){}return t.prototype.visitImplicitReceiver=function(t,e){return t},t.prototype.visitInterpolation=function(t,e){return new xi(t.span,t.strings,this.visitAll(t.expressions))},t.prototype.visitLiteralPrimitive=function(t,e){return new gi(t.span,t.value)},t.prototype.visitPropertyRead=function(t,e){return new hi(t.span,t.receiver.visit(this),t.name)},t.prototype.visitPropertyWrite=function(t,e){return new fi(t.span,t.receiver.visit(this),t.name,t.value.visit(this))},t.prototype.visitSafePropertyRead=function(t,e){return new di(t.span,t.receiver.visit(this),t.name)},t.prototype.visitMethodCall=function(t,e){return new Ci(t.span,t.receiver.visit(this),t.name,this.visitAll(t.args))},t.prototype.visitSafeMethodCall=function(t,e){return new Ti(t.span,t.receiver.visit(this),t.name,this.visitAll(t.args))},t.prototype.visitFunctionCall=function(t,e){return new Pi(t.span,t.target.visit(this),this.visitAll(t.args))},t.prototype.visitLiteralArray=function(t,e){return new _i(t.span,this.visitAll(t.expressions))},t.prototype.visitLiteralMap=function(t,e){return new bi(t.span,t.keys,this.visitAll(t.values))},t.prototype.visitBinary=function(t,e){return new wi(t.span,t.operation,t.left.visit(this),t.right.visit(this))},t.prototype.visitPrefixNot=function(t,e){return new Ei(t.span,t.expression.visit(this))},t.prototype.visitNonNullAssert=function(t,e){return new Si(t.span,t.expression.visit(this))},t.prototype.visitConditional=function(t,e){return new pi(t.span,t.condition.visit(this),t.trueExp.visit(this),t.falseExp.visit(this))},t.prototype.visitPipe=function(t,e){return new mi(t.span,t.exp.visit(this),t.name,this.visitAll(t.args))},t.prototype.visitKeyedRead=function(t,e){return new vi(t.span,t.obj.visit(this),t.key.visit(this))},t.prototype.visitKeyedWrite=function(t,e){return new yi(t.span,t.obj.visit(this),t.key.visit(this),t.value.visit(this))},t.prototype.visitAll=function(t){for(var e=new Array(t.length),n=0;n<t.length;++n)e[n]=t[n].visit(this);return e},t.prototype.visitChain=function(t,e){return new li(t.span,this.visitAll(t.expressions))},t.prototype.visitQuote=function(t,e){return new ai(t.span,t.prefix,t.uninterpretedExpression,t.location)},t}(),Mi=function(){function t(){}return t.prototype.visitImplicitReceiver=function(t,e){return t},t.prototype.visitInterpolation=function(t,e){var n=this.visitAll(t.expressions);return n!==t.expressions?new xi(t.span,t.strings,n):t},t.prototype.visitLiteralPrimitive=function(t,e){return t},t.prototype.visitPropertyRead=function(t,e){var n=t.receiver.visit(this);return n!==t.receiver?new hi(t.span,n,t.name):t},t.prototype.visitPropertyWrite=function(t,e){var n=t.receiver.visit(this),r=t.value.visit(this);return n!==t.receiver||r!==t.value?new fi(t.span,n,t.name,r):t},t.prototype.visitSafePropertyRead=function(t,e){var n=t.receiver.visit(this);return n!==t.receiver?new di(t.span,n,t.name):t},t.prototype.visitMethodCall=function(t,e){var n=t.receiver.visit(this);return n!==t.receiver?new Ci(t.span,n,t.name,this.visitAll(t.args)):t},t.prototype.visitSafeMethodCall=function(t,e){var n=t.receiver.visit(this),r=this.visitAll(t.args);return n!==t.receiver||r!==t.args?new Ti(t.span,n,t.name,r):t},t.prototype.visitFunctionCall=function(t,e){var n=t.target&&t.target.visit(this),r=this.visitAll(t.args);return n!==t.target||r!==t.args?new Pi(t.span,n,r):t},t.prototype.visitLiteralArray=function(t,e){var n=this.visitAll(t.expressions);return n!==t.expressions?new _i(t.span,n):t},t.prototype.visitLiteralMap=function(t,e){var n=this.visitAll(t.values);return n!==t.values?new bi(t.span,t.keys,n):t},t.prototype.visitBinary=function(t,e){var n=t.left.visit(this),r=t.right.visit(this);return n!==t.left||r!==t.right?new wi(t.span,t.operation,n,r):t},t.prototype.visitPrefixNot=function(t,e){var n=t.expression.visit(this);return n!==t.expression?new Ei(t.span,n):t},t.prototype.visitNonNullAssert=function(t,e){var n=t.expression.visit(this);return n!==t.expression?new Si(t.span,n):t},t.prototype.visitConditional=function(t,e){var n=t.condition.visit(this),r=t.trueExp.visit(this),i=t.falseExp.visit(this);return n!==t.condition||r!==t.trueExp||i!=i?new pi(t.span,n,r,i):t},t.prototype.visitPipe=function(t,e){var n=t.exp.visit(this),r=this.visitAll(t.args);return n!==t.exp||r!==t.args?new mi(t.span,n,t.name,r):t},t.prototype.visitKeyedRead=function(t,e){var n=t.obj.visit(this),r=t.key.visit(this);return n!==t.obj||r!==t.key?new vi(t.span,n,r):t},t.prototype.visitKeyedWrite=function(t,e){var n=t.obj.visit(this),r=t.key.visit(this),i=t.value.visit(this);return n!==t.obj||r!==t.key||i!==t.value?new yi(t.span,n,r,i):t},t.prototype.visitAll=function(t){for(var e=new Array(t.length),n=!1,r=0;r<t.length;++r){var i=t[r],o=i.visit(this);e[r]=o,n=n||o!==i}return n?e:t},t.prototype.visitChain=function(t,e){var n=this.visitAll(t.expressions);return n!==t.expressions?new li(t.span,n):t},t.prototype.visitQuote=function(t,e){return t},t}();function Di(t,e,n){function r(t){e.visit&&e.visit(t,n)||t.visit(e,n)}function i(t){t.forEach(r)}t.visit({visitBinary:function(t){r(t.left),r(t.right)},visitChain:function(t){i(t.expressions)},visitConditional:function(t){r(t.condition),r(t.trueExp),r(t.falseExp)},visitFunctionCall:function(t){t.target&&r(t.target),i(t.args)},visitImplicitReceiver:function(t){},visitInterpolation:function(t){i(t.expressions)},visitKeyedRead:function(t){r(t.obj),r(t.key)},visitKeyedWrite:function(t){r(t.obj),r(t.key),r(t.obj)},visitLiteralArray:function(t){i(t.expressions)},visitLiteralMap:function(t){},visitLiteralPrimitive:function(t){},visitMethodCall:function(t){r(t.receiver),i(t.args)},visitPipe:function(t){r(t.exp),i(t.args)},visitPrefixNot:function(t){r(t.expression)},visitNonNullAssert:function(t){r(t.expression)},visitPropertyRead:function(t){r(t.receiver)},visitPropertyWrite:function(t){r(t.receiver),r(t.value)},visitQuote:function(t){},visitSafeMethodCall:function(t){r(t.receiver),i(t.args)},visitSafePropertyRead:function(t){r(t.receiver)}})}var Ri,Li=function Li(t,e,n,r){this.name=t,this.expression=e,this.type=n,this.sourceSpan=r,this.isLiteral=this.type===Ri.LITERAL_ATTR,this.isAnimation=this.type===Ri.ANIMATION};!function(t){t[t.DEFAULT=0]="DEFAULT",t[t.LITERAL_ATTR=1]="LITERAL_ATTR",t[t.ANIMATION=2]="ANIMATION"}(Ri||(Ri={}));var ji=function ji(t,e,n,r,i){this.name=t,this.targetOrPhase=e,this.type=n,this.handler=r,this.sourceSpan=i},Fi=function Fi(t,e,n){this.name=t,this.value=e,this.sourceSpan=n},Vi=function Vi(t,e,n,r,i,o){this.name=t,this.type=e,this.securityContext=n,this.value=r,this.unit=i,this.sourceSpan=o},Bi=function(){function t(){}return t.event=le("$event"),t}(),Hi=function Hi(t,e){this.stmts=t,this.allowDefault=e,this.render3Stmts=t.map(function(t){return t instanceof $t&&t.name==e.name&&t.value instanceof Bt?new Jt(t.value.lhs.value):t})};function qi(t,e,n,r,i){t||(t=new to);var o=function s(t,e){return function n(t,e){var n=new Zi(t);return e.visit(n)}(t,e)}({createLiteralArrayConverter:function(t){return function(t){return fe(t)}},createLiteralMapConverter:function(t){return function(e){return de(t.map(function(t,n){return{key:t.key,value:e[n],quoted:t.quoted}}))}},createPipeConverter:function(t){throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: "+t)}},n),a=new Ji(t,e,r,i),u=[];!function t(e,n){Array.isArray(e)?e.forEach(function(e){return t(e,n)}):n.push(e)}(o.visit(a,Ki.Statement),u),function c(t,e,n){for(var r=t-1;r>=0;r--)n.unshift(Gi(e,r))}(a.temporaryCount,r,u);var l=u.length-1,p=null;if(l>=0){var h=function f(t){return t instanceof Zt?t.expr:t instanceof Jt?t.value:null}(u[l]);h&&(p=function d(t){return le("pd_"+t)}(r),u[l]=p.set(h.cast(ht).notIdentical(me(!1))).toDeclStmt(null,[At.Final]))}return new Hi(u,p)}var Ui,Ki,Wi=function Wi(t,e){this.stmts=t,this.currValExpr=e};function zi(t,e,n,r,i,o){t||(t=new to);var s=function a(t){return le("currVal_"+t)}(r),u=[],c=new Ji(t,e,r,o),l=n.visit(c,Ki.Expression);if(c.temporaryCount)for(var p=0;p<c.temporaryCount;p++)u.push(Gi(r,p));else if(i==Ui.TrySimple)return new Wi([],l);return u.push(s.set(l).toDeclStmt(ht,[At.Final])),new Wi(u,s)}function Qi(t,e){return"tmp_"+t+"_"+e}function Gi(t,e){return new $t(Qi(t,e),Qt)}function Xi(t,e){if(t!==Ki.Expression)throw new Error("Expected an expression, but saw "+e)}function $i(t,e){return t===Ki.Statement?e.toStmt():e}!function(t){t[t.General=0]="General",t[t.TrySimple=1]="TrySimple"}(Ui||(Ui={})),function(t){t[t.Statement=0]="Statement",t[t.Expression=1]="Expression"}(Ki||(Ki={}));var Yi,Zi=function(t){function e(e){var n=t.call(this)||this;return n._converterFactory=e,n}return o(e,t),e.prototype.visitPipe=function(t,e){var n=this,r=f([t.exp],t.args).map(function(t){return t.visit(n,e)});return new eo(t.span,r,this._converterFactory.createPipeConverter(t.name,r.length))},e.prototype.visitLiteralArray=function(t,e){var n=this,r=t.expressions.map(function(t){return t.visit(n,e)});return new eo(t.span,r,this._converterFactory.createLiteralArrayConverter(t.expressions.length))},e.prototype.visitLiteralMap=function(t,e){var n=this,r=t.values.map(function(t){return t.visit(n,e)});return new eo(t.span,r,this._converterFactory.createLiteralMapConverter(t.keys))},e}(Ii),Ji=function(){function t(t,e,n,r){this._localResolver=t,this._implicitReceiver=e,this.bindingId=n,this.interpolationFunction=r,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0}return t.prototype.visitBinary=function(t,e){var n;switch(t.operation){case"+":n=ut.Plus;break;case"-":n=ut.Minus;break;case"*":n=ut.Multiply;break;case"/":n=ut.Divide;break;case"%":n=ut.Modulo;break;case"&&":n=ut.And;break;case"||":n=ut.Or;break;case"==":n=ut.Equals;break;case"!=":n=ut.NotEquals;break;case"===":n=ut.Identical;break;case"!==":n=ut.NotIdentical;break;case"<":n=ut.Lower;break;case">":n=ut.Bigger;break;case"<=":n=ut.LowerEquals;break;case">=":n=ut.BiggerEquals;break;default:throw new Error("Unsupported operation "+t.operation)}return $i(e,new Bt(n,this._visit(t.left,Ki.Expression),this._visit(t.right,Ki.Expression)))},t.prototype.visitChain=function(t,e){return function n(t,e){if(t!==Ki.Statement)throw new Error("Expected a statement, but saw "+e)}(e,t),this.visitAll(t.expressions,e)},t.prototype.visitConditional=function(t,e){return $i(e,this._visit(t.condition,Ki.Expression).conditional(this._visit(t.trueExp,Ki.Expression),this._visit(t.falseExp,Ki.Expression)))},t.prototype.visitPipe=function(t,e){throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: "+t.name)},t.prototype.visitFunctionCall=function(t,e){var n=this.visitAll(t.args,Ki.Expression);return $i(e,t instanceof eo?t.converter(n):this._visit(t.target,Ki.Expression).callFn(n))},t.prototype.visitImplicitReceiver=function(t,e){return Xi(e,t),this._implicitReceiver},t.prototype.visitInterpolation=function(t,e){Xi(e,t);for(var n=[me(t.expressions.length)],r=0;r<t.strings.length-1;r++)n.push(me(t.strings[r])),n.push(this._visit(t.expressions[r],Ki.Expression));return n.push(me(t.strings[t.strings.length-1])),this.interpolationFunction?this.interpolationFunction(n):t.expressions.length<=9?pe(Ge.inlineInterpolate).callFn(n):pe(Ge.interpolate).callFn([n[0],fe(n.slice(1))])},t.prototype.visitKeyedRead=function(t,e){var n=this.leftMostSafeNode(t);return n?this.convertSafeAccess(t,n,e):$i(e,this._visit(t.obj,Ki.Expression).key(this._visit(t.key,Ki.Expression)))},t.prototype.visitKeyedWrite=function(t,e){var n=this._visit(t.obj,Ki.Expression),r=this._visit(t.key,Ki.Expression),i=this._visit(t.value,Ki.Expression);return $i(e,n.key(r).set(i))},t.prototype.visitLiteralArray=function(t,e){throw new Error("Illegal State: literal arrays should have been converted into functions")},t.prototype.visitLiteralMap=function(t,e){throw new Error("Illegal State: literal maps should have been converted into functions")},t.prototype.visitLiteralPrimitive=function(t,e){return $i(e,me(t.value,null===t.value||void 0===t.value||!0===t.value||!0===t.value?ft:void 0))},t.prototype._getLocal=function(t){return this._localResolver.getLocal(t)},t.prototype.visitMethodCall=function(t,e){if(t.receiver instanceof ci&&"$any"==t.name){if(1!=(r=this.visitAll(t.args,Ki.Expression)).length)throw new Error("Invalid call to $any, expected 1 argument but received "+(r.length||"none"));return r[0].cast(ht)}var n=this.leftMostSafeNode(t);if(n)return this.convertSafeAccess(t,n,e);var r=this.visitAll(t.args,Ki.Expression),i=null,o=this._visit(t.receiver,Ki.Expression);if(o===this._implicitReceiver){var s=this._getLocal(t.name);s&&(i=s.callFn(r))}return null==i&&(i=o.callMethod(t.name,r)),$i(e,i)},t.prototype.visitPrefixNot=function(t,e){return $i(e,function n(t,e){return new Rt(t,e)}(this._visit(t.expression,Ki.Expression)))},t.prototype.visitNonNullAssert=function(t,e){return $i(e,function n(t,e){return new Lt(t,e)}(this._visit(t.expression,Ki.Expression)))},t.prototype.visitPropertyRead=function(t,e){var n=this.leftMostSafeNode(t);if(n)return this.convertSafeAccess(t,n,e);var r=null,i=this._visit(t.receiver,Ki.Expression);return i===this._implicitReceiver&&(r=this._getLocal(t.name)),null==r&&(r=i.prop(t.name)),$i(e,r)},t.prototype.visitPropertyWrite=function(t,e){var n=this._visit(t.receiver,Ki.Expression),r=null;if(n===this._implicitReceiver){var i=this._getLocal(t.name);if(i){if(!(i instanceof Ht))throw new Error("Cannot assign to a reference or variable!");r=i}}return null===r&&(r=n.prop(t.name)),$i(e,r.set(this._visit(t.value,Ki.Expression)))},t.prototype.visitSafePropertyRead=function(t,e){return this.convertSafeAccess(t,this.leftMostSafeNode(t),e)},t.prototype.visitSafeMethodCall=function(t,e){return this.convertSafeAccess(t,this.leftMostSafeNode(t),e)},t.prototype.visitAll=function(t,e){var n=this;return t.map(function(t){return n._visit(t,e)})},t.prototype.visitQuote=function(t,e){throw new Error("Quotes are not supported for evaluation!\n Statement: "+t.uninterpretedExpression+" located at "+t.location)},t.prototype._visit=function(t,e){return this._resultMap.get(t)||(this._nodeMap.get(t)||t).visit(this,e)},t.prototype.convertSafeAccess=function(t,e,n){var r=this._visit(e.receiver,Ki.Expression),i=void 0;this.needsTemporary(e.receiver)&&(r=(i=this.allocateTemporary()).set(r),this._resultMap.set(e.receiver,i));var o=r.isBlank();this._nodeMap.set(e,e instanceof Ti?new Ci(e.span,e.receiver,e.name,e.args):new hi(e.span,e.receiver,e.name));var s=this._visit(t,Ki.Expression);return this._nodeMap.delete(e),i&&this.releaseTemporary(i),$i(n,o.conditional(me(null),s))},t.prototype.leftMostSafeNode=function(t){var e=this,n=function(t,n){return(e._nodeMap.get(n)||n).visit(t)};return t.visit({visitBinary:function(t){return null},visitChain:function(t){return null},visitConditional:function(t){return null},visitFunctionCall:function(t){return null},visitImplicitReceiver:function(t){return null},visitInterpolation:function(t){return null},visitKeyedRead:function(t){return n(this,t.obj)},visitKeyedWrite:function(t){return null},visitLiteralArray:function(t){return null},visitLiteralMap:function(t){return null},visitLiteralPrimitive:function(t){return null},visitMethodCall:function(t){return n(this,t.receiver)},visitPipe:function(t){return null},visitPrefixNot:function(t){return null},visitNonNullAssert:function(t){return null},visitPropertyRead:function(t){return n(this,t.receiver)},visitPropertyWrite:function(t){return null},visitQuote:function(t){return null},visitSafeMethodCall:function(t){return n(this,t.receiver)||t},visitSafePropertyRead:function(t){return n(this,t.receiver)||t}})},t.prototype.needsTemporary=function(t){var e=this,n=function(t,n){return n&&(e._nodeMap.get(n)||n).visit(t)};return t.visit({visitBinary:function(t){return n(this,t.left)||n(this,t.right)},visitChain:function(t){return!1},visitConditional:function(t){return n(this,t.condition)||n(this,t.trueExp)||n(this,t.falseExp)},visitFunctionCall:function(t){return!0},visitImplicitReceiver:function(t){return!1},visitInterpolation:function(t){return function(t,e){return e.some(function(e){return n(t,e)})}(this,t.expressions)},visitKeyedRead:function(t){return!1},visitKeyedWrite:function(t){return!1},visitLiteralArray:function(t){return!0},visitLiteralMap:function(t){return!0},visitLiteralPrimitive:function(t){return!1},visitMethodCall:function(t){return!0},visitPipe:function(t){return!0},visitPrefixNot:function(t){return n(this,t.expression)},visitNonNullAssert:function(t){return n(this,t.expression)},visitPropertyRead:function(t){return!1},visitPropertyWrite:function(t){return!1},visitQuote:function(t){return!1},visitSafeMethodCall:function(t){return!0},visitSafePropertyRead:function(t){return!1}})},t.prototype.allocateTemporary=function(){var t=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new wt(Qi(this.bindingId,t))},t.prototype.releaseTemporary=function(t){if(this._currentTemporary--,t.name!=Qi(this.bindingId,this._currentTemporary))throw new Error("Temporary "+t.name+" released out of order")},t}(),to=function(){function t(){}return t.prototype.getLocal=function(t){return t===Bi.event.name?Bi.event:null},t}(),eo=function(t){function e(e,n,r){var i=t.call(this,e,null,n)||this;return i.args=n,i.converter=r,i}return o(e,t),e}(Pi);!function(t){t[t.OnInit=0]="OnInit",t[t.OnDestroy=1]="OnDestroy",t[t.DoCheck=2]="DoCheck",t[t.OnChanges=3]="OnChanges",t[t.AfterContentInit=4]="AfterContentInit",t[t.AfterContentChecked=5]="AfterContentChecked",t[t.AfterViewInit=6]="AfterViewInit",t[t.AfterViewChecked=7]="AfterViewChecked"}(Yi||(Yi={}));var no=[Yi.OnInit,Yi.OnDestroy,Yi.DoCheck,Yi.OnChanges,Yi.AfterContentInit,Yi.AfterContentChecked,Yi.AfterViewInit,Yi.AfterViewChecked],ro=0,io=9,oo=10,so=11,ao=12,uo=13,co=32,lo=34,po=36,ho=39,fo=43,vo=45,yo=47,mo=59,go=61,_o=62,bo=48,xo=57,wo=65,Eo=70,So=90,Co=95,To=97,Po=102,Ao=110,No=114,ko=116,Oo=118,Io=122,Mo=123,Do=160;function Ro(t){return t>=io&&t<=co||t==Do}function Lo(t){return bo<=t&&t<=xo}function jo(t){return t>=To&&t<=Io||t>=wo&&t<=So}
|
|
175
175
|
/**
|
|
176
176
|
* @license
|
|
177
177
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -208,21 +208,21 @@ var Fo,Vo=function(){function t(t,e,n,r){this.file=t,this.offset=e,this.line=n,t
|
|
|
208
208
|
* Use of this source code is governed by an MIT-style license that can be
|
|
209
209
|
* found in the LICENSE file at https://angular.io/license
|
|
210
210
|
*/
|
|
211
|
-
function n(t){for(var e={},n=0,r=0,i=0,o=0,s=0,a=null,u=!1;n<t.length;)switch(t.charCodeAt(n++)){case 40:r++;break;case 41:r--;break;case 39:u=u||o>0,0===i?i=39:39===i&&92!==t.charCodeAt(n-1)&&(i=0);break;case 34:u=u||o>0,0===i?i=34:34===i&&92!==t.charCodeAt(n-1)&&(i=0);break;case 58:a||0!==r||0!==i||(a=ms(t.substring(s,n-1).trim()),o=n);break;case 59:if(a&&o>0&&0===r&&0===i){var c=t.substring(o,n-1).trim();e[a]=u?ys(c):c,s=n,o=0,a=null,u=!1}}return a&&o&&(c=t.substr(o).trim(),e[a]=u?ys(c):c),e}(t),Object.keys(this._initialStyleValues).forEach(function(t){bs(e._stylesIndex,t),e.hasBindingsOrInitialValues=!0})},t.prototype.registerClassAttr=function(t){var e=this;this._initialClassValues={},t.split(/\s+/g).forEach(function(t){e._initialClassValues[t]=!0,bs(e._classesIndex,t),e.hasBindingsOrInitialValues=!0})},t.prototype._buildInitExpr=function(t,e){var n=[],r=[];return t.forEach(function(t,i){var o=me(i);n.push(o);var s=e[i];s&&r.push(o,me(s))}),r.length&&(n.push(me(1)),n.push.apply(n,f(r))),n.length?fe(n):null},t.prototype.buildCreateLevelInstruction=function(t,e){if(this.hasBindingsOrInitialValues){var n=this._buildInitExpr(this._classesIndex,this._initialClassValues),r=this._buildInitExpr(this._stylesIndex,this._initialStyleValues),i=this._useDefaultSanitizer,o=[];return n?o.push(e.getConstLiteral(n,!0)):(r||i)&&o.push(Qt),r?o.push(e.getConstLiteral(r,!0)):(i||this._directiveIndexExpr)&&o.push(Qt),(i||this._directiveIndexExpr)&&(o.push(i?pe(mn.defaultStyleSanitizer):Qt),this._directiveIndexExpr&&o.push(this._directiveIndexExpr)),{sourceSpan:t,reference:mn.elementStyling,buildParams:function(){return o}}}return null},t.prototype._buildStylingMap=function(t){var e=this;if(this._classMapInput||this._styleMapInput){var n=this._classMapInput||this._styleMapInput,r=this._classMapInput?this._classMapInput.value.visit(t):null,i=this._styleMapInput?this._styleMapInput.value.visit(t):null;return{sourceSpan:n.sourceSpan,reference:mn.elementStylingMap,buildParams:function(t){var n=[e._elementIndexExpr];return r?n.push(t(r)):e._styleMapInput&&n.push(Qt),i?n.push(t(i)):e._directiveIndexExpr&&n.push(Qt),e._directiveIndexExpr&&n.push(e._directiveIndexExpr),n}}}return null},t.prototype._buildSingleInputs=function(t,e,n,r,i){var o=this;return e.map(function(e){var s=n.get(e.name),a=e.value.visit(i);return{sourceSpan:e.sourceSpan,reference:t,buildParams:function(t){var n=[o._elementIndexExpr,me(s),t(a)];return r&&(e.unit?n.push(me(e.unit)):o._directiveIndexExpr&&n.push(Qt)),o._directiveIndexExpr&&n.push(o._directiveIndexExpr),n}}})},t.prototype._buildClassInputs=function(t){return this._singleClassInputs?this._buildSingleInputs(mn.elementClassProp,this._singleClassInputs,this._classesIndex,!1,t):[]},t.prototype._buildStyleInputs=function(t){return this._singleStyleInputs?this._buildSingleInputs(mn.elementStyleProp,this._singleStyleInputs,this._stylesIndex,!0,t):[]},t.prototype._buildApplyFn=function(){var t=this;return{sourceSpan:this._lastStylingInput?this._lastStylingInput.sourceSpan:null,reference:mn.elementStylingApply,buildParams:function(){var e=[t._elementIndexExpr];return t._directiveIndexExpr&&e.push(t._directiveIndexExpr),e}}},t.prototype.buildUpdateLevelInstructions=function(t){var e=[];if(this.hasBindingsOrInitialValues){var n=this._buildStylingMap(t);n&&e.push(n),e.push.apply(e,f(this._buildStyleInputs(t))),e.push.apply(e,f(this._buildClassInputs(t))),this._applyFnRequired&&e.push(this._buildApplyFn())}return e},t}();function bs(t,e){t.has(e)||t.set(e,t.size)}!function(t){t[t.Character=0]="Character",t[t.Identifier=1]="Identifier",t[t.Keyword=2]="Keyword",t[t.String=3]="String",t[t.Operator=4]="Operator",t[t.Number=5]="Number",t[t.Error=6]="Error"}(gs||(gs={}));var xs,ws=["var","let","as","null","undefined","true","false","if","else","this"],Es=function(){function t(){}return t.prototype.tokenize=function(t){for(var e=new Ps(t),n=[],r=e.scanToken();null!=r;)n.push(r),r=e.scanToken();return n},t}();function Ss(t,e){return new xs(t,gs.Character,e,String.fromCharCode(e))}function Cs(t,e){return new xs(t,gs.Operator,0,e)}var Ts=new(xs=function(){function t(t,e,n,r){this.index=t,this.type=e,this.numValue=n,this.strValue=r}return t.prototype.isCharacter=function(t){return this.type==gs.Character&&this.numValue==t},t.prototype.isNumber=function(){return this.type==gs.Number},t.prototype.isString=function(){return this.type==gs.String},t.prototype.isOperator=function(t){return this.type==gs.Operator&&this.strValue==t},t.prototype.isIdentifier=function(){return this.type==gs.Identifier},t.prototype.isKeyword=function(){return this.type==gs.Keyword},t.prototype.isKeywordLet=function(){return this.type==gs.Keyword&&"let"==this.strValue},t.prototype.isKeywordAs=function(){return this.type==gs.Keyword&&"as"==this.strValue},t.prototype.isKeywordNull=function(){return this.type==gs.Keyword&&"null"==this.strValue},t.prototype.isKeywordUndefined=function(){return this.type==gs.Keyword&&"undefined"==this.strValue},t.prototype.isKeywordTrue=function(){return this.type==gs.Keyword&&"true"==this.strValue},t.prototype.isKeywordFalse=function(){return this.type==gs.Keyword&&"false"==this.strValue},t.prototype.isKeywordThis=function(){return this.type==gs.Keyword&&"this"==this.strValue},t.prototype.isError=function(){return this.type==gs.Error},t.prototype.toNumber=function(){return this.type==gs.Number?this.numValue:-1},t.prototype.toString=function(){switch(this.type){case gs.Character:case gs.Identifier:case gs.Keyword:case gs.Operator:case gs.String:case gs.Error:return this.strValue;case gs.Number:return this.numValue.toString();default:return null}},t}())(-1,gs.Character,0,""),Ps=function(){function t(t){this.input=t,this.peek=0,this.index=-1,this.length=t.length,this.advance()}return t.prototype.advance=function(){this.peek=++this.index>=this.length?ro:this.input.charCodeAt(this.index)},t.prototype.scanToken=function(){for(var t=this.input,e=this.length,n=this.peek,r=this.index;n<=co;){if(++r>=e){n=ro;break}n=t.charCodeAt(r)}if(this.peek=n,this.index=r,r>=e)return null;if(As(n))return this.scanIdentifier();if(Lo(n))return this.scanNumber(r);var i=r;switch(n){case 46:return this.advance(),Lo(this.peek)?this.scanNumber(i):Ss(i,46);case 40:case 41:case Mo:case 125:case 91:case 93:case 44:case 58:case mo:return this.scanCharacter(i,n);case ho:case lo:return this.scanString();case 35:case fo:case vo:case 42:case yo:case 37:case 94:return this.scanOperator(i,String.fromCharCode(n));case 63:return this.scanComplexOperator(i,"?",46,".");case 60:case _o:return this.scanComplexOperator(i,String.fromCharCode(n),go,"=");case 33:case go:return this.scanComplexOperator(i,String.fromCharCode(n),go,"=",go,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case
|
|
211
|
+
function n(t){for(var e={},n=0,r=0,i=0,o=0,s=0,a=null,u=!1;n<t.length;)switch(t.charCodeAt(n++)){case 40:r++;break;case 41:r--;break;case 39:u=u||o>0,0===i?i=39:39===i&&92!==t.charCodeAt(n-1)&&(i=0);break;case 34:u=u||o>0,0===i?i=34:34===i&&92!==t.charCodeAt(n-1)&&(i=0);break;case 58:a||0!==r||0!==i||(a=ms(t.substring(s,n-1).trim()),o=n);break;case 59:if(a&&o>0&&0===r&&0===i){var c=t.substring(o,n-1).trim();e[a]=u?ys(c):c,s=n,o=0,a=null,u=!1}}return a&&o&&(c=t.substr(o).trim(),e[a]=u?ys(c):c),e}(t),Object.keys(this._initialStyleValues).forEach(function(t){bs(e._stylesIndex,t),e.hasBindingsOrInitialValues=!0})},t.prototype.registerClassAttr=function(t){var e=this;this._initialClassValues={},t.split(/\s+/g).forEach(function(t){e._initialClassValues[t]=!0,bs(e._classesIndex,t),e.hasBindingsOrInitialValues=!0})},t.prototype._buildInitExpr=function(t,e){var n=[],r=[];return t.forEach(function(t,i){var o=me(i);n.push(o);var s=e[i];s&&r.push(o,me(s))}),r.length&&(n.push(me(1)),n.push.apply(n,f(r))),n.length?fe(n):null},t.prototype.buildCreateLevelInstruction=function(t,e){if(this.hasBindingsOrInitialValues){var n=this._buildInitExpr(this._classesIndex,this._initialClassValues),r=this._buildInitExpr(this._stylesIndex,this._initialStyleValues),i=this._useDefaultSanitizer,o=[];return n?o.push(e.getConstLiteral(n,!0)):(r||i)&&o.push(Qt),r?o.push(e.getConstLiteral(r,!0)):(i||this._directiveIndexExpr)&&o.push(Qt),(i||this._directiveIndexExpr)&&(o.push(i?pe(mn.defaultStyleSanitizer):Qt),this._directiveIndexExpr&&o.push(this._directiveIndexExpr)),{sourceSpan:t,reference:mn.elementStyling,buildParams:function(){return o}}}return null},t.prototype._buildStylingMap=function(t){var e=this;if(this._classMapInput||this._styleMapInput){var n=this._classMapInput||this._styleMapInput,r=this._classMapInput?this._classMapInput.value.visit(t):null,i=this._styleMapInput?this._styleMapInput.value.visit(t):null;return{sourceSpan:n.sourceSpan,reference:mn.elementStylingMap,buildParams:function(t){var n=[e._elementIndexExpr];return r?n.push(t(r)):e._styleMapInput&&n.push(Qt),i?n.push(t(i)):e._directiveIndexExpr&&n.push(Qt),e._directiveIndexExpr&&n.push(e._directiveIndexExpr),n}}}return null},t.prototype._buildSingleInputs=function(t,e,n,r,i){var o=this;return e.map(function(e){var s=n.get(e.name),a=e.value.visit(i);return{sourceSpan:e.sourceSpan,reference:t,buildParams:function(t){var n=[o._elementIndexExpr,me(s),t(a)];return r&&(e.unit?n.push(me(e.unit)):o._directiveIndexExpr&&n.push(Qt)),o._directiveIndexExpr&&n.push(o._directiveIndexExpr),n}}})},t.prototype._buildClassInputs=function(t){return this._singleClassInputs?this._buildSingleInputs(mn.elementClassProp,this._singleClassInputs,this._classesIndex,!1,t):[]},t.prototype._buildStyleInputs=function(t){return this._singleStyleInputs?this._buildSingleInputs(mn.elementStyleProp,this._singleStyleInputs,this._stylesIndex,!0,t):[]},t.prototype._buildApplyFn=function(){var t=this;return{sourceSpan:this._lastStylingInput?this._lastStylingInput.sourceSpan:null,reference:mn.elementStylingApply,buildParams:function(){var e=[t._elementIndexExpr];return t._directiveIndexExpr&&e.push(t._directiveIndexExpr),e}}},t.prototype.buildUpdateLevelInstructions=function(t){var e=[];if(this.hasBindingsOrInitialValues){var n=this._buildStylingMap(t);n&&e.push(n),e.push.apply(e,f(this._buildStyleInputs(t))),e.push.apply(e,f(this._buildClassInputs(t))),this._applyFnRequired&&e.push(this._buildApplyFn())}return e},t}();function bs(t,e){t.has(e)||t.set(e,t.size)}!function(t){t[t.Character=0]="Character",t[t.Identifier=1]="Identifier",t[t.Keyword=2]="Keyword",t[t.String=3]="String",t[t.Operator=4]="Operator",t[t.Number=5]="Number",t[t.Error=6]="Error"}(gs||(gs={}));var xs,ws=["var","let","as","null","undefined","true","false","if","else","this"],Es=function(){function t(){}return t.prototype.tokenize=function(t){for(var e=new Ps(t),n=[],r=e.scanToken();null!=r;)n.push(r),r=e.scanToken();return n},t}();function Ss(t,e){return new xs(t,gs.Character,e,String.fromCharCode(e))}function Cs(t,e){return new xs(t,gs.Operator,0,e)}var Ts=new(xs=function(){function t(t,e,n,r){this.index=t,this.type=e,this.numValue=n,this.strValue=r}return t.prototype.isCharacter=function(t){return this.type==gs.Character&&this.numValue==t},t.prototype.isNumber=function(){return this.type==gs.Number},t.prototype.isString=function(){return this.type==gs.String},t.prototype.isOperator=function(t){return this.type==gs.Operator&&this.strValue==t},t.prototype.isIdentifier=function(){return this.type==gs.Identifier},t.prototype.isKeyword=function(){return this.type==gs.Keyword},t.prototype.isKeywordLet=function(){return this.type==gs.Keyword&&"let"==this.strValue},t.prototype.isKeywordAs=function(){return this.type==gs.Keyword&&"as"==this.strValue},t.prototype.isKeywordNull=function(){return this.type==gs.Keyword&&"null"==this.strValue},t.prototype.isKeywordUndefined=function(){return this.type==gs.Keyword&&"undefined"==this.strValue},t.prototype.isKeywordTrue=function(){return this.type==gs.Keyword&&"true"==this.strValue},t.prototype.isKeywordFalse=function(){return this.type==gs.Keyword&&"false"==this.strValue},t.prototype.isKeywordThis=function(){return this.type==gs.Keyword&&"this"==this.strValue},t.prototype.isError=function(){return this.type==gs.Error},t.prototype.toNumber=function(){return this.type==gs.Number?this.numValue:-1},t.prototype.toString=function(){switch(this.type){case gs.Character:case gs.Identifier:case gs.Keyword:case gs.Operator:case gs.String:case gs.Error:return this.strValue;case gs.Number:return this.numValue.toString();default:return null}},t}())(-1,gs.Character,0,""),Ps=function(){function t(t){this.input=t,this.peek=0,this.index=-1,this.length=t.length,this.advance()}return t.prototype.advance=function(){this.peek=++this.index>=this.length?ro:this.input.charCodeAt(this.index)},t.prototype.scanToken=function(){for(var t=this.input,e=this.length,n=this.peek,r=this.index;n<=co;){if(++r>=e){n=ro;break}n=t.charCodeAt(r)}if(this.peek=n,this.index=r,r>=e)return null;if(As(n))return this.scanIdentifier();if(Lo(n))return this.scanNumber(r);var i=r;switch(n){case 46:return this.advance(),Lo(this.peek)?this.scanNumber(i):Ss(i,46);case 40:case 41:case Mo:case 125:case 91:case 93:case 44:case 58:case mo:return this.scanCharacter(i,n);case ho:case lo:return this.scanString();case 35:case fo:case vo:case 42:case yo:case 37:case 94:return this.scanOperator(i,String.fromCharCode(n));case 63:return this.scanComplexOperator(i,"?",46,".");case 60:case _o:return this.scanComplexOperator(i,String.fromCharCode(n),go,"=");case 33:case go:return this.scanComplexOperator(i,String.fromCharCode(n),go,"=",go,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case Do:for(;Ro(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error("Unexpected character ["+String.fromCharCode(n)+"]",0)},t.prototype.scanCharacter=function(t,e){return this.advance(),Ss(t,e)},t.prototype.scanOperator=function(t,e){return this.advance(),Cs(t,e)},t.prototype.scanComplexOperator=function(t,e,n,r,i,o){this.advance();var s=e;return this.peek==n&&(this.advance(),s+=r),null!=i&&this.peek==i&&(this.advance(),s+=o),Cs(t,s)},t.prototype.scanIdentifier=function(){var t=this.index;for(this.advance();Ns(this.peek);)this.advance();var e=this.input.substring(t,this.index);return ws.indexOf(e)>-1?function n(t,e){return new xs(t,gs.Keyword,0,e)}(t,e):function r(t,e){return new xs(t,gs.Identifier,0,e)}(t,e)},t.prototype.scanNumber=function(t){var e,n=this.index===t;for(this.advance();;){if(Lo(this.peek));else if(46==this.peek)n=!1;else{if(101!=(e=this.peek)&&69!=e)break;if(this.advance(),ks(this.peek)&&this.advance(),!Lo(this.peek))return this.error("Invalid exponent",-1);n=!1}this.advance()}var r=this.input.substring(t,this.index);return function o(t,e){return new xs(t,gs.Number,e,"")}(t,n?function i(t){var e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}
|
|
212
212
|
/**
|
|
213
213
|
* @license
|
|
214
214
|
* Copyright Google Inc. All Rights Reserved.
|
|
215
215
|
*
|
|
216
216
|
* Use of this source code is governed by an MIT-style license that can be
|
|
217
217
|
* found in the LICENSE file at https://angular.io/license
|
|
218
|
-
*/(r):parseFloat(r))},t.prototype.scanString=function(){var t=this.index,e=this.peek;this.advance();for(var n="",r=this.index,i=this.input;this.peek!=e;)if(92==this.peek){n+=i.substring(r,this.index),this.advance();var o=void 0;if(this.peek=this.peek,117==this.peek){var s=i.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(s))return this.error("Invalid unicode escape [\\u"+s+"]",0);o=parseInt(s,16);for(var a=0;a<5;a++)this.advance()}else o=Os(this.peek),this.advance();n+=String.fromCharCode(o),r=this.index}else{if(this.peek==ro)return this.error("Unterminated quote",0);this.advance()}var u=i.substring(r,this.index);return this.advance(),function c(t,e){return new xs(t,gs.String,0,e)}(t,n+u)},t.prototype.error=function(t,e){var n=this.index+e;return function r(t,e){return new xs(t,gs.Error,0,e)}(n,"Lexer Error: "+t+" at column "+n+" in expression ["+this.input+"]")},t}();function As(t){return To<=t&&t<=Io||wo<=t&&t<=So||t==Co||t==po}function Ns(t){return jo(t)||Lo(t)||t==Co||t==po}function ks(t){return t==vo||t==fo}function Os(t){switch(t){case Ao:return oo;case Po:return ao;case No:return uo;case ko:return io;case Oo:return so;default:return t}}function Is(t,e){if(null!=e){if(!Array.isArray(e))throw new Error("Expected '"+t+"' to be an array of strings.");for(var n=0;n<e.length;n+=1)if("string"!=typeof e[n])throw new Error("Expected '"+t+"' to be an array of strings.")}}var Ms=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function
|
|
218
|
+
*/(r):parseFloat(r))},t.prototype.scanString=function(){var t=this.index,e=this.peek;this.advance();for(var n="",r=this.index,i=this.input;this.peek!=e;)if(92==this.peek){n+=i.substring(r,this.index),this.advance();var o=void 0;if(this.peek=this.peek,117==this.peek){var s=i.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(s))return this.error("Invalid unicode escape [\\u"+s+"]",0);o=parseInt(s,16);for(var a=0;a<5;a++)this.advance()}else o=Os(this.peek),this.advance();n+=String.fromCharCode(o),r=this.index}else{if(this.peek==ro)return this.error("Unterminated quote",0);this.advance()}var u=i.substring(r,this.index);return this.advance(),function c(t,e){return new xs(t,gs.String,0,e)}(t,n+u)},t.prototype.error=function(t,e){var n=this.index+e;return function r(t,e){return new xs(t,gs.Error,0,e)}(n,"Lexer Error: "+t+" at column "+n+" in expression ["+this.input+"]")},t}();function As(t){return To<=t&&t<=Io||wo<=t&&t<=So||t==Co||t==po}function Ns(t){return jo(t)||Lo(t)||t==Co||t==po}function ks(t){return t==vo||t==fo}function Os(t){switch(t){case Ao:return oo;case Po:return ao;case No:return uo;case ko:return io;case Oo:return so;default:return t}}function Is(t,e){if(null!=e){if(!Array.isArray(e))throw new Error("Expected '"+t+"' to be an array of strings.");for(var n=0;n<e.length;n+=1)if("string"!=typeof e[n])throw new Error("Expected '"+t+"' to be an array of strings.")}}var Ms=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function Ds(t,e){if(!(null==e||Array.isArray(e)&&2==e.length))throw new Error("Expected '"+t+"' to be an array, [start, end].");if(null!=e){var n=e[0],r=e[1];Ms.forEach(function(t){if(t.test(n)||t.test(r))throw new Error("['"+n+"', '"+r+"'] contains unusable interpolation symbol.")})}}
|
|
219
219
|
/**
|
|
220
220
|
* @license
|
|
221
221
|
* Copyright Google Inc. All Rights Reserved.
|
|
222
222
|
*
|
|
223
223
|
* Use of this source code is governed by an MIT-style license that can be
|
|
224
224
|
* found in the LICENSE file at https://angular.io/license
|
|
225
|
-
*/var Ds=function(){function t(t,e){this.start=t,this.end=e}return t.fromArray=function(e){return e?(Rs("interpolation",e),new t(e[0],e[1])):Ls},t}(),Ls=new Ds("{{","}}"),js=function js(t,e,n){this.strings=t,this.expressions=e,this.offsets=n},Fs=function Fs(t,e,n){this.templateBindings=t,this.warnings=e,this.errors=n};function Vs(t){var e=Oe(t.start)+"([\\s\\S]*?)"+Oe(t.end);return new RegExp(e,"g")}var Bs=function(){function t(t){this._lexer=t,this.errors=[]}return t.prototype.parseAction=function(t,e,n){void 0===n&&(n=Ls),this._checkNoInterpolation(t,e,n);var r=this._stripComments(t),i=this._lexer.tokenize(this._stripComments(t)),o=new Hs(t,e,i,r.length,!0,this.errors,t.length-r.length).parseChain();return new Ai(o,t,e,this.errors)},t.prototype.parseBinding=function(t,e,n){void 0===n&&(n=Ls);var r=this._parseBindingAst(t,e,n);return new Ai(r,t,e,this.errors)},t.prototype.parseSimpleBinding=function(t,e,n){void 0===n&&(n=Ls);var r=this._parseBindingAst(t,e,n),i=qs.check(r);return i.length>0&&this._reportError("Host binding expression cannot contain "+i.join(" "),t,e),new Ai(r,t,e,this.errors)},t.prototype._reportError=function(t,e,n,r){this.errors.push(new ii(t,e,n,r))},t.prototype._parseBindingAst=function(t,e,n){var r=this._parseQuote(t,e);if(null!=r)return r;this._checkNoInterpolation(t,e,n);var i=this._stripComments(t),o=this._lexer.tokenize(i);return new Hs(t,e,o,i.length,!1,this.errors,t.length-i.length).parseChain()},t.prototype._parseQuote=function(t,e){if(null==t)return null;var n=t.indexOf(":");if(-1==n)return null;var r=t.substring(0,n).trim();if(!function i(t){if(0==t.length)return!1;var e=new Ps(t);if(!As(e.peek))return!1;for(e.advance();e.peek!==ro;){if(!Ns(e.peek))return!1;e.advance()}return!0}(r))return null;var o=t.substring(n+1);return new ai(new oi(0,t.length),r,o,e)},t.prototype.parseTemplateBindings=function(t,e,n){var r=this._lexer.tokenize(e);return new Hs(e,n,r,e.length,!1,this.errors,0).parseTemplateBindings(t)},t.prototype.parseInterpolation=function(t,e,n){void 0===n&&(n=Ls);var r=this.splitInterpolation(t,e,n);if(null==r)return null;for(var i=[],o=0;o<r.expressions.length;++o){var s=r.expressions[o],a=this._stripComments(s),u=this._lexer.tokenize(a),c=new Hs(t,e,u,a.length,!1,this.errors,r.offsets[o]+(s.length-a.length)).parseChain();i.push(c)}return new Ai(new xi(new oi(0,null==t?0:t.length),r.strings,i),t,e,this.errors)},t.prototype.splitInterpolation=function(t,e,n){void 0===n&&(n=Ls);var r=Vs(n),i=t.split(r);if(i.length<=1)return null;for(var o=[],s=[],a=[],u=0,c=0;c<i.length;c++){var l=i[c];c%2==0?(o.push(l),u+=l.length):l.trim().length>0?(u+=n.start.length,s.push(l),a.push(u),u+=l.length+n.end.length):(this._reportError("Blank expressions are not allowed in interpolated strings",t,"at column "+this._findInterpolationErrorColumn(i,c,n)+" in",e),s.push("$implict"),a.push(u))}return new js(o,s,a)},t.prototype.wrapLiteralPrimitive=function(t,e){return new Ai(new gi(new oi(0,null==t?0:t.length),t),t,e,this.errors)},t.prototype._stripComments=function(t){var e=this._commentStart(t);return null!=e?t.substring(0,e).trim():t},t.prototype._commentStart=function(t){for(var e,n=null,r=0;r<t.length-1;r++){var i=t.charCodeAt(r),o=t.charCodeAt(r+1);if(i===yo&&o==yo&&null==n)return r;n===i?n=null:null==n&&((e=i)===ho||e===lo||96===e)&&(n=i)}return null},t.prototype._checkNoInterpolation=function(t,e,n){var r=Vs(n),i=t.split(r);i.length>1&&this._reportError("Got interpolation ("+n.start+n.end+") where expression was expected",t,"at column "+this._findInterpolationErrorColumn(i,1,n)+" in",e)},t.prototype._findInterpolationErrorColumn=function(t,e,n){for(var r="",i=0;i<e;i++)r+=i%2==0?t[i]:""+n.start+t[i]+n.end;return r.length},t}(),Hs=function(){function t(t,e,n,r,i,o,s){this.input=t,this.location=e,this.tokens=n,this.inputLength=r,this.parseAction=i,this.errors=o,this.offset=s,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.index=0}return t.prototype.peek=function(t){var e=this.index+t;return e<this.tokens.length?this.tokens[e]:Ts},Object.defineProperty(t.prototype,"next",{get:function(){return this.peek(0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputIndex",{get:function(){return this.index<this.tokens.length?this.next.index+this.offset:this.inputLength+this.offset},enumerable:!0,configurable:!0}),t.prototype.span=function(t){return new oi(t,this.inputIndex)},t.prototype.advance=function(){this.index++},t.prototype.optionalCharacter=function(t){return!!this.next.isCharacter(t)&&(this.advance(),!0)},t.prototype.peekKeywordLet=function(){return this.next.isKeywordLet()},t.prototype.peekKeywordAs=function(){return this.next.isKeywordAs()},t.prototype.expectCharacter=function(t){this.optionalCharacter(t)||this.error("Missing expected "+String.fromCharCode(t))},t.prototype.optionalOperator=function(t){return!!this.next.isOperator(t)&&(this.advance(),!0)},t.prototype.expectOperator=function(t){this.optionalOperator(t)||this.error("Missing expected operator "+t)},t.prototype.expectIdentifierOrKeyword=function(){var t=this.next;return t.isIdentifier()||t.isKeyword()?(this.advance(),t.toString()):(this.error("Unexpected token "+t+", expected identifier or keyword"),"")},t.prototype.expectIdentifierOrKeywordOrString=function(){var t=this.next;return t.isIdentifier()||t.isKeyword()||t.isString()?(this.advance(),t.toString()):(this.error("Unexpected token "+t+", expected identifier, keyword, or string"),"")},t.prototype.parseChain=function(){for(var t=[],e=this.inputIndex;this.index<this.tokens.length;){var n=this.parsePipe();if(t.push(n),this.optionalCharacter(mo))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.optionalCharacter(mo););else this.index<this.tokens.length&&this.error("Unexpected token '"+this.next+"'")}return 0==t.length?new ui(this.span(e)):1==t.length?t[0]:new li(this.span(e),t)},t.prototype.parsePipe=function(){var t=this.parseExpression();if(this.optionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{for(var e=this.expectIdentifierOrKeyword(),n=[];this.optionalCharacter(58);)n.push(this.parseExpression());t=new mi(this.span(t.span.start),t,e,n)}while(this.optionalOperator("|"))}return t},t.prototype.parseExpression=function(){return this.parseConditional()},t.prototype.parseConditional=function(){var t=this.inputIndex,e=this.parseLogicalOr();if(this.optionalOperator("?")){var n=this.parsePipe(),r=void 0;if(this.optionalCharacter(58))r=this.parsePipe();else{var i=this.input.substring(t,this.inputIndex);this.error("Conditional expression "+i+" requires all 3 expressions"),r=new ui(this.span(t))}return new pi(this.span(t),e,n,r)}return e},t.prototype.parseLogicalOr=function(){for(var t=this.parseLogicalAnd();this.optionalOperator("||");){var e=this.parseLogicalAnd();t=new wi(this.span(t.span.start),"||",t,e)}return t},t.prototype.parseLogicalAnd=function(){for(var t=this.parseEquality();this.optionalOperator("&&");){var e=this.parseEquality();t=new wi(this.span(t.span.start),"&&",t,e)}return t},t.prototype.parseEquality=function(){for(var t=this.parseRelational();this.next.type==gs.Operator;){var e=this.next.strValue;switch(e){case"==":case"===":case"!=":case"!==":this.advance();var n=this.parseRelational();t=new wi(this.span(t.span.start),e,t,n);continue}break}return t},t.prototype.parseRelational=function(){for(var t=this.parseAdditive();this.next.type==gs.Operator;){var e=this.next.strValue;switch(e){case"<":case">":case"<=":case">=":this.advance();var n=this.parseAdditive();t=new wi(this.span(t.span.start),e,t,n);continue}break}return t},t.prototype.parseAdditive=function(){for(var t=this.parseMultiplicative();this.next.type==gs.Operator;){var e=this.next.strValue;switch(e){case"+":case"-":this.advance();var n=this.parseMultiplicative();t=new wi(this.span(t.span.start),e,t,n);continue}break}return t},t.prototype.parseMultiplicative=function(){for(var t=this.parsePrefix();this.next.type==gs.Operator;){var e=this.next.strValue;switch(e){case"*":case"%":case"/":this.advance();var n=this.parsePrefix();t=new wi(this.span(t.span.start),e,t,n);continue}break}return t},t.prototype.parsePrefix=function(){if(this.next.type==gs.Operator){var t=this.inputIndex,e=this.next.strValue,n=void 0;switch(e){case"+":return this.advance(),n=this.parsePrefix(),new wi(this.span(t),"-",n,new gi(new oi(t,t),0));case"-":return this.advance(),n=this.parsePrefix(),new wi(this.span(t),e,new gi(new oi(t,t),0),n);case"!":return this.advance(),n=this.parsePrefix(),new Ei(this.span(t),n)}}return this.parseCallChain()},t.prototype.parseCallChain=function(){for(var t=this.parsePrimary();;)if(this.optionalCharacter(46))t=this.parseAccessMemberOrMethodCall(t,!1);else if(this.optionalOperator("?."))t=this.parseAccessMemberOrMethodCall(t,!0);else if(this.optionalCharacter(91)){this.rbracketsExpected++;var e=this.parsePipe();if(this.rbracketsExpected--,this.expectCharacter(93),this.optionalOperator("=")){var n=this.parseConditional();t=new yi(this.span(t.span.start),t,e,n)}else t=new vi(this.span(t.span.start),t,e)}else if(this.optionalCharacter(40)){this.rparensExpected++;var r=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),t=new Pi(this.span(t.span.start),t,r)}else{if(!this.optionalOperator("!"))return t;t=new Si(this.span(t.span.start),t)}},t.prototype.parsePrimary=function(){var t=this.inputIndex;if(this.optionalCharacter(40)){this.rparensExpected++;var e=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),e}if(this.next.isKeywordNull())return this.advance(),new gi(this.span(t),null);if(this.next.isKeywordUndefined())return this.advance(),new gi(this.span(t),void 0);if(this.next.isKeywordTrue())return this.advance(),new gi(this.span(t),!0);if(this.next.isKeywordFalse())return this.advance(),new gi(this.span(t),!1);if(this.next.isKeywordThis())return this.advance(),new ci(this.span(t));if(this.optionalCharacter(91)){this.rbracketsExpected++;var n=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new _i(this.span(t),n)}if(this.next.isCharacter(Mo))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new ci(this.span(t)),!1);if(this.next.isNumber()){var r=this.next.toNumber();return this.advance(),new gi(this.span(t),r)}if(this.next.isString()){var i=this.next.toString();return this.advance(),new gi(this.span(t),i)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new ui(this.span(t))):(this.error("Unexpected token "+this.next),new ui(this.span(t)))},t.prototype.parseExpressionList=function(t){var e=[];if(!this.next.isCharacter(t))do{e.push(this.parsePipe())}while(this.optionalCharacter(44));return e},t.prototype.parseLiteralMap=function(){var t=[],e=[],n=this.inputIndex;if(this.expectCharacter(Mo),!this.optionalCharacter(125)){this.rbracesExpected++;do{var r=this.next.isString(),i=this.expectIdentifierOrKeywordOrString();t.push({key:i,quoted:r}),this.expectCharacter(58),e.push(this.parsePipe())}while(this.optionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new bi(this.span(n),t,e)},t.prototype.parseAccessMemberOrMethodCall=function(t,e){void 0===e&&(e=!1);var n=t.span.start,r=this.expectIdentifierOrKeyword();if(this.optionalCharacter(40)){this.rparensExpected++;var i=this.parseCallArguments();this.expectCharacter(41),this.rparensExpected--;var o=this.span(n);return e?new Ti(o,t,r,i):new Ci(o,t,r,i)}if(e)return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new ui(this.span(n))):new di(this.span(n),t,r);if(this.optionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new ui(this.span(n));var s=this.parseConditional();return new fi(this.span(n),t,r,s)}return new hi(this.span(n),t,r)},t.prototype.parseCallArguments=function(){if(this.next.isCharacter(41))return[];var t=[];do{t.push(this.parsePipe())}while(this.optionalCharacter(44));return t},t.prototype.expectTemplateBindingKey=function(){var t="",e=!1;do{t+=this.expectIdentifierOrKeywordOrString(),(e=this.optionalOperator("-"))&&(t+="-")}while(e);return t.toString()},t.prototype.parseTemplateBindings=function(t){var e=!0,n=[];do{var r=this.inputIndex,i=void 0,o=void 0,s=!1;e?(i=o=t,e=!1):((s=this.peekKeywordLet())&&this.advance(),i=this.expectTemplateBindingKey(),o=s?i:t+i[0].toUpperCase()+i.substring(1),this.optionalCharacter(58));var a=null,u=null;if(s)a=this.optionalOperator("=")?this.expectTemplateBindingKey():"$implicit";else if(this.peekKeywordAs())this.advance(),a=i,o=this.expectTemplateBindingKey(),s=!0;else if(this.next!==Ts&&!this.peekKeywordLet()){var c=this.inputIndex,l=this.parsePipe(),p=this.input.substring(c-this.offset,this.inputIndex-this.offset);u=new Ai(l,p,this.location,this.errors)}if(n.push(new Ni(this.span(r),o,s,a,u)),this.peekKeywordAs()&&!s){var h=this.inputIndex;this.advance();var f=this.expectTemplateBindingKey();n.push(new Ni(this.span(h),f,!0,o,null))}this.optionalCharacter(mo)||this.optionalCharacter(44)}while(this.index<this.tokens.length);return new Fs(n,[],this.errors)},t.prototype.error=function(t,e){void 0===e&&(e=null),this.errors.push(new ii(t,this.input,this.locationText(e),this.location)),this.skip()},t.prototype.locationText=function(t){return void 0===t&&(t=null),null==t&&(t=this.index),t<this.tokens.length?"at column "+(this.tokens[t].index+1)+" in":"at the end of the expression"},t.prototype.skip=function(){for(var t=this.next;this.index<this.tokens.length&&!t.isCharacter(mo)&&(this.rparensExpected<=0||!t.isCharacter(41))&&(this.rbracesExpected<=0||!t.isCharacter(125))&&(this.rbracketsExpected<=0||!t.isCharacter(93));)this.next.isError()&&this.errors.push(new ii(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),t=this.next},t}(),qs=function(){function t(){this.errors=[]}return t.check=function(e){var n=new t;return e.visit(n),n.errors},t.prototype.visitImplicitReceiver=function(t,e){},t.prototype.visitInterpolation=function(t,e){},t.prototype.visitLiteralPrimitive=function(t,e){},t.prototype.visitPropertyRead=function(t,e){},t.prototype.visitPropertyWrite=function(t,e){},t.prototype.visitSafePropertyRead=function(t,e){},t.prototype.visitMethodCall=function(t,e){},t.prototype.visitSafeMethodCall=function(t,e){},t.prototype.visitFunctionCall=function(t,e){},t.prototype.visitLiteralArray=function(t,e){this.visitAll(t.expressions)},t.prototype.visitLiteralMap=function(t,e){this.visitAll(t.values)},t.prototype.visitBinary=function(t,e){},t.prototype.visitPrefixNot=function(t,e){},t.prototype.visitNonNullAssert=function(t,e){},t.prototype.visitConditional=function(t,e){},t.prototype.visitPipe=function(t,e){this.errors.push("pipes")},t.prototype.visitKeyedRead=function(t,e){},t.prototype.visitKeyedWrite=function(t,e){},t.prototype.visitAll=function(t){var e=this;return t.map(function(t){return t.visit(e)})},t.prototype.visitChain=function(t,e){},t.prototype.visitQuote=function(t,e){},t}(),Us=function(){function t(t,e){void 0===e&&(e=-1),this.path=t,this.position=e}return Object.defineProperty(t.prototype,"empty",{get:function(){return!this.path||!this.path.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"head",{get:function(){return this.path[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tail",{get:function(){return this.path[this.path.length-1]},enumerable:!0,configurable:!0}),t.prototype.parentOf=function(t){return t&&this.path[this.path.indexOf(t)-1]},t.prototype.childOf=function(t){return this.path[this.path.indexOf(t)+1]},t.prototype.first=function(t){for(var e=this.path.length-1;e>=0;e--){var n=this.path[e];if(n instanceof t)return n}},t.prototype.push=function(t){this.path.push(t)},t.prototype.pop=function(){return this.path.pop()},t}(),Ks=function(){function t(t,e,n){this.value=t,this.sourceSpan=e,this.i18n=n}return t.prototype.visit=function(t,e){return t.visitText(this,e)},t}(),Ws=function(){function t(t,e,n,r,i,o){this.switchValue=t,this.type=e,this.cases=n,this.sourceSpan=r,this.switchValueSourceSpan=i,this.i18n=o}return t.prototype.visit=function(t,e){return t.visitExpansion(this,e)},t}(),zs=function(){function t(t,e,n,r,i){this.value=t,this.expression=e,this.sourceSpan=n,this.valueSourceSpan=r,this.expSourceSpan=i}return t.prototype.visit=function(t,e){return t.visitExpansionCase(this,e)},t}(),Qs=function(){function t(t,e,n,r,i){this.name=t,this.value=e,this.sourceSpan=n,this.valueSpan=r,this.i18n=i}return t.prototype.visit=function(t,e){return t.visitAttribute(this,e)},t}(),Gs=function(){function t(t,e,n,r,i,o,s){void 0===i&&(i=null),void 0===o&&(o=null),this.name=t,this.attrs=e,this.children=n,this.sourceSpan=r,this.startSourceSpan=i,this.endSourceSpan=o,this.i18n=s}return t.prototype.visit=function(t,e){return t.visitElement(this,e)},t}(),Xs=function(){function t(t,e){this.value=t,this.sourceSpan=e}return t.prototype.visit=function(t,e){return t.visitComment(this,e)},t}();function $s(t,e,n){void 0===n&&(n=null);var r=[],i=t.visit?function(e){return t.visit(e,n)||e.visit(t,n)}:function(e){return e.visit(t,n)};return e.forEach(function(t){var e=i(t);e&&r.push(e)}),r}var Ys,Zs=function(){function t(){}return t.prototype.visitElement=function(t,e){this.visitChildren(e,function(e){e(t.attrs),e(t.children)})},t.prototype.visitAttribute=function(t,e){},t.prototype.visitText=function(t,e){},t.prototype.visitComment=function(t,e){},t.prototype.visitExpansion=function(t,e){return this.visitChildren(e,function(e){e(t.cases)})},t.prototype.visitExpansionCase=function(t,e){},t.prototype.visitChildren=function(t,e){var n=[],r=this;return e(function i(e){e&&n.push($s(r,e,t))}),[].concat.apply([],n)},t}();function Js(t,e){var n=[];return $s(new(function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return o(r,t),r.prototype.visit=function(t,r){var i=function t(e){var n=e.sourceSpan.start.offset,r=e.sourceSpan.end.offset;return e instanceof Gs&&(e.endSourceSpan?r=e.endSourceSpan.end.offset:e.children&&e.children.length&&(r=t(e.children[e.children.length-1]).end)),{start:n,end:r}}(t);if(!(i.start<=e&&e<i.end))return!0;n.push(t)},r}(Zs)),t),new Us(n,e)}
|
|
225
|
+
*/var Rs=function(){function t(t,e){this.start=t,this.end=e}return t.fromArray=function(e){return e?(Ds("interpolation",e),new t(e[0],e[1])):Ls},t}(),Ls=new Rs("{{","}}"),js=function js(t,e,n){this.strings=t,this.expressions=e,this.offsets=n},Fs=function Fs(t,e,n){this.templateBindings=t,this.warnings=e,this.errors=n};function Vs(t){var e=Oe(t.start)+"([\\s\\S]*?)"+Oe(t.end);return new RegExp(e,"g")}var Bs=function(){function t(t){this._lexer=t,this.errors=[]}return t.prototype.parseAction=function(t,e,n){void 0===n&&(n=Ls),this._checkNoInterpolation(t,e,n);var r=this._stripComments(t),i=this._lexer.tokenize(this._stripComments(t)),o=new Hs(t,e,i,r.length,!0,this.errors,t.length-r.length).parseChain();return new Ai(o,t,e,this.errors)},t.prototype.parseBinding=function(t,e,n){void 0===n&&(n=Ls);var r=this._parseBindingAst(t,e,n);return new Ai(r,t,e,this.errors)},t.prototype.parseSimpleBinding=function(t,e,n){void 0===n&&(n=Ls);var r=this._parseBindingAst(t,e,n),i=qs.check(r);return i.length>0&&this._reportError("Host binding expression cannot contain "+i.join(" "),t,e),new Ai(r,t,e,this.errors)},t.prototype._reportError=function(t,e,n,r){this.errors.push(new ii(t,e,n,r))},t.prototype._parseBindingAst=function(t,e,n){var r=this._parseQuote(t,e);if(null!=r)return r;this._checkNoInterpolation(t,e,n);var i=this._stripComments(t),o=this._lexer.tokenize(i);return new Hs(t,e,o,i.length,!1,this.errors,t.length-i.length).parseChain()},t.prototype._parseQuote=function(t,e){if(null==t)return null;var n=t.indexOf(":");if(-1==n)return null;var r=t.substring(0,n).trim();if(!function i(t){if(0==t.length)return!1;var e=new Ps(t);if(!As(e.peek))return!1;for(e.advance();e.peek!==ro;){if(!Ns(e.peek))return!1;e.advance()}return!0}(r))return null;var o=t.substring(n+1);return new ai(new oi(0,t.length),r,o,e)},t.prototype.parseTemplateBindings=function(t,e,n){var r=this._lexer.tokenize(e);return new Hs(e,n,r,e.length,!1,this.errors,0).parseTemplateBindings(t)},t.prototype.parseInterpolation=function(t,e,n){void 0===n&&(n=Ls);var r=this.splitInterpolation(t,e,n);if(null==r)return null;for(var i=[],o=0;o<r.expressions.length;++o){var s=r.expressions[o],a=this._stripComments(s),u=this._lexer.tokenize(a),c=new Hs(t,e,u,a.length,!1,this.errors,r.offsets[o]+(s.length-a.length)).parseChain();i.push(c)}return new Ai(new xi(new oi(0,null==t?0:t.length),r.strings,i),t,e,this.errors)},t.prototype.splitInterpolation=function(t,e,n){void 0===n&&(n=Ls);var r=Vs(n),i=t.split(r);if(i.length<=1)return null;for(var o=[],s=[],a=[],u=0,c=0;c<i.length;c++){var l=i[c];c%2==0?(o.push(l),u+=l.length):l.trim().length>0?(u+=n.start.length,s.push(l),a.push(u),u+=l.length+n.end.length):(this._reportError("Blank expressions are not allowed in interpolated strings",t,"at column "+this._findInterpolationErrorColumn(i,c,n)+" in",e),s.push("$implict"),a.push(u))}return new js(o,s,a)},t.prototype.wrapLiteralPrimitive=function(t,e){return new Ai(new gi(new oi(0,null==t?0:t.length),t),t,e,this.errors)},t.prototype._stripComments=function(t){var e=this._commentStart(t);return null!=e?t.substring(0,e).trim():t},t.prototype._commentStart=function(t){for(var e,n=null,r=0;r<t.length-1;r++){var i=t.charCodeAt(r),o=t.charCodeAt(r+1);if(i===yo&&o==yo&&null==n)return r;n===i?n=null:null==n&&((e=i)===ho||e===lo||96===e)&&(n=i)}return null},t.prototype._checkNoInterpolation=function(t,e,n){var r=Vs(n),i=t.split(r);i.length>1&&this._reportError("Got interpolation ("+n.start+n.end+") where expression was expected",t,"at column "+this._findInterpolationErrorColumn(i,1,n)+" in",e)},t.prototype._findInterpolationErrorColumn=function(t,e,n){for(var r="",i=0;i<e;i++)r+=i%2==0?t[i]:""+n.start+t[i]+n.end;return r.length},t}(),Hs=function(){function t(t,e,n,r,i,o,s){this.input=t,this.location=e,this.tokens=n,this.inputLength=r,this.parseAction=i,this.errors=o,this.offset=s,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.index=0}return t.prototype.peek=function(t){var e=this.index+t;return e<this.tokens.length?this.tokens[e]:Ts},Object.defineProperty(t.prototype,"next",{get:function(){return this.peek(0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputIndex",{get:function(){return this.index<this.tokens.length?this.next.index+this.offset:this.inputLength+this.offset},enumerable:!0,configurable:!0}),t.prototype.span=function(t){return new oi(t,this.inputIndex)},t.prototype.advance=function(){this.index++},t.prototype.optionalCharacter=function(t){return!!this.next.isCharacter(t)&&(this.advance(),!0)},t.prototype.peekKeywordLet=function(){return this.next.isKeywordLet()},t.prototype.peekKeywordAs=function(){return this.next.isKeywordAs()},t.prototype.expectCharacter=function(t){this.optionalCharacter(t)||this.error("Missing expected "+String.fromCharCode(t))},t.prototype.optionalOperator=function(t){return!!this.next.isOperator(t)&&(this.advance(),!0)},t.prototype.expectOperator=function(t){this.optionalOperator(t)||this.error("Missing expected operator "+t)},t.prototype.expectIdentifierOrKeyword=function(){var t=this.next;return t.isIdentifier()||t.isKeyword()?(this.advance(),t.toString()):(this.error("Unexpected token "+t+", expected identifier or keyword"),"")},t.prototype.expectIdentifierOrKeywordOrString=function(){var t=this.next;return t.isIdentifier()||t.isKeyword()||t.isString()?(this.advance(),t.toString()):(this.error("Unexpected token "+t+", expected identifier, keyword, or string"),"")},t.prototype.parseChain=function(){for(var t=[],e=this.inputIndex;this.index<this.tokens.length;){var n=this.parsePipe();if(t.push(n),this.optionalCharacter(mo))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.optionalCharacter(mo););else this.index<this.tokens.length&&this.error("Unexpected token '"+this.next+"'")}return 0==t.length?new ui(this.span(e)):1==t.length?t[0]:new li(this.span(e),t)},t.prototype.parsePipe=function(){var t=this.parseExpression();if(this.optionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{for(var e=this.expectIdentifierOrKeyword(),n=[];this.optionalCharacter(58);)n.push(this.parseExpression());t=new mi(this.span(t.span.start),t,e,n)}while(this.optionalOperator("|"))}return t},t.prototype.parseExpression=function(){return this.parseConditional()},t.prototype.parseConditional=function(){var t=this.inputIndex,e=this.parseLogicalOr();if(this.optionalOperator("?")){var n=this.parsePipe(),r=void 0;if(this.optionalCharacter(58))r=this.parsePipe();else{var i=this.input.substring(t,this.inputIndex);this.error("Conditional expression "+i+" requires all 3 expressions"),r=new ui(this.span(t))}return new pi(this.span(t),e,n,r)}return e},t.prototype.parseLogicalOr=function(){for(var t=this.parseLogicalAnd();this.optionalOperator("||");){var e=this.parseLogicalAnd();t=new wi(this.span(t.span.start),"||",t,e)}return t},t.prototype.parseLogicalAnd=function(){for(var t=this.parseEquality();this.optionalOperator("&&");){var e=this.parseEquality();t=new wi(this.span(t.span.start),"&&",t,e)}return t},t.prototype.parseEquality=function(){for(var t=this.parseRelational();this.next.type==gs.Operator;){var e=this.next.strValue;switch(e){case"==":case"===":case"!=":case"!==":this.advance();var n=this.parseRelational();t=new wi(this.span(t.span.start),e,t,n);continue}break}return t},t.prototype.parseRelational=function(){for(var t=this.parseAdditive();this.next.type==gs.Operator;){var e=this.next.strValue;switch(e){case"<":case">":case"<=":case">=":this.advance();var n=this.parseAdditive();t=new wi(this.span(t.span.start),e,t,n);continue}break}return t},t.prototype.parseAdditive=function(){for(var t=this.parseMultiplicative();this.next.type==gs.Operator;){var e=this.next.strValue;switch(e){case"+":case"-":this.advance();var n=this.parseMultiplicative();t=new wi(this.span(t.span.start),e,t,n);continue}break}return t},t.prototype.parseMultiplicative=function(){for(var t=this.parsePrefix();this.next.type==gs.Operator;){var e=this.next.strValue;switch(e){case"*":case"%":case"/":this.advance();var n=this.parsePrefix();t=new wi(this.span(t.span.start),e,t,n);continue}break}return t},t.prototype.parsePrefix=function(){if(this.next.type==gs.Operator){var t=this.inputIndex,e=this.next.strValue,n=void 0;switch(e){case"+":return this.advance(),n=this.parsePrefix(),new wi(this.span(t),"-",n,new gi(new oi(t,t),0));case"-":return this.advance(),n=this.parsePrefix(),new wi(this.span(t),e,new gi(new oi(t,t),0),n);case"!":return this.advance(),n=this.parsePrefix(),new Ei(this.span(t),n)}}return this.parseCallChain()},t.prototype.parseCallChain=function(){for(var t=this.parsePrimary();;)if(this.optionalCharacter(46))t=this.parseAccessMemberOrMethodCall(t,!1);else if(this.optionalOperator("?."))t=this.parseAccessMemberOrMethodCall(t,!0);else if(this.optionalCharacter(91)){this.rbracketsExpected++;var e=this.parsePipe();if(this.rbracketsExpected--,this.expectCharacter(93),this.optionalOperator("=")){var n=this.parseConditional();t=new yi(this.span(t.span.start),t,e,n)}else t=new vi(this.span(t.span.start),t,e)}else if(this.optionalCharacter(40)){this.rparensExpected++;var r=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),t=new Pi(this.span(t.span.start),t,r)}else{if(!this.optionalOperator("!"))return t;t=new Si(this.span(t.span.start),t)}},t.prototype.parsePrimary=function(){var t=this.inputIndex;if(this.optionalCharacter(40)){this.rparensExpected++;var e=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),e}if(this.next.isKeywordNull())return this.advance(),new gi(this.span(t),null);if(this.next.isKeywordUndefined())return this.advance(),new gi(this.span(t),void 0);if(this.next.isKeywordTrue())return this.advance(),new gi(this.span(t),!0);if(this.next.isKeywordFalse())return this.advance(),new gi(this.span(t),!1);if(this.next.isKeywordThis())return this.advance(),new ci(this.span(t));if(this.optionalCharacter(91)){this.rbracketsExpected++;var n=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new _i(this.span(t),n)}if(this.next.isCharacter(Mo))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new ci(this.span(t)),!1);if(this.next.isNumber()){var r=this.next.toNumber();return this.advance(),new gi(this.span(t),r)}if(this.next.isString()){var i=this.next.toString();return this.advance(),new gi(this.span(t),i)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new ui(this.span(t))):(this.error("Unexpected token "+this.next),new ui(this.span(t)))},t.prototype.parseExpressionList=function(t){var e=[];if(!this.next.isCharacter(t))do{e.push(this.parsePipe())}while(this.optionalCharacter(44));return e},t.prototype.parseLiteralMap=function(){var t=[],e=[],n=this.inputIndex;if(this.expectCharacter(Mo),!this.optionalCharacter(125)){this.rbracesExpected++;do{var r=this.next.isString(),i=this.expectIdentifierOrKeywordOrString();t.push({key:i,quoted:r}),this.expectCharacter(58),e.push(this.parsePipe())}while(this.optionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new bi(this.span(n),t,e)},t.prototype.parseAccessMemberOrMethodCall=function(t,e){void 0===e&&(e=!1);var n=t.span.start,r=this.expectIdentifierOrKeyword();if(this.optionalCharacter(40)){this.rparensExpected++;var i=this.parseCallArguments();this.expectCharacter(41),this.rparensExpected--;var o=this.span(n);return e?new Ti(o,t,r,i):new Ci(o,t,r,i)}if(e)return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new ui(this.span(n))):new di(this.span(n),t,r);if(this.optionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new ui(this.span(n));var s=this.parseConditional();return new fi(this.span(n),t,r,s)}return new hi(this.span(n),t,r)},t.prototype.parseCallArguments=function(){if(this.next.isCharacter(41))return[];var t=[];do{t.push(this.parsePipe())}while(this.optionalCharacter(44));return t},t.prototype.expectTemplateBindingKey=function(){var t="",e=!1;do{t+=this.expectIdentifierOrKeywordOrString(),(e=this.optionalOperator("-"))&&(t+="-")}while(e);return t.toString()},t.prototype.parseTemplateBindings=function(t){var e=!0,n=[];do{var r=this.inputIndex,i=void 0,o=void 0,s=!1;e?(i=o=t,e=!1):((s=this.peekKeywordLet())&&this.advance(),i=this.expectTemplateBindingKey(),o=s?i:t+i[0].toUpperCase()+i.substring(1),this.optionalCharacter(58));var a=null,u=null;if(s)a=this.optionalOperator("=")?this.expectTemplateBindingKey():"$implicit";else if(this.peekKeywordAs())this.advance(),a=i,o=this.expectTemplateBindingKey(),s=!0;else if(this.next!==Ts&&!this.peekKeywordLet()){var c=this.inputIndex,l=this.parsePipe(),p=this.input.substring(c-this.offset,this.inputIndex-this.offset);u=new Ai(l,p,this.location,this.errors)}if(n.push(new Ni(this.span(r),o,s,a,u)),this.peekKeywordAs()&&!s){var h=this.inputIndex;this.advance();var f=this.expectTemplateBindingKey();n.push(new Ni(this.span(h),f,!0,o,null))}this.optionalCharacter(mo)||this.optionalCharacter(44)}while(this.index<this.tokens.length);return new Fs(n,[],this.errors)},t.prototype.error=function(t,e){void 0===e&&(e=null),this.errors.push(new ii(t,this.input,this.locationText(e),this.location)),this.skip()},t.prototype.locationText=function(t){return void 0===t&&(t=null),null==t&&(t=this.index),t<this.tokens.length?"at column "+(this.tokens[t].index+1)+" in":"at the end of the expression"},t.prototype.skip=function(){for(var t=this.next;this.index<this.tokens.length&&!t.isCharacter(mo)&&(this.rparensExpected<=0||!t.isCharacter(41))&&(this.rbracesExpected<=0||!t.isCharacter(125))&&(this.rbracketsExpected<=0||!t.isCharacter(93));)this.next.isError()&&this.errors.push(new ii(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),t=this.next},t}(),qs=function(){function t(){this.errors=[]}return t.check=function(e){var n=new t;return e.visit(n),n.errors},t.prototype.visitImplicitReceiver=function(t,e){},t.prototype.visitInterpolation=function(t,e){},t.prototype.visitLiteralPrimitive=function(t,e){},t.prototype.visitPropertyRead=function(t,e){},t.prototype.visitPropertyWrite=function(t,e){},t.prototype.visitSafePropertyRead=function(t,e){},t.prototype.visitMethodCall=function(t,e){},t.prototype.visitSafeMethodCall=function(t,e){},t.prototype.visitFunctionCall=function(t,e){},t.prototype.visitLiteralArray=function(t,e){this.visitAll(t.expressions)},t.prototype.visitLiteralMap=function(t,e){this.visitAll(t.values)},t.prototype.visitBinary=function(t,e){},t.prototype.visitPrefixNot=function(t,e){},t.prototype.visitNonNullAssert=function(t,e){},t.prototype.visitConditional=function(t,e){},t.prototype.visitPipe=function(t,e){this.errors.push("pipes")},t.prototype.visitKeyedRead=function(t,e){},t.prototype.visitKeyedWrite=function(t,e){},t.prototype.visitAll=function(t){var e=this;return t.map(function(t){return t.visit(e)})},t.prototype.visitChain=function(t,e){},t.prototype.visitQuote=function(t,e){},t}(),Us=function(){function t(t,e){void 0===e&&(e=-1),this.path=t,this.position=e}return Object.defineProperty(t.prototype,"empty",{get:function(){return!this.path||!this.path.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"head",{get:function(){return this.path[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tail",{get:function(){return this.path[this.path.length-1]},enumerable:!0,configurable:!0}),t.prototype.parentOf=function(t){return t&&this.path[this.path.indexOf(t)-1]},t.prototype.childOf=function(t){return this.path[this.path.indexOf(t)+1]},t.prototype.first=function(t){for(var e=this.path.length-1;e>=0;e--){var n=this.path[e];if(n instanceof t)return n}},t.prototype.push=function(t){this.path.push(t)},t.prototype.pop=function(){return this.path.pop()},t}(),Ks=function(){function t(t,e,n){this.value=t,this.sourceSpan=e,this.i18n=n}return t.prototype.visit=function(t,e){return t.visitText(this,e)},t}(),Ws=function(){function t(t,e,n,r,i,o){this.switchValue=t,this.type=e,this.cases=n,this.sourceSpan=r,this.switchValueSourceSpan=i,this.i18n=o}return t.prototype.visit=function(t,e){return t.visitExpansion(this,e)},t}(),zs=function(){function t(t,e,n,r,i){this.value=t,this.expression=e,this.sourceSpan=n,this.valueSourceSpan=r,this.expSourceSpan=i}return t.prototype.visit=function(t,e){return t.visitExpansionCase(this,e)},t}(),Qs=function(){function t(t,e,n,r,i){this.name=t,this.value=e,this.sourceSpan=n,this.valueSpan=r,this.i18n=i}return t.prototype.visit=function(t,e){return t.visitAttribute(this,e)},t}(),Gs=function(){function t(t,e,n,r,i,o,s){void 0===i&&(i=null),void 0===o&&(o=null),this.name=t,this.attrs=e,this.children=n,this.sourceSpan=r,this.startSourceSpan=i,this.endSourceSpan=o,this.i18n=s}return t.prototype.visit=function(t,e){return t.visitElement(this,e)},t}(),Xs=function(){function t(t,e){this.value=t,this.sourceSpan=e}return t.prototype.visit=function(t,e){return t.visitComment(this,e)},t}();function $s(t,e,n){void 0===n&&(n=null);var r=[],i=t.visit?function(e){return t.visit(e,n)||e.visit(t,n)}:function(e){return e.visit(t,n)};return e.forEach(function(t){var e=i(t);e&&r.push(e)}),r}var Ys,Zs=function(){function t(){}return t.prototype.visitElement=function(t,e){this.visitChildren(e,function(e){e(t.attrs),e(t.children)})},t.prototype.visitAttribute=function(t,e){},t.prototype.visitText=function(t,e){},t.prototype.visitComment=function(t,e){},t.prototype.visitExpansion=function(t,e){return this.visitChildren(e,function(e){e(t.cases)})},t.prototype.visitExpansionCase=function(t,e){},t.prototype.visitChildren=function(t,e){var n=[],r=this;return e(function i(e){e&&n.push($s(r,e,t))}),[].concat.apply([],n)},t}();function Js(t,e){var n=[];return $s(new(function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return o(r,t),r.prototype.visit=function(t,r){var i=function t(e){var n=e.sourceSpan.start.offset,r=e.sourceSpan.end.offset;return e instanceof Gs&&(e.endSourceSpan?r=e.endSourceSpan.end.offset:e.children&&e.children.length&&(r=t(e.children[e.children.length-1]).end)),{start:n,end:r}}(t);if(!(i.start<=e&&e<i.end))return!0;n.push(t)},r}(Zs)),t),new Us(n,e)}
|
|
226
226
|
/**
|
|
227
227
|
* @license
|
|
228
228
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -236,7 +236,7 @@ function n(t){for(var e={},n=0,r=0,i=0,o=0,s=0,a=null,u=!1;n<t.length;)switch(t.
|
|
|
236
236
|
*
|
|
237
237
|
* Use of this source code is governed by an MIT-style license that can be
|
|
238
238
|
* found in the LICENSE file at https://angular.io/license
|
|
239
|
-
*/(this.tokens),this.errors)},t.prototype._tokenizeExpansionForm=function(){if(ha(this._input,this._index,this._interpolationConfig))return this._consumeExpansionFormStart(),!0;if(function t(e){return e===go||jo(e)||Lo(e)}(this._peek)&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(125===this._peek){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1},t.prototype._getLocation=function(){return new Vo(this._file,this._index,this._line,this._column)},t.prototype._getSpan=function(t,e){return void 0===t&&(t=this._getLocation()),void 0===e&&(e=this._getLocation()),new Ho(t,e)},t.prototype._beginToken=function(t,e){void 0===e&&(e=this._getLocation()),this._currentTokenStart=e,this._currentTokenType=t},t.prototype._endToken=function(t,e){void 0===e&&(e=this._getLocation());var n=new ta(this._currentTokenType,t,new Ho(this._currentTokenStart,e));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n},t.prototype._createError=function(t,e){this._isInExpansionForm()&&(t+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var n=new ea(t,this._currentTokenType,e);return this._currentTokenStart=null,this._currentTokenType=null,new sa(n)},t.prototype._advance=function(){if(this._index>=this._length)throw this._createError(ia(ro),this._getSpan());this._peek===oo?(this._line++,this._column=0):this._peek!==oo&&this._peek!==uo&&this._column++,this._index++,this._peek=this._index>=this._length?ro:this._input.charCodeAt(this._index),this._nextPeek=this._index+1>=this._length?ro:this._input.charCodeAt(this._index+1)},t.prototype._attemptCharCode=function(t){return this._peek===t&&(this._advance(),!0)},t.prototype._attemptCharCodeCaseInsensitive=function(t){return!!function e(t,n){return fa(t)==fa(n)}(this._peek,t)&&(this._advance(),!0)},t.prototype._requireCharCode=function(t){var e=this._getLocation();if(!this._attemptCharCode(t))throw this._createError(ia(this._peek),this._getSpan(e,e))},t.prototype._attemptStr=function(t){var e=t.length;if(this._index+e>this._length)return!1;for(var n=this._savePosition(),r=0;r<e;r++)if(!this._attemptCharCode(t.charCodeAt(r)))return this._restorePosition(n),!1;return!0},t.prototype._attemptStrCaseInsensitive=function(t){for(var e=0;e<t.length;e++)if(!this._attemptCharCodeCaseInsensitive(t.charCodeAt(e)))return!1;return!0},t.prototype._requireStr=function(t){var e=this._getLocation();if(!this._attemptStr(t))throw this._createError(ia(this._peek),this._getSpan(e))},t.prototype._attemptCharCodeUntilFn=function(t){for(;!t(this._peek);)this._advance()},t.prototype._requireCharCodeUntilFn=function(t,e){var n=this._getLocation();if(this._attemptCharCodeUntilFn(t),this._index-n.offset<e)throw this._createError(ia(this._peek),this._getSpan(n,n))},t.prototype._attemptUntilChar=function(t){for(;this._peek!==t;)this._advance()},t.prototype._readChar=function(t){if(t&&38===this._peek)return this._decodeEntity();var e=this._index;return this._advance(),this._input[e]},t.prototype._decodeEntity=function(){var t=this._getLocation();if(this._advance(),!this._attemptCharCode(35)){var e=this._savePosition();if(this._attemptCharCodeUntilFn(pa),this._peek!=mo)return this._restorePosition(e),"&";this._advance();var n=this._input.substring(t.offset+1,this._index-1),r=b[n];if(!r)throw this._createError(oa(n),this._getSpan(t));return r}var i=this._attemptCharCode(120)||this._attemptCharCode(88),o=this._getLocation().offset;if(this._attemptCharCodeUntilFn(la),this._peek!=mo)throw this._createError(ia(this._peek),this._getSpan());this._advance();var s=this._input.substring(o,this._index-1);try{var a=parseInt(s,i?16:10);return String.fromCharCode(a)}catch(e){var u=this._input.substring(t.offset+1,this._index-1);throw this._createError(oa(u),this._getSpan(t))}},t.prototype._consumeRawText=function(t,e,n){var r,i=this._getLocation();this._beginToken(t?Ys.ESCAPABLE_RAW_TEXT:Ys.RAW_TEXT,i);for(var o=[];r=this._getLocation(),!this._attemptCharCode(e)||!n();)for(this._index>r.offset&&o.push(this._input.substring(r.offset,this._index));this._peek!==e;)o.push(this._readChar(t));return this._endToken([this._processCarriageReturns(o.join(""))],r)},t.prototype._consumeComment=function(t){var e=this;this._beginToken(Ys.COMMENT_START,t),this._requireCharCode(vo),this._endToken([]);var n=this._consumeRawText(!1,vo,function(){return e._attemptStr("->")});this._beginToken(Ys.COMMENT_END,n.sourceSpan.end),this._endToken([])},t.prototype._consumeCdata=function(t){var e=this;this._beginToken(Ys.CDATA_START,t),this._requireStr("CDATA["),this._endToken([]);var n=this._consumeRawText(!1,93,function(){return e._attemptStr("]>")});this._beginToken(Ys.CDATA_END,n.sourceSpan.end),this._endToken([])},t.prototype._consumeDocType=function(t){this._beginToken(Ys.DOC_TYPE,t),this._attemptUntilChar(_o),this._advance(),this._endToken([this._input.substring(t.offset+2,this._index-1)])},t.prototype._consumePrefixAndName=function(){for(var t,e,n=this._index,r=null;58!==this._peek&&!(((t=this._peek)<To||Io<t)&&(t<wo||So<t)&&(t<bo||t>xo));)this._advance();return 58===this._peek?(this._advance(),r=this._input.substring(n,this._index-1),e=this._index):e=n,this._requireCharCodeUntilFn(ca,this._index===e?1:0),[r,this._input.substring(e,this._index)]},t.prototype._consumeTagOpen=function(t){var e,n,r=this._savePosition();try{if(!jo(this._peek))throw this._createError(ia(this._peek),this._getSpan());var i=this._index;for(this._consumeTagOpenStart(t),n=(e=this._input.substring(i,this._index)).toLowerCase(),this._attemptCharCodeUntilFn(ua);this._peek!==yo&&this._peek!==_o;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(ua),this._attemptCharCode(go)&&(this._attemptCharCodeUntilFn(ua),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(ua);this._consumeTagOpenEnd()}catch(e){if(e instanceof sa)return this._restorePosition(r),this._beginToken(Ys.TEXT,t),void this._endToken(["<"]);throw e}var o=this._getTagDefinition(e).contentType;o===s.RAW_TEXT?this._consumeRawTextWithTagClose(n,!1):o===s.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,!0)},t.prototype._consumeRawTextWithTagClose=function(t,e){var n=this,r=this._consumeRawText(e,60,function(){return!!n._attemptCharCode(yo)&&(n._attemptCharCodeUntilFn(ua),!!n._attemptStrCaseInsensitive(t)&&(n._attemptCharCodeUntilFn(ua),n._attemptCharCode(_o)))});this._beginToken(Ys.TAG_CLOSE,r.sourceSpan.end),this._endToken([null,t])},t.prototype._consumeTagOpenStart=function(t){this._beginToken(Ys.TAG_OPEN_START,t);var e=this._consumePrefixAndName();this._endToken(e)},t.prototype._consumeAttributeName=function(){this._beginToken(Ys.ATTR_NAME);var t=this._consumePrefixAndName();this._endToken(t)},t.prototype._consumeAttributeValue=function(){var t;if(this._beginToken(Ys.ATTR_VALUE),this._peek===ho||this._peek===lo){var e=this._peek;this._advance();for(var n=[];this._peek!==e;)n.push(this._readChar(!0));t=n.join(""),this._advance()}else{var r=this._index;this._requireCharCodeUntilFn(ca,1),t=this._input.substring(r,this._index)}this._endToken([this._processCarriageReturns(t)])},t.prototype._consumeTagOpenEnd=function(){var t=this._attemptCharCode(yo)?Ys.TAG_OPEN_END_VOID:Ys.TAG_OPEN_END;this._beginToken(t),this._requireCharCode(_o),this._endToken([])},t.prototype._consumeTagClose=function(t){this._beginToken(Ys.TAG_CLOSE,t),this._attemptCharCodeUntilFn(ua);var e=this._consumePrefixAndName();this._attemptCharCodeUntilFn(ua),this._requireCharCode(_o),this._endToken(e)},t.prototype._consumeExpansionFormStart=function(){this._beginToken(Ys.EXPANSION_FORM_START,this._getLocation()),this._requireCharCode(Mo),this._endToken([]),this._expansionCaseStack.push(Ys.EXPANSION_FORM_START),this._beginToken(Ys.RAW_TEXT,this._getLocation());var t=this._readUntil(44);this._endToken([t],this._getLocation()),this._requireCharCode(44),this._attemptCharCodeUntilFn(ua),this._beginToken(Ys.RAW_TEXT,this._getLocation());var e=this._readUntil(44);this._endToken([e],this._getLocation()),this._requireCharCode(44),this._attemptCharCodeUntilFn(ua)},t.prototype._consumeExpansionCaseStart=function(){this._beginToken(Ys.EXPANSION_CASE_VALUE,this._getLocation());var t=this._readUntil(Mo).trim();this._endToken([t],this._getLocation()),this._attemptCharCodeUntilFn(ua),this._beginToken(Ys.EXPANSION_CASE_EXP_START,this._getLocation()),this._requireCharCode(Mo),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(ua),this._expansionCaseStack.push(Ys.EXPANSION_CASE_EXP_START)},t.prototype._consumeExpansionCaseEnd=function(){this._beginToken(Ys.EXPANSION_CASE_EXP_END,this._getLocation()),this._requireCharCode(125),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(ua),this._expansionCaseStack.pop()},t.prototype._consumeExpansionFormEnd=function(){this._beginToken(Ys.EXPANSION_FORM_END,this._getLocation()),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()},t.prototype._consumeText=function(){var t=this._getLocation();this._beginToken(Ys.TEXT,t);var e=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(e.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(e.push(this._interpolationConfig.end),this._inInterpolation=!1):e.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(e.join(""))])},t.prototype._isTextEnd=function(){if(60===this._peek||this._peek===ro)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(ha(this._input,this._index,this._interpolationConfig))return!0;if(125===this._peek&&this._isInExpansionCase())return!0}return!1},t.prototype._savePosition=function(){return[this._peek,this._index,this._column,this._line,this.tokens.length]},t.prototype._readUntil=function(t){var e=this._index;return this._attemptUntilChar(t),this._input.substring(e,this._index)},t.prototype._restorePosition=function(t){this._peek=t[0],this._index=t[1],this._column=t[2],this._line=t[3];var e=t[4];e<this.tokens.length&&(this.tokens=this.tokens.slice(0,e))},t.prototype._isInExpansionCase=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Ys.EXPANSION_CASE_EXP_START},t.prototype._isInExpansionForm=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Ys.EXPANSION_FORM_START},t}();function ua(t){return!Do(t)||t===ro}function ca(t){return Do(t)||t===_o||t===yo||t===ho||t===lo||t===go}function la(t){return t==mo||t==ro||!function e(t){return t>=To&&t<=Po||t>=wo&&t<=Eo||Lo(t)}(t)}function pa(t){return t==mo||t==ro||!jo(t)}function ha(t,e,n){var r=!!n&&t.indexOf(n.start,e)==e;return t.charCodeAt(e)==Mo&&!r}function fa(t){return t>=To&&t<=Io?t-To+wo:t}var da=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.elementName=e,i}return o(e,t),e.create=function(t,n,r){return new e(t,n,r)},e}(qo),va=function va(t,e){this.rootNodes=t,this.errors=e},ya=function(){function t(t){this.getTagDefinition=t}return t.prototype.parse=function(t,e,n,r){void 0===n&&(n=!1),void 0===r&&(r=Ls);var i=function o(t,e,n,r,i){return void 0===r&&(r=!1),void 0===i&&(i=Ls),new aa(new Bo(t,e),n,r,i).tokenize()}(t,e,this.getTagDefinition,n,r),s=new ma(i.tokens,this.getTagDefinition).build();return new va(s.rootNodes,i.errors.concat(s.errors))},t}(),ma=function(){function t(t,e){this.tokens=t,this.getTagDefinition=e,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return t.prototype.build=function(){for(;this._peek.type!==Ys.EOF;)this._peek.type===Ys.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===Ys.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===Ys.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Ys.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Ys.TEXT||this._peek.type===Ys.RAW_TEXT||this._peek.type===Ys.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Ys.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new va(this._rootNodes,this._errors)},t.prototype._advance=function(){var t=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],t},t.prototype._advanceIf=function(t){return this._peek.type===t?this._advance():null},t.prototype._consumeCdata=function(t){this._consumeText(this._advance()),this._advanceIf(Ys.CDATA_END)},t.prototype._consumeComment=function(t){var e=this._advanceIf(Ys.RAW_TEXT);this._advanceIf(Ys.COMMENT_END);var n=null!=e?e.parts[0].trim():null;this._addToParent(new Xs(n,t.sourceSpan))},t.prototype._consumeExpansion=function(t){for(var e=this._advance(),n=this._advance(),r=[];this._peek.type===Ys.EXPANSION_CASE_VALUE;){var i=this._parseExpansionCase();if(!i)return;r.push(i)}if(this._peek.type===Ys.EXPANSION_FORM_END){var o=new Ho(t.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new Ws(e.parts[0],n.parts[0],r,o,e.sourceSpan)),this._advance()}else this._errors.push(da.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."))},t.prototype._parseExpansionCase=function(){var e=this._advance();if(this._peek.type!==Ys.EXPANSION_CASE_EXP_START)return this._errors.push(da.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 ta(Ys.EOF,[],i.sourceSpan));var o=new t(r,this.getTagDefinition).build();if(o.errors.length>0)return this._errors=this._errors.concat(o.errors),null;var s=new Ho(e.sourceSpan.start,i.sourceSpan.end),a=new Ho(n.sourceSpan.start,i.sourceSpan.end);return new zs(e.parts[0],o.rootNodes,s,e.sourceSpan,a)},t.prototype._collectExpansionExpTokens=function(t){for(var e=[],n=[Ys.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==Ys.EXPANSION_FORM_START&&this._peek.type!==Ys.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===Ys.EXPANSION_CASE_EXP_END){if(!ga(n,Ys.EXPANSION_CASE_EXP_START))return this._errors.push(da.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return e}if(this._peek.type===Ys.EXPANSION_FORM_END){if(!ga(n,Ys.EXPANSION_FORM_START))return this._errors.push(da.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===Ys.EOF)return this._errors.push(da.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;e.push(this._advance())}},t.prototype._consumeText=function(t){var e=t.parts[0];if(e.length>0&&"\n"==e[0]){var n=this._getParentElement();null!=n&&0==n.children.length&&this.getTagDefinition(n.name).ignoreFirstLf&&(e=e.substring(1))}e.length>0&&this._addToParent(new Ks(e,t.sourceSpan))},t.prototype._closeVoidElement=function(){var t=this._getParentElement();t&&this.getTagDefinition(t.name).isVoid&&this._elementStack.pop()},t.prototype._consumeStartTag=function(t){for(var e=t.parts[0],n=t.parts[1],r=[];this._peek.type===Ys.ATTR_NAME;)r.push(this._consumeAttr(this._advance()));var i=this._getElementFullName(e,n,this._getParentElement()),o=!1;if(this._peek.type===Ys.TAG_OPEN_END_VOID){this._advance(),o=!0;var s=this.getTagDefinition(i);s.canSelfClose||null!==g(i)||s.isVoid||this._errors.push(da.create(i,t.sourceSpan,'Only void and foreign elements can be self closed "'+t.parts[1]+'"'))}else this._peek.type===Ys.TAG_OPEN_END&&(this._advance(),o=!1);var a=new Ho(t.sourceSpan.start,this._peek.sourceSpan.start),u=new Gs(i,r,[],a,a,void 0);this._pushElement(u),o&&(this._popElement(i),u.endSourceSpan=a)},t.prototype._pushElement=function(t){var e=this._getParentElement();e&&this.getTagDefinition(e.name).isClosedByChild(t.name)&&this._elementStack.pop();var n=this.getTagDefinition(t.name),r=this._getParentElementSkippingContainers(),i=r.parent,o=r.container;if(i&&n.requireExtraParent(i.name)){var s=new Gs(n.parentToAdd,[],[],t.sourceSpan,t.startSourceSpan,t.endSourceSpan);this._insertBeforeContainer(i,o,s)}this._addToParent(t),this._elementStack.push(t)},t.prototype._consumeEndTag=function(t){var e=this._getElementFullName(t.parts[0],t.parts[1],this._getParentElement());this._getParentElement()&&(this._getParentElement().endSourceSpan=t.sourceSpan),this.getTagDefinition(e).isVoid?this._errors.push(da.create(e,t.sourceSpan,'Void elements do not have end tags "'+t.parts[1]+'"')):this._popElement(e)||this._errors.push(da.create(e,t.sourceSpan,'Unexpected closing tag "'+e+'". 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'))},t.prototype._popElement=function(t){for(var e=this._elementStack.length-1;e>=0;e--){var n=this._elementStack[e];if(n.name==t)return this._elementStack.splice(e,this._elementStack.length-e),!0;if(!this.getTagDefinition(n.name).closedByParent)return!1}return!1},t.prototype._consumeAttr=function(t){var e=_(t.parts[0],t.parts[1]),n=t.sourceSpan.end,r="",i=void 0;if(this._peek.type===Ys.ATTR_VALUE){var o=this._advance();r=o.parts[0],n=o.sourceSpan.end,i=o.sourceSpan}return new Qs(e,r,new Ho(t.sourceSpan.start,n),i)},t.prototype._getParentElement=function(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null},t.prototype._getParentElementSkippingContainers=function(){for(var t=null,e=this._elementStack.length-1;e>=0;e--){if(!v(this._elementStack[e].name))return{parent:this._elementStack[e],container:t};t=this._elementStack[e]}return{parent:null,container:t}},t.prototype._addToParent=function(t){var e=this._getParentElement();null!=e?e.children.push(t):this._rootNodes.push(t)},t.prototype._insertBeforeContainer=function(t,e,n){if(e){if(t){var r=t.children.indexOf(e);t.children[r]=n}else this._rootNodes.push(n);n.children.push(e),this._elementStack.splice(this._elementStack.indexOf(e),0,n)}else this._addToParent(n),this._elementStack.push(n)},t.prototype._getElementFullName=function(t,e,n){return null==t&&null==(t=this.getTagDefinition(e).implicitNamespacePrefix)&&null!=n&&(t=g(n.name)),_(t,e)},t}();function ga(t,e){return t.length>0&&t[t.length-1]===e}
|
|
239
|
+
*/(this.tokens),this.errors)},t.prototype._tokenizeExpansionForm=function(){if(ha(this._input,this._index,this._interpolationConfig))return this._consumeExpansionFormStart(),!0;if(function t(e){return e===go||jo(e)||Lo(e)}(this._peek)&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(125===this._peek){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1},t.prototype._getLocation=function(){return new Vo(this._file,this._index,this._line,this._column)},t.prototype._getSpan=function(t,e){return void 0===t&&(t=this._getLocation()),void 0===e&&(e=this._getLocation()),new Ho(t,e)},t.prototype._beginToken=function(t,e){void 0===e&&(e=this._getLocation()),this._currentTokenStart=e,this._currentTokenType=t},t.prototype._endToken=function(t,e){void 0===e&&(e=this._getLocation());var n=new ta(this._currentTokenType,t,new Ho(this._currentTokenStart,e));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n},t.prototype._createError=function(t,e){this._isInExpansionForm()&&(t+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var n=new ea(t,this._currentTokenType,e);return this._currentTokenStart=null,this._currentTokenType=null,new sa(n)},t.prototype._advance=function(){if(this._index>=this._length)throw this._createError(ia(ro),this._getSpan());this._peek===oo?(this._line++,this._column=0):this._peek!==oo&&this._peek!==uo&&this._column++,this._index++,this._peek=this._index>=this._length?ro:this._input.charCodeAt(this._index),this._nextPeek=this._index+1>=this._length?ro:this._input.charCodeAt(this._index+1)},t.prototype._attemptCharCode=function(t){return this._peek===t&&(this._advance(),!0)},t.prototype._attemptCharCodeCaseInsensitive=function(t){return!!function e(t,n){return fa(t)==fa(n)}(this._peek,t)&&(this._advance(),!0)},t.prototype._requireCharCode=function(t){var e=this._getLocation();if(!this._attemptCharCode(t))throw this._createError(ia(this._peek),this._getSpan(e,e))},t.prototype._attemptStr=function(t){var e=t.length;if(this._index+e>this._length)return!1;for(var n=this._savePosition(),r=0;r<e;r++)if(!this._attemptCharCode(t.charCodeAt(r)))return this._restorePosition(n),!1;return!0},t.prototype._attemptStrCaseInsensitive=function(t){for(var e=0;e<t.length;e++)if(!this._attemptCharCodeCaseInsensitive(t.charCodeAt(e)))return!1;return!0},t.prototype._requireStr=function(t){var e=this._getLocation();if(!this._attemptStr(t))throw this._createError(ia(this._peek),this._getSpan(e))},t.prototype._attemptCharCodeUntilFn=function(t){for(;!t(this._peek);)this._advance()},t.prototype._requireCharCodeUntilFn=function(t,e){var n=this._getLocation();if(this._attemptCharCodeUntilFn(t),this._index-n.offset<e)throw this._createError(ia(this._peek),this._getSpan(n,n))},t.prototype._attemptUntilChar=function(t){for(;this._peek!==t;)this._advance()},t.prototype._readChar=function(t){if(t&&38===this._peek)return this._decodeEntity();var e=this._index;return this._advance(),this._input[e]},t.prototype._decodeEntity=function(){var t=this._getLocation();if(this._advance(),!this._attemptCharCode(35)){var e=this._savePosition();if(this._attemptCharCodeUntilFn(pa),this._peek!=mo)return this._restorePosition(e),"&";this._advance();var n=this._input.substring(t.offset+1,this._index-1),r=b[n];if(!r)throw this._createError(oa(n),this._getSpan(t));return r}var i=this._attemptCharCode(120)||this._attemptCharCode(88),o=this._getLocation().offset;if(this._attemptCharCodeUntilFn(la),this._peek!=mo)throw this._createError(ia(this._peek),this._getSpan());this._advance();var s=this._input.substring(o,this._index-1);try{var a=parseInt(s,i?16:10);return String.fromCharCode(a)}catch(e){var u=this._input.substring(t.offset+1,this._index-1);throw this._createError(oa(u),this._getSpan(t))}},t.prototype._consumeRawText=function(t,e,n){var r,i=this._getLocation();this._beginToken(t?Ys.ESCAPABLE_RAW_TEXT:Ys.RAW_TEXT,i);for(var o=[];r=this._getLocation(),!this._attemptCharCode(e)||!n();)for(this._index>r.offset&&o.push(this._input.substring(r.offset,this._index));this._peek!==e;)o.push(this._readChar(t));return this._endToken([this._processCarriageReturns(o.join(""))],r)},t.prototype._consumeComment=function(t){var e=this;this._beginToken(Ys.COMMENT_START,t),this._requireCharCode(vo),this._endToken([]);var n=this._consumeRawText(!1,vo,function(){return e._attemptStr("->")});this._beginToken(Ys.COMMENT_END,n.sourceSpan.end),this._endToken([])},t.prototype._consumeCdata=function(t){var e=this;this._beginToken(Ys.CDATA_START,t),this._requireStr("CDATA["),this._endToken([]);var n=this._consumeRawText(!1,93,function(){return e._attemptStr("]>")});this._beginToken(Ys.CDATA_END,n.sourceSpan.end),this._endToken([])},t.prototype._consumeDocType=function(t){this._beginToken(Ys.DOC_TYPE,t),this._attemptUntilChar(_o),this._advance(),this._endToken([this._input.substring(t.offset+2,this._index-1)])},t.prototype._consumePrefixAndName=function(){for(var t,e,n=this._index,r=null;58!==this._peek&&!(((t=this._peek)<To||Io<t)&&(t<wo||So<t)&&(t<bo||t>xo));)this._advance();return 58===this._peek?(this._advance(),r=this._input.substring(n,this._index-1),e=this._index):e=n,this._requireCharCodeUntilFn(ca,this._index===e?1:0),[r,this._input.substring(e,this._index)]},t.prototype._consumeTagOpen=function(t){var e,n,r=this._savePosition();try{if(!jo(this._peek))throw this._createError(ia(this._peek),this._getSpan());var i=this._index;for(this._consumeTagOpenStart(t),n=(e=this._input.substring(i,this._index)).toLowerCase(),this._attemptCharCodeUntilFn(ua);this._peek!==yo&&this._peek!==_o;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(ua),this._attemptCharCode(go)&&(this._attemptCharCodeUntilFn(ua),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(ua);this._consumeTagOpenEnd()}catch(e){if(e instanceof sa)return this._restorePosition(r),this._beginToken(Ys.TEXT,t),void this._endToken(["<"]);throw e}var o=this._getTagDefinition(e).contentType;o===s.RAW_TEXT?this._consumeRawTextWithTagClose(n,!1):o===s.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,!0)},t.prototype._consumeRawTextWithTagClose=function(t,e){var n=this,r=this._consumeRawText(e,60,function(){return!!n._attemptCharCode(yo)&&(n._attemptCharCodeUntilFn(ua),!!n._attemptStrCaseInsensitive(t)&&(n._attemptCharCodeUntilFn(ua),n._attemptCharCode(_o)))});this._beginToken(Ys.TAG_CLOSE,r.sourceSpan.end),this._endToken([null,t])},t.prototype._consumeTagOpenStart=function(t){this._beginToken(Ys.TAG_OPEN_START,t);var e=this._consumePrefixAndName();this._endToken(e)},t.prototype._consumeAttributeName=function(){this._beginToken(Ys.ATTR_NAME);var t=this._consumePrefixAndName();this._endToken(t)},t.prototype._consumeAttributeValue=function(){var t;if(this._beginToken(Ys.ATTR_VALUE),this._peek===ho||this._peek===lo){var e=this._peek;this._advance();for(var n=[];this._peek!==e;)n.push(this._readChar(!0));t=n.join(""),this._advance()}else{var r=this._index;this._requireCharCodeUntilFn(ca,1),t=this._input.substring(r,this._index)}this._endToken([this._processCarriageReturns(t)])},t.prototype._consumeTagOpenEnd=function(){var t=this._attemptCharCode(yo)?Ys.TAG_OPEN_END_VOID:Ys.TAG_OPEN_END;this._beginToken(t),this._requireCharCode(_o),this._endToken([])},t.prototype._consumeTagClose=function(t){this._beginToken(Ys.TAG_CLOSE,t),this._attemptCharCodeUntilFn(ua);var e=this._consumePrefixAndName();this._attemptCharCodeUntilFn(ua),this._requireCharCode(_o),this._endToken(e)},t.prototype._consumeExpansionFormStart=function(){this._beginToken(Ys.EXPANSION_FORM_START,this._getLocation()),this._requireCharCode(Mo),this._endToken([]),this._expansionCaseStack.push(Ys.EXPANSION_FORM_START),this._beginToken(Ys.RAW_TEXT,this._getLocation());var t=this._readUntil(44);this._endToken([t],this._getLocation()),this._requireCharCode(44),this._attemptCharCodeUntilFn(ua),this._beginToken(Ys.RAW_TEXT,this._getLocation());var e=this._readUntil(44);this._endToken([e],this._getLocation()),this._requireCharCode(44),this._attemptCharCodeUntilFn(ua)},t.prototype._consumeExpansionCaseStart=function(){this._beginToken(Ys.EXPANSION_CASE_VALUE,this._getLocation());var t=this._readUntil(Mo).trim();this._endToken([t],this._getLocation()),this._attemptCharCodeUntilFn(ua),this._beginToken(Ys.EXPANSION_CASE_EXP_START,this._getLocation()),this._requireCharCode(Mo),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(ua),this._expansionCaseStack.push(Ys.EXPANSION_CASE_EXP_START)},t.prototype._consumeExpansionCaseEnd=function(){this._beginToken(Ys.EXPANSION_CASE_EXP_END,this._getLocation()),this._requireCharCode(125),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(ua),this._expansionCaseStack.pop()},t.prototype._consumeExpansionFormEnd=function(){this._beginToken(Ys.EXPANSION_FORM_END,this._getLocation()),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()},t.prototype._consumeText=function(){var t=this._getLocation();this._beginToken(Ys.TEXT,t);var e=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(e.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(e.push(this._interpolationConfig.end),this._inInterpolation=!1):e.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(e.join(""))])},t.prototype._isTextEnd=function(){if(60===this._peek||this._peek===ro)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(ha(this._input,this._index,this._interpolationConfig))return!0;if(125===this._peek&&this._isInExpansionCase())return!0}return!1},t.prototype._savePosition=function(){return[this._peek,this._index,this._column,this._line,this.tokens.length]},t.prototype._readUntil=function(t){var e=this._index;return this._attemptUntilChar(t),this._input.substring(e,this._index)},t.prototype._restorePosition=function(t){this._peek=t[0],this._index=t[1],this._column=t[2],this._line=t[3];var e=t[4];e<this.tokens.length&&(this.tokens=this.tokens.slice(0,e))},t.prototype._isInExpansionCase=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Ys.EXPANSION_CASE_EXP_START},t.prototype._isInExpansionForm=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Ys.EXPANSION_FORM_START},t}();function ua(t){return!Ro(t)||t===ro}function ca(t){return Ro(t)||t===_o||t===yo||t===ho||t===lo||t===go}function la(t){return t==mo||t==ro||!function e(t){return t>=To&&t<=Po||t>=wo&&t<=Eo||Lo(t)}(t)}function pa(t){return t==mo||t==ro||!jo(t)}function ha(t,e,n){var r=!!n&&t.indexOf(n.start,e)==e;return t.charCodeAt(e)==Mo&&!r}function fa(t){return t>=To&&t<=Io?t-To+wo:t}var da=function(t){function e(e,n,r){var i=t.call(this,n,r)||this;return i.elementName=e,i}return o(e,t),e.create=function(t,n,r){return new e(t,n,r)},e}(qo),va=function va(t,e){this.rootNodes=t,this.errors=e},ya=function(){function t(t){this.getTagDefinition=t}return t.prototype.parse=function(t,e,n,r){void 0===n&&(n=!1),void 0===r&&(r=Ls);var i=function o(t,e,n,r,i){return void 0===r&&(r=!1),void 0===i&&(i=Ls),new aa(new Bo(t,e),n,r,i).tokenize()}(t,e,this.getTagDefinition,n,r),s=new ma(i.tokens,this.getTagDefinition).build();return new va(s.rootNodes,i.errors.concat(s.errors))},t}(),ma=function(){function t(t,e){this.tokens=t,this.getTagDefinition=e,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return t.prototype.build=function(){for(;this._peek.type!==Ys.EOF;)this._peek.type===Ys.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===Ys.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===Ys.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Ys.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Ys.TEXT||this._peek.type===Ys.RAW_TEXT||this._peek.type===Ys.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Ys.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new va(this._rootNodes,this._errors)},t.prototype._advance=function(){var t=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],t},t.prototype._advanceIf=function(t){return this._peek.type===t?this._advance():null},t.prototype._consumeCdata=function(t){this._consumeText(this._advance()),this._advanceIf(Ys.CDATA_END)},t.prototype._consumeComment=function(t){var e=this._advanceIf(Ys.RAW_TEXT);this._advanceIf(Ys.COMMENT_END);var n=null!=e?e.parts[0].trim():null;this._addToParent(new Xs(n,t.sourceSpan))},t.prototype._consumeExpansion=function(t){for(var e=this._advance(),n=this._advance(),r=[];this._peek.type===Ys.EXPANSION_CASE_VALUE;){var i=this._parseExpansionCase();if(!i)return;r.push(i)}if(this._peek.type===Ys.EXPANSION_FORM_END){var o=new Ho(t.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new Ws(e.parts[0],n.parts[0],r,o,e.sourceSpan)),this._advance()}else this._errors.push(da.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."))},t.prototype._parseExpansionCase=function(){var e=this._advance();if(this._peek.type!==Ys.EXPANSION_CASE_EXP_START)return this._errors.push(da.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 ta(Ys.EOF,[],i.sourceSpan));var o=new t(r,this.getTagDefinition).build();if(o.errors.length>0)return this._errors=this._errors.concat(o.errors),null;var s=new Ho(e.sourceSpan.start,i.sourceSpan.end),a=new Ho(n.sourceSpan.start,i.sourceSpan.end);return new zs(e.parts[0],o.rootNodes,s,e.sourceSpan,a)},t.prototype._collectExpansionExpTokens=function(t){for(var e=[],n=[Ys.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==Ys.EXPANSION_FORM_START&&this._peek.type!==Ys.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===Ys.EXPANSION_CASE_EXP_END){if(!ga(n,Ys.EXPANSION_CASE_EXP_START))return this._errors.push(da.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return e}if(this._peek.type===Ys.EXPANSION_FORM_END){if(!ga(n,Ys.EXPANSION_FORM_START))return this._errors.push(da.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===Ys.EOF)return this._errors.push(da.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;e.push(this._advance())}},t.prototype._consumeText=function(t){var e=t.parts[0];if(e.length>0&&"\n"==e[0]){var n=this._getParentElement();null!=n&&0==n.children.length&&this.getTagDefinition(n.name).ignoreFirstLf&&(e=e.substring(1))}e.length>0&&this._addToParent(new Ks(e,t.sourceSpan))},t.prototype._closeVoidElement=function(){var t=this._getParentElement();t&&this.getTagDefinition(t.name).isVoid&&this._elementStack.pop()},t.prototype._consumeStartTag=function(t){for(var e=t.parts[0],n=t.parts[1],r=[];this._peek.type===Ys.ATTR_NAME;)r.push(this._consumeAttr(this._advance()));var i=this._getElementFullName(e,n,this._getParentElement()),o=!1;if(this._peek.type===Ys.TAG_OPEN_END_VOID){this._advance(),o=!0;var s=this.getTagDefinition(i);s.canSelfClose||null!==g(i)||s.isVoid||this._errors.push(da.create(i,t.sourceSpan,'Only void and foreign elements can be self closed "'+t.parts[1]+'"'))}else this._peek.type===Ys.TAG_OPEN_END&&(this._advance(),o=!1);var a=new Ho(t.sourceSpan.start,this._peek.sourceSpan.start),u=new Gs(i,r,[],a,a,void 0);this._pushElement(u),o&&(this._popElement(i),u.endSourceSpan=a)},t.prototype._pushElement=function(t){var e=this._getParentElement();e&&this.getTagDefinition(e.name).isClosedByChild(t.name)&&this._elementStack.pop();var n=this.getTagDefinition(t.name),r=this._getParentElementSkippingContainers(),i=r.parent,o=r.container;if(i&&n.requireExtraParent(i.name)){var s=new Gs(n.parentToAdd,[],[],t.sourceSpan,t.startSourceSpan,t.endSourceSpan);this._insertBeforeContainer(i,o,s)}this._addToParent(t),this._elementStack.push(t)},t.prototype._consumeEndTag=function(t){var e=this._getElementFullName(t.parts[0],t.parts[1],this._getParentElement());this._getParentElement()&&(this._getParentElement().endSourceSpan=t.sourceSpan),this.getTagDefinition(e).isVoid?this._errors.push(da.create(e,t.sourceSpan,'Void elements do not have end tags "'+t.parts[1]+'"')):this._popElement(e)||this._errors.push(da.create(e,t.sourceSpan,'Unexpected closing tag "'+e+'". 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'))},t.prototype._popElement=function(t){for(var e=this._elementStack.length-1;e>=0;e--){var n=this._elementStack[e];if(n.name==t)return this._elementStack.splice(e,this._elementStack.length-e),!0;if(!this.getTagDefinition(n.name).closedByParent)return!1}return!1},t.prototype._consumeAttr=function(t){var e=_(t.parts[0],t.parts[1]),n=t.sourceSpan.end,r="",i=void 0;if(this._peek.type===Ys.ATTR_VALUE){var o=this._advance();r=o.parts[0],n=o.sourceSpan.end,i=o.sourceSpan}return new Qs(e,r,new Ho(t.sourceSpan.start,n),i)},t.prototype._getParentElement=function(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null},t.prototype._getParentElementSkippingContainers=function(){for(var t=null,e=this._elementStack.length-1;e>=0;e--){if(!v(this._elementStack[e].name))return{parent:this._elementStack[e],container:t};t=this._elementStack[e]}return{parent:null,container:t}},t.prototype._addToParent=function(t){var e=this._getParentElement();null!=e?e.children.push(t):this._rootNodes.push(t)},t.prototype._insertBeforeContainer=function(t,e,n){if(e){if(t){var r=t.children.indexOf(e);t.children[r]=n}else this._rootNodes.push(n);n.children.push(e),this._elementStack.splice(this._elementStack.indexOf(e),0,n)}else this._addToParent(n),this._elementStack.push(n)},t.prototype._getElementFullName=function(t,e,n){return null==t&&null==(t=this.getTagDefinition(e).implicitNamespacePrefix)&&null!=n&&(t=g(n.name)),_(t,e)},t}();function ga(t,e){return t.length>0&&t[t.length-1]===e}
|
|
240
240
|
/**
|
|
241
241
|
* @license
|
|
242
242
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -257,14 +257,14 @@ function n(t){for(var e={},n=0,r=0,i=0,o=0,s=0,a=null,u=!1;n<t.length;)switch(t.
|
|
|
257
257
|
*
|
|
258
258
|
* Use of this source code is governed by an MIT-style license that can be
|
|
259
259
|
* found in the LICENSE file at https://angular.io/license
|
|
260
|
-
*/var Na="boolean",ka="number",Oa="string",Ia="object",Ma=["[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:|"],Ra={class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},Da=function(t){function e(){var e=t.call(this)||this;return e._schema={},Ma.forEach(function(t){var n={},r=h(t.split("|"),2),i=r[0],o=r[1].split(","),s=h(i.split("^"),2),a=s[1];s[0].split(",").forEach(function(t){return e._schema[t.toLowerCase()]=n});var u=a&&e._schema[a.toLowerCase()];u&&Object.keys(u).forEach(function(t){n[t]=u[t]}),o.forEach(function(t){if(t.length>0)switch(t[0]){case"*":break;case"!":n[t.substring(1)]=Na;break;case"#":n[t.substring(1)]=ka;break;case"%":n[t.substring(1)]=Ia;break;default:n[t]=Oa}})}),e}return o(e,t),e.prototype.hasProperty=function(t,e,n){if(n.some(function(t){return"no-errors-schema"===t.name}))return!0;if(t.indexOf("-")>-1){if(v(t)||y(t))return!1;if(n.some(function(t){return"custom-elements"===t.name}))return!0}return!!(this._schema[t.toLowerCase()]||this._schema.unknown)[e]},e.prototype.hasElement=function(t,e){if(e.some(function(t){return"no-errors-schema"===t.name}))return!0;if(t.indexOf("-")>-1){if(v(t)||y(t))return!0;if(e.some(function(t){return"custom-elements"===t.name}))return!0}return!!this._schema[t.toLowerCase()]},e.prototype.securityContext=function(t,e,n){n&&(e=this.getMappedPropName(e)),t=t.toLowerCase(),e=e.toLowerCase();var r=Pa()[t+"|"+e];return r||(r=Pa()["*|"+e])||H.NONE},e.prototype.getMappedPropName=function(t){return Ra[t]||t},e.prototype.getDefaultComponentElementName=function(){return"ng-component"},e.prototype.validateProperty=function(t){return t.toLowerCase().startsWith("on")?{error:!0,msg:"Binding to event property '"+t+"' is disallowed for security reasons, please use ("+t.slice(2)+")=...\nIf '"+t+"' is a directive input, make sure the directive is imported by the current module."}:{error:!1}},e.prototype.validateAttribute=function(t){return t.toLowerCase().startsWith("on")?{error:!0,msg:"Binding to event attribute '"+t+"' is disallowed for security reasons, please use ("+t.slice(2)+")=..."}:{error:!1}},e.prototype.allKnownElementNames=function(){return Object.keys(this._schema)},e.prototype.normalizeAnimationStyleProperty=function(t){return function e(t){return t.replace(_e,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t[1].toUpperCase()})}(t)},e.prototype.normalizeAnimationStyleValue=function(t,e,n){var r="",i=n.toString().trim(),o=null;if(function s(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}
|
|
260
|
+
*/var Na="boolean",ka="number",Oa="string",Ia="object",Ma=["[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:|"],Da={class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},Ra=function(t){function e(){var e=t.call(this)||this;return e._schema={},Ma.forEach(function(t){var n={},r=h(t.split("|"),2),i=r[0],o=r[1].split(","),s=h(i.split("^"),2),a=s[1];s[0].split(",").forEach(function(t){return e._schema[t.toLowerCase()]=n});var u=a&&e._schema[a.toLowerCase()];u&&Object.keys(u).forEach(function(t){n[t]=u[t]}),o.forEach(function(t){if(t.length>0)switch(t[0]){case"*":break;case"!":n[t.substring(1)]=Na;break;case"#":n[t.substring(1)]=ka;break;case"%":n[t.substring(1)]=Ia;break;default:n[t]=Oa}})}),e}return o(e,t),e.prototype.hasProperty=function(t,e,n){if(n.some(function(t){return"no-errors-schema"===t.name}))return!0;if(t.indexOf("-")>-1){if(v(t)||y(t))return!1;if(n.some(function(t){return"custom-elements"===t.name}))return!0}return!!(this._schema[t.toLowerCase()]||this._schema.unknown)[e]},e.prototype.hasElement=function(t,e){if(e.some(function(t){return"no-errors-schema"===t.name}))return!0;if(t.indexOf("-")>-1){if(v(t)||y(t))return!0;if(e.some(function(t){return"custom-elements"===t.name}))return!0}return!!this._schema[t.toLowerCase()]},e.prototype.securityContext=function(t,e,n){n&&(e=this.getMappedPropName(e)),t=t.toLowerCase(),e=e.toLowerCase();var r=Pa()[t+"|"+e];return r||(r=Pa()["*|"+e])||H.NONE},e.prototype.getMappedPropName=function(t){return Da[t]||t},e.prototype.getDefaultComponentElementName=function(){return"ng-component"},e.prototype.validateProperty=function(t){return t.toLowerCase().startsWith("on")?{error:!0,msg:"Binding to event property '"+t+"' is disallowed for security reasons, please use ("+t.slice(2)+")=...\nIf '"+t+"' is a directive input, make sure the directive is imported by the current module."}:{error:!1}},e.prototype.validateAttribute=function(t){return t.toLowerCase().startsWith("on")?{error:!0,msg:"Binding to event attribute '"+t+"' is disallowed for security reasons, please use ("+t.slice(2)+")=..."}:{error:!1}},e.prototype.allKnownElementNames=function(){return Object.keys(this._schema)},e.prototype.normalizeAnimationStyleProperty=function(t){return function e(t){return t.replace(_e,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t[1].toUpperCase()})}(t)},e.prototype.normalizeAnimationStyleValue=function(t,e,n){var r="",i=n.toString().trim(),o=null;if(function s(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}
|
|
261
261
|
/**
|
|
262
262
|
* @license
|
|
263
263
|
* Copyright Google Inc. All Rights Reserved.
|
|
264
264
|
*
|
|
265
265
|
* Use of this source code is governed by an MIT-style license that can be
|
|
266
266
|
* found in the LICENSE file at https://angular.io/license
|
|
267
|
-
*/(t)&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{var a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&(o="Please provide a CSS unit value for "+e+":"+n)}return{error:o,value:i+r}},e}(function La(){}),ja=function(){function t(t,e,n,r,i){if(this._exprParser=t,this._interpolationConfig=e,this._schemaRegistry=n,this.errors=i,this.pipesByName=null,this._usedPipes=new Map,r){var o=new Map;r.forEach(function(t){return o.set(t.name,t)}),this.pipesByName=o}}return t.prototype.getUsedPipes=function(){return Array.from(this._usedPipes.values())},t.prototype.createBoundHostProperties=function(t,e){var n=this;if(t.hostProperties){var r=[];return Object.keys(t.hostProperties).forEach(function(i){var o=t.hostProperties[i];"string"==typeof o?n.parsePropertyBinding(i,o,!0,e,[],r):n._reportError('Value of the host property binding "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",e)}),r}return null},t.prototype.createDirectiveHostPropertyAsts=function(t,e,n){var r=this,i=this.createBoundHostProperties(t,n);return i&&i.map(function(t){return r.createBoundElementProperty(e,t)})},t.prototype.createDirectiveHostEventAsts=function(t,e){var n=this;if(t.hostListeners){var r=[];return Object.keys(t.hostListeners).forEach(function(i){var o=t.hostListeners[i];"string"==typeof o?n.parseEvent(i,o,e,[],r):n._reportError('Value of the host listener "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",e)}),r}return null},t.prototype.parseInterpolation=function(t,e){var n=e.start.toString();try{var r=this._exprParser.parseInterpolation(t,n,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,e),this._checkPipes(r,e),r}catch(t){return this._reportError(""+t,e),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},t.prototype.parseInlineTemplateBinding=function(t,e,n,r,i,o){for(var s=this._parseTemplateBindings(t,e,n),a=0;a<s.length;a++){var u=s[a];u.keyIsVar?o.push(new Fi(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))}},t.prototype._parseTemplateBindings=function(t,e,n){var r=this,i=n.start.toString();try{var o=this._exprParser.parseTemplateBindings(t,e,i);return this._reportExpressionParserErrors(o.errors,n),o.templateBindings.forEach(function(t){t.expression&&r._checkPipes(t.expression,n)}),o.warnings.forEach(function(t){r._reportError(t,n,Fo.WARNING)}),o.templateBindings}catch(t){return this._reportError(""+t,n),[]}},t.prototype.parseLiteralAttr=function(t,e,n,r,i){Va(t)?(t=t.substring(1),e&&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(t,e,n,r,i)):i.push(new Li(t,this._exprParser.wrapLiteralPrimitive(e,""),
|
|
267
|
+
*/(t)&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{var a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&(o="Please provide a CSS unit value for "+e+":"+n)}return{error:o,value:i+r}},e}(function La(){}),ja=function(){function t(t,e,n,r,i){if(this._exprParser=t,this._interpolationConfig=e,this._schemaRegistry=n,this.errors=i,this.pipesByName=null,this._usedPipes=new Map,r){var o=new Map;r.forEach(function(t){return o.set(t.name,t)}),this.pipesByName=o}}return t.prototype.getUsedPipes=function(){return Array.from(this._usedPipes.values())},t.prototype.createBoundHostProperties=function(t,e){var n=this;if(t.hostProperties){var r=[];return Object.keys(t.hostProperties).forEach(function(i){var o=t.hostProperties[i];"string"==typeof o?n.parsePropertyBinding(i,o,!0,e,[],r):n._reportError('Value of the host property binding "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",e)}),r}return null},t.prototype.createDirectiveHostPropertyAsts=function(t,e,n){var r=this,i=this.createBoundHostProperties(t,n);return i&&i.map(function(t){return r.createBoundElementProperty(e,t)})},t.prototype.createDirectiveHostEventAsts=function(t,e){var n=this;if(t.hostListeners){var r=[];return Object.keys(t.hostListeners).forEach(function(i){var o=t.hostListeners[i];"string"==typeof o?n.parseEvent(i,o,e,[],r):n._reportError('Value of the host listener "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",e)}),r}return null},t.prototype.parseInterpolation=function(t,e){var n=e.start.toString();try{var r=this._exprParser.parseInterpolation(t,n,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,e),this._checkPipes(r,e),r}catch(t){return this._reportError(""+t,e),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},t.prototype.parseInlineTemplateBinding=function(t,e,n,r,i,o){for(var s=this._parseTemplateBindings(t,e,n),a=0;a<s.length;a++){var u=s[a];u.keyIsVar?o.push(new Fi(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))}},t.prototype._parseTemplateBindings=function(t,e,n){var r=this,i=n.start.toString();try{var o=this._exprParser.parseTemplateBindings(t,e,i);return this._reportExpressionParserErrors(o.errors,n),o.templateBindings.forEach(function(t){t.expression&&r._checkPipes(t.expression,n)}),o.warnings.forEach(function(t){r._reportError(t,n,Fo.WARNING)}),o.templateBindings}catch(t){return this._reportError(""+t,n),[]}},t.prototype.parseLiteralAttr=function(t,e,n,r,i){Va(t)?(t=t.substring(1),e&&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(t,e,n,r,i)):i.push(new Li(t,this._exprParser.wrapLiteralPrimitive(e,""),Ri.LITERAL_ATTR,n))},t.prototype.parsePropertyBinding=function(t,e,n,r,i,o){var s=!1;t.startsWith("animate-")?(s=!0,t=t.substring("animate-".length)):Va(t)&&(s=!0,t=t.substring(1)),s?this._parseAnimation(t,e,r,i,o):this._parsePropertyAst(t,this._parseBinding(e,n,r),r,i,o)},t.prototype.parsePropertyInterpolation=function(t,e,n,r,i){var o=this.parseInterpolation(e,n);return!!o&&(this._parsePropertyAst(t,o,n,r,i),!0)},t.prototype._parsePropertyAst=function(t,e,n,r,i){r.push([t,e.source]),i.push(new Li(t,e,Ri.DEFAULT,n))},t.prototype._parseAnimation=function(t,e,n,r,i){var o=this._parseBinding(e||"undefined",!1,n);r.push([t,o.source]),i.push(new Li(t,o,Ri.ANIMATION,n))},t.prototype._parseBinding=function(t,e,n){var r=(n&&n.start||"(unknown)").toString();try{var i=e?this._exprParser.parseSimpleBinding(t,r,this._interpolationConfig):this._exprParser.parseBinding(t,r,this._interpolationConfig);return i&&this._reportExpressionParserErrors(i.errors,n),this._checkPipes(i,n),i}catch(t){return this._reportError(""+t,n),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},t.prototype.createBoundElementProperty=function(t,e){if(e.isAnimation)return new Vi(e.name,4,H.NONE,e.expression,null,e.sourceSpan);var n=null,r=void 0,i=null,o=e.name.split("."),s=void 0;if(o.length>1)if("attr"==o[0]){this._validatePropertyOrAttributeName(i=o[1],e.sourceSpan,!0),s=Ba(this._schemaRegistry,t,i,!0);var a=i.indexOf(":");a>-1&&(i=_(i.substring(0,a),i.substring(a+1))),r=1}else"class"==o[0]?(i=o[1],r=2,s=[H.NONE]):"style"==o[0]&&(n=o.length>2?o[2]:null,i=o[1],r=3,s=[H.STYLE]);return null===i&&(i=this._schemaRegistry.getMappedPropName(e.name),s=Ba(this._schemaRegistry,t,i,!1),r=0,this._validatePropertyOrAttributeName(i,e.sourceSpan,!1)),new Vi(i,r,s[0],e.expression,n,e.sourceSpan)},t.prototype.parseEvent=function(t,e,n,r,i){Va(t)?(t=t.substr(1),this._parseAnimationEvent(t,e,n,i)):this._parseRegularEvent(t,e,n,r,i)},t.prototype._parseAnimationEvent=function(t,e,n,r){var i=function o(t,e){return xe(t,".",e)}(t,[t,""]),s=i[0],a=i[1].toLowerCase();if(a)switch(a){case"start":case"done":var u=this._parseAction(e,n);r.push(new ji(s,a,1,u,n));break;default:this._reportError('The provided animation output phase value "'+a+'" for "@'+s+'" is not supported (use start or done)',n)}else this._reportError("The animation trigger output event (@"+s+") is missing its phase value name (start or done are currently supported)",n)},t.prototype._parseRegularEvent=function(t,e,n,r,i){var o=h(be(t,[null,t]),2),s=o[0],a=o[1],u=this._parseAction(e,n);r.push([t,u.source]),i.push(new ji(a,s,0,u,n))},t.prototype._parseAction=function(t,e){var n=(e&&e.start||"(unknown").toString();try{var r=this._exprParser.parseAction(t,n,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,e),!r||r.ast instanceof ui?(this._reportError("Empty expressions are not allowed",e),this._exprParser.wrapLiteralPrimitive("ERROR",n)):(this._checkPipes(r,e),r)}catch(t){return this._reportError(""+t,e),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},t.prototype._reportError=function(t,e,n){void 0===n&&(n=Fo.ERROR),this.errors.push(new qo(e,t,n))},t.prototype._reportExpressionParserErrors=function(t,e){var n,r;try{for(var i=p(t),o=i.next();!o.done;o=i.next())this._reportError(o.value.message,e)}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype._checkPipes=function(t,e){var n=this;if(t&&this.pipesByName){var r=new Fa;t.visit(r),r.pipes.forEach(function(t,r){var i=n.pipesByName.get(r);i?n._usedPipes.set(r,i):n._reportError("The pipe '"+r+"' could not be found",new Ho(e.start.moveBy(t.span.start),e.start.moveBy(t.span.end)))})}},t.prototype._validatePropertyOrAttributeName=function(t,e,n){var r=n?this._schemaRegistry.validateAttribute(t):this._schemaRegistry.validateProperty(t);r.error&&this._reportError(r.msg,e,Fo.ERROR)},t}(),Fa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pipes=new Map,e}return o(e,t),e.prototype.visitPipe=function(t,e){return this.pipes.set(t.name,t),t.exp.visit(this),this.visitAll(t.args,e),null},e}(Oi);
|
|
268
268
|
/**
|
|
269
269
|
* @license
|
|
270
270
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -314,7 +314,7 @@ function n(t){for(var e={},n=0,r=0,i=0,o=0,s=0,a=null,u=!1;n<t.length;)switch(t.
|
|
|
314
314
|
* Use of this source code is governed by an MIT-style license that can be
|
|
315
315
|
* found in the LICENSE file at https://angular.io/license
|
|
316
316
|
*/
|
|
317
|
-
function
|
|
317
|
+
function Du(t,e){t.i18n=e}var Ru=function(){function t(t){this.config=t,this._createI18nMessage=Ou(Ls)}return t.prototype._generateI18nMessage=function(t,e,n){void 0===e&&(e="");var r="string"==typeof e?function i(t){var e,n,r,i,o;if(t){var s=t.indexOf("@@"),a=t.indexOf("|"),u=void 0;u=(e=h(s>-1?[t.slice(0,s),t.slice(s+2)]:[t,""],2))[0],r=e[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}}(e):gr(e),o=this._createI18nMessage(t,r.meaning||"",r.description||"",r.id||"",n);return o.id||(o.id="string"!=typeof e&&e.id||An(o)),o},t.prototype.visitElement=function(t,e){var n,r,i,o;if(function s(t){return t.attrs.some(function(t){return vr(t.name)})}(t)){var a=[],u={};try{for(var c=p(t.attrs),l=c.next();!l.done;l=c.next())if((v=l.value).name===pr){var h=this._generateI18nMessage(t.children,t.i18n||v.value,Du);h.nodes.length&&(t.i18n=h)}else v.name.startsWith(hr)?u[v.name.slice(hr.length)]=v.value:a.push(v)}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}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,y=u[(v=d.value).name];void 0!==y&&v.value&&(v.i18n=this._generateI18nMessage([v],v.i18n||y))}}catch(t){i={error:t}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}this.config.keepI18nAttrs||(t.attrs=a)}return $s(this,t.children),t},t.prototype.visitExpansion=function(t,e){var n,r=t.i18n;if(r instanceof Sn){var i=r.name;_r(n=this._generateI18nMessage([t],r)).name=i}else n=this._generateI18nMessage([t],r);return t.i18n=n,t},t.prototype.visitText=function(t,e){return t},t.prototype.visitAttribute=function(t,e){return t},t.prototype.visitComment=function(t,e){return t},t.prototype.visitExpansionCase=function(t,e){return t},t}(),Lu=function(t){return"{$"+Sr(t)+"}"},ju=new(function(){function t(){}return t.prototype.visitText=function(t,e){return t.value},t.prototype.visitContainer=function(t,e){var n=this;return t.children.map(function(t){return t.visit(n)}).join("")},t.prototype.visitIcu=function(t,e){var n=this,r=Object.keys(t.cases).map(function(e){return e+" {"+t.cases[e].visit(n)+"}"});return"{"+t.expressionPlaceholder+", "+t.type+", "+r.join(" ")+"}"},t.prototype.visitTagPlaceholder=function(t,e){var n=this;return t.isVoid?Lu(t.startName):""+Lu(t.startName)+t.children.map(function(t){return t.visit(n)}).join("")+Lu(t.closeName)},t.prototype.visitPlaceholder=function(t,e){return Lu(t.name)},t.prototype.visitIcuPlaceholder=function(t,e){return Lu(t.name)},t}());
|
|
318
318
|
/**
|
|
319
319
|
* @license
|
|
320
320
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -328,21 +328,21 @@ function Ru(t,e){t.i18n=e}var Du=function(){function t(t){this.config=t,this._cr
|
|
|
328
328
|
*
|
|
329
329
|
* Use of this source code is governed by an MIT-style license that can be
|
|
330
330
|
* found in the LICENSE file at https://angular.io/license
|
|
331
|
-
*/(t),a,s,r);return(i=this.constantPool.statements).push.apply(i,f(u)),o},t.prototype.i18nAppendBindings=function(t){var e=this;if(this.i18n&&t.length){var n=le("ctx");t.forEach(function(t){var r=e.convertExpressionBinding(n,t);e.i18n.appendBinding(r)})}},t.prototype.i18nBindProps=function(t){var e=this,n={};return Object.keys(t).forEach(function(r){var i=t[r];if(i instanceof Ha)n[r]=me(i.value);else{var o=i.value.visit(e._valueConverter);if(o instanceof xi){var s=o.expressions,a=e.i18n,u=function c(t,e,n){if(void 0===e&&(e=0),void 0===n&&(n=0),!t.length)return"";for(var r="",i=t.length-1,o=0;o<i;o++)r+=""+t[o]+br(e+o,n);return r+t[i]}(o.strings,a.bindings.size,a.id);e.i18nAppendBindings(s),n[r]=me(u)}}}),n},t.prototype.i18nAllocateRef=function(){var t=function e(t){return("MSG_"+t).toUpperCase()}(this.fileBasedI18nSuffix);return le(this.constantPool.uniqueName(t))},t.prototype.i18nUpdateRef=function(t){var e=t.icus,n=t.meta;if(t.isRoot&&t.isResolved&&!mr(n)){var r=t.getSerializedPlaceholders(),i={},o=r.size?xr(r):{};e.size&&e.forEach(function(t,e){if(1===t.length)o[e]=t[0];else{var n=br("I18N_EXP_"+e);o[e]=me(n),i[e]=fe(t)}});var s=void 0;(Array.from(r.values()).some(function(t){return t.length>1})||Object.keys(i).length)&&(s=function(t){var e=[t];return Object.keys(i).length&&e.push(ur(i,!0)),Uu(null,mn.i18nPostprocess,e)}),this.i18nTranslate(n,o,t.ref,s)}},t.prototype.i18nStart=function(t,e,n){void 0===t&&(t=null);var r=this.allocateDataSlot();if(this.i18nContext)this.i18n=this.i18nContext.forkChildContext(r,this.templateIndex,e);else{var i=this.i18nAllocateRef();this.i18n=new Eu(r,i,0,this.templateIndex,e)}var o=this.i18n,s=o.id,a=o.ref,u=[me(r),a];s>0&&u.push(me(s)),this.creationInstruction(t,n?mn.i18n:mn.i18nStart,u)},t.prototype.i18nEnd=function(t,e){var n=this;if(void 0===t&&(t=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(e){return n.updateInstruction(t,mn.i18nExp,[e])}),this.updateInstruction(t,mn.i18nApply,[me(i)])),e||this.creationInstruction(t,mn.i18nEnd),this.i18n=null},t.prototype.visitContent=function(t){var e=this.allocateDataSlot(),n=t.selectorIndex,r=[me(e)],i=[];t.attributes.forEach(function(t){var e=t.name;"select"!==e&&i.push(e,t.value)}),i.length>0?r.push(me(n),kr(i)):0!==n&&r.push(me(n)),this.creationInstruction(t.sourceSpan,mn.projection,r)},t.prototype.getNamespaceInstruction=function(t){switch(t){case"math":return mn.namespaceMathML;case"svg":return mn.namespaceSVG;default:return mn.namespaceHTML}},t.prototype.addNamespaceInstruction=function(t,e){this._namespace=t,this.creationInstruction(e.sourceSpan,t)},t.prototype.visitElement=function(t){var e,n,r=this,i=this.allocateDataSlot(),o=new _s(me(i),null),s=!1,a=yr(t.i18n);if(a&&this.i18n)throw new Error("Could not mark an element as translatable inside of a translatable section");var u=[],c=[],l=h(d(t.name),2),y=l[0],m=l[1],g=v(t.name);try{for(var _=p(t.attributes),b=_.next();!b.done;b=_.next()){var x=b.value,w=x.name,E=x.value;"ngNonBindable"===w?s=!0:"style"==w?o.registerStyleAttr(E):"class"==w?o.registerClassAttr(E):x.i18n?u.push(x):c.push(x)}}catch(t){e={error:t}}finally{try{b&&!b.done&&(n=_.return)&&n.call(_)}finally{if(e)throw e.error}}this.matchDirectives(t.name,t);var S=[me(i)];g||S.push(me(m));var C=[],T=[];t.inputs.forEach(function(t){o.registerBoundInput(t)||(0==t.type&&t.i18n?u.push(t):T.push(t))}),c.forEach(function(t){return C.push(me(t.name),me(t.value))}),C.push.apply(C,f(this.prepareSyntheticAndSelectOnlyAttrs(T,t.outputs))),S.push(this.toAttrsParam(C)),S.push(this.prepareRefsParameter(t.references));var P=this._namespace,A=this.getNamespaceInstruction(y);A!==P&&this.addNamespaceInstruction(A,t);var N=le("ctx");this.i18n&&this.i18n.appendElement(t.i18n,i);var k=!o.hasBindingsOrInitialValues&&!g&&0===t.outputs.length&&0===u.length&&!(!a&&r.i18n?!Yu(t.children):t.children.length>0),O=!k&&Yu(t.children);if(k)this.creationInstruction(t.sourceSpan,mn.element,Ir(S));else{if(this.creationInstruction(t.sourceSpan,g?mn.elementContainerStart:mn.elementStart,Ir(S)),s&&this.creationInstruction(t.sourceSpan,mn.disableBindings),a&&this.i18nStart(t.sourceSpan,t.i18n,O),u.length){var I=!1,M=[];if(u.forEach(function(e){var n=e.i18n;if(e instanceof Ua)M.push(me(e.name),r.i18nTranslate(n));else{var i=e.value.visit(r._valueConverter);if(i instanceof xi){var o=xr(Er(n));M.push(me(e.name),r.i18nTranslate(n,o)),i.expressions.forEach(function(e){I=!0;var n=r.convertExpressionBinding(N,e);r.updateInstruction(t.sourceSpan,mn.i18nExp,[n])})}}}),M.length){var R=me(this.allocateDataSlot()),D=this.constantPool.getConstLiteral(fe(M),!0);this.creationInstruction(t.sourceSpan,mn.i18nAttributes,[R,D]),I&&this.updateInstruction(t.sourceSpan,mn.i18nApply,[R])}}this.processStylingInstruction(N,o.buildCreateLevelInstruction(t.sourceSpan,this.constantPool),!0),t.outputs.forEach(function(e){r.creationInstruction(e.sourceSpan,mn.listener,r.prepareListenerParameter(t.name,e))})}if(o.buildUpdateLevelInstructions(this._valueConverter).forEach(function(t){r.processStylingInstruction(N,t,!1)}),T.forEach(function(t){var e=function n(t){switch(t){case 0:return mn.elementProperty;case 2:return mn.elementClassProp;case 1:case 4:return mn.elementAttribute;default:return}}(t.type);if(4===t.type){var o=t.value.visit(r._valueConverter);if(o.name||o.value){var s=Xu(t.name);r.updateInstruction(t.sourceSpan,mn.elementAttribute,function(){return[me(i),me(s),r.convertPropertyBinding(N,o)]})}}else if(e){var a=[],u=function c(t,e){switch(e){case H.HTML:return pe(mn.sanitizeHtml);case H.SCRIPT:return pe(mn.sanitizeScript);case H.STYLE:return 1===t.type?pe(mn.sanitizeStyle):null;case H.URL:return pe(mn.sanitizeUrl);case H.RESOURCE_URL:return pe(mn.sanitizeResourceUrl);default:return null}}(t,t.securityContext);u&&a.push(u);var l=t.value.visit(r._valueConverter);r.allocateBindingSlots(l),r.updateInstruction(t.sourceSpan,e,function(){return f([me(i),me(t.name),r.convertPropertyBinding(N,l)],a)})}else r._unsupported("binding type "+t.type)}),Za(this,t.children),!a&&this.i18n&&this.i18n.appendElement(t.i18n,i,!0),!k){var L=t.endSourceSpan||t.sourceSpan;a&&this.i18nEnd(L,O),s&&this.creationInstruction(L,mn.enableBindings),this.creationInstruction(L,g?mn.elementContainerEnd:mn.elementEnd)}},t.prototype.visitTemplate=function(e){var n=this,r=this.allocateDataSlot();this.i18n&&this.i18n.appendTemplate(e.i18n,r);var i="";$u(e.children)&&(i=tn(e.children[0].name));var o=i?this.contextName+"_"+i:"",s=o?o+"_Template_"+r:"Template_"+r,a=[me(r),le(s),Gt];this.matchDirectives("ng-template",e);var u=[];e.attributes.forEach(function(t){u.push(kr(t.name),kr(t.value))}),u.push.apply(u,f(this.prepareSyntheticAndSelectOnlyAttrs(e.inputs,e.outputs))),a.push(this.toAttrsParam(u)),e.references&&e.references.length&&(a.push(this.prepareRefsParameter(e.references)),a.push(pe(mn.templateRefExtractor)));var c=le("ctx");e.inputs.forEach(function(t){var i=t.value.visit(n._valueConverter);n.allocateBindingSlots(i),n.updateInstruction(e.sourceSpan,mn.elementProperty,function(){return[me(r),me(t.name),n.convertPropertyBinding(c,i)]})});var l=new t(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._nestedTemplateFns.push(function(){var t=l.buildTemplateFunction(e.children,e.variables,!1,[],e.i18n);n.constantPool.statements.push(t.toDeclStmt(s,null))}),this.creationInstruction(e.sourceSpan,mn.templateCreate,function(){return a.splice(2,0,me(l.getConstCount()),me(l.getVarCount())),Ir(a)}),e.outputs.forEach(function(t){n.creationInstruction(t.sourceSpan,mn.listener,n.prepareListenerParameter("ng_template",t))})},t.prototype.visitBoundText=function(t){var e=this;if(this.i18n){var n=t.value.visit(this._valueConverter);n instanceof xi&&(this.i18n.appendBoundText(t.i18n),this.i18nAppendBindings(n.expressions))}else{var r=this.allocateDataSlot();this.creationInstruction(t.sourceSpan,mn.text,[me(r)]);var i=t.value.visit(this._valueConverter);this.allocateBindingSlots(i),this.updateInstruction(t.sourceSpan,mn.textBinding,function(){return[me(r),e.convertPropertyBinding(le("ctx"),i)]})}},t.prototype.visitText=function(t){this.i18n||this.creationInstruction(t.sourceSpan,mn.text,[me(this.allocateDataSlot()),me(t.value)])},t.prototype.visitIcu=function(t){var e=!1;this.i18n||(e=!0,this.i18nStart(null,t.i18n,!0));var n=this.i18n,r=this.i18nBindProps(t.vars),i=this.i18nBindProps(t.placeholders),o=t.i18n,s=function(t){return Uu(null,mn.i18nPostprocess,[t,ur(r,!0)])};if(mr(n.meta))this.i18nTranslate(o,i,n.ref,s);else{var a=this.i18nTranslate(o,i,void 0,s);n.appendIcu(_r(o).name,a)}return e&&this.i18nEnd(null,!0),null},t.prototype.allocateDataSlot=function(){return this._dataIndex++},t.prototype.getConstCount=function(){return this._dataIndex},t.prototype.getVarCount=function(){return this._pureFunctionSlots},t.prototype.bindingContext=function(){return""+this._bindingContext++},t.prototype.instructionFn=function(t,e,n,r){t.push(function(){var t=Array.isArray(r)?r:r();return Uu(e,n,t).toStmt()})},t.prototype.processStylingInstruction=function(t,e,n){var r=this;if(e){var i=function(){return e.buildParams(function(e){return r.convertPropertyBinding(t,e,!0)})};n?this.creationInstruction(e.sourceSpan,e.reference,i):this.updateInstruction(e.sourceSpan,e.reference,i)}},t.prototype.creationInstruction=function(t,e,n){this.instructionFn(this._creationCodeFns,t,e,n||[])},t.prototype.updateInstruction=function(t,e,n){this.instructionFn(this._updateCodeFns,t,e,n||[])},t.prototype.allocatePureFunctionSlots=function(t){var e=this._pureFunctionSlots;return this._pureFunctionSlots+=t,e},t.prototype.allocateBindingSlots=function(t){this._bindingSlots+=t instanceof xi?t.expressions.length:1},t.prototype.convertExpressionBinding=function(t,e){var n=zi(this,t,e,this.bindingContext(),Ui.TrySimple).currValExpr;return pe(mn.bind).callFn([n])},t.prototype.convertPropertyBinding=function(t,e,n){var r,i=e instanceof xi?Qu:function(){return Pe("Unexpected interpolation")},o=zi(this,t,e,this.bindingContext(),Ui.TrySimple,i);(r=this._tempVariables).push.apply(r,f(o.stmts));var s=o.currValExpr;return e instanceof xi||n?s:pe(mn.bind).callFn([s])},t.prototype.matchDirectives=function(t,e){var n=this;if(this.directiveMatcher){var r=function o(t,e){var n=new N;return n.setElement(t),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];n.addAttribute(t,r),"class"===t.toLowerCase()&&r.trim().split(/\s+/g).forEach(function(t){return n.addClassName(t)})}),n}(t,function i(t){var e={};return t.attributes.forEach(function(t){vr(t.name)||(e[t.name]=t.value)}),t.inputs.forEach(function(t){e[t.name]=""}),t.outputs.forEach(function(t){e[t.name]=""}),e}
|
|
331
|
+
*/(t),a,s,r);return(i=this.constantPool.statements).push.apply(i,f(u)),o},t.prototype.i18nAppendBindings=function(t){var e=this;if(this.i18n&&t.length){var n=le("ctx");t.forEach(function(t){var r=e.convertExpressionBinding(n,t);e.i18n.appendBinding(r)})}},t.prototype.i18nBindProps=function(t){var e=this,n={};return Object.keys(t).forEach(function(r){var i=t[r];if(i instanceof Ha)n[r]=me(i.value);else{var o=i.value.visit(e._valueConverter);if(o instanceof xi){var s=o.expressions,a=e.i18n,u=function c(t,e,n){if(void 0===e&&(e=0),void 0===n&&(n=0),!t.length)return"";for(var r="",i=t.length-1,o=0;o<i;o++)r+=""+t[o]+br(e+o,n);return r+t[i]}(o.strings,a.bindings.size,a.id);e.i18nAppendBindings(s),n[r]=me(u)}}}),n},t.prototype.i18nAllocateRef=function(){var t=function e(t){return("MSG_"+t).toUpperCase()}(this.fileBasedI18nSuffix);return le(this.constantPool.uniqueName(t))},t.prototype.i18nUpdateRef=function(t){var e=t.icus,n=t.meta;if(t.isRoot&&t.isResolved&&!mr(n)){var r=t.getSerializedPlaceholders(),i={},o=r.size?xr(r):{};e.size&&e.forEach(function(t,e){if(1===t.length)o[e]=t[0];else{var n=br("I18N_EXP_"+e);o[e]=me(n),i[e]=fe(t)}});var s=void 0;(Array.from(r.values()).some(function(t){return t.length>1})||Object.keys(i).length)&&(s=function(t){var e=[t];return Object.keys(i).length&&e.push(ur(i,!0)),Uu(null,mn.i18nPostprocess,e)}),this.i18nTranslate(n,o,t.ref,s)}},t.prototype.i18nStart=function(t,e,n){void 0===t&&(t=null);var r=this.allocateDataSlot();if(this.i18nContext)this.i18n=this.i18nContext.forkChildContext(r,this.templateIndex,e);else{var i=this.i18nAllocateRef();this.i18n=new Eu(r,i,0,this.templateIndex,e)}var o=this.i18n,s=o.id,a=o.ref,u=[me(r),a];s>0&&u.push(me(s)),this.creationInstruction(t,n?mn.i18n:mn.i18nStart,u)},t.prototype.i18nEnd=function(t,e){var n=this;if(void 0===t&&(t=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(e){return n.updateInstruction(t,mn.i18nExp,[e])}),this.updateInstruction(t,mn.i18nApply,[me(i)])),e||this.creationInstruction(t,mn.i18nEnd),this.i18n=null},t.prototype.visitContent=function(t){var e=this.allocateDataSlot(),n=t.selectorIndex,r=[me(e)],i=[];t.attributes.forEach(function(t){var e=t.name;"select"!==e&&i.push(e,t.value)}),i.length>0?r.push(me(n),kr(i)):0!==n&&r.push(me(n)),this.creationInstruction(t.sourceSpan,mn.projection,r)},t.prototype.getNamespaceInstruction=function(t){switch(t){case"math":return mn.namespaceMathML;case"svg":return mn.namespaceSVG;default:return mn.namespaceHTML}},t.prototype.addNamespaceInstruction=function(t,e){this._namespace=t,this.creationInstruction(e.sourceSpan,t)},t.prototype.visitElement=function(t){var e,n,r=this,i=this.allocateDataSlot(),o=new _s(me(i),null),s=!1,a=yr(t.i18n);if(a&&this.i18n)throw new Error("Could not mark an element as translatable inside of a translatable section");var u=[],c=[],l=h(d(t.name),2),y=l[0],m=l[1],g=v(t.name);try{for(var _=p(t.attributes),b=_.next();!b.done;b=_.next()){var x=b.value,w=x.name,E=x.value;"ngNonBindable"===w?s=!0:"style"==w?o.registerStyleAttr(E):"class"==w?o.registerClassAttr(E):x.i18n?u.push(x):c.push(x)}}catch(t){e={error:t}}finally{try{b&&!b.done&&(n=_.return)&&n.call(_)}finally{if(e)throw e.error}}this.matchDirectives(t.name,t);var S=[me(i)];g||S.push(me(m));var C=[],T=[];t.inputs.forEach(function(t){o.registerBoundInput(t)||(0==t.type&&t.i18n?u.push(t):T.push(t))}),c.forEach(function(t){return C.push(me(t.name),me(t.value))}),C.push.apply(C,f(this.prepareSyntheticAndSelectOnlyAttrs(T,t.outputs))),S.push(this.toAttrsParam(C)),S.push(this.prepareRefsParameter(t.references));var P=this._namespace,A=this.getNamespaceInstruction(y);A!==P&&this.addNamespaceInstruction(A,t);var N=le("ctx");this.i18n&&this.i18n.appendElement(t.i18n,i);var k=!o.hasBindingsOrInitialValues&&!g&&0===t.outputs.length&&0===u.length&&!(!a&&r.i18n?!Yu(t.children):t.children.length>0),O=!k&&Yu(t.children);if(k)this.creationInstruction(t.sourceSpan,mn.element,Ir(S));else{if(this.creationInstruction(t.sourceSpan,g?mn.elementContainerStart:mn.elementStart,Ir(S)),s&&this.creationInstruction(t.sourceSpan,mn.disableBindings),a&&this.i18nStart(t.sourceSpan,t.i18n,O),u.length){var I=!1,M=[];if(u.forEach(function(e){var n=e.i18n;if(e instanceof Ua)M.push(me(e.name),r.i18nTranslate(n));else{var i=e.value.visit(r._valueConverter);if(i instanceof xi){var o=xr(Er(n));M.push(me(e.name),r.i18nTranslate(n,o)),i.expressions.forEach(function(e){I=!0;var n=r.convertExpressionBinding(N,e);r.updateInstruction(t.sourceSpan,mn.i18nExp,[n])})}}}),M.length){var D=me(this.allocateDataSlot()),R=this.constantPool.getConstLiteral(fe(M),!0);this.creationInstruction(t.sourceSpan,mn.i18nAttributes,[D,R]),I&&this.updateInstruction(t.sourceSpan,mn.i18nApply,[D])}}this.processStylingInstruction(N,o.buildCreateLevelInstruction(t.sourceSpan,this.constantPool),!0),t.outputs.forEach(function(e){r.creationInstruction(e.sourceSpan,mn.listener,r.prepareListenerParameter(t.name,e))})}if(o.buildUpdateLevelInstructions(this._valueConverter).forEach(function(t){r.processStylingInstruction(N,t,!1)}),T.forEach(function(t){var e=function n(t){switch(t){case 0:return mn.elementProperty;case 2:return mn.elementClassProp;case 1:case 4:return mn.elementAttribute;default:return}}(t.type);if(4===t.type){var o=t.value.visit(r._valueConverter);if(o.name||o.value){var s=Xu(t.name);r.updateInstruction(t.sourceSpan,mn.elementAttribute,function(){return[me(i),me(s),r.convertPropertyBinding(N,o)]})}}else if(e){var a=[],u=function c(t,e){switch(e){case H.HTML:return pe(mn.sanitizeHtml);case H.SCRIPT:return pe(mn.sanitizeScript);case H.STYLE:return 1===t.type?pe(mn.sanitizeStyle):null;case H.URL:return pe(mn.sanitizeUrl);case H.RESOURCE_URL:return pe(mn.sanitizeResourceUrl);default:return null}}(t,t.securityContext);u&&a.push(u);var l=t.value.visit(r._valueConverter);r.allocateBindingSlots(l),r.updateInstruction(t.sourceSpan,e,function(){return f([me(i),me(t.name),r.convertPropertyBinding(N,l)],a)})}else r._unsupported("binding type "+t.type)}),Za(this,t.children),!a&&this.i18n&&this.i18n.appendElement(t.i18n,i,!0),!k){var L=t.endSourceSpan||t.sourceSpan;a&&this.i18nEnd(L,O),s&&this.creationInstruction(L,mn.enableBindings),this.creationInstruction(L,g?mn.elementContainerEnd:mn.elementEnd)}},t.prototype.visitTemplate=function(e){var n=this,r=this.allocateDataSlot();this.i18n&&this.i18n.appendTemplate(e.i18n,r);var i="";$u(e.children)&&(i=tn(e.children[0].name));var o=i?this.contextName+"_"+i:"",s=o?o+"_Template_"+r:"Template_"+r,a=[me(r),le(s),Gt];this.matchDirectives("ng-template",e);var u=[];e.attributes.forEach(function(t){u.push(kr(t.name),kr(t.value))}),u.push.apply(u,f(this.prepareSyntheticAndSelectOnlyAttrs(e.inputs,e.outputs))),a.push(this.toAttrsParam(u)),e.references&&e.references.length&&(a.push(this.prepareRefsParameter(e.references)),a.push(pe(mn.templateRefExtractor)));var c=le("ctx");e.inputs.forEach(function(t){var i=t.value.visit(n._valueConverter);n.allocateBindingSlots(i),n.updateInstruction(e.sourceSpan,mn.elementProperty,function(){return[me(r),me(t.name),n.convertPropertyBinding(c,i)]})});var l=new t(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._nestedTemplateFns.push(function(){var t=l.buildTemplateFunction(e.children,e.variables,!1,[],e.i18n);n.constantPool.statements.push(t.toDeclStmt(s,null))}),this.creationInstruction(e.sourceSpan,mn.templateCreate,function(){return a.splice(2,0,me(l.getConstCount()),me(l.getVarCount())),Ir(a)}),e.outputs.forEach(function(t){n.creationInstruction(t.sourceSpan,mn.listener,n.prepareListenerParameter("ng_template",t))})},t.prototype.visitBoundText=function(t){var e=this;if(this.i18n){var n=t.value.visit(this._valueConverter);n instanceof xi&&(this.i18n.appendBoundText(t.i18n),this.i18nAppendBindings(n.expressions))}else{var r=this.allocateDataSlot();this.creationInstruction(t.sourceSpan,mn.text,[me(r)]);var i=t.value.visit(this._valueConverter);this.allocateBindingSlots(i),this.updateInstruction(t.sourceSpan,mn.textBinding,function(){return[me(r),e.convertPropertyBinding(le("ctx"),i)]})}},t.prototype.visitText=function(t){this.i18n||this.creationInstruction(t.sourceSpan,mn.text,[me(this.allocateDataSlot()),me(t.value)])},t.prototype.visitIcu=function(t){var e=!1;this.i18n||(e=!0,this.i18nStart(null,t.i18n,!0));var n=this.i18n,r=this.i18nBindProps(t.vars),i=this.i18nBindProps(t.placeholders),o=t.i18n,s=function(t){return Uu(null,mn.i18nPostprocess,[t,ur(r,!0)])};if(mr(n.meta))this.i18nTranslate(o,i,n.ref,s);else{var a=this.i18nTranslate(o,i,void 0,s);n.appendIcu(_r(o).name,a)}return e&&this.i18nEnd(null,!0),null},t.prototype.allocateDataSlot=function(){return this._dataIndex++},t.prototype.getConstCount=function(){return this._dataIndex},t.prototype.getVarCount=function(){return this._pureFunctionSlots},t.prototype.bindingContext=function(){return""+this._bindingContext++},t.prototype.instructionFn=function(t,e,n,r){t.push(function(){var t=Array.isArray(r)?r:r();return Uu(e,n,t).toStmt()})},t.prototype.processStylingInstruction=function(t,e,n){var r=this;if(e){var i=function(){return e.buildParams(function(e){return r.convertPropertyBinding(t,e,!0)})};n?this.creationInstruction(e.sourceSpan,e.reference,i):this.updateInstruction(e.sourceSpan,e.reference,i)}},t.prototype.creationInstruction=function(t,e,n){this.instructionFn(this._creationCodeFns,t,e,n||[])},t.prototype.updateInstruction=function(t,e,n){this.instructionFn(this._updateCodeFns,t,e,n||[])},t.prototype.allocatePureFunctionSlots=function(t){var e=this._pureFunctionSlots;return this._pureFunctionSlots+=t,e},t.prototype.allocateBindingSlots=function(t){this._bindingSlots+=t instanceof xi?t.expressions.length:1},t.prototype.convertExpressionBinding=function(t,e){var n=zi(this,t,e,this.bindingContext(),Ui.TrySimple).currValExpr;return pe(mn.bind).callFn([n])},t.prototype.convertPropertyBinding=function(t,e,n){var r,i=e instanceof xi?Qu:function(){return Pe("Unexpected interpolation")},o=zi(this,t,e,this.bindingContext(),Ui.TrySimple,i);(r=this._tempVariables).push.apply(r,f(o.stmts));var s=o.currValExpr;return e instanceof xi||n?s:pe(mn.bind).callFn([s])},t.prototype.matchDirectives=function(t,e){var n=this;if(this.directiveMatcher){var r=function o(t,e){var n=new N;return n.setElement(t),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];n.addAttribute(t,r),"class"===t.toLowerCase()&&r.trim().split(/\s+/g).forEach(function(t){return n.addClassName(t)})}),n}(t,function i(t){var e={};return t.attributes.forEach(function(t){vr(t.name)||(e[t.name]=t.value)}),t.inputs.forEach(function(t){e[t.name]=""}),t.outputs.forEach(function(t){e[t.name]=""}),e}
|
|
332
332
|
/**
|
|
333
333
|
* @license
|
|
334
334
|
* Copyright Google Inc. All Rights Reserved.
|
|
335
335
|
*
|
|
336
336
|
* Use of this source code is governed by an MIT-style license that can be
|
|
337
337
|
* found in the LICENSE file at https://angular.io/license
|
|
338
|
-
*/(e));this.directiveMatcher.match(r,function(t,e){n.directives.add(e)})}},t.prototype.prepareSyntheticAndSelectOnlyAttrs=function(t,e){var n=[],r=[];if(t.length){var i=kr("");t.forEach(function(t){4===t.type?n.push(kr(Xu(t.name)),i):r.push(t)})}return(r.length||e.length)&&(n.push(me(1)),r.forEach(function(t){return n.push(kr(t.name))}),e.forEach(function(t){return n.push(kr(t.name))})),n},t.prototype.toAttrsParam=function(t){return t.length>0?this.constantPool.getConstLiteral(fe(t),!0):Gt},t.prototype.prepareRefsParameter=function(t){var e=this;if(!t||0===t.length)return Gt;var n=vn(t.map(function(t){var n=e.allocateDataSlot(),r=e._bindingScope.freshReferenceName(),i=e.level,o=le(r);return e._bindingScope.set(i,t.name,o,0,function(t,e){var r=e>0?[Ku(e).toStmt()]:[],i=o.set(pe(mn.reference).callFn([me(n)]));return r.concat(i.toConstDecl())},!0),[t.name,t.value]}));return this.constantPool.getConstLiteral(kr(n),!0)},t.prototype.prepareListenerParameter=function(t,e){var n=this,r=tn(e.name),i=tn(t),o=this.templateName+"_"+i+"_"+r+"_listener";return function(){var t=n._bindingScope.nestedScope(n._bindingScope.bindingLevel),r=qi(t,le("ctx"),e.handler,"b",function(){return Pe("Unexpected interpolation")}),i=f(t.restoreViewStatement(),t.variableDeclarations(),r.render3Stmts),s=ve([new Ft("$event",ht)],i,ft,null,o);return[me(e.name),s]}},t}(),Bu=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.constantPool=e,o.allocateSlot=n,o.allocatePureFunctionSlots=r,o.definePipe=i,o._pipeBindExprs=[],o}return o(e,t),e.prototype.visitPipe=function(t,e){var n=this.allocateSlot(),r="PIPE:"+n,i=this.allocatePureFunctionSlots(2+t.args.length),o=new hi(t.span,new ci(t.span),r),s=function a(t){var e=Hu[t.length];return{identifier:e||mn.pipeBindV,isVarLength:!e}}(t.args),u=s.isVarLength;this.definePipe(t.name,r,n,pe(s.identifier));var c=f([t.exp],t.args),l=this.visitAll(u?[new _i(t.span,c)]:c),p=new Pi(t.span,o,f([new gi(t.span,n),new gi(t.span,i)],l));return this._pipeBindExprs.push(p),p},e.prototype.updatePipeSlotOffsets=function(t){this._pipeBindExprs.forEach(function(e){e.args[1].value+=t})},e.prototype.visitLiteralArray=function(t,e){var n=this;return new eo(t.span,this.visitAll(t.expressions),function(t){var e=fe(t);return t.every(function(t){return t.isConstant()})?n.constantPool.getConstLiteral(e,!0):Wu(n.constantPool,e,n.allocatePureFunctionSlots)})},e.prototype.visitLiteralMap=function(t,e){var n=this;return new eo(t.span,this.visitAll(t.values),function(e){var r=de(e.map(function(e,n){return{key:t.keys[n].key,value:e,quoted:t.keys[n].quoted}}));return e.every(function(t){return t.isConstant()})?n.constantPool.getConstLiteral(r,!0):Wu(n.constantPool,r,n.allocatePureFunctionSlots)})},e}(Mi),Hu=[mn.pipeBind1,mn.pipeBind2,mn.pipeBind3,mn.pipeBind4],qu=[mn.pureFunction0,mn.pureFunction1,mn.pureFunction2,mn.pureFunction3,mn.pureFunction4,mn.pureFunction5,mn.pureFunction6,mn.pureFunction7,mn.pureFunction8];function Uu(t,e,n){return pe(e,null,t).callFn(n,t)}function Ku(t){return pe(mn.nextContext).callFn(t>1?[me(t)]:[])}function Wu(t,e,n){var r=t.getLiteralFactory(e),i=r.literalFactory,o=r.literalFactoryArguments,s=n(1+o.length);o.length>0||Pe("Expected arguments to a literal factory function");var a=function u(t){var e=qu[t.length];return{identifier:e||mn.pureFunctionV,isVarLength:!e}}(o),c=a.identifier,l=a.isVarLength,p=[me(s),i];return l?p.push(fe(o)):p.push.apply(p,f(o)),pe(c).callFn(p)}var zu=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=null),this.bindingLevel=t,this.parent=e,this.map=new Map,this.referenceNameIndex=0,this.restoreViewVariable=null}return Object.defineProperty(t,"ROOT_SCOPE",{get:function(){return t._ROOT_SCOPE||(t._ROOT_SCOPE=(new t).set(0,"$event",le("$event"))),t._ROOT_SCOPE},enumerable:!0,configurable:!0}),t.prototype.get=function(t){for(var e=this;e;){var n=e.map.get(t);if(null!=n)return e!==this&&(this.map.set(t,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;e=e.parent}return 0===this.bindingLevel?null:this.getComponentProperty(t)},t.prototype.set=function(t,e,n,r,i,o){return void 0===r&&(r=0),!this.map.has(e)||Pe("The name "+e+" is already defined in scope to be "+this.map.get(e)),this.map.set(e,{retrievalLevel:t,lhs:n,declare:!1,declareLocalCallback:i,priority:r,localRef:o||!1}),this},t.prototype.getLocal=function(t){return this.get(t)},t.prototype.nestedScope=function(e){var n=new t(e,this);return e>0&&n.generateSharedContextVar(0),n},t.prototype.getSharedContextName=function(t){var e=this.map.get("$$shared_ctx$$"+t);return e&&e.declare?e.lhs:null},t.prototype.maybeGenerateSharedContextVar=function(t){if(1===t.priority){var e=this.map.get("$$shared_ctx$$"+t.retrievalLevel);e?e.declare=!0:this.generateSharedContextVar(t.retrievalLevel)}},t.prototype.generateSharedContextVar=function(t){var e=le("ctx"+this.freshReferenceName());this.map.set("$$shared_ctx$$"+t,{retrievalLevel:t,lhs:e,declareLocalCallback:function(t,n){return[e.set(Ku(n)).toConstDecl()]},declare:!1,priority:2,localRef:!1})},t.prototype.getComponentProperty=function(t){var e=this.map.get("$$shared_ctx$$0");return e.declare=!0,this.maybeRestoreView(0,!1),e.lhs.prop(t)},t.prototype.maybeRestoreView=function(t,e){this.isListenerScope()&&(t<this.bindingLevel||e)&&(this.parent.restoreViewVariable||(this.parent.restoreViewVariable=le(this.parent.freshReferenceName())),this.restoreViewVariable=this.parent.restoreViewVariable)},t.prototype.restoreViewStatement=function(){return this.restoreViewVariable?[Uu(null,mn.restoreView,[this.restoreViewVariable]).toStmt()]:[]},t.prototype.viewSnapshotStatements=function(){var t=Uu(null,mn.getCurrentView,[]);return this.restoreViewVariable?[this.restoreViewVariable.set(t).toConstDecl()]:[]},t.prototype.isListenerScope=function(){return this.parent&&this.parent.bindingLevel===this.bindingLevel},t.prototype.variableDeclarations=function(){var t=this,e=0;return Array.from(this.map.values()).filter(function(t){return t.declare}).sort(function(t,e){return e.retrievalLevel-t.retrievalLevel||e.priority-t.priority}).reduce(function(n,r){var i=t.bindingLevel-r.retrievalLevel,o=r.declareLocalCallback(t,i-e);return e=i,n.concat(o)},[])},t.prototype.freshReferenceName=function(){for(var t=this;t.parent;)t=t.parent;return"_r"+t.referenceNameIndex++},t}();function Qu(t){switch((t=t.slice(1)).length){case 3:return pe(mn.interpolation1).callFn(t);case 5:return pe(mn.interpolation2).callFn(t);case 7:return pe(mn.interpolation3).callFn(t);case 9:return pe(mn.interpolation4).callFn(t);case 11:return pe(mn.interpolation5).callFn(t);case 13:return pe(mn.interpolation6).callFn(t);case 15:return pe(mn.interpolation7).callFn(t);case 17:return pe(mn.interpolation8).callFn(t)}return t.length>=19&&t.length%2==1||Pe("Invalid interpolation argument length "+t.length),pe(mn.interpolationV).callFn([fe(t)])}function Gu(){return new ja(new Bs(new Es),Ls,new
|
|
338
|
+
*/(e));this.directiveMatcher.match(r,function(t,e){n.directives.add(e)})}},t.prototype.prepareSyntheticAndSelectOnlyAttrs=function(t,e){var n=[],r=[];if(t.length){var i=kr("");t.forEach(function(t){4===t.type?n.push(kr(Xu(t.name)),i):r.push(t)})}return(r.length||e.length)&&(n.push(me(1)),r.forEach(function(t){return n.push(kr(t.name))}),e.forEach(function(t){return n.push(kr(t.name))})),n},t.prototype.toAttrsParam=function(t){return t.length>0?this.constantPool.getConstLiteral(fe(t),!0):Gt},t.prototype.prepareRefsParameter=function(t){var e=this;if(!t||0===t.length)return Gt;var n=vn(t.map(function(t){var n=e.allocateDataSlot(),r=e._bindingScope.freshReferenceName(),i=e.level,o=le(r);return e._bindingScope.set(i,t.name,o,0,function(t,e){var r=e>0?[Ku(e).toStmt()]:[],i=o.set(pe(mn.reference).callFn([me(n)]));return r.concat(i.toConstDecl())},!0),[t.name,t.value]}));return this.constantPool.getConstLiteral(kr(n),!0)},t.prototype.prepareListenerParameter=function(t,e){var n=this,r=tn(e.name),i=tn(t),o=this.templateName+"_"+i+"_"+r+"_listener";return function(){var t=n._bindingScope.nestedScope(n._bindingScope.bindingLevel),r=qi(t,le("ctx"),e.handler,"b",function(){return Pe("Unexpected interpolation")}),i=f(t.restoreViewStatement(),t.variableDeclarations(),r.render3Stmts),s=ve([new Ft("$event",ht)],i,ft,null,o);return[me(e.name),s]}},t}(),Bu=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.constantPool=e,o.allocateSlot=n,o.allocatePureFunctionSlots=r,o.definePipe=i,o._pipeBindExprs=[],o}return o(e,t),e.prototype.visitPipe=function(t,e){var n=this.allocateSlot(),r="PIPE:"+n,i=this.allocatePureFunctionSlots(2+t.args.length),o=new hi(t.span,new ci(t.span),r),s=function a(t){var e=Hu[t.length];return{identifier:e||mn.pipeBindV,isVarLength:!e}}(t.args),u=s.isVarLength;this.definePipe(t.name,r,n,pe(s.identifier));var c=f([t.exp],t.args),l=this.visitAll(u?[new _i(t.span,c)]:c),p=new Pi(t.span,o,f([new gi(t.span,n),new gi(t.span,i)],l));return this._pipeBindExprs.push(p),p},e.prototype.updatePipeSlotOffsets=function(t){this._pipeBindExprs.forEach(function(e){e.args[1].value+=t})},e.prototype.visitLiteralArray=function(t,e){var n=this;return new eo(t.span,this.visitAll(t.expressions),function(t){var e=fe(t);return t.every(function(t){return t.isConstant()})?n.constantPool.getConstLiteral(e,!0):Wu(n.constantPool,e,n.allocatePureFunctionSlots)})},e.prototype.visitLiteralMap=function(t,e){var n=this;return new eo(t.span,this.visitAll(t.values),function(e){var r=de(e.map(function(e,n){return{key:t.keys[n].key,value:e,quoted:t.keys[n].quoted}}));return e.every(function(t){return t.isConstant()})?n.constantPool.getConstLiteral(r,!0):Wu(n.constantPool,r,n.allocatePureFunctionSlots)})},e}(Mi),Hu=[mn.pipeBind1,mn.pipeBind2,mn.pipeBind3,mn.pipeBind4],qu=[mn.pureFunction0,mn.pureFunction1,mn.pureFunction2,mn.pureFunction3,mn.pureFunction4,mn.pureFunction5,mn.pureFunction6,mn.pureFunction7,mn.pureFunction8];function Uu(t,e,n){return pe(e,null,t).callFn(n,t)}function Ku(t){return pe(mn.nextContext).callFn(t>1?[me(t)]:[])}function Wu(t,e,n){var r=t.getLiteralFactory(e),i=r.literalFactory,o=r.literalFactoryArguments,s=n(1+o.length);o.length>0||Pe("Expected arguments to a literal factory function");var a=function u(t){var e=qu[t.length];return{identifier:e||mn.pureFunctionV,isVarLength:!e}}(o),c=a.identifier,l=a.isVarLength,p=[me(s),i];return l?p.push(fe(o)):p.push.apply(p,f(o)),pe(c).callFn(p)}var zu=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=null),this.bindingLevel=t,this.parent=e,this.map=new Map,this.referenceNameIndex=0,this.restoreViewVariable=null}return Object.defineProperty(t,"ROOT_SCOPE",{get:function(){return t._ROOT_SCOPE||(t._ROOT_SCOPE=(new t).set(0,"$event",le("$event"))),t._ROOT_SCOPE},enumerable:!0,configurable:!0}),t.prototype.get=function(t){for(var e=this;e;){var n=e.map.get(t);if(null!=n)return e!==this&&(this.map.set(t,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;e=e.parent}return 0===this.bindingLevel?null:this.getComponentProperty(t)},t.prototype.set=function(t,e,n,r,i,o){return void 0===r&&(r=0),!this.map.has(e)||Pe("The name "+e+" is already defined in scope to be "+this.map.get(e)),this.map.set(e,{retrievalLevel:t,lhs:n,declare:!1,declareLocalCallback:i,priority:r,localRef:o||!1}),this},t.prototype.getLocal=function(t){return this.get(t)},t.prototype.nestedScope=function(e){var n=new t(e,this);return e>0&&n.generateSharedContextVar(0),n},t.prototype.getSharedContextName=function(t){var e=this.map.get("$$shared_ctx$$"+t);return e&&e.declare?e.lhs:null},t.prototype.maybeGenerateSharedContextVar=function(t){if(1===t.priority){var e=this.map.get("$$shared_ctx$$"+t.retrievalLevel);e?e.declare=!0:this.generateSharedContextVar(t.retrievalLevel)}},t.prototype.generateSharedContextVar=function(t){var e=le("ctx"+this.freshReferenceName());this.map.set("$$shared_ctx$$"+t,{retrievalLevel:t,lhs:e,declareLocalCallback:function(t,n){return[e.set(Ku(n)).toConstDecl()]},declare:!1,priority:2,localRef:!1})},t.prototype.getComponentProperty=function(t){var e=this.map.get("$$shared_ctx$$0");return e.declare=!0,this.maybeRestoreView(0,!1),e.lhs.prop(t)},t.prototype.maybeRestoreView=function(t,e){this.isListenerScope()&&(t<this.bindingLevel||e)&&(this.parent.restoreViewVariable||(this.parent.restoreViewVariable=le(this.parent.freshReferenceName())),this.restoreViewVariable=this.parent.restoreViewVariable)},t.prototype.restoreViewStatement=function(){return this.restoreViewVariable?[Uu(null,mn.restoreView,[this.restoreViewVariable]).toStmt()]:[]},t.prototype.viewSnapshotStatements=function(){var t=Uu(null,mn.getCurrentView,[]);return this.restoreViewVariable?[this.restoreViewVariable.set(t).toConstDecl()]:[]},t.prototype.isListenerScope=function(){return this.parent&&this.parent.bindingLevel===this.bindingLevel},t.prototype.variableDeclarations=function(){var t=this,e=0;return Array.from(this.map.values()).filter(function(t){return t.declare}).sort(function(t,e){return e.retrievalLevel-t.retrievalLevel||e.priority-t.priority}).reduce(function(n,r){var i=t.bindingLevel-r.retrievalLevel,o=r.declareLocalCallback(t,i-e);return e=i,n.concat(o)},[])},t.prototype.freshReferenceName=function(){for(var t=this;t.parent;)t=t.parent;return"_r"+t.referenceNameIndex++},t}();function Qu(t){switch((t=t.slice(1)).length){case 3:return pe(mn.interpolation1).callFn(t);case 5:return pe(mn.interpolation2).callFn(t);case 7:return pe(mn.interpolation3).callFn(t);case 9:return pe(mn.interpolation4).callFn(t);case 11:return pe(mn.interpolation5).callFn(t);case 13:return pe(mn.interpolation6).callFn(t);case 15:return pe(mn.interpolation7).callFn(t);case 17:return pe(mn.interpolation8).callFn(t)}return t.length>=19&&t.length%2==1||Pe("Invalid interpolation argument length "+t.length),pe(mn.interpolationV).callFn([fe(t)])}function Gu(){return new ja(new Bs(new Es),Ls,new Ra,null,[])}function Xu(t){return"@"+t}function $u(t){return 1===t.length&&t[0]instanceof za}function Yu(t){return!t.find(function(t){return!(t instanceof Ha||t instanceof qa||t instanceof Ya)})}
|
|
339
339
|
/**
|
|
340
340
|
* @license
|
|
341
341
|
* Copyright Google Inc. All Rights Reserved.
|
|
342
342
|
*
|
|
343
343
|
* Use of this source code is governed by an MIT-style license that can be
|
|
344
344
|
* found in the LICENSE file at https://angular.io/license
|
|
345
|
-
*/var Zu=/attr\.([^\]]+)/;function Ju(t,e,n){var r=new
|
|
345
|
+
*/var Zu=/attr\.([^\]]+)/;function Ju(t,e,n){var r=new Rr;r.set("type",t.type),r.set("selectors",function i(t){return kr(ot(t))}(t.selector));var o=Lr({name:t.name,type:t.type,deps:t.deps,injectFn:mn.directiveInject,extraStatementFn:function s(t,e){var n=e.createDirectiveHostEventAsts(ac(t),t.typeSourceSpan);return n&&n.length?function(e){return function r(t,e,n){return e.map(function(e){var r=qi(null,t,e.handler,"b",function(){return Pe("Unexpected interpolation")}),i=e.name&&tn(e.name),o=n.name,s=o&&i?o+"_"+i+"_HostBindingHandler":null,a=ve([new Ft("$event",ht)],f(r.render3Stmts),ft,null,s);return pe(mn.listener).callFn([me(e.name),a]).toStmt()})}(e,n,t)}:null}(t,n)});r.set("factory",o.factory),r.set("contentQueries",function a(t,e){if(t.queries.length){var n=t.queries.map(function(t){var n=ec(t,e,null);return pe(mn.registerContentQuery).callFn([n,le("dirIndex")]).toStmt()}),r=t.name;return ve([new Ft("dirIndex",vt)],n,ft,null,r?r+"_ContentQueries":null)}return null}(t,e)),r.set("contentQueriesRefresh",function u(t){if(t.queries.length>0){var e=[],n=t.name,r=[new Ft("dirIndex",vt),new Ft("queryStartIndex",vt)],i=le("instance"),o=Pr(e,Cr);return e.push(i.set(pe(mn.load).callFn([le("dirIndex")])).toDeclStmt(ft,[At.Final])),t.queries.forEach(function(t,n){var r=le("queryStartIndex"),s=pe(mn.loadQueryList).callFn([n>0?r.plus(me(n)):r]),a=o().set(s),u=pe(mn.queryRefresh).callFn([a]),c=i.prop(t.propertyName).set(t.first?o().prop("first"):o()),l=u.and(c);e.push(l.toStmt())}),ve(r,e,ft,null,n?n+"_ContentQueriesRefresh":null)}return null}(t));for(var c=Object.keys(t.host.properties).length,l=le("elIndex"),h=le("dirIndex"),d=new _s(l,h),v={},y=Object.getOwnPropertyNames(t.host.attributes),m=0;m<y.length;m++){var g=y[m],_=t.host.attributes[g];switch(g){case"style":d.registerStyleAttr(_);break;case"class":d.registerClassAttr(_);break;default:v[g]=_}}return r.set("attributes",function b(t){var e,n,r=[];try{for(var i=p(Object.getOwnPropertyNames(t)),o=i.next();!o.done;o=i.next()){var s=o.value,a=t[s];r.push(me(s),me(a))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r.length>0?fe(r):null}(v)),r.set("hostBindings",function x(t,e,n,r,i,o,s){var a,u,c=[],l=t.typeSourceSpan,h=ac(t),d=i.createBoundHostProperties(h,l),v=pe(mn.load).callFn([n]),y=function(t,e){return zi(null,t,e,"b",Ui.TrySimple,function(){return Pe("Unexpected interpolation")})};if(d){var m=new Bu(o,function(){return Pe("Unexpected node")},s,function(){return Pe("Unexpected pipe")});try{for(var g=p(d),_=g.next();!_.done;_=g.next()){var b=_.value,x=b.name,w=x.substring(0,5).toLowerCase();if("style"===w){var E=cc(x);r.registerStyleInput(E.propertyName,b.expression,E.unit,b.sourceSpan)}else if("class"===w)r.registerClassInput(cc(x).propertyName,b.expression,b.sourceSpan);else{var S=b.expression.visit(m),C=y(v,S),T=sc(x),P=T.bindingName,A=T.instruction;c.push.apply(c,f(C.stmts)),c.push(pe(A).callFn([e,me(P),pe(mn.bind).callFn([C.currValExpr])]).toStmt())}}}catch(t){a={error:t}}finally{try{_&&!_.done&&(u=g.return)&&u.call(g)}finally{if(a)throw a.error}}if(r.hasBindingsOrInitialValues){var N=r.buildCreateLevelInstruction(null,o);if(N){var k=oc(N,v,y);c.push(k)}r.buildUpdateLevelInstructions(m).forEach(function(t){var e=oc(t,v,y);c.push(e)})}}if(c.length>0){var O=t.name;return ve([new Ft(n.name,vt),new Ft(e.name,vt)],c,ft,null,O?O+"_HostBindings":null)}return null}(t,l,h,d,n,e,function(t){var e=c;return c+=t,e})),c&&r.set("hostVars",me(c)),r.set("inputs",Or(t.inputs)),r.set("outputs",Or(t.outputs)),null!==t.exportAs&&r.set("exportAs",me(t.exportAs)),{definitionMap:r,statements:o.statements}}function tc(t,e){var n=[],r=e.providers,i=e.viewProviders;if(r||i){var o=[r||new Ut([])];i&&o.push(i),n.push(pe(mn.ProvidersFeature).callFn(o))}e.usesInheritance&&n.push(pe(mn.InheritDefinitionFeature)),e.lifecycle.usesOnChanges&&n.push(pe(mn.NgOnChangesFeature)),n.length&&t.set("features",fe(n))}function ec(t,e,n){var r=function i(t,e){if(Array.isArray(t.predicate)){var n=[];return t.predicate.forEach(function(t){var e=t.split(",").map(function(t){return me(t.trim())});n.push.apply(n,f(e))}),e.getConstLiteral(fe(n),!0)}return t.predicate}(t,e),o=[me(n,ft),r,me(t.descendants)];return t.read&&o.push(t.read),pe(mn.query).callFn(o)}function nc(t){return he(me(t))}function rc(t){return he(de(Object.keys(t).map(function(e){return{key:e,value:me(Array.isArray(t[e])?t[e][0]:t[e]),quoted:!0}})))}function ic(t,e){var n=(t.selector||"").replace(/\n/g,"");return he(pe(e,[function r(t,e){var n=null;if(e>0){n=[];for(var r=0;r<e;r++)n.push(ht)}return he(t,null,n)}
|
|
346
346
|
/**
|
|
347
347
|
* @license
|
|
348
348
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -356,7 +356,7 @@ function Ru(t,e){t.i18n=e}var Du=function(){function t(t){this.config=t,this._cr
|
|
|
356
356
|
*
|
|
357
357
|
* Use of this source code is governed by an MIT-style license that can be
|
|
358
358
|
* found in the LICENSE file at https://angular.io/license
|
|
359
|
-
*/var lc=function(){function t(){this.R3ResolvedDependencyType=
|
|
359
|
+
*/var lc=function(){function t(){this.R3ResolvedDependencyType=Dr}return t.prototype.compilePipe=function(t,e,n){var r=function i(t){var e=[];e.push({key:"name",value:me(t.pipeName),quoted:!1}),e.push({key:"type",value:t.type,quoted:!1});var n=Lr({name:t.name,type:t.type,deps:t.deps,injectFn:mn.directiveInject,extraStatementFn:null});return e.push({key:"factory",value:n.factory,quoted:!1}),e.push({key:"pure",value:me(t.pure),quoted:!1}),{expression:pe(mn.definePipe).callFn([de(e)]),type:new lt(pe(mn.PipeDefWithMeta,[new lt(t.type),new lt(new It(t.pipeName))])),statements:n.statements}}({name:n.name,type:new St(n.type),deps:bc(n.deps),pipeName:n.pipeName,pure:n.pure});return ni(r.expression,t,e,r.statements)},t.prototype.compileInjectable=function(t,e,n){var r=function o(t){var e=null,n={name:t.name,type:t.type,deps:t.ctorDeps,injectFn:Ge.inject,extraStatementFn:null};if(void 0!==t.useClass){var r=t.useClass.isEquivalent(t.type),i=t.userDeps||r&&t.ctorDeps||void 0;e=Lr(a({},n,void 0!==i?{delegate:t.useClass,delegateDeps:i,delegateType:Mr.Class}:{delegate:t.useClass,delegateType:Mr.Factory}))}else e=Lr(void 0!==t.useFactory?a({},n,{delegate:t.useFactory,delegateDeps:t.userDeps||[],delegateType:Mr.Function}):void 0!==t.useValue?a({},n,{expression:t.useValue}):void 0!==t.useExisting?a({},n,{expression:pe(Ge.inject).callFn([t.useExisting])}):n);var o=t.type,s=t.providedIn;return{expression:pe(Ge.defineInjectable).callFn([Vr({token:o,factory:e.factory,providedIn:s})]),type:new lt(pe(Ge.InjectableDef,[new lt(t.type)])),statements:e.statements}}({name:n.name,type:new St(n.type),providedIn:function i(t){return null==t||"string"==typeof t?new It(t):new St(t)}(n.providedIn),useClass:gc(n,pc),useFactory:gc(n,hc),useValue:gc(n,fc),useExisting:gc(n,dc),ctorDeps:bc(n.ctorDeps),userDeps:bc(n.userDeps)||void 0});return ni(r.expression,t,e,r.statements)},t.prototype.compileInjector=function(t,e,n){var r=function i(t){var e=Lr({name:t.name,type:t.type,deps:t.deps,injectFn:mn.inject,extraStatementFn:null});return{expression:pe(mn.defineInjector).callFn([Vr({factory:e.factory,providers:t.providers,imports:t.imports})]),type:new lt(pe(mn.InjectorDef,[new lt(t.type)])),statements:e.statements}}({name:n.name,type:new St(n.type),deps:bc(n.deps),providers:new St(n.providers),imports:new St(n.imports)});return ni(r.expression,t,e,r.statements)},t.prototype.compileNgModule=function(t,e,n){return ni(function r(t){var e=t.type,n=t.bootstrap,r=t.declarations,i=t.imports,o=t.exports;return{expression:pe(mn.defineNgModule).callFn([Vr({type:e,bootstrap:fe(n.map(function(t){return t.value})),declarations:fe(r.map(function(t){return t.value})),imports:fe(i.map(function(t){return t.value})),exports:fe(o.map(function(t){return t.value}))})]),type:new lt(pe(mn.NgModuleDefWithMeta,[new lt(e),ri(r),ri(i),ri(o)])),additionalStatements:[]}}({type:new St(n.type),bootstrap:n.bootstrap.map(vc),declarations:n.declarations.map(vc),imports:n.imports.map(vc),exports:n.exports.map(vc),emitInline:!0}).expression,t,e,[])},t.prototype.compileDirective=function(t,e,n){var r=new Ue,i=Gu(),o=function s(t,e,n){var r=Ju(t,e,n),i=r.definitionMap,o=r.statements;tc(i,t);var s=pe(mn.defineDirective).callFn([i.toLiteralMap()]);return(t.selector||"").replace(/\n/g,""),{expression:s,type:ic(t,mn.DirectiveDefWithMeta),statements:o}}(mc(n),r,i),a=f(r.statements,o.statements);return ni(o.expression,t,e,a)},t.prototype.compileComponent=function(t,e,n){var r=new Ue,i=function o(t,e,n,r){void 0===n&&(n={});var i=Gu(),o=(new _a).parse(t,e,!0);if(o.errors&&o.errors.length>0)return{errors:o.errors,nodes:[],hasNgContent:!1,ngContentSelectors:[],relativeContextFilePath:r};var s=o.rootNodes;s=$s(new Ru({keepI18nAttrs:!n.preserveWhitespaces}),s),n.preserveWhitespaces||(s=$s(new Ta,s),s=$s(new Ru({keepI18nAttrs:!1}),s));var a=function u(t,e){var n=new gu(e),r=$s(n,t),i=e.errors.concat(n.errors),o=i.filter(function(t){return t.level===Fo.ERROR});if(o.length>0)throw Ae("Template parse errors:\n"+o.join("\n"),o);return{nodes:r,errors:i,ngContentSelectors:n.ngContentSelectors,hasNgContent:n.hasNgContent}}(s,i),c=a.errors;return c&&c.length>0?{errors:c,nodes:[],hasNgContent:!1,ngContentSelectors:[],relativeContextFilePath:r}:{nodes:a.nodes,hasNgContent:a.hasNgContent,ngContentSelectors:a.ngContentSelectors,relativeContextFilePath:r}}(n.template,e,{preserveWhitespaces:n.preserveWhitespaces||!1},"");if(void 0!==i.errors){var s=i.errors.map(function(t){return t.toString()}).join(", ");throw new Error("Errors during JIT compilation of template for "+n.name+": "+s)}var u=function c(t,e,n){var r=Ju(t,e,n),i=r.definitionMap,o=r.statements;tc(i,t);var s=t.selector&&N.parse(t.selector),a=s&&s[0];if(a){var u=a.getAttrs();u.length&&i.set("attrs",e.getConstLiteral(fe(u.map(function(t){return me(null!=t?t:void 0)})),!0))}var c=null;if(t.directives.size){var l=new k;t.directives.forEach(function(t,e){l.addSelectables(N.parse(e),t)}),c=l}t.viewQueries.length&&i.set("viewQuery",function p(t,e){for(var n=[],r=[],i=Pr(r,Cr),o=0;o<t.viewQueries.length;o++){var s=t.viewQueries[o],a=ec(s,e,o);n.push(a.toStmt());var u=i(),c=pe(mn.load).callFn([me(o)]),l=pe(mn.queryRefresh).callFn([u.set(c)]),p=le("ctx").prop(s.propertyName).set(s.first?u.prop("first"):u);r.push(l.and(p).toStmt())}var h=t.name?t.name+"_Query":null;return ve([new Ft(Tr,vt),new Ft("ctx",null)],[Fu(1,n),Fu(2,r)],ft,null,h)}(t,e));var h=t.name,f=h?h+"_Template":null,d=new Set,v=new Set,y=t.template,m=new Vu(e,zu.ROOT_SCOPE,0,h,null,null,f,t.viewQueries,c,d,t.pipes,v,mn.namespaceHTML,t.template.relativeContextFilePath),g=m.buildTemplateFunction(y.nodes,[],y.hasNgContent,y.ngContentSelectors);if(i.set("consts",me(m.getConstCount())),i.set("vars",me(m.getVarCount())),i.set("template",g),d.size){var _=fe(Array.from(d));t.wrapDirectivesAndPipesInClosure&&(_=ve([],[new Jt(_)])),i.set("directives",_)}if(v.size){var b=fe(Array.from(v));t.wrapDirectivesAndPipesInClosure&&(b=ve([],[new Jt(b)])),i.set("pipes",b)}if(null===t.encapsulation&&(t.encapsulation=T.Emulated),t.styles&&t.styles.length){var x=(t.encapsulation==T.Emulated?function w(t,e,n){var r=new Uo;return t.map(function(t){return r.shimCssText(t,e,n)})}(t.styles,"_ngcontent-%COMP%","_nghost-%COMP%"):t.styles).map(function(t){return me(t)});i.set("styles",fe(x))}else t.encapsulation===T.Emulated&&(t.encapsulation=T.None);return t.encapsulation!==T.Emulated&&i.set("encapsulation",me(t.encapsulation)),null!==t.animations&&i.set("data",de([{key:"animations",value:t.animations,quoted:!1}])),(t.selector||"").replace(/\n/g,""),{expression:pe(mn.defineComponent).callFn([i.toLiteralMap()]),type:ic(t,mn.ComponentDefWithMeta),statements:o}}(a({},n,mc(n),{template:i,viewQueries:n.viewQueries.map(yc),wrapDirectivesAndPipesInClosure:!1,styles:n.styles||[],encapsulation:n.encapsulation,animations:null!=n.animations?new St(n.animations):null,viewProviders:null!=n.viewProviders?new St(n.viewProviders):null}),r,Gu()),l=f(r.statements,u.statements);return ni(u.expression,t,e,l)},t}(),pc=Object.keys({useClass:null})[0],hc=Object.keys({useFactory:null})[0],fc=Object.keys({useValue:null})[0],dc=Object.keys({useExisting:null})[0],vc=function(t){var e=new St(t);return{value:e,type:e}};function yc(t){return a({},t,{predicate:Array.isArray(t.predicate)?t.predicate:new St(t.predicate),read:t.read?new St(t.read):null})}function mc(t){var e=xc(t.inputs||[]),n=xc(t.outputs||[]),r=t.propMetadata,i={},o={},s=function(t){r.hasOwnProperty(t)&&r[t].forEach(function(e){!function n(t){return"Input"===t.ngMetadataName}(e)?function r(t){return"Output"===t.ngMetadataName}(e)&&(o[t]=e.bindingPropertyName||t):i[t]=e.bindingPropertyName?[e.bindingPropertyName,t]:t})};for(var u in r)s(u);return a({},t,{typeSourceSpan:null,type:new St(t.type),deps:bc(t.deps),host:function c(t,e){var n=function r(t){var e={},n={},r={},i={};return Object.keys(t).forEach(function(o){var s=t[o],a=o.match(uc);null===a?e[o]=s:null!=a[1]?r[a[1]]=s:null!=a[2]?n[a[2]]=s:null!=a[3]&&(i[a[3]]=s)}),{attributes:e,listeners:n,properties:r,animations:i}}(t||{}),i=n.attributes,o=n.listeners,s=n.properties;if(Object.keys(n.animations).length>0)throw new Error("Animation bindings are as-of-yet unsupported in Ivy");var a=function(t){e.hasOwnProperty(t)&&e[t].forEach(function(e){!function n(t){return"HostBinding"===t.ngMetadataName}(e)?function r(t){return"HostListener"===t.ngMetadataName}(e)&&(o[e.eventName||t]=t+"("+(e.args||[]).join(",")+")"):s[e.hostPropertyName||t]=t})};for(var u in e)a(u);return{attributes:i,listeners:o,properties:s}}(t.host,t.propMetadata),inputs:a({},e,i),outputs:a({},n,o),queries:t.queries.map(yc),providers:null!=t.providers?new St(t.providers):null})}function gc(t,e){return t.hasOwnProperty(e)?new St(t[e]):void 0}function _c(t){return{token:null===t.token?new It(null):t.resolved===Dr.Attribute?new It(t.token):new St(t.token),resolved:t.resolved,host:t.host,optional:t.optional,self:t.self,skipSelf:t.skipSelf}}function bc(t){return null==t?null:t.map(_c)}function xc(t){return t.reduce(function(t,e){var n=h(e.split(",").map(function(t){return t.trim()}),2),r=n[0];return t[r]=n[1]||r,t},{})}new je("7.1.4");
|
|
360
360
|
/**
|
|
361
361
|
* @license
|
|
362
362
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -364,7 +364,7 @@ function Ru(t,e){t.i18n=e}var Du=function(){function t(t){this.config=t,this._cr
|
|
|
364
364
|
* Use of this source code is governed by an MIT-style license that can be
|
|
365
365
|
* found in the LICENSE file at https://angular.io/license
|
|
366
366
|
*/
|
|
367
|
-
var wc,Ec,Sc=function(){function t(t,e,n){this.value=t,this.ngContentIndex=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitText(this,e)},t}(),Cc=function(){function t(t,e,n){this.value=t,this.ngContentIndex=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitBoundText(this,e)},t}(),Tc=function(){function t(t,e,n){this.name=t,this.value=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitAttr(this,e)},t}(),Pc=((wc={})[4]=4,wc[1]=1,wc[2]=2,wc[0]=0,wc[3]=3,wc),Ac=function(){function t(t,e,n,r,i,o){this.name=t,this.type=e,this.securityContext=n,this.value=r,this.unit=i,this.sourceSpan=o,this.isAnimation=4===this.type}return t.fromBoundProperty=function(e){return new t(e.name,Pc[e.type],e.securityContext,e.value,e.unit,e.sourceSpan)},t.prototype.visit=function(t,e){return t.visitElementProperty(this,e)},t}(),Nc=function(){function t(e,n,r,i,o){this.name=e,this.target=n,this.phase=r,this.handler=i,this.sourceSpan=o,this.fullName=t.calcFullName(this.name,this.target,this.phase),this.isAnimation=!!this.phase}return t.calcFullName=function(t,e,n){return e?e+":"+t:n?"@"+t+"."+n:t},t.fromParsedEvent=function(e){return new t(e.name,0===e.type?e.targetOrPhase:null,1===e.type?e.targetOrPhase:null,e.handler,e.sourceSpan)},t.prototype.visit=function(t,e){return t.visitEvent(this,e)},t}(),kc=function(){function t(t,e,n,r){this.name=t,this.value=e,this.originalValue=n,this.sourceSpan=r}return t.prototype.visit=function(t,e){return t.visitReference(this,e)},t}(),Oc=function(){function t(t,e,n){this.name=t,this.value=e,this.sourceSpan=n}return t.fromParsedVariable=function(e){return new t(e.name,e.value,e.sourceSpan)},t.prototype.visit=function(t,e){return t.visitVariable(this,e)},t}(),Ic=function(){function t(t,e,n,r,i,o,s,a,u,c,l,p,h){this.name=t,this.attrs=e,this.inputs=n,this.outputs=r,this.references=i,this.directives=o,this.providers=s,this.hasViewContainer=a,this.queryMatches=u,this.children=c,this.ngContentIndex=l,this.sourceSpan=p,this.endSourceSpan=h}return t.prototype.visit=function(t,e){return t.visitElement(this,e)},t}(),Mc=function(){function t(t,e,n,r,i,o,s,a,u,c,l){this.attrs=t,this.outputs=e,this.references=n,this.variables=r,this.directives=i,this.providers=o,this.hasViewContainer=s,this.queryMatches=a,this.children=u,this.ngContentIndex=c,this.sourceSpan=l}return t.prototype.visit=function(t,e){return t.visitEmbeddedTemplate(this,e)},t}(),
|
|
367
|
+
var wc,Ec,Sc=function(){function t(t,e,n){this.value=t,this.ngContentIndex=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitText(this,e)},t}(),Cc=function(){function t(t,e,n){this.value=t,this.ngContentIndex=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitBoundText(this,e)},t}(),Tc=function(){function t(t,e,n){this.name=t,this.value=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitAttr(this,e)},t}(),Pc=((wc={})[4]=4,wc[1]=1,wc[2]=2,wc[0]=0,wc[3]=3,wc),Ac=function(){function t(t,e,n,r,i,o){this.name=t,this.type=e,this.securityContext=n,this.value=r,this.unit=i,this.sourceSpan=o,this.isAnimation=4===this.type}return t.fromBoundProperty=function(e){return new t(e.name,Pc[e.type],e.securityContext,e.value,e.unit,e.sourceSpan)},t.prototype.visit=function(t,e){return t.visitElementProperty(this,e)},t}(),Nc=function(){function t(e,n,r,i,o){this.name=e,this.target=n,this.phase=r,this.handler=i,this.sourceSpan=o,this.fullName=t.calcFullName(this.name,this.target,this.phase),this.isAnimation=!!this.phase}return t.calcFullName=function(t,e,n){return e?e+":"+t:n?"@"+t+"."+n:t},t.fromParsedEvent=function(e){return new t(e.name,0===e.type?e.targetOrPhase:null,1===e.type?e.targetOrPhase:null,e.handler,e.sourceSpan)},t.prototype.visit=function(t,e){return t.visitEvent(this,e)},t}(),kc=function(){function t(t,e,n,r){this.name=t,this.value=e,this.originalValue=n,this.sourceSpan=r}return t.prototype.visit=function(t,e){return t.visitReference(this,e)},t}(),Oc=function(){function t(t,e,n){this.name=t,this.value=e,this.sourceSpan=n}return t.fromParsedVariable=function(e){return new t(e.name,e.value,e.sourceSpan)},t.prototype.visit=function(t,e){return t.visitVariable(this,e)},t}(),Ic=function(){function t(t,e,n,r,i,o,s,a,u,c,l,p,h){this.name=t,this.attrs=e,this.inputs=n,this.outputs=r,this.references=i,this.directives=o,this.providers=s,this.hasViewContainer=a,this.queryMatches=u,this.children=c,this.ngContentIndex=l,this.sourceSpan=p,this.endSourceSpan=h}return t.prototype.visit=function(t,e){return t.visitElement(this,e)},t}(),Mc=function(){function t(t,e,n,r,i,o,s,a,u,c,l){this.attrs=t,this.outputs=e,this.references=n,this.variables=r,this.directives=i,this.providers=o,this.hasViewContainer=s,this.queryMatches=a,this.children=u,this.ngContentIndex=c,this.sourceSpan=l}return t.prototype.visit=function(t,e){return t.visitEmbeddedTemplate(this,e)},t}(),Dc=function(){function t(t,e,n,r){this.directiveName=t,this.templateName=e,this.value=n,this.sourceSpan=r}return t.prototype.visit=function(t,e){return t.visitDirectiveProperty(this,e)},t}(),Rc=function(){function t(t,e,n,r,i,o){this.directive=t,this.inputs=e,this.hostProperties=n,this.hostEvents=r,this.contentQueryStartId=i,this.sourceSpan=o}return t.prototype.visit=function(t,e){return t.visitDirective(this,e)},t}(),Lc=function(){function t(t,e,n,r,i,o,s,a){this.token=t,this.multiProvider=e,this.eager=n,this.providers=r,this.providerType=i,this.lifecycleHooks=o,this.sourceSpan=s,this.isModule=a}return t.prototype.visit=function(t,e){return null},t}();
|
|
368
368
|
/**
|
|
369
369
|
* @license
|
|
370
370
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -385,7 +385,7 @@ var wc,Ec,Sc=function(){function t(t,e,n){this.value=t,this.ngContentIndex=e,thi
|
|
|
385
385
|
*
|
|
386
386
|
* Use of this source code is governed by an MIT-style license that can be
|
|
387
387
|
* found in the LICENSE file at https://angular.io/license
|
|
388
|
-
*/var Uc=function(){function t(t,e,n,r){this._resourceLoader=t,this._urlResolver=e,this._htmlParser=n,this._config=r,this._resourceLoaderCache=new Map}return t.prototype.clearCache=function(){this._resourceLoaderCache.clear()},t.prototype.clearCacheFor=function(t){var e=this;if(t.isComponent){var n=t.template;this._resourceLoaderCache.delete(n.templateUrl),n.externalStylesheets.forEach(function(t){e._resourceLoaderCache.delete(t.moduleUrl)})}},t.prototype._fetch=function(t){var e=this._resourceLoaderCache.get(t);return e||(e=this._resourceLoader.get(t),this._resourceLoaderCache.set(t,e)),e},t.prototype.normalizeTemplate=function(t){var e=this;if(Ee(t.template)){if(Ee(t.templateUrl))throw Ae("'"+
|
|
388
|
+
*/var Uc=function(){function t(t,e,n,r){this._resourceLoader=t,this._urlResolver=e,this._htmlParser=n,this._config=r,this._resourceLoaderCache=new Map}return t.prototype.clearCache=function(){this._resourceLoaderCache.clear()},t.prototype.clearCacheFor=function(t){var e=this;if(t.isComponent){var n=t.template;this._resourceLoaderCache.delete(n.templateUrl),n.externalStylesheets.forEach(function(t){e._resourceLoaderCache.delete(t.moduleUrl)})}},t.prototype._fetch=function(t){var e=this._resourceLoaderCache.get(t);return e||(e=this._resourceLoader.get(t),this._resourceLoaderCache.set(t,e)),e},t.prototype.normalizeTemplate=function(t){var e=this;if(Ee(t.template)){if(Ee(t.templateUrl))throw Ae("'"+De(t.componentType)+"' component cannot define both template and templateUrl");if("string"!=typeof t.template)throw Ae("The template specified for component "+De(t.componentType)+" is not a string")}else{if(!Ee(t.templateUrl))throw Ae("No template specified for component "+De(t.componentType));if("string"!=typeof t.templateUrl)throw Ae("The templateUrl specified for component "+De(t.componentType)+" is not a string")}if(Ee(t.preserveWhitespaces)&&"boolean"!=typeof t.preserveWhitespaces)throw Ae("The preserveWhitespaces option for component "+De(t.componentType)+" must be a boolean");return Te(this._preParseTemplate(t),function(n){return e._normalizeTemplateMetadata(t,n)})},t.prototype._preParseTemplate=function(t){var e,n,r=this;return null!=t.template?(e=t.template,n=t.moduleUrl):(n=this._urlResolver.resolve(t.moduleUrl,t.templateUrl),e=this._fetch(n)),Te(e,function(e){return r._preparseLoadedTemplate(t,e,n)})},t.prototype._preparseLoadedTemplate=function(t,e,n){var r=!!t.template,i=Rs.fromArray(t.interpolation),o=this._htmlParser.parse(e,function s(t,e,n){var r;return r=n.isInline?e.type.reference instanceof Ye?e.type.reference.filePath+"."+e.type.reference.name+".html":rn(t)+"/"+rn(e.type)+".html":n.templateUrl,e.type.reference instanceof Ye?r:function i(t){return t.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}(r)}({reference:t.ngModuleType},{type:{reference:t.componentType}},{isInline:r,templateUrl:n}),!0,i);if(o.errors.length>0)throw Ae("Template parse errors:\n"+o.errors.join("\n"));var a=this._normalizeStylesheet(new an({styles:t.styles,moduleUrl:t.moduleUrl})),u=new Kc;$s(u,o.rootNodes);var c=this._normalizeStylesheet(new an({styles:u.styles,styleUrls:u.styleUrls,moduleUrl:n}));return{template:e,templateUrl:n,isInline:r,htmlAst:o,styles:a.styles.concat(c.styles),inlineStyleUrls:a.styleUrls.concat(c.styleUrls),styleUrls:this._normalizeStylesheet(new an({styleUrls:t.styleUrls,moduleUrl:t.moduleUrl})).styleUrls,ngContentSelectors:u.ngContentSelectors}},t.prototype._normalizeTemplateMetadata=function(t,e){var n=this;return Te(this._loadMissingExternalStylesheets(e.styleUrls.concat(e.inlineStyleUrls)),function(r){return n._normalizeLoadedTemplateMetadata(t,e,r)})},t.prototype._normalizeLoadedTemplateMetadata=function(t,e,n){var r=this,i=f(e.styles);this._inlineStyles(e.inlineStyleUrls,n,i);var o=e.styleUrls,s=o.map(function(t){var e=n.get(t),i=f(e.styles);return r._inlineStyles(e.styleUrls,n,i),new an({moduleUrl:t,styles:i})}),a=t.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:e.template,templateUrl:e.templateUrl,htmlAst:e.htmlAst,styles:i,styleUrls:o,ngContentSelectors:e.ngContentSelectors,animations:t.animations,interpolation:t.interpolation,isInline:e.isInline,externalStylesheets:s,preserveWhitespaces:qc(t.preserveWhitespaces,this._config.preserveWhitespaces)})},t.prototype._inlineStyles=function(t,e,n){var r=this;t.forEach(function(t){var i=e.get(t);i.styles.forEach(function(t){return n.push(t)}),r._inlineStyles(i.styleUrls,e,n)})},t.prototype._loadMissingExternalStylesheets=function(t,e){var n,r=this;return void 0===e&&(e=new Map),Te((n=t.filter(function(t){return!e.has(t)}).map(function(t){return Te(r._fetch(t),function(n){var i=r._normalizeStylesheet(new an({styles:[n],moduleUrl:t}));return e.set(t,i),r._loadMissingExternalStylesheets(i.styleUrls,e)})})).some(Le)?Promise.all(n):n,function(t){return e})},t.prototype._normalizeStylesheet=function(t){var e=this,n=t.moduleUrl,r=t.styleUrls.filter(tu).map(function(t){return e._urlResolver.resolve(n,t)}),i=t.styles.map(function(t){var i=function o(t,e,n){var r=[],i=n.replace(ru,"").replace(nu,function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=n[1]||n[2];return tu(o)?(r.push(t.resolve(e,o)),""):n[0]});return new Ja(i,r)}(e._urlResolver,n,t);return r.push.apply(r,f(i.styleUrls)),i.style});return new an({styles:i,styleUrls:r,moduleUrl:n})},t}(),Kc=function(){function t(){this.ngContentSelectors=[],this.styles=[],this.styleUrls=[],this.ngNonBindableStackCount=0}return t.prototype.visitElement=function(t,e){var n=du(t);switch(n.type){case eu.NG_CONTENT:0===this.ngNonBindableStackCount&&this.ngContentSelectors.push(n.selectAttr);break;case eu.STYLE:var r="";t.children.forEach(function(t){t instanceof Ks&&(r+=t.value)}),this.styles.push(r);break;case eu.STYLESHEET:this.styleUrls.push(n.hrefAttr)}return n.nonBindable&&this.ngNonBindableStackCount++,$s(this,t.children),n.nonBindable&&this.ngNonBindableStackCount--,null},t.prototype.visitExpansion=function(t,e){$s(this,t.cases)},t.prototype.visitExpansionCase=function(t,e){$s(this,t.expression)},t.prototype.visitComment=function(t,e){return null},t.prototype.visitAttribute=function(t,e){return null},t.prototype.visitText=function(t,e){return null},t}(),Wc=[V,F,j,L],zc=function(){function t(t){this._reflector=t}return t.prototype.isDirective=function(t){var e=this._reflector.annotations(Re(t));return e&&e.some(Qc)},t.prototype.resolve=function(t,e){void 0===e&&(e=!0);var n=this._reflector.annotations(Re(t));if(n){var r=Gc(n,Qc);if(r){var i=this._reflector.propMetadata(t),o=this._reflector.guards(t);return this._mergeWithPropertyMetadata(r,i,o,t)}}if(e)throw new Error("No Directive annotation found on "+De(t));return null},t.prototype._mergeWithPropertyMetadata=function(t,e,n,r){var i=[],o=[],s={},a={};return Object.keys(e).forEach(function(t){var n=Gc(e[t],function(t){return z.isTypeOf(t)});n&&i.push(n.bindingPropertyName?t+": "+n.bindingPropertyName:t);var r=Gc(e[t],function(t){return Q.isTypeOf(t)});r&&o.push(r.bindingPropertyName?t+": "+r.bindingPropertyName:t),e[t].filter(function(t){return G.isTypeOf(t)}).forEach(function(e){if(e.hostPropertyName){var n=e.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["["+e.hostPropertyName+"]"]=t}else s["["+t+"]"]=t}),e[t].filter(function(t){return X.isTypeOf(t)}).forEach(function(e){s["("+e.eventName+")"]=t+"("+(e.args||[]).join(",")+")"});var u=Gc(e[t],function(t){return Wc.some(function(e){return e.isTypeOf(t)})});u&&(a[t]=u)}),this._merge(t,i,o,s,a,n,r)},t.prototype._extractPublicName=function(t){return be(t,[null,t])[1].trim()},t.prototype._dedupeBindings=function(t){for(var e=new Set,n=new Set,r=[],i=t.length-1;i>=0;i--){var o=t[i],s=this._extractPublicName(o);n.add(s),e.has(s)||(e.add(s),r.push(o))}return r.reverse()},t.prototype._merge=function(t,e,n,r,i,o,s){var u=this._dedupeBindings(t.inputs?t.inputs.concat(e):e),c=this._dedupeBindings(t.outputs?t.outputs.concat(n):n),l=t.host?a({},t.host,r):r,p=t.queries?a({},t.queries,i):i;return K.isTypeOf(t)?K({selector:t.selector,inputs:u,outputs:c,host:l,exportAs:t.exportAs,moduleId:t.moduleId,queries:p,changeDetection:t.changeDetection,providers:t.providers,viewProviders:t.viewProviders,entryComponents:t.entryComponents,template:t.template,templateUrl:t.templateUrl,styles:t.styles,styleUrls:t.styleUrls,encapsulation:t.encapsulation,animations:t.animations,interpolation:t.interpolation,preserveWhitespaces:t.preserveWhitespaces}):B({selector:t.selector,inputs:u,outputs:c,host:l,exportAs:t.exportAs,queries:p,providers:t.providers,guards:o})},t}();function Qc(t){return B.isTypeOf(t)||K.isTypeOf(t)}function Gc(t,e){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return t[n];return null}
|
|
389
389
|
/**
|
|
390
390
|
* @license
|
|
391
391
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -455,21 +455,21 @@ var wc,Ec,Sc=function(){function t(t,e,n){this.value=t,this.ngContentIndex=e,thi
|
|
|
455
455
|
*
|
|
456
456
|
* Use of this source code is governed by an MIT-style license that can be
|
|
457
457
|
* found in the LICENSE file at https://angular.io/license
|
|
458
|
-
*/function Cl(t,e){void 0===e&&(e=!1);var n=Pl(t,e);return n[0]+".ngfactory"+function r(t){return".tsx"===t?".ts":t}(n[1])}function Tl(t){return t.replace(wl,".")}function Pl(t,e){if(void 0===e&&(e=!1),t.endsWith(".d.ts"))return[t.slice(0,-5),e?".ts":".d.ts"];var n=t.lastIndexOf(".");return-1!==n?[t.substring(0,n),t.substring(n)]:[t,""]}var Al=/\u0275\d+/,Nl=function(){function t(t,e,n,r,i,o,s,a,u,c,l,p){this._config=t,this._htmlParser=e,this._ngModuleResolver=n,this._directiveResolver=r,this._pipeResolver=i,this._summaryResolver=o,this._schemaRegistry=s,this._directiveNormalizer=a,this._console=u,this._staticSymbolCache=c,this._reflector=l,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 t.prototype.getReflector=function(){return this._reflector},t.prototype.clearCacheFor=function(t){var e=this._directiveCache.get(t);this._directiveCache.delete(t),this._nonNormalizedDirectiveCache.delete(t),this._summaryCache.delete(t),this._pipeCache.delete(t),this._ngModuleOfTypes.delete(t),this._ngModuleCache.clear(),e&&this._directiveNormalizer.clearCacheFor(e)},t.prototype.clearCache=function(){this._directiveCache.clear(),this._nonNormalizedDirectiveCache.clear(),this._summaryCache.clear(),this._pipeCache.clear(),this._ngModuleCache.clear(),this._ngModuleOfTypes.clear(),this._directiveNormalizer.clearCache()},t.prototype._createProxyClass=function(t,e){var n=null,r=function(){if(!n)throw new Error("Illegal state: Class "+e+" for type "+
|
|
458
|
+
*/function Cl(t,e){void 0===e&&(e=!1);var n=Pl(t,e);return n[0]+".ngfactory"+function r(t){return".tsx"===t?".ts":t}(n[1])}function Tl(t){return t.replace(wl,".")}function Pl(t,e){if(void 0===e&&(e=!1),t.endsWith(".d.ts"))return[t.slice(0,-5),e?".ts":".d.ts"];var n=t.lastIndexOf(".");return-1!==n?[t.substring(0,n),t.substring(n)]:[t,""]}var Al=/\u0275\d+/,Nl=function(){function t(t,e,n,r,i,o,s,a,u,c,l,p){this._config=t,this._htmlParser=e,this._ngModuleResolver=n,this._directiveResolver=r,this._pipeResolver=i,this._summaryResolver=o,this._schemaRegistry=s,this._directiveNormalizer=a,this._console=u,this._staticSymbolCache=c,this._reflector=l,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 t.prototype.getReflector=function(){return this._reflector},t.prototype.clearCacheFor=function(t){var e=this._directiveCache.get(t);this._directiveCache.delete(t),this._nonNormalizedDirectiveCache.delete(t),this._summaryCache.delete(t),this._pipeCache.delete(t),this._ngModuleOfTypes.delete(t),this._ngModuleCache.clear(),e&&this._directiveNormalizer.clearCacheFor(e)},t.prototype.clearCache=function(){this._directiveCache.clear(),this._nonNormalizedDirectiveCache.clear(),this._summaryCache.clear(),this._pipeCache.clear(),this._ngModuleCache.clear(),this._ngModuleOfTypes.clear(),this._directiveNormalizer.clearCache()},t.prototype._createProxyClass=function(t,e){var n=null,r=function(){if(!n)throw new Error("Illegal state: Class "+e+" for type "+De(t)+" is not compiled yet!");return n.apply(this,arguments)};return r.setDelegate=function(t){n=t,r.prototype=t.prototype},r.overriddenName=e,r},t.prototype.getGeneratedClass=function(t,e){return t instanceof Ye?this._staticSymbolCache.get(Cl(t.filePath),e):this._createProxyClass(t,e)},t.prototype.getComponentViewClass=function(t){return this.getGeneratedClass(t,function e(t,n){return"View_"+rn({reference:t})+"_"+n}(t,0))},t.prototype.getHostComponentViewClass=function(t){return this.getGeneratedClass(t,function e(t){return"HostView_"+rn({reference:t})}(t))},t.prototype.getHostComponentType=function(t){var e=rn({reference:t})+"_Host";return t instanceof Ye?this._staticSymbolCache.get(t.filePath,e):this._createProxyClass(t,e)},t.prototype.getRendererType=function(t){return t instanceof Ye?this._staticSymbolCache.get(Cl(t.filePath),function e(t){return"RenderType_"+rn({reference:t})}(t)):{}},t.prototype.getComponentFactory=function(t,e,n,r){if(e instanceof Ye)return this._staticSymbolCache.get(Cl(e.filePath),function i(t){return rn({reference:t})+"NgFactory"}(e));var o=this.getHostComponentViewClass(e);return this._reflector.resolveExternalReference(Ge.createComponentFactory)(t,e,o,n,r,[])},t.prototype.initComponentFactory=function(t,e){var n;t instanceof Ye||(n=t.ngContentSelectors).push.apply(n,f(e))},t.prototype._loadSummary=function(t,e){var n=this._summaryCache.get(t);if(!n){var r=this._summaryResolver.resolveSummary(t);this._summaryCache.set(t,(n=r?r.type:null)||null)}return n&&n.summaryKind===e?n:null},t.prototype.getHostComponentMetadata=function(t,e){var n=this.getHostComponentType(t.type.reference);e||(e=this.getHostComponentViewClass(n));var r=N.parse(t.selector)[0].getMatchingElementTemplate(),i=this._htmlParser.parse(r,"");return cn.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:P.Default,inputs:[],outputs:[],host:{},isComponent:!0,selector:"*",providers:[],viewProviders:[],queries:[],guards:{},viewQueries:[],componentViewType:e,rendererType:{id:"__Host__",encapsulation:T.None,styles:[],data:{}},entryComponents:[],componentFactory:null})},t.prototype.loadDirectiveMetadata=function(t,e,n){var r=this;if(this._directiveCache.has(e))return null;e=Re(e);var i=this.getNonNormalizedDirectiveMetadata(e),o=i.metadata,s=function(t){var n=new cn({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:t});return t&&r.initComponentFactory(o.componentFactory,t.ngContentSelectors),r._directiveCache.set(e,n),r._summaryCache.set(e,n.toSummary()),null};if(o.isComponent){var a=o.template,u=this._directiveNormalizer.normalizeTemplate({ngModuleType:t,componentType:e,moduleUrl:this._reflector.componentModuleUrl(e,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 Le(u)&&n?(this._reportError(function c(t){var e=Error("Can't compile synchronously as "+De(t)+" is still being loaded!");return e.ngComponentType=t,e}
|
|
459
459
|
/**
|
|
460
460
|
* @license
|
|
461
461
|
* Copyright Google Inc. All Rights Reserved.
|
|
462
462
|
*
|
|
463
463
|
* Use of this source code is governed by an MIT-style license that can be
|
|
464
464
|
* found in the LICENSE file at https://angular.io/license
|
|
465
|
-
*/(e),e),null):Te(u,s)}return s(null),null},t.prototype.getNonNormalizedDirectiveMetadata=function(t){var e=this;if(!(t=
|
|
465
|
+
*/(e),e),null):Te(u,s)}return s(null),null},t.prototype.getNonNormalizedDirectiveMetadata=function(t){var e=this;if(!(t=Re(t)))return null;var n=this._nonNormalizedDirectiveCache.get(t);if(n)return n;var r=this._directiveResolver.resolve(t,!1);if(!r)return null;var i=void 0;if(K.isTypeOf(r)){Is("styles",(s=r).styles),Is("styleUrls",s.styleUrls),Ds("interpolation",s.interpolation);var o=s.animations;i=new un({encapsulation:Se(s.encapsulation),template:Se(s.template),templateUrl:Se(s.templateUrl),htmlAst:null,styles:s.styles||[],styleUrls:s.styleUrls||[],animations:o||[],interpolation:Se(s.interpolation),isInline:!!s.template,externalStylesheets:[],ngContentSelectors:[],preserveWhitespaces:Se(r.preserveWhitespaces)})}var s,a=null,u=[],c=[],l=r.selector;K.isTypeOf(r)?(a=(s=r).changeDetection,s.viewProviders&&(u=this._getProvidersMetadata(s.viewProviders,c,'viewProviders for "'+Ml(t)+'"',[],t)),s.entryComponents&&(c=kl(s.entryComponents).map(function(t){return e._getEntryComponentMetadata(t)}).concat(c)),l||(l=this._schemaRegistry.getDefaultComponentElementName())):l||(this._reportError(Ae("Directive "+Ml(t)+" has no selector, please add it!"),t),l="error");var p=[];null!=r.providers&&(p=this._getProvidersMetadata(r.providers,c,'providers for "'+Ml(t)+'"',[],t));var h=[],f=[];null!=r.queries&&(h=this._getQueriesMetadata(r.queries,!1,t),f=this._getQueriesMetadata(r.queries,!0,t));var d=cn.create({isHost:!1,selector:l,exportAs:Se(r.exportAs),isComponent:!!i,type:this._getTypeMetadata(t),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:c,componentViewType:i?this.getComponentViewClass(t):null,rendererType:i?this.getRendererType(t):null,componentFactory:null});return i&&(d.componentFactory=this.getComponentFactory(l,t,d.inputs,d.outputs)),this._nonNormalizedDirectiveCache.set(t,n={metadata:d,annotation:r}),n},t.prototype.getDirectiveMetadata=function(t){var e=this._directiveCache.get(t);return e||this._reportError(Ae("Illegal state: getDirectiveMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Directive "+Ml(t)+"."),t),e},t.prototype.getDirectiveSummary=function(t){var e=this._loadSummary(t,en.Directive);return e||this._reportError(Ae("Illegal state: Could not load the summary for directive "+Ml(t)+"."),t),e},t.prototype.isDirective=function(t){return!!this._loadSummary(t,en.Directive)||this._directiveResolver.isDirective(t)},t.prototype.isPipe=function(t){return!!this._loadSummary(t,en.Pipe)||this._pipeResolver.isPipe(t)},t.prototype.isNgModule=function(t){return!!this._loadSummary(t,en.NgModule)||this._ngModuleResolver.isNgModule(t)},t.prototype.getNgModuleSummary=function(t,e){void 0===e&&(e=null);var n=this._loadSummary(t,en.NgModule);if(!n){var r=this.getNgModuleMetadata(t,!1,e);(n=r?r.toSummary():null)&&this._summaryCache.set(t,n)}return n},t.prototype.loadNgModuleDirectiveAndPipeMetadata=function(t,e,n){var r=this;void 0===n&&(n=!0);var i=this.getNgModuleMetadata(t,n),o=[];return i&&(i.declaredDirectives.forEach(function(n){var i=r.loadDirectiveMetadata(t,n.reference,e);i&&o.push(i)}),i.declaredPipes.forEach(function(t){return r._loadPipeMetadata(t.reference)})),Promise.all(o)},t.prototype.getShallowModuleMetadata=function(t){var e=this._shallowModuleCache.get(t);if(e)return e;var n=Gc(this._reflector.shallowAnnotations(t),$.isTypeOf);return e={type:this._getTypeMetadata(t),rawExports:n.exports,rawImports:n.imports,rawProviders:n.providers},this._shallowModuleCache.set(t,e),e},t.prototype.getNgModuleMetadata=function(t,e,n){var r=this;void 0===e&&(e=!0),void 0===n&&(n=null),t=Re(t);var i=this._ngModuleCache.get(t);if(i)return i;var o=this._ngModuleResolver.resolve(t,e);if(!o)return null;var s=[],a=[],u=[],c=[],l=[],p=[],h=[],d=[],v=[];o.imports&&kl(o.imports).forEach(function(e){var i=void 0;if(Ol(e)?i=e:e&&e.ngModule&&(i=e.ngModule,e.providers&&p.push.apply(p,f(r._getProvidersMetadata(e.providers,h,"provider for the NgModule '"+Ml(i)+"'",[],e)))),i){if(!r._checkSelfImport(t,i))if(n||(n=new Set),n.has(i))r._reportError(Ae(r._getTypeDescriptor(i)+" '"+Ml(e)+"' is imported recursively by the module '"+Ml(t)+"'."),t);else{n.add(i);var o=r.getNgModuleSummary(i,n);n.delete(i),o?c.push(o):r._reportError(Ae("Unexpected "+r._getTypeDescriptor(e)+" '"+Ml(e)+"' imported by the module '"+Ml(t)+"'. Please add a @NgModule annotation."),t)}}else r._reportError(Ae("Unexpected value '"+Ml(e)+"' imported by the module '"+Ml(t)+"'"),t)}),o.exports&&kl(o.exports).forEach(function(e){if(Ol(e))if(n||(n=new Set),n.has(e))r._reportError(Ae(r._getTypeDescriptor(e)+" '"+De(e)+"' is exported recursively by the module '"+Ml(t)+"'"),t);else{n.add(e);var i=r.getNgModuleSummary(e,n);n.delete(e),i?l.push(i):a.push(r._getIdentifierMetadata(e))}else r._reportError(Ae("Unexpected value '"+Ml(e)+"' exported by the module '"+Ml(t)+"'"),t)});var y=this._getTransitiveNgModuleMetadata(c,l);o.declarations&&kl(o.declarations).forEach(function(e){if(Ol(e)){var n=r._getIdentifierMetadata(e);if(r.isDirective(e))y.addDirective(n),s.push(n),r._addTypeToModule(e,t);else{if(!r.isPipe(e))return void r._reportError(Ae("Unexpected "+r._getTypeDescriptor(e)+" '"+Ml(e)+"' declared by the module '"+Ml(t)+"'. Please add a @Pipe/@Directive/@Component annotation."),t);y.addPipe(n),y.pipes.push(n),u.push(n),r._addTypeToModule(e,t)}}else r._reportError(Ae("Unexpected value '"+Ml(e)+"' declared by the module '"+Ml(t)+"'"),t)});var m=[],g=[];return a.forEach(function(e){if(y.directivesSet.has(e.reference))m.push(e),y.addExportedDirective(e);else{if(!y.pipesSet.has(e.reference))return void r._reportError(Ae("Can't export "+r._getTypeDescriptor(e.reference)+" "+Ml(e.reference)+" from "+Ml(t)+" as it was neither declared nor imported!"),t);g.push(e),y.addExportedPipe(e)}}),o.providers&&p.push.apply(p,f(this._getProvidersMetadata(o.providers,h,"provider for the NgModule '"+Ml(t)+"'",[],t))),o.entryComponents&&h.push.apply(h,f(kl(o.entryComponents).map(function(t){return r._getEntryComponentMetadata(t)}))),o.bootstrap&&kl(o.bootstrap).forEach(function(e){Ol(e)?d.push(r._getIdentifierMetadata(e)):r._reportError(Ae("Unexpected value '"+Ml(e)+"' used in the bootstrap property of module '"+Ml(t)+"'"),t)}),h.push.apply(h,f(d.map(function(t){return r._getEntryComponentMetadata(t.reference)}))),o.schemas&&v.push.apply(v,f(kl(o.schemas))),i=new pn({type:this._getTypeMetadata(t),providers:p,entryComponents:h,bootstrapComponents:d,schemas:v,declaredDirectives:s,exportedDirectives:m,declaredPipes:u,exportedPipes:g,importedModules:c,exportedModules:l,transitiveModule:y,id:o.id||null}),h.forEach(function(t){return y.addEntryComponent(t)}),p.forEach(function(t){return y.addProvider(t,i.type)}),y.addModule(i.type),this._ngModuleCache.set(t,i),i},t.prototype._checkSelfImport=function(t,e){return t===e&&(this._reportError(Ae("'"+Ml(t)+"' module can't import itself"),t),!0)},t.prototype._getTypeDescriptor=function(t){if(Ol(t)){if(this.isDirective(t))return"directive";if(this.isPipe(t))return"pipe";if(this.isNgModule(t))return"module"}return t.provide?"provider":"value"},t.prototype._addTypeToModule=function(t,e){var n=this._ngModuleOfTypes.get(t);n&&n!==e?this._reportError(Ae("Type "+Ml(t)+" is part of the declarations of 2 modules: "+Ml(n)+" and "+Ml(e)+"! Please consider moving "+Ml(t)+" to a higher module that imports "+Ml(n)+" and "+Ml(e)+". You can also create a new NgModule that exports and includes "+Ml(t)+" then import that NgModule in "+Ml(n)+" and "+Ml(e)+"."),e):this._ngModuleOfTypes.set(t,e)},t.prototype._getTransitiveNgModuleMetadata=function(t,e){var n=new hn,r=new Map;return t.concat(e).forEach(function(t){t.modules.forEach(function(t){return n.addModule(t)}),t.entryComponents.forEach(function(t){return n.addEntryComponent(t)});var e=new Set;t.providers.forEach(function(t){var i=sn(t.provider.token),o=r.get(i);o||(o=new Set,r.set(i,o));var s=t.module.reference;!e.has(i)&&o.has(s)||(o.add(s),e.add(i),n.addProvider(t.provider,t.module))})}),e.forEach(function(t){t.exportedDirectives.forEach(function(t){return n.addExportedDirective(t)}),t.exportedPipes.forEach(function(t){return n.addExportedPipe(t)})}),t.forEach(function(t){t.exportedDirectives.forEach(function(t){return n.addDirective(t)}),t.exportedPipes.forEach(function(t){return n.addPipe(t)})}),n},t.prototype._getIdentifierMetadata=function(t){return{reference:t=Re(t)}},t.prototype.isInjectable=function(t){return this._reflector.tryAnnotations(t).some(function(t){return Y.isTypeOf(t)})},t.prototype.getInjectableSummary=function(t){return{summaryKind:en.Injectable,type:this._getTypeMetadata(t,null,!1)}},t.prototype.getInjectableMetadata=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!0);var r=this._loadSummary(t,en.Injectable),i=r?r.type:this._getTypeMetadata(t,e,n),o=this._reflector.annotations(t).filter(function(t){return Y.isTypeOf(t)});if(0===o.length)return null;var s=o[o.length-1];return{symbol:t,type:i,providedIn:s.providedIn,useValue:s.useValue,useClass:s.useClass,useExisting:s.useExisting,useFactory:s.useFactory,deps:s.deps}},t.prototype._getTypeMetadata=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!0);var r=this._getIdentifierMetadata(t);return{reference:r.reference,diDeps:this._getDependenciesMetadata(r.reference,e,n),lifecycleHooks:function i(t,e){return no.filter(function(n){return function r(t,e,n){return t.hasLifecycleHook(n,function r(t){switch(t){case Yi.OnInit:return"ngOnInit";case Yi.OnDestroy:return"ngOnDestroy";case Yi.DoCheck:return"ngDoCheck";case Yi.OnChanges:return"ngOnChanges";case Yi.AfterContentInit:return"ngAfterContentInit";case Yi.AfterContentChecked:return"ngAfterContentChecked";case Yi.AfterViewInit:return"ngAfterViewInit";case Yi.AfterViewChecked:return"ngAfterViewChecked";default:throw new Error("unexpected "+t)}}
|
|
466
466
|
/**
|
|
467
467
|
* @license
|
|
468
468
|
* Copyright Google Inc. All Rights Reserved.
|
|
469
469
|
*
|
|
470
470
|
* Use of this source code is governed by an MIT-style license that can be
|
|
471
471
|
* found in the LICENSE file at https://angular.io/license
|
|
472
|
-
*/(e))}(t,n,e)})}(this._reflector,r.reference)}},t.prototype._getFactoryMetadata=function(t,e){return void 0===e&&(e=null),{reference:t=De(t),diDeps:this._getDependenciesMetadata(t,e)}},t.prototype.getPipeMetadata=function(t){var e=this._pipeCache.get(t);return e||this._reportError(Ae("Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe "+Ml(t)+"."),t),e||null},t.prototype.getPipeSummary=function(t){var e=this._loadSummary(t,en.Pipe);return e||this._reportError(Ae("Illegal state: Could not load the summary for pipe "+Ml(t)+"."),t),e},t.prototype.getOrLoadPipeMetadata=function(t){var e=this._pipeCache.get(t);return e||(e=this._loadPipeMetadata(t)),e},t.prototype._loadPipeMetadata=function(t){t=De(t);var e=this._pipeResolver.resolve(t),n=new ln({type:this._getTypeMetadata(t),name:e.name,pure:!!e.pure});return this._pipeCache.set(t,n),this._summaryCache.set(t,n.toSummary()),n},t.prototype._getDependenciesMetadata=function(t,e,n){var r=this;void 0===n&&(n=!0);var i=!1,o=(e||this._reflector.parameters(t)||[]).map(function(t){var e=!1,n=!1,o=!1,s=!1,a=!1,u=null;return Array.isArray(t)?t.forEach(function(t){et.isTypeOf(t)?n=!0:J.isTypeOf(t)?o=!0:tt.isTypeOf(t)?s=!0:Z.isTypeOf(t)?a=!0:D.isTypeOf(t)?(e=!0,u=t.attributeName):M.isTypeOf(t)?u=t.token:R.isTypeOf(t)||t instanceof Ye?u=t:Ol(t)&&null==u&&(u=t)}):u=t,null==u?(i=!0,null):{isAttribute:e,isHost:n,isSelf:o,isSkipSelf:s,isOptional:a,token:r._getTokenMetadata(u)}});if(i){var s=o.map(function(t){return t?Ml(t.token):"?"}).join(", "),a="Can't resolve all parameters for "+Ml(t)+": ("+s+").";n||this._config.strictInjectionParameters?this._reportError(Ae(a),t):this._console.warn("Warning: "+a+" This will become an error in Angular v6.x")}return o},t.prototype._getTokenMetadata=function(t){return"string"==typeof(t=De(t))?{value:t}:{identifier:{reference:t}}},t.prototype._getProvidersMetadata=function(t,e,n,r,i){var o=this;return void 0===r&&(r=[]),t.forEach(function(s,a){if(Array.isArray(s))o._getProvidersMetadata(s,e,n,r);else{var u=void 0;if((s=De(s))&&"object"==typeof s&&s.hasOwnProperty("provide"))o._validateProvider(s),u=new dn(s.provide,s);else{if(!Ol(s)){if(void 0===s)return void o._reportError(Ae("Encountered undefined provider! Usually this means you have a circular dependencies. This might be caused by using 'barrel' index.ts files."));var c=t.reduce(function(t,e,n){return n<a?t.push(""+Ml(e)):n==a?t.push("?"+Ml(e)+"?"):n==a+1&&t.push("..."),t},[]).join(", ");return void o._reportError(Ae("Invalid "+(n||"provider")+" - only instances of Provider and Type are allowed, got: ["+c+"]"),i)}u=new dn(s,{useClass:s})}u.token===o._reflector.resolveExternalReference(Ge.ANALYZE_FOR_ENTRY_COMPONENTS)?e.push.apply(e,f(o._getEntryComponentsFromProvider(u,i))):r.push(o.getProviderMetadata(u))}}),r},t.prototype._validateProvider=function(t){t.hasOwnProperty("useClass")&&null==t.useClass&&this._reportError(Ae("Invalid provider for "+Ml(t.provide)+". useClass cannot be "+t.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."))},t.prototype._getEntryComponentsFromProvider=function(t,e){var n=this,r=[],i=[];return t.useFactory||t.useExisting||t.useClass?(this._reportError(Ae("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!"),e),[]):t.multi?(function o(t,e){we(t,new Il,e)}(t.useValue,i),i.forEach(function(t){var e=n._getEntryComponentMetadata(t.reference,!1);e&&r.push(e)}),r):(this._reportError(Ae("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!"),e),[])},t.prototype._getEntryComponentMetadata=function(t,e){void 0===e&&(e=!0);var n=this.getNonNormalizedDirectiveMetadata(t);if(n&&n.metadata.isComponent)return{componentType:t,componentFactory:n.metadata.componentFactory};var r=this._loadSummary(t,en.Directive);if(r&&r.isComponent)return{componentType:t,componentFactory:r.componentFactory};if(e)throw Ae(t.name+" cannot be used as an entry component.");return null},t.prototype._getInjectableTypeMetadata=function(t,e){void 0===e&&(e=null);var n=this._loadSummary(t,en.Injectable);return n?n.type:this._getTypeMetadata(t,e)},t.prototype.getProviderMetadata=function(t){var e=void 0,n=null,r=null,i=this._getTokenMetadata(t.token);return t.useClass?(e=(n=this._getInjectableTypeMetadata(t.useClass,t.dependencies)).diDeps,t.token===t.useClass&&(i={identifier:n})):t.useFactory&&(e=(r=this._getFactoryMetadata(t.useFactory,t.dependencies)).diDeps),{token:i,useClass:n,useValue:t.useValue,useFactory:r,useExisting:t.useExisting?this._getTokenMetadata(t.useExisting):void 0,deps:e,multi:t.multi}},t.prototype._getQueriesMetadata=function(t,e,n){var r=this,i=[];return Object.keys(t).forEach(function(o){var s=t[o];s.isViewQuery===e&&i.push(r._getQueryMetadata(s,o,n))}),i},t.prototype._queryVarBindings=function(t){return t.split(/\s*,\s*/)},t.prototype._getQueryMetadata=function(t,e,n){var r,i=this;return"string"==typeof t.selector?r=this._queryVarBindings(t.selector).map(function(t){return i._getTokenMetadata(t)}):t.selector?r=[this._getTokenMetadata(t.selector)]:(this._reportError(Ae("Can't construct a query for the property \""+e+'" of "'+Ml(n)+"\" since the query selector wasn't defined."),n),r=[]),{selectors:r,first:t.first,descendants:t.descendants,propertyName:e,read:t.read?this._getTokenMetadata(t.read):null}},t.prototype._reportError=function(t,e,n){if(!this._errorCollector)throw t;this._errorCollector(t,e),n&&this._errorCollector(t,n)},t}();function kl(t){return function e(t){return t?Array.from(new Set(t)):[]}(function t(e,n){if(void 0===n&&(n=[]),e)for(var r=0;r<e.length;r++){var i=De(e[r]);Array.isArray(i)?t(i,n):n.push(i)}return n}(t))}function Ol(t){return t instanceof Ye||t instanceof nt}var Il=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.visitOther=function(t,e){e.push({reference:t})},e}(Ce);function Ml(t){return t instanceof Ye?t.name+" in "+t.filePath:Re(t)}var Rl=function(t){function e(e,n){return t.call(this,n,e)||this}return o(e,t),e}(qo),Dl=function Dl(t,e){var n=this;this.reflector=t,this.component=e,this.errors=[],this.viewQueries=function r(t){var e=1,n=new Map;return t.viewQueries&&t.viewQueries.forEach(function(t){return Fl(n,{meta:t,queryId:e++})}),n}(e),this.viewProviders=new Map,e.viewProviders.forEach(function(t){null==n.viewProviders.get(sn(t.token))&&n.viewProviders.set(sn(t.token),!0)})},Ll=function(){function t(t,e,n,r,i,o,s,a,u){var c=this;this.viewContext=t,this._parent=e,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(t){return c._attrs[t.name]=t.value});var l=r.map(function(t){return t.directive});if(this._allProviders=function p(t,e,n){var r=new Map;return t.forEach(function(t){jl([{token:{identifier:t.type},useClass:t.type}],t.isComponent?Ec.Component:Ec.Directive,!0,e,n,r,!1)}),t.filter(function(t){return t.isComponent}).concat(t.filter(function(t){return!t.isComponent})).forEach(function(t){jl(t.providers,Ec.PublicService,!1,e,n,r,!1),jl(t.viewProviders,Ec.PrivateService,!1,e,n,r,!1)}),r}(l,u,t.errors),this._contentQueries=function h(t,e){var n=t,r=new Map;return e.forEach(function(t,e){t.queries&&t.queries.forEach(function(t){return Fl(r,{meta:t,queryId:n++})})}),r}(a,l),Array.from(this._allProviders.values()).forEach(function(t){c._addQueryReadsTo(t.token,t.token,c._queriedTokens)}),s){var f=$e(this.viewContext.reflector,Ge.TemplateRef);this._addQueryReadsTo(f,f,this._queriedTokens)}o.forEach(function(t){var e=t.value||$e(c.viewContext.reflector,Ge.ElementRef);c._addQueryReadsTo({value:t.name},e,c._queriedTokens)}),this._queriedTokens.get(this.viewContext.reflector.resolveExternalReference(Ge.ViewContainerRef))&&(this.transformedHasViewContainer=!0),Array.from(this._allProviders.values()).forEach(function(t){(t.eager||c._queriedTokens.get(sn(t.token)))&&c._getOrCreateLocalProvider(t.providerType,t.token,!0)})}return t.prototype.afterElement=function(){var t=this;Array.from(this._allProviders.values()).forEach(function(e){t._getOrCreateLocalProvider(e.providerType,e.token,!1)})},Object.defineProperty(t.prototype,"transformProviders",{get:function(){var t=[],e=[];return this._transformedProviders.forEach(function(n){n.eager?e.push(n):t.push(n)}),t.concat(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"transformedDirectiveAsts",{get:function(){var t=this.transformProviders.map(function(t){return t.token.identifier}),e=this._directiveAsts.slice();return e.sort(function(e,n){return t.indexOf(e.directive.type)-t.indexOf(n.directive.type)}),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryMatches",{get:function(){var t=[];return this._queriedTokens.forEach(function(e){t.push.apply(t,f(e))}),t},enumerable:!0,configurable:!0}),t.prototype._addQueryReadsTo=function(t,e,n){this._getQueriesFor(t).forEach(function(t){var r=t.meta.read||e,i=sn(r),o=n.get(i);o||n.set(i,o=[]),o.push({queryId:t.queryId,value:r})})},t.prototype._getQueriesFor=function(t){for(var e,n=[],r=this,i=0;null!==r;)(e=r._contentQueries.get(sn(t)))&&n.push.apply(n,f(e.filter(function(t){return t.meta.descendants||i<=1}))),r._directiveAsts.length>0&&i++,r=r._parent;return(e=this.viewContext.viewQueries.get(sn(t)))&&n.push.apply(n,f(e)),n},t.prototype._getOrCreateLocalProvider=function(t,e,n){var r=this,i=this._allProviders.get(sn(e));if(!i||(t===Ec.Directive||t===Ec.PublicService)&&i.providerType===Ec.PrivateService||(t===Ec.PrivateService||t===Ec.PublicService)&&i.providerType===Ec.Builtin)return null;var o=this._transformedProviders.get(sn(e));if(o)return o;if(null!=this._seenProviders.get(sn(e)))return this.viewContext.errors.push(new Rl("Cannot instantiate cyclic dependency! "+on(e),this._sourceSpan)),null;this._seenProviders.set(sn(e),!0);var s=i.providers.map(function(t){var e=t.useValue,o=t.useExisting,s=void 0;if(null!=t.useExisting){var a=r._getDependency(i.providerType,{token:t.useExisting},n);null!=a.token?o=a.token:(o=null,e=a.value)}else t.useFactory?s=(t.deps||t.useFactory.diDeps).map(function(t){return r._getDependency(i.providerType,t,n)}):t.useClass&&(s=(t.deps||t.useClass.diDeps).map(function(t){return r._getDependency(i.providerType,t,n)}));return function u(t,e){return{token:t.token,useClass:t.useClass,useExisting:e.useExisting,useFactory:t.useFactory,useValue:e.useValue,deps:e.deps,multi:t.multi}}(t,{useExisting:o,useValue:e,deps:s})});return o=function a(t,e){return new Lc(t.token,t.multiProvider,t.eager||e.eager,e.providers,t.providerType,t.lifecycleHooks,t.sourceSpan,t.isModule)}(i,{eager:n,providers:s}),this._transformedProviders.set(sn(e),o),o},t.prototype._getLocalDependency=function(t,e,n){if(void 0===n&&(n=!1),e.isAttribute){var r=this._attrs[e.token.value];return{isValue:!0,value:null==r?null:r}}if(null!=e.token){if(t===Ec.Directive||t===Ec.Component){if(sn(e.token)===this.viewContext.reflector.resolveExternalReference(Ge.Renderer)||sn(e.token)===this.viewContext.reflector.resolveExternalReference(Ge.ElementRef)||sn(e.token)===this.viewContext.reflector.resolveExternalReference(Ge.ChangeDetectorRef)||sn(e.token)===this.viewContext.reflector.resolveExternalReference(Ge.TemplateRef))return e;sn(e.token)===this.viewContext.reflector.resolveExternalReference(Ge.ViewContainerRef)&&(this.transformedHasViewContainer=!0)}if(sn(e.token)===this.viewContext.reflector.resolveExternalReference(Ge.Injector))return e;if(null!=this._getOrCreateLocalProvider(t,e.token,n))return e}return null},t.prototype._getDependency=function(t,e,n){void 0===n&&(n=!1);var r=this,i=n,o=null;if(e.isSkipSelf||(o=this._getLocalDependency(t,e,n)),e.isSelf)!o&&e.isOptional&&(o={isValue:!0,value:null});else{for(;!o&&r._parent;){var s=r;r=r._parent,s._isViewRoot&&(i=!1),o=r._getLocalDependency(Ec.PublicService,e,i)}o||(o=!e.isHost||this.viewContext.component.isHost||this.viewContext.component.type.reference===sn(e.token)||null!=this.viewContext.viewProviders.get(sn(e.token))?e:e.isOptional?{isValue:!0,value:null}:null)}return o||this.viewContext.errors.push(new Rl("No provider for "+on(e.token),this._sourceSpan)),o},t}();function jl(t,e,n,r,i,o,s){t.forEach(function(t){var a=o.get(sn(t.token));null!=a&&!!a.multiProvider!=!!t.multi&&i.push(new Rl("Mixing multi and non multi provider is not possible for token "+on(a.token),r)),a?(t.multi||(a.providers.length=0),a.providers.push(t)):(a=new Lc(t.token,!!t.multi,n||!(t.useClass||t.useExisting||t.useFactory),[t],e,t.token.identifier&&t.token.identifier.lifecycleHooks?t.token.identifier.lifecycleHooks:[],r,s),o.set(sn(t.token),a))})}function Fl(t,e){e.meta.selectors.forEach(function(n){var r=t.get(sn(n));r||(r=[],t.set(sn(n),r)),r.push(e)})}
|
|
472
|
+
*/(e))}(t,n,e)})}(this._reflector,r.reference)}},t.prototype._getFactoryMetadata=function(t,e){return void 0===e&&(e=null),{reference:t=Re(t),diDeps:this._getDependenciesMetadata(t,e)}},t.prototype.getPipeMetadata=function(t){var e=this._pipeCache.get(t);return e||this._reportError(Ae("Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe "+Ml(t)+"."),t),e||null},t.prototype.getPipeSummary=function(t){var e=this._loadSummary(t,en.Pipe);return e||this._reportError(Ae("Illegal state: Could not load the summary for pipe "+Ml(t)+"."),t),e},t.prototype.getOrLoadPipeMetadata=function(t){var e=this._pipeCache.get(t);return e||(e=this._loadPipeMetadata(t)),e},t.prototype._loadPipeMetadata=function(t){t=Re(t);var e=this._pipeResolver.resolve(t),n=new ln({type:this._getTypeMetadata(t),name:e.name,pure:!!e.pure});return this._pipeCache.set(t,n),this._summaryCache.set(t,n.toSummary()),n},t.prototype._getDependenciesMetadata=function(t,e,n){var r=this;void 0===n&&(n=!0);var i=!1,o=(e||this._reflector.parameters(t)||[]).map(function(t){var e=!1,n=!1,o=!1,s=!1,a=!1,u=null;return Array.isArray(t)?t.forEach(function(t){et.isTypeOf(t)?n=!0:J.isTypeOf(t)?o=!0:tt.isTypeOf(t)?s=!0:Z.isTypeOf(t)?a=!0:R.isTypeOf(t)?(e=!0,u=t.attributeName):M.isTypeOf(t)?u=t.token:D.isTypeOf(t)||t instanceof Ye?u=t:Ol(t)&&null==u&&(u=t)}):u=t,null==u?(i=!0,null):{isAttribute:e,isHost:n,isSelf:o,isSkipSelf:s,isOptional:a,token:r._getTokenMetadata(u)}});if(i){var s=o.map(function(t){return t?Ml(t.token):"?"}).join(", "),a="Can't resolve all parameters for "+Ml(t)+": ("+s+").";n||this._config.strictInjectionParameters?this._reportError(Ae(a),t):this._console.warn("Warning: "+a+" This will become an error in Angular v6.x")}return o},t.prototype._getTokenMetadata=function(t){return"string"==typeof(t=Re(t))?{value:t}:{identifier:{reference:t}}},t.prototype._getProvidersMetadata=function(t,e,n,r,i){var o=this;return void 0===r&&(r=[]),t.forEach(function(s,a){if(Array.isArray(s))o._getProvidersMetadata(s,e,n,r);else{var u=void 0;if((s=Re(s))&&"object"==typeof s&&s.hasOwnProperty("provide"))o._validateProvider(s),u=new dn(s.provide,s);else{if(!Ol(s)){if(void 0===s)return void o._reportError(Ae("Encountered undefined provider! Usually this means you have a circular dependencies. This might be caused by using 'barrel' index.ts files."));var c=t.reduce(function(t,e,n){return n<a?t.push(""+Ml(e)):n==a?t.push("?"+Ml(e)+"?"):n==a+1&&t.push("..."),t},[]).join(", ");return void o._reportError(Ae("Invalid "+(n||"provider")+" - only instances of Provider and Type are allowed, got: ["+c+"]"),i)}u=new dn(s,{useClass:s})}u.token===o._reflector.resolveExternalReference(Ge.ANALYZE_FOR_ENTRY_COMPONENTS)?e.push.apply(e,f(o._getEntryComponentsFromProvider(u,i))):r.push(o.getProviderMetadata(u))}}),r},t.prototype._validateProvider=function(t){t.hasOwnProperty("useClass")&&null==t.useClass&&this._reportError(Ae("Invalid provider for "+Ml(t.provide)+". useClass cannot be "+t.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."))},t.prototype._getEntryComponentsFromProvider=function(t,e){var n=this,r=[],i=[];return t.useFactory||t.useExisting||t.useClass?(this._reportError(Ae("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!"),e),[]):t.multi?(function o(t,e){we(t,new Il,e)}(t.useValue,i),i.forEach(function(t){var e=n._getEntryComponentMetadata(t.reference,!1);e&&r.push(e)}),r):(this._reportError(Ae("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!"),e),[])},t.prototype._getEntryComponentMetadata=function(t,e){void 0===e&&(e=!0);var n=this.getNonNormalizedDirectiveMetadata(t);if(n&&n.metadata.isComponent)return{componentType:t,componentFactory:n.metadata.componentFactory};var r=this._loadSummary(t,en.Directive);if(r&&r.isComponent)return{componentType:t,componentFactory:r.componentFactory};if(e)throw Ae(t.name+" cannot be used as an entry component.");return null},t.prototype._getInjectableTypeMetadata=function(t,e){void 0===e&&(e=null);var n=this._loadSummary(t,en.Injectable);return n?n.type:this._getTypeMetadata(t,e)},t.prototype.getProviderMetadata=function(t){var e=void 0,n=null,r=null,i=this._getTokenMetadata(t.token);return t.useClass?(e=(n=this._getInjectableTypeMetadata(t.useClass,t.dependencies)).diDeps,t.token===t.useClass&&(i={identifier:n})):t.useFactory&&(e=(r=this._getFactoryMetadata(t.useFactory,t.dependencies)).diDeps),{token:i,useClass:n,useValue:t.useValue,useFactory:r,useExisting:t.useExisting?this._getTokenMetadata(t.useExisting):void 0,deps:e,multi:t.multi}},t.prototype._getQueriesMetadata=function(t,e,n){var r=this,i=[];return Object.keys(t).forEach(function(o){var s=t[o];s.isViewQuery===e&&i.push(r._getQueryMetadata(s,o,n))}),i},t.prototype._queryVarBindings=function(t){return t.split(/\s*,\s*/)},t.prototype._getQueryMetadata=function(t,e,n){var r,i=this;return"string"==typeof t.selector?r=this._queryVarBindings(t.selector).map(function(t){return i._getTokenMetadata(t)}):t.selector?r=[this._getTokenMetadata(t.selector)]:(this._reportError(Ae("Can't construct a query for the property \""+e+'" of "'+Ml(n)+"\" since the query selector wasn't defined."),n),r=[]),{selectors:r,first:t.first,descendants:t.descendants,propertyName:e,read:t.read?this._getTokenMetadata(t.read):null}},t.prototype._reportError=function(t,e,n){if(!this._errorCollector)throw t;this._errorCollector(t,e),n&&this._errorCollector(t,n)},t}();function kl(t){return function e(t){return t?Array.from(new Set(t)):[]}(function t(e,n){if(void 0===n&&(n=[]),e)for(var r=0;r<e.length;r++){var i=Re(e[r]);Array.isArray(i)?t(i,n):n.push(i)}return n}(t))}function Ol(t){return t instanceof Ye||t instanceof nt}var Il=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.visitOther=function(t,e){e.push({reference:t})},e}(Ce);function Ml(t){return t instanceof Ye?t.name+" in "+t.filePath:De(t)}var Dl=function(t){function e(e,n){return t.call(this,n,e)||this}return o(e,t),e}(qo),Rl=function Rl(t,e){var n=this;this.reflector=t,this.component=e,this.errors=[],this.viewQueries=function r(t){var e=1,n=new Map;return t.viewQueries&&t.viewQueries.forEach(function(t){return Fl(n,{meta:t,queryId:e++})}),n}(e),this.viewProviders=new Map,e.viewProviders.forEach(function(t){null==n.viewProviders.get(sn(t.token))&&n.viewProviders.set(sn(t.token),!0)})},Ll=function(){function t(t,e,n,r,i,o,s,a,u){var c=this;this.viewContext=t,this._parent=e,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(t){return c._attrs[t.name]=t.value});var l=r.map(function(t){return t.directive});if(this._allProviders=function p(t,e,n){var r=new Map;return t.forEach(function(t){jl([{token:{identifier:t.type},useClass:t.type}],t.isComponent?Ec.Component:Ec.Directive,!0,e,n,r,!1)}),t.filter(function(t){return t.isComponent}).concat(t.filter(function(t){return!t.isComponent})).forEach(function(t){jl(t.providers,Ec.PublicService,!1,e,n,r,!1),jl(t.viewProviders,Ec.PrivateService,!1,e,n,r,!1)}),r}(l,u,t.errors),this._contentQueries=function h(t,e){var n=t,r=new Map;return e.forEach(function(t,e){t.queries&&t.queries.forEach(function(t){return Fl(r,{meta:t,queryId:n++})})}),r}(a,l),Array.from(this._allProviders.values()).forEach(function(t){c._addQueryReadsTo(t.token,t.token,c._queriedTokens)}),s){var f=$e(this.viewContext.reflector,Ge.TemplateRef);this._addQueryReadsTo(f,f,this._queriedTokens)}o.forEach(function(t){var e=t.value||$e(c.viewContext.reflector,Ge.ElementRef);c._addQueryReadsTo({value:t.name},e,c._queriedTokens)}),this._queriedTokens.get(this.viewContext.reflector.resolveExternalReference(Ge.ViewContainerRef))&&(this.transformedHasViewContainer=!0),Array.from(this._allProviders.values()).forEach(function(t){(t.eager||c._queriedTokens.get(sn(t.token)))&&c._getOrCreateLocalProvider(t.providerType,t.token,!0)})}return t.prototype.afterElement=function(){var t=this;Array.from(this._allProviders.values()).forEach(function(e){t._getOrCreateLocalProvider(e.providerType,e.token,!1)})},Object.defineProperty(t.prototype,"transformProviders",{get:function(){var t=[],e=[];return this._transformedProviders.forEach(function(n){n.eager?e.push(n):t.push(n)}),t.concat(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"transformedDirectiveAsts",{get:function(){var t=this.transformProviders.map(function(t){return t.token.identifier}),e=this._directiveAsts.slice();return e.sort(function(e,n){return t.indexOf(e.directive.type)-t.indexOf(n.directive.type)}),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryMatches",{get:function(){var t=[];return this._queriedTokens.forEach(function(e){t.push.apply(t,f(e))}),t},enumerable:!0,configurable:!0}),t.prototype._addQueryReadsTo=function(t,e,n){this._getQueriesFor(t).forEach(function(t){var r=t.meta.read||e,i=sn(r),o=n.get(i);o||n.set(i,o=[]),o.push({queryId:t.queryId,value:r})})},t.prototype._getQueriesFor=function(t){for(var e,n=[],r=this,i=0;null!==r;)(e=r._contentQueries.get(sn(t)))&&n.push.apply(n,f(e.filter(function(t){return t.meta.descendants||i<=1}))),r._directiveAsts.length>0&&i++,r=r._parent;return(e=this.viewContext.viewQueries.get(sn(t)))&&n.push.apply(n,f(e)),n},t.prototype._getOrCreateLocalProvider=function(t,e,n){var r=this,i=this._allProviders.get(sn(e));if(!i||(t===Ec.Directive||t===Ec.PublicService)&&i.providerType===Ec.PrivateService||(t===Ec.PrivateService||t===Ec.PublicService)&&i.providerType===Ec.Builtin)return null;var o=this._transformedProviders.get(sn(e));if(o)return o;if(null!=this._seenProviders.get(sn(e)))return this.viewContext.errors.push(new Dl("Cannot instantiate cyclic dependency! "+on(e),this._sourceSpan)),null;this._seenProviders.set(sn(e),!0);var s=i.providers.map(function(t){var e=t.useValue,o=t.useExisting,s=void 0;if(null!=t.useExisting){var a=r._getDependency(i.providerType,{token:t.useExisting},n);null!=a.token?o=a.token:(o=null,e=a.value)}else t.useFactory?s=(t.deps||t.useFactory.diDeps).map(function(t){return r._getDependency(i.providerType,t,n)}):t.useClass&&(s=(t.deps||t.useClass.diDeps).map(function(t){return r._getDependency(i.providerType,t,n)}));return function u(t,e){return{token:t.token,useClass:t.useClass,useExisting:e.useExisting,useFactory:t.useFactory,useValue:e.useValue,deps:e.deps,multi:t.multi}}(t,{useExisting:o,useValue:e,deps:s})});return o=function a(t,e){return new Lc(t.token,t.multiProvider,t.eager||e.eager,e.providers,t.providerType,t.lifecycleHooks,t.sourceSpan,t.isModule)}(i,{eager:n,providers:s}),this._transformedProviders.set(sn(e),o),o},t.prototype._getLocalDependency=function(t,e,n){if(void 0===n&&(n=!1),e.isAttribute){var r=this._attrs[e.token.value];return{isValue:!0,value:null==r?null:r}}if(null!=e.token){if(t===Ec.Directive||t===Ec.Component){if(sn(e.token)===this.viewContext.reflector.resolveExternalReference(Ge.Renderer)||sn(e.token)===this.viewContext.reflector.resolveExternalReference(Ge.ElementRef)||sn(e.token)===this.viewContext.reflector.resolveExternalReference(Ge.ChangeDetectorRef)||sn(e.token)===this.viewContext.reflector.resolveExternalReference(Ge.TemplateRef))return e;sn(e.token)===this.viewContext.reflector.resolveExternalReference(Ge.ViewContainerRef)&&(this.transformedHasViewContainer=!0)}if(sn(e.token)===this.viewContext.reflector.resolveExternalReference(Ge.Injector))return e;if(null!=this._getOrCreateLocalProvider(t,e.token,n))return e}return null},t.prototype._getDependency=function(t,e,n){void 0===n&&(n=!1);var r=this,i=n,o=null;if(e.isSkipSelf||(o=this._getLocalDependency(t,e,n)),e.isSelf)!o&&e.isOptional&&(o={isValue:!0,value:null});else{for(;!o&&r._parent;){var s=r;r=r._parent,s._isViewRoot&&(i=!1),o=r._getLocalDependency(Ec.PublicService,e,i)}o||(o=!e.isHost||this.viewContext.component.isHost||this.viewContext.component.type.reference===sn(e.token)||null!=this.viewContext.viewProviders.get(sn(e.token))?e:e.isOptional?{isValue:!0,value:null}:null)}return o||this.viewContext.errors.push(new Dl("No provider for "+on(e.token),this._sourceSpan)),o},t}();function jl(t,e,n,r,i,o,s){t.forEach(function(t){var a=o.get(sn(t.token));null!=a&&!!a.multiProvider!=!!t.multi&&i.push(new Dl("Mixing multi and non multi provider is not possible for token "+on(a.token),r)),a?(t.multi||(a.providers.length=0),a.providers.push(t)):(a=new Lc(t.token,!!t.multi,n||!(t.useClass||t.useExisting||t.useFactory),[t],e,t.token.identifier&&t.token.identifier.lifecycleHooks?t.token.identifier.lifecycleHooks:[],r,s),o.set(sn(t.token),a))})}function Fl(t,e){e.meta.selectors.forEach(function(n){var r=t.get(sn(n));r||(r=[],t.set(sn(n),r)),r.push(e)})}
|
|
473
473
|
/**
|
|
474
474
|
* @license
|
|
475
475
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -483,7 +483,7 @@ var wc,Ec,Sc=function(){function t(t,e,n){this.value=t,this.ngContentIndex=e,thi
|
|
|
483
483
|
*
|
|
484
484
|
* Use of this source code is governed by an MIT-style license that can be
|
|
485
485
|
* found in the LICENSE file at https://angular.io/license
|
|
486
|
-
*/le("_l");var Vl=function(){function t(t){this._reflector=t}return t.prototype.isNgModule=function(t){return this._reflector.annotations(t).some($.isTypeOf)},t.prototype.resolve=function(t,e){void 0===e&&(e=!0);var n=Gc(this._reflector.annotations(t),$.isTypeOf);if(n)return n;if(e)throw new Error("No NgModule metadata found for '"+
|
|
486
|
+
*/le("_l");var Vl=function(){function t(t){this._reflector=t}return t.prototype.isNgModule=function(t){return this._reflector.annotations(t).some($.isTypeOf)},t.prototype.resolve=function(t,e){void 0===e&&(e=!0);var n=Gc(this._reflector.annotations(t),$.isTypeOf);if(n)return n;if(e)throw new Error("No NgModule metadata found for '"+De(t)+"'.");return null},t}(),Bl=(function(t){function e(e,n){var r=t.call(this,!1)||this;return r.referenceFilter=e,r.importFilter=n,r.typeExpression=0,r.importsWithPrefixes=new Map,r.reexports=new Map,r}o(e,t),e.prototype.visitType=function(t,e,n){void 0===n&&(n="any"),t?(this.typeExpression++,t.visitType(this,e),this.typeExpression--):e.print(null,n)},e.prototype.visitLiteralExpr=function(e,n){var r=e.value;return null==r&&e.type!=ft?(n.print(e,"("+r+" as any)"),null):t.prototype.visitLiteralExpr.call(this,e,n)},e.prototype.visitLiteralArrayExpr=function(e,n){0===e.entries.length&&n.print(e,"(");var r=t.prototype.visitLiteralArrayExpr.call(this,e,n);return 0===e.entries.length&&n.print(e," as any[])"),r},e.prototype.visitExternalExpr=function(t,e){return this._visitIdentifier(t.value,t.typeParams,e),null},e.prototype.visitAssertNotNullExpr=function(e,n){var r=t.prototype.visitAssertNotNullExpr.call(this,e,n);return n.print(e,"!"),r},e.prototype.visitDeclareVarStmt=function(t,e){if(t.hasModifier(At.Exported)&&t.value instanceof Mt&&!t.type){var n=t.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:t.name}),null}}return t.hasModifier(At.Exported)&&e.print(t,"export "),t.hasModifier(At.Final)?e.print(t,"const"):e.print(t,"var"),e.print(t," "+t.name),this._printColonType(t.type,e),t.value&&(e.print(t," = "),t.value.visitExpression(this,e)),e.println(t,";"),null},e.prototype.visitWrappedNodeExpr=function(t,e){throw new Error("Cannot visit a WrappedNodeExpr when outputting Typescript.")},e.prototype.visitCastExpr=function(t,e){return e.print(t,"(<"),t.type.visitType(this,e),e.print(t,">"),t.value.visitExpression(this,e),e.print(t,")"),null},e.prototype.visitInstantiateExpr=function(t,e){return e.print(t,"new "),this.typeExpression++,t.classExpr.visitExpression(this,e),this.typeExpression--,e.print(t,"("),this.visitAllExpressions(t.args,e,","),e.print(t,")"),null},e.prototype.visitDeclareClassStmt=function(t,e){var n=this;return e.pushClass(t),t.hasModifier(At.Exported)&&e.print(t,"export "),e.print(t,"class "+t.name),null!=t.parent&&(e.print(t," extends "),this.typeExpression++,t.parent.visitExpression(this,e),this.typeExpression--),e.println(t," {"),e.incIndent(),t.fields.forEach(function(t){return n._visitClassField(t,e)}),null!=t.constructorMethod&&this._visitClassConstructor(t,e),t.getters.forEach(function(t){return n._visitClassGetter(t,e)}),t.methods.forEach(function(t){return n._visitClassMethod(t,e)}),e.decIndent(),e.println(t,"}"),e.popClass(),null},e.prototype._visitClassField=function(t,e){t.hasModifier(At.Private)&&e.print(null,"/*private*/ "),t.hasModifier(At.Static)&&e.print(null,"static "),e.print(null,t.name),this._printColonType(t.type,e),t.initializer&&(e.print(null," = "),t.initializer.visitExpression(this,e)),e.println(null,";")},e.prototype._visitClassGetter=function(t,e){t.hasModifier(At.Private)&&e.print(null,"private "),e.print(null,"get "+t.name+"()"),this._printColonType(t.type,e),e.println(null," {"),e.incIndent(),this.visitAllStatements(t.body,e),e.decIndent(),e.println(null,"}")},e.prototype._visitClassConstructor=function(t,e){e.print(t,"constructor("),this._visitParams(t.constructorMethod.params,e),e.println(t,") {"),e.incIndent(),this.visitAllStatements(t.constructorMethod.body,e),e.decIndent(),e.println(t,"}")},e.prototype._visitClassMethod=function(t,e){t.hasModifier(At.Private)&&e.print(null,"private "),e.print(null,t.name+"("),this._visitParams(t.params,e),e.print(null,")"),this._printColonType(t.type,e,"void"),e.println(null," {"),e.incIndent(),this.visitAllStatements(t.body,e),e.decIndent(),e.println(null,"}")},e.prototype.visitFunctionExpr=function(t,e){return t.name&&(e.print(t,"function "),e.print(t,t.name)),e.print(t,"("),this._visitParams(t.params,e),e.print(t,")"),this._printColonType(t.type,e,"void"),t.name||e.print(t," => "),e.println(t,"{"),e.incIndent(),this.visitAllStatements(t.statements,e),e.decIndent(),e.print(t,"}"),null},e.prototype.visitDeclareFunctionStmt=function(t,e){return t.hasModifier(At.Exported)&&e.print(t,"export "),e.print(t,"function "+t.name+"("),this._visitParams(t.params,e),e.print(t,")"),this._printColonType(t.type,e,"void"),e.println(t," {"),e.incIndent(),this.visitAllStatements(t.statements,e),e.decIndent(),e.println(t,"}"),null},e.prototype.visitTryCatchStmt=function(t,e){e.println(t,"try {"),e.incIndent(),this.visitAllStatements(t.bodyStmts,e),e.decIndent(),e.println(t,"} catch ("+Qr.name+") {"),e.incIndent();var n=[Gr.set(Qr.prop("stack",null)).toDeclStmt(null,[At.Final])].concat(t.catchStmts);return this.visitAllStatements(n,e),e.decIndent(),e.println(t,"}"),null},e.prototype.visitBuiltinType=function(t,e){var n;switch(t.name){case st.Bool:n="boolean";break;case st.Dynamic:n="any";break;case st.Function:n="Function";break;case st.Number:case st.Int:n="number";break;case st.String:n="string";break;case st.None:n="never";break;default:throw new Error("Unsupported builtin type "+t.name)}return e.print(null,n),null},e.prototype.visitExpressionType=function(t,e){var n=this;return t.value.visitExpression(this,e),null!==t.typeParams&&(e.print(null,"<"),this.visitAllObjects(function(t){return n.visitType(t,e)},t.typeParams,e,","),e.print(null,">")),null},e.prototype.visitArrayType=function(t,e){return this.visitType(t.of,e),e.print(null,"[]"),null},e.prototype.visitMapType=function(t,e){return e.print(null,"{[key: string]:"),this.visitType(t.valueType,e),e.print(null,"}"),null},e.prototype.getBuiltinMethodName=function(t){var e;switch(t){case xt.ConcatArray:e="concat";break;case xt.SubscribeObservable:e="subscribe";break;case xt.Bind:e="bind";break;default:throw new Error("Unknown builtin method: "+t)}return e},e.prototype._visitParams=function(t,e){var n=this;this.visitAllObjects(function(t){e.print(null,t.name),n._printColonType(t.type,e)},t,e,",")},e.prototype._visitIdentifier=function(t,e,n){var r=this,i=t.name,o=t.moduleName;if(this.referenceFilter&&this.referenceFilter(t))n.print(null,"(null as any)");else{if(o&&(!this.importFilter||!this.importFilter(t))){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&&(e||[]).length>0&&(n.print(null,"<"),this.visitAllObjects(function(t){return t.visitType(r,n)},e,n,","),n.print(null,">"))}},e.prototype._printColonType=function(t,e,n){t!==ft&&(e.print(null,":"),this.visitType(t,e,n))}}(Yr),function(){function t(t){this._reflector=t}return t.prototype.isPipe=function(t){var e=this._reflector.annotations(Re(t));return e&&e.some(W.isTypeOf)},t.prototype.resolve=function(t,e){void 0===e&&(e=!0);var n=this._reflector.annotations(Re(t));if(n){var r=Gc(n,W.isTypeOf);if(r)return r}if(e)throw new Error("No Pipe decorator found on "+De(t));return null},t}()),Hl=["zero","one","two","few","many","other"];
|
|
487
487
|
/**
|
|
488
488
|
* @license
|
|
489
489
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -504,7 +504,7 @@ var wc,Ec,Sc=function(){function t(t,e,n){this.value=t,this.ngContentIndex=e,thi
|
|
|
504
504
|
*
|
|
505
505
|
* Use of this source code is governed by an MIT-style license that can be
|
|
506
506
|
* found in the LICENSE file at https://angular.io/license
|
|
507
|
-
*/(a)),this.tryParseHtml(this.expandHtml(a),t,n,r,i)},t.prototype.tryParseHtml=function(t,e,n,r,i){var o,s=t.errors,a=[];if(t.rootNodes.length>0){var u=ap(n),c=ap(r),l=new Dl(this._reflector,e),p=void 0;e.template&&e.template.interpolation&&(p={start:e.template.interpolation[0],end:e.template.interpolation[1]});var h=new ja(this._exprParser,p,this._schemaRegistry,c,s),d=new Jl(this._reflector,this._config,l,u,h,this._schemaRegistry,i,s);o=$s(d,t.rootNodes,ip),s.push.apply(s,f(l.errors)),a.push.apply(a,f(h.getUsedPipes()))}else o=[];return this._assertNoReferenceDuplicationOnTemplate(o,s),s.length>0?new Yl(o,a,s):(this.transforms&&this.transforms.forEach(function(t){o=Bc(t,o)}),new Yl(o,a,s))},t.prototype.expandHtml=function(t,e){void 0===e&&(e=!1);var n=t.errors;if(0==n.length||e){var r=ql(t.rootNodes);n.push.apply(n,f(r.errors)),t=new va(r.nodes,n)}return t},t.prototype.getInterpolationConfig=function(t){if(t.template)return Ds.fromArray(t.template.interpolation)},t.prototype._assertNoReferenceDuplicationOnTemplate=function(t,e){var n=[];t.filter(function(t){return!!t.references}).forEach(function(t){return t.references.forEach(function(t){var r=t.name;if(n.indexOf(r)<0)n.push(r);else{var i=new $l('Reference "#'+r+'" is defined several times',t.sourceSpan,Fo.ERROR);e.push(i)}})})},t}(),Jl=function(){function t(t,e,n,r,i,o,s,a){var u=this;this.reflector=t,this.config=e,this.providerViewContext=n,this._bindingParser=i,this._schemaRegistry=o,this._schemas=s,this._targetErrors=a,this.selectorMatcher=new k,this.directivesIndex=new Map,this.ngContentCount=0,this.contentQueryStartId=n.component.viewQueries.length+1,r.forEach(function(t,e){var n=N.parse(t.selector);u.selectorMatcher.addSelectables(n,t),u.directivesIndex.set(t,e)})}return t.prototype.visitExpansion=function(t,e){return null},t.prototype.visitExpansionCase=function(t,e){return null},t.prototype.visitText=function(t,e){var n=e.findNgContentIndex(Xl()),r=Sa(t.value),i=this._bindingParser.parseInterpolation(r,t.sourceSpan);return i?new Cc(i,n,t.sourceSpan):new Sc(r,n,t.sourceSpan)},t.prototype.visitAttribute=function(t,e){return new Tc(t.name,t.value,t.sourceSpan)},t.prototype.visitComment=function(t,e){return null},t.prototype.visitElement=function(t,e){var n=this,r=this.contentQueryStartId,i=t.name,o=du(t);if(o.type===eu.SCRIPT||o.type===eu.STYLE)return null;if(o.type===eu.STYLESHEET&&tu(o.hrefAttr))return null;var s=[],a=[],u=[],c=[],l=[],p=[],h=[],d=[],v=!1,y=[],g=m(t.name);t.attrs.forEach(function(t){var e,r,i=n._parseAttr(g,t,s,a,l,u,c);c.push.apply(c,f([].map(function(t){return Oc.fromParsedVariable(t)})));var o=n._normalizeAttributeName(t.name);o.startsWith("*")&&(e=t.value,r=o.substring("*".length));var m=null!=e;if(m){v&&n._reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",t.sourceSpan),v=!0;var _=[];n._bindingParser.parseInlineTemplateBinding(r,e,t.sourceSpan,h,p,_),d.push.apply(d,f(_.map(function(t){return Oc.fromParsedVariable(t)})))}i||m||(y.push(n.visitAttribute(t,null)),s.push([t.name,t.value]))});var _=rp(i,s),b=this._parseDirectives(this.selectorMatcher,_),x=b.directives,w=b.matchElement,E=[],S=new Set,C=this._createDirectiveAsts(g,t.name,x,a,u,t.sourceSpan,E,S),T=this._createElementPropertyAsts(t.name,a,S),P=new Ll(this.providerViewContext,e.providerContext,e.isTemplateElement||v,C,y,E,g,r,t.sourceSpan),A=$s(o.nonBindable?op:this,t.children,np.create(g,C,g?e.providerContext:P));P.afterElement();var k,O=""!=o.projectAs?N.parse(o.projectAs)[0]:_,I=e.findNgContentIndex(O);if(o.type===eu.NG_CONTENT)t.children&&!t.children.every(sp)&&this._reportError("<ng-content> element cannot have content.",t.sourceSpan),k=new jc(this.ngContentCount++,v?null:I,t.sourceSpan);else if(g)this._assertAllEventsPublishedByDirectives(C,l),this._assertNoComponentsNorElementBindingsOnTemplate(C,T,t.sourceSpan),k=new Mc(y,l,E,c,P.transformedDirectiveAsts,P.transformProviders,P.transformedHasViewContainer,P.queryMatches,A,v?null:I,t.sourceSpan);else{this._assertElementExists(w,t),this._assertOnlyOneComponent(C,t.sourceSpan);var M=v?null:e.findNgContentIndex(O);k=new Ic(i,y,T,l,E,P.transformedDirectiveAsts,P.transformProviders,P.transformedHasViewContainer,P.queryMatches,A,v?null:M,t.sourceSpan,t.endSourceSpan||null)}if(v){var R=this.contentQueryStartId,D=rp("ng-template",h),L=this._parseDirectives(this.selectorMatcher,D).directives,j=new Set,F=this._createDirectiveAsts(!0,i,L,p,[],t.sourceSpan,[],j),V=this._createElementPropertyAsts(i,p,j);this._assertNoComponentsNorElementBindingsOnTemplate(F,V,t.sourceSpan);var B=new Ll(this.providerViewContext,e.providerContext,e.isTemplateElement,F,[],[],!0,R,t.sourceSpan);B.afterElement(),k=new Mc([],[],[],d,B.transformedDirectiveAsts,B.transformProviders,B.transformedHasViewContainer,B.queryMatches,[k],I,t.sourceSpan)}return k},t.prototype._parseAttr=function(t,e,n,r,i,o,s){var a=this._normalizeAttributeName(e.name),u=e.value,c=e.sourceSpan,l=[],p=a.match(Ql),h=!1;return null!==p?(h=!0,null!=p[1]?this._bindingParser.parsePropertyBinding(p[7],u,!1,c,n,r):p[2]?t?this._parseVariable(p[7],u,c,s):this._reportError('"let-" is only supported on ng-template elements.',c):p[3]?this._parseReference(p[7],u,c,o):p[4]?this._bindingParser.parseEvent(p[7],u,c,n,l):p[5]?(this._bindingParser.parsePropertyBinding(p[7],u,!1,c,n,r),this._parseAssignmentEvent(p[7],u,c,n,l)):p[6]?this._bindingParser.parseLiteralAttr(a,u,c,n,r):p[8]?(this._bindingParser.parsePropertyBinding(p[8],u,!1,c,n,r),this._parseAssignmentEvent(p[8],u,c,n,l)):p[9]?this._bindingParser.parsePropertyBinding(p[9],u,!1,c,n,r):p[10]&&this._bindingParser.parseEvent(p[10],u,c,n,l)):h=this._bindingParser.parsePropertyInterpolation(a,u,c,n,r),h||this._bindingParser.parseLiteralAttr(a,u,c,n,r),i.push.apply(i,f(l.map(function(t){return Nc.fromParsedEvent(t)}))),h},t.prototype._normalizeAttributeName=function(t){return/^data-/i.test(t)?t.substring(5):t},t.prototype._parseVariable=function(t,e,n,r){t.indexOf("-")>-1&&this._reportError('"-" is not allowed in variable names',n),r.push(new Oc(t,e,n))},t.prototype._parseReference=function(t,e,n,r){t.indexOf("-")>-1&&this._reportError('"-" is not allowed in reference names',n),r.push(new ep(t,e,n))},t.prototype._parseAssignmentEvent=function(t,e,n,r,i){this._bindingParser.parseEvent(t+"Change",e+"=$event",n,r,i)},t.prototype._parseDirectives=function(t,e){var n=this,r=new Array(this.directivesIndex.size),i=!1;return t.match(e,function(t,e){r[n.directivesIndex.get(e)]=e,i=i||t.hasElementSelector()}),{directives:r.filter(function(t){return!!t}),matchElement:i}},t.prototype._createDirectiveAsts=function(t,e,n,r,i,o,s,a){var u=this,c=new Set,l=null,p=n.map(function(t){var n=new Ho(o.start,o.end,"Directive "+rn(t.type));t.isComponent&&(l=t);var p=[],h=u._bindingParser.createDirectiveHostPropertyAsts(t,e,n).map(function(t){return Ac.fromBoundProperty(t)});h=u._checkPropertiesInSchema(e,h);var f=u._bindingParser.createDirectiveHostEventAsts(t,n);u._createDirectivePropertyAsts(t.inputs,r,p,a),i.forEach(function(e){(0===e.value.length&&t.isComponent||e.isReferenceToDirective(t))&&(s.push(new kc(e.name,Xe(t.type.reference),e.value,e.sourceSpan)),c.add(e.name))});var d=f.map(function(t){return Nc.fromParsedEvent(t)}),v=u.contentQueryStartId;return u.contentQueryStartId+=t.queries.length,new Dc(t,p,h,d,v,n)});return i.forEach(function(e){if(e.value.length>0)c.has(e.name)||u._reportError('There is no directive with "exportAs" set to "'+e.value+'"',e.sourceSpan);else if(!l){var n=null;t&&(n=$e(u.reflector,Ge.TemplateRef)),s.push(new kc(e.name,n,e.value,e.sourceSpan))}}),p},t.prototype._createDirectivePropertyAsts=function(t,e,n,r){if(t){var i=new Map;e.forEach(function(t){var e=i.get(t.name);e&&!e.isLiteral||i.set(t.name,t)}),Object.keys(t).forEach(function(e){var o=i.get(t[e]);o&&(r.add(o.name),up(o.expression)||n.push(new Rc(e,o.name,o.expression,o.sourceSpan)))})}},t.prototype._createElementPropertyAsts=function(t,e,n){var r=this,i=[];return e.forEach(function(e){if(!e.isLiteral&&!n.has(e.name)){var o=r._bindingParser.createBoundElementProperty(t,e);i.push(Ac.fromBoundProperty(o))}}),this._checkPropertiesInSchema(t,i)},t.prototype._findComponentDirectives=function(t){return t.filter(function(t){return t.directive.isComponent})},t.prototype._findComponentDirectiveNames=function(t){return this._findComponentDirectives(t).map(function(t){return rn(t.directive.type)})},t.prototype._assertOnlyOneComponent=function(t,e){var n=this._findComponentDirectiveNames(t);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(","),e)},t.prototype._assertElementExists=function(t,e){var n=e.name.replace(/^:xhtml:/,"");if(!t&&!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,e.sourceSpan)}},t.prototype._assertNoComponentsNorElementBindingsOnTemplate=function(t,e,n){var r=this,i=this._findComponentDirectiveNames(t);i.length>0&&this._reportError("Components on an embedded template: "+i.join(","),n),e.forEach(function(t){r._reportError("Property binding "+t.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)})},t.prototype._assertAllEventsPublishedByDirectives=function(t,e){var n=this,r=new Set;t.forEach(function(t){Object.keys(t.directive.outputs).forEach(function(e){r.add(t.directive.outputs[e])})}),e.forEach(function(t){null==t.target&&r.has(t.name)||n._reportError("Event binding "+t.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".',t.sourceSpan)})},t.prototype._checkPropertiesInSchema=function(t,e){var n=this;return e.filter(function(e){if(0===e.type&&!n._schemaRegistry.hasProperty(t,e.name,n._schemas)){var r="Can't bind to '"+e.name+"' since it isn't a known property of '"+t+"'.";t.startsWith("ng-")?r+="\n1. If '"+e.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.":t.indexOf("-")>-1&&(r+="\n1. If '"+t+"' is an Angular component and it has '"+e.name+"' input, then verify that it is part of this module.\n2. If '"+t+"' 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,e.sourceSpan)}return!up(e.value)})},t.prototype._reportError=function(t,e,n){void 0===n&&(n=Fo.ERROR),this._targetErrors.push(new qo(e,t,n))},t}(),tp=function(){function t(){}return t.prototype.visitElement=function(t,e){var n=du(t);if(n.type===eu.SCRIPT||n.type===eu.STYLE||n.type===eu.STYLESHEET)return null;var r=t.attrs.map(function(t){return[t.name,t.value]}),i=rp(t.name,r),o=e.findNgContentIndex(i),s=$s(this,t.children,ip);return new Ic(t.name,$s(this,t.attrs),[],[],[],[],[],!1,[],s,o,t.sourceSpan,t.endSourceSpan)},t.prototype.visitComment=function(t,e){return null},t.prototype.visitAttribute=function(t,e){return new Tc(t.name,t.value,t.sourceSpan)},t.prototype.visitText=function(t,e){var n=e.findNgContentIndex(Xl());return new Sc(t.value,n,t.sourceSpan)},t.prototype.visitExpansion=function(t,e){return t},t.prototype.visitExpansionCase=function(t,e){return t},t}(),ep=function(){function t(t,e,n){this.name=t,this.value=e,this.sourceSpan=n}return t.prototype.isReferenceToDirective=function(t){return-1!==function e(t){return t?t.split(",").map(function(t){return t.trim()}):[]}(t.exportAs).indexOf(this.value)},t}(),np=function(){function t(t,e,n,r){this.isTemplateElement=t,this._ngContentIndexMatcher=e,this._wildcardNgContentIndex=n,this.providerContext=r}return t.create=function(e,n,r){var i=new k,o=null,s=n.find(function(t){return t.directive.isComponent});if(s)for(var a=s.directive.template.ngContentSelectors,u=0;u<a.length;u++)"*"===a[u]?o=u:i.addSelectables(N.parse(a[u]),u);return new t(e,i,o,r)},t.prototype.findNgContentIndex=function(t){var e=[];return this._ngContentIndexMatcher.match(t,function(t,n){e.push(n)}),e.sort(),null!=this._wildcardNgContentIndex&&e.push(this._wildcardNgContentIndex),e.length>0?e[0]:null},t}();function rp(t,e){var n=new N,r=d(t)[1];n.setElement(r);for(var i=0;i<e.length;i++){var o=e[i][0],s=d(o)[1],a=e[i][1];n.addAttribute(s,a),o.toLowerCase()==Gl&&a.trim().split(/\s+/g).forEach(function(t){return n.addClassName(t)})}return n}var ip=new np(!0,new k,null,null),op=new tp;function sp(t){return t instanceof Ks&&0==t.value.trim().length}function ap(t){var e=new Map;return t.forEach(function(t){e.get(t.type.reference)||e.set(t.type.reference,t)}),Array.from(e.values())}function up(t){return t instanceof Ai&&(t=t.ast),t instanceof ui}
|
|
507
|
+
*/(a)),this.tryParseHtml(this.expandHtml(a),t,n,r,i)},t.prototype.tryParseHtml=function(t,e,n,r,i){var o,s=t.errors,a=[];if(t.rootNodes.length>0){var u=ap(n),c=ap(r),l=new Rl(this._reflector,e),p=void 0;e.template&&e.template.interpolation&&(p={start:e.template.interpolation[0],end:e.template.interpolation[1]});var h=new ja(this._exprParser,p,this._schemaRegistry,c,s),d=new Jl(this._reflector,this._config,l,u,h,this._schemaRegistry,i,s);o=$s(d,t.rootNodes,ip),s.push.apply(s,f(l.errors)),a.push.apply(a,f(h.getUsedPipes()))}else o=[];return this._assertNoReferenceDuplicationOnTemplate(o,s),s.length>0?new Yl(o,a,s):(this.transforms&&this.transforms.forEach(function(t){o=Bc(t,o)}),new Yl(o,a,s))},t.prototype.expandHtml=function(t,e){void 0===e&&(e=!1);var n=t.errors;if(0==n.length||e){var r=ql(t.rootNodes);n.push.apply(n,f(r.errors)),t=new va(r.nodes,n)}return t},t.prototype.getInterpolationConfig=function(t){if(t.template)return Rs.fromArray(t.template.interpolation)},t.prototype._assertNoReferenceDuplicationOnTemplate=function(t,e){var n=[];t.filter(function(t){return!!t.references}).forEach(function(t){return t.references.forEach(function(t){var r=t.name;if(n.indexOf(r)<0)n.push(r);else{var i=new $l('Reference "#'+r+'" is defined several times',t.sourceSpan,Fo.ERROR);e.push(i)}})})},t}(),Jl=function(){function t(t,e,n,r,i,o,s,a){var u=this;this.reflector=t,this.config=e,this.providerViewContext=n,this._bindingParser=i,this._schemaRegistry=o,this._schemas=s,this._targetErrors=a,this.selectorMatcher=new k,this.directivesIndex=new Map,this.ngContentCount=0,this.contentQueryStartId=n.component.viewQueries.length+1,r.forEach(function(t,e){var n=N.parse(t.selector);u.selectorMatcher.addSelectables(n,t),u.directivesIndex.set(t,e)})}return t.prototype.visitExpansion=function(t,e){return null},t.prototype.visitExpansionCase=function(t,e){return null},t.prototype.visitText=function(t,e){var n=e.findNgContentIndex(Xl()),r=Sa(t.value),i=this._bindingParser.parseInterpolation(r,t.sourceSpan);return i?new Cc(i,n,t.sourceSpan):new Sc(r,n,t.sourceSpan)},t.prototype.visitAttribute=function(t,e){return new Tc(t.name,t.value,t.sourceSpan)},t.prototype.visitComment=function(t,e){return null},t.prototype.visitElement=function(t,e){var n=this,r=this.contentQueryStartId,i=t.name,o=du(t);if(o.type===eu.SCRIPT||o.type===eu.STYLE)return null;if(o.type===eu.STYLESHEET&&tu(o.hrefAttr))return null;var s=[],a=[],u=[],c=[],l=[],p=[],h=[],d=[],v=!1,y=[],g=m(t.name);t.attrs.forEach(function(t){var e,r,i=n._parseAttr(g,t,s,a,l,u,c);c.push.apply(c,f([].map(function(t){return Oc.fromParsedVariable(t)})));var o=n._normalizeAttributeName(t.name);o.startsWith("*")&&(e=t.value,r=o.substring("*".length));var m=null!=e;if(m){v&&n._reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",t.sourceSpan),v=!0;var _=[];n._bindingParser.parseInlineTemplateBinding(r,e,t.sourceSpan,h,p,_),d.push.apply(d,f(_.map(function(t){return Oc.fromParsedVariable(t)})))}i||m||(y.push(n.visitAttribute(t,null)),s.push([t.name,t.value]))});var _=rp(i,s),b=this._parseDirectives(this.selectorMatcher,_),x=b.directives,w=b.matchElement,E=[],S=new Set,C=this._createDirectiveAsts(g,t.name,x,a,u,t.sourceSpan,E,S),T=this._createElementPropertyAsts(t.name,a,S),P=new Ll(this.providerViewContext,e.providerContext,e.isTemplateElement||v,C,y,E,g,r,t.sourceSpan),A=$s(o.nonBindable?op:this,t.children,np.create(g,C,g?e.providerContext:P));P.afterElement();var k,O=""!=o.projectAs?N.parse(o.projectAs)[0]:_,I=e.findNgContentIndex(O);if(o.type===eu.NG_CONTENT)t.children&&!t.children.every(sp)&&this._reportError("<ng-content> element cannot have content.",t.sourceSpan),k=new jc(this.ngContentCount++,v?null:I,t.sourceSpan);else if(g)this._assertAllEventsPublishedByDirectives(C,l),this._assertNoComponentsNorElementBindingsOnTemplate(C,T,t.sourceSpan),k=new Mc(y,l,E,c,P.transformedDirectiveAsts,P.transformProviders,P.transformedHasViewContainer,P.queryMatches,A,v?null:I,t.sourceSpan);else{this._assertElementExists(w,t),this._assertOnlyOneComponent(C,t.sourceSpan);var M=v?null:e.findNgContentIndex(O);k=new Ic(i,y,T,l,E,P.transformedDirectiveAsts,P.transformProviders,P.transformedHasViewContainer,P.queryMatches,A,v?null:M,t.sourceSpan,t.endSourceSpan||null)}if(v){var D=this.contentQueryStartId,R=rp("ng-template",h),L=this._parseDirectives(this.selectorMatcher,R).directives,j=new Set,F=this._createDirectiveAsts(!0,i,L,p,[],t.sourceSpan,[],j),V=this._createElementPropertyAsts(i,p,j);this._assertNoComponentsNorElementBindingsOnTemplate(F,V,t.sourceSpan);var B=new Ll(this.providerViewContext,e.providerContext,e.isTemplateElement,F,[],[],!0,D,t.sourceSpan);B.afterElement(),k=new Mc([],[],[],d,B.transformedDirectiveAsts,B.transformProviders,B.transformedHasViewContainer,B.queryMatches,[k],I,t.sourceSpan)}return k},t.prototype._parseAttr=function(t,e,n,r,i,o,s){var a=this._normalizeAttributeName(e.name),u=e.value,c=e.sourceSpan,l=[],p=a.match(Ql),h=!1;return null!==p?(h=!0,null!=p[1]?this._bindingParser.parsePropertyBinding(p[7],u,!1,c,n,r):p[2]?t?this._parseVariable(p[7],u,c,s):this._reportError('"let-" is only supported on ng-template elements.',c):p[3]?this._parseReference(p[7],u,c,o):p[4]?this._bindingParser.parseEvent(p[7],u,c,n,l):p[5]?(this._bindingParser.parsePropertyBinding(p[7],u,!1,c,n,r),this._parseAssignmentEvent(p[7],u,c,n,l)):p[6]?this._bindingParser.parseLiteralAttr(a,u,c,n,r):p[8]?(this._bindingParser.parsePropertyBinding(p[8],u,!1,c,n,r),this._parseAssignmentEvent(p[8],u,c,n,l)):p[9]?this._bindingParser.parsePropertyBinding(p[9],u,!1,c,n,r):p[10]&&this._bindingParser.parseEvent(p[10],u,c,n,l)):h=this._bindingParser.parsePropertyInterpolation(a,u,c,n,r),h||this._bindingParser.parseLiteralAttr(a,u,c,n,r),i.push.apply(i,f(l.map(function(t){return Nc.fromParsedEvent(t)}))),h},t.prototype._normalizeAttributeName=function(t){return/^data-/i.test(t)?t.substring(5):t},t.prototype._parseVariable=function(t,e,n,r){t.indexOf("-")>-1&&this._reportError('"-" is not allowed in variable names',n),r.push(new Oc(t,e,n))},t.prototype._parseReference=function(t,e,n,r){t.indexOf("-")>-1&&this._reportError('"-" is not allowed in reference names',n),r.push(new ep(t,e,n))},t.prototype._parseAssignmentEvent=function(t,e,n,r,i){this._bindingParser.parseEvent(t+"Change",e+"=$event",n,r,i)},t.prototype._parseDirectives=function(t,e){var n=this,r=new Array(this.directivesIndex.size),i=!1;return t.match(e,function(t,e){r[n.directivesIndex.get(e)]=e,i=i||t.hasElementSelector()}),{directives:r.filter(function(t){return!!t}),matchElement:i}},t.prototype._createDirectiveAsts=function(t,e,n,r,i,o,s,a){var u=this,c=new Set,l=null,p=n.map(function(t){var n=new Ho(o.start,o.end,"Directive "+rn(t.type));t.isComponent&&(l=t);var p=[],h=u._bindingParser.createDirectiveHostPropertyAsts(t,e,n).map(function(t){return Ac.fromBoundProperty(t)});h=u._checkPropertiesInSchema(e,h);var f=u._bindingParser.createDirectiveHostEventAsts(t,n);u._createDirectivePropertyAsts(t.inputs,r,p,a),i.forEach(function(e){(0===e.value.length&&t.isComponent||e.isReferenceToDirective(t))&&(s.push(new kc(e.name,Xe(t.type.reference),e.value,e.sourceSpan)),c.add(e.name))});var d=f.map(function(t){return Nc.fromParsedEvent(t)}),v=u.contentQueryStartId;return u.contentQueryStartId+=t.queries.length,new Rc(t,p,h,d,v,n)});return i.forEach(function(e){if(e.value.length>0)c.has(e.name)||u._reportError('There is no directive with "exportAs" set to "'+e.value+'"',e.sourceSpan);else if(!l){var n=null;t&&(n=$e(u.reflector,Ge.TemplateRef)),s.push(new kc(e.name,n,e.value,e.sourceSpan))}}),p},t.prototype._createDirectivePropertyAsts=function(t,e,n,r){if(t){var i=new Map;e.forEach(function(t){var e=i.get(t.name);e&&!e.isLiteral||i.set(t.name,t)}),Object.keys(t).forEach(function(e){var o=i.get(t[e]);o&&(r.add(o.name),up(o.expression)||n.push(new Dc(e,o.name,o.expression,o.sourceSpan)))})}},t.prototype._createElementPropertyAsts=function(t,e,n){var r=this,i=[];return e.forEach(function(e){if(!e.isLiteral&&!n.has(e.name)){var o=r._bindingParser.createBoundElementProperty(t,e);i.push(Ac.fromBoundProperty(o))}}),this._checkPropertiesInSchema(t,i)},t.prototype._findComponentDirectives=function(t){return t.filter(function(t){return t.directive.isComponent})},t.prototype._findComponentDirectiveNames=function(t){return this._findComponentDirectives(t).map(function(t){return rn(t.directive.type)})},t.prototype._assertOnlyOneComponent=function(t,e){var n=this._findComponentDirectiveNames(t);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(","),e)},t.prototype._assertElementExists=function(t,e){var n=e.name.replace(/^:xhtml:/,"");if(!t&&!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,e.sourceSpan)}},t.prototype._assertNoComponentsNorElementBindingsOnTemplate=function(t,e,n){var r=this,i=this._findComponentDirectiveNames(t);i.length>0&&this._reportError("Components on an embedded template: "+i.join(","),n),e.forEach(function(t){r._reportError("Property binding "+t.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)})},t.prototype._assertAllEventsPublishedByDirectives=function(t,e){var n=this,r=new Set;t.forEach(function(t){Object.keys(t.directive.outputs).forEach(function(e){r.add(t.directive.outputs[e])})}),e.forEach(function(t){null==t.target&&r.has(t.name)||n._reportError("Event binding "+t.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".',t.sourceSpan)})},t.prototype._checkPropertiesInSchema=function(t,e){var n=this;return e.filter(function(e){if(0===e.type&&!n._schemaRegistry.hasProperty(t,e.name,n._schemas)){var r="Can't bind to '"+e.name+"' since it isn't a known property of '"+t+"'.";t.startsWith("ng-")?r+="\n1. If '"+e.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.":t.indexOf("-")>-1&&(r+="\n1. If '"+t+"' is an Angular component and it has '"+e.name+"' input, then verify that it is part of this module.\n2. If '"+t+"' 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,e.sourceSpan)}return!up(e.value)})},t.prototype._reportError=function(t,e,n){void 0===n&&(n=Fo.ERROR),this._targetErrors.push(new qo(e,t,n))},t}(),tp=function(){function t(){}return t.prototype.visitElement=function(t,e){var n=du(t);if(n.type===eu.SCRIPT||n.type===eu.STYLE||n.type===eu.STYLESHEET)return null;var r=t.attrs.map(function(t){return[t.name,t.value]}),i=rp(t.name,r),o=e.findNgContentIndex(i),s=$s(this,t.children,ip);return new Ic(t.name,$s(this,t.attrs),[],[],[],[],[],!1,[],s,o,t.sourceSpan,t.endSourceSpan)},t.prototype.visitComment=function(t,e){return null},t.prototype.visitAttribute=function(t,e){return new Tc(t.name,t.value,t.sourceSpan)},t.prototype.visitText=function(t,e){var n=e.findNgContentIndex(Xl());return new Sc(t.value,n,t.sourceSpan)},t.prototype.visitExpansion=function(t,e){return t},t.prototype.visitExpansionCase=function(t,e){return t},t}(),ep=function(){function t(t,e,n){this.name=t,this.value=e,this.sourceSpan=n}return t.prototype.isReferenceToDirective=function(t){return-1!==function e(t){return t?t.split(",").map(function(t){return t.trim()}):[]}(t.exportAs).indexOf(this.value)},t}(),np=function(){function t(t,e,n,r){this.isTemplateElement=t,this._ngContentIndexMatcher=e,this._wildcardNgContentIndex=n,this.providerContext=r}return t.create=function(e,n,r){var i=new k,o=null,s=n.find(function(t){return t.directive.isComponent});if(s)for(var a=s.directive.template.ngContentSelectors,u=0;u<a.length;u++)"*"===a[u]?o=u:i.addSelectables(N.parse(a[u]),u);return new t(e,i,o,r)},t.prototype.findNgContentIndex=function(t){var e=[];return this._ngContentIndexMatcher.match(t,function(t,n){e.push(n)}),e.sort(),null!=this._wildcardNgContentIndex&&e.push(this._wildcardNgContentIndex),e.length>0?e[0]:null},t}();function rp(t,e){var n=new N,r=d(t)[1];n.setElement(r);for(var i=0;i<e.length;i++){var o=e[i][0],s=d(o)[1],a=e[i][1];n.addAttribute(s,a),o.toLowerCase()==Gl&&a.trim().split(/\s+/g).forEach(function(t){return n.addClassName(t)})}return n}var ip=new np(!0,new k,null,null),op=new tp;function sp(t){return t instanceof Ks&&0==t.value.trim().length}function ap(t){var e=new Map;return t.forEach(function(t){e.get(t.type.reference)||e.set(t.type.reference,t)}),Array.from(e.values())}function up(t){return t instanceof Ai&&(t=t.ast),t instanceof ui}
|
|
508
508
|
/**
|
|
509
509
|
* @license
|
|
510
510
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -540,7 +540,7 @@ var wc,Ec,Sc=function(){function t(t,e,n){this.value=t,this.ngContentIndex=e,thi
|
|
|
540
540
|
* Use of this source code is governed by an MIT-style license that can be
|
|
541
541
|
* found in the LICENSE file at https://angular.io/license
|
|
542
542
|
*/
|
|
543
|
-
var yp="ngFormattedMessage",mp="@angular/core",gp=/^\$.*\$$/,_p={__symbolic:"ignore"},bp=new Set(["useValue","useFactory","data","id","loadChildren"]);function xp(t){return t&&"ignore"==t.__symbolic}var wp=function(){function t(t,e,n,r,i){void 0===n&&(n=[]),void 0===r&&(r=[]);var o=this;this.summaryResolver=t,this.symbolResolver=e,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(t){return o._registerDecoratorOrConstructor(o.getStaticSymbol(t.filePath,t.name),t.ctor)}),r.forEach(function(t){return o._registerFunction(o.getStaticSymbol(t.filePath,t.name),t.fn)}),this.annotationForParentClassWithSummaryKind.set(en.Directive,[B,K]),this.annotationForParentClassWithSummaryKind.set(en.Pipe,[W]),this.annotationForParentClassWithSummaryKind.set(en.NgModule,[$]),this.annotationForParentClassWithSummaryKind.set(en.Injectable,[Y,W,B,K,$])}return t.prototype.componentModuleUrl=function(t){var e=this.findSymbolDeclaration(t);return this.symbolResolver.getResourcePath(e)},t.prototype.resolveExternalReference=function(t,e){var n=void 0;if(!e){var r=this.resolvedExternalReferences.get(n=t.moduleName+":"+t.name);if(r)return r}var i=this.symbolResolver.getSymbolByModule(t.moduleName,t.name,e),o=this.findSymbolDeclaration(i);return e||(this.symbolResolver.recordModuleNameForFileName(i.filePath,t.moduleName),this.symbolResolver.recordImportAs(o,i)),n&&this.resolvedExternalReferences.set(n,o),o},t.prototype.findDeclaration=function(t,e,n){return this.findSymbolDeclaration(this.symbolResolver.getSymbolByModule(t,e,n))},t.prototype.tryFindDeclaration=function(t,e,n){var r=this;return this.symbolResolver.ignoreErrorsFor(function(){return r.findDeclaration(t,e,n)})},t.prototype.findSymbolDeclaration=function(t){var e=this.symbolResolver.resolveSymbol(t);if(e){var n=e.metadata;if(n&&"resolved"===n.__symbolic&&(n=n.symbol),n instanceof Ye)return this.findSymbolDeclaration(e.metadata)}return t},t.prototype.tryAnnotations=function(t){var e=this.errorRecorder;this.errorRecorder=function(t,e){};try{return this.annotations(t)}finally{this.errorRecorder=e}},t.prototype.annotations=function(t){var e=this;return this._annotations(t,function(t,n){return e.simplify(t,n)},this.annotationCache)},t.prototype.shallowAnnotations=function(t){var e=this;return this._annotations(t,function(t,n){return e.simplify(t,n,!0)},this.shallowAnnotationCache)},t.prototype._annotations=function(t,e,n){var r=n.get(t);if(!r){r=[];var i=this.getTypeMetadata(t),o=this.findParentType(t,i);if(o){var s=this.annotations(o);r.push.apply(r,f(s))}var a=[];if(i.decorators&&(a=e(t,i.decorators))&&r.push.apply(r,f(a)),o&&!this.summaryResolver.isLibraryFile(t.filePath)&&this.summaryResolver.isLibraryFile(o.filePath)){var u=this.summaryResolver.resolveSummary(o);if(u&&u.type){var c=this.annotationForParentClassWithSummaryKind.get(u.type.summaryKind);c.some(function(t){return a.some(function(e){return t.isTypeOf(e)})})||this.reportError(Lp(Sp("Class "+t.name+" in "+t.filePath+" extends from a "+en[u.type.summaryKind]+" in another compilation unit without duplicating the decorator",void 0,"Please add a "+c.map(function(t){return t.ngMetadataName}).join(" or ")+" decorator to the class"),t),t)}}n.set(t,r.filter(function(t){return!!t}))}return r},t.prototype.propMetadata=function(t){var e=this,n=this.propertyCache.get(t);if(!n){var r=this.getTypeMetadata(t);n={};var i=this.findParentType(t,r);if(i){var o=this.propMetadata(i);Object.keys(o).forEach(function(t){n[t]=o[t]})}var s=r.members||{};Object.keys(s).forEach(function(r){var i=s[r].find(function(t){return"property"==t.__symbolic||"method"==t.__symbolic}),o=[];n[r]&&o.push.apply(o,f(n[r])),n[r]=o,i&&i.decorators&&o.push.apply(o,f(e.simplify(t,i.decorators)))}),this.propertyCache.set(t,n)}return n},t.prototype.parameters=function(t){var e=this;if(!(t instanceof Ye))return this.reportError(new Error("parameters received "+JSON.stringify(t)+" which is not a StaticSymbol"),t),[];try{var n=this.parameterCache.get(t);if(!n){var r=this.getTypeMetadata(t),i=this.findParentType(t,r),o=r?r.members:null,s=o?o.__ctor__:null;if(s){var a=s.find(function(t){return"constructor"==t.__symbolic}),u=a.parameters||[],c=this.simplify(t,a.parameterDecorators||[]);n=[],u.forEach(function(r,i){var o=[],s=e.trySimplify(t,r);s&&o.push(s);var a=c?c[i]:null;a&&o.push.apply(o,f(a)),n.push(o)})}else i&&(n=this.parameters(i));n||(n=[]),this.parameterCache.set(t,n)}return n}catch(e){throw console.error("Failed on type "+JSON.stringify(t)+" with error "+e),e}},t.prototype._methodNames=function(t){var e=this.methodCache.get(t);if(!e){var n=this.getTypeMetadata(t);e={};var r=this.findParentType(t,n);if(r){var i=this._methodNames(r);Object.keys(i).forEach(function(t){e[t]=i[t]})}var o=n.members||{};Object.keys(o).forEach(function(t){var n=o[t].some(function(t){return"method"==t.__symbolic});e[t]=e[t]||n}),this.methodCache.set(t,e)}return e},t.prototype._staticMembers=function(t){var e=this.staticCache.get(t);if(!e){var n=this.getTypeMetadata(t);e=Object.keys(n.statics||{}),this.staticCache.set(t,e)}return e},t.prototype.findParentType=function(t,e){var n=this.trySimplify(t,e.extends);if(n instanceof Ye)return n},t.prototype.hasLifecycleHook=function(t,e){t instanceof Ye||this.reportError(new Error("hasLifecycleHook received "+JSON.stringify(t)+" which is not a StaticSymbol"),t);try{return!!this._methodNames(t)[e]}catch(e){throw console.error("Failed on type "+JSON.stringify(t)+" with error "+e),e}},t.prototype.guards=function(t){var e,n;if(!(t instanceof Ye))return this.reportError(new Error("guards received "+JSON.stringify(t)+" which is not a StaticSymbol"),t),{};var r=this._staticMembers(t),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),c=void 0;u.endsWith("UseIf")?(u=a.substr(0,u.length-"UseIf".length),c="UseIf"):c=this.getStaticSymbol(t.filePath,t.name,[a]),i[u]=c}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return i},t.prototype._registerDecoratorOrConstructor=function(t,e){this.conversionMap.set(t,function(t,n){return new(e.bind.apply(e,f([void 0],n)))})},t.prototype._registerFunction=function(t,e){this.conversionMap.set(t,function(t,n){return e.apply(void 0,n)})},t.prototype.initializeConversionMap=function(){this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Injectable"),Y),this.injectionToken=this.findDeclaration(mp,"InjectionToken"),this.opaqueToken=this.findDeclaration(mp,"OpaqueToken"),this.ROUTES=this.tryFindDeclaration("@angular/router","ROUTES"),this.ANALYZE_FOR_ENTRY_COMPONENTS=this.findDeclaration(mp,"ANALYZE_FOR_ENTRY_COMPONENTS"),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Host"),et),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Self"),J),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"SkipSelf"),tt),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Inject"),M),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Optional"),Z),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Attribute"),D),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"ContentChild"),j),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"ContentChildren"),L),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"ViewChild"),V),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"ViewChildren"),F),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Input"),z),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Output"),Q),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Pipe"),W),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"HostBinding"),G),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"HostListener"),X),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Directive"),B),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Component"),K),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"NgModule"),$),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Host"),et),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Self"),J),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"SkipSelf"),tt),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Optional"),Z)},t.prototype.getStaticSymbol=function(t,e,n){return this.symbolResolver.getStaticSymbol(t,e,n)},t.prototype.trySimplify=function(t,e){var n=this.errorRecorder;this.errorRecorder=function(t,e){};var r=this.simplify(t,e);return this.errorRecorder=n,r},t.prototype.simplify=function(t,e,n){void 0===n&&(n=!1);var r,i=this,o=Rp.empty,s=new Map;try{r=function t(e,n,r,a){function u(t){var e=i.symbolResolver.resolveSymbol(t);return e?e.metadata:null}function c(n){return t(e,n,r,0)}function l(n,o){if(n===e)return t(n,o,r+1,a);try{return t(n,o,r+1,a)}catch(t){if(!Cp(t))throw t;var s=t.chain?"references '"+t.symbol.name+"'":function u(t){if(t.summary)return t.summary;switch(t.message){case Tp:if(t.context&&t.context.className)return"references non-exported class "+t.context.className;break;case Pp:return"is not initialized";case Ap:return"is a destructured variable";case Np:return"could not be resolved";case kp:return t.context&&t.context.name?"calls '"+t.context.name+"'":"calls a function";case Op:return t.context&&t.context.name?"references local variable "+t.context.name:"references a local variable"}return"contains the error"}(t);i.error({message:t.message,advise:t.advise,context:t.context,chain:{message:"'"+n.name+"' "+s,position:t.position,next:t.chain},symbol:n},e)}}return function n(h){var d,v,y,m;if(Mp(h))return h;if(h instanceof Array){var g=[];try{for(var _=p(h),b=_.next();!b.done;b=_.next()){var x=b.value;if(x&&"spread"===x.__symbolic){var w=c(x.expression);if(Array.isArray(w)){try{for(var E=p(w),S=E.next();!S.done;S=E.next())g.push(S.value)}catch(t){y={error:t}}finally{try{S&&!S.done&&(m=E.return)&&m.call(E)}finally{if(y)throw y.error}}continue}}var C=n(x);xp(C)||g.push(C)}}catch(t){d={error:t}}finally{try{b&&!b.done&&(v=_.return)&&v.call(_)}finally{if(d)throw d.error}}return g}if(h instanceof Ye)return h===i.injectionToken||i.conversionMap.has(h)||a>0&&!h.members.length?h:null!=(D=u(T=h))?l(T,D):T;if(h){if(h.__symbolic){var T=void 0;switch(h.__symbolic){case"binop":var P=n(h.left);if(xp(P))return P;var A=n(h.right);if(xp(A))return A;switch(h.operator){case"&&":return P&&A;case"||":return P||A;case"|":return P|A;case"^":return P^A;case"&":return P&A;case"==":return P==A;case"!=":return P!=A;case"===":return P===A;case"!==":return P!==A;case"<":return P<A;case">":return P>A;case"<=":return P<=A;case">=":return P>=A;case"<<":return P<<A;case">>":return P>>A;case"+":return P+A;case"-":return P-A;case"*":return P*A;case"/":return P/A;case"%":return P%A}return null;case"if":return n(n(h.condition)?h.thenExpression:h.elseExpression);case"pre":var N=n(h.operand);if(xp(N))return N;switch(h.operator){case"+":return N;case"-":return-N;case"!":return!N;case"~":return~N}return null;case"index":var k=c(h.expression),O=c(h.index);return k&&Mp(O)?k[O]:null;case"select":var I=h.member,M=e,R=n(h.expression);if(R instanceof Ye){var D,L=R.members.concat(I);return null!=(D=u(M=i.getStaticSymbol(R.filePath,R.name,L)))?l(M,D):M}return R&&Mp(I)?l(M,R[I]):null;case"reference":var j=o.resolve(h.name);if(j!=Rp.missing)return j;break;case"resolved":try{return n(h.symbol)}catch(t){throw Cp(t)&&null!=h.fileName&&null!=h.line&&null!=h.character&&(t.position={fileName:h.fileName,line:h.line,column:h.character}),t}case"class":case"function":return e;case"new":case"call":if((T=t(e,h.expression,r+1,0))instanceof Ye){if(T===i.injectionToken||T===i.opaqueToken)return e;var F=h.arguments||[],V=i.conversionMap.get(T);if(V){var B=F.map(function(t){return l(e,t)}).map(function(t){return xp(t)?void 0:t});return V(e,B)}return function H(t,a,u,c){if(a&&"function"==a.__symbolic){s.get(t)&&i.error({message:"Recursion is not supported",summary:"called '"+t.name+"' recursively",value:a},t);try{var p=a.value;if(p&&(0!=r||"error"!=p.__symbolic)){var h=a.parameters,d=a.defaults;u=u.map(function(t){return l(e,t)}).map(function(t){return xp(t)?void 0:t}),d&&d.length>u.length&&u.push.apply(u,f(d.slice(u.length).map(function(t){return n(t)}))),s.set(t,!0);for(var v=Rp.build(),y=0;y<h.length;y++)v.define(h[y],u[y]);var m,g=o;try{o=v.done(),m=l(t,p)}finally{o=g}return m}}finally{s.delete(t)}}if(0===r)return _p;var _=void 0;if(c&&"resolved"==c.__symbolic){var b=c.line,x=c.character,w=c.fileName;null!=w&&null!=b&&null!=x&&(_={fileName:w,line:b,column:x})}i.error({message:kp,context:t,value:a,position:_},e)}(T,u(T),F,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},e),_p;case"ignore":return h}return null}return function U(t,e){if(!t)return{};var n={};return Object.keys(t).forEach(function(r){var i=e(t[r],r);xp(i)||(gp.test(r)?Object.defineProperty(n,r,{enumerable:!1,configurable:!0,value:i}):n[r]=i)}),n}(h,function(o,s){if(bp.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 c(n){return t(e,n,r,a+1)}(o)}return n(o)})}return _p}(n)}(t,e,0,n?1:0)}catch(e){if(!this.errorRecorder)throw Lp(e,t);this.reportError(e,t)}if(!xp(r))return r},t.prototype.getTypeMetadata=function(t){var e=this.symbolResolver.resolveSymbol(t);return e&&e.metadata?e.metadata:{__symbolic:"class"}},t.prototype.reportError=function(t,e,n){if(!this.errorRecorder)throw t;this.errorRecorder(Lp(t,e),e&&e.filePath||n)},t.prototype.error=function(t,e){this.reportError(Sp(t.message,t.summary,t.advise,t.position,t.symbol,t.context,t.chain),e)},t}(),Ep="ngMetadataError";function Sp(t,e,n,r,i,o,s){var a=Ae(t);return a[Ep]=!0,n&&(a.advise=n),r&&(a.position=r),e&&(a.summary=e),o&&(a.context=o),s&&(a.chain=s),i&&(a.symbol=i),a}function Cp(t){return!!t[Ep]}var Tp="Reference to non-exported class",Pp="Variable not initialized",Ap="Destructuring not supported",Np="Could not resolve type",kp="Function call not supported",Op="Reference to a local symbol",Ip="Lambda not supported";function Mp(t){return null===t||"function"!=typeof t&&"object"!=typeof t}var Rp=function(){function t(){}return t.build=function(){var e=new Map;return{define:function(t,n){return e.set(t,n),this},done:function(){return e.size>0?new Dp(e):t.empty}}},t.missing={},t.empty={resolve:function(e){return t.missing}},t}(),Dp=function(t){function e(e){var n=t.call(this)||this;return n.bindings=e,n}return o(e,t),e.prototype.resolve=function(t){return this.bindings.has(t)?this.bindings.get(t):Rp.missing},e}(Rp);function Lp(t,e){return Cp(t)?function r(t){var e=Ae(function t(e,n){if(void 0===n&&(n=0),!e)return"";var r=e.position?e.position.fileName+"("+(e.position.line+1)+","+(e.position.column+1)+")":"",i=(r&&0===n?r+": ":"")+e.message+(r&&0!==n?" at "+r:"");return""+function t(e){if(e<=0)return"";if(e<6)return[""," "," "," "," "," "][e];var n=t(Math.floor(e/2));return n+n+(e%2==1?" ":"")}(n)+i+(e.next&&"\n"+t(e.next,n+2)||"")}(t)+".");return e[yp]=!0,e.chain=t,e.position=t.position,e}(function t(e,n){return{message:function r(t,e){switch(t){case Tp:if(e&&e.className)return"References to a non-exported class are not supported in decorators but "+e.className+" was referenced.";break;case Pp:return"Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler";case Ap:return"Referencing an exported destructured variable or constant is not supported in decorators and this value is needed by the template compiler";case Np:if(e&&e.typeName)return"Could not resolve type "+e.typeName;break;case kp:return e&&e.name?"Function calls are not supported in decorators but '"+e.name+"' was called":"Function calls are not supported in decorators";case Op:if(e&&e.name)return"Reference to a local (non-exported) symbols are not supported in decorators but '"+e.name+"' was referenced";break;case Ip:return"Function expressions are not supported in decorators"}return t}(e.message,e.context)+(e.symbol?" in '"+e.symbol.name+"'":""),position:e.position,next:e.next?t(e.next,n):n?{message:n}:void 0}}({message:"Error during template compile of '"+e.name+"'",position:t.position,next:{message:t.message,next:t.chain,context:t.context,symbol:t.symbol}},t.advise||function n(t,e){switch(t){case Tp:if(e&&e.className)return"Consider exporting '"+e.className+"'";break;case Ap:return"Consider simplifying to avoid destructuring";case Op:if(e&&e.name)return"Consider exporting '"+e.name+"'";break;case Ip:return"Consider changing the function expression into an exported function"}}(t.message,t.context))):t}
|
|
543
|
+
var yp="ngFormattedMessage",mp="@angular/core",gp=/^\$.*\$$/,_p={__symbolic:"ignore"},bp=new Set(["useValue","useFactory","data","id","loadChildren"]);function xp(t){return t&&"ignore"==t.__symbolic}var wp=function(){function t(t,e,n,r,i){void 0===n&&(n=[]),void 0===r&&(r=[]);var o=this;this.summaryResolver=t,this.symbolResolver=e,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(t){return o._registerDecoratorOrConstructor(o.getStaticSymbol(t.filePath,t.name),t.ctor)}),r.forEach(function(t){return o._registerFunction(o.getStaticSymbol(t.filePath,t.name),t.fn)}),this.annotationForParentClassWithSummaryKind.set(en.Directive,[B,K]),this.annotationForParentClassWithSummaryKind.set(en.Pipe,[W]),this.annotationForParentClassWithSummaryKind.set(en.NgModule,[$]),this.annotationForParentClassWithSummaryKind.set(en.Injectable,[Y,W,B,K,$])}return t.prototype.componentModuleUrl=function(t){var e=this.findSymbolDeclaration(t);return this.symbolResolver.getResourcePath(e)},t.prototype.resolveExternalReference=function(t,e){var n=void 0;if(!e){var r=this.resolvedExternalReferences.get(n=t.moduleName+":"+t.name);if(r)return r}var i=this.symbolResolver.getSymbolByModule(t.moduleName,t.name,e),o=this.findSymbolDeclaration(i);return e||(this.symbolResolver.recordModuleNameForFileName(i.filePath,t.moduleName),this.symbolResolver.recordImportAs(o,i)),n&&this.resolvedExternalReferences.set(n,o),o},t.prototype.findDeclaration=function(t,e,n){return this.findSymbolDeclaration(this.symbolResolver.getSymbolByModule(t,e,n))},t.prototype.tryFindDeclaration=function(t,e,n){var r=this;return this.symbolResolver.ignoreErrorsFor(function(){return r.findDeclaration(t,e,n)})},t.prototype.findSymbolDeclaration=function(t){var e=this.symbolResolver.resolveSymbol(t);if(e){var n=e.metadata;if(n&&"resolved"===n.__symbolic&&(n=n.symbol),n instanceof Ye)return this.findSymbolDeclaration(e.metadata)}return t},t.prototype.tryAnnotations=function(t){var e=this.errorRecorder;this.errorRecorder=function(t,e){};try{return this.annotations(t)}finally{this.errorRecorder=e}},t.prototype.annotations=function(t){var e=this;return this._annotations(t,function(t,n){return e.simplify(t,n)},this.annotationCache)},t.prototype.shallowAnnotations=function(t){var e=this;return this._annotations(t,function(t,n){return e.simplify(t,n,!0)},this.shallowAnnotationCache)},t.prototype._annotations=function(t,e,n){var r=n.get(t);if(!r){r=[];var i=this.getTypeMetadata(t),o=this.findParentType(t,i);if(o){var s=this.annotations(o);r.push.apply(r,f(s))}var a=[];if(i.decorators&&(a=e(t,i.decorators))&&r.push.apply(r,f(a)),o&&!this.summaryResolver.isLibraryFile(t.filePath)&&this.summaryResolver.isLibraryFile(o.filePath)){var u=this.summaryResolver.resolveSummary(o);if(u&&u.type){var c=this.annotationForParentClassWithSummaryKind.get(u.type.summaryKind);c.some(function(t){return a.some(function(e){return t.isTypeOf(e)})})||this.reportError(Lp(Sp("Class "+t.name+" in "+t.filePath+" extends from a "+en[u.type.summaryKind]+" in another compilation unit without duplicating the decorator",void 0,"Please add a "+c.map(function(t){return t.ngMetadataName}).join(" or ")+" decorator to the class"),t),t)}}n.set(t,r.filter(function(t){return!!t}))}return r},t.prototype.propMetadata=function(t){var e=this,n=this.propertyCache.get(t);if(!n){var r=this.getTypeMetadata(t);n={};var i=this.findParentType(t,r);if(i){var o=this.propMetadata(i);Object.keys(o).forEach(function(t){n[t]=o[t]})}var s=r.members||{};Object.keys(s).forEach(function(r){var i=s[r].find(function(t){return"property"==t.__symbolic||"method"==t.__symbolic}),o=[];n[r]&&o.push.apply(o,f(n[r])),n[r]=o,i&&i.decorators&&o.push.apply(o,f(e.simplify(t,i.decorators)))}),this.propertyCache.set(t,n)}return n},t.prototype.parameters=function(t){var e=this;if(!(t instanceof Ye))return this.reportError(new Error("parameters received "+JSON.stringify(t)+" which is not a StaticSymbol"),t),[];try{var n=this.parameterCache.get(t);if(!n){var r=this.getTypeMetadata(t),i=this.findParentType(t,r),o=r?r.members:null,s=o?o.__ctor__:null;if(s){var a=s.find(function(t){return"constructor"==t.__symbolic}),u=a.parameters||[],c=this.simplify(t,a.parameterDecorators||[]);n=[],u.forEach(function(r,i){var o=[],s=e.trySimplify(t,r);s&&o.push(s);var a=c?c[i]:null;a&&o.push.apply(o,f(a)),n.push(o)})}else i&&(n=this.parameters(i));n||(n=[]),this.parameterCache.set(t,n)}return n}catch(e){throw console.error("Failed on type "+JSON.stringify(t)+" with error "+e),e}},t.prototype._methodNames=function(t){var e=this.methodCache.get(t);if(!e){var n=this.getTypeMetadata(t);e={};var r=this.findParentType(t,n);if(r){var i=this._methodNames(r);Object.keys(i).forEach(function(t){e[t]=i[t]})}var o=n.members||{};Object.keys(o).forEach(function(t){var n=o[t].some(function(t){return"method"==t.__symbolic});e[t]=e[t]||n}),this.methodCache.set(t,e)}return e},t.prototype._staticMembers=function(t){var e=this.staticCache.get(t);if(!e){var n=this.getTypeMetadata(t);e=Object.keys(n.statics||{}),this.staticCache.set(t,e)}return e},t.prototype.findParentType=function(t,e){var n=this.trySimplify(t,e.extends);if(n instanceof Ye)return n},t.prototype.hasLifecycleHook=function(t,e){t instanceof Ye||this.reportError(new Error("hasLifecycleHook received "+JSON.stringify(t)+" which is not a StaticSymbol"),t);try{return!!this._methodNames(t)[e]}catch(e){throw console.error("Failed on type "+JSON.stringify(t)+" with error "+e),e}},t.prototype.guards=function(t){var e,n;if(!(t instanceof Ye))return this.reportError(new Error("guards received "+JSON.stringify(t)+" which is not a StaticSymbol"),t),{};var r=this._staticMembers(t),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),c=void 0;u.endsWith("UseIf")?(u=a.substr(0,u.length-"UseIf".length),c="UseIf"):c=this.getStaticSymbol(t.filePath,t.name,[a]),i[u]=c}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return i},t.prototype._registerDecoratorOrConstructor=function(t,e){this.conversionMap.set(t,function(t,n){return new(e.bind.apply(e,f([void 0],n)))})},t.prototype._registerFunction=function(t,e){this.conversionMap.set(t,function(t,n){return e.apply(void 0,n)})},t.prototype.initializeConversionMap=function(){this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Injectable"),Y),this.injectionToken=this.findDeclaration(mp,"InjectionToken"),this.opaqueToken=this.findDeclaration(mp,"OpaqueToken"),this.ROUTES=this.tryFindDeclaration("@angular/router","ROUTES"),this.ANALYZE_FOR_ENTRY_COMPONENTS=this.findDeclaration(mp,"ANALYZE_FOR_ENTRY_COMPONENTS"),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Host"),et),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Self"),J),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"SkipSelf"),tt),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Inject"),M),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Optional"),Z),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Attribute"),R),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"ContentChild"),j),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"ContentChildren"),L),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"ViewChild"),V),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"ViewChildren"),F),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Input"),z),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Output"),Q),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Pipe"),W),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"HostBinding"),G),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"HostListener"),X),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Directive"),B),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Component"),K),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"NgModule"),$),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Host"),et),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Self"),J),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"SkipSelf"),tt),this._registerDecoratorOrConstructor(this.findDeclaration(mp,"Optional"),Z)},t.prototype.getStaticSymbol=function(t,e,n){return this.symbolResolver.getStaticSymbol(t,e,n)},t.prototype.trySimplify=function(t,e){var n=this.errorRecorder;this.errorRecorder=function(t,e){};var r=this.simplify(t,e);return this.errorRecorder=n,r},t.prototype.simplify=function(t,e,n){void 0===n&&(n=!1);var r,i=this,o=Dp.empty,s=new Map;try{r=function t(e,n,r,a){function u(t){var e=i.symbolResolver.resolveSymbol(t);return e?e.metadata:null}function c(n){return t(e,n,r,0)}function l(n,o){if(n===e)return t(n,o,r+1,a);try{return t(n,o,r+1,a)}catch(t){if(!Cp(t))throw t;var s=t.chain?"references '"+t.symbol.name+"'":function u(t){if(t.summary)return t.summary;switch(t.message){case Tp:if(t.context&&t.context.className)return"references non-exported class "+t.context.className;break;case Pp:return"is not initialized";case Ap:return"is a destructured variable";case Np:return"could not be resolved";case kp:return t.context&&t.context.name?"calls '"+t.context.name+"'":"calls a function";case Op:return t.context&&t.context.name?"references local variable "+t.context.name:"references a local variable"}return"contains the error"}(t);i.error({message:t.message,advise:t.advise,context:t.context,chain:{message:"'"+n.name+"' "+s,position:t.position,next:t.chain},symbol:n},e)}}return function n(h){var d,v,y,m;if(Mp(h))return h;if(h instanceof Array){var g=[];try{for(var _=p(h),b=_.next();!b.done;b=_.next()){var x=b.value;if(x&&"spread"===x.__symbolic){var w=c(x.expression);if(Array.isArray(w)){try{for(var E=p(w),S=E.next();!S.done;S=E.next())g.push(S.value)}catch(t){y={error:t}}finally{try{S&&!S.done&&(m=E.return)&&m.call(E)}finally{if(y)throw y.error}}continue}}var C=n(x);xp(C)||g.push(C)}}catch(t){d={error:t}}finally{try{b&&!b.done&&(v=_.return)&&v.call(_)}finally{if(d)throw d.error}}return g}if(h instanceof Ye)return h===i.injectionToken||i.conversionMap.has(h)||a>0&&!h.members.length?h:null!=(R=u(T=h))?l(T,R):T;if(h){if(h.__symbolic){var T=void 0;switch(h.__symbolic){case"binop":var P=n(h.left);if(xp(P))return P;var A=n(h.right);if(xp(A))return A;switch(h.operator){case"&&":return P&&A;case"||":return P||A;case"|":return P|A;case"^":return P^A;case"&":return P&A;case"==":return P==A;case"!=":return P!=A;case"===":return P===A;case"!==":return P!==A;case"<":return P<A;case">":return P>A;case"<=":return P<=A;case">=":return P>=A;case"<<":return P<<A;case">>":return P>>A;case"+":return P+A;case"-":return P-A;case"*":return P*A;case"/":return P/A;case"%":return P%A}return null;case"if":return n(n(h.condition)?h.thenExpression:h.elseExpression);case"pre":var N=n(h.operand);if(xp(N))return N;switch(h.operator){case"+":return N;case"-":return-N;case"!":return!N;case"~":return~N}return null;case"index":var k=c(h.expression),O=c(h.index);return k&&Mp(O)?k[O]:null;case"select":var I=h.member,M=e,D=n(h.expression);if(D instanceof Ye){var R,L=D.members.concat(I);return null!=(R=u(M=i.getStaticSymbol(D.filePath,D.name,L)))?l(M,R):M}return D&&Mp(I)?l(M,D[I]):null;case"reference":var j=o.resolve(h.name);if(j!=Dp.missing)return j;break;case"resolved":try{return n(h.symbol)}catch(t){throw Cp(t)&&null!=h.fileName&&null!=h.line&&null!=h.character&&(t.position={fileName:h.fileName,line:h.line,column:h.character}),t}case"class":case"function":return e;case"new":case"call":if((T=t(e,h.expression,r+1,0))instanceof Ye){if(T===i.injectionToken||T===i.opaqueToken)return e;var F=h.arguments||[],V=i.conversionMap.get(T);if(V){var B=F.map(function(t){return l(e,t)}).map(function(t){return xp(t)?void 0:t});return V(e,B)}return function H(t,a,u,c){if(a&&"function"==a.__symbolic){s.get(t)&&i.error({message:"Recursion is not supported",summary:"called '"+t.name+"' recursively",value:a},t);try{var p=a.value;if(p&&(0!=r||"error"!=p.__symbolic)){var h=a.parameters,d=a.defaults;u=u.map(function(t){return l(e,t)}).map(function(t){return xp(t)?void 0:t}),d&&d.length>u.length&&u.push.apply(u,f(d.slice(u.length).map(function(t){return n(t)}))),s.set(t,!0);for(var v=Dp.build(),y=0;y<h.length;y++)v.define(h[y],u[y]);var m,g=o;try{o=v.done(),m=l(t,p)}finally{o=g}return m}}finally{s.delete(t)}}if(0===r)return _p;var _=void 0;if(c&&"resolved"==c.__symbolic){var b=c.line,x=c.character,w=c.fileName;null!=w&&null!=b&&null!=x&&(_={fileName:w,line:b,column:x})}i.error({message:kp,context:t,value:a,position:_},e)}(T,u(T),F,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},e),_p;case"ignore":return h}return null}return function U(t,e){if(!t)return{};var n={};return Object.keys(t).forEach(function(r){var i=e(t[r],r);xp(i)||(gp.test(r)?Object.defineProperty(n,r,{enumerable:!1,configurable:!0,value:i}):n[r]=i)}),n}(h,function(o,s){if(bp.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 c(n){return t(e,n,r,a+1)}(o)}return n(o)})}return _p}(n)}(t,e,0,n?1:0)}catch(e){if(!this.errorRecorder)throw Lp(e,t);this.reportError(e,t)}if(!xp(r))return r},t.prototype.getTypeMetadata=function(t){var e=this.symbolResolver.resolveSymbol(t);return e&&e.metadata?e.metadata:{__symbolic:"class"}},t.prototype.reportError=function(t,e,n){if(!this.errorRecorder)throw t;this.errorRecorder(Lp(t,e),e&&e.filePath||n)},t.prototype.error=function(t,e){this.reportError(Sp(t.message,t.summary,t.advise,t.position,t.symbol,t.context,t.chain),e)},t}(),Ep="ngMetadataError";function Sp(t,e,n,r,i,o,s){var a=Ae(t);return a[Ep]=!0,n&&(a.advise=n),r&&(a.position=r),e&&(a.summary=e),o&&(a.context=o),s&&(a.chain=s),i&&(a.symbol=i),a}function Cp(t){return!!t[Ep]}var Tp="Reference to non-exported class",Pp="Variable not initialized",Ap="Destructuring not supported",Np="Could not resolve type",kp="Function call not supported",Op="Reference to a local symbol",Ip="Lambda not supported";function Mp(t){return null===t||"function"!=typeof t&&"object"!=typeof t}var Dp=function(){function t(){}return t.build=function(){var e=new Map;return{define:function(t,n){return e.set(t,n),this},done:function(){return e.size>0?new Rp(e):t.empty}}},t.missing={},t.empty={resolve:function(e){return t.missing}},t}(),Rp=function(t){function e(e){var n=t.call(this)||this;return n.bindings=e,n}return o(e,t),e.prototype.resolve=function(t){return this.bindings.has(t)?this.bindings.get(t):Dp.missing},e}(Dp);function Lp(t,e){return Cp(t)?function r(t){var e=Ae(function t(e,n){if(void 0===n&&(n=0),!e)return"";var r=e.position?e.position.fileName+"("+(e.position.line+1)+","+(e.position.column+1)+")":"",i=(r&&0===n?r+": ":"")+e.message+(r&&0!==n?" at "+r:"");return""+function t(e){if(e<=0)return"";if(e<6)return[""," "," "," "," "," "][e];var n=t(Math.floor(e/2));return n+n+(e%2==1?" ":"")}(n)+i+(e.next&&"\n"+t(e.next,n+2)||"")}(t)+".");return e[yp]=!0,e.chain=t,e.position=t.position,e}(function t(e,n){return{message:function r(t,e){switch(t){case Tp:if(e&&e.className)return"References to a non-exported class are not supported in decorators but "+e.className+" was referenced.";break;case Pp:return"Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler";case Ap:return"Referencing an exported destructured variable or constant is not supported in decorators and this value is needed by the template compiler";case Np:if(e&&e.typeName)return"Could not resolve type "+e.typeName;break;case kp:return e&&e.name?"Function calls are not supported in decorators but '"+e.name+"' was called":"Function calls are not supported in decorators";case Op:if(e&&e.name)return"Reference to a local (non-exported) symbols are not supported in decorators but '"+e.name+"' was referenced";break;case Ip:return"Function expressions are not supported in decorators"}return t}(e.message,e.context)+(e.symbol?" in '"+e.symbol.name+"'":""),position:e.position,next:e.next?t(e.next,n):n?{message:n}:void 0}}({message:"Error during template compile of '"+e.name+"'",position:t.position,next:{message:t.message,next:t.chain,context:t.context,symbol:t.symbol}},t.advise||function n(t,e){switch(t){case Tp:if(e&&e.className)return"Consider exporting '"+e.className+"'";break;case Ap:return"Consider simplifying to avoid destructuring";case Op:if(e&&e.name)return"Consider exporting '"+e.name+"'";break;case Ip:return"Consider changing the function expression into an exported function"}}(t.message,t.context))):t}
|
|
544
544
|
/**
|
|
545
545
|
* @license
|
|
546
546
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -619,7 +619,7 @@ function Vp(){return new Hp(".")}var Bp,Hp=function(){function t(t){void 0===t&&
|
|
|
619
619
|
* Use of this source code is governed by an MIT-style license that can be
|
|
620
620
|
* found in the LICENSE file at https://angular.io/license
|
|
621
621
|
*/
|
|
622
|
-
function Gp(t){(t.ng||(t.ng={})).ɵcompilerFacade=new lc}(Be),function(t){t[t.Any=0]="Any",t[t.String=1]="String",t[t.Number=2]="Number",t[t.Boolean=3]="Boolean",t[t.Undefined=4]="Undefined",t[t.Null=5]="Null",t[t.Unbound=6]="Unbound",t[t.Other=7]="Other"}(Wp||(Wp={})),function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning"}(zp||(zp={}));var Xp=function Xp(t,e,n){this.kind=t,this.message=e,this.ast=n},$p=function(){function t(t,e,n){this.scope=t,this.query=e,this.context=n}return t.prototype.getType=function(t){return t.visit(this)},t.prototype.getDiagnostics=function(t){this.diagnostics=[];var e=t.visit(this);return this.context.event&&e.callable&&this.reportWarning("Unexpected callable expression. Expected a method call",t),this.diagnostics},t.prototype.visitBinary=function(t){var e=this;function n(t,e){switch(t){case Wp.Undefined:case Wp.Null:return n(e,Wp.Other)}return t}var r=function(t,n){var r=e.getType(t);if(r.nullable){switch(n){case"&&":case"||":case"==":case"!=":case"===":case"!==":break;default:e.reportError("The expression might be null",t)}return e.query.getNonNullableType(r)}return r},i=r(t.left,t.operation),o=r(t.right,t.operation),s=this.query.getTypeKind(i),a=this.query.getTypeKind(o),u=n(s,a),c=u<<8|n(a,s);switch(t.operation){case"*":case"/":case"%":case"-":case"<<":case">>":case">>>":case"&":case"^":case"|":switch(c){case Wp.Any<<8|Wp.Any:case Wp.Number<<8|Wp.Any:case Wp.Any<<8|Wp.Number:case Wp.Number<<8|Wp.Number:return this.query.getBuiltinType(Wp.Number);default:var l=t.left;switch(u){case Wp.Any:case Wp.Number:l=t.right}return this.reportError("Expected a numeric type",l)}case"+":switch(c){case Wp.Any<<8|Wp.Any:case Wp.Any<<8|Wp.Boolean:case Wp.Any<<8|Wp.Number:case Wp.Any<<8|Wp.Other:case Wp.Boolean<<8|Wp.Any:case Wp.Number<<8|Wp.Any:case Wp.Other<<8|Wp.Any:return this.anyType;case Wp.Any<<8|Wp.String:case Wp.Boolean<<8|Wp.String:case Wp.Number<<8|Wp.String:case Wp.String<<8|Wp.Any:case Wp.String<<8|Wp.Boolean:case Wp.String<<8|Wp.Number:case Wp.String<<8|Wp.String:case Wp.String<<8|Wp.Other:case Wp.Other<<8|Wp.String:return this.query.getBuiltinType(Wp.String);case Wp.Number<<8|Wp.Number:return this.query.getBuiltinType(Wp.Number);case Wp.Boolean<<8|Wp.Number:case Wp.Other<<8|Wp.Number:return this.reportError("Expected a number type",t.left);case Wp.Number<<8|Wp.Boolean:case Wp.Number<<8|Wp.Other:return this.reportError("Expected a number type",t.right);default:return this.reportError("Expected operands to be a string or number type",t)}case">":case"<":case"<=":case">=":case"==":case"!=":case"===":case"!==":switch(c){case Wp.Any<<8|Wp.Any:case Wp.Any<<8|Wp.Boolean:case Wp.Any<<8|Wp.Number:case Wp.Any<<8|Wp.String:case Wp.Any<<8|Wp.Other:case Wp.Boolean<<8|Wp.Any:case Wp.Boolean<<8|Wp.Boolean:case Wp.Number<<8|Wp.Any:case Wp.Number<<8|Wp.Number:case Wp.String<<8|Wp.Any:case Wp.String<<8|Wp.String:case Wp.Other<<8|Wp.Any:case Wp.Other<<8|Wp.Other:return this.query.getBuiltinType(Wp.Boolean);default:return this.reportError("Expected the operants to be of similar type or any",t)}case"&&":return o;case"||":return this.query.getTypeUnion(i,o)}return this.reportError("Unrecognized operator "+t.operation,t)},t.prototype.visitChain=function(t){return this.diagnostics&&Ri(t,this),this.query.getBuiltinType(Wp.Undefined)},t.prototype.visitConditional=function(t){return this.diagnostics&&Ri(t,this),this.query.getTypeUnion(this.getType(t.trueExp),this.getType(t.falseExp))},t.prototype.visitFunctionCall=function(t){var e=this,n=t.args.map(function(t){return e.getType(t)}),r=this.getType(t.target);if(!r||!r.callable)return this.reportError("Call target is not callable",t);var i=r.selectSignature(n);return i?i.result:this.reportError("Unable no compatible signature found for call",t)},t.prototype.visitImplicitReceiver=function(t){var e=this;return{name:"$implict",kind:"component",language:"ng-template",type:void 0,container:void 0,callable:!1,nullable:!1,public:!0,definition:void 0,members:function(){return e.scope},signatures:function(){return[]},selectSignature:function(t){},indexed:function(t){}}},t.prototype.visitInterpolation=function(t){return this.diagnostics&&Ri(t,this),this.undefinedType},t.prototype.visitKeyedRead=function(t){var e=this.getType(t.obj),n=this.getType(t.key);return e.indexed(n)||this.anyType},t.prototype.visitKeyedWrite=function(t){return this.getType(t.value)},t.prototype.visitLiteralArray=function(t){var e,n=this;return this.query.getArrayType((e=this.query).getTypeUnion.apply(e,f(t.expressions.map(function(t){return n.getType(t)}))))},t.prototype.visitLiteralMap=function(t){return this.diagnostics&&Ri(t,this),this.anyType},t.prototype.visitLiteralPrimitive=function(t){switch(t.value){case!0:case!1:return this.query.getBuiltinType(Wp.Boolean);case null:return this.query.getBuiltinType(Wp.Null);case void 0:return this.query.getBuiltinType(Wp.Undefined);default:switch(typeof t.value){case"string":return this.query.getBuiltinType(Wp.String);case"number":return this.query.getBuiltinType(Wp.Number);default:return this.reportError("Unrecognized primitive",t)}}},t.prototype.visitMethodCall=function(t){return this.resolveMethodCall(this.getType(t.receiver),t)},t.prototype.visitPipe=function(t){var e=this,n=this.query.getPipes().get(t.name);if(!n)return this.reportError("No pipe by the name "+t.name+" found",t);var r=this.getType(t.exp),i=n.selectSignature([r].concat(t.args.map(function(t){return e.getType(t)})));return i?i.result:this.reportError("Unable to resolve signature for pipe invocation",t)},t.prototype.visitPrefixNot=function(t){return this.query.getBuiltinType(Wp.Boolean)},t.prototype.visitNonNullAssert=function(t){var e=this.getType(t.expression);return this.query.getNonNullableType(e)},t.prototype.visitPropertyRead=function(t){return this.resolvePropertyRead(this.getType(t.receiver),t)},t.prototype.visitPropertyWrite=function(t){return this.getType(t.value)},t.prototype.visitQuote=function(t){return this.query.getBuiltinType(Wp.Any)},t.prototype.visitSafeMethodCall=function(t){return this.resolveMethodCall(this.query.getNonNullableType(this.getType(t.receiver)),t)},t.prototype.visitSafePropertyRead=function(t){return this.resolvePropertyRead(this.query.getNonNullableType(this.getType(t.receiver)),t)},Object.defineProperty(t.prototype,"anyType",{get:function(){var t=this._anyType;return t||(t=this._anyType=this.query.getBuiltinType(Wp.Any)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"undefinedType",{get:function(){var t=this._undefinedType;return t||(t=this._undefinedType=this.query.getBuiltinType(Wp.Undefined)),t},enumerable:!0,configurable:!0}),t.prototype.resolveMethodCall=function(t,e){var n=this;if(this.isAny(t))return this.anyType;var r=t.members().get(e.name);if(!r)return this.reportError("Unknown method '"+e.name+"'",e);if(!r.type)return this.reportError("Could not find a type for '"+e.name+"'",e);if(!r.type.callable)return this.reportError("Member '"+e.name+"' is not callable",e);var i=r.type.selectSignature(e.args.map(function(t){return n.getType(t)}));return i?i.result:this.reportError("Unable to resolve signature for call of method "+e.name,e)},t.prototype.resolvePropertyRead=function(t,e){if(this.isAny(t))return this.anyType;var n=t.members().get(e.name);if(!n){var r;if("$implict"==(r=t.name))r="The component declaration, template variable declarations, and element references do";else{if(t.nullable)return this.reportError("The expression might be null",e.receiver);r="'"+r+"' does"}return this.reportError("Identifier '"+e.name+"' is not defined. "+r+" not contain such a member",e)}return n.public||this.reportWarning("Identifier '"+e.name+"' refers to a private member of "+(r="$implict"==(r=t.name)?"the component":"'"+r+"'"),e),n.type},t.prototype.reportError=function(t,e){return this.diagnostics&&this.diagnostics.push(new Xp(zp.Error,t,e)),this.anyType},t.prototype.reportWarning=function(t,e){return this.diagnostics&&this.diagnostics.push(new Xp(zp.Warning,t,e)),this.anyType},t.prototype.isAny=function(t){return!t||this.query.getTypeKind(t)==Wp.Any||!!t.type&&this.isAny(t.type)},t}();function Yp(t,e){if(t.fileName){var n=t.offset;return[{fileName:t.fileName,span:{start:e.sourceSpan.start.offset+n,end:e.sourceSpan.end.offset+n}}]}}function Zp(t,e,n){var r=n.directives.find(function(t){var e=rn(t.directive.type);return"NgFor"==e||"NgForOf"==e});if(r){var i=r.inputs.find(function(t){return"ngForOf"==t.directiveName});if(i){var o=new $p(e.members,e.query,{}).getType(i.value);if(o){var s=e.query.getElementType(o);if(s)return s}}}return e.query.getBuiltinType(Wp.Any)}function Jp(t,e,n){var r=t.members,i=function s(t){var e=[];function n(n){var r,i,o=function(n){var r=void 0;n.value&&(r=t.query.getTypeSymbol(sn(n.value))),e.push({name:n.name,kind:"reference",type:r||t.query.getBuiltinType(Wp.Any),get definition(){return Yp(t,n)}})};try{for(var s=p(n),a=s.next();!a.done;a=s.next())o(a.value)}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}return Bc(new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.visitEmbeddedTemplate=function(e,r){t.prototype.visitEmbeddedTemplate.call(this,e,r),n(e.references)},e.prototype.visitElement=function(e,r){t.prototype.visitElement.call(this,e,r),n(e.references)},e}(Vc)),t.templateAst),e}(t),a=function u(t,e){for(var n,r,i=[],o=e.tail;o;){if(o instanceof Mc){var s=function(e){var n=e.name,r=o.directives.map(function(e){return t.query.getTemplateContext(e.directive.type.reference)}).find(function(t){return!!t}),s=void 0;if(r){var a=r.get(e.value);if(a){var u=t.query.getTypeKind(s=a.type);u!==Wp.Any&&u!=Wp.Unbound||(s=Zp(0,t,o))}}s||(s=t.query.getBuiltinType(Wp.Any)),i.push({name:n,kind:"variable",type:s,get definition(){return Yp(t,e)}})};try{for(var a=p(o.variables),u=a.next();!u.done;u=a.next())s(u.value)}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}o=e.parentOf(o)}return i}(t,e),c=function l(t,e){var n=[];return e&&(n=[{name:"$event",kind:"variable",type:t.query.getBuiltinType(Wp.Any)}]),n}(t,n);if(i.length||a.length||c.length){var h=t.query.createSymbolTable(i),f=t.query.createSymbolTable(a),d=t.query.createSymbolTable(c);r=t.query.mergeSymbolTable([r,h,f,d])}return r}var th=function(t){function e(e,n){var r=t.call(this)||this;return r.info=e,r.getExpressionScope=n,r.diagnostics=[],r.path=new Us([]),r}return o(e,t),e.prototype.visitDirective=function(t,e){t.inputs&&t.inputs.length&&Bc(this,t.inputs,e)},e.prototype.visitBoundText=function(t){this.push(t),this.diagnoseExpression(t.value,t.sourceSpan.start.offset,!1),this.pop()},e.prototype.visitDirectiveProperty=function(t){this.push(t),this.diagnoseExpression(t.value,this.attributeValueLocation(t),!1),this.pop()},e.prototype.visitElementProperty=function(t){this.push(t),this.diagnoseExpression(t.value,this.attributeValueLocation(t),!1),this.pop()},e.prototype.visitEvent=function(t){this.push(t),this.diagnoseExpression(t.handler,this.attributeValueLocation(t),!0),this.pop()},e.prototype.visitVariable=function(t){var e=this.directiveSummary;if(e&&t.value){var n=this.info.query.getTemplateContext(e.type.reference);n&&!n.has(t.value)&&this.reportError("$implicit"===t.value?"The template context does not have an implicit value":"The template context does not defined a member called '"+t.value+"'",function r(t){return{start:t.start.offset,end:t.end.offset}}
|
|
622
|
+
function Gp(t){(t.ng||(t.ng={})).ɵcompilerFacade=new lc}(Be),function(t){t[t.Any=0]="Any",t[t.String=1]="String",t[t.Number=2]="Number",t[t.Boolean=3]="Boolean",t[t.Undefined=4]="Undefined",t[t.Null=5]="Null",t[t.Unbound=6]="Unbound",t[t.Other=7]="Other"}(Wp||(Wp={})),function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning"}(zp||(zp={}));var Xp=function Xp(t,e,n){this.kind=t,this.message=e,this.ast=n},$p=function(){function t(t,e,n){this.scope=t,this.query=e,this.context=n}return t.prototype.getType=function(t){return t.visit(this)},t.prototype.getDiagnostics=function(t){this.diagnostics=[];var e=t.visit(this);return this.context.event&&e.callable&&this.reportWarning("Unexpected callable expression. Expected a method call",t),this.diagnostics},t.prototype.visitBinary=function(t){var e=this;function n(t,e){switch(t){case Wp.Undefined:case Wp.Null:return n(e,Wp.Other)}return t}var r=function(t,n){var r=e.getType(t);if(r.nullable){switch(n){case"&&":case"||":case"==":case"!=":case"===":case"!==":break;default:e.reportError("The expression might be null",t)}return e.query.getNonNullableType(r)}return r},i=r(t.left,t.operation),o=r(t.right,t.operation),s=this.query.getTypeKind(i),a=this.query.getTypeKind(o),u=n(s,a),c=u<<8|n(a,s);switch(t.operation){case"*":case"/":case"%":case"-":case"<<":case">>":case">>>":case"&":case"^":case"|":switch(c){case Wp.Any<<8|Wp.Any:case Wp.Number<<8|Wp.Any:case Wp.Any<<8|Wp.Number:case Wp.Number<<8|Wp.Number:return this.query.getBuiltinType(Wp.Number);default:var l=t.left;switch(u){case Wp.Any:case Wp.Number:l=t.right}return this.reportError("Expected a numeric type",l)}case"+":switch(c){case Wp.Any<<8|Wp.Any:case Wp.Any<<8|Wp.Boolean:case Wp.Any<<8|Wp.Number:case Wp.Any<<8|Wp.Other:case Wp.Boolean<<8|Wp.Any:case Wp.Number<<8|Wp.Any:case Wp.Other<<8|Wp.Any:return this.anyType;case Wp.Any<<8|Wp.String:case Wp.Boolean<<8|Wp.String:case Wp.Number<<8|Wp.String:case Wp.String<<8|Wp.Any:case Wp.String<<8|Wp.Boolean:case Wp.String<<8|Wp.Number:case Wp.String<<8|Wp.String:case Wp.String<<8|Wp.Other:case Wp.Other<<8|Wp.String:return this.query.getBuiltinType(Wp.String);case Wp.Number<<8|Wp.Number:return this.query.getBuiltinType(Wp.Number);case Wp.Boolean<<8|Wp.Number:case Wp.Other<<8|Wp.Number:return this.reportError("Expected a number type",t.left);case Wp.Number<<8|Wp.Boolean:case Wp.Number<<8|Wp.Other:return this.reportError("Expected a number type",t.right);default:return this.reportError("Expected operands to be a string or number type",t)}case">":case"<":case"<=":case">=":case"==":case"!=":case"===":case"!==":switch(c){case Wp.Any<<8|Wp.Any:case Wp.Any<<8|Wp.Boolean:case Wp.Any<<8|Wp.Number:case Wp.Any<<8|Wp.String:case Wp.Any<<8|Wp.Other:case Wp.Boolean<<8|Wp.Any:case Wp.Boolean<<8|Wp.Boolean:case Wp.Number<<8|Wp.Any:case Wp.Number<<8|Wp.Number:case Wp.String<<8|Wp.Any:case Wp.String<<8|Wp.String:case Wp.Other<<8|Wp.Any:case Wp.Other<<8|Wp.Other:return this.query.getBuiltinType(Wp.Boolean);default:return this.reportError("Expected the operants to be of similar type or any",t)}case"&&":return o;case"||":return this.query.getTypeUnion(i,o)}return this.reportError("Unrecognized operator "+t.operation,t)},t.prototype.visitChain=function(t){return this.diagnostics&&Di(t,this),this.query.getBuiltinType(Wp.Undefined)},t.prototype.visitConditional=function(t){return this.diagnostics&&Di(t,this),this.query.getTypeUnion(this.getType(t.trueExp),this.getType(t.falseExp))},t.prototype.visitFunctionCall=function(t){var e=this,n=t.args.map(function(t){return e.getType(t)}),r=this.getType(t.target);if(!r||!r.callable)return this.reportError("Call target is not callable",t);var i=r.selectSignature(n);return i?i.result:this.reportError("Unable no compatible signature found for call",t)},t.prototype.visitImplicitReceiver=function(t){var e=this;return{name:"$implict",kind:"component",language:"ng-template",type:void 0,container:void 0,callable:!1,nullable:!1,public:!0,definition:void 0,members:function(){return e.scope},signatures:function(){return[]},selectSignature:function(t){},indexed:function(t){}}},t.prototype.visitInterpolation=function(t){return this.diagnostics&&Di(t,this),this.undefinedType},t.prototype.visitKeyedRead=function(t){var e=this.getType(t.obj),n=this.getType(t.key);return e.indexed(n)||this.anyType},t.prototype.visitKeyedWrite=function(t){return this.getType(t.value)},t.prototype.visitLiteralArray=function(t){var e,n=this;return this.query.getArrayType((e=this.query).getTypeUnion.apply(e,f(t.expressions.map(function(t){return n.getType(t)}))))},t.prototype.visitLiteralMap=function(t){return this.diagnostics&&Di(t,this),this.anyType},t.prototype.visitLiteralPrimitive=function(t){switch(t.value){case!0:case!1:return this.query.getBuiltinType(Wp.Boolean);case null:return this.query.getBuiltinType(Wp.Null);case void 0:return this.query.getBuiltinType(Wp.Undefined);default:switch(typeof t.value){case"string":return this.query.getBuiltinType(Wp.String);case"number":return this.query.getBuiltinType(Wp.Number);default:return this.reportError("Unrecognized primitive",t)}}},t.prototype.visitMethodCall=function(t){return this.resolveMethodCall(this.getType(t.receiver),t)},t.prototype.visitPipe=function(t){var e=this,n=this.query.getPipes().get(t.name);if(!n)return this.reportError("No pipe by the name "+t.name+" found",t);var r=this.getType(t.exp),i=n.selectSignature([r].concat(t.args.map(function(t){return e.getType(t)})));return i?i.result:this.reportError("Unable to resolve signature for pipe invocation",t)},t.prototype.visitPrefixNot=function(t){return this.query.getBuiltinType(Wp.Boolean)},t.prototype.visitNonNullAssert=function(t){var e=this.getType(t.expression);return this.query.getNonNullableType(e)},t.prototype.visitPropertyRead=function(t){return this.resolvePropertyRead(this.getType(t.receiver),t)},t.prototype.visitPropertyWrite=function(t){return this.getType(t.value)},t.prototype.visitQuote=function(t){return this.query.getBuiltinType(Wp.Any)},t.prototype.visitSafeMethodCall=function(t){return this.resolveMethodCall(this.query.getNonNullableType(this.getType(t.receiver)),t)},t.prototype.visitSafePropertyRead=function(t){return this.resolvePropertyRead(this.query.getNonNullableType(this.getType(t.receiver)),t)},Object.defineProperty(t.prototype,"anyType",{get:function(){var t=this._anyType;return t||(t=this._anyType=this.query.getBuiltinType(Wp.Any)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"undefinedType",{get:function(){var t=this._undefinedType;return t||(t=this._undefinedType=this.query.getBuiltinType(Wp.Undefined)),t},enumerable:!0,configurable:!0}),t.prototype.resolveMethodCall=function(t,e){var n=this;if(this.isAny(t))return this.anyType;var r=t.members().get(e.name);if(!r)return this.reportError("Unknown method '"+e.name+"'",e);if(!r.type)return this.reportError("Could not find a type for '"+e.name+"'",e);if(!r.type.callable)return this.reportError("Member '"+e.name+"' is not callable",e);var i=r.type.selectSignature(e.args.map(function(t){return n.getType(t)}));return i?i.result:this.reportError("Unable to resolve signature for call of method "+e.name,e)},t.prototype.resolvePropertyRead=function(t,e){if(this.isAny(t))return this.anyType;var n=t.members().get(e.name);if(!n){var r;if("$implict"==(r=t.name))r="The component declaration, template variable declarations, and element references do";else{if(t.nullable)return this.reportError("The expression might be null",e.receiver);r="'"+r+"' does"}return this.reportError("Identifier '"+e.name+"' is not defined. "+r+" not contain such a member",e)}return n.public||this.reportWarning("Identifier '"+e.name+"' refers to a private member of "+(r="$implict"==(r=t.name)?"the component":"'"+r+"'"),e),n.type},t.prototype.reportError=function(t,e){return this.diagnostics&&this.diagnostics.push(new Xp(zp.Error,t,e)),this.anyType},t.prototype.reportWarning=function(t,e){return this.diagnostics&&this.diagnostics.push(new Xp(zp.Warning,t,e)),this.anyType},t.prototype.isAny=function(t){return!t||this.query.getTypeKind(t)==Wp.Any||!!t.type&&this.isAny(t.type)},t}();function Yp(t,e){if(t.fileName){var n=t.offset;return[{fileName:t.fileName,span:{start:e.sourceSpan.start.offset+n,end:e.sourceSpan.end.offset+n}}]}}function Zp(t,e,n){var r=n.directives.find(function(t){var e=rn(t.directive.type);return"NgFor"==e||"NgForOf"==e});if(r){var i=r.inputs.find(function(t){return"ngForOf"==t.directiveName});if(i){var o=new $p(e.members,e.query,{}).getType(i.value);if(o){var s=e.query.getElementType(o);if(s)return s}}}return e.query.getBuiltinType(Wp.Any)}function Jp(t,e,n){var r=t.members,i=function s(t){var e=[];function n(n){var r,i,o=function(n){var r=void 0;n.value&&(r=t.query.getTypeSymbol(sn(n.value))),e.push({name:n.name,kind:"reference",type:r||t.query.getBuiltinType(Wp.Any),get definition(){return Yp(t,n)}})};try{for(var s=p(n),a=s.next();!a.done;a=s.next())o(a.value)}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}return Bc(new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.visitEmbeddedTemplate=function(e,r){t.prototype.visitEmbeddedTemplate.call(this,e,r),n(e.references)},e.prototype.visitElement=function(e,r){t.prototype.visitElement.call(this,e,r),n(e.references)},e}(Vc)),t.templateAst),e}(t),a=function u(t,e){for(var n,r,i=[],o=e.tail;o;){if(o instanceof Mc){var s=function(e){var n=e.name,r=o.directives.map(function(e){return t.query.getTemplateContext(e.directive.type.reference)}).find(function(t){return!!t}),s=void 0;if(r){var a=r.get(e.value);if(a){var u=t.query.getTypeKind(s=a.type);u!==Wp.Any&&u!=Wp.Unbound||(s=Zp(0,t,o))}}s||(s=t.query.getBuiltinType(Wp.Any)),i.push({name:n,kind:"variable",type:s,get definition(){return Yp(t,e)}})};try{for(var a=p(o.variables),u=a.next();!u.done;u=a.next())s(u.value)}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}o=e.parentOf(o)}return i}(t,e),c=function l(t,e){var n=[];return e&&(n=[{name:"$event",kind:"variable",type:t.query.getBuiltinType(Wp.Any)}]),n}(t,n);if(i.length||a.length||c.length){var h=t.query.createSymbolTable(i),f=t.query.createSymbolTable(a),d=t.query.createSymbolTable(c);r=t.query.mergeSymbolTable([r,h,f,d])}return r}var th=function(t){function e(e,n){var r=t.call(this)||this;return r.info=e,r.getExpressionScope=n,r.diagnostics=[],r.path=new Us([]),r}return o(e,t),e.prototype.visitDirective=function(t,e){t.inputs&&t.inputs.length&&Bc(this,t.inputs,e)},e.prototype.visitBoundText=function(t){this.push(t),this.diagnoseExpression(t.value,t.sourceSpan.start.offset,!1),this.pop()},e.prototype.visitDirectiveProperty=function(t){this.push(t),this.diagnoseExpression(t.value,this.attributeValueLocation(t),!1),this.pop()},e.prototype.visitElementProperty=function(t){this.push(t),this.diagnoseExpression(t.value,this.attributeValueLocation(t),!1),this.pop()},e.prototype.visitEvent=function(t){this.push(t),this.diagnoseExpression(t.handler,this.attributeValueLocation(t),!0),this.pop()},e.prototype.visitVariable=function(t){var e=this.directiveSummary;if(e&&t.value){var n=this.info.query.getTemplateContext(e.type.reference);n&&!n.has(t.value)&&this.reportError("$implicit"===t.value?"The template context does not have an implicit value":"The template context does not defined a member called '"+t.value+"'",function r(t){return{start:t.start.offset,end:t.end.offset}}
|
|
623
623
|
/**
|
|
624
624
|
* @license
|
|
625
625
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -641,14 +641,14 @@ var ih=r.ModifierFlags?function(t){return!!(r.getCombinedModifierFlags(t)&r.Modi
|
|
|
641
641
|
*
|
|
642
642
|
* Use of this source code is governed by an MIT-style license that can be
|
|
643
643
|
* found in the LICENSE file at https://angular.io/license
|
|
644
|
-
*/var Nh=4;function kh(t){return t&&"function"===t.__symbolic}function Oh(t){return t&&t.name&&!t.module&&Mh(t)}function Ih(t){return t&&t.module&&!t.name&&!t.default&&Mh(t)}function Mh(t){return t&&"reference"===t.__symbolic}function
|
|
644
|
+
*/var Nh=4;function kh(t){return t&&"function"===t.__symbolic}function Oh(t){return t&&t.name&&!t.module&&Mh(t)}function Ih(t){return t&&t.module&&!t.name&&!t.default&&Mh(t)}function Mh(t){return t&&"reference"===t.__symbolic}function Dh(t){return t&&"error"===t.__symbolic}
|
|
645
645
|
/**
|
|
646
646
|
* @license
|
|
647
647
|
* Copyright Google Inc. All Rights Reserved.
|
|
648
648
|
*
|
|
649
649
|
* Use of this source code is governed by an MIT-style license that can be
|
|
650
650
|
* found in the LICENSE file at https://angular.io/license
|
|
651
|
-
*/var Dh=r.SyntaxKind.SpreadElement||r.SyntaxKind.SpreadElementExpression;function Lh(t,e){var n=t.expression;if(n.kind===r.SyntaxKind.PropertyAccessExpression){var i=n.name;if(i.kind==r.SyntaxKind.Identifier)return i.text===e}return!1}function jh(t,e){var n=t.expression;return n.kind===r.SyntaxKind.Identifier&&n.text===e}function Fh(t,e,n,r){if(!n.has(t)&&(n.set(t,e),e&&(function i(t){return t&&t.module&&!!t.name&&Mh(t)}(t)||function o(t){return t&&t.module&&t.default&&Mh(t)}(t))&&null==t.line)){var s=qh(e,r);null!=s.line&&(t.line=s.line),null!=s.character&&(t.character=s.character)}return t}function Vh(t,e){return!r.forEachChild(t,function(t){return!e(t)})}function Bh(t){return Object(t)!==t}function Hh(t){return void 0!==t}function qh(t,e){return t&&(e=e||function n(t){for(;t&&t.kind!=r.SyntaxKind.SourceFile;)t=t.parent;return t}(t))?r.getLineAndCharacterOfPosition(e,t.getStart(e)):{}}function Uh(t,e,n,r){var i=a({__symbolic:"error",message:t},qh(e,r));return n&&(i.context=n),i}var Kh=function(){function t(t,e,n,r){void 0===n&&(n={}),this.symbols=t,this.nodeMap=e,this.options=n,this.recordExport=r}return t.prototype.nameOf=function(t){if(t&&t.kind==r.SyntaxKind.Identifier)return t.text;var e=t&&this.evaluateNode(t);return Rh(e)||"string"==typeof e?e:Uh("Name expected",t,{received:t&&t.getText()||"<missing>"})},t.prototype.isFoldable=function(t){return this.isFoldableWorker(t,new Map)},t.prototype.isFoldableWorker=function(t,e){var n=this;if(t)switch(t.kind){case r.SyntaxKind.ObjectLiteralExpression:return Vh(t,function(t){return t.kind===r.SyntaxKind.PropertyAssignment&&n.isFoldableWorker(t.initializer,e)});case r.SyntaxKind.ArrayLiteralExpression:return Vh(t,function(t){return n.isFoldableWorker(t,e)});case r.SyntaxKind.CallExpression:var i=t;if(Lh(i,"concat")&&1===Qh(i.arguments).length){var o=i.expression.expression;if(this.isFoldableWorker(o,e)&&this.isFoldableWorker(i.arguments[0],e)){var s=this.evaluateNode(o);if(s&&Array.isArray(s))return!0}}return!(!jh(i,"CONST_EXPR")||1!==Qh(i.arguments).length)&&this.isFoldableWorker(i.arguments[0],e);case r.SyntaxKind.NoSubstitutionTemplateLiteral:case r.SyntaxKind.StringLiteral:case r.SyntaxKind.NumericLiteral:case r.SyntaxKind.NullKeyword:case r.SyntaxKind.TrueKeyword:case r.SyntaxKind.FalseKeyword:case r.SyntaxKind.TemplateHead:case r.SyntaxKind.TemplateMiddle:case r.SyntaxKind.TemplateTail:return!0;case r.SyntaxKind.ParenthesizedExpression:return this.isFoldableWorker(t.expression,e);case r.SyntaxKind.BinaryExpression:var a=t;switch(a.operatorToken.kind){case r.SyntaxKind.PlusToken:case r.SyntaxKind.MinusToken:case r.SyntaxKind.AsteriskToken:case r.SyntaxKind.SlashToken:case r.SyntaxKind.PercentToken:case r.SyntaxKind.AmpersandAmpersandToken:case r.SyntaxKind.BarBarToken:return this.isFoldableWorker(a.left,e)&&this.isFoldableWorker(a.right,e);default:return!1}case r.SyntaxKind.PropertyAccessExpression:return this.isFoldableWorker(t.expression,e);case r.SyntaxKind.ElementAccessExpression:var u=t;return this.isFoldableWorker(u.expression,e)&&this.isFoldableWorker(u.argumentExpression,e);case r.SyntaxKind.Identifier:var c=this.symbols.resolve(t.text);if(void 0!==c&&Bh(c))return!0;break;case r.SyntaxKind.TemplateExpression:return t.templateSpans.every(function(t){return n.isFoldableWorker(t.expression,e)})}return!1},t.prototype.evaluateNode=function(t,e){var n,i=this,o=this;function s(t,e){if(o.options.substituteExpression){var n=o.options.substituteExpression(t,e);o.recordExport&&n!=t&&Oh(n)&&o.recordExport(n.name,t),t=n}return Fh(t,e,o.nodeMap)}function u(t){return!o.options.verboseInvalidExpression&&Rh(t)}var c=function(e,n){var r=i.symbols.resolve(e,n);return void 0===r?s({__symbolic:"reference",name:e},t):r&&Mh(r)?s(a({},r),t):r};switch(t.kind){case r.SyntaxKind.ObjectLiteralExpression:var l={},h=[];return r.forEachChild(t,function(t){switch(t.kind){case r.SyntaxKind.ShorthandPropertyAssignment:case r.SyntaxKind.PropertyAssignment:var e=t;e.name.kind==r.SyntaxKind.StringLiteral&&h.push(e.name.text);var o=i.nameOf(e.name);if(u(o))return n=o,!0;var a=Wh(e)?i.evaluateNode(e.initializer,!0):c(o,!0);if(u(a))return n=a,!0;l[o]=Wh(e)?s(a,e.initializer):a}}),n||(this.options.quotedNames&&h.length&&(l.$quoted$=h),s(l,t));case r.SyntaxKind.ArrayLiteralExpression:var f=[];return r.forEachChild(t,function(t){var e,r,o=i.evaluateNode(t,!0);if(u(o))return n=o,!0;if(function s(t){return t&&"spread"===t.__symbolic}(o)&&Array.isArray(o.expression))try{for(var a=p(o.expression),c=a.next();!c.done;c=a.next())f.push(c.value)}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}else f.push(o)}),n||s(f,t);case Dh:return s({__symbolic:"spread",expression:this.evaluateNode(t.expression)},t);case r.SyntaxKind.CallExpression:var d=t;if(jh(d,"forwardRef")&&1===Qh(d.arguments).length){var v=d.arguments[0];if(v.kind==r.SyntaxKind.ArrowFunction)return s(this.evaluateNode(v.body),t)}var y=Qh(d.arguments).map(function(t){return i.evaluateNode(t)});if(this.isFoldable(d)&&Lh(d,"concat")){var m=this.evaluateNode(d.expression.expression);return u(m)?m:m.concat(y[0])}if(jh(d,"CONST_EXPR")&&1===Qh(d.arguments).length)return s(y[0],t);var g=this.evaluateNode(d.expression);if(u(g))return s(g,t);var _={__symbolic:"call",expression:g};return y&&y.length&&(_.arguments=y),s(_,t);case r.SyntaxKind.NewExpression:var b=t,x=Qh(b.arguments).map(function(t){return i.evaluateNode(t)}),w=this.evaluateNode(b.expression);if(Rh(w))return s(w,t);var E={__symbolic:"new",expression:w};return x.length&&(E.arguments=x),s(E,t);case r.SyntaxKind.PropertyAccessExpression:var S=t,C=this.evaluateNode(S.expression);if(u(C))return s(C,t);var T=this.nameOf(S.name);return u(T)?s(T,t):C&&this.isFoldable(S.expression)?C[T]:Ih(C)?s({__symbolic:"reference",module:C.module,name:T},t):s({__symbolic:"select",expression:C,member:T},t);case r.SyntaxKind.ElementAccessExpression:var P=t,A=this.evaluateNode(P.expression);if(u(A))return s(A,t);if(!P.argumentExpression)return s(Uh("Expression form not supported",t),t);var N=this.evaluateNode(P.argumentExpression);return u(A)?s(A,t):this.isFoldable(P.expression)&&this.isFoldable(P.argumentExpression)?A[N]:s({__symbolic:"index",expression:A,index:N},t);case r.SyntaxKind.Identifier:return c(t.text,e);case r.SyntaxKind.TypeReference:var k=t,O=k.typeName,I=function(t){if(O.kind===r.SyntaxKind.QualifiedName){var e=t,n=i.evaluateNode(e.left);return Ih(n)?s({__symbolic:"reference",module:n.module,name:e.right.text},t):{__symbolic:"select",expression:n,member:e.right.text}}var o=O,a=i.symbols.resolve(o.text);return u(a)||Mh(a)?s(a,t):s(Uh("Could not resolve type",t,{typeName:o.text}),t)}(O);if(u(I))return s(I,t);if(!Ih(I)&&k.typeArguments&&k.typeArguments.length){var M=k.typeArguments.map(function(t){return i.evaluateNode(t)});I.arguments=M}return s(I,t);case r.SyntaxKind.UnionType:for(var R=t.types.filter(function(t){return t.kind!=r.SyntaxKind.NullKeyword&&t.kind!=r.SyntaxKind.UndefinedKeyword}).map(function(t){return i.evaluateNode(t)}),D=null,L=0;L<R.length;L++){var j=R[L];if(!Mh(j))return j;D&&(j.name!=D.name||j.module!=D.module||j.arguments)||(D=j)}if(D)return D;break;case r.SyntaxKind.NoSubstitutionTemplateLiteral:case r.SyntaxKind.StringLiteral:case r.SyntaxKind.TemplateHead:case r.SyntaxKind.TemplateTail:case r.SyntaxKind.TemplateMiddle:return t.text;case r.SyntaxKind.NumericLiteral:return parseFloat(t.text);case r.SyntaxKind.AnyKeyword:return s({__symbolic:"reference",name:"any"},t);case r.SyntaxKind.StringKeyword:return s({__symbolic:"reference",name:"string"},t);case r.SyntaxKind.NumberKeyword:return s({__symbolic:"reference",name:"number"},t);case r.SyntaxKind.BooleanKeyword:return s({__symbolic:"reference",name:"boolean"},t);case r.SyntaxKind.ArrayType:return s({__symbolic:"reference",name:"Array",arguments:[this.evaluateNode(t.elementType)]},t);case r.SyntaxKind.NullKeyword:return null;case r.SyntaxKind.TrueKeyword:return!0;case r.SyntaxKind.FalseKeyword:return!1;case r.SyntaxKind.ParenthesizedExpression:case r.SyntaxKind.TypeAssertionExpression:return this.evaluateNode(t.expression);case r.SyntaxKind.PrefixUnaryExpression:var F=t,V=this.evaluateNode(F.operand);if(Hh(V)&&Bh(V))switch(F.operator){case r.SyntaxKind.PlusToken:return+V;case r.SyntaxKind.MinusToken:return-V;case r.SyntaxKind.TildeToken:return~V;case r.SyntaxKind.ExclamationToken:return!V}var B=void 0;switch(F.operator){case r.SyntaxKind.PlusToken:B="+";break;case r.SyntaxKind.MinusToken:B="-";break;case r.SyntaxKind.TildeToken:B="~";break;case r.SyntaxKind.ExclamationToken:B="!";break;default:return}return s({__symbolic:"pre",operator:B,operand:V},t);case r.SyntaxKind.BinaryExpression:var H=t,q=this.evaluateNode(H.left),U=this.evaluateNode(H.right);if(Hh(q)&&Hh(U)){if(Bh(q)&&Bh(U))switch(H.operatorToken.kind){case r.SyntaxKind.BarBarToken:return q||U;case r.SyntaxKind.AmpersandAmpersandToken:return q&&U;case r.SyntaxKind.AmpersandToken:return q&U;case r.SyntaxKind.BarToken:return q|U;case r.SyntaxKind.CaretToken:return q^U;case r.SyntaxKind.EqualsEqualsToken:return q==U;case r.SyntaxKind.ExclamationEqualsToken:return q!=U;case r.SyntaxKind.EqualsEqualsEqualsToken:return q===U;case r.SyntaxKind.ExclamationEqualsEqualsToken:return q!==U;case r.SyntaxKind.LessThanToken:return q<U;case r.SyntaxKind.GreaterThanToken:return q>U;case r.SyntaxKind.LessThanEqualsToken:return q<=U;case r.SyntaxKind.GreaterThanEqualsToken:return q>=U;case r.SyntaxKind.LessThanLessThanToken:return q<<U;case r.SyntaxKind.GreaterThanGreaterThanToken:return q>>U;case r.SyntaxKind.GreaterThanGreaterThanGreaterThanToken:return q>>>U;case r.SyntaxKind.PlusToken:return q+U;case r.SyntaxKind.MinusToken:return q-U;case r.SyntaxKind.AsteriskToken:return q*U;case r.SyntaxKind.SlashToken:return q/U;case r.SyntaxKind.PercentToken:return q%U}return s({__symbolic:"binop",operator:H.operatorToken.getText(),left:q,right:U},t)}break;case r.SyntaxKind.ConditionalExpression:var K=t,W=this.evaluateNode(K.condition),z=this.evaluateNode(K.whenTrue),Q=this.evaluateNode(K.whenFalse);return Bh(W)?W?z:Q:s({__symbolic:"if",condition:W,thenExpression:z,elseExpression:Q},t);case r.SyntaxKind.FunctionExpression:case r.SyntaxKind.ArrowFunction:return s(Uh("Lambda not supported",t),t);case r.SyntaxKind.TaggedTemplateExpression:return s(Uh("Tagged template expressions are not supported in metadata",t),t);case r.SyntaxKind.TemplateExpression:var G=t;return this.isFoldable(t)?G.templateSpans.reduce(function(t,e){return t+i.evaluateNode(e.expression)+i.evaluateNode(e.literal)},this.evaluateNode(G.head)):G.templateSpans.reduce(function(t,e){var n=i.evaluateNode(e.expression),r=i.evaluateNode(e.literal);if(u(n))return n;if(u(r))return r;if("string"==typeof t&&"string"==typeof n&&"string"==typeof r)return t+n+r;var o=n;return""!==t&&(o={__symbolic:"binop",operator:"+",left:t,right:n}),""!=r&&(o={__symbolic:"binop",operator:"+",left:o,right:r}),o},this.evaluateNode(G.head));case r.SyntaxKind.AsExpression:return this.evaluateNode(t.expression);case r.SyntaxKind.ClassExpression:return{__symbolic:"class"}}return s(Uh("Expression form not supported",t),t)},t}();function Wh(t){return t.kind==r.SyntaxKind.PropertyAssignment}var zh=r.createNodeArray();function Qh(t){return t||zh}
|
|
651
|
+
*/var Rh=r.SyntaxKind.SpreadElement||r.SyntaxKind.SpreadElementExpression;function Lh(t,e){var n=t.expression;if(n.kind===r.SyntaxKind.PropertyAccessExpression){var i=n.name;if(i.kind==r.SyntaxKind.Identifier)return i.text===e}return!1}function jh(t,e){var n=t.expression;return n.kind===r.SyntaxKind.Identifier&&n.text===e}function Fh(t,e,n,r){if(!n.has(t)&&(n.set(t,e),e&&(function i(t){return t&&t.module&&!!t.name&&Mh(t)}(t)||function o(t){return t&&t.module&&t.default&&Mh(t)}(t))&&null==t.line)){var s=qh(e,r);null!=s.line&&(t.line=s.line),null!=s.character&&(t.character=s.character)}return t}function Vh(t,e){return!r.forEachChild(t,function(t){return!e(t)})}function Bh(t){return Object(t)!==t}function Hh(t){return void 0!==t}function qh(t,e){return t&&(e=e||function n(t){for(;t&&t.kind!=r.SyntaxKind.SourceFile;)t=t.parent;return t}(t))?r.getLineAndCharacterOfPosition(e,t.getStart(e)):{}}function Uh(t,e,n,r){var i=a({__symbolic:"error",message:t},qh(e,r));return n&&(i.context=n),i}var Kh=function(){function t(t,e,n,r){void 0===n&&(n={}),this.symbols=t,this.nodeMap=e,this.options=n,this.recordExport=r}return t.prototype.nameOf=function(t){if(t&&t.kind==r.SyntaxKind.Identifier)return t.text;var e=t&&this.evaluateNode(t);return Dh(e)||"string"==typeof e?e:Uh("Name expected",t,{received:t&&t.getText()||"<missing>"})},t.prototype.isFoldable=function(t){return this.isFoldableWorker(t,new Map)},t.prototype.isFoldableWorker=function(t,e){var n=this;if(t)switch(t.kind){case r.SyntaxKind.ObjectLiteralExpression:return Vh(t,function(t){return t.kind===r.SyntaxKind.PropertyAssignment&&n.isFoldableWorker(t.initializer,e)});case r.SyntaxKind.ArrayLiteralExpression:return Vh(t,function(t){return n.isFoldableWorker(t,e)});case r.SyntaxKind.CallExpression:var i=t;if(Lh(i,"concat")&&1===Qh(i.arguments).length){var o=i.expression.expression;if(this.isFoldableWorker(o,e)&&this.isFoldableWorker(i.arguments[0],e)){var s=this.evaluateNode(o);if(s&&Array.isArray(s))return!0}}return!(!jh(i,"CONST_EXPR")||1!==Qh(i.arguments).length)&&this.isFoldableWorker(i.arguments[0],e);case r.SyntaxKind.NoSubstitutionTemplateLiteral:case r.SyntaxKind.StringLiteral:case r.SyntaxKind.NumericLiteral:case r.SyntaxKind.NullKeyword:case r.SyntaxKind.TrueKeyword:case r.SyntaxKind.FalseKeyword:case r.SyntaxKind.TemplateHead:case r.SyntaxKind.TemplateMiddle:case r.SyntaxKind.TemplateTail:return!0;case r.SyntaxKind.ParenthesizedExpression:return this.isFoldableWorker(t.expression,e);case r.SyntaxKind.BinaryExpression:var a=t;switch(a.operatorToken.kind){case r.SyntaxKind.PlusToken:case r.SyntaxKind.MinusToken:case r.SyntaxKind.AsteriskToken:case r.SyntaxKind.SlashToken:case r.SyntaxKind.PercentToken:case r.SyntaxKind.AmpersandAmpersandToken:case r.SyntaxKind.BarBarToken:return this.isFoldableWorker(a.left,e)&&this.isFoldableWorker(a.right,e);default:return!1}case r.SyntaxKind.PropertyAccessExpression:return this.isFoldableWorker(t.expression,e);case r.SyntaxKind.ElementAccessExpression:var u=t;return this.isFoldableWorker(u.expression,e)&&this.isFoldableWorker(u.argumentExpression,e);case r.SyntaxKind.Identifier:var c=this.symbols.resolve(t.text);if(void 0!==c&&Bh(c))return!0;break;case r.SyntaxKind.TemplateExpression:return t.templateSpans.every(function(t){return n.isFoldableWorker(t.expression,e)})}return!1},t.prototype.evaluateNode=function(t,e){var n,i=this,o=this;function s(t,e){if(o.options.substituteExpression){var n=o.options.substituteExpression(t,e);o.recordExport&&n!=t&&Oh(n)&&o.recordExport(n.name,t),t=n}return Fh(t,e,o.nodeMap)}function u(t){return!o.options.verboseInvalidExpression&&Dh(t)}var c=function(e,n){var r=i.symbols.resolve(e,n);return void 0===r?s({__symbolic:"reference",name:e},t):r&&Mh(r)?s(a({},r),t):r};switch(t.kind){case r.SyntaxKind.ObjectLiteralExpression:var l={},h=[];return r.forEachChild(t,function(t){switch(t.kind){case r.SyntaxKind.ShorthandPropertyAssignment:case r.SyntaxKind.PropertyAssignment:var e=t;e.name.kind==r.SyntaxKind.StringLiteral&&h.push(e.name.text);var o=i.nameOf(e.name);if(u(o))return n=o,!0;var a=Wh(e)?i.evaluateNode(e.initializer,!0):c(o,!0);if(u(a))return n=a,!0;l[o]=Wh(e)?s(a,e.initializer):a}}),n||(this.options.quotedNames&&h.length&&(l.$quoted$=h),s(l,t));case r.SyntaxKind.ArrayLiteralExpression:var f=[];return r.forEachChild(t,function(t){var e,r,o=i.evaluateNode(t,!0);if(u(o))return n=o,!0;if(function s(t){return t&&"spread"===t.__symbolic}(o)&&Array.isArray(o.expression))try{for(var a=p(o.expression),c=a.next();!c.done;c=a.next())f.push(c.value)}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}else f.push(o)}),n||s(f,t);case Rh:return s({__symbolic:"spread",expression:this.evaluateNode(t.expression)},t);case r.SyntaxKind.CallExpression:var d=t;if(jh(d,"forwardRef")&&1===Qh(d.arguments).length){var v=d.arguments[0];if(v.kind==r.SyntaxKind.ArrowFunction)return s(this.evaluateNode(v.body),t)}var y=Qh(d.arguments).map(function(t){return i.evaluateNode(t)});if(this.isFoldable(d)&&Lh(d,"concat")){var m=this.evaluateNode(d.expression.expression);return u(m)?m:m.concat(y[0])}if(jh(d,"CONST_EXPR")&&1===Qh(d.arguments).length)return s(y[0],t);var g=this.evaluateNode(d.expression);if(u(g))return s(g,t);var _={__symbolic:"call",expression:g};return y&&y.length&&(_.arguments=y),s(_,t);case r.SyntaxKind.NewExpression:var b=t,x=Qh(b.arguments).map(function(t){return i.evaluateNode(t)}),w=this.evaluateNode(b.expression);if(Dh(w))return s(w,t);var E={__symbolic:"new",expression:w};return x.length&&(E.arguments=x),s(E,t);case r.SyntaxKind.PropertyAccessExpression:var S=t,C=this.evaluateNode(S.expression);if(u(C))return s(C,t);var T=this.nameOf(S.name);return u(T)?s(T,t):C&&this.isFoldable(S.expression)?C[T]:Ih(C)?s({__symbolic:"reference",module:C.module,name:T},t):s({__symbolic:"select",expression:C,member:T},t);case r.SyntaxKind.ElementAccessExpression:var P=t,A=this.evaluateNode(P.expression);if(u(A))return s(A,t);if(!P.argumentExpression)return s(Uh("Expression form not supported",t),t);var N=this.evaluateNode(P.argumentExpression);return u(A)?s(A,t):this.isFoldable(P.expression)&&this.isFoldable(P.argumentExpression)?A[N]:s({__symbolic:"index",expression:A,index:N},t);case r.SyntaxKind.Identifier:return c(t.text,e);case r.SyntaxKind.TypeReference:var k=t,O=k.typeName,I=function(t){if(O.kind===r.SyntaxKind.QualifiedName){var e=t,n=i.evaluateNode(e.left);return Ih(n)?s({__symbolic:"reference",module:n.module,name:e.right.text},t):{__symbolic:"select",expression:n,member:e.right.text}}var o=O,a=i.symbols.resolve(o.text);return u(a)||Mh(a)?s(a,t):s(Uh("Could not resolve type",t,{typeName:o.text}),t)}(O);if(u(I))return s(I,t);if(!Ih(I)&&k.typeArguments&&k.typeArguments.length){var M=k.typeArguments.map(function(t){return i.evaluateNode(t)});I.arguments=M}return s(I,t);case r.SyntaxKind.UnionType:for(var D=t.types.filter(function(t){return t.kind!=r.SyntaxKind.NullKeyword&&t.kind!=r.SyntaxKind.UndefinedKeyword}).map(function(t){return i.evaluateNode(t)}),R=null,L=0;L<D.length;L++){var j=D[L];if(!Mh(j))return j;R&&(j.name!=R.name||j.module!=R.module||j.arguments)||(R=j)}if(R)return R;break;case r.SyntaxKind.NoSubstitutionTemplateLiteral:case r.SyntaxKind.StringLiteral:case r.SyntaxKind.TemplateHead:case r.SyntaxKind.TemplateTail:case r.SyntaxKind.TemplateMiddle:return t.text;case r.SyntaxKind.NumericLiteral:return parseFloat(t.text);case r.SyntaxKind.AnyKeyword:return s({__symbolic:"reference",name:"any"},t);case r.SyntaxKind.StringKeyword:return s({__symbolic:"reference",name:"string"},t);case r.SyntaxKind.NumberKeyword:return s({__symbolic:"reference",name:"number"},t);case r.SyntaxKind.BooleanKeyword:return s({__symbolic:"reference",name:"boolean"},t);case r.SyntaxKind.ArrayType:return s({__symbolic:"reference",name:"Array",arguments:[this.evaluateNode(t.elementType)]},t);case r.SyntaxKind.NullKeyword:return null;case r.SyntaxKind.TrueKeyword:return!0;case r.SyntaxKind.FalseKeyword:return!1;case r.SyntaxKind.ParenthesizedExpression:case r.SyntaxKind.TypeAssertionExpression:return this.evaluateNode(t.expression);case r.SyntaxKind.PrefixUnaryExpression:var F=t,V=this.evaluateNode(F.operand);if(Hh(V)&&Bh(V))switch(F.operator){case r.SyntaxKind.PlusToken:return+V;case r.SyntaxKind.MinusToken:return-V;case r.SyntaxKind.TildeToken:return~V;case r.SyntaxKind.ExclamationToken:return!V}var B=void 0;switch(F.operator){case r.SyntaxKind.PlusToken:B="+";break;case r.SyntaxKind.MinusToken:B="-";break;case r.SyntaxKind.TildeToken:B="~";break;case r.SyntaxKind.ExclamationToken:B="!";break;default:return}return s({__symbolic:"pre",operator:B,operand:V},t);case r.SyntaxKind.BinaryExpression:var H=t,q=this.evaluateNode(H.left),U=this.evaluateNode(H.right);if(Hh(q)&&Hh(U)){if(Bh(q)&&Bh(U))switch(H.operatorToken.kind){case r.SyntaxKind.BarBarToken:return q||U;case r.SyntaxKind.AmpersandAmpersandToken:return q&&U;case r.SyntaxKind.AmpersandToken:return q&U;case r.SyntaxKind.BarToken:return q|U;case r.SyntaxKind.CaretToken:return q^U;case r.SyntaxKind.EqualsEqualsToken:return q==U;case r.SyntaxKind.ExclamationEqualsToken:return q!=U;case r.SyntaxKind.EqualsEqualsEqualsToken:return q===U;case r.SyntaxKind.ExclamationEqualsEqualsToken:return q!==U;case r.SyntaxKind.LessThanToken:return q<U;case r.SyntaxKind.GreaterThanToken:return q>U;case r.SyntaxKind.LessThanEqualsToken:return q<=U;case r.SyntaxKind.GreaterThanEqualsToken:return q>=U;case r.SyntaxKind.LessThanLessThanToken:return q<<U;case r.SyntaxKind.GreaterThanGreaterThanToken:return q>>U;case r.SyntaxKind.GreaterThanGreaterThanGreaterThanToken:return q>>>U;case r.SyntaxKind.PlusToken:return q+U;case r.SyntaxKind.MinusToken:return q-U;case r.SyntaxKind.AsteriskToken:return q*U;case r.SyntaxKind.SlashToken:return q/U;case r.SyntaxKind.PercentToken:return q%U}return s({__symbolic:"binop",operator:H.operatorToken.getText(),left:q,right:U},t)}break;case r.SyntaxKind.ConditionalExpression:var K=t,W=this.evaluateNode(K.condition),z=this.evaluateNode(K.whenTrue),Q=this.evaluateNode(K.whenFalse);return Bh(W)?W?z:Q:s({__symbolic:"if",condition:W,thenExpression:z,elseExpression:Q},t);case r.SyntaxKind.FunctionExpression:case r.SyntaxKind.ArrowFunction:return s(Uh("Lambda not supported",t),t);case r.SyntaxKind.TaggedTemplateExpression:return s(Uh("Tagged template expressions are not supported in metadata",t),t);case r.SyntaxKind.TemplateExpression:var G=t;return this.isFoldable(t)?G.templateSpans.reduce(function(t,e){return t+i.evaluateNode(e.expression)+i.evaluateNode(e.literal)},this.evaluateNode(G.head)):G.templateSpans.reduce(function(t,e){var n=i.evaluateNode(e.expression),r=i.evaluateNode(e.literal);if(u(n))return n;if(u(r))return r;if("string"==typeof t&&"string"==typeof n&&"string"==typeof r)return t+n+r;var o=n;return""!==t&&(o={__symbolic:"binop",operator:"+",left:t,right:n}),""!=r&&(o={__symbolic:"binop",operator:"+",left:o,right:r}),o},this.evaluateNode(G.head));case r.SyntaxKind.AsExpression:return this.evaluateNode(t.expression);case r.SyntaxKind.ClassExpression:return{__symbolic:"class"}}return s(Uh("Expression form not supported",t),t)},t}();function Wh(t){return t.kind==r.SyntaxKind.PropertyAssignment}var zh=r.createNodeArray();function Qh(t){return t||zh}
|
|
652
652
|
/**
|
|
653
653
|
* @license
|
|
654
654
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -662,7 +662,7 @@ var ih=r.ModifierFlags?function(t){return!!(r.getCombinedModifierFlags(t)&r.Modi
|
|
|
662
662
|
*
|
|
663
663
|
* Use of this source code is governed by an MIT-style license that can be
|
|
664
664
|
* found in the LICENSE file at https://angular.io/license
|
|
665
|
-
*/(t=this._symbols=new Map),this.buildImports()),t},enumerable:!0,configurable:!0}),t.prototype.buildImports=function(){var t=this,e=this._symbols,n=function(t){return t.replace(/^['"]|['"]$/g,"")},i=function(o){var s,a;switch(o.kind){case r.SyntaxKind.ImportEqualsDeclaration:var u=o;if(u.moduleReference.kind===r.SyntaxKind.ExternalModuleReference){var c=u.moduleReference;if(c.expression){c.expression.parent||(c.expression.parent=c,c.parent=t.sourceFile);var l=n(c.expression.getText());e.set(u.name.text,{__symbolic:"reference",module:l});break}}e.set(u.name.text,{__symbolic:"error",message:"Unsupported import syntax"});break;case r.SyntaxKind.ImportDeclaration:var h=o;if(!h.importClause)break;h.moduleSpecifier.parent||(h.moduleSpecifier.parent=h,h.parent=t.sourceFile);var f=n(h.moduleSpecifier.getText());h.importClause.name&&e.set(h.importClause.name.text,{__symbolic:"reference",module:f,default:!0});var d=h.importClause.namedBindings;if(d)switch(d.kind){case r.SyntaxKind.NamedImports:try{for(var v=p(d.elements),y=v.next();!y.done;y=v.next()){var m=y.value;e.set(m.name.text,{__symbolic:"reference",module:f,name:m.propertyName?m.propertyName.text:m.name.text})}}catch(t){s={error:t}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}break;case r.SyntaxKind.NamespaceImport:e.set(d.name.text,{__symbolic:"reference",module:f})}}r.forEachChild(o,i)};this.sourceFile&&r.forEachChild(this.sourceFile,i)},t}(),$h=function(t){return r.getCombinedModifierFlags(t)&r.ModifierFlags.Static},Yh=function(){function t(t){void 0===t&&(t={}),this.options=t}return t.prototype.getMetadata=function(t,e,n){var i=this;void 0===e&&(e=!1);var o,s=new Xh(t),u=new Map,c=n&&this.options.substituteExpression?function(t,e){return i.options.substituteExpression(n(t,e),e)}:n,l=n?a({},this.options,{substituteExpression:c}):this.options,h=new Kh(s,u,l,function(t,e){o||(o={}),o[t]=e}),f=void 0;function d(e,n){return c&&(e=c(e,n)),Fh(e,n,u,t)}function v(e,n,r){return Uh(e,n,r,t)}function y(t){if(t.name&&t.name.kind==r.SyntaxKind.Identifier){var e=t.name.text,n=t.body;if(n&&1==n.statements.length){var i=n.statements[0];if(i.kind===r.SyntaxKind.ReturnStatement){var o=i;if(o.expression){var s={__symbolic:"function",parameters:function a(t){var e,n,i=[];function o(t){var e,n;if(t.kind==r.SyntaxKind.Identifier)i.push(t.text);else{var s=t;try{for(var a=p(s.elements),u=a.next();!u.done;u=a.next()){var c=u.value.name;c&&o(c)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}}}try{for(var s=p(t),a=s.next();!a.done;a=s.next())o(a.value.name)}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return i}(t.parameters),value:h.evaluateNode(o.expression)};return t.parameters.some(function(t){return null!=t.initializer})&&(s.defaults=t.parameters.map(function(t){return t.initializer&&h.evaluateNode(t.initializer)})),d({func:s,name:e},t)}}}}}var m=new Map;r.forEachChild(t,function(t){switch(t.kind){case r.SyntaxKind.ExportDeclaration:t.moduleSpecifier||t.exportClause.elements.forEach(function(t){m.set((t.propertyName||t.name).text,t.name.text)})}});var g=function(e){return t.isDeclarationFile||r.getCombinedModifierFlags(e)&r.ModifierFlags.Export},_=function(t){return t&&m.has(t.text)},b=function(t){return g(t)||_(t.name)},x=function(t){return t&&(m.get(t.text)||t.text)},w=function(t){return x(t.name)};if(r.forEachChild(t,function(t){switch(t.kind){case r.SyntaxKind.ClassDeclaration:var e=t;if(e.name){var n=e.name.text;b(e)?s.define(n,{__symbolic:"reference",name:w(e)}):s.define(n,v("Reference to non-exported class",t,{className:n}))}break;case r.SyntaxKind.InterfaceDeclaration:t.name&&s.define(t.name.text,{__symbolic:"reference",name:"any"});break;case r.SyntaxKind.FunctionDeclaration:var i=t;if(!b(i)){var o=i.name;o&&o.text&&s.define(o.text,v("Reference to a non-exported function",o,{name:o.text}))}}}),r.forEachChild(t,function(t){var e,n,i,a;switch(t.kind){case r.SyntaxKind.ExportDeclaration:var u=t.moduleSpecifier,c=t.exportClause;if(u||c&&c.elements.forEach(function(e){var n=e.name.text;if(!o||!o[n]){var r=h.evaluateNode(e.propertyName||e.name);o||(o={}),o[n]=d(r,t)}}),u&&u.kind==r.SyntaxKind.StringLiteral){var l={from:u.text};c&&(l.export=c.elements.map(function(t){return t.propertyName?{name:t.propertyName.text,as:t.name.text}:t.name.text})),f||(f=[]),f.push(l)}break;case r.SyntaxKind.ClassDeclaration:var m=t;m.name&&b(m)&&(P=w(m))&&(o||(o={}),o[P]=function E(t){var e,n,i,o,s={__symbolic:"class"};function a(t){if(t&&t.length)return t.map(function(t){return function e(t){return h.evaluateNode(t.expression)}(t)})}function u(t){var e=h.evaluateNode(t);return
|
|
665
|
+
*/(t=this._symbols=new Map),this.buildImports()),t},enumerable:!0,configurable:!0}),t.prototype.buildImports=function(){var t=this,e=this._symbols,n=function(t){return t.replace(/^['"]|['"]$/g,"")},i=function(o){var s,a;switch(o.kind){case r.SyntaxKind.ImportEqualsDeclaration:var u=o;if(u.moduleReference.kind===r.SyntaxKind.ExternalModuleReference){var c=u.moduleReference;if(c.expression){c.expression.parent||(c.expression.parent=c,c.parent=t.sourceFile);var l=n(c.expression.getText());e.set(u.name.text,{__symbolic:"reference",module:l});break}}e.set(u.name.text,{__symbolic:"error",message:"Unsupported import syntax"});break;case r.SyntaxKind.ImportDeclaration:var h=o;if(!h.importClause)break;h.moduleSpecifier.parent||(h.moduleSpecifier.parent=h,h.parent=t.sourceFile);var f=n(h.moduleSpecifier.getText());h.importClause.name&&e.set(h.importClause.name.text,{__symbolic:"reference",module:f,default:!0});var d=h.importClause.namedBindings;if(d)switch(d.kind){case r.SyntaxKind.NamedImports:try{for(var v=p(d.elements),y=v.next();!y.done;y=v.next()){var m=y.value;e.set(m.name.text,{__symbolic:"reference",module:f,name:m.propertyName?m.propertyName.text:m.name.text})}}catch(t){s={error:t}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}break;case r.SyntaxKind.NamespaceImport:e.set(d.name.text,{__symbolic:"reference",module:f})}}r.forEachChild(o,i)};this.sourceFile&&r.forEachChild(this.sourceFile,i)},t}(),$h=function(t){return r.getCombinedModifierFlags(t)&r.ModifierFlags.Static},Yh=function(){function t(t){void 0===t&&(t={}),this.options=t}return t.prototype.getMetadata=function(t,e,n){var i=this;void 0===e&&(e=!1);var o,s=new Xh(t),u=new Map,c=n&&this.options.substituteExpression?function(t,e){return i.options.substituteExpression(n(t,e),e)}:n,l=n?a({},this.options,{substituteExpression:c}):this.options,h=new Kh(s,u,l,function(t,e){o||(o={}),o[t]=e}),f=void 0;function d(e,n){return c&&(e=c(e,n)),Fh(e,n,u,t)}function v(e,n,r){return Uh(e,n,r,t)}function y(t){if(t.name&&t.name.kind==r.SyntaxKind.Identifier){var e=t.name.text,n=t.body;if(n&&1==n.statements.length){var i=n.statements[0];if(i.kind===r.SyntaxKind.ReturnStatement){var o=i;if(o.expression){var s={__symbolic:"function",parameters:function a(t){var e,n,i=[];function o(t){var e,n;if(t.kind==r.SyntaxKind.Identifier)i.push(t.text);else{var s=t;try{for(var a=p(s.elements),u=a.next();!u.done;u=a.next()){var c=u.value.name;c&&o(c)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}}}try{for(var s=p(t),a=s.next();!a.done;a=s.next())o(a.value.name)}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return i}(t.parameters),value:h.evaluateNode(o.expression)};return t.parameters.some(function(t){return null!=t.initializer})&&(s.defaults=t.parameters.map(function(t){return t.initializer&&h.evaluateNode(t.initializer)})),d({func:s,name:e},t)}}}}}var m=new Map;r.forEachChild(t,function(t){switch(t.kind){case r.SyntaxKind.ExportDeclaration:t.moduleSpecifier||t.exportClause.elements.forEach(function(t){m.set((t.propertyName||t.name).text,t.name.text)})}});var g=function(e){return t.isDeclarationFile||r.getCombinedModifierFlags(e)&r.ModifierFlags.Export},_=function(t){return t&&m.has(t.text)},b=function(t){return g(t)||_(t.name)},x=function(t){return t&&(m.get(t.text)||t.text)},w=function(t){return x(t.name)};if(r.forEachChild(t,function(t){switch(t.kind){case r.SyntaxKind.ClassDeclaration:var e=t;if(e.name){var n=e.name.text;b(e)?s.define(n,{__symbolic:"reference",name:w(e)}):s.define(n,v("Reference to non-exported class",t,{className:n}))}break;case r.SyntaxKind.InterfaceDeclaration:t.name&&s.define(t.name.text,{__symbolic:"reference",name:"any"});break;case r.SyntaxKind.FunctionDeclaration:var i=t;if(!b(i)){var o=i.name;o&&o.text&&s.define(o.text,v("Reference to a non-exported function",o,{name:o.text}))}}}),r.forEachChild(t,function(t){var e,n,i,a;switch(t.kind){case r.SyntaxKind.ExportDeclaration:var u=t.moduleSpecifier,c=t.exportClause;if(u||c&&c.elements.forEach(function(e){var n=e.name.text;if(!o||!o[n]){var r=h.evaluateNode(e.propertyName||e.name);o||(o={}),o[n]=d(r,t)}}),u&&u.kind==r.SyntaxKind.StringLiteral){var l={from:u.text};c&&(l.export=c.elements.map(function(t){return t.propertyName?{name:t.propertyName.text,as:t.name.text}:t.name.text})),f||(f=[]),f.push(l)}break;case r.SyntaxKind.ClassDeclaration:var m=t;m.name&&b(m)&&(P=w(m))&&(o||(o={}),o[P]=function E(t){var e,n,i,o,s={__symbolic:"class"};function a(t){if(t&&t.length)return t.map(function(t){return function e(t){return h.evaluateNode(t.expression)}(t)})}function u(t){var e=h.evaluateNode(t);return Dh(e)||Mh(e)||function n(t){return t&&"select"===t.__symbolic}(e)?e:v("Symbol reference expected",t)}t.heritageClauses&&t.heritageClauses.forEach(function(t){t.token===r.SyntaxKind.ExtendsKeyword&&t.types&&t.types.forEach(function(t){return s.extends=u(t.expression)})});var c=t.typeParameters;c&&c.length&&(s.arity=c.length),t.decorators&&(s.decorators=a(t.decorators));var l=null;function f(t,e){l||(l={});var n=l.hasOwnProperty(t)?l[t]:[];n.push(e),l[t]=n}var m=null;function g(t,e){m||(m={}),m[t]=e}try{for(var _=p(t.members),b=_.next();!b.done;b=_.next()){var x=b.value,w=!1;switch(x.kind){case r.SyntaxKind.Constructor:case r.SyntaxKind.MethodDeclaration:w=x.kind===r.SyntaxKind.Constructor;var E=x;if($h(E)){var S=y(E);S&&g(S.name,S.func);continue}var C=a(E.decorators),T=E.parameters,P=[],A=[],N=!1,k=!1;try{for(var O=p(T),I=O.next();!I.done;I=O.next()){var M=I.value,D=a(M.decorators);P.push(D),N=N||!!D,w&&(A.push(M.type?u(M.type):null),k=!0)}}catch(t){i={error:t}}finally{try{I&&!I.done&&(o=O.return)&&o.call(O)}finally{if(i)throw i.error}}var R={__symbolic:w?"constructor":"method"},L=w?"__ctor__":h.nameOf(x.name);C&&(R.decorators=C),N&&(R.parameterDecorators=P),k&&(R.parameters=A),Dh(L)||f(L,R);break;case r.SyntaxKind.PropertyDeclaration:case r.SyntaxKind.GetAccessor:case r.SyntaxKind.SetAccessor:var j=x;if($h(j)){var F=h.nameOf(j.name);Dh(F)||g(F,j.initializer?h.evaluateNode(j.initializer):v("Variable not initialized",j.name))}var V=a(j.decorators);if(V){var B=h.nameOf(j.name);Dh(B)||f(B,{__symbolic:"property",decorators:V})}}}}catch(t){e={error:t}}finally{try{b&&!b.done&&(n=_.return)&&n.call(_)}finally{if(e)throw e.error}}return l&&(s.members=l),m&&(s.statics=m),d(s,t)}(m));break;case r.SyntaxKind.TypeAliasDeclaration:var S=t;S.name&&b(S)&&(P=w(S))&&(o||(o={}),o[P]={__symbolic:"interface"});break;case r.SyntaxKind.InterfaceDeclaration:var C=t;C.name&&b(C)&&(P=w(C))&&(o||(o={}),o[P]={__symbolic:"interface"});break;case r.SyntaxKind.FunctionDeclaration:var T=t;if(b(T)&&T.name){var P=w(T),A=y(T);P&&(o||(o={}),o[P]=A?d(A.func,t):{__symbolic:"function"})}break;case r.SyntaxKind.EnumDeclaration:var N=t;if(b(N)){var k={},O=w(N),I=0,M=0;try{for(var D=p(N.members),R=D.next();!R.done;R=D.next()){var L,j=R.value;L=j.initializer?h.evaluateNode(j.initializer):I,P=void 0,j.name.kind==r.SyntaxKind.Identifier&&(k[P=j.name.text]=L,M++),I="number"==typeof L?L+1:P?{__symbolic:"binary",operator:"+",left:{__symbolic:"select",expression:d({__symbolic:"reference",name:O},t),name:P}}:d(v("Unsupported enum member name",j.name),t)}}catch(t){e={error:t}}finally{try{R&&!R.done&&(n=D.return)&&n.call(D)}finally{if(e)throw e.error}}M&&O&&(o||(o={}),o[O]=d(k,t))}break;case r.SyntaxKind.VariableStatement:var F=t,V=function(e){if(e.name.kind==r.SyntaxKind.Identifier){var n,i=e.name;n=e.initializer?h.evaluateNode(e.initializer):d(v("Variable not initialized",i),i);var a=!1;if(g(F)||g(e)||_(i)){var u=x(i);u&&(o||(o={}),o[u]=d(n,t)),a=!0}"string"==typeof n||"number"==typeof n||"boolean"==typeof n?(s.define(i.text,n),a&&s.defineReference(i.text,{__symbolic:"reference",name:i.text})):a||(n&&!Dh(n)?s.define(i.text,d(n,t)):s.define(i.text,d(v("Reference to a local symbol",i,{name:i.text}),t)))}else{var c=function(e){switch(e.kind){case r.SyntaxKind.Identifier:var n=e,i=v("Destructuring not supported",n);s.define(n.text,i),g(t)&&(o||(o={}),o[n.text]=i);break;case r.SyntaxKind.BindingElement:c(e.name);break;case r.SyntaxKind.ObjectBindingPattern:case r.SyntaxKind.ArrayBindingPattern:e.elements.forEach(c)}};c(e.name)}};try{for(var B=p(F.declarationList.declarations),H=B.next();!H.done;H=B.next())V(H.value)}catch(t){i={error:t}}finally{try{H&&!H.done&&(a=B.return)&&a.call(B)}finally{if(i)throw i.error}}}}),o||f){o?e&&function E(t,e,n){var r=new Set(["Array","Object","Set","Map","string","number","any"]);function i(s){if(s)if(Array.isArray(s))s.forEach(i);else if("object"!=typeof s||s.hasOwnProperty("__symbolic")){if(Dh(s))!function a(n){if(o(e.get(n)))throw new Error(t.fileName+(void 0!=n.line?void 0!=n.character?":"+(n.line+1)+":"+(n.character+1):":"+(n.line+1):"")+": Metadata collected contains an error that will be reported at runtime: "+function r(t){switch(t.message){case"Reference to non-exported class":if(t.context&&t.context.className)return"Reference to a non-exported class "+t.context.className+". Consider exporting the class";break;case"Variable not initialized":return"Only initialized variables and constants can be referenced because the value of this variable is needed by the template compiler";case"Destructuring not supported":return"Referencing an exported destructured variable or constant is not supported by the template compiler. Consider simplifying this to avoid destructuring";case"Could not resolve type":if(t.context&&t.context.typeName)return"Could not resolve type "+t.context.typeName;break;case"Function call not supported":return(t.context&&t.context.name?"Calling function '"+t.context.name+"', f":"F")+"unction calls are not supported. Consider replacing the function or lambda with a reference to an exported function";case"Reference to a local symbol":if(t.context&&t.context.name)return"Reference to a local (non-exported) symbol '"+t.context.name+"'. Consider exporting the symbol"}return t.message}
|
|
666
666
|
/**
|
|
667
667
|
* @license
|
|
668
668
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -734,7 +734,7 @@ return function e(t){return t&&!!t.start}(t)?{start:t.start.offset,end:t.end.off
|
|
|
734
734
|
*
|
|
735
735
|
* Use of this source code is governed by an MIT-style license that can be
|
|
736
736
|
* found in the LICENSE file at https://angular.io/license
|
|
737
|
-
*/function hf(t,e,n){void 0===n&&(n=!1);var r=[],i=new(function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),i.prototype.visit=function(t){(!n||t.span.start<t.span.end)&&rf(e,t.span)&&(r.push(t),
|
|
737
|
+
*/function hf(t,e,n){void 0===n&&(n=!1);var r=[],i=new(function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),i.prototype.visit=function(t){(!n||t.span.start<t.span.end)&&rf(e,t.span)&&(r.push(t),Di(t,this))},i}(ki));return t instanceof Ai&&(t=t.ast),i.visit(t),new Us(r,e)}function ff(t,e,n,r){var i=hf(e,n);if(!i.empty){var o=t;return i.tail.visit({visitBinary:function(t){},visitChain:function(t){},visitConditional:function(t){},visitFunctionCall:function(t){},visitImplicitReceiver:function(t){},visitInterpolation:function(t){o=void 0},visitKeyedRead:function(t){},visitKeyedWrite:function(t){},visitLiteralArray:function(t){},visitLiteralMap:function(t){},visitLiteralPrimitive:function(t){},visitMethodCall:function(t){},visitPipe:function(t){n>=t.exp.span.end&&(!t.args||!t.args.length||n<t.args[0].span.start)&&(o=r.getPipes())},visitPrefixNot:function(t){},visitNonNullAssert:function(t){},visitPropertyRead:function(e){var n=s(e.receiver);o=n?n.members():t},visitPropertyWrite:function(e){var n=s(e.receiver);o=n?n.members():t},visitQuote:function(t){o=r.getBuiltinType(Wp.Any).members()},visitSafeMethodCall:function(e){var n=s(e.receiver);o=n?n.members():t},visitSafePropertyRead:function(e){var n=s(e.receiver);o=n?n.members():t}}),o&&o.values()}function s(e){return new $p(t,r,{}).getType(e)}}function df(t,e,n,r){var i=hf(e,n,!0);if(!i.empty){var o=void 0,s=void 0;return i.tail.visit({visitBinary:function(t){},visitChain:function(t){},visitConditional:function(t){},visitFunctionCall:function(t){},visitImplicitReceiver:function(t){},visitInterpolation:function(t){},visitKeyedRead:function(t){},visitKeyedWrite:function(t){},visitLiteralArray:function(t){},visitLiteralMap:function(t){},visitLiteralPrimitive:function(t){},visitMethodCall:function(t){var e=a(t.receiver);o=e&&e.members().get(t.name),s=t.span},visitPipe:function(t){if(n>=t.exp.span.end&&(!t.args||!t.args.length||n<t.args[0].span.start)){var e=r.getPipes();e&&(o=e.get(t.name),s=t.span)}},visitPrefixNot:function(t){},visitNonNullAssert:function(t){},visitPropertyRead:function(t){var e=a(t.receiver);o=e&&e.members().get(t.name),s=t.span},visitPropertyWrite:function(t){var e=a(t.receiver);o=e&&e.members().get(t.name),s=t.span},visitQuote:function(t){},visitSafeMethodCall:function(t){var e=a(t.receiver);o=e&&e.members().get(t.name),s=t.span},visitSafePropertyRead:function(t){var e=a(t.receiver);o=e&&e.members().get(t.name),s=t.span}}),o&&s?{symbol:o,span:s}:void 0}function a(e){return new $p(t,r,{}).getType(e)}}
|
|
738
738
|
/**
|
|
739
739
|
* @license
|
|
740
740
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -755,7 +755,7 @@ return function e(t){return t&&!!t.start}(t)?{start:t.start.offset,end:t.end.off
|
|
|
755
755
|
*
|
|
756
756
|
* Use of this source code is governed by an MIT-style license that can be
|
|
757
757
|
* found in the LICENSE file at https://angular.io/license
|
|
758
|
-
*/(t.substr(n.length))})),t.push("let"),e.result=t.map(function(t){return{kind:"key",name:t,sort:t}})};if(!u||u.key==n&&!u.expression)c();else if(u.keyIsVar){var l=this.attr.value.indexOf("=");if(this.result=[],l>=0&&s>=l){var p=r.map.get(i);if(p){var h=this.info.template.query.getTemplateContext(p.type.reference);h&&(this.result=this.symbolsToCompletions(h.values()))}}else u.key&&s<=u.key.length-n.length&&c()}else if(u.expression&&rf(s,u.expression.ast.span)||u.key&&s>u.span.start+(u.key.length-n.length)||!u.key){var f=new oi(0,this.attr.value.length);this.attributeValueCompletions(u.expression?u.expression.ast:new hi(f,new ci(f),""),s)}else c()}},e.prototype.visitBoundText=function(t){var e=this.position-t.sourceSpan.start.offset;if(rf(e,t.value.span)){var n=ff(this.getExpressionScope(),t.value,e,this.info.template.query);n&&(this.result=this.symbolsToCompletions(n))}},e.prototype.attributeValueCompletions=function(t,e){var n=ff(this.getExpressionScope(),t,null==e?this.attributeValuePosition:e,this.info.template.query);n&&(this.result=this.symbolsToCompletions(n))},e.prototype.symbolsToCompletions=function(t){return t.filter(function(t){return!t.name.startsWith("__")&&t.public}).map(function(t){return{kind:t.kind,name:t.name,sort:t.name}})},Object.defineProperty(e.prototype,"attributeValuePosition",{get:function(){return this.attr&&this.attr.valueSpan?this.position-this.attr.valueSpan.start.offset-1:0},enumerable:!0,configurable:!0}),e}(Fc),If=/^(\w+:)?(template$|^\*)/;function Mf(t){return t.input&&t.output?[t,{name:t.name,input:!0,output:!1},{name:t.name,input:!1,output:!0}]:[t]}function
|
|
758
|
+
*/(t.substr(n.length))})),t.push("let"),e.result=t.map(function(t){return{kind:"key",name:t,sort:t}})};if(!u||u.key==n&&!u.expression)c();else if(u.keyIsVar){var l=this.attr.value.indexOf("=");if(this.result=[],l>=0&&s>=l){var p=r.map.get(i);if(p){var h=this.info.template.query.getTemplateContext(p.type.reference);h&&(this.result=this.symbolsToCompletions(h.values()))}}else u.key&&s<=u.key.length-n.length&&c()}else if(u.expression&&rf(s,u.expression.ast.span)||u.key&&s>u.span.start+(u.key.length-n.length)||!u.key){var f=new oi(0,this.attr.value.length);this.attributeValueCompletions(u.expression?u.expression.ast:new hi(f,new ci(f),""),s)}else c()}},e.prototype.visitBoundText=function(t){var e=this.position-t.sourceSpan.start.offset;if(rf(e,t.value.span)){var n=ff(this.getExpressionScope(),t.value,e,this.info.template.query);n&&(this.result=this.symbolsToCompletions(n))}},e.prototype.attributeValueCompletions=function(t,e){var n=ff(this.getExpressionScope(),t,null==e?this.attributeValuePosition:e,this.info.template.query);n&&(this.result=this.symbolsToCompletions(n))},e.prototype.symbolsToCompletions=function(t){return t.filter(function(t){return!t.name.startsWith("__")&&t.public}).map(function(t){return{kind:t.kind,name:t.name,sort:t.name}})},Object.defineProperty(e.prototype,"attributeValuePosition",{get:function(){return this.attr&&this.attr.valueSpan?this.position-this.attr.valueSpan.start.offset-1:0},enumerable:!0,configurable:!0}),e}(Fc),If=/^(\w+:)?(template$|^\*)/;function Mf(t){return t.input&&t.output?[t,{name:t.name,input:!0,output:!1},{name:t.name,input:!1,output:!0}]:[t]}function Df(t){if(t.position){var e=t.position-t.template.span.start,n=pf(t.templateAst,e);if(n.tail){var r=void 0,i=void 0,o=function(o,s){void 0===s&&(s=!1);var a=function u(t){if(t.position)return Js(t.htmlAst,t.position-t.template.span.start).first(Qs)}(t);if(a&&rf(e,nf(a.valueSpan))){var c=Jp(lf(t),n,s);if(a.valueSpan){var l=a.valueSpan.start.offset+1,p=df(c,o,e-l,t.template.query);p&&(r=p.symbol,i=of(p.span,l))}return!0}return!1};if(n.tail.visit({visitNgContent:function(t){},visitEmbeddedTemplate:function(t){},visitElement:function(e){var n=e.directives.find(function(t){return t.directive.isComponent});if(n)r=(r=t.template.query.getTypeSymbol(n.directive.type.reference))&&new Lf(r,"component"),i=nf(e);else{var o=e.directives.find(function(t){return null!=t.directive.selector&&t.directive.selector.indexOf(e.name)>=0});o&&(r=(r=t.template.query.getTypeSymbol(o.directive.type.reference))&&new Lf(r,"directive"),i=nf(e))}},visitReference:function(e){r=e.value&&t.template.query.getTypeSymbol(sn(e.value)),i=nf(e)},visitVariable:function(t){},visitEvent:function(e){o(e.handler,!0)||(r=(r=function s(t,e,n){var r,i,o=e.first(Ic);if(o)try{for(var s=p(o.directives),a=s.next();!a.done;a=s.next()){var u=a.value,c=Rf(u.directive.outputs)[n.name];if(c){var l=t.template.query.getTypeSymbol(u.directive.type.reference);if(l)return l.members().get(c)}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}(t,n,e))&&new Lf(r,"event"),i=nf(e))},visitElementProperty:function(t){o(t.value)},visitAttr:function(t){},visitBoundText:function(o){var s=e-o.sourceSpan.start.offset;if(rf(s,o.value.span)){var a=df(Jp(lf(t),n,!1),o.value,s,t.template.query);a&&(r=a.symbol,i=of(a.span,o.sourceSpan.start.offset))}},visitText:function(t){},visitDirective:function(e){r=t.template.query.getTypeSymbol(e.directive.type.reference),i=nf(e)},visitDirectiveProperty:function(e){o(e.value)||(r=function s(t,e,n){var r,i,o=e.first(Ic);if(o)try{for(var s=p(o.directives),a=s.next();!a.done;a=s.next()){var u=a.value,c=Rf(u.directive.inputs)[n.templateName];if(c){var l=t.template.query.getTypeSymbol(u.directive.type.reference);if(l)return l.members().get(c)}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}(t,n,e),i=nf(e))}},null),r&&i)return{symbol:r,span:of(i,t.template.span.start)}}}}function Rf(t){var e,n,r={};try{for(var i=p(Object.keys(t)),o=i.next();!o.done;o=i.next()){var s=o.value;r[t[s]]=s}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var Lf=function(){function t(t,e){this.sym=t,this.kind=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.sym.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"language",{get:function(){return this.sym.language},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.sym.type},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this.sym.container},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"public",{get:function(){return this.sym.public},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"callable",{get:function(){return this.sym.callable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nullable",{get:function(){return this.sym.nullable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return this.sym.definition},enumerable:!0,configurable:!0}),t.prototype.members=function(){return this.sym.members()},t.prototype.signatures=function(){return this.sym.signatures()},t.prototype.selectSignature=function(t){return this.sym.selectSignature(t)},t.prototype.indexed=function(t){return this.sym.indexed(t)},t}();
|
|
759
759
|
/**
|
|
760
760
|
* @license
|
|
761
761
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -793,7 +793,7 @@ function s(t){var e=new th(t,function(e,n){return Jp(t,e,n)});return Bc(e,t.temp
|
|
|
793
793
|
*
|
|
794
794
|
* Use of this source code is governed by an MIT-style license that can be
|
|
795
795
|
* found in the LICENSE file at https://angular.io/license
|
|
796
|
-
*/(i,o)))}return function a(t){var e,n;if(t){var r=[],i=new Map;try{for(var o=p(t),s=o.next();!s.done;s=o.next()){var a=s.value,u=a.span,c=i.get(u.start);c||(c=new Set,i.set(u.start,c)),c.has(u.end)||(c.add(u.end),r.push(a))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}}(e)},t.prototype.getPipesAt=function(t,e){var n=this.getTemplateAstAtPosition(t,e);return n?n.pipes:[]},t.prototype.getCompletionsAt=function(t,e){var n=this.getTemplateAstAtPosition(t,e);if(n)return function r(t){var e=void 0,n=t.template;if(null!=t.position){var r=t.position-n.span.start,i=Js(t.htmlAst,r),o=i.tail;if(i.empty||!o)e=Nf(t);else{var a=r-o.sourceSpan.start.offset;o.visit({visitElement:function(n){var o=nf(n.sourceSpan);r<=o.start+n.name.length+1?e=Nf(t):r<o.end&&(e=Pf(t,i))},visitAttribute:function(n){n.valueSpan&&rf(r,nf(n.valueSpan))?n.valueSpan&&rf(r,nf(n.valueSpan))&&(e=function o(t,e,n){var r=pf(t.templateAst,e),i=r.tail,o=lf(t);if(i){var s=new Of(t,e,n,function(){return Jp(o,r,!1)});if(i.visit(s,null),!s.result||!s.result.length){var a=pf(t.templateAst,e,!0);if(a.tail){var u=new Of(t,e,n,function(){return Jp(o,a,!1)});return a.tail.visit(u,null),u.result}}return s.result}}(t,r,n)):e=Pf(t,i)},visitText:function(o){if(e=function c(t,e){for(var n,r=/&[A-Za-z]*;?(?!\d)/g,i=void 0;n=r.exec(t);)if(e>=n.index&&e<n.index+n[0].length){i=Object.keys(b).map(function(t){return{kind:"entity",name:"&"+t+";",sort:t}});break}return i}(function u(t,e){return t.source.substring(e.start,e.end)}(n,nf(o)),a))return e;if(e=function l(t,e){var n=pf(t.templateAst,e),r=n.tail;if(r){var i=new Of(t,e,void 0,function(){return Jp(lf(t),n,!1)});return r.visit(i,null),cf(i.result)}}(t,r))return e;var p=i.first(Gs);p?C(p.name).contentType===s.PARSABLE_DATA&&((e=kf(t,i))||(e=Nf(t))):(e=kf(t,i))||(e=Nf(t))},visitComment:function(t){},visitExpansion:function(t){},visitExpansionCase:function(t){}},null)}}return e}(n)},t.prototype.getDefinitionAt=function(t,e){var n=this.getTemplateAstAtPosition(t,e);if(n)return function r(t){var e=
|
|
796
|
+
*/(i,o)))}return function a(t){var e,n;if(t){var r=[],i=new Map;try{for(var o=p(t),s=o.next();!s.done;s=o.next()){var a=s.value,u=a.span,c=i.get(u.start);c||(c=new Set,i.set(u.start,c)),c.has(u.end)||(c.add(u.end),r.push(a))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}}(e)},t.prototype.getPipesAt=function(t,e){var n=this.getTemplateAstAtPosition(t,e);return n?n.pipes:[]},t.prototype.getCompletionsAt=function(t,e){var n=this.getTemplateAstAtPosition(t,e);if(n)return function r(t){var e=void 0,n=t.template;if(null!=t.position){var r=t.position-n.span.start,i=Js(t.htmlAst,r),o=i.tail;if(i.empty||!o)e=Nf(t);else{var a=r-o.sourceSpan.start.offset;o.visit({visitElement:function(n){var o=nf(n.sourceSpan);r<=o.start+n.name.length+1?e=Nf(t):r<o.end&&(e=Pf(t,i))},visitAttribute:function(n){n.valueSpan&&rf(r,nf(n.valueSpan))?n.valueSpan&&rf(r,nf(n.valueSpan))&&(e=function o(t,e,n){var r=pf(t.templateAst,e),i=r.tail,o=lf(t);if(i){var s=new Of(t,e,n,function(){return Jp(o,r,!1)});if(i.visit(s,null),!s.result||!s.result.length){var a=pf(t.templateAst,e,!0);if(a.tail){var u=new Of(t,e,n,function(){return Jp(o,a,!1)});return a.tail.visit(u,null),u.result}}return s.result}}(t,r,n)):e=Pf(t,i)},visitText:function(o){if(e=function c(t,e){for(var n,r=/&[A-Za-z]*;?(?!\d)/g,i=void 0;n=r.exec(t);)if(e>=n.index&&e<n.index+n[0].length){i=Object.keys(b).map(function(t){return{kind:"entity",name:"&"+t+";",sort:t}});break}return i}(function u(t,e){return t.source.substring(e.start,e.end)}(n,nf(o)),a))return e;if(e=function l(t,e){var n=pf(t.templateAst,e),r=n.tail;if(r){var i=new Of(t,e,void 0,function(){return Jp(lf(t),n,!1)});return r.visit(i,null),cf(i.result)}}(t,r))return e;var p=i.first(Gs);p?C(p.name).contentType===s.PARSABLE_DATA&&((e=kf(t,i))||(e=Nf(t))):(e=kf(t,i))||(e=Nf(t))},visitComment:function(t){},visitExpansion:function(t){},visitExpansionCase:function(t){}},null)}}return e}(n)},t.prototype.getDefinitionAt=function(t,e){var n=this.getTemplateAstAtPosition(t,e);if(n)return function r(t){var e=Df(t);return e&&e.symbol.definition}(n)},t.prototype.getHoverAt=function(t,e){var n=this.getTemplateAstAtPosition(t,e);if(n)return function r(t){var e=Df(t);if(e)return{text:function n(t){var e=[{text:t.kind},{text:" "},{text:t.name,language:t.language}],n=t.container;return n&&e.push({text:" of "},{text:n.name,language:n.language}),e}(e.symbol),span:e.span}}(n)},t.prototype.getTemplateAstAtPosition=function(t,e){var n=this.host.getTemplateAt(t,e);if(n){var r=this.getTemplateAst(n,t);if(r&&r.htmlAst&&r.templateAst&&r.directive&&r.directives&&r.pipes&&r.expressionParser)return{position:e,fileName:t,template:n,htmlAst:r.htmlAst,directive:r.directive,directives:r.directives,pipes:r.pipes,templateAst:r.templateAst,expressionParser:r.expressionParser}}},t.prototype.getTemplateAst=function(t,e){var n=this,r=void 0;try{var i=this.metadataResolver.getNonNormalizedDirectiveMetadata(t.type),o=i&&i.metadata;if(o){var s=new _a,a=new bl(s),u=new Bs(new Es),c=new Hc,l=new Zl(c,this.host.resolver.getReflector(),u,new Ra,a,null,[]),h=a.parse(t.source,"",!0),f=this.host.getAnalyzedModules(),d=f.ngModuleByPipeOrDirective.get(t.type);if(d||(d=function v(t){var e,n,r=void 0,i=0;try{for(var o=p(t.ngModules),s=o.next();!s.done;s=o.next()){var a=s.value,u=a.transitiveModule.directives.length;u>i&&(r=a,i=u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}
|
|
797
797
|
/**
|
|
798
798
|
* @license
|
|
799
799
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -874,7 +874,7 @@ var md,gd=[];!function(t){t[t.Token=0]="Token",t[t.Attribute=1]="Attribute"}(md|
|
|
|
874
874
|
* Use of this source code is governed by an MIT-style license that can be
|
|
875
875
|
* found in the LICENSE file at https://angular.io/license
|
|
876
876
|
*/
|
|
877
|
-
var _d,bd=sd("Inject",function(t){return{token:t}}),xd=sd("Optional"),wd=sd("Self"),Ed=sd("SkipSelf")
|
|
877
|
+
var _d,bd=sd("Inject",function(t){return{token:t}}),xd=sd("Optional"),wd=sd("Self"),Ed=sd("SkipSelf");sd("Host"),function(t){t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional"}(_d||(_d={}));var Sd,Cd=void 0;function Td(t){var e=Cd;return Cd=t,e}function Pd(t){var e=Sd;return Sd=t,e}function Ad(t,e){return void 0===e&&(e=_d.Default),(Sd||function n(t,e){if(void 0===e&&(e=_d.Default),void 0===Cd)throw new Error("inject() must be called from an injection context");return null===Cd?Nd(t,void 0,e):Cd.get(t,e&_d.Optional?null:void 0,e)})(t,e)}function Nd(t,e,n){var r=Gf(t);if(r&&"root"==r.providedIn)return void 0===r.value?r.value=r.factory():r.value;if(n&_d.Optional)return null;if(void 0!==e)return e;throw new Error("Injector: NOT_FOUND ["+yd(t)+"]")}function kd(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];if(Array.isArray(r)){if(0===r.length)throw new Error("Arguments array must have arguments.");for(var i=void 0,o=_d.Default,s=0;s<r.length;s++){var a=r[s];a instanceof xd||"Optional"===a.ngMetadataName?o|=_d.Optional:a instanceof Ed||"SkipSelf"===a.ngMetadataName?o|=_d.SkipSelf:a instanceof wd||"Self"===a.ngMetadataName?o|=_d.Self:i=a instanceof bd?a.token:a}e.push(Ad(i,o))}else e.push(Ad(r))}return e}
|
|
878
878
|
/**
|
|
879
879
|
* @license
|
|
880
880
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -889,21 +889,21 @@ var _d,bd=sd("Inject",function(t){return{token:t}}),xd=sd("Optional"),wd=sd("Sel
|
|
|
889
889
|
* Use of this source code is governed by an MIT-style license that can be
|
|
890
890
|
* found in the LICENSE file at https://angular.io/license
|
|
891
891
|
*/
|
|
892
|
-
var
|
|
892
|
+
var Od,Id=8,Md=8,Dd=9,Rd=-1,Ld=(Od=function Od(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}).prototype,jd=17,Fd=0,Vd=1,Bd=2,Hd=3,qd=4,Ud=5,Kd=6,Wd=7,zd=8,Qd=9,Gd=10,Xd=11,$d=12,Yd=14,Zd=16;function Jd(t,e,n){t.afterContentInit&&(e.contentHooks||(e.contentHooks=[])).push(n,t.afterContentInit),t.afterContentChecked&&((e.contentHooks||(e.contentHooks=[])).push(n,t.afterContentChecked),(e.contentCheckHooks||(e.contentCheckHooks=[])).push(n,t.afterContentChecked))}function tv(t,e,n){t.afterViewInit&&(e.viewHooks||(e.viewHooks=[])).push(n,t.afterViewInit),t.afterViewChecked&&((e.viewHooks||(e.viewHooks=[])).push(n,t.afterViewChecked),(e.viewCheckHooks||(e.viewCheckHooks=[])).push(n,t.afterViewChecked))}function ev(t,e,n){null!=t.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(n,t.onDestroy)}function nv(t,e,n,r){var i=r?e:n;i&&rv(t,i)}function rv(t,e){for(var n=0;n<e.length;n+=2)e[n+1].call(t[e[n]])}
|
|
893
893
|
/**
|
|
894
894
|
* @license
|
|
895
895
|
* Copyright Google Inc. All Rights Reserved.
|
|
896
896
|
*
|
|
897
897
|
* Use of this source code is governed by an MIT-style license that can be
|
|
898
898
|
* found in the LICENSE file at https://angular.io/license
|
|
899
|
-
*/function
|
|
899
|
+
*/function iv(t,e){var n=av(t),r=av(e);return n&&r?function i(t,e,n){for(var r=t[fd()](),i=e[fd()]();;){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}}(t,e,iv):!(n||!t||"object"!=typeof t&&"function"!=typeof t||r||!e||"object"!=typeof e&&"function"!=typeof e)||vd(t,e)}var ov=function(){function t(t){this.wrapped=t}return t.wrap=function(e){return new t(e)},t.unwrap=function(e){return t.isWrapped(e)?e.wrapped:e},t.isWrapped=function(e){return e instanceof t},t}(),sv=function(){function t(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}return t.prototype.isFirstChange=function(){return this.firstChange},t}();function av(t){return!!uv(t)&&(Array.isArray(t)||!(t instanceof Map)&&fd()in t)}function uv(t){return null!==t&&("function"==typeof t||"object"==typeof t)}
|
|
900
900
|
/**
|
|
901
901
|
* @license
|
|
902
902
|
* Copyright Google Inc. All Rights Reserved.
|
|
903
903
|
*
|
|
904
904
|
* Use of this source code is governed by an MIT-style license that can be
|
|
905
905
|
* found in the LICENSE file at https://angular.io/license
|
|
906
|
-
*/var
|
|
906
|
+
*/var cv=0,lv=1,pv="__ngContext__";
|
|
907
907
|
/**
|
|
908
908
|
* @license
|
|
909
909
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -911,14 +911,14 @@ var kd,Od=8,Id=8,Md=9,Rd=-1,Dd=(kd=function kd(t,e,n){this.factory=t,this.resolv
|
|
|
911
911
|
* Use of this source code is governed by an MIT-style license that can be
|
|
912
912
|
* found in the LICENSE file at https://angular.io/license
|
|
913
913
|
*/
|
|
914
|
-
function
|
|
914
|
+
function hv(t){return"function"==typeof t?t.name||t:"string"==typeof t?t:null==t?"":""+t}function fv(t){for(;Array.isArray(t);)t=t[Ud];return t}function dv(t,e){return fv(e[t.index])}function vv(t,e){var n=e[t];return n.length>=jd?n:n[Ud]}function yv(t){return 0!=(16384&t.flags)}function mv(t){return t[pv]}function gv(t){var e=mv(t);return e?Array.isArray(e)?e:e.lViewData:null}function _v(t){return 32767&t}function bv(t,e){for(var n=function r(t){return t>>16}(t),i=e;n>0;)i=i[Zd],n--;return i}var xv,wv,Ev,Sv,Cv,Tv,Pv,Av,Nv=("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(ld);
|
|
915
915
|
/**
|
|
916
916
|
* @license
|
|
917
917
|
* Copyright Google Inc. All Rights Reserved.
|
|
918
918
|
*
|
|
919
919
|
* Use of this source code is governed by an MIT-style license that can be
|
|
920
920
|
* found in the LICENSE file at https://angular.io/license
|
|
921
|
-
*/function
|
|
921
|
+
*/function kv(){return xv}function Ov(){return wv}function Iv(){return Ev}function Mv(t){Ev=t}function Dv(t,e){Ev=t,Av=e}function Rv(){return Sv}function Lv(t){Sv=t}function jv(){return Cv}function Fv(){return Pv}function Vv(){return Av}var Bv=!1;function Hv(){return Bv}function qv(t){Bv=t}var Uv=!0;function Kv(t){Uv=t}function Wv(t,e){var n=Av;return Cv=t&&t[Fd],Pv=t&&1==(1&t[Vd]),Uv=t&&Cv.firstTemplatePass,xv=t&&t[Xd],Ev=e,Sv=!0,Av=t,n&&(n[qd]=Tv),Tv=t&&t[qd],n}function zv(t,e){e||(Bv||nv(Av,Cv.viewHooks,Cv.viewCheckHooks,Pv),Av[Vd]&=-6),Av[Vd]|=16,Av[Wd]=Cv.bindingStartIndex,Wv(t,null)}
|
|
922
922
|
/**
|
|
923
923
|
* @license
|
|
924
924
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -926,49 +926,49 @@ function pv(t){return"function"==typeof t?t.name||t:"string"==typeof t?t:null==t
|
|
|
926
926
|
* Use of this source code is governed by an MIT-style license that can be
|
|
927
927
|
* found in the LICENSE file at https://angular.io/license
|
|
928
928
|
*/
|
|
929
|
-
var
|
|
929
|
+
var Qv=!1;function Gv(t){var e=Qv;return Qv=t,e}var Xv=255,$v=0;function Yv(t,e){var n=Jv(t,e);if(-1!==n)return n;var r=e[Fd];r.firstTemplatePass&&(t.injectorIndex=e.length,Zv(r.data,t),Zv(e,null),Zv(r.blueprint,null));var i=ty(t,e),o=_v(i),s=bv(i,e),a=t.injectorIndex;if(function u(t){return t!==Rd}(i))for(var c=s[Fd].data,l=0;l<8;l++)e[a+l]=s[o+l]|c[o+l];return e[a+Md]=i,a}function Zv(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Jv(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null==e[t.injectorIndex+Md]?-1:t.injectorIndex}function ty(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;for(var n=e[Kd],r=1;n&&-1===n.injectorIndex;)n=(e=e[Zd])[Kd],r++;return n?n.injectorIndex|r<<16|(n&&3===n.type?32768:0):-1}function ey(t,e,n,r,i){void 0===r&&(r=_d.Default);var o=function s(t){var e=t[zf];return"number"==typeof e?e&Xv:e}(n);if("function"==typeof o){var a=Iv(),u=Vv();Dv(t,e);try{var c=o();if(null!=c||r&_d.Optional)return c;throw new Error("No provider for "+hv(n))}finally{Dv(a,u)}}else if("number"==typeof o){var l=null,p=Jv(t,e),h=Rd;for((-1===p||r&_d.SkipSelf)&&(sy(r,h=-1===p?ty(t,e):e[p+Md])?(l=e[Fd],p=_v(h),e=bv(h,e)):p=-1);-1!==p;){h=e[p+Md];var f=e[Fd];if(oy(o,p,f.data)){var d=ry(p,e,n,l);if(d!==ny)return d}sy(r,h)&&oy(o,p,e)?(l=f,p=_v(h),e=bv(h,e)):p=-1}}if(r&_d.Optional&&void 0===i&&(i=null),0==(r&(_d.Self|_d.Host))){var v=e[Gd];return v?v.get(n,i,r&_d.Optional):Nd(n,i,r&_d.Optional)}if(r&_d.Optional)return i;throw new Error("NodeInjector: NOT_FOUND ["+hv(n)+"]")}var ny={};function ry(t,e,n,r){var i=e[Fd],o=i.data[t+Id],s=o.flags,a=o.providerIndexes,u=i.data,c=!1;(null==r&&function l(t){return 4096==(4096&t.flags)}(o)&&Qv||null!=r&&r!=i&&(null==i.node||3===i.node.type))&&(c=!0);for(var p=65535&a,h=s>>16,f=4095&s,d=c?p:p+(a>>16);d<h+f;d++){var v=u[d];if(d<h&&n===v||d>=h&&v.type===n)return iy(u,e,d,o)}return ny}function iy(t,e,n,r){var i=e[n];if(function o(t){return null!=t&&"object"==typeof t&&Object.getPrototypeOf(t)==Ld}
|
|
930
930
|
/**
|
|
931
931
|
* @license
|
|
932
932
|
* Copyright Google Inc. All Rights Reserved.
|
|
933
933
|
*
|
|
934
934
|
* Use of this source code is governed by an MIT-style license that can be
|
|
935
935
|
* found in the LICENSE file at https://angular.io/license
|
|
936
|
-
*/(i)){var s=i;if(s.resolving)throw new Error("Circular dep for "+
|
|
936
|
+
*/(i)){var s=i;if(s.resolving)throw new Error("Circular dep for "+hv(t[n]));var a=Gv(s.canSeeViewProviders);s.resolving=!0;var u=void 0;s.injectImpl&&(u=Pd(s.injectImpl));var c=Iv(),l=Vv();Dv(r,e);try{i=e[n]=s.factory(null,t,e,r)}finally{s.injectImpl&&Pd(u),Gv(a),s.resolving=!1,Dv(c,l)}}return i}function oy(t,e,n){var r=64&t,i=32&t;return!!((128&t?r?i?n[e+7]:n[e+6]:i?n[e+5]:n[e+4]:r?i?n[e+3]:n[e+2]:i?n[e+1]:n[e])&1<<t)}function sy(t,e){return!(t&_d.Self||t&_d.Host&&32768&e)}var ay=function(){function t(t,e){this._tNode=t,this._hostView=e,this._injectorIndex=Yv(t,e)}return t.prototype.get=function(t){return Dv(this._tNode,this._hostView),ey(this._tNode,this._hostView,t)},t}();
|
|
937
937
|
/**
|
|
938
938
|
* @license
|
|
939
939
|
* Copyright Google Inc. All Rights Reserved.
|
|
940
940
|
*
|
|
941
941
|
* Use of this source code is governed by an MIT-style license that can be
|
|
942
942
|
* found in the LICENSE file at https://angular.io/license
|
|
943
|
-
*/function
|
|
943
|
+
*/function uy(t,e,n){return{lViewData:t,nodeIndex:e,native:n,component:void 0,directives:void 0,localRefs:void 0}}function cy(t,e){t[pv]=e}function ly(t,e){for(var n=t[Fd].firstChild;n;){if(dv(n,t)===e)return n.index;n=py(n)}return-1}function py(t){return t.child?t.child:t.next?t.next:t.parent&&t.parent.next||null}function hy(t,e){var n=t[Fd].components;if(n)for(var r=0;r<n.length;r++){var i=n[r];if(vv(i,t)[Qd]===e)return i}else if(vv(jd,t)[Qd]===e)return jd;return-1}function fy(t){return t.flags>>16}function dy(t,e){var n=4095&t.flags;return n?e+n:-1}
|
|
944
944
|
/**
|
|
945
945
|
* @license
|
|
946
946
|
* Copyright Google Inc. All Rights Reserved.
|
|
947
947
|
*
|
|
948
948
|
* Use of this source code is governed by an MIT-style license that can be
|
|
949
949
|
* found in the LICENSE file at https://angular.io/license
|
|
950
|
-
*/function
|
|
950
|
+
*/function vy(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}
|
|
951
951
|
/**
|
|
952
952
|
* @license
|
|
953
953
|
* Copyright Google Inc. All Rights Reserved.
|
|
954
954
|
*
|
|
955
955
|
* Use of this source code is governed by an MIT-style license that can be
|
|
956
956
|
* found in the LICENSE file at https://angular.io/license
|
|
957
|
-
*/var
|
|
957
|
+
*/var yy=Vf({__forward_ref__:Vf});function my(t){return t.__forward_ref__=my,t.toString=function(){return yd(this())},t}function gy(t){var e=t;return"function"==typeof e&&e.hasOwnProperty(yy)&&e.__forward_ref__===my?e():t}
|
|
958
958
|
/**
|
|
959
959
|
* @license
|
|
960
960
|
* Copyright Google Inc. All Rights Reserved.
|
|
961
961
|
*
|
|
962
962
|
* Use of this source code is governed by an MIT-style license that can be
|
|
963
963
|
* found in the LICENSE file at https://angular.io/license
|
|
964
|
-
*/var
|
|
964
|
+
*/var _y="__source",by=new Object,xy=by,wy=new td("INJECTOR"),Ey=function(){function t(){}return t.prototype.get=function(t,e){if(void 0===e&&(e=by),e===by)throw new Error("NullInjectorError: No provider for "+yd(t)+"!");return e},t}(),Sy=function(){function t(){}return t.create=function(t,e){return Array.isArray(t)?new Dy(t,e):new Dy(t.providers,t.parent,t.name||null)},t.THROW_IF_NOT_FOUND=by,t.NULL=new Ey,t.ngInjectableDef=Qf({providedIn:"any",factory:function(){return Ad(wy)}}),t.__NG_ELEMENT_ID__=function(){return Cy()},t}(),Cy=vy,Ty=function(t){return t},Py=[],Ay=Ty,Ny=function(){return Array.prototype.slice.call(arguments)},ky=Vf({provide:String,useValue:Vf}),Oy=Sy.NULL,Iy=/\n/gm,My="ɵ",Dy=function(){function t(t,e,n){void 0===e&&(e=Oy),void 0===n&&(n=null),this.parent=e,this.source=n;var r=this._records=new Map;r.set(Sy,{token:Sy,fn:Ty,deps:Py,value:this,useNew:!1}),r.set(wy,{token:wy,fn:Ty,deps:Py,value:this,useNew:!1}),function t(e,n){if(n)if((n=gy(n))instanceof Array)for(var r=0;r<n.length;r++)t(e,n[r]);else{if("function"==typeof n)throw jy("Function/Class not supported",n);if(!n||"object"!=typeof n||!n.provide)throw jy("Unexpected provider",n);var i=gy(n.provide),o=function s(t){var e=function n(t){var e=Py,n=t.deps;if(n&&n.length){e=[];for(var r=0;r<n.length;r++){var i=6;if((u=gy(n[r]))instanceof Array)for(var o=0,s=u;o<s.length;o++){var a=s[o];a instanceof xd||a==xd?i|=1:a instanceof Ed||a==Ed?i&=-3:a instanceof wd||a==wd?i&=-5:u=a instanceof bd?a.token:gy(a)}e.push({token:u,options:i})}}else if(t.useExisting){var u;e=[{token:u=gy(t.useExisting),options:6}]}else if(!(n||ky in t))throw jy("'deps' required",t);return e}(t),r=Ty,i=Py,o=!1,s=gy(t.provide);if(ky in t)i=t.useValue;else if(t.useFactory)r=t.useFactory;else if(t.useExisting);else if(t.useClass)o=!0,r=gy(t.useClass);else{if("function"!=typeof s)throw jy("StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable",t);o=!0,r=s}return{deps:e,fn:r,useNew:o,value:i}}(n);if(!0===n.multi){var a=e.get(i);if(a){if(a.fn!==Ny)throw Ry(i)}else e.set(i,a={token:n.provide,deps:[],useNew:!1,fn:Ny,value:Py});a.deps.push({token:i=n,options:6})}var u=e.get(i);if(u&&u.fn==Ny)throw Ry(i);e.set(i,o)}}(r,t)}return t.prototype.get=function(t,e,n){void 0===n&&(n=_d.Default);var r=this._records.get(t);try{return function t(e,n,r,i,o,s){try{return function a(e,n,r,i,o,s){var a,u;if(!n||s&_d.SkipSelf)s&_d.Self||(u=i.get(e,o,_d.Default));else{if((u=n.value)==Ay)throw Error(My+"Circular dependency");if(u===Py){n.value=Ay;var c=n.useNew,l=n.fn,p=n.deps,h=Py;if(p.length){h=[];for(var d=0;d<p.length;d++){var v=p[d],y=v.options,m=2&y?r.get(v.token):void 0;h.push(t(v.token,m,r,m||4&y?i:Oy,1&y?null:Sy.THROW_IF_NOT_FOUND,_d.Default))}}n.value=u=c?new((a=l).bind.apply(a,f([void 0],h))):l.apply(void 0,h)}}return u}(e,n,r,i,o,s)}catch(t){throw t instanceof Error||(t=new Error(t)),(t.ngTempTokenPath=t.ngTempTokenPath||[]).unshift(e),n&&n.value==Ay&&(n.value=Py),t}}(t,r,this._records,this.parent,e,n)}catch(e){var i=e.ngTempTokenPath;throw t[_y]&&i.unshift(t[_y]),e.message=Ly("\n"+e.message,i,this.source),e.ngTokenPath=i,e.ngTempTokenPath=null,e}},t.prototype.toString=function(){var t=[];return this._records.forEach(function(e,n){return t.push(yd(n))}),"StaticInjector["+t.join(", ")+"]"},t}();function Ry(t){return jy("Cannot mix multi providers and regular providers",t)}function Ly(t,e,n){void 0===n&&(n=null),t=t&&"\n"===t.charAt(0)&&t.charAt(1)==My?t.substr(2):t;var r=yd(e);if(e instanceof Array)r=e.map(yd).join(" -> ");else if("object"==typeof e){var i=[];for(var o in e)if(e.hasOwnProperty(o)){var s=e[o];i.push(o+":"+("string"==typeof s?JSON.stringify(s):yd(s)))}r="{"+i.join(", ")+"}"}return"StaticInjectorError"+(n?"("+n+")":"")+"["+r+"]: "+t.replace(Iy,"\n ")}function jy(t,e){return new Error(Ly(t,e))}
|
|
965
965
|
/**
|
|
966
966
|
* @license
|
|
967
967
|
* Copyright Google Inc. All Rights Reserved.
|
|
968
968
|
*
|
|
969
969
|
* Use of this source code is governed by an MIT-style license that can be
|
|
970
970
|
* found in the LICENSE file at https://angular.io/license
|
|
971
|
-
*/var
|
|
971
|
+
*/var Fy,Vy=function Vy(){},By=function By(){},Hy="ngProjectAs";function qy(t){return!!t.listen}!function(t){t[t.Important=1]="Important",t[t.DashCase=2]="DashCase"}(Fy||(Fy={}));var Uy={createRenderer:function(t,e){return document}},Ky=[];
|
|
972
972
|
/**
|
|
973
973
|
* @license
|
|
974
974
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -982,7 +982,7 @@ var zv=!1;function Qv(t){var e=zv;return zv=t,e}var Gv=255,Xv=0;function $v(t,e)
|
|
|
982
982
|
*
|
|
983
983
|
* Use of this source code is governed by an MIT-style license that can be
|
|
984
984
|
* found in the LICENSE file at https://angular.io/license
|
|
985
|
-
*/function
|
|
985
|
+
*/function Wy(t){for(var e=t[Kd];e&&2===e.type;)e=(t=t[Bd])[Kd];return t}function zy(t,e,n,r,i){0===t?qy(e)?e.insertBefore(n,r,i):n.insertBefore(r,i,!0):1===t?qy(e)?e.removeChild(n,r):n.removeChild(r):2===t&&e.destroyNode(r)}function Qy(t){var e=t[Fd].childIndex;return-1===e?null:t[e]}function Gy(t,e){var n;return t.length>=jd&&(n=t[Kd])&&2===n.type?function r(t,e){if(-1===t.index){var n=e[Yd];return n>-1?e[Bd][n]:null}return e[Bd][t.parent.index]}(n,t):t[Bd]===e?null:t[Bd]}function Xy(t){if(t.length>=jd){var e=t;!function n(t){var e=t[Fd].cleanup;if(null!=e){for(var n=0;n<e.length-1;n+=2)"string"==typeof e[n]?(fv(t[e[n+1]]).removeEventListener(e[n],t[zd][e[n+2]],e[n+3]),n+=2):"number"==typeof e[n]?(0,t[zd][e[n]])():e[n].call(t[zd][e[n+1]]);t[zd]=null}}(e),function r(t){var e,n=t[Fd];null!=n&&null!=(e=n.destroyHooks)&&rv(t,e)}(e),function i(t){var e=t[Fd]&&t[Fd].pipeDestroyHooks;e&&rv(t,e)}
|
|
986
986
|
/**
|
|
987
987
|
* @license
|
|
988
988
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -996,7 +996,7 @@ var zv=!1;function Qv(t){var e=zv;return zv=t,e}var Gv=255,Xv=0;function $v(t,e)
|
|
|
996
996
|
*
|
|
997
997
|
* Use of this source code is governed by an MIT-style license that can be
|
|
998
998
|
* found in the LICENSE file at https://angular.io/license
|
|
999
|
-
*/(e),-1===e[
|
|
999
|
+
*/(e),-1===e[Fd].id&&qy(e[Xd])&&e[Xd].destroy()}}var $y={},Yy=Promise.resolve(null);
|
|
1000
1000
|
/**
|
|
1001
1001
|
* @license
|
|
1002
1002
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1010,21 +1010,21 @@ var zv=!1;function Qv(t){var e=zv;return zv=t,e}var Gv=255,Xv=0;function $v(t,e)
|
|
|
1010
1010
|
*
|
|
1011
1011
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1012
1012
|
* found in the LICENSE file at https://angular.io/license
|
|
1013
|
-
*/function
|
|
1013
|
+
*/function Zy(t,e){var n=jv(),r=function i(){return Uv}();if(n.firstTemplatePass=!1,Kv(!1),1!==e){var o=Fv(),s=Hv();s||function a(t,e,n){16&t[Vd]&&(nv(t,e.initHooks,e.checkHooks,n),t[Vd]&=-17)}(t,n,o),function u(t){for(var e=Qy(t);null!==e;e=e[Hd])if(e.length<jd&&-1===e[cv])for(var n=e,r=0;r<n[lv].length;r++){var i=n[lv][r];nm(i,i[Fd],i[Qd],2)}}(t),function c(t){if(null!=t.contentQueries)for(var e=0;e<t.contentQueries.length;e+=2){var n=t.contentQueries[e];t.data[n].contentQueriesRefresh(n-jd,t.contentQueries[e+1])}}(n),s||nv(t,n.contentHooks,n.contentCheckHooks,o),function l(t,e){if(t.expandoInstructions)for(var n=e[Wd]=t.expandoStartIndex,r=-1,i=-1,o=0;o<t.expandoInstructions.length;o++){var s=t.expandoInstructions[o];if("number"==typeof s)if(s<=0){i=-s;var a=t.expandoInstructions[++o];r=n+=Dd+a}else n+=s;else e[Wd]=n,Mv(jv().data[i+jd]),s(r-jd,i),r++}}(n,t)}!function p(t,e,n){if(null!=t)for(var r=0;r<t.length;r++)lm(t[r],e,n)}(n.components,r,e)}function Jy(t,e,n,r,i,o,s){var a=n.blueprint.slice();return a[Vd]=25|i,a[Bd]=a[Zd]=t,a[Qd]=r,a[Gd]=void 0===s?t?t[Gd]:null:s,a[Xd]=e,a[$d]=o||null,a}function tm(t,e,n,r,i){var o=Vv(),s=jv(),a=t+jd;o[a]=n;var u=s.data[a];if(null==u){var c=Iv(),l=Rv();u=s.data[a]=cm(o,e,a,r,i,null),c&&(!l||null!=c.child||null===u.parent&&2!==c.type?l||(c.next=u):c.child=u)}return null==s.firstChild&&3===e&&(s.firstChild=u),Mv(u),Lv(!0),u}function em(t,e){null==e[Fd].node&&(e[Fd].node=cm(e,2,t,null,null,null)),Lv(!0);var n=e[Fd].node;return Mv(n),e[Kd]=n}function nm(t,e,n,r){var i,o=Rv(),s=Iv();if(Lv(!0),Mv(null),64&t[Vd])hm(function a(t){return function e(t){for(var e=Array.isArray(t)?t:gv(t);e&&!(64&e[Vd]);)e=e[Bd];return e}(t)[Qd]}(t));else try{Lv(!0),Mv(null),i=Wv(t,t[Kd]),sm(),e.template(r,n),2&r?Zy(t,null):(t[Fd].firstTemplatePass=!1,Kv(!1))}finally{zv(i,1==(1&r)),Lv(o),Mv(s)}}function rm(t,e,n,r){var i=Ov(),o=Wv(t,t[Kd]);try{i.begin&&i.begin(),r&&(sm(),r(n||im(t),e)),Zy(t,n)}finally{i.end&&i.end(),zv(o)}}function im(t){return 1&t[Vd]?3:2}var om=null;function sm(){om=null}function am(t,e,n,r,i,o,s){var a=jd+n,u=a+r,c=function l(t,e){var n=new Array(e).fill(null,0,t).fill($y,t);return n[Yd]=-1,n[Wd]=t,n}(a,u);return c[Fd]={id:t,blueprint:c,template:e,viewQuery:s,node:null,data:c.slice(),childIndex:-1,bindingStartIndex:a,expandoStartIndex:u,expandoInstructions:null,firstTemplatePass:!0,initHooks:null,checkHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,pipeDestroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof i?i():i,pipeRegistry:"function"==typeof o?o():o,firstChild:null}}function um(t,e){!function n(t){wv=t}(t);var r=t.createRenderer(null,null);return"string"==typeof e?qy(r)?r.selectRootElement(e):r.querySelector(e):e}function cm(t,e,n,r,i,o){var s=Iv(),a=Rv()?s:s&&s.parent,u=a&&t&&a!==t[Kd]?a:null;return{type:e,index:n,injectorIndex:u?u.injectorIndex:-1,flags:0,providerIndexes:0,tagName:r,attrs:i,localNames:null,initialInputs:void 0,inputs:void 0,outputs:void 0,tViews:o,next:null,child:null,parent:u,detached:null,stylingTemplate:null,projection:null}}function lm(t,e,n){var r=vv(t,Vv());pm(r)&&6&r[Vd]&&(e&&function i(t){for(var e=t[Fd],n=t.length;n<e.blueprint.length;n++)t[n]=e.blueprint[n]}(r),vm(r,r[Qd],n))}function pm(t){return 8==(8&t[Vd])}function hm(t){for(var e=0;e<t.components.length;e++){var n=t.components[e];rm(gv(n),n,2)}}function fm(t){vm(function e(t){var e,n=mv(t);if(Array.isArray(n)){var r=hy(n,t);(i=uy(n,r,(e=vv(r,n))[Ud])).component=t,cy(t,i),cy(i.native,i)}else{var i;e=vv((i=n).nodeIndex,i.lViewData)}return e}(t),t,null)}function dm(t){hm(t[Qd])}function vm(t,e,n){var r=t[Fd],i=Wv(t,t[Kd]),o=r.template,s=r.viewQuery;try{sm(),function a(t,e,n,r){t&&(1===e||null===e&&1&n)&&t(1,r)}(s,n,t[Vd],e),o(n||im(t),e),Zy(t,n),function u(t,e,n){t&&2&e&&t(2,n)}(s,t[Vd],e)}finally{zv(i,1===n)}}var ym,mm,gm=Yy,_m=function(){function t(t,e,n){this._context=e,this._componentIndex=n,this._appRef=null,this._viewContainerRef=null,this._tViewNode=null,this._view=t}return Object.defineProperty(t.prototype,"rootNodes",{get:function(){return null==this._view[Ud]?function t(e,n,r){for(var i=n.child;i;)r.push(dv(i,e)),4===i.type&&t(e,i,r),i=i.next;return r}
|
|
1014
1014
|
/**
|
|
1015
1015
|
* @license
|
|
1016
1016
|
* Copyright Google Inc. All Rights Reserved.
|
|
1017
1017
|
*
|
|
1018
1018
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1019
1019
|
* found in the LICENSE file at https://angular.io/license
|
|
1020
|
-
*/(this._view,this._view[
|
|
1020
|
+
*/(this._view,this._view[Kd],[]):[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._context?this._context:this._lookUpContext()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroyed",{get:function(){return 32==(32&this._view[Vd])},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this._viewContainerRef&&pm(this._view)&&(this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),this._viewContainerRef=null),function t(e){var n=e[Xd];qy(n)&&n.destroyNode&&function r(t,e,n,i,o){for(var s,a=t[Fd].node,u=-1,c=t,l=a.child;l;){var p=null;if(3===l.type){zy(e,n,i,dv(l,c),o);var h=c[l.index];s=h,Array.isArray(s)&&"number"==typeof s[cv]&&zy(e,n,i,h[6],o)}else if(0===l.type){var f=c[l.index];zy(e,n,i,f[6],o),i&&(f[7]=i),f[lv].length&&(p=(c=f[lv][0])[Fd].node,o=f[6])}else if(1===l.type){var d=Wy(c),v=d[Kd].projection[l.projection];Ky[++u]=l,Ky[++u]=c,v&&(p=(c=d[Bd])[Fd].data[v.index])}else p=l.child;if(null===p)for(null===l.next&&8192&l.flags&&(c=Ky[u--],l=Ky[u--]),p=l.next;!p;){if(null===(l=l.parent||c[Fd].node)||l===a)return null;0===l.type&&(o=(c=c[Bd])[l.index][6]),p=2===l.type&&c[Hd]?(c=c[Hd])[Fd].node:l.next}l=p}}(e,2,n,null),function i(t){if(-1===t[Fd].childIndex)return Xy(t);for(var e=Qy(t);e;){var n=null;if(e.length>=jd?e[Fd].childIndex>-1&&(n=Qy(e)):e[lv].length&&(n=e[lv][0]),null==n){for(;e&&!e[Hd]&&e!==t;)Xy(e),e=Gy(e,t);Xy(e||t),n=e&&e[Hd]}e=n}}(e),e[Vd]|=32}(this._view)},t.prototype.onDestroy=function(t){!function e(t,n){(function r(t){return t[zd]||(t[zd]=[])})(t).push(n),t[Fd].firstTemplatePass&&function i(t){return t[Fd].cleanup||(t[Fd].cleanup=[])}(t).push(t[zd].length-1,null)}(this._view,t)},t.prototype.markForCheck=function(){!function t(e){for(var n=e;n&&!(64&n[Vd]);)n[Vd]|=4,n=n[Bd];n[Vd]|=4,function r(t,e){var n,r=0===t.flags;t.flags|=e,r&&t.clean==Yy&&(t.clean=new Promise(function(t){return n=t}),t.scheduler(function(){if(1&t.flags&&(t.flags&=-2,hm(t)),2&t.flags){t.flags&=-3;var e=t.playerHandler;e&&e.flushPlayers()}t.clean=Yy,n(null)}))}(n[Qd],1)}(this._view)},t.prototype.detach=function(){this._view[Vd]&=-9},t.prototype.reattach=function(){this._view[Vd]|=8},t.prototype.detectChanges=function(){var t=Ov();t.begin&&t.begin(),fm(this.context),t.end&&t.end()},t.prototype.checkNoChanges=function(){!function t(e){qv(!0);try{fm(e)}finally{qv(!1)}}(this.context)},t.prototype.attachToViewContainerRef=function(t){this._viewContainerRef=t},t.prototype.detachFromAppRef=function(){this._appRef=null},t.prototype.attachToAppRef=function(t){this._appRef=t},t.prototype._lookUpContext=function(){return this._context=this._view[Bd][this._componentIndex]},t}(),bm=function(t){function e(e){var n=t.call(this,e,null,-1)||this;return n._view=e,n}return o(e,t),e.prototype.detectChanges=function(){dm(this._view)},e.prototype.checkNoChanges=function(){!function t(e){qv(!0);try{dm(e)}finally{qv(!1)}}(this._view)},Object.defineProperty(e.prototype,"context",{get:function(){return null},enumerable:!0,configurable:!0}),e}(_m);
|
|
1021
1021
|
/**
|
|
1022
1022
|
* @license
|
|
1023
1023
|
* Copyright Google Inc. All Rights Reserved.
|
|
1024
1024
|
*
|
|
1025
1025
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1026
1026
|
* found in the LICENSE file at https://angular.io/license
|
|
1027
|
-
*/function
|
|
1027
|
+
*/function xm(t,e,n){return ym||(ym=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(t)),new ym(dv(e,n))}var wm=function(){function t(t,e){this._tNode=t,this._hostView=e}return t.prototype.get=function(t,e){return ey(this._tNode,this._hostView,t,_d.Default,e)},t}();function Em(t){var e=function n(t){var e=mv(t);if(e){if(Array.isArray(e)){var n=e,r=void 0,i=void 0,o=void 0;if(function s(t){return t&&t.constructor&&t.constructor.ngComponentDef}(t)){if(-1==(r=hy(n,t)))throw new Error("The provided component was not found in the application");i=t}else if(function a(t){return t&&t.constructor&&t.constructor.ngDirectiveDef}(t)){if(-1==(r=function u(t,e){for(var n=t[Fd].firstChild;n;){for(var r=fy(n),i=dy(n,r),o=r;o<i;o++)if(t[o]===e)return n.index;n=py(n)}return-1}(n,t)))throw new Error("The provided directive was not found in the application");o=function c(t,e,n){var r=e[Fd].data[t],i=fy(r);if(0==i)return gd;var o=dy(r,i);return!n&&4096&r.flags&&i++,e.slice(i,o)}(r,n,!1)}else if(-1==(r=ly(n,t)))return null;var l=mv(m=fv(n[r])),p=l&&!Array.isArray(l)?l:uy(n,r,m);if(i&&void 0===p.component&&(p.component=i,cy(p.component,p)),o&&void 0===p.directives){p.directives=o;for(var h=0;h<o.length;h++)cy(o[h],p)}cy(p.native,p),e=p}}else for(var f=t,d=f;d=d.parentNode;){var v=mv(d);if(v){if(n=void 0,!(n=Array.isArray(v)?v:v.lViewData))return null;var y=ly(n,f);if(y>=0){var m;cy(m=fv(n[y]),p=uy(n,y,m)),e=p;break}}}return e||null}(t);if(!e)throw new Error("Invalid ng target");return e}function Sm(t,e){return{components:[],scheduler:t||Nv,clean:gm,playerHandler:e||null,flags:0}}function Cm(t,e){var n=gv(t)[Fd],r=n.data.length-1;!
|
|
1028
1028
|
/**
|
|
1029
1029
|
* @license
|
|
1030
1030
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1032,7 +1032,7 @@ var zv=!1;function Qv(t){var e=zv;return zv=t,e}var Gv=255,Xv=0;function $v(t,e)
|
|
|
1032
1032
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1033
1033
|
* found in the LICENSE file at https://angular.io/license
|
|
1034
1034
|
*/
|
|
1035
|
-
function i(t,e,n,r){e&&(r.initHooks||(r.initHooks=[])).push(t,e),n&&((r.initHooks||(r.initHooks=[])).push(t,n),(r.checkHooks||(r.checkHooks=[])).push(t,n))}(r,e.onInit,e.doCheck,n),function o(t,e){if(e.firstTemplatePass)for(var n=t>>16,r=n+(4095&t),i=n;i<r;i++){var o=e.data[i];
|
|
1035
|
+
function i(t,e,n,r){e&&(r.initHooks||(r.initHooks=[])).push(t,e),n&&((r.initHooks||(r.initHooks=[])).push(t,n),(r.checkHooks||(r.checkHooks=[])).push(t,n))}(r,e.onInit,e.doCheck,n),function o(t,e){if(e.firstTemplatePass)for(var n=t>>16,r=n+(4095&t),i=n;i<r;i++){var o=e.data[i];Jd(o,e,i),tv(o,e,i),ev(o,e,i)}}(r<<16|1,n)}
|
|
1036
1036
|
/**
|
|
1037
1037
|
* @license
|
|
1038
1038
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1053,14 +1053,14 @@ function i(t,e,n,r){e&&(r.initHooks||(r.initHooks=[])).push(t,e),n&&((r.initHook
|
|
|
1053
1053
|
*
|
|
1054
1054
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1055
1055
|
* found in the LICENSE file at https://angular.io/license
|
|
1056
|
-
*/var
|
|
1056
|
+
*/var Tm=new td("The presence of this token marks an injector as being the root injector."),Pm={},Am={},Nm=[],km=void 0;
|
|
1057
1057
|
/**
|
|
1058
1058
|
* @license
|
|
1059
1059
|
* Copyright Google Inc. All Rights Reserved.
|
|
1060
1060
|
*
|
|
1061
1061
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1062
1062
|
* found in the LICENSE file at https://angular.io/license
|
|
1063
|
-
*/function
|
|
1063
|
+
*/function Om(){return void 0===km&&(km=new Ey),km}var Im=function(){function t(t,e,n){var r=this;this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this.destroyed=!1;var i=[];Rm([t],function(t){return r.processInjectorType(t,[],i)}),e&&Rm(e,function(t){return r.processProvider(t)}),this.records.set(wy,Dm(void 0,this)),this.isRootInjector=this.records.has(Tm),this.injectorDefTypes.forEach(function(t){return r.get(t)})}return t.prototype.destroy=function(){this.assertNotDestroyed(),this.destroyed=!0;try{this.onDestroy.forEach(function(t){return t.ngOnDestroy()})}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}},t.prototype.get=function(t,e,n){void 0===e&&(e=xy),void 0===n&&(n=_d.Default),this.assertNotDestroyed();var r=Td(this);try{if(!(n&_d.SkipSelf)){var i=this.records.get(t);if(void 0===i){var o=function s(t){return"function"==typeof t||"object"==typeof t&&t instanceof td}
|
|
1064
1064
|
/**
|
|
1065
1065
|
* @license
|
|
1066
1066
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1074,7 +1074,7 @@ function i(t,e,n,r){e&&(r.initHooks||(r.initHooks=[])).push(t,e),n&&((r.initHook
|
|
|
1074
1074
|
*
|
|
1075
1075
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1076
1076
|
* found in the LICENSE file at https://angular.io/license
|
|
1077
|
-
*/(t)&&Gf(t);o&&this.injectableDefInScope(o)&&(i=Mm(
|
|
1077
|
+
*/(t)&&Gf(t);o&&this.injectableDefInScope(o)&&(i=Dm(Mm(t),Pm),this.records.set(t,i))}if(void 0!==i)return this.hydrate(t,i)}return(n&_d.Self?Om():this.parent).get(t,e)}finally{Td(r)}},t.prototype.assertNotDestroyed=function(){if(this.destroyed)throw new Error("Injector has already been destroyed.")},t.prototype.processInjectorType=function(t,e,n){var r=this;if(t=gy(t)){var i=Xf(t),o=null==i&&t.ngModule||void 0,s=void 0===o?t:o;if(-1===n.indexOf(s)){var a=void 0!==o&&t.providers||Nm;if(void 0!==o&&(i=Xf(o)),null!=i){if(this.injectorDefTypes.add(s),this.records.set(s,Dm(i.factory)),null!=i.imports){n.push(s);try{Rm(i.imports,function(t){return r.processInjectorType(t,e,n)})}finally{}}null!=i.providers&&Rm(i.providers,function(t){return r.processProvider(t)}),Rm(a,function(t){return r.processProvider(t)})}}}},t.prototype.processProvider=function(t){var e=jm(t=gy(t))?t:gy(t.provide),n=function r(t){var e=function n(t){var e=void 0;if(jm(t))return Mm(gy(t));if(Lm(t))e=function(){return gy(t.useValue)};else if(function n(t){return!!t.useExisting}(t))e=function(){return Ad(gy(t.useExisting))};else if(function r(t){return!!t.useFactory}(t))e=function(){return t.useFactory.apply(t,f(kd(t.deps||[])))};else{var i=gy(t.useClass||t.provide);if(!function o(t){return!!t.deps}(t))return Mm(i);e=function(){return new(i.bind.apply(i,f([void 0],kd(t.deps))))}}return e}(t);return Lm(t)?Dm(void 0,t.useValue):Dm(e,Pm)}(t);if(jm(t)||!0!==t.multi){var i=this.records.get(e);if(i&&void 0!==i.multi)throw new Error("Mixed multi-provider for "+yd(e))}else{var o=this.records.get(e);if(o){if(void 0===o.multi)throw new Error("Mixed multi-provider for "+e+".")}else(o=Dm(void 0,Pm,!0)).factory=function(){return kd(o.multi)},this.records.set(e,o);e=t,o.multi.push(t)}this.records.set(e,n)},t.prototype.hydrate=function(t,e){if(e.value===Am)throw new Error("Circular dep for "+yd(t));return e.value===Pm&&(e.value=Am,e.value=e.factory()),"object"==typeof e.value&&e.value&&function n(t){return"object"==typeof t&&null!=t&&t.ngOnDestroy&&"function"==typeof t.ngOnDestroy}(e.value)&&this.onDestroy.add(e.value),e.value},t.prototype.injectableDefInScope=function(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||"root"===t.providedIn&&this.isRootInjector:this.injectorDefTypes.has(t.providedIn))},t}();function Mm(t){var e=Gf(t);if(null===e){if(t instanceof td)throw new Error("Token "+yd(t)+" is missing an ngInjectableDef definition.");return function(){return new t}}return e.factory}function Dm(t,e,n){return void 0===e&&(e=Pm),void 0===n&&(n=!1),{factory:t,value:e,multi:n?[]:void 0}}function Rm(t,e){t.forEach(function(t){return Array.isArray(t)?Rm(t,e):e(t)})}function Lm(t){return ky in t}function jm(t){return"function"==typeof t}var Fm,Vm=function Vm(){},Bm=function Bm(){},Hm=function(){function t(){}return t.prototype.resolveComponentFactory=function(t){
|
|
1078
1078
|
/**
|
|
1079
1079
|
* @license
|
|
1080
1080
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1082,7 +1082,7 @@ function i(t,e,n,r){e&&(r.initHooks||(r.initHooks=[])).push(t,e),n&&((r.initHook
|
|
|
1082
1082
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1083
1083
|
* found in the LICENSE file at https://angular.io/license
|
|
1084
1084
|
*/
|
|
1085
|
-
throw function e(t){var e=Error("No component factory found for "+yd(t)+". Did you add it to @NgModule.entryComponents?");return e.ngComponent=t,e}(t)},t}(),
|
|
1085
|
+
throw function e(t){var e=Error("No component factory found for "+yd(t)+". Did you add it to @NgModule.entryComponents?");return e.ngComponent=t,e}(t)},t}(),qm=function(){function t(){}return t.NULL=new Hm,t}(),Um=function(t){function e(e,n){var r=t.call(this)||this;return r.factory=e,r.ngModule=n,r.selector=e.selector,r.componentType=e.componentType,r.ngContentSelectors=e.ngContentSelectors,r.inputs=e.inputs,r.outputs=e.outputs,r}return o(e,t),e.prototype.create=function(t,e,n,r){return this.factory.create(t,e,n,r||this.ngModule)},e}(Bm),Km=function(){function t(t){this.nativeElement=t}return t.__NG_ELEMENT_ID__=function(){return Wm(t)},t}(),Wm=vy,zm=function zm(){},Qm=(new td("Renderer2Interceptor"),function Qm(){});!function(t){t[t.Important=1]="Important",t[t.DashCase=2]="DashCase"}(Fm||(Fm={}));var Gm=function(){function t(){}return t.__NG_ELEMENT_ID__=function(){return Xm()},t}(),Xm=vy,$m=function je(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")},Ym=new $m("7.1.4"),Zm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.resolveComponentFactory=function(t){var e=function n(t){return t[Hf]||null}(t);return new ig(e)},e}(qm);function Jm(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}var tg=new td("ROOT_CONTEXT_TOKEN",{providedIn:"root",factory:function(){return Sm(Ad(eg))}}),eg=new td("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return Nv}}),ng=new td("WRAP_RENDERER_FACTORY2"),rg={},ig=function(t){function e(e){var n=t.call(this)||this;return n.componentDef=e,n.componentType=e.type,n.selector=e.selectors[0][0],n.ngContentSelectors=[],n}return o(e,t),Object.defineProperty(e.prototype,"inputs",{get:function(){return Jm(this.componentDef.inputs)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outputs",{get:function(){return Jm(this.componentDef.outputs)},enumerable:!0,configurable:!0}),e.prototype.create=function(t,e,n,r){var i,o=void 0===n;i=r?r.injector.get(ng,function(t){return t})(r.injector.get(Qm)):Uy;var s=o?function a(t,e){var n=e||kv();return qy(n)?n.createElement(t,om):null===om?n.createElement(t):n.createElementNS(om,t)}(this.selector,i.createRenderer(null,this.componentDef)):um(i,n),u=this.componentDef.onPush?68:66,c=r&&!o?r.injector.get(tg):Sm(),l=i.createRenderer(s,this.componentDef),p=r?function h(t,e){return{get:function(n,r){var i=t.get(n,rg);return i!==rg?i:e.get(n,r)}}}(t,r.injector):t;n&&s&&(qy(l)?l.setAttribute(s,"ng-version",Ym.full):s.setAttribute("ng-version",Ym.full));var f,d,v=Jy(null,l,am(-1,null,1,0,null,null,null),c,u,void 0,p),y=Wv(v,null);try{i.begin&&i.begin();var m=
|
|
1086
1086
|
/**
|
|
1087
1087
|
* @license
|
|
1088
1088
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1111,7 +1111,7 @@ throw function e(t){var e=Error("No component factory found for "+yd(t)+". Did y
|
|
|
1111
1111
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1112
1112
|
* found in the LICENSE file at https://angular.io/license
|
|
1113
1113
|
*/
|
|
1114
|
-
function g(t,e,n,r,i){!function o(){
|
|
1114
|
+
function g(t,e,n,r,i){!function o(){Sv=!1,Ev=null}();var s=n[Fd],a=Jy(n,r,function u(t,e,n,r,i,o){return t.ngPrivateData||(t.ngPrivateData=am(-1,t,e,n,r,i,o))}(e.template,e.consts,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery),null,e.onPush?4:2,i),c=tm(0,3,t,null,null);return s.firstTemplatePass&&(function l(t,e,n){!function r(t,e,n){var r=n[zf];null==r&&(r=n[zf]=$v++);var i=r&Xv,o=1<<i,s=64&i,a=32&i,u=e.data;128&i?s?a?u[t+7]|=o:u[t+6]|=o:a?u[t+5]|=o:u[t+4]|=o:s?a?u[t+3]|=o:u[t+2]|=o:a?u[t+1]|=o:u[t]|=o}(t,e[Fd],n)}(Yv(c,n),n,e.type),c.flags=4096,function p(t,e,n){t.flags=e<<16|4096&t.flags|n,t.providerIndexes=e}(c,n.length,1),function h(t){var e=jv();(e.components||(e.components=[])).push(t.index)}(c)),a[Ud]=n[jd],a[Kd]=c,n[jd]=a}(s,this.componentDef,v,l);if(d=function _(t,e){return e[Fd].data[t+jd]}(0,v),e)for(var b=0,x=v[Fd],w=d.projection=[],E=0;E<e.length;E++){for(var S=e[E],C=null,T=null,P=0;P<S.length;P++){x.firstTemplatePass&&(x.expandoStartIndex++,x.blueprint.splice(++b+jd,0,null),x.data.splice(b+jd,0,null),v.splice(b+jd,0,null));var A=tm(b,3,S[P],null,null);T?T.next=A:C=A,T=A}w.push(C)}f=function N(t,e,n,r,i){var o=n[Fd],s=function a(t,e,n){var r=Iv();t.firstTemplatePass&&(n.providersResolver&&n.providersResolver(n),function i(t,e,n){var r=-(e.index-jd),i=t.data.length-(65535&e.providerIndexes);(t.expandoInstructions||(t.expandoInstructions=[])).push(r,i,n)}(t,r,1),function o(t,e,n,r){t.data.push(n);var i=new Od(r,function o(t){return null!==t.template}(n),null);t.blueprint.push(i),e.push(i),function s(t,e){t.expandoInstructions.push(e.hostBindings||vy),e.hostVars&&t.expandoInstructions.push(e.hostVars)}(t,n)}(t,e,n,n.factory));var s=iy(t.data,e,e.length-1,r);return function a(t,e,n,r){var i=dv(e,t);cy(n,t),i&&cy(i,t),null!=r.attributes&&3==e.type&&function o(t,e){for(var n=kv(),r=qy(n),i=0;i<e.length;){var o=e[i];if(1===o)break;if(o===Hy)i+=2;else if(0===o){var s=e[i+1],a=e[i+2],u=e[i+3];r?n.setAttribute(t,a,u,s):t.setAttributeNS(s,a,u),i+=4}else u=e[i+1],r?n.setAttribute(t,o,u):t.setAttribute(o,u),i+=2}}(i,r.attributes)}(e,r,s,n),s}(o,n,e);return r.components.push(s),t[Qd]=s,i&&i.forEach(function(t){return t(s,e)}),o.firstTemplatePass&&function u(t,e,n){for(var r=0;r<n;r++)e.push($y),t.blueprint.push($y),t.data.push(null)}(o,n,e.hostVars),s}(m,this.componentDef,v,c,[Cm]),Zy(v,1)}finally{zv(y,!0),i.end&&i.end()}var k=new og(this.componentType,f,xm(Km,d,v),v,d);return o&&(k.hostView._tViewNode.child=d),k},e}(Bm),og=(new Zm,function(t){function e(e,n,r,i,o){var s=t.call(this)||this;return s.location=r,s._rootView=i,s._tNode=o,s.destroyCbs=[],s.instance=n,s.hostView=s.changeDetectorRef=new bm(i),s.hostView._tViewNode=em(-1,i),s.componentType=e,s}return o(e,t),Object.defineProperty(e.prototype,"injector",{get:function(){return new ay(this._tNode,this._rootView)},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.destroyCbs.forEach(function(t){return t()}),this.destroyCbs=null},e.prototype.onDestroy=function(t){this.destroyCbs.push(t)},e}(Vm)),sg=!0;function ag(){return sg}
|
|
1115
1115
|
/**
|
|
1116
1116
|
* @license
|
|
1117
1117
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1132,7 +1132,7 @@ function g(t,e,n,r,i){!function o(){Ev=!1,wv=null}();var s=n[jd],a=Zy(n,r,functi
|
|
|
1132
1132
|
*
|
|
1133
1133
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1134
1134
|
* found in the LICENSE file at https://angular.io/license
|
|
1135
|
-
*/function
|
|
1135
|
+
*/function ug(t){var e,n,r={};try{for(var i=p(t.split(",")),o=i.next();!o.done;o=i.next())r[o.value]=!0}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function cg(){for(var t,e,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(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return i}var lg,pg=ug("area,br,col,hr,img,wbr"),hg=ug("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),fg=ug("rp,rt"),dg=cg(fg,hg);cg(pg,cg(hg,ug("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")),cg(fg,ug("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")),dg),cg(ug("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),ug("srcset"),ug("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")),function(t){t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other"}(lg||(lg={}));
|
|
1136
1136
|
/**
|
|
1137
1137
|
* @license
|
|
1138
1138
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1140,14 +1140,14 @@ function g(t,e,n,r,i){!function o(){Ev=!1,wv=null}();var s=n[jd],a=Zy(n,r,functi
|
|
|
1140
1140
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1141
1141
|
* found in the LICENSE file at https://angular.io/license
|
|
1142
1142
|
*/
|
|
1143
|
-
var
|
|
1143
|
+
var vg={provide:qm,useFactory:function(){return new Zm},deps:[]},yg=function(t){function e(e,n){var r=t.call(this)||this;r._bootstrapComponents=[],r.destroyCbs=[];var i=function o(t){return t[Kf]||null}
|
|
1144
1144
|
/**
|
|
1145
1145
|
* @license
|
|
1146
1146
|
* Copyright Google Inc. All Rights Reserved.
|
|
1147
1147
|
*
|
|
1148
1148
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1149
1149
|
* found in the LICENSE file at https://angular.io/license
|
|
1150
|
-
*/(e);return r._bootstrapComponents=i.bootstrap,r.injector=function s(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),e=e||
|
|
1150
|
+
*/(e);return r._bootstrapComponents=i.bootstrap,r.injector=function s(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),e=e||Om(),new Im(t,n,e)}(e,n,[vg,{provide:Vy,useValue:r}]),r.instance=r.injector.get(e),r.componentFactoryResolver=new Zm,r}return o(e,t),e.prototype.destroy=function(){this.destroyCbs.forEach(function(t){return t()}),this.destroyCbs=null},e.prototype.onDestroy=function(t){this.destroyCbs.push(t)},e}(Vy);
|
|
1151
1151
|
/**
|
|
1152
1152
|
* @license
|
|
1153
1153
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1169,7 +1169,7 @@ var dg={provide:Hm,useFactory:function(){return new Ym},deps:[]},vg=function(t){
|
|
|
1169
1169
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1170
1170
|
* found in the LICENSE file at https://angular.io/license
|
|
1171
1171
|
*/
|
|
1172
|
-
function yg(t){return"function"==typeof t}!function(t){function e(e){var n=t.call(this)||this;return n.moduleType=e,n}o(e,t),e.prototype.create=function(t){return new vg(this.moduleType,t)}}(Vy);var mg=!1,gg={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){var e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else mg&&console.log("RxJS: Back to a better error behavior. Thank you. <3");mg=t},get useDeprecatedSynchronousErrorHandling(){return mg}};function _g(t){setTimeout(function(){throw t})}var bg={closed:!0,next:function(t){},error:function(t){if(gg.useDeprecatedSynchronousErrorHandling)throw t;_g(t)},complete:function(){}},xg=Array.isArray||function(t){return t&&"number"==typeof t.length};function wg(t){return null!=t&&"object"==typeof t}var Eg,Sg={e:{}};function Cg(){try{return Eg.apply(this,arguments)}catch(t){return Sg.e=t,Sg}}function Tg(t){return Eg=t,Cg}function Pg(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}Pg.prototype=Object.create(Error.prototype);var Ag=Pg,Ng=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,r=this._parents,i=this._unsubscribe,o=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var s=-1,a=r?r.length:0;n;)n.remove(this),n=++s<a&&r[s]||null;if(yg(i)&&Tg(i).call(this)===Sg&&(e=!0,t=t||(Sg.e instanceof Ag?kg(Sg.e.errors):[Sg.e])),xg(o))for(s=-1,a=o.length;++s<a;){var u=o[s];if(wg(u)&&Tg(u.unsubscribe).call(u)===Sg){e=!0,t=t||[];var c=Sg.e;c instanceof Ag?t=t.concat(kg(c.errors)):t.push(c)}}if(e)throw new Ag(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if("function"!=typeof n._addParent){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(n),n._addParent(this),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.prototype._addParent=function(t){var e=this._parent,n=this._parents;e&&e!==t?n?-1===n.indexOf(t)&&n.push(t):this._parents=[t]:this._parent=t},t.EMPTY=((e=new t).closed=!0,e),t}();function kg(t){return t.reduce(function(t,e){return t.concat(e instanceof Ag?e.errors:e)},[])}var Og="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),Ig=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mg=function(t){function e(n,r,i){var o=t.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,o._parentSubscription=null,arguments.length){case 0:o.destination=bg;break;case 1:if(!n){o.destination=bg;break}if("object"==typeof n){n instanceof e?(o.syncErrorThrowable=n.syncErrorThrowable,o.destination=n,n.add(o)):(o.syncErrorThrowable=!0,o.destination=new Rg(o,n));break}default:o.syncErrorThrowable=!0,o.destination=new Rg(o,n,r,i)}return o}return Ig(e,t),e.prototype[Og]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this._parentSubscription=null,this},e}(Ng),Rg=function(t){function e(e,n,r,i){var o,s=t.call(this)||this;s._parentSubscriber=e;var a=s;return yg(n)?o=n:n&&(o=n.next,r=n.error,i=n.complete,n!==bg&&(yg((a=Object.create(n)).unsubscribe)&&s.add(a.unsubscribe.bind(a)),a.unsubscribe=s.unsubscribe.bind(s))),s._context=a,s._next=o,s._error=r,s._complete=i,s}return Ig(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;gg.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=gg.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):_g(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;_g(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};gg.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),gg.useDeprecatedSynchronousErrorHandling)throw t;_g(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!gg.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return gg.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(_g(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(Mg),Dg="function"==typeof Symbol&&Symbol.observable||"@@observable";function Lg(){}var jg=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,i=function o(t,e,n){if(t){if(t instanceof Mg)return t;if(t[Og])return t[Og]()}return t||e||n?new Mg(t,e,n):new Mg(bg)}(t,e,n);if(r?r.call(i,this.source):i.add(this.source||gg.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),gg.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){gg.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function e(t){for(;t;){var e=t.destination;if(t.closed||t.isStopped)return!1;t=e&&e instanceof Mg?e:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=Fg(e))(function(e,r){var i;i=n.subscribe(function(e){try{t(e)}catch(t){r(t),i&&i.unsubscribe()}},r,e)})},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[Dg]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:function n(t){return t?1===t.length?t[0]:function e(n){return t.reduce(function(t,e){return e(t)},n)}:Lg}(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Fg(t))(function(t,n){var r;e.subscribe(function(t){return r=t},function(t){return n(t)},function(){return t(r)})})},t.create=function(e){return new t(e)},t}();function Fg(t){if(t||(t=Promise),!t)throw new Error("no Promise impl found");return t}function Vg(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}Vg.prototype=Object.create(Error.prototype);var Bg=Vg,Hg=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qg=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return Hg(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(Ng),Ug=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kg=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return Ug(e,t),e}(Mg),Wg=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return Ug(e,t),e.prototype[Og]=function(){return new Kg(this)},e.prototype.lift=function(t){var e=new zg(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new Bg;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new Bg;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new Bg;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new Bg;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new Bg;return this.hasError?(t.error(this.thrownError),Ng.EMPTY):this.isStopped?(t.complete(),Ng.EMPTY):(this.observers.push(t),new qg(this,t))},e.prototype.asObservable=function(){var t=new jg;return t.source=this,t},e.create=function(t,e){return new zg(t,e)},e}(jg),zg=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return Ug(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):Ng.EMPTY},e}(Wg),Qg=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Gg(){return function t(e){return e.lift(new Xg(e))}}var Xg=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new $g(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),$g=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return Qg(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(Mg),Yg=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zg=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return Yg(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new Ng).add(this.source.subscribe(new t_(this.getSubject(),this))),t.closed?(this._connection=null,t=Ng.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return Gg()(this)},e}(jg).prototype,Jg={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:Zg._subscribe},_isComplete:{value:Zg._isComplete,writable:!0},getSubject:{value:Zg.getSubject},connect:{value:Zg.connect},refCount:{value:Zg.refCount}},t_=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return Yg(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(Kg),e_=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}Yg(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),n_=(function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=i,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}e_(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new Wg,n.set(e,i);var o=new r_(e,i,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new r_(e,i))}catch(t){return void this.error(t)}this.add(s.subscribe(new n_(e,i,this)))}}i.closed||i.next(r)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach(function(e,n){e.error(t)}),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach(function(t,e){t.complete()}),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))}}(Mg),function(t){function e(e,n,r){var i=t.call(this,n)||this;return i.key=e,i.group=n,i.parent=r,i}return e_(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(Mg)),r_=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.groupSubject=n,i.refCountSubscription=r,i}return e_(e,t),e.prototype._subscribe=function(t){var e=new Ng,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new i_(n)),e.add(r.subscribe(t)),e},e}(jg),i_=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return e_(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(Ng),o_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s_=(function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}o_(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Bg;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(Wg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),a_=function(t){function e(e,n){return t.call(this)||this}return s_(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(Ng),u_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),c_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return u_(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(a_),l_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return l_(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(c_),h_=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),f_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d_=function(t){function e(n,r){void 0===r&&(r=h_.now);var i=t.call(this,n,function(){return e.delegate&&e.delegate!==i?e.delegate.now():r()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return f_(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(h_),v_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y_=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return v_(e,t),e}(d_))(p_),m_=new jg(function(t){return t.complete()});function g_(t){return t?function e(t){return new jg(function(e){return t.schedule(function(){return e.complete()})})}(t):m_}function __(t){return t&&"function"==typeof t.schedule}var b_=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.closed||e.complete()}};function x_(t,e){return new jg(e?function(n){var r=new Ng,i=0;return r.add(e.schedule(function(){i!==t.length?(n.next(t[i++]),n.closed||r.add(this.schedule())):n.complete()})),r}:b_(t))}function w_(t){t.subscriber.error(t.error)}var E_=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];switch(__(n)?t.pop():n=void 0,t.length){case 0:return g_(n);case 1:return n?x_(t,n):function r(t){var e=new jg(function(e){e.next(t),e.complete()});return e._isScalar=!0,e.value=t,e}(t[0]);default:return x_(t,n)}}(this.value);case"E":return function e(t,n){return new jg(n?function(e){return n.schedule(w_,0,{error:t,subscriber:e})}:function(e){return e.error(t)})}(this.error);case"C":return g_()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}(),S_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),C_=function(t){function e(e,n,r){void 0===r&&(r=0);var i=t.call(this,e)||this;return i.scheduler=n,i.delay=r,i}return S_(e,t),e.dispatch=function(t){t.notification.observe(t.destination),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new T_(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(E_.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(E_.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(E_.createComplete()),this.unsubscribe()},e}(Mg),T_=function T_(t,e){this.notification=t,this.destination=e},P_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),A_=(function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}P_(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new A_(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new Bg;if(this.isStopped||this.hasError?e=Ng.EMPTY:(this.observers.push(t),e=new qg(this,t)),i&&t.add(t=new C_(t,i)),n)for(var s=0;s<o&&!t.closed;s++)t.next(r[s]);else for(s=0;s<o&&!t.closed;s++)t.next(r[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||y_).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(t-r[o].time<n);)o++;return i>e&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r}}(Wg),function A_(t,e){this.time=t,this.value=e}),N_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),k_=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}N_(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),Ng.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),Ng.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)}}(Wg),1),O_={},I_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),M_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return I_(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=(i=e.flush.bind(e,null),o=k_++,O_[o]=i,Promise.resolve().then(function(){return function t(e){var n=O_[e];n&&n()}(o)}),o)));var i,o},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(delete O_[n],e.scheduled=void 0)},e}(c_),R_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D_=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return R_(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(d_))(M_),L_=(new d_(c_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),j_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return L_(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(function(){return e.flush(null)})))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(c_),F_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),V_=(new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return F_(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(d_))(j_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),B_=(function(t){function e(e,n){void 0===e&&(e=B_),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this,e,function(){return r.frame})||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}V_(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n.shift())&&(this.frame=e.delay)<=r&&!(t=e.execute(e.state,e.delay)););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(d_),function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return V_(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){void 0===n&&(n=0)},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(c_));function H_(t){return t}function q_(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}q_.prototype=Object.create(Error.prototype);var U_=q_,K_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),W_=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new z_(t,this.project,this.thisArg))},t}(),z_=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return K_(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(Mg),Q_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),G_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q_(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(Mg),X_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$_=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parent=e,i.outerValue=n,i.outerIndex=r,i.index=0,i}return X_(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(Mg),Y_=function(t){return function(e){return t.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,_g),e}},Z_=function J_(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}(),tb=function(t){return function(e){for(var n=t[Z_]();;){var r=n.next();if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add(function(){n.return&&n.return()}),e}},eb=function(t){return function(e){var n=t[Dg]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}},nb=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function rb(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}var ib=function(t){if(t instanceof jg)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(t&&"function"==typeof t[Dg])return eb(t);if(nb(t))return b_(t);if(rb(t))return Y_(t);if(t&&"function"==typeof t[Z_])return tb(t);var e=wg(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function ob(t,e,n,r,i){if(void 0===i&&(i=new $_(t,n,r)),!i.closed)return ib(e)(i)}var sb=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ab={};!function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}sb(e,t),e.prototype._next=function(t){this.values.push(ab),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(ob(this,r,r,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.values,s=this.toRespond?o[n]===ab?--this.toRespond:this.toRespond:0;o[n]=e,0===s&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)}}(G_);var ub=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();var cb=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new lb(t,this.project,this.concurrent))},t}(),lb=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return ub(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=new $_(this,void 0,void 0);this.destination.add(r),ob(this,t,e,n,r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(G_),pb=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n){var r=t.call(this,e)||this;r.sources=n,r.completed=0,r.haveValues=0;var i=n.length;r.values=new Array(i);for(var o=0;o<i;o++){var s=ob(r,n[o],null,o);s&&r.add(s)}return r}pb(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values[n]=e,i._hasValue||(i._hasValue=!0,this.haveValues++)},e.prototype.notifyComplete=function(t){var e=this.destination,n=this.haveValues,r=this.values,i=r.length;t._hasValue?(this.completed++,this.completed===i&&(n===i&&e.next(r),e.complete())):e.complete()}}(G_),new jg(Lg);var hb,fb=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),db=(function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}fb(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],i=ob(this,r,r,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},e.prototype.notifyNext=function(t,e,n,r,i){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==n){var s=this.subscriptions[o];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(e)}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),vb=(function(t){function e(e,n,r){void 0===r&&(r=Object.create(null));var i=t.call(this,e)||this;return i.iterators=[],i.active=0,i.resultSelector="function"==typeof n?n:null,i.values=r,i}db(e,t),e.prototype._next=function(t){var e=this.iterators;xg(t)?e.push(new yb(t)):e.push("function"==typeof t[Z_]?new vb(t[Z_]()):new mb(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];r.stillUnsubscribed?this.destination.add(r.subscribe(r,n)):this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++)if("function"==typeof(s=t[r]).hasValue&&!s.hasValue())return;var i=!1,o=[];for(r=0;r<e;r++){var s,a=(s=t[r]).next();if(s.hasCompleted()&&(i=!0),a.done)return void n.complete();o.push(a.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)}}(Mg),function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return t&&t.done},t}()),yb=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[Z_]=function(){return this},t.prototype.next=function(t){var e=this.index++;return e<this.length?{value:this.array[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),mb=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return db(e,t),e.prototype[Z_]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return ob(this,this.observable,this,e)},e}(G_),gb=function(t){function e(e){void 0===e&&(e=!1);var n=t.call(this)||this;return n.__isAsync=e,n}return o(e,t),e.prototype.emit=function(e){t.prototype.next.call(this,e)},e.prototype.subscribe=function(e,n,r){var i,o=function(t){return null},s=function(){return null};e&&"object"==typeof e?(i=this.__isAsync?function(t){setTimeout(function(){return e.next(t)})}:function(t){e.next(t)},e.error&&(o=this.__isAsync?function(t){setTimeout(function(){return e.error(t)})}:function(t){e.error(t)}),e.complete&&(s=this.__isAsync?function(){setTimeout(function(){return e.complete()})}:function(){e.complete()})):(i=this.__isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)},n&&(o=this.__isAsync?function(t){setTimeout(function(){return n(t)})}:function(t){n(t)}),r&&(s=this.__isAsync?function(){setTimeout(function(){return r()})}:function(){r()}));var a=t.prototype.subscribe.call(this,i,o,s);return e instanceof Ng&&e.add(a),a},e}(Wg),_b=function(){function t(){}return t.__NG_ELEMENT_ID__=function(){return bb(t,Um)},t}(),bb=dy;function xb(t){for(var e=null;t;){var n=[];t.values.push(n),e={next:e,list:t.list,predicate:t.predicate,values:n,containerValues:null},t=t.next}return e}function wb(t){for(var e=null;t;)e={next:e,list:t.list,predicate:t.predicate,values:[],containerValues:t.values},t=t.next;return e}function Eb(t,e){for(;e;)e.containerValues.splice(t,0,e.values),e=e.next}function Sb(t){for(;t;){var e=t.containerValues,n=e.indexOf(t.values);e.splice(n,1)[0].length&&t.list.setDirty(),t=t.next}}function Cb(t,e){var n=t.localNames;if(n)for(var r=0;r<n.length;r+=2)if(n[r]===e)return n[r+1];return null}function Tb(t,e,n){var r=e[jd].data;if(r)for(var i=t.flags,o=i>>16,s=o+(4095&i),a=o;a<s;a++)if(r[a].type===n)return a;return null}function Pb(t,e,n){var r=t[zf];if("function"==typeof r)return r();var i=Tb(e,n,t);return null!==i?n[i]:null}function Ab(t,e,n,r){var i=t[zf]();return r?i?Pb(r,e,n):null:i}function Nb(t,e,n,r){return n?Pb(n,t,e):r>-1?e[r]:function i(t,e){return 3===t.type||4===t.type?bm(Um,t,e):0===t.type?function n(t,e,r,i){if(ym||(ym=function(t){function e(e,n,r,i,o,s){var a=t.call(this)||this;return a._declarationParentView=e,a.elementRef=n,a._tView=r,a._renderer=i,a._queries=o,a._injectorIndex=s,a}return o(e,t),e.prototype.createEmbeddedView=function(t,e,n,r,i){var o=function s(t,e,n,r,i,o){var s=Rv(),a=Ov();Dv(!0),Iv(null);var u=Zy(n,r,t,e,2,function c(){return Pv&&Pv[Xd]}());return u[Yd]=n,i&&(u[Hd]=i.createView()),tm(-1,u),t.firstTemplatePass&&(t.node.injectorIndex=o),Dv(s),Iv(a),u}(this._tView,t,this._declarationParentView,this._renderer,this._queries,this._injectorIndex);e&&function a(t,e,n,r,i){var o=e[cv];r>0&&(o[r-1][Bd]=t),r<o.length?(t[Bd]=o[r],o.splice(r,0,t)):(o.push(t),t[Bd]=null),i>-1&&(t[$d]=i,t[Vd]=n),t[Hd]&&t[Hd].insertView(r),t[Fd]|=8}(o,e,r,i,n.index),em(o,this._tView,t,1);var u=new gm(o,t,-1);return u._tViewNode=o[Ud],u},e}(t)),0===r.type){var s=i[r.index];return new ym(i,bm(e,r,i),r.tViews,Nv(),s[Hd],r.injectorIndex)}return null}(_b,Um,t,e):null}(t,e)}function kb(t,e){for(var n=Fv();t;){var r=t.predicate,i=r.type;if(i){var o=null;i===_b?o=Ab(i,e,n,r.read):null!==(u=Tb(e,n,i))&&(o=Nb(e,n,r.read,u)),null!==o&&Ob(t,o)}else for(var s=r.selector,a=0;a<s.length;a++){var u;null!==(u=Cb(e,s[a]))&&null!==(o=Nb(e,n,r.read,u))&&Ob(t,o)}t=t.next}}function Ob(t,e){t.values.push(e),t.list.setDirty()}function Ib(t,e,n,r){return{next:t,list:e,predicate:function i(t,e){var n=Array.isArray(t);return{type:n?null:t,selector:n?t:null,read:e}}(n,r),values:e._valuesTree,containerValues:null}}!function(){function t(t,e,n){this.parent=t,this.shallow=e,this.deep=n}t.prototype.track=function(t,e,n,r){n?this.deep=Ib(this.deep,t,e,null!=r?r:null):this.shallow=Ib(this.shallow,t,e,null!=r?r:null)},t.prototype.clone=function(){return new t(this,null,this.deep)},t.prototype.container=function(){var e=xb(this.shallow),n=xb(this.deep);return e||n?new t(this,e,n):null},t.prototype.createView=function(){var e=wb(this.shallow),n=wb(this.deep);return e||n?new t(this,e,n):null},t.prototype.insertView=function(t){Eb(t,this.shallow),Eb(t,this.deep)},t.prototype.addNode=function(t){return kb(this.deep,t),vv(t)?(kb(this.shallow,t),t.parent&&vv(t.parent)&&kb(this.parent.shallow,t),this.parent):(function e(t){return null===t.parent||vv(t.parent)}(t)&&kb(this.shallow,t),this)},t.prototype.removeView=function(){Sb(this.shallow),Sb(this.deep)}}(),function(){function t(){this.dirty=!0,this.changes=new gb,this._values=[],this._valuesTree=[]}Object.defineProperty(t.prototype,"length",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"first",{get:function(){var t=this._values;return t.length?t[0]:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){var t=this._values;return t.length?t[t.length-1]:null},enumerable:!0,configurable:!0}),t.prototype.map=function(t){return this._values.map(t)},t.prototype.filter=function(t){return this._values.filter(t)},t.prototype.find=function(t){return this._values.find(t)},t.prototype.reduce=function(t,e){return this._values.reduce(t,e)},t.prototype.forEach=function(t){this._values.forEach(t)},t.prototype.some=function(t){return this._values.some(t)},t.prototype.toArray=function(){return this._values.slice(0)},t.prototype[fd()]=function(){return this._values[fd()]()},t.prototype.toString=function(){return this._values.toString()},t.prototype.reset=function(t){this._values=function e(t){for(var e=[],n=0;n<t.length;){var r=t[n];Array.isArray(r)?r.length>0?(t=r.concat(t.slice(n+1)),n=0):n++:(e.push(r),n++)}return e}(t),this.dirty=!1},t.prototype.notifyOnChanges=function(){this.changes.emit(this)},t.prototype.setDirty=function(){this.dirty=!0},t.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()}}(),function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"}(hb||(hb={}));var Mb=function Mb(){},Rb=Function;
|
|
1172
|
+
function mg(t){return"function"==typeof t}!function(t){function e(e){var n=t.call(this)||this;return n.moduleType=e,n}o(e,t),e.prototype.create=function(t){return new yg(this.moduleType,t)}}(By);var gg=!1,_g={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){var e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else gg&&console.log("RxJS: Back to a better error behavior. Thank you. <3");gg=t},get useDeprecatedSynchronousErrorHandling(){return gg}};function bg(t){setTimeout(function(){throw t})}var xg={closed:!0,next:function(t){},error:function(t){if(_g.useDeprecatedSynchronousErrorHandling)throw t;bg(t)},complete:function(){}},wg=Array.isArray||function(t){return t&&"number"==typeof t.length};function Eg(t){return null!=t&&"object"==typeof t}var Sg,Cg={e:{}};function Tg(){try{return Sg.apply(this,arguments)}catch(t){return Cg.e=t,Cg}}function Pg(t){return Sg=t,Tg}function Ag(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}Ag.prototype=Object.create(Error.prototype);var Ng=Ag,kg=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,r=this._parents,i=this._unsubscribe,o=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var s=-1,a=r?r.length:0;n;)n.remove(this),n=++s<a&&r[s]||null;if(mg(i)&&Pg(i).call(this)===Cg&&(e=!0,t=t||(Cg.e instanceof Ng?Og(Cg.e.errors):[Cg.e])),wg(o))for(s=-1,a=o.length;++s<a;){var u=o[s];if(Eg(u)&&Pg(u.unsubscribe).call(u)===Cg){e=!0,t=t||[];var c=Cg.e;c instanceof Ng?t=t.concat(Og(c.errors)):t.push(c)}}if(e)throw new Ng(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if("function"!=typeof n._addParent){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(n),n._addParent(this),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.prototype._addParent=function(t){var e=this._parent,n=this._parents;e&&e!==t?n?-1===n.indexOf(t)&&n.push(t):this._parents=[t]:this._parent=t},t.EMPTY=((e=new t).closed=!0,e),t}();function Og(t){return t.reduce(function(t,e){return t.concat(e instanceof Ng?e.errors:e)},[])}var Ig="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),Mg=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dg=function(t){function e(n,r,i){var o=t.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,o._parentSubscription=null,arguments.length){case 0:o.destination=xg;break;case 1:if(!n){o.destination=xg;break}if("object"==typeof n){n instanceof e?(o.syncErrorThrowable=n.syncErrorThrowable,o.destination=n,n.add(o)):(o.syncErrorThrowable=!0,o.destination=new Rg(o,n));break}default:o.syncErrorThrowable=!0,o.destination=new Rg(o,n,r,i)}return o}return Mg(e,t),e.prototype[Ig]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this._parentSubscription=null,this},e}(kg),Rg=function(t){function e(e,n,r,i){var o,s=t.call(this)||this;s._parentSubscriber=e;var a=s;return mg(n)?o=n:n&&(o=n.next,r=n.error,i=n.complete,n!==xg&&(mg((a=Object.create(n)).unsubscribe)&&s.add(a.unsubscribe.bind(a)),a.unsubscribe=s.unsubscribe.bind(s))),s._context=a,s._next=o,s._error=r,s._complete=i,s}return Mg(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;_g.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=_g.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):bg(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;bg(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};_g.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),_g.useDeprecatedSynchronousErrorHandling)throw t;bg(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!_g.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return _g.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(bg(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(Dg),Lg="function"==typeof Symbol&&Symbol.observable||"@@observable";function jg(){}var Fg=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,i=function o(t,e,n){if(t){if(t instanceof Dg)return t;if(t[Ig])return t[Ig]()}return t||e||n?new Dg(t,e,n):new Dg(xg)}(t,e,n);if(r?r.call(i,this.source):i.add(this.source||_g.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),_g.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){_g.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function e(t){for(;t;){var e=t.destination;if(t.closed||t.isStopped)return!1;t=e&&e instanceof Dg?e:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=Vg(e))(function(e,r){var i;i=n.subscribe(function(e){try{t(e)}catch(t){r(t),i&&i.unsubscribe()}},r,e)})},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[Lg]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:function n(t){return t?1===t.length?t[0]:function e(n){return t.reduce(function(t,e){return e(t)},n)}:jg}(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Vg(t))(function(t,n){var r;e.subscribe(function(t){return r=t},function(t){return n(t)},function(){return t(r)})})},t.create=function(e){return new t(e)},t}();function Vg(t){if(t||(t=Promise),!t)throw new Error("no Promise impl found");return t}function Bg(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}Bg.prototype=Object.create(Error.prototype);var Hg=Bg,qg=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ug=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return qg(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(kg),Kg=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wg=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return Kg(e,t),e}(Dg),zg=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return Kg(e,t),e.prototype[Ig]=function(){return new Wg(this)},e.prototype.lift=function(t){var e=new Qg(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new Hg;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new Hg;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new Hg;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new Hg;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new Hg;return this.hasError?(t.error(this.thrownError),kg.EMPTY):this.isStopped?(t.complete(),kg.EMPTY):(this.observers.push(t),new Ug(this,t))},e.prototype.asObservable=function(){var t=new Fg;return t.source=this,t},e.create=function(t,e){return new Qg(t,e)},e}(Fg),Qg=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return Kg(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):kg.EMPTY},e}(zg),Gg=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Xg(){return function t(e){return e.lift(new $g(e))}}var $g=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new Yg(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),Yg=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return Gg(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(Dg),Zg=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jg=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return Zg(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new kg).add(this.source.subscribe(new e_(this.getSubject(),this))),t.closed?(this._connection=null,t=kg.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return Xg()(this)},e}(Fg).prototype,t_={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:Jg._subscribe},_isComplete:{value:Jg._isComplete,writable:!0},getSubject:{value:Jg.getSubject},connect:{value:Jg.connect},refCount:{value:Jg.refCount}},e_=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return Zg(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(Wg),n_=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}Zg(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),r_=(function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=i,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}n_(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new zg,n.set(e,i);var o=new i_(e,i,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new i_(e,i))}catch(t){return void this.error(t)}this.add(s.subscribe(new r_(e,i,this)))}}i.closed||i.next(r)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach(function(e,n){e.error(t)}),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach(function(t,e){t.complete()}),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))}}(Dg),function(t){function e(e,n,r){var i=t.call(this,n)||this;return i.key=e,i.group=n,i.parent=r,i}return n_(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(Dg)),i_=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.groupSubject=n,i.refCountSubscription=r,i}return n_(e,t),e.prototype._subscribe=function(t){var e=new kg,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new o_(n)),e.add(r.subscribe(t)),e},e}(Fg),o_=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return n_(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(kg),s_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a_=(function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}s_(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Hg;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(zg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),u_=function(t){function e(e,n){return t.call(this)||this}return a_(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(kg),c_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),l_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return c_(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(u_),p_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return p_(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(l_),f_=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),d_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v_=function(t){function e(n,r){void 0===r&&(r=f_.now);var i=t.call(this,n,function(){return e.delegate&&e.delegate!==i?e.delegate.now():r()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return d_(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(f_),y_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m_=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return y_(e,t),e}(v_))(h_),g_=new Fg(function(t){return t.complete()});function __(t){return t?function e(t){return new Fg(function(e){return t.schedule(function(){return e.complete()})})}(t):g_}function b_(t){return t&&"function"==typeof t.schedule}var x_=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.closed||e.complete()}};function w_(t,e){return new Fg(e?function(n){var r=new kg,i=0;return r.add(e.schedule(function(){i!==t.length?(n.next(t[i++]),n.closed||r.add(this.schedule())):n.complete()})),r}:x_(t))}function E_(t){t.subscriber.error(t.error)}var S_=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];switch(b_(n)?t.pop():n=void 0,t.length){case 0:return __(n);case 1:return n?w_(t,n):function r(t){var e=new Fg(function(e){e.next(t),e.complete()});return e._isScalar=!0,e.value=t,e}(t[0]);default:return w_(t,n)}}(this.value);case"E":return function e(t,n){return new Fg(n?function(e){return n.schedule(E_,0,{error:t,subscriber:e})}:function(e){return e.error(t)})}(this.error);case"C":return __()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}(),C_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T_=function(t){function e(e,n,r){void 0===r&&(r=0);var i=t.call(this,e)||this;return i.scheduler=n,i.delay=r,i}return C_(e,t),e.dispatch=function(t){t.notification.observe(t.destination),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new P_(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(S_.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(S_.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(S_.createComplete()),this.unsubscribe()},e}(Dg),P_=function P_(t,e){this.notification=t,this.destination=e},A_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),N_=(function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}A_(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new N_(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new Hg;if(this.isStopped||this.hasError?e=kg.EMPTY:(this.observers.push(t),e=new Ug(this,t)),i&&t.add(t=new T_(t,i)),n)for(var s=0;s<o&&!t.closed;s++)t.next(r[s]);else for(s=0;s<o&&!t.closed;s++)t.next(r[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||m_).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(t-r[o].time<n);)o++;return i>e&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r}}(zg),function N_(t,e){this.time=t,this.value=e}),k_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),O_=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}k_(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),kg.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),kg.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)}}(zg),1),I_={},M_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return M_(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=(i=e.flush.bind(e,null),o=O_++,I_[o]=i,Promise.resolve().then(function(){return function t(e){var n=I_[e];n&&n()}(o)}),o)));var i,o},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(delete I_[n],e.scheduled=void 0)},e}(l_),R_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L_=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return R_(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(v_))(D_),j_=(new v_(l_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),F_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return j_(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(function(){return e.flush(null)})))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(l_),V_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),B_=(new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return V_(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(v_))(F_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),H_=(function(t){function e(e,n){void 0===e&&(e=H_),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this,e,function(){return r.frame})||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}B_(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n.shift())&&(this.frame=e.delay)<=r&&!(t=e.execute(e.state,e.delay)););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(v_),function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return B_(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){void 0===n&&(n=0)},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(l_));function q_(t){return t}function U_(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}U_.prototype=Object.create(Error.prototype);var K_=U_,W_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),z_=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Q_(t,this.project,this.thisArg))},t}(),Q_=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return W_(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(Dg),G_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),X_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return G_(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(Dg),$_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Y_=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parent=e,i.outerValue=n,i.outerIndex=r,i.index=0,i}return $_(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(Dg),Z_=function(t){return function(e){return t.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,bg),e}},J_=function tb(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}(),eb=function(t){return function(e){for(var n=t[J_]();;){var r=n.next();if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add(function(){n.return&&n.return()}),e}},nb=function(t){return function(e){var n=t[Lg]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}},rb=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function ib(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}var ob=function(t){if(t instanceof Fg)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(t&&"function"==typeof t[Lg])return nb(t);if(rb(t))return x_(t);if(ib(t))return Z_(t);if(t&&"function"==typeof t[J_])return eb(t);var e=Eg(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function sb(t,e,n,r,i){if(void 0===i&&(i=new Y_(t,n,r)),!i.closed)return ob(e)(i)}var ab=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ub={};!function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}ab(e,t),e.prototype._next=function(t){this.values.push(ub),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(sb(this,r,r,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.values,s=this.toRespond?o[n]===ub?--this.toRespond:this.toRespond:0;o[n]=e,0===s&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)}}(X_);var cb=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();var lb=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new pb(t,this.project,this.concurrent))},t}(),pb=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return cb(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=new Y_(this,void 0,void 0);this.destination.add(r),sb(this,t,e,n,r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(X_),hb=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n){var r=t.call(this,e)||this;r.sources=n,r.completed=0,r.haveValues=0;var i=n.length;r.values=new Array(i);for(var o=0;o<i;o++){var s=sb(r,n[o],null,o);s&&r.add(s)}return r}hb(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values[n]=e,i._hasValue||(i._hasValue=!0,this.haveValues++)},e.prototype.notifyComplete=function(t){var e=this.destination,n=this.haveValues,r=this.values,i=r.length;t._hasValue?(this.completed++,this.completed===i&&(n===i&&e.next(r),e.complete())):e.complete()}}(X_),new Fg(jg);var fb,db=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vb=(function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}db(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],i=sb(this,r,r,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},e.prototype.notifyNext=function(t,e,n,r,i){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==n){var s=this.subscriptions[o];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(e)}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),yb=(function(t){function e(e,n,r){void 0===r&&(r=Object.create(null));var i=t.call(this,e)||this;return i.iterators=[],i.active=0,i.resultSelector="function"==typeof n?n:null,i.values=r,i}vb(e,t),e.prototype._next=function(t){var e=this.iterators;wg(t)?e.push(new mb(t)):e.push("function"==typeof t[J_]?new yb(t[J_]()):new gb(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];r.stillUnsubscribed?this.destination.add(r.subscribe(r,n)):this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++)if("function"==typeof(s=t[r]).hasValue&&!s.hasValue())return;var i=!1,o=[];for(r=0;r<e;r++){var s,a=(s=t[r]).next();if(s.hasCompleted()&&(i=!0),a.done)return void n.complete();o.push(a.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)}}(Dg),function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return t&&t.done},t}()),mb=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[J_]=function(){return this},t.prototype.next=function(t){var e=this.index++;return e<this.length?{value:this.array[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),gb=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return vb(e,t),e.prototype[J_]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return sb(this,this.observable,this,e)},e}(X_),_b=function(t){function e(e){void 0===e&&(e=!1);var n=t.call(this)||this;return n.__isAsync=e,n}return o(e,t),e.prototype.emit=function(e){t.prototype.next.call(this,e)},e.prototype.subscribe=function(e,n,r){var i,o=function(t){return null},s=function(){return null};e&&"object"==typeof e?(i=this.__isAsync?function(t){setTimeout(function(){return e.next(t)})}:function(t){e.next(t)},e.error&&(o=this.__isAsync?function(t){setTimeout(function(){return e.error(t)})}:function(t){e.error(t)}),e.complete&&(s=this.__isAsync?function(){setTimeout(function(){return e.complete()})}:function(){e.complete()})):(i=this.__isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)},n&&(o=this.__isAsync?function(t){setTimeout(function(){return n(t)})}:function(t){n(t)}),r&&(s=this.__isAsync?function(){setTimeout(function(){return r()})}:function(){r()}));var a=t.prototype.subscribe.call(this,i,o,s);return e instanceof kg&&e.add(a),a},e}(zg),bb=function(){function t(){}return t.__NG_ELEMENT_ID__=function(){return xb(t,Km)},t}(),xb=vy;function wb(t){for(var e=null;t;){var n=[];t.values.push(n),e={next:e,list:t.list,predicate:t.predicate,values:n,containerValues:null},t=t.next}return e}function Eb(t){for(var e=null;t;)e={next:e,list:t.list,predicate:t.predicate,values:[],containerValues:t.values},t=t.next;return e}function Sb(t,e){for(;e;)e.containerValues.splice(t,0,e.values),e=e.next}function Cb(t){for(;t;){var e=t.containerValues,n=e.indexOf(t.values);e.splice(n,1)[0].length&&t.list.setDirty(),t=t.next}}function Tb(t,e){var n=t.localNames;if(n)for(var r=0;r<n.length;r+=2)if(n[r]===e)return n[r+1];return null}function Pb(t,e,n){var r=e[Fd].data;if(r)for(var i=t.flags,o=i>>16,s=o+(4095&i),a=o;a<s;a++)if(r[a].type===n)return a;return null}function Ab(t,e,n){var r=t[zf];if("function"==typeof r)return r();var i=Pb(e,n,t);return null!==i?n[i]:null}function Nb(t,e,n,r){var i=t[zf]();return r?i?Ab(r,e,n):null:i}function kb(t,e,n,r){return n?Ab(n,t,e):r>-1?e[r]:function i(t,e){return 3===t.type||4===t.type?xm(Km,t,e):0===t.type?function n(t,e,r,i){if(mm||(mm=function(t){function e(e,n,r,i,o,s){var a=t.call(this)||this;return a._declarationParentView=e,a.elementRef=n,a._tView=r,a._renderer=i,a._queries=o,a._injectorIndex=s,a}return o(e,t),e.prototype.createEmbeddedView=function(t,e,n,r,i){var o=function s(t,e,n,r,i,o){var s=Rv(),a=Iv();Lv(!0),Mv(null);var u=Jy(n,r,t,e,2,function c(){return Av&&Av[$d]}());return u[Zd]=n,i&&(u[qd]=i.createView()),em(-1,u),t.firstTemplatePass&&(t.node.injectorIndex=o),Lv(s),Mv(a),u}(this._tView,t,this._declarationParentView,this._renderer,this._queries,this._injectorIndex);e&&function a(t,e,n,r,i){var o=e[lv];r>0&&(o[r-1][Hd]=t),r<o.length?(t[Hd]=o[r],o.splice(r,0,t)):(o.push(t),t[Hd]=null),i>-1&&(t[Yd]=i,t[Bd]=n),t[qd]&&t[qd].insertView(r),t[Vd]|=8}(o,e,r,i,n.index),nm(o,this._tView,t,1);var u=new _m(o,t,-1);return u._tViewNode=o[Kd],u},e}(t)),0===r.type){var s=i[r.index];return new mm(i,xm(e,r,i),r.tViews,kv(),s[qd],r.injectorIndex)}return null}(bb,Km,t,e):null}(t,e)}function Ob(t,e){for(var n=Vv();t;){var r=t.predicate,i=r.type;if(i){var o=null;i===bb?o=Nb(i,e,n,r.read):null!==(u=Pb(e,n,i))&&(o=kb(e,n,r.read,u)),null!==o&&Ib(t,o)}else for(var s=r.selector,a=0;a<s.length;a++){var u;null!==(u=Tb(e,s[a]))&&null!==(o=kb(e,n,r.read,u))&&Ib(t,o)}t=t.next}}function Ib(t,e){t.values.push(e),t.list.setDirty()}function Mb(t,e,n,r){return{next:t,list:e,predicate:function i(t,e){var n=Array.isArray(t);return{type:n?null:t,selector:n?t:null,read:e}}(n,r),values:e._valuesTree,containerValues:null}}!function(){function t(t,e,n){this.parent=t,this.shallow=e,this.deep=n}t.prototype.track=function(t,e,n,r){n?this.deep=Mb(this.deep,t,e,null!=r?r:null):this.shallow=Mb(this.shallow,t,e,null!=r?r:null)},t.prototype.clone=function(){return new t(this,null,this.deep)},t.prototype.container=function(){var e=wb(this.shallow),n=wb(this.deep);return e||n?new t(this,e,n):null},t.prototype.createView=function(){var e=Eb(this.shallow),n=Eb(this.deep);return e||n?new t(this,e,n):null},t.prototype.insertView=function(t){Sb(t,this.shallow),Sb(t,this.deep)},t.prototype.addNode=function(t){return Ob(this.deep,t),yv(t)?(Ob(this.shallow,t),t.parent&&yv(t.parent)&&Ob(this.parent.shallow,t),this.parent):(function e(t){return null===t.parent||yv(t.parent)}(t)&&Ob(this.shallow,t),this)},t.prototype.removeView=function(){Cb(this.shallow),Cb(this.deep)}}(),function(){function t(){this.dirty=!0,this.changes=new _b,this._values=[],this._valuesTree=[]}Object.defineProperty(t.prototype,"length",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"first",{get:function(){var t=this._values;return t.length?t[0]:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){var t=this._values;return t.length?t[t.length-1]:null},enumerable:!0,configurable:!0}),t.prototype.map=function(t){return this._values.map(t)},t.prototype.filter=function(t){return this._values.filter(t)},t.prototype.find=function(t){return this._values.find(t)},t.prototype.reduce=function(t,e){return this._values.reduce(t,e)},t.prototype.forEach=function(t){this._values.forEach(t)},t.prototype.some=function(t){return this._values.some(t)},t.prototype.toArray=function(){return this._values.slice(0)},t.prototype[fd()]=function(){return this._values[fd()]()},t.prototype.toString=function(){return this._values.toString()},t.prototype.reset=function(t){this._values=function e(t){for(var e=[],n=0;n<t.length;){var r=t[n];Array.isArray(r)?r.length>0?(t=r.concat(t.slice(n+1)),n=0):n++:(e.push(r),n++)}return e}(t),this.dirty=!1},t.prototype.notifyOnChanges=function(){this.changes.emit(this)},t.prototype.setDirty=function(){this.dirty=!0},t.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()}}(),function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"}(fb||(fb={}));var Db=function Db(){},Rb=Function;
|
|
1173
1173
|
/**
|
|
1174
1174
|
* @license
|
|
1175
1175
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1197,14 +1197,14 @@ function yg(t){return"function"==typeof t}!function(t){function e(e){var n=t.cal
|
|
|
1197
1197
|
*
|
|
1198
1198
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1199
1199
|
* found in the LICENSE file at https://angular.io/license
|
|
1200
|
-
*/function
|
|
1200
|
+
*/function Lb(t){return"function"==typeof t}
|
|
1201
1201
|
/**
|
|
1202
1202
|
* @license
|
|
1203
1203
|
* Copyright Google Inc. All Rights Reserved.
|
|
1204
1204
|
*
|
|
1205
1205
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1206
1206
|
* found in the LICENSE file at https://angular.io/license
|
|
1207
|
-
*/var
|
|
1207
|
+
*/var jb=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/,Fb=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,Vb=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,Bb=function(){function t(t){this._reflect=t||ld.Reflect}return t.prototype.isReflectionEnabled=function(){return!0},t.prototype.factory=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new(t.bind.apply(t,f([void 0],e)))}},t.prototype._zipTypesAndAnnotations=function(t,e){var n;n=void 0===t?new Array(e.length):new Array(t.length);for(var r=0;r<n.length;r++)n[r]=void 0===t?[]:t[r]!=Object?[t[r]]:[],e&&null!=e[r]&&(n[r]=n[r].concat(e[r]));return n},t.prototype._ownParameters=function(t,e){var n=t.toString();if(jb.exec(n)||Fb.exec(n)&&!Vb.exec(n))return null;if(t.parameters&&t.parameters!==e.parameters)return t.parameters;var r=t.ctorParameters;if(r&&r!==e.ctorParameters){var i="function"==typeof r?r():r,o=i.map(function(t){return t&&t.type}),s=i.map(function(t){return t&&Hb(t.decorators)});return this._zipTypesAndAnnotations(o,s)}var a=t.hasOwnProperty(nd)&&t[nd],u=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",t);return u||a?this._zipTypesAndAnnotations(u,a):new Array(t.length).fill(void 0)},t.prototype.parameters=function(t){if(!Lb(t))return[];var e=qb(t),n=this._ownParameters(t,e);return n||e===Object||(n=this.parameters(e)),n||[]},t.prototype._ownAnnotations=function(t,e){if(t.annotations&&t.annotations!==e.annotations){var n=t.annotations;return"function"==typeof n&&n.annotations&&(n=n.annotations),n}return t.decorators&&t.decorators!==e.decorators?Hb(t.decorators):t.hasOwnProperty(ed)?t[ed]:null},t.prototype.annotations=function(t){if(!Lb(t))return[];var e=qb(t),n=this._ownAnnotations(t,e)||[];return(e!==Object?this.annotations(e):[]).concat(n)},t.prototype._ownPropMetadata=function(t,e){if(t.propMetadata&&t.propMetadata!==e.propMetadata){var n=t.propMetadata;return"function"==typeof n&&n.propMetadata&&(n=n.propMetadata),n}if(t.propDecorators&&t.propDecorators!==e.propDecorators){var r=t.propDecorators,i={};return Object.keys(r).forEach(function(t){i[t]=Hb(r[t])}),i}return t.hasOwnProperty(rd)?t[rd]:null},t.prototype.propMetadata=function(t){if(!Lb(t))return{};var e=qb(t),n={};if(e!==Object){var r=this.propMetadata(e);Object.keys(r).forEach(function(t){n[t]=r[t]})}var i=this._ownPropMetadata(t,e);return i&&Object.keys(i).forEach(function(t){var e=[];n.hasOwnProperty(t)&&e.push.apply(e,f(n[t])),e.push.apply(e,f(i[t])),n[t]=e}),n},t.prototype.hasLifecycleHook=function(t,e){return t instanceof Rb&&e in t.prototype},t.prototype.guards=function(t){return{}},t.prototype.getter=function(t){return new Function("o","return o."+t+";")},t.prototype.setter=function(t){return new Function("o","v","return o."+t+" = v;")},t.prototype.method=function(t){return new Function("o","args","if (!o."+t+") throw new Error('\""+t+"\" is undefined');\n return o."+t+".apply(o, args);")},t.prototype.importUri=function(t){return"object"==typeof t&&t.filePath?t.filePath:"./"+yd(t)},t.prototype.resourceUri=function(t){return"./"+yd(t)},t.prototype.resolveIdentifier=function(t,e,n,r){return r},t.prototype.resolveEnum=function(t,e){return t[e]},t}();function Hb(t){return t?t.map(function(t){var e=t.type.annotationCls;return new(e.bind.apply(e,f([void 0],t.args?t.args:[])))}):[]}function qb(t){var e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object}
|
|
1208
1208
|
/**
|
|
1209
1209
|
* @license
|
|
1210
1210
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1239,21 +1239,21 @@ function yg(t){return"function"==typeof t}!function(t){function e(e){var n=t.cal
|
|
|
1239
1239
|
*
|
|
1240
1240
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1241
1241
|
* found in the LICENSE file at https://angular.io/license
|
|
1242
|
-
*/id("Component",function(t){return void 0===t&&(t={}),a({changeDetection:$f.Default},t)},id("Directive",function(t){return void 0===t&&(t={}),t},void 0,void 0,function(t,e){return
|
|
1242
|
+
*/id("Component",function(t){return void 0===t&&(t={}),a({changeDetection:$f.Default},t)},id("Directive",function(t){return void 0===t&&(t={}),t},void 0,void 0,function(t,e){return Wb(t,e)}),void 0,function(t,e){return Kb(t,e)}),id("Pipe",function(t){return a({pure:!0},t)},void 0,void 0,function(t,e){return zb(t,e)});var Ub=function(t){return function(e,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o=e.constructor;o.hasOwnProperty(Wf)||function(t){var e=t.constructor,n=e.ngBaseDef,r=e.ngBaseDef={inputs:{},outputs:{},declaredInputs:{}};n&&(Bf(r.inputs,n.inputs),Bf(r.outputs,n.outputs),Bf(r.declaredInputs,n.declaredInputs))}(e),t(o.ngBaseDef)[n]=r[0]}},Kb=(ad("Input",function(t){return{bindingPropertyName:t}},void 0,Ub(function(t){return t.inputs||{}})),ad("Output",function(t){return{bindingPropertyName:t}},void 0,Ub(function(t){return t.outputs||{}})),ad("HostBinding",function(t){return{hostPropertyName:t}}),ad("HostListener",function(t,e){return{eventName:t,args:e}}),vy),Wb=vy,zb=vy,Qb=Vf({provide:String,useValue:Vf}),Gb=[];function Xb(t,e){if(!e){var n=(u=new Bb).parameters(t);return function(){return new(t.bind.apply(t,f([void 0],kd(n))))}}if(Qb in e){var r=e;return function(){return r.useValue}}if(e.useExisting){var i=e;return function(){return Ad(i.useExisting)}}if(e.useFactory){var o=e;return function(){return o.useFactory.apply(o,f(kd(o.deps||Gb)))}}if(e.useClass){var s=e,a=e.deps;if(!a){var u=new Bb;a=u.parameters(t)}return function(){var t;return new((t=s.useClass).bind.apply(t,f([void 0],kd(a))))}}var c=e.deps;return c||(u=new Bb,c=u.parameters(t)),function(){return new(t.bind.apply(t,f([void 0],kd(c))))}}
|
|
1243
1243
|
/**
|
|
1244
1244
|
* @license
|
|
1245
1245
|
* Copyright Google Inc. All Rights Reserved.
|
|
1246
1246
|
*
|
|
1247
1247
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1248
1248
|
* found in the LICENSE file at https://angular.io/license
|
|
1249
|
-
*/var
|
|
1249
|
+
*/var $b=id("NgModule",function(t){return t},void 0,void 0,function(t,e){return Yb(t,e)}),Yb=function Zb(t,e){var n=e&&e.imports||[];e&&e.exports&&(n=f(n,[e.exports])),t.ngInjectorDef=function r(t){return{factory:t.factory,providers:t.providers||[],imports:t.imports||[]}}({factory:Xb(t,{useClass:t}),providers:e&&e.providers,imports:n})},Jb=(Vf({provide:String,useValue:Vf}),id("Injectable",void 0,void 0,void 0,function(t,e){return tx(t,e)})),tx=function ex(t,e){e&&void 0!==e.providedIn&&!Gf(t)&&(t.ngInjectableDef=Qf({providedIn:e.providedIn,factory:Xb(t,e)}))},nx="ngDebugContext",rx="ngOriginalError",ix="ngErrorLogger";function ox(t){return t[nx]}function sx(t){return t[rx]}function ax(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];t.error.apply(t,f(e))}
|
|
1250
1250
|
/**
|
|
1251
1251
|
* @license
|
|
1252
1252
|
* Copyright Google Inc. All Rights Reserved.
|
|
1253
1253
|
*
|
|
1254
1254
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1255
1255
|
* found in the LICENSE file at https://angular.io/license
|
|
1256
|
-
*/var
|
|
1256
|
+
*/var ux=function(){function t(){this._console=console}return t.prototype.handleError=function(t){var e=this._findOriginalError(t),n=this._findContext(t),r=function i(t){return t[ix]||ax}(t);r(this._console,"ERROR",t),e&&r(this._console,"ORIGINAL ERROR",e),n&&r(this._console,"ERROR CONTEXT",n)},t.prototype._findContext=function(t){return t?ox(t)?ox(t):this._findContext(sx(t)):null},t.prototype._findOriginalError=function(t){for(var e=sx(t);e&&sx(e);)e=sx(e);return e},t}();function cx(t){return t.length>1?" ("+
|
|
1257
1257
|
/**
|
|
1258
1258
|
* @license
|
|
1259
1259
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1261,7 +1261,7 @@ function yg(t){return"function"==typeof t}!function(t){function e(e){var n=t.cal
|
|
|
1261
1261
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1262
1262
|
* found in the LICENSE file at https://angular.io/license
|
|
1263
1263
|
*/
|
|
1264
|
-
function e(t){for(var e=[],n=0;n<t.length;++n){if(e.indexOf(t[n])>-1)return e.push(t[n]),e;e.push(t[n])}return e}(t.slice().reverse()).map(function(t){return yd(t.token)}).join(" -> ")+")":""}function
|
|
1264
|
+
function e(t){for(var e=[],n=0;n<t.length;++n){if(e.indexOf(t[n])>-1)return e.push(t[n]),e;e.push(t[n])}return e}(t.slice().reverse()).map(function(t){return yd(t.token)}).join(" -> ")+")":""}function lx(t,e,n,r){var i=[e],o=n(i),s=r?function a(t,e){var n=t+" caused by: "+(e instanceof Error?e.message:e),r=Error(n);return r[rx]=e,r}(o,r):Error(o);return s.addKey=px,s.keys=i,s.injectors=[t],s.constructResolvingMessage=n,s[rx]=r,s}function px(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function hx(t,e){for(var n=[],r=0,i=e.length;r<i;r++){var o=e[r];n.push(o&&0!=o.length?o.map(yd).join(" "):"?")}return Error("Cannot resolve all parameters for '"+yd(t)+"'("+n.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+yd(t)+"' is decorated with Injectable.")}
|
|
1265
1265
|
/**
|
|
1266
1266
|
* @license
|
|
1267
1267
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1269,21 +1269,21 @@ function e(t){for(var e=[],n=0;n<t.length;++n){if(e.indexOf(t[n])>-1)return e.pu
|
|
|
1269
1269
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1270
1270
|
* found in the LICENSE file at https://angular.io/license
|
|
1271
1271
|
*/
|
|
1272
|
-
var
|
|
1272
|
+
var fx=function(){function t(t,e){if(this.token=t,this.id=e,!t)throw new Error("Token must be defined!");this.displayName=yd(this.token)}return t.get=function(t){return dx.get(gy(t))},Object.defineProperty(t,"numberOfKeys",{get:function(){return dx.numberOfKeys},enumerable:!0,configurable:!0}),t}(),dx=new(function(){function t(){this._allKeys=new Map}return t.prototype.get=function(t){if(t instanceof fx)return t;if(this._allKeys.has(t))return this._allKeys.get(t);var e=new fx(t,fx.numberOfKeys);return this._allKeys.set(t,e),e},Object.defineProperty(t.prototype,"numberOfKeys",{get:function(){return this._allKeys.size},enumerable:!0,configurable:!0}),t}()),vx=new(function(){function t(t){this.reflectionCapabilities=t}return t.prototype.updateCapabilities=function(t){this.reflectionCapabilities=t},t.prototype.factory=function(t){return this.reflectionCapabilities.factory(t)},t.prototype.parameters=function(t){return this.reflectionCapabilities.parameters(t)},t.prototype.annotations=function(t){return this.reflectionCapabilities.annotations(t)},t.prototype.propMetadata=function(t){return this.reflectionCapabilities.propMetadata(t)},t.prototype.hasLifecycleHook=function(t,e){return this.reflectionCapabilities.hasLifecycleHook(t,e)},t.prototype.getter=function(t){return this.reflectionCapabilities.getter(t)},t.prototype.setter=function(t){return this.reflectionCapabilities.setter(t)},t.prototype.method=function(t){return this.reflectionCapabilities.method(t)},t.prototype.importUri=function(t){return this.reflectionCapabilities.importUri(t)},t.prototype.resourceUri=function(t){return this.reflectionCapabilities.resourceUri(t)},t.prototype.resolveIdentifier=function(t,e,n,r){return this.reflectionCapabilities.resolveIdentifier(t,e,n,r)},t.prototype.resolveEnum=function(t,e){return this.reflectionCapabilities.resolveEnum(t,e)},t}())(new Bb),yx=function(){function t(t,e,n){this.key=t,this.optional=e,this.visibility=n}return t.fromKey=function(e){return new t(e,!1,null)},t}(),mx=[],gx=function gx(t,e,n){this.key=t,this.resolvedFactories=e,this.multiProvider=n,this.resolvedFactory=this.resolvedFactories[0]},_x=function _x(t,e){this.factory=t,this.dependencies=e};function bx(t){return new gx(fx.get(t.provide),[function e(t){var e,n;if(t.useClass){var r=gy(t.useClass);e=vx.factory(r),n=xx(r)}else t.useExisting?(e=function(t){return t},n=[yx.fromKey(fx.get(t.useExisting))]):t.useFactory?(e=t.useFactory,n=function i(t,e){if(e){var n=e.map(function(t){return[t]});return e.map(function(e){return wx(t,e,n)})}return xx(t)}(t.useFactory,t.deps)):(e=function(){return t.useValue},n=mx);return new _x(e,n)}(t)],t.multi||!1)}function xx(t){var e=vx.parameters(t);if(!e)return[];if(e.some(function(t){return null==t}))throw hx(t,e);return e.map(function(n){return wx(t,n,e)})}function wx(t,e,n){var r=null,i=!1;if(!Array.isArray(e))return Ex(e instanceof bd?e.token:e,i,null);for(var o=null,s=0;s<e.length;++s){var a=e[s];a instanceof Rb?r=a:a instanceof bd?r=a.token:a instanceof xd?i=!0:a instanceof wd||a instanceof Ed?o=a:a instanceof td&&(r=a)}if(null!=(r=gy(r)))return Ex(r,i,o);throw hx(t,n)}function Ex(t,e,n){return new yx(fx.get(t),e,n)}
|
|
1273
1273
|
/**
|
|
1274
1274
|
* @license
|
|
1275
1275
|
* Copyright Google Inc. All Rights Reserved.
|
|
1276
1276
|
*
|
|
1277
1277
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1278
1278
|
* found in the LICENSE file at https://angular.io/license
|
|
1279
|
-
*/var
|
|
1279
|
+
*/var Sx=new Object,Cx=function(){function t(){}return t.resolve=function(t){return function e(t){var e=function n(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=e.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 e.set(r.key.id,r)}else{var s;s=r.multiProvider?new gx(r.key,r.resolvedFactories.slice(),r.multiProvider):r,e.set(r.key.id,s)}}return e}(function t(e,n){return e.forEach(function(e){if(e instanceof Rb)n.push({provide:e,useClass:e});else if(e&&"object"==typeof e&&void 0!==e.provide)n.push(e);else{if(!(e instanceof Array))throw function r(t){return Error("Invalid provider - only instances of Provider and Type are allowed, got: "+t)}(e);t(e,n)}}),n}(t,[]).map(bx),new Map);return Array.from(e.values())}(t)},t.resolveAndCreate=function(e,n){var r=t.resolve(e);return t.fromResolvedProviders(r,n)},t.fromResolvedProviders=function(t,e){return new Tx(t,e)},t}(),Tx=function(){function t(t,e){this._constructionCounter=0,this._providers=t,this.parent=e||null;var n=t.length;this.keyIds=new Array(n),this.objs=new Array(n);for(var r=0;r<n;r++)this.keyIds[r]=t[r].key.id,this.objs[r]=Sx}return t.prototype.get=function(t,e){return void 0===e&&(e=xy),this._getByKey(fx.get(t),null,e)},t.prototype.resolveAndCreateChild=function(t){var e=Cx.resolve(t);return this.createChildFromResolved(e)},t.prototype.createChildFromResolved=function(e){var n=new t(e);return n.parent=this,n},t.prototype.resolveAndInstantiate=function(t){return this.instantiateResolved(Cx.resolve([t])[0])},t.prototype.instantiateResolved=function(t){return this._instantiateProvider(t)},t.prototype.getProviderAtIndex=function(t){if(t<0||t>=this._providers.length)throw function e(t){return Error("Index "+t+" is out-of-bounds.")}(t);return this._providers[t]},t.prototype._new=function(t){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw function e(t,n){return lx(t,n,function(t){return"Cannot instantiate cyclic dependency!"+cx(t)})}(this,t.key);return this._instantiateProvider(t)},t.prototype._getMaxNumberOfObjects=function(){return this.objs.length},t.prototype._instantiateProvider=function(t){if(t.multiProvider){for(var e=new Array(t.resolvedFactories.length),n=0;n<t.resolvedFactories.length;++n)e[n]=this._instantiate(t,t.resolvedFactories[n]);return e}return this._instantiate(t,t.resolvedFactories[0])},t.prototype._instantiate=function(t,e){var n,r,i=this,o=e.factory;try{n=e.dependencies.map(function(t){return i._getByReflectiveDependency(t)})}catch(e){throw e.addKey&&e.addKey(this,t.key),e}try{r=o.apply(void 0,f(n))}catch(e){throw function s(t,e,n,r){return lx(t,r,function(t){var n=yd(t[0].token);return e.message+": Error during instantiation of "+n+"!"+cx(t)+"."},e)}(this,e,0,t.key)}return r},t.prototype._getByReflectiveDependency=function(t){return this._getByKey(t.key,t.visibility,t.optional?null:xy)},t.prototype._getByKey=function(e,n,r){return e===t.INJECTOR_KEY?this:n instanceof wd?this._getByKeySelf(e,r):this._getByKeyDefault(e,r,n)},t.prototype._getObjByKeyId=function(t){for(var e=0;e<this.keyIds.length;e++)if(this.keyIds[e]===t)return this.objs[e]===Sx&&(this.objs[e]=this._new(this._providers[e])),this.objs[e];return Sx},t.prototype._throwOrNull=function(t,e){if(e!==xy)return e;throw function n(t,e){return lx(t,e,function(t){return"No provider for "+yd(t[0].token)+"!"+cx(t)})}(this,t)},t.prototype._getByKeySelf=function(t,e){var n=this._getObjByKeyId(t.id);return n!==Sx?n:this._throwOrNull(t,e)},t.prototype._getByKeyDefault=function(e,n,r){var i;for(i=r instanceof Ed?this.parent:this;i instanceof t;){var o=i,s=o._getObjByKeyId(e.id);if(s!==Sx)return s;i=o.parent}return null!==i?i.get(e.token,n):this._throwOrNull(e,n)},Object.defineProperty(t.prototype,"displayName",{get:function(){return"ReflectiveInjector(providers: ["+function t(e,n){for(var r=new Array(e._providers.length),i=0;i<e._providers.length;++i)r[i]=n(e.getProviderAtIndex(i));return r}
|
|
1280
1280
|
/**
|
|
1281
1281
|
* @license
|
|
1282
1282
|
* Copyright Google Inc. All Rights Reserved.
|
|
1283
1283
|
*
|
|
1284
1284
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1285
1285
|
* found in the LICENSE file at https://angular.io/license
|
|
1286
|
-
*/(this,function(t){return' "'+t.key.displayName+'" '}).join(", ")+"])"},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.displayName},t.INJECTOR_KEY=hx.get(Ey),t}(),Tx=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Px=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}Tx(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=Tg(this.durationSelector)(t);if(e===Sg)this.destination.error(Sg.e);else{var n=ob(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,r){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Ax=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add(ob(r,n)),r}Px(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.buffer;this.buffer=[],this.destination.next(o)}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Nx=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}Ax(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)}}(Mg),function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}Ax(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,r=this.buffers,i=this.count;this.count++,i%n==0&&r.push([]);for(var o=r.length;o--;){var s=r[o];s.push(t),s.length===e&&(r.splice(o,1),this.destination.next(s))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),kx=function kx(){this.buffer=[]};function Ox(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function Ix(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(Mx,n,{subscriber:r,context:o})),this.schedule(t,e))}function Mx(t){t.subscriber.closeContext(t.context)}!function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=i,s.scheduler=o,s.contexts=[];var a=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly)s.add(a.closeAction=o.schedule(Ox,n,{subscriber:s,context:a,bufferTimeSpan:n}));else{var u={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:o};s.add(a.closeAction=o.schedule(Mx,n,{subscriber:s,context:a})),s.add(o.schedule(Ix,r,u))}return s}Nx(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i<r;i++){var o=n[i],s=o.buffer;s.push(t),s.length==this.maxBufferSize&&(e=o)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var r=e.shift();n.next(r.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan;this.add(t.closeAction=this.scheduler.schedule(Ox,n,{subscriber:this,context:t,bufferTimeSpan:n}))}},e.prototype.openContext=function(){var t=new kx;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)}}(Mg);var Rx=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dx=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(ob(i,n)),i}Rx(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r<n;r++)e[r].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.subscription;this.destination.next(t.buffer),e.splice(e.indexOf(t),1),this.remove(n),n.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new Ng,r={buffer:[],subscription:n};e.push(r);var i=ob(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Lx=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}Dx(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,e,n,r,i){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe()),this.buffer&&this.destination.next(this.buffer),this.buffer=[];var e=Tg(this.closingSelector)();e===Sg?this.error(Sg.e):(t=new Ng,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(ob(this,e)),this.subscribing=!1)}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),jx=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}Lx(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new $_(this,void 0,void 0);this.add(r),ob(this,n,void 0,void 0,r)}}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Fx=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.count=0,i.index=0,i}jx(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Vx=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r.durationSubscription=null,r}Fx(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=ob(this,e))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(t,e,n,r,i){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=null,n.unsubscribe(),this.remove(n)),this.value=null,this.hasValue=!1,t.prototype._next.call(this,e)}}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}());function Bx(t){t.debouncedNext()}!function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}Vx(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Bx,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}(Mg);var Hx,qx=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ux=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}qx(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Kx=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.delay=n,i.scheduler=r,i.queue=[],i.active=!1,i.errored=!1,i}Ux(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,i=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new Kx(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(E_.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(E_.createComplete()),this.unsubscribe()}}(Mg),function Kx(t,e){this.time=t,this.notification=e}),Wx=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zx=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}Wx(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=ob(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()}}(G_),function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}Wx(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new zx(t,this.source))}}(jg),function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return Wx(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(Mg)),Qx=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gx=(function(t){function e(e){return t.call(this,e)||this}Qx(e,t),e.prototype._next=function(t){t.observe(this.destination)}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Xx=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=n,i.values=new Set,r&&i.add(ob(i,r)),i}Gx(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values.clear()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),$x=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}Xx(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e=t;if(this.keySelector&&(e=Tg(this.keySelector)(t))===Sg)return this.destination.error(Sg.e);var n=!1;if(this.hasKey){if((n=Tg(this.compare)(this.key,e))===Sg)return this.destination.error(Sg.e)}else this.hasKey=!0;!1===Boolean(n)&&(this.key=e,this.destination.next(t))}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Yx=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}$x(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Zx=(function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o._tapNext=Lg,o._tapError=Lg,o._tapComplete=Lg,o._tapError=r||Lg,o._tapComplete=i||Lg,yg(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||Lg,o._tapError=n.error||Lg,o._tapComplete=n.complete||Lg),o}Yx(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Jx=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}Zx(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),tw=(function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.source=i,o.index=0,o.thisArg=r||o,o}Jx(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),ew=(function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}tw(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(ob(this,t)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),nw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}ew(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.hasSubscription=!0,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=new $_(this,void 0,void 0);this.destination.add(r),ob(this,t,e,n,r)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),rw=((function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.scheduler=i,o.index=0,o.active=0,o.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}nw(e,t),e.dispatch=function(t){t.subscriber.subscribeToProjection(t.result,t.value,t.index)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(t);var i=Tg(this.project)(t,r);i===Sg?n.error(Sg.e):this.scheduler?this.destination.add(this.scheduler.schedule(e.dispatch,0,{subscriber:this,result:i,value:t,index:r})):this.subscribeToProjection(i,t,r)}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(ob(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,i){this._next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}())(function iw(t,e){var n=Hx.call(this,t)||this;return n.add(new Ng(e)),n},Hx=Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),ow=(function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.predicate=n,s.source=r,s.yieldIndex=i,s.thisArg=o,s.index=0,s}rw(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),sw=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ow(e,t),e.prototype._next=function(t){}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),aw=(function(t){function e(e){return t.call(this,e)||this}sw(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),uw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}aw(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var o=e++%n;t.next(r[o])}t.complete()}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),cw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}uw(e,t),e.prototype._next=function(t){this.destination.next(this.value)}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),lw=(function(t){function e(e){return t.call(this,e)||this}cw(e,t),e.prototype._next=function(t){this.destination.next(E_.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(E_.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(E_.createComplete()),t.complete()}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),pw=(function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}lw(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}());!function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o.acc=r,o.concurrent=i,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}pw(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=Tg(this.accumulator)(this.acc,t);n===Sg?this.destination.error(Sg.e):(this.active++,this._innerSub(n,t,e))}else this.buffer.push(t)},e.prototype._innerSub=function(t,e,n){var r=new $_(this,void 0,void 0);this.destination.add(r),ob(this,t,e,n,r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.destination;this.acc=e,this.hasValue=!0,o.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())}}(G_);var hw=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}(),fw=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.nextSources=n,r}fw(e,t),e.prototype.notifyError=function(t,e){this.subscribeToNextSource()},e.prototype.notifyComplete=function(t){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new $_(this,void 0,void 0);this.destination.add(e),ob(this,t,void 0,void 0,e)}else this.destination.complete()}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),vw=(function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}dw(e,t),e.prototype._next=function(t){this.hasPrev?this.destination.next([this.prev,t]):this.hasPrev=!0,this.prev=t}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),yw=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}vw(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),mw=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}yw(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(e){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){this.notifications=new Wg;var e=Tg(this.notifier)(this.notifications);if(e===Sg)return t.prototype.complete.call(this);this.retries=e,this.retriesSubscription=ob(this,e)}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),gw=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}mw(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),_w=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}gw(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,i=this.retriesSubscription;if(r)this.errors=null,this.retriesSubscription=null;else{if(n=new Wg,(r=Tg(this.notifier)(n))===Sg)return t.prototype.error.call(this,Sg.e);i=ob(this,r)}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=i,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,e,n,r,i){var o=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=o,this.source.subscribe(this)}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),bw=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}_w(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,e,n,r,i){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}());function xw(t){var e=t.period;t.subscriber.notifyNext(),this.schedule(t,e)}!function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.period=n,i.scheduler=r,i.hasValue=!1,i.add(r.schedule(xw,n,{subscriber:i,period:n})),i}bw(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))}}(Mg);var ww=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ew=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.compareTo=n,i.comparor=r,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(n.subscribe(new Ew(e,i))),i}ww(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this._a,e=this._b,n=this.comparor;t.length>0&&e.length>0;){var r=t.shift(),i=e.shift(),o=!1;n?(o=Tg(n)(r,i))===Sg&&this.destination.error(Sg.e):o=r===i,o||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0}}(Mg),function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return ww(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(Mg));function Sw(){return new Wg}var Cw=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tw=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.seenValue=!1,i.index=0,i}Cw(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new U_)}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Pw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}Tw(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Aw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}Pw(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var r=n%e,i=this._ring,o=i[r];i[r]=t,this.destination.next(o)}}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Nw=(function(t){function e(e,n){var r=t.call(this,e)||this;r.hasValue=!1;var i=new $_(r,void 0,void 0);return r.add(i),r.innerSubscription=i,ob(r,n,void 0,void 0,i),r}Aw(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(t,e,n,r,i){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),kw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}Nw(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Ow=(function(t){function e(e,n,r){void 0===n&&(n=0),void 0===r&&(r=D_);var i=t.call(this)||this;return i.source=e,i.delayTime=n,i.scheduler=r,(!function o(t){return!xg(t)&&t-parseFloat(t)+1>=0}(n)||n<0)&&(i.delayTime=0),r&&"function"==typeof r.schedule||(i.scheduler=D_),i}kw(e,t),e.create=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=D_),new e(t,n,r)},e.dispatch=function(t){return this.add(t.source.subscribe(t.subscriber))},e.prototype._subscribe=function(t){return this.scheduler.schedule(e.dispatch,this.delayTime,{source:this.source,subscriber:t})}}(jg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Iw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}Ow(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=this.innerSubscription;r&&r.unsubscribe();var i=new $_(this,void 0,void 0);this.destination.add(i),this.innerSubscription=ob(this,t,e,n,i)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Mw=(function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}Iw(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Rw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.index=0,r}Mw(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):n.complete()}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Dw=(function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.destination=e,o.durationSelector=n,o._leading=r,o._trailing=i,o._hasValue=!1,o}Rw(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._sendValue;this._hasValue&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=null},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=ob(this,e))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=null,e&&this.send()},e.prototype.notifyNext=function(t,e,n,r,i){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}());function Lw(t){t.subscriber.clearThrottle()}!function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=r,s.leading=i,s.trailing=o,s._hasTrailingValue=!1,s._trailingValue=null,s}Dw(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Lw,this.duration,{subscriber:this})),this.leading&&this.destination.next(t))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)}}(Mg);var jw=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fw=(function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=r,s.withObservable=i,s.scheduler=o,s.action=null,s.scheduleTimeout(),s}jw(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(ob(t,e))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Vw=(function(t){function e(e){var n=t.call(this,e)||this;return n.window=new Wg,e.next(n.window),n}Fw(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new Wg;e.next(n)}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Bw=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.destination=e,i.windowSize=n,i.startWindowEvery=r,i.windows=[new Wg],i.count=0,e.next(i.windows[0]),i}Vw(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,o=i.length,s=0;s<o&&!this.closed;s++)i[s].next(t);var a=this.count-r+1;if(a>=0&&a%e==0&&!this.closed&&i.shift().complete(),++this.count%e==0&&!this.closed){var u=new Wg;i.push(u),n.next(u)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null}}(Mg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Hw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return Bw(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(Wg);function qw(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n)}function Uw(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,i=t.windowCreationInterval,o=n.openWindow(),s={action:this,subscription:null};s.subscription=r.schedule(Kw,e,{subscriber:n,window:o,context:s}),this.add(s.subscription),this.schedule(t,i)}function Kw(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}!function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=i,s.scheduler=o,s.windows=[];var a=s.openWindow();if(null!==r&&r>=0){var u={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:o};s.add(o.schedule(Kw,n,{subscriber:s,window:a,context:null})),s.add(o.schedule(Uw,r,u))}else s.add(o.schedule(qw,n,{subscriber:s,window:a,windowTimeSpan:n}));return s}Bw(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r<n;r++){var i=e[r];i.closed||(i.next(t),i.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(i))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new Hw;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)}}(Mg);var Ww=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zw=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=ob(i,n,n)),i}Ww(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r<n;r++)e[r].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,i=-1;++i<r;){var o=n[i];o.window.error(e),o.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,r=-1;++r<n;){var i=e[r];i.window.complete(),i.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var r=t[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,r,i){if(t===this.openings){var o=Tg(this.closingSelector)(e);if(o===Sg)return this.error(Sg.e);var s=new Wg,a=new Ng,u={window:s,subscription:a};this.contexts.push(u);var c=ob(this,o,u);c.closed?this.closeWindow(this.contexts.length-1):(c.context=u,a.add(c)),this.destination.next(s)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],r=n.window,i=n.subscription;e.splice(t,1),r.complete(),i.unsubscribe()}}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Qw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.closingSelector=n,r.openWindow(),r}zw(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow(i)},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n=this.window=new Wg;this.destination.next(n);var r=Tg(this.closingSelector)();if(r===Sg){var i=Sg.e;this.destination.error(i),this.window.error(i)}else this.add(this.closingNotification=ob(this,r))}}(G_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Gw=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s};
|
|
1286
|
+
*/(this,function(t){return' "'+t.key.displayName+'" '}).join(", ")+"])"},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.displayName},t.INJECTOR_KEY=fx.get(Sy),t}(),Px=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ax=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}Px(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=Pg(this.durationSelector)(t);if(e===Cg)this.destination.error(Cg.e);else{var n=sb(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,r){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Nx=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add(sb(r,n)),r}Ax(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.buffer;this.buffer=[],this.destination.next(o)}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),kx=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}Nx(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)}}(Dg),function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}Nx(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,r=this.buffers,i=this.count;this.count++,i%n==0&&r.push([]);for(var o=r.length;o--;){var s=r[o];s.push(t),s.length===e&&(r.splice(o,1),this.destination.next(s))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Ox=function Ox(){this.buffer=[]};function Ix(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function Mx(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(Dx,n,{subscriber:r,context:o})),this.schedule(t,e))}function Dx(t){t.subscriber.closeContext(t.context)}!function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=i,s.scheduler=o,s.contexts=[];var a=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly)s.add(a.closeAction=o.schedule(Ix,n,{subscriber:s,context:a,bufferTimeSpan:n}));else{var u={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:o};s.add(a.closeAction=o.schedule(Dx,n,{subscriber:s,context:a})),s.add(o.schedule(Mx,r,u))}return s}kx(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i<r;i++){var o=n[i],s=o.buffer;s.push(t),s.length==this.maxBufferSize&&(e=o)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var r=e.shift();n.next(r.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan;this.add(t.closeAction=this.scheduler.schedule(Ix,n,{subscriber:this,context:t,bufferTimeSpan:n}))}},e.prototype.openContext=function(){var t=new Ox;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)}}(Dg);var Rx=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lx=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(sb(i,n)),i}Rx(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r<n;r++)e[r].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.subscription;this.destination.next(t.buffer),e.splice(e.indexOf(t),1),this.remove(n),n.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new kg,r={buffer:[],subscription:n};e.push(r);var i=sb(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),jx=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}Lx(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,e,n,r,i){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe()),this.buffer&&this.destination.next(this.buffer),this.buffer=[];var e=Pg(this.closingSelector)();e===Cg?this.error(Cg.e):(t=new kg,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(sb(this,e)),this.subscribing=!1)}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Fx=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}jx(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new Y_(this,void 0,void 0);this.add(r),sb(this,n,void 0,void 0,r)}}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Vx=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.count=0,i.index=0,i}Fx(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Bx=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r.durationSubscription=null,r}Vx(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=sb(this,e))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(t,e,n,r,i){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=null,n.unsubscribe(),this.remove(n)),this.value=null,this.hasValue=!1,t.prototype._next.call(this,e)}}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}());function Hx(t){t.debouncedNext()}!function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}Bx(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Hx,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}(Dg);var qx,Ux=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kx=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}Ux(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Wx=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.delay=n,i.scheduler=r,i.queue=[],i.active=!1,i.errored=!1,i}Kx(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,i=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new Wx(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(S_.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(S_.createComplete()),this.unsubscribe()}}(Dg),function Wx(t,e){this.time=t,this.notification=e}),zx=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qx=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}zx(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=sb(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()}}(X_),function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}zx(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new Qx(t,this.source))}}(Fg),function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return zx(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(Dg)),Gx=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xx=(function(t){function e(e){return t.call(this,e)||this}Gx(e,t),e.prototype._next=function(t){t.observe(this.destination)}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),$x=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=n,i.values=new Set,r&&i.add(sb(i,r)),i}Xx(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values.clear()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Yx=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}$x(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e=t;if(this.keySelector&&(e=Pg(this.keySelector)(t))===Cg)return this.destination.error(Cg.e);var n=!1;if(this.hasKey){if((n=Pg(this.compare)(this.key,e))===Cg)return this.destination.error(Cg.e)}else this.hasKey=!0;!1===Boolean(n)&&(this.key=e,this.destination.next(t))}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Zx=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}Yx(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Jx=(function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o._tapNext=jg,o._tapError=jg,o._tapComplete=jg,o._tapError=r||jg,o._tapComplete=i||jg,mg(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||jg,o._tapError=n.error||jg,o._tapComplete=n.complete||jg),o}Zx(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),tw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}Jx(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),ew=(function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.source=i,o.index=0,o.thisArg=r||o,o}tw(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),nw=(function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}ew(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(sb(this,t)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),rw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}nw(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.hasSubscription=!0,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=new Y_(this,void 0,void 0);this.destination.add(r),sb(this,t,e,n,r)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),iw=((function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.scheduler=i,o.index=0,o.active=0,o.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}rw(e,t),e.dispatch=function(t){t.subscriber.subscribeToProjection(t.result,t.value,t.index)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(t);var i=Pg(this.project)(t,r);i===Cg?n.error(Cg.e):this.scheduler?this.destination.add(this.scheduler.schedule(e.dispatch,0,{subscriber:this,result:i,value:t,index:r})):this.subscribeToProjection(i,t,r)}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(sb(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,i){this._next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}())(function ow(t,e){var n=qx.call(this,t)||this;return n.add(new kg(e)),n},qx=Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),sw=(function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.predicate=n,s.source=r,s.yieldIndex=i,s.thisArg=o,s.index=0,s}iw(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),aw=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}sw(e,t),e.prototype._next=function(t){}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),uw=(function(t){function e(e){return t.call(this,e)||this}aw(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),cw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}uw(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var o=e++%n;t.next(r[o])}t.complete()}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),lw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}cw(e,t),e.prototype._next=function(t){this.destination.next(this.value)}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),pw=(function(t){function e(e){return t.call(this,e)||this}lw(e,t),e.prototype._next=function(t){this.destination.next(S_.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(S_.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(S_.createComplete()),t.complete()}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),hw=(function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}pw(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}());!function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o.acc=r,o.concurrent=i,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}hw(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=Pg(this.accumulator)(this.acc,t);n===Cg?this.destination.error(Cg.e):(this.active++,this._innerSub(n,t,e))}else this.buffer.push(t)},e.prototype._innerSub=function(t,e,n){var r=new Y_(this,void 0,void 0);this.destination.add(r),sb(this,t,e,n,r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.destination;this.acc=e,this.hasValue=!0,o.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())}}(X_);var fw=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}(),dw=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.nextSources=n,r}dw(e,t),e.prototype.notifyError=function(t,e){this.subscribeToNextSource()},e.prototype.notifyComplete=function(t){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new Y_(this,void 0,void 0);this.destination.add(e),sb(this,t,void 0,void 0,e)}else this.destination.complete()}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),yw=(function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}vw(e,t),e.prototype._next=function(t){this.hasPrev?this.destination.next([this.prev,t]):this.hasPrev=!0,this.prev=t}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),mw=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}yw(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),gw=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}mw(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(e){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){this.notifications=new zg;var e=Pg(this.notifier)(this.notifications);if(e===Cg)return t.prototype.complete.call(this);this.retries=e,this.retriesSubscription=sb(this,e)}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),_w=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}gw(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),bw=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}_w(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,i=this.retriesSubscription;if(r)this.errors=null,this.retriesSubscription=null;else{if(n=new zg,(r=Pg(this.notifier)(n))===Cg)return t.prototype.error.call(this,Cg.e);i=sb(this,r)}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=i,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,e,n,r,i){var o=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=o,this.source.subscribe(this)}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),xw=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}bw(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,e,n,r,i){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}());function ww(t){var e=t.period;t.subscriber.notifyNext(),this.schedule(t,e)}!function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.period=n,i.scheduler=r,i.hasValue=!1,i.add(r.schedule(ww,n,{subscriber:i,period:n})),i}xw(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))}}(Dg);var Ew=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sw=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.compareTo=n,i.comparor=r,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(n.subscribe(new Sw(e,i))),i}Ew(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this._a,e=this._b,n=this.comparor;t.length>0&&e.length>0;){var r=t.shift(),i=e.shift(),o=!1;n?(o=Pg(n)(r,i))===Cg&&this.destination.error(Cg.e):o=r===i,o||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0}}(Dg),function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return Ew(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(Dg));function Cw(){return new zg}var Tw=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pw=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.seenValue=!1,i.index=0,i}Tw(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new K_)}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Aw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}Pw(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Nw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}Aw(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var r=n%e,i=this._ring,o=i[r];i[r]=t,this.destination.next(o)}}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),kw=(function(t){function e(e,n){var r=t.call(this,e)||this;r.hasValue=!1;var i=new Y_(r,void 0,void 0);return r.add(i),r.innerSubscription=i,sb(r,n,void 0,void 0,i),r}Nw(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(t,e,n,r,i){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Ow=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}kw(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Iw=(function(t){function e(e,n,r){void 0===n&&(n=0),void 0===r&&(r=L_);var i=t.call(this)||this;return i.source=e,i.delayTime=n,i.scheduler=r,(!function o(t){return!wg(t)&&t-parseFloat(t)+1>=0}(n)||n<0)&&(i.delayTime=0),r&&"function"==typeof r.schedule||(i.scheduler=L_),i}Ow(e,t),e.create=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=L_),new e(t,n,r)},e.dispatch=function(t){return this.add(t.source.subscribe(t.subscriber))},e.prototype._subscribe=function(t){return this.scheduler.schedule(e.dispatch,this.delayTime,{source:this.source,subscriber:t})}}(Fg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Mw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}Iw(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=this.innerSubscription;r&&r.unsubscribe();var i=new Y_(this,void 0,void 0);this.destination.add(i),this.innerSubscription=sb(this,t,e,n,i)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Dw=(function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}Mw(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Rw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.index=0,r}Dw(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):n.complete()}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Lw=(function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.destination=e,o.durationSelector=n,o._leading=r,o._trailing=i,o._hasValue=!1,o}Rw(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._sendValue;this._hasValue&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=null},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=sb(this,e))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=null,e&&this.send()},e.prototype.notifyNext=function(t,e,n,r,i){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}());function jw(t){t.subscriber.clearThrottle()}!function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=r,s.leading=i,s.trailing=o,s._hasTrailingValue=!1,s._trailingValue=null,s}Lw(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(jw,this.duration,{subscriber:this})),this.leading&&this.destination.next(t))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)}}(Dg);var Fw=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vw=(function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=r,s.withObservable=i,s.scheduler=o,s.action=null,s.scheduleTimeout(),s}Fw(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(sb(t,e))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Bw=(function(t){function e(e){var n=t.call(this,e)||this;return n.window=new zg,e.next(n.window),n}Vw(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new zg;e.next(n)}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Hw=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.destination=e,i.windowSize=n,i.startWindowEvery=r,i.windows=[new zg],i.count=0,e.next(i.windows[0]),i}Bw(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,o=i.length,s=0;s<o&&!this.closed;s++)i[s].next(t);var a=this.count-r+1;if(a>=0&&a%e==0&&!this.closed&&i.shift().complete(),++this.count%e==0&&!this.closed){var u=new zg;i.push(u),n.next(u)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null}}(Dg),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),qw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return Hw(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(zg);function Uw(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n)}function Kw(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,i=t.windowCreationInterval,o=n.openWindow(),s={action:this,subscription:null};s.subscription=r.schedule(Ww,e,{subscriber:n,window:o,context:s}),this.add(s.subscription),this.schedule(t,i)}function Ww(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}!function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=i,s.scheduler=o,s.windows=[];var a=s.openWindow();if(null!==r&&r>=0){var u={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:o};s.add(o.schedule(Ww,n,{subscriber:s,window:a,context:null})),s.add(o.schedule(Kw,r,u))}else s.add(o.schedule(Uw,n,{subscriber:s,window:a,windowTimeSpan:n}));return s}Hw(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r<n;r++){var i=e[r];i.closed||(i.next(t),i.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(i))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new qw;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)}}(Dg);var zw=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qw=(function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=sb(i,n,n)),i}zw(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r<n;r++)e[r].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,i=-1;++i<r;){var o=n[i];o.window.error(e),o.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,r=-1;++r<n;){var i=e[r];i.window.complete(),i.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var r=t[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,r,i){if(t===this.openings){var o=Pg(this.closingSelector)(e);if(o===Cg)return this.error(Cg.e);var s=new zg,a=new kg,u={window:s,subscription:a};this.contexts.push(u);var c=sb(this,o,u);c.closed?this.closeWindow(this.contexts.length-1):(c.context=u,a.add(c)),this.destination.next(s)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],r=n.window,i=n.subscription;e.splice(t,1),r.complete(),i.unsubscribe()}}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Gw=(function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.closingSelector=n,r.openWindow(),r}Qw(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow(i)},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n=this.window=new zg;this.destination.next(n);var r=Pg(this.closingSelector)();if(r===Cg){var i=Cg.e;this.destination.error(i),this.window.error(i)}else this.add(this.closingNotification=sb(this,r))}}(X_),function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Xw=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s};
|
|
1287
1287
|
/**
|
|
1288
1288
|
* @license
|
|
1289
1289
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1291,7 +1291,7 @@ var hx=function(){function t(t,e){if(this.token=t,this.id=e,!t)throw new Error("
|
|
|
1291
1291
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1292
1292
|
* found in the LICENSE file at https://angular.io/license
|
|
1293
1293
|
*/
|
|
1294
|
-
function
|
|
1294
|
+
function $w(t){return!!t&&"function"==typeof t.then}!function(t){function e(e,n,r){var i=t.call(this,e)||this;i.observables=n,i.project=r,i.toRespond=[];var o=n.length;i.values=new Array(o);for(var s=0;s<o;s++)i.toRespond.push(s);for(s=0;s<o;s++){var a=n[s];i.add(sb(i,a,a,s))}return i}Gw(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values[n]=e;var o=this.toRespond;if(o.length>0){var s=o.indexOf(n);-1!==s&&o.splice(s,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Xw(arguments[e]));return t}([t],this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)}}(X_);
|
|
1295
1295
|
/**
|
|
1296
1296
|
* @license
|
|
1297
1297
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1299,7 +1299,7 @@ function Xw(t){return!!t&&"function"==typeof t.then}!function(t){function e(e,n,
|
|
|
1299
1299
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1300
1300
|
* found in the LICENSE file at https://angular.io/license
|
|
1301
1301
|
*/
|
|
1302
|
-
var
|
|
1302
|
+
var Yw=new td("Application Initializer"),Zw=function(){function t(t){var e=this;this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise(function(t,n){e.resolve=t,e.reject=n})}return t.prototype.runInitializers=function(){var t=this;if(!this.initialized){var e=[],n=function(){t.done=!0,t.resolve()};if(this.appInits)for(var r=0;r<this.appInits.length;r++){var i=this.appInits[r]();$w(i)&&e.push(i)}Promise.all(e).then(function(){n()}).catch(function(e){t.reject(e)}),0===e.length&&n(),this.initialized=!0}},u([Jb(),c(0,bd(Yw)),c(0,xd()),l("design:paramtypes",[Array])],t)}(),Jw={provide:new td("AppId"),useFactory:function tE(){return""+eE()+eE()+eE()},deps:[]};function eE(){return String.fromCharCode(97+Math.floor(25*Math.random()))}new td("Platform Initializer");var nE=new td("Platform ID"),rE=new td("appBootstrapListener"),iE=(new td("Application Packages Root URL"),function(){function t(){}return t.prototype.log=function(t){console.log(t)},t.prototype.warn=function(t){console.warn(t)},u([Jb()],t)}());
|
|
1303
1303
|
/**
|
|
1304
1304
|
* @license
|
|
1305
1305
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1307,21 +1307,21 @@ var $w=new td("Application Initializer"),Yw=function(){function t(t){var e=this;
|
|
|
1307
1307
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1308
1308
|
* found in the LICENSE file at https://angular.io/license
|
|
1309
1309
|
*/
|
|
1310
|
-
function
|
|
1310
|
+
function oE(){throw new Error("Runtime compiler is not loaded")}var sE,aE,uE=function(){function t(){}return t.prototype.compileModuleSync=function(t){throw oE()},t.prototype.compileModuleAsync=function(t){throw oE()},t.prototype.compileModuleAndAllComponentsSync=function(t){throw oE()},t.prototype.compileModuleAndAllComponentsAsync=function(t){throw oE()},t.prototype.clearCache=function(){},t.prototype.clearCacheFor=function(t){},t.prototype.getModuleId=function(t){},u([Jb()],t)}(),cE=(new td("compilerOptions"),function cE(){}),lE=function pE(){var t=ld.wtf;return!(!t||!(sE=t.trace)||(aE=sE.events,0))}();function hE(t,e){return null}var fE=lE?function dE(t,e){return void 0===e&&(e=null),aE.createScope(t,e)}:function(t,e){return hE},vE=lE?function yE(t,e){return sE.leaveScope(t,e),e}
|
|
1311
1311
|
/**
|
|
1312
1312
|
* @license
|
|
1313
1313
|
* Copyright Google Inc. All Rights Reserved.
|
|
1314
1314
|
*
|
|
1315
1315
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1316
1316
|
* found in the LICENSE file at https://angular.io/license
|
|
1317
|
-
*/:function(t,e){return e},
|
|
1317
|
+
*/:function(t,e){return e},mE=function(){function t(t){var e=t.enableLongStackTrace,n=void 0!==e&&e;if(this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new _b(!1),this.onMicrotaskEmpty=new _b(!1),this.onStable=new _b(!1),this.onError=new _b(!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(t){t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:function(e,n,r,i,o,s){try{return xE(t),e.invokeTask(r,i,o,s)}finally{wE(t)}},onInvoke:function(e,n,r,i,o,s,a){try{return xE(t),e.invoke(r,i,o,s,a)}finally{wE(t)}},onHasTask:function(e,n,r,i){e.hasTask(r,i),n===r&&("microTask"==i.change?(t.hasPendingMicrotasks=i.microTask,bE(t)):"macroTask"==i.change&&(t.hasPendingMacrotasks=i.macroTask))},onHandleError:function(e,n,r,i){return e.handleError(r,i),t.runOutsideAngular(function(){return t.onError.emit(i)}),!1}})}(this)}return t.isInAngularZone=function(){return!0===Zone.current.get("isAngularZone")},t.assertInAngularZone=function(){if(!t.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")},t.assertNotInAngularZone=function(){if(t.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")},t.prototype.run=function(t,e,n){return this._inner.run(t,e,n)},t.prototype.runTask=function(t,e,n,r){var i=this._inner,o=i.scheduleEventTask("NgZoneEvent: "+r,t,_E,gE,gE);try{return i.runTask(o,e,n)}finally{i.cancelTask(o)}},t.prototype.runGuarded=function(t,e,n){return this._inner.runGuarded(t,e,n)},t.prototype.runOutsideAngular=function(t){return this._outer.run(t)},t}();function gE(){}var _E={};function bE(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(function(){return t.onStable.emit(null)})}finally{t.isStable=!0}}}function xE(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function wE(t){t._nesting--,bE(t)}var EE=function(){function t(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new _b,this.onMicrotaskEmpty=new _b,this.onStable=new _b,this.onError=new _b}return t.prototype.run=function(t){return t()},t.prototype.runGuarded=function(t){return t()},t.prototype.runOutsideAngular=function(t){return t()},t.prototype.runTask=function(t){return t()},t}(),SE=function(){function t(t){var e=this;this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(function(){e.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}return t.prototype._watchAngularEvents=function(){var t=this;this._ngZone.onUnstable.subscribe({next:function(){t._didWork=!0,t._isZoneStable=!1}}),this._ngZone.runOutsideAngular(function(){t._ngZone.onStable.subscribe({next:function(){mE.assertNotInAngularZone(),dd(function(){t._isZoneStable=!0,t._runCallbacksIfReady()})}})})},t.prototype.increasePendingRequestCount=function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount},t.prototype.decreasePendingRequestCount=function(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount},t.prototype.isStable=function(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks},t.prototype._runCallbacksIfReady=function(){var t=this;if(this.isStable())dd(function(){for(;0!==t._callbacks.length;){var e=t._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(t._didWork)}t._didWork=!1});else{var e=this.getPendingTasks();this._callbacks=this._callbacks.filter(function(t){return!t.updateCb||!t.updateCb(e)||(clearTimeout(t.timeoutId),!1)}),this._didWork=!0}},t.prototype.getPendingTasks=function(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(function(t){return{source:t.source,creationLocation:t.creationLocation,data:t.data}}):[]},t.prototype.addCallback=function(t,e,n){var r=this,i=-1;e&&e>0&&(i=setTimeout(function(){r._callbacks=r._callbacks.filter(function(t){return t.timeoutId!==i}),t(r._didWork,r.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:i,updateCb:n})},t.prototype.whenStable=function(t,e,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(t,e,n),this._runCallbacksIfReady()},t.prototype.getPendingRequestCount=function(){return this._pendingCount},t.prototype.findProviders=function(t,e,n){return[]},u([Jb(),l("design:paramtypes",[mE])],t)}(),CE=function(){function t(){this._applications=new Map,TE.addToWindow(this)}return t.prototype.registerApplication=function(t,e){this._applications.set(t,e)},t.prototype.unregisterApplication=function(t){this._applications.delete(t)},t.prototype.unregisterAllApplications=function(){this._applications.clear()},t.prototype.getTestability=function(t){return this._applications.get(t)||null},t.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},t.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},t.prototype.findTestabilityInTree=function(t,e){return void 0===e&&(e=!0),TE.findTestabilityInTree(this,t,e)},u([Jb(),l("design:paramtypes",[])],t)}(),TE=new(function(){function t(){}return t.prototype.addToWindow=function(t){},t.prototype.findTestabilityInTree=function(t,e,n){return null},t}());
|
|
1318
1318
|
/**
|
|
1319
1319
|
* @license
|
|
1320
1320
|
* Copyright Google Inc. All Rights Reserved.
|
|
1321
1321
|
*
|
|
1322
1322
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1323
1323
|
* found in the LICENSE file at https://angular.io/license
|
|
1324
|
-
*/new td("AllowMultipleToken");var
|
|
1324
|
+
*/new td("AllowMultipleToken");var PE=function(){function t(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return t.prototype.bootstrapModuleFactory=function(t,e){var n=this,r=function i(t){return"noop"===t?new EE:("zone.js"===t?void 0:t)||new mE({enableLongStackTrace:ag()})}(e?e.ngZone:void 0),o=[{provide:mE,useValue:r}];return r.run(function(){var e=Sy.create({providers:o,parent:n.injector,name:t.moduleType.name}),i=t.create(e),s=i.injector.get(ux,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return i.onDestroy(function(){return kE(n._modules,i)}),r.runOutsideAngular(function(){return r.onError.subscribe({next:function(t){s.handleError(t)}})}),function a(t,e,n){try{var r=n();return $w(r)?r.catch(function(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}):r}catch(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}}(s,r,function(){var t=i.injector.get(Zw);return t.runInitializers(),t.donePromise.then(function(){return n._moduleDoBootstrap(i),i})})})},t.prototype.bootstrapModule=function(t,e){var n=this;void 0===e&&(e=[]);var r=AE({},e);return function i(t,e,n){return t.get(cE).createCompiler([e]).compileModuleAsync(n)}(this.injector,r,t).then(function(t){return n.bootstrapModuleFactory(t,r)})},t.prototype._moduleDoBootstrap=function(t){var e=t.injector.get(NE);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(function(t){return e.bootstrap(t)});else{if(!t.instance.ngDoBootstrap)throw new Error("The module "+yd(t.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');t.instance.ngDoBootstrap(e)}this._modules.push(t)},t.prototype.onDestroy=function(t){this._destroyListeners.push(t)},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(t){return t.destroy()}),this._destroyListeners.forEach(function(t){return t()}),this._destroyed=!0},Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),u([Jb(),l("design:paramtypes",[Sy])],t)}();function AE(t,e){return Array.isArray(e)?e.reduce(AE,t):a({},t,e)}var NE=function(){function t(t,e,n,r,i,o){var s=this;this._zone=t,this._console=e,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=ag(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var a=new Fg(function(t){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){t.next(s._stable),t.complete()})}),u=new Fg(function(t){var e;s._zone.runOutsideAngular(function(){e=s._zone.onStable.subscribe(function(){mE.assertNotInAngularZone(),dd(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,t.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){mE.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){t.next(!1)}))});return function(){e.unsubscribe(),n.unsubscribe()}});this.isStable=function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,r=null,i=t[t.length-1];return b_(i)?(r=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof i&&(n=t.pop()),null===r&&1===t.length&&t[0]instanceof Fg?t[0]:function o(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),function t(e,n,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof n?function(i){return i.pipe(t(function(t,r){return function o(t,e){if(!e)return t instanceof Fg?t:new Fg(ob(t));if(null!=t){if(function n(t){return t&&"function"==typeof t[Lg]}(t))return function r(t,e){return new Fg(e?function(n){var r=new kg;return r.add(e.schedule(function(){var i=t[Lg]();r.add(i.subscribe({next:function(t){r.add(e.schedule(function(){return n.next(t)}))},error:function(t){r.add(e.schedule(function(){return n.error(t)}))},complete:function(){r.add(e.schedule(function(){return n.complete()}))}}))})),r}:nb(t))}(t,e);if(ib(t))return function i(t,e){return new Fg(e?function(n){var r=new kg;return r.add(e.schedule(function(){return t.then(function(t){r.add(e.schedule(function(){n.next(t),r.add(e.schedule(function(){return n.complete()}))}))},function(t){r.add(e.schedule(function(){return n.error(t)}))})})),r}:Z_(t))}(t,e);if(rb(t))return w_(t,e);if(function o(t){return t&&"function"==typeof t[J_]}(t)||"string"==typeof t)return function s(t,e){if(!t)throw new Error("Iterable cannot be null");return new Fg(e?function(n){var r,i=new kg;return i.add(function(){r&&"function"==typeof r.return&&r.return()}),i.add(e.schedule(function(){r=t[J_](),i.add(e.schedule(function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}}))})),i}:eb(t))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(e(t,r)).pipe(function i(t,e){return function n(r){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new z_(t,e))}}(function(e,i){return n(t,e,r,i)}))},r))}:("number"==typeof n&&(r=n),function(t){return t.lift(new lb(e,r))})}(q_,t)}(n)(w_(t,r))}(a,u.pipe(function c(){return function(t){return Xg()(function e(t,n){return function e(r){var i;if(i="function"==typeof t?t:function e(){return t},"function"==typeof n)return r.lift(new fw(i,n));var o=Object.create(r,t_);return o.source=r,o.subjectFactory=i,o}}(Cw)(t))}}()))}var e;return e=t,t.prototype.bootstrap=function(t,e){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=t instanceof Bm?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);var i=n instanceof Um?null:this._injector.get(Vy),o=n.create(Sy.NULL,[],e||n.selector,i);o.onDestroy(function(){r._unloadComponent(o)});var s=o.injector.get(SE,null);return s&&o.injector.get(CE).registerApplication(o.location.nativeElement,s),this._loadComponent(o),ag()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),o},t.prototype.tick=function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var n=e._tickScope();try{this._runningTick=!0,this._views.forEach(function(t){return t.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(t){return t.checkNoChanges()})}catch(e){this._zone.runOutsideAngular(function(){return t._exceptionHandler.handleError(e)})}finally{this._runningTick=!1,vE(n)}},t.prototype.attachView=function(t){var e=t;this._views.push(e),e.attachToAppRef(this)},t.prototype.detachView=function(t){var e=t;kE(this._views,e),e.detachFromAppRef()},t.prototype._loadComponent=function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(rE,[]).concat(this._bootstrapListeners).forEach(function(e){return e(t)})},t.prototype._unloadComponent=function(t){this.detachView(t.hostView),kE(this.components,t)},t.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(t){return t.destroy()})},Object.defineProperty(t.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),t._tickScope=fE("ApplicationRef#tick()"),e=u([Jb(),l("design:paramtypes",[mE,iE,Sy,ux,qm,Zw])],t)}();function kE(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}
|
|
1325
1325
|
/**
|
|
1326
1326
|
* @license
|
|
1327
1327
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1349,21 +1349,21 @@ function iE(){throw new Error("Runtime compiler is not loaded")}var oE,sE,aE=fun
|
|
|
1349
1349
|
*
|
|
1350
1350
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1351
1351
|
* found in the LICENSE file at https://angular.io/license
|
|
1352
|
-
*/var
|
|
1352
|
+
*/var OE=function(){function t(){this.dirty=!0,this._results=[],this.changes=new _b,this.length=0}return t.prototype.map=function(t){return this._results.map(t)},t.prototype.filter=function(t){return this._results.filter(t)},t.prototype.find=function(t){return this._results.find(t)},t.prototype.reduce=function(t,e){return this._results.reduce(t,e)},t.prototype.forEach=function(t){this._results.forEach(t)},t.prototype.some=function(t){return this._results.some(t)},t.prototype.toArray=function(){return this._results.slice()},t.prototype[fd()]=function(){return this._results[fd()]()},t.prototype.toString=function(){return this._results.toString()},t.prototype.reset=function(t){this._results=function t(e){return e.reduce(function(e,n){var r=Array.isArray(n)?t(n):n;return e.concat(r)},[])}
|
|
1353
1353
|
/**
|
|
1354
1354
|
* @license
|
|
1355
1355
|
* Copyright Google Inc. All Rights Reserved.
|
|
1356
1356
|
*
|
|
1357
1357
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1358
1358
|
* found in the LICENSE file at https://angular.io/license
|
|
1359
|
-
*/(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},t.prototype.notifyOnChanges=function(){this.changes.emit(this)},t.prototype.setDirty=function(){this.dirty=!0},t.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},t}(),
|
|
1359
|
+
*/(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},t.prototype.notifyOnChanges=function(){this.changes.emit(this)},t.prototype.setDirty=function(){this.dirty=!0},t.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},t}(),IE=function IE(){},ME={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};function DE(t,e,n){if(!t)throw new Error("Cannot find '"+n+"' in '"+e+"'");return t}
|
|
1360
1360
|
/**
|
|
1361
1361
|
* @license
|
|
1362
1362
|
* Copyright Google Inc. All Rights Reserved.
|
|
1363
1363
|
*
|
|
1364
1364
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1365
1365
|
* found in the LICENSE file at https://angular.io/license
|
|
1366
|
-
*/!function(){function t(t,e){this._compiler=t,this._config=e||
|
|
1366
|
+
*/!function(){function t(t,e){this._compiler=t,this._config=e||ME}t.prototype.load=function(t){return this._compiler instanceof uE?this.loadFactory(t):this.loadAndCompile(t)},t.prototype.loadAndCompile=function(t){var e=this,n=h(t.split("#"),2),r=n[0],i=n[1];return void 0===i&&(i="default"),System.import(r).then(function(t){return t[i]}).then(function(t){return DE(t,r,i)}).then(function(t){return e._compiler.compileModuleAsync(t)})},t.prototype.loadFactory=function(t){var e=h(t.split("#"),2),n=e[0],r=e[1],i="NgFactory";return void 0===r&&(r="default",i=""),System.import(this._config.factoryPathPrefix+n+this._config.factoryPathSuffix).then(function(t){return t[r+i]}).then(function(t){return DE(t,n,r)})},t=u([Jb(),c(1,xd()),l("design:paramtypes",[uE,IE])],t)}();var RE=function(){function t(){}return t.__NG_ELEMENT_ID__=function(){return LE(t,Km)},t}(),LE=vy,jE=function(){function t(){}return t.__NG_ELEMENT_ID__=function(){return FE()},t}(),FE=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},VE=(function(t){o(function e(){return null!==t&&t.apply(this,arguments)||this},t)}(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(jE)),function VE(t,e){this.name=t,this.callback=e}),BE=function(){function t(t,e,n){this.nativeNode=t,this._debugContext=n,this.listeners=[],this.parent=null,e&&e instanceof HE&&e.addChild(this)}return Object.defineProperty(t.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),t}(),HE=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.properties={},i.attributes={},i.classes={},i.styles={},i.childNodes=[],i.nativeElement=e,i}return o(e,t),e.prototype.addChild=function(t){t&&(this.childNodes.push(t),t.parent=this)},e.prototype.removeChild=function(t){var e=this.childNodes.indexOf(t);-1!==e&&(t.parent=null,this.childNodes.splice(e,1))},e.prototype.insertChildrenAfter=function(t,e){var n,r=this,i=this.childNodes.indexOf(t);-1!==i&&((n=this.childNodes).splice.apply(n,f([i+1,0],e)),e.forEach(function(t){t.parent&&t.parent.removeChild(t),t.parent=r}))},e.prototype.insertBefore=function(t,e){var n=this.childNodes.indexOf(t);-1===n?this.addChild(e):(e.parent&&e.parent.removeChild(e),e.parent=this,this.childNodes.splice(n,0,e))},e.prototype.query=function(t){return this.queryAll(t)[0]||null},e.prototype.queryAll=function(t){var e=[];return qE(this,t,e),e},e.prototype.queryAllNodes=function(t){var e=[];return UE(this,t,e),e},Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes.filter(function(t){return t instanceof e})},enumerable:!0,configurable:!0}),e.prototype.triggerEventHandler=function(t,e){this.listeners.forEach(function(n){n.name==t&&n.callback(e)})},e}(BE);function qE(t,e,n){t.childNodes.forEach(function(t){t instanceof HE&&(e(t)&&n.push(t),qE(t,e,n))})}function UE(t,e,n){t instanceof HE&&t.childNodes.forEach(function(t){e(t)&&n.push(t),t instanceof HE&&UE(t,e,n)})}var KE=new Map;function WE(t){return KE.get(t)||null}function zE(t){KE.set(t.nativeNode,t)}
|
|
1367
1367
|
/**
|
|
1368
1368
|
* @license
|
|
1369
1369
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1371,21 +1371,21 @@ function iE(){throw new Error("Runtime compiler is not loaded")}var oE,sE,aE=fun
|
|
|
1371
1371
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1372
1372
|
* found in the LICENSE file at https://angular.io/license
|
|
1373
1373
|
*/
|
|
1374
|
-
var
|
|
1374
|
+
var QE=function(){function t(){}return t.prototype.supports=function(t){return av(t)},t.prototype.create=function(t){return new XE(t)},t}(),GE=function(t,e){return e},XE=function(){function t(t){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=t||GE}return t.prototype.forEachItem=function(t){var e;for(e=this._itHead;null!==e;e=e._next)t(e)},t.prototype.forEachOperation=function(t){for(var e=this._itHead,n=this._removalsHead,r=0,i=null;e||n;){var o=!n||e&&e.currentIndex<JE(n,r,i)?e:n,s=JE(o,r,i),a=o.currentIndex;if(o===n)r--,n=n._nextRemoved;else if(e=e._next,null==o.previousIndex)r++;else{i||(i=[]);var u=s-r,c=a-r;if(u!=c){for(var l=0;l<u;l++){var p=l<i.length?i[l]:i[l]=0,h=p+l;c<=h&&h<u&&(i[l]=p+1)}i[o.previousIndex]=c-u}}s!==a&&t(o,s,a)}},t.prototype.forEachPreviousItem=function(t){var e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)},t.prototype.forEachAddedItem=function(t){var e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)},t.prototype.forEachMovedItem=function(t){var e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)},t.prototype.forEachRemovedItem=function(t){var e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)},t.prototype.forEachIdentityChange=function(t){var e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)},t.prototype.diff=function(t){if(null==t&&(t=[]),!av(t))throw new Error("Error trying to diff '"+yd(t)+"'. Only arrays and iterables are allowed");return this.check(t)?this:null},t.prototype.onDestroy=function(){},t.prototype.check=function(t){var e=this;this._reset();var n,r,i,o=this._itHead,s=!1;if(Array.isArray(t)){this.length=t.length;for(var a=0;a<this.length;a++)i=this._trackByFn(a,r=t[a]),null!==o&&vd(o.trackById,i)?(s&&(o=this._verifyReinsertion(o,r,i,a)),vd(o.item,r)||this._addIdentityChange(o,r)):(o=this._mismatch(o,r,i,a),s=!0),o=o._next}else n=0,function u(t,e){if(Array.isArray(t))for(var n=0;n<t.length;n++)e(t[n]);else for(var r=t[fd()](),i=void 0;!(i=r.next()).done;)e(i.value)}(t,function(t){i=e._trackByFn(n,t),null!==o&&vd(o.trackById,i)?(s&&(o=e._verifyReinsertion(o,t,i,n)),vd(o.item,t)||e._addIdentityChange(o,t)):(o=e._mismatch(o,t,i,n),s=!0),o=o._next,n++}),this.length=n;return this._truncate(o),this.collection=t,this.isDirty},Object.defineProperty(t.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead},enumerable:!0,configurable:!0}),t.prototype._reset=function(){if(this.isDirty){var t=void 0,e=void 0;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=e)t.previousIndex=t.currentIndex,e=t._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}},t.prototype._mismatch=function(t,e,n,r){var i;return null===t?i=this._itTail:(i=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(vd(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,i,r)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(vd(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,i,r)):t=this._addAfter(new $E(e,n),i,r),t},t.prototype._verifyReinsertion=function(t,e,n,r){var i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==i?t=this._reinsertAfter(i,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t},t.prototype._truncate=function(t){for(;null!==t;){var e=t._next;this._addToRemovals(this._unlink(t)),t=e}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)},t.prototype._reinsertAfter=function(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);var r=t._prevRemoved,i=t._nextRemoved;return null===r?this._removalsHead=i:r._nextRemoved=i,null===i?this._removalsTail=r:i._prevRemoved=r,this._insertAfter(t,e,n),this._addToMoves(t,n),t},t.prototype._moveAfter=function(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t},t.prototype._addAfter=function(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t},t.prototype._insertAfter=function(t,e,n){var r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new ZE),this._linkedRecords.put(t),t.currentIndex=n,t},t.prototype._remove=function(t){return this._addToRemovals(this._unlink(t))},t.prototype._unlink=function(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);var e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t},t.prototype._addToMoves=function(t,e){return t.previousIndex===e?t:(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t,t)},t.prototype._addToRemovals=function(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new ZE),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t},t.prototype._addIdentityChange=function(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t},t}(),$E=function $E(t,e){this.item=t,this.trackById=e,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},YE=function(){function t(){this._head=null,this._tail=null}return t.prototype.add=function(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)},t.prototype.get=function(t,e){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&vd(n.trackById,t))return n;return null},t.prototype.remove=function(t){var e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head},t}(),ZE=function(){function t(){this.map=new Map}return t.prototype.put=function(t){var e=t.trackById,n=this.map.get(e);n||(n=new YE,this.map.set(e,n)),n.add(t)},t.prototype.get=function(t,e){var n=this.map.get(t);return n?n.get(t,e):null},t.prototype.remove=function(t){var e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this.map.size},enumerable:!0,configurable:!0}),t.prototype.clear=function(){this.map.clear()},t}();function JE(t,e,n){var r=t.previousIndex;if(null===r)return r;var i=0;return n&&r<n.length&&(i=n[r]),r+e+i}
|
|
1375
1375
|
/**
|
|
1376
1376
|
* @license
|
|
1377
1377
|
* Copyright Google Inc. All Rights Reserved.
|
|
1378
1378
|
*
|
|
1379
1379
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1380
1380
|
* found in the LICENSE file at https://angular.io/license
|
|
1381
|
-
*/var
|
|
1381
|
+
*/var tS,eS=function(){function t(){}return t.prototype.supports=function(t){return t instanceof Map||uv(t)},t.prototype.create=function(){return new nS},t}(),nS=function(){function t(){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(t.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead},enumerable:!0,configurable:!0}),t.prototype.forEachItem=function(t){var e;for(e=this._mapHead;null!==e;e=e._next)t(e)},t.prototype.forEachPreviousItem=function(t){var e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)},t.prototype.forEachChangedItem=function(t){var e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)},t.prototype.forEachAddedItem=function(t){var e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)},t.prototype.forEachRemovedItem=function(t){var e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)},t.prototype.diff=function(t){if(t){if(!(t instanceof Map||uv(t)))throw new Error("Error trying to diff '"+yd(t)+"'. Only maps and objects are allowed")}else t=new Map;return this.check(t)?this:null},t.prototype.onDestroy=function(){},t.prototype.check=function(t){var e=this;this._reset();var n=this._mapHead;if(this._appendAfter=null,this._forEach(t,function(t,r){if(n&&n.key===r)e._maybeAddToChanges(n,t),e._appendAfter=n,n=n._next;else{var i=e._getOrCreateRecordForKey(r,t);n=e._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},t.prototype._insertBeforeOrAppend=function(t,e){if(t){var n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null},t.prototype._getOrCreateRecordForKey=function(t,e){if(this._records.has(t)){var n=this._records.get(t);this._maybeAddToChanges(n,e);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 rS(t);return this._records.set(t,o),o.currentValue=e,this._addToAdditions(o),o},t.prototype._reset=function(){if(this.isDirty){var t=void 0;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}},t.prototype._maybeAddToChanges=function(t,e){vd(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))},t.prototype._addToAdditions=function(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)},t.prototype._addToChanges=function(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)},t.prototype._forEach=function(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(function(n){return e(t[n],n)})},t}(),rS=function rS(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null},iS=function(){function t(t){this.factories=t}return t.create=function(e,n){if(null!=n){var r=n.factories.slice();e=e.concat(r)}return new t(e)},t.extend=function(e){return{provide:t,useFactory:function(n){if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new Ed,new xd]]}},t.prototype.find=function(t){var e=this.factories.find(function(e){return e.supports(t)});if(null!=e)return e;throw new Error("Cannot find a differ supporting object '"+t+"' of type '"+function n(t){return t.name||typeof t}
|
|
1382
1382
|
/**
|
|
1383
1383
|
* @license
|
|
1384
1384
|
* Copyright Google Inc. All Rights Reserved.
|
|
1385
1385
|
*
|
|
1386
1386
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1387
1387
|
* found in the LICENSE file at https://angular.io/license
|
|
1388
|
-
*/(t)+"'")},t.ngInjectableDef=Qf({providedIn:"root",factory:function(){return new t([new
|
|
1388
|
+
*/(t)+"'")},t.ngInjectableDef=Qf({providedIn:"root",factory:function(){return new t([new QE])}}),t}(),oS=function(){function t(t){this.factories=t}return t.create=function(e,n){if(n){var r=n.factories.slice();e=e.concat(r)}return new t(e)},t.extend=function(e){return{provide:t,useFactory:function(n){if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new Ed,new xd]]}},t.prototype.find=function(t){var e=this.factories.find(function(e){return e.supports(t)});if(e)return e;throw new Error("Cannot find a differ supporting object '"+t+"'")},t.ngInjectableDef=Qf({providedIn:"root",factory:function(){return new t([new eS])}}),t}(),sS=[new eS],aS=new iS([new QE]),uS=new oS(sS),cS=(function lS(t,e,n){void 0===n&&(n=[]);new td("Platform: "+e)}(0,"core",[{provide:nE,useValue:"unknown"},{provide:PE,deps:[Sy]},{provide:CE,deps:[]},{provide:iE,deps:[]}]),new td("LocaleId"));new td("Translations"),new td("TranslationsFormat"),function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"}(tS||(tS={}));var pS=[{provide:NE,useClass:NE,deps:[mE,iE,Sy,ux,qm,Zw]},{provide:Zw,useClass:Zw,deps:[[new xd,Yw]]},{provide:uE,useClass:uE,deps:[]},Jw,{provide:iS,useFactory:
|
|
1389
1389
|
/**
|
|
1390
1390
|
* @license
|
|
1391
1391
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1393,7 +1393,7 @@ var zE=function(){function t(){}return t.prototype.supports=function(t){return s
|
|
|
1393
1393
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1394
1394
|
* found in the LICENSE file at https://angular.io/license
|
|
1395
1395
|
*/
|
|
1396
|
-
function
|
|
1396
|
+
function hS(){return aS},deps:[]},{provide:oS,useFactory:function fS(){return uS},deps:[]},{provide:cS,useFactory:function dS(t){return t||"en-US"},deps:[[new bd(cS),new xd,new Ed]]}];
|
|
1397
1397
|
/**
|
|
1398
1398
|
* @license
|
|
1399
1399
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1408,42 +1408,42 @@ function pS(){return sS},deps:[]},{provide:iS,useFactory:function hS(){return aS
|
|
|
1408
1408
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1409
1409
|
* found in the LICENSE file at https://angular.io/license
|
|
1410
1410
|
*/
|
|
1411
|
-
function
|
|
1411
|
+
function vS(t,e,n){var r=t.state,i=1792&r;return i===e?(t.state=-1793&r|n,t.initIndex=-1,!0):i===n}function yS(t,e,n){return(1792&t.state)===e&&t.initIndex<=n&&(t.initIndex=n+1,!0)}function mS(t,e){return t.nodes[e]}function gS(t,e){return t.nodes[e]}function _S(t,e){return t.nodes[e]}function bS(t,e){return t.nodes[e]}function xS(t,e){return t.nodes[e]}!function(){function t(t){}t=u([$b({providers:pS}),l("design:paramtypes",[NE])],t)}();var wS={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};
|
|
1412
1412
|
/**
|
|
1413
1413
|
* @license
|
|
1414
1414
|
* Copyright Google Inc. All Rights Reserved.
|
|
1415
1415
|
*
|
|
1416
1416
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1417
1417
|
* found in the LICENSE file at https://angular.io/license
|
|
1418
|
-
*/function
|
|
1418
|
+
*/function ES(t,e,n,r){var i="ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '"+e+"'. 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(t,e){var n=new Error(t);return SS(n,e),n}(i,t)}function SS(t,e){t[nx]=e,t[ix]=e.logError.bind(e)}function CS(t){return new Error("ViewDestroyedError: Attempt to use a destroyed view: "+t)}
|
|
1419
1419
|
/**
|
|
1420
1420
|
* @license
|
|
1421
1421
|
* Copyright Google Inc. All Rights Reserved.
|
|
1422
1422
|
*
|
|
1423
1423
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1424
1424
|
* found in the LICENSE file at https://angular.io/license
|
|
1425
|
-
*/var
|
|
1425
|
+
*/var TS=function(){},PS=new Map;function AS(t){var e=PS.get(t);return e||(e=yd(t)+"_"+PS.size,PS.set(t,e)),e}function NS(t,e,n,r){return!(!(2&t.state)&&vd(t.oldValues[e.bindingIndex+n],r))}function kS(t,e,n,r){return!!NS(t,e,n,r)&&(t.oldValues[e.bindingIndex+n]=r,!0)}function OS(t,e,n,r){var i=t.oldValues[e.bindingIndex+n];if(1&t.state||!iv(i,r)){var o=e.bindings[n].name;throw ES(wS.createDebugContext(t,e.nodeIndex),o+": "+i,o+": "+r,0!=(1&t.state))}}function IS(t){for(var e=t;e;)2&e.def.flags&&(e.state|=8),e=e.viewContainerParent||e.parent}function MS(t,e){for(var n=t;n&&n!==e;)n.state|=64,n=n.viewContainerParent||n.parent}function DS(t,e,n,r){try{return IS(33554432&t.def.nodes[e].flags?gS(t,e).componentView:t),wS.handleEvent(t,e,n,r)}catch(e){t.root.errorHandler.handleError(e)}}function RS(t){return t.parent?gS(t.parent,t.parentNodeDef.nodeIndex):null}function LS(t){return t.parent?t.parentNodeDef.parent:null}function jS(t,e){switch(201347067&e.flags){case 1:return gS(t,e.nodeIndex).renderElement;case 2:return mS(t,e.nodeIndex).renderText}}function FS(t){return!!t.parent&&!!(32768&t.parentNodeDef.flags)}function VS(t){return!(!t.parent||32768&t.parentNodeDef.flags)}function BS(t,e){return t.map(function(t){var n,r,i;return Array.isArray(t)?(i=(n=h(t,2))[0],r=n[1]):(i=0,r=t),r&&("function"==typeof r||"object"==typeof r)&&e&&Object.defineProperty(r,_y,{value:e,configurable:!0}),{flags:i,token:r,tokenKey:AS(r)}})}function HS(t,e,n){var r=n.renderParent;return r?0==(1&r.flags)||0==(33554432&r.flags)||r.element.componentRendererType&&r.element.componentRendererType.encapsulation===Zf.Native?gS(t,n.renderParent.nodeIndex).renderElement:void 0:e}var qS=new WeakMap;function US(t){var e=qS.get(t);return e||((e=t(function(){return TS})).factory=t,qS.set(t,e)),e}function KS(t,e,n,r,i){3===e&&(n=t.renderer.parentNode(jS(t,t.def.lastRenderRootNode))),WS(t,e,0,t.def.nodes.length-1,n,r,i)}function WS(t,e,n,r,i,o,s){for(var a=n;a<=r;a++){var u=t.def.nodes[a];11&u.flags&&QS(t,u,e,i,o,s),a+=u.childCount}}function zS(t,e,n,r,i,o){for(var s=t;s&&!FS(s);)s=s.parent;for(var a=s.parent,u=LS(s),c=u.nodeIndex+u.childCount,l=u.nodeIndex+1;l<=c;l++){var p=a.def.nodes[l];p.ngContentIndex===e&&QS(a,p,n,r,i,o),l+=p.childCount}if(!a.parent){var h=t.root.projectableNodes[e];if(h)for(l=0;l<h.length;l++)GS(t,h[l],n,r,i,o)}}function QS(t,e,n,r,i,o){if(8&e.flags)zS(t,e.ngContent.index,n,r,i,o);else{var s=jS(t,e);if(3===n&&33554432&e.flags&&48&e.bindingFlags?(16&e.bindingFlags&&GS(t,s,n,r,i,o),32&e.bindingFlags&&GS(gS(t,e.nodeIndex).componentView,s,n,r,i,o)):GS(t,s,n,r,i,o),16777216&e.flags)for(var a=gS(t,e.nodeIndex).viewContainer._embeddedViews,u=0;u<a.length;u++)KS(a[u],n,r,i,o);1&e.flags&&!e.element.name&&WS(t,n,e.nodeIndex+1,e.nodeIndex+e.childCount,r,i,o)}}function GS(t,e,n,r,i,o){var s=t.renderer;switch(n){case 1:s.appendChild(r,e);break;case 2:s.insertBefore(r,e,i);break;case 3:s.removeChild(r,e);break;case 0:o.push(e)}}var XS=/^:([^:]+):(.+)$/;function $S(t){if(":"===t[0]){var e=t.match(XS);return[e[1],e[2]]}return["",t]}
|
|
1426
1426
|
/**
|
|
1427
1427
|
* @license
|
|
1428
1428
|
* Copyright Google Inc. All Rights Reserved.
|
|
1429
1429
|
*
|
|
1430
1430
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1431
1431
|
* found in the LICENSE file at https://angular.io/license
|
|
1432
|
-
*/function
|
|
1432
|
+
*/function YS(t,e,n){var r,i=n.element,o=t.root.selectorOrNode,s=t.renderer;if(t.parent||!o){r=i.name?s.createElement(i.name,i.ns):s.createComment("");var a=HS(t,e,n);a&&s.appendChild(a,r)}else r=s.selectRootElement(o,!!i.componentRendererType&&i.componentRendererType.encapsulation===Zf.ShadowDom);if(i.attrs)for(var u=0;u<i.attrs.length;u++){var c=h(i.attrs[u],3);s.setAttribute(r,c[1],c[2],c[0])}return r}function ZS(t,e,n,r){for(var i=0;i<n.outputs.length;i++){var o=n.outputs[i],s=JS(t,n.nodeIndex,(p=o.eventName,(l=o.target)?l+":"+p:p)),a=o.target,u=t;"component"===o.target&&(a=null,u=e);var c=u.renderer.listen(a||r,o.eventName,s);t.disposables[n.outputIndex+i]=c}var l,p}function JS(t,e,n){return function(r){return DS(t,e,n,r)}}function tC(t,e,n,r){if(!kS(t,e,n,r))return!1;var i=e.bindings[n],o=gS(t,e.nodeIndex),s=o.renderElement,a=i.name;switch(15&i.flags){case 1:!function u(t,e,n,r,i,o){var s=e.securityContext,a=s?t.root.sanitizer.sanitize(s,o):o;a=null!=a?a.toString():null;var u=t.renderer;null!=o?u.setAttribute(n,i,a,r):u.removeAttribute(n,i,r)}(t,i,s,i.ns,a,r);break;case 2:!function c(t,e,n,r){var i=t.renderer;r?i.addClass(e,n):i.removeClass(e,n)}(t,s,a,r);break;case 4:!function l(t,e,n,r,i){var o=t.root.sanitizer.sanitize(fb.STYLE,i);if(null!=o){o=o.toString();var s=e.suffix;null!=s&&(o+=s)}else o=null;var a=t.renderer;null!=o?a.setStyle(n,r,o):a.removeStyle(n,r)}(t,i,s,a,r);break;case 8:!function p(t,e,n,r,i){var o=e.securityContext,s=o?t.root.sanitizer.sanitize(o,i):i;t.renderer.setProperty(n,r,s)}
|
|
1433
1433
|
/**
|
|
1434
1434
|
* @license
|
|
1435
1435
|
* Copyright Google Inc. All Rights Reserved.
|
|
1436
1436
|
*
|
|
1437
1437
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1438
1438
|
* found in the LICENSE file at https://angular.io/license
|
|
1439
|
-
*/(33554432&e.flags&&32&i.flags?o.componentView:t,i,s,a,r)}return!0}var
|
|
1439
|
+
*/(33554432&e.flags&&32&i.flags?o.componentView:t,i,s,a,r)}return!0}var eC=new Object,nC=AS(Sy),rC=AS(wy),iC=AS(Vy);function oC(t,e,n){void 0===n&&(n=Sy.THROW_IF_NOT_FOUND);var r=Td(t);try{if(8&e.flags)return e.token;if(2&e.flags&&(n=null),1&e.flags)return t._parent.get(e.token,n);var i=e.tokenKey;switch(i){case nC:case rC:case iC:return t}var o,s=t._def.providersByKey[i];if(s){var a=t._providers[s.index];return void 0===a&&(a=t._providers[s.index]=sC(t,s)),a===eC?void 0:a}if((o=Gf(e.token))&&function u(t,e){return null!=e.providedIn&&(function n(t,e){return t._def.modules.indexOf(e)>-1}(t,e.providedIn)||"root"===e.providedIn&&t._def.isRoot)}(t,o)){var c=t._providers.length;return t._def.providersByKey[e.tokenKey]={flags:5120,value:o.factory,deps:[],index:c,token:e.token},t._providers[c]=eC,t._providers[c]=sC(t,t._def.providersByKey[e.tokenKey])}return 4&e.flags?n:t._parent.get(e.token,n)}finally{Td(r)}}function sC(t,e){var n;switch(201347067&e.flags){case 512:n=function r(t,e,n){var r=n.length;switch(r){case 0:return new e;case 1:return new e(oC(t,n[0]));case 2:return new e(oC(t,n[0]),oC(t,n[1]));case 3:return new e(oC(t,n[0]),oC(t,n[1]),oC(t,n[2]));default:for(var i=new Array(r),o=0;o<r;o++)i[o]=oC(t,n[o]);return new(e.bind.apply(e,f([void 0],i)))}}(t,e.value,e.deps);break;case 1024:n=function i(t,e,n){var r=n.length;switch(r){case 0:return e();case 1:return e(oC(t,n[0]));case 2:return e(oC(t,n[0]),oC(t,n[1]));case 3:return e(oC(t,n[0]),oC(t,n[1]),oC(t,n[2]));default:for(var i=Array(r),o=0;o<r;o++)i[o]=oC(t,n[o]);return e.apply(void 0,f(i))}}(t,e.value,e.deps);break;case 2048:n=oC(t,e.deps[0]);break;case 256:n=e.value}return n===eC||null==n||"object"!=typeof n||131072&e.flags||"function"!=typeof n.ngOnDestroy||(e.flags|=131072),void 0===n?eC:n}function aC(t,e){var n=t.viewContainer._embeddedViews;if((null==e||e>=n.length)&&(e=n.length-1),e<0)return null;var r=n[e];return r.viewContainerParent=null,pC(n,e),wS.dirtyParentQueries(r),cC(r),r}function uC(t,e,n){var r=e?jS(e,e.def.lastRenderRootNode):t.renderElement;KS(n,2,n.renderer.parentNode(r),n.renderer.nextSibling(r),void 0)}function cC(t){KS(t,3,null,null,void 0)}function lC(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function pC(t,e){e>=t.length-1?t.pop():t.splice(e,1)}
|
|
1440
1440
|
/**
|
|
1441
1441
|
* @license
|
|
1442
1442
|
* Copyright Google Inc. All Rights Reserved.
|
|
1443
1443
|
*
|
|
1444
1444
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1445
1445
|
* found in the LICENSE file at https://angular.io/license
|
|
1446
|
-
*/var
|
|
1446
|
+
*/var hC=new Object;!function(t){function e(e,n,r,i,o,s){var a=t.call(this)||this;return a.selector=e,a.componentType=n,a._inputs=i,a._outputs=o,a.ngContentSelectors=s,a.viewDefFactory=r,a}o(e,t),Object.defineProperty(e.prototype,"inputs",{get:function(){var t=[],e=this._inputs;for(var n in e)t.push({propName:n,templateName:e[n]});return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outputs",{get:function(){var t=[];for(var e in this._outputs)t.push({propName:e,templateName:this._outputs[e]});return t},enumerable:!0,configurable:!0}),e.prototype.create=function(t,e,n,r){if(!r)throw new Error("ngModule should be provided");var i=US(this.viewDefFactory),o=i.nodes[0].element.componentProvider.nodeIndex,s=wS.createRootView(t,e||[],n,i,r,hC),a=_S(s,o).instance;return n&&s.renderer.setAttribute(gS(s,0).renderElement,"ng-version",Ym.full),new fC(s,new mC(s),a)}}(Bm);var fC=function(t){function e(e,n,r){var i=t.call(this)||this;return i._view=e,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(e,t),Object.defineProperty(e.prototype,"location",{get:function(){return new Km(gS(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new xC(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._viewRef.destroy()},e.prototype.onDestroy=function(t){this._viewRef.onDestroy(t)},e}(Vm);function dC(t,e,n){return new vC(t,e,n)}var vC=function(){function t(t,e,n){this._view=t,this._elDef=e,this._data=n,this._embeddedViews=[]}return Object.defineProperty(t.prototype,"element",{get:function(){return new Km(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new xC(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentInjector",{get:function(){for(var t=this._view,e=this._elDef.parent;!e&&t;)e=LS(t),t=t.parent;return t?new xC(t,e):new xC(this._view,null)},enumerable:!0,configurable:!0}),t.prototype.clear=function(){for(var t=this._embeddedViews.length-1;t>=0;t--){var e=aC(this._data,t);wS.destroyView(e)}},t.prototype.get=function(t){var e=this._embeddedViews[t];if(e){var n=new mC(e);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(t.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(t,e,n){var r=t.createEmbeddedView(e||{});return this.insert(r,n),r},t.prototype.createComponent=function(t,e,n,r,i){var o=n||this.parentInjector;i||t instanceof Um||(i=o.get(Vy));var s=t.create(o,r,void 0,i);return this.insert(s.hostView,e),s},t.prototype.insert=function(t,e){if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n=t;
|
|
1447
1447
|
/**
|
|
1448
1448
|
* @license
|
|
1449
1449
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1451,28 +1451,28 @@ function dS(t,e,n){var r=t.state,i=1792&r;return i===e?(t.state=-1793&r|n,t.init
|
|
|
1451
1451
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1452
1452
|
* found in the LICENSE file at https://angular.io/license
|
|
1453
1453
|
*/
|
|
1454
|
-
return function r(t,e,n,i){var o=e.viewContainer._embeddedViews;null!==n&&void 0!==n||(n=o.length),i.viewContainerParent=t,
|
|
1454
|
+
return function r(t,e,n,i){var o=e.viewContainer._embeddedViews;null!==n&&void 0!==n||(n=o.length),i.viewContainerParent=t,lC(o,n,i),function s(t,e){var n=RS(e);if(n&&n!==t&&!(16&e.state)){e.state|=16;var r=n.template._projectedViews;r||(r=n.template._projectedViews=[]),r.push(e),function i(t,e){if(!(4&e.flags)){t.nodeFlags|=4,e.flags|=4;for(var n=e.parent;n;)n.childFlags|=4,n=n.parent}}(e.parent.def,e.parentNodeDef)}}(e,i),wS.dirtyParentQueries(i),uC(e,n>0?o[n-1]:null,i)}(this._view,this._data,e,n._view),n.attachToViewContainerRef(this),t},t.prototype.move=function(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n=this._embeddedViews.indexOf(t._view);return function r(t,e,n){var r=t.viewContainer._embeddedViews,i=r[e];pC(r,e),null==n&&(n=r.length),lC(r,n,i),wS.dirtyParentQueries(i),cC(i),uC(t,n>0?r[n-1]:null,i)}(this._data,n,e),t},t.prototype.indexOf=function(t){return this._embeddedViews.indexOf(t._view)},t.prototype.remove=function(t){var e=aC(this._data,t);e&&wS.destroyView(e)},t.prototype.detach=function(t){var e=aC(this._data,t);return e?new mC(e):null},t}();function yC(t){return new mC(t)}var mC=function(){function t(t){this._view=t,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(t.prototype,"rootNodes",{get:function(){return function t(e){var n=[];return KS(e,0,void 0,void 0,n),n}(this._view)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),t.prototype.markForCheck=function(){IS(this._view)},t.prototype.detach=function(){this._view.state&=-5},t.prototype.detectChanges=function(){var t=this._view.root.rendererFactory;t.begin&&t.begin();try{wS.checkAndUpdateView(this._view)}finally{t.end&&t.end()}},t.prototype.checkNoChanges=function(){wS.checkNoChangesView(this._view)},t.prototype.reattach=function(){this._view.state|=4},t.prototype.onDestroy=function(t){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(t)},t.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),wS.destroyView(this._view)},t.prototype.detachFromAppRef=function(){this._appRef=null,cC(this._view),wS.dirtyParentQueries(this._view)},t.prototype.attachToAppRef=function(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t},t.prototype.attachToViewContainerRef=function(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t},t}();function gC(t,e){return new _C(t,e)}var _C=function(t){function e(e,n){var r=t.call(this)||this;return r._parentView=e,r._def=n,r}return o(e,t),e.prototype.createEmbeddedView=function(t){return new mC(wS.createEmbeddedView(this._parentView,this._def,this._def.element.template,t))},Object.defineProperty(e.prototype,"elementRef",{get:function(){return new Km(gS(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),e}(bb);function bC(t,e){return new xC(t,e)}var xC=function(){function t(t,e){this.view=t,this.elDef=e}return t.prototype.get=function(t,e){return void 0===e&&(e=Sy.THROW_IF_NOT_FOUND),wS.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:t,tokenKey:AS(t)},e)},t}();function wC(t){return new EC(t.renderer)}var EC=function(){function t(t){this.delegate=t}return t.prototype.selectRootElement=function(t){return this.delegate.selectRootElement(t)},t.prototype.createElement=function(t,e){var n=h($S(e),2),r=this.delegate.createElement(n[1],n[0]);return t&&this.delegate.appendChild(t,r),r},t.prototype.createViewRoot=function(t){return t},t.prototype.createTemplateAnchor=function(t){var e=this.delegate.createComment("");return t&&this.delegate.appendChild(t,e),e},t.prototype.createText=function(t,e){var n=this.delegate.createText(e);return t&&this.delegate.appendChild(t,n),n},t.prototype.projectNodes=function(t,e){for(var n=0;n<e.length;n++)this.delegate.appendChild(t,e[n])},t.prototype.attachViewAfter=function(t,e){for(var n=this.delegate.parentNode(t),r=this.delegate.nextSibling(t),i=0;i<e.length;i++)this.delegate.insertBefore(n,e[i],r)},t.prototype.detachView=function(t){for(var e=0;e<t.length;e++){var n=t[e],r=this.delegate.parentNode(n);this.delegate.removeChild(r,n)}},t.prototype.destroyView=function(t,e){for(var n=0;n<e.length;n++)this.delegate.destroyNode(e[n])},t.prototype.listen=function(t,e,n){return this.delegate.listen(t,e,n)},t.prototype.listenGlobal=function(t,e,n){return this.delegate.listen(t,e,n)},t.prototype.setElementProperty=function(t,e,n){this.delegate.setProperty(t,e,n)},t.prototype.setElementAttribute=function(t,e,n){var r=h($S(e),2),i=r[0],o=r[1];null!=n?this.delegate.setAttribute(t,o,n,i):this.delegate.removeAttribute(t,o,i)},t.prototype.setBindingDebugInfo=function(t,e,n){},t.prototype.setElementClass=function(t,e,n){n?this.delegate.addClass(t,e):this.delegate.removeClass(t,e)},t.prototype.setElementStyle=function(t,e,n){null!=n?this.delegate.setStyle(t,e,n):this.delegate.removeStyle(t,e)},t.prototype.invokeElementMethod=function(t,e,n){t[e].apply(t,n)},t.prototype.setText=function(t,e){this.delegate.setValue(t,e)},t.prototype.animate=function(){throw new Error("Renderer.animate is no longer supported!")},t}();function SC(t,e,n,r){return new CC(t,e,n,r)}var CC=function(){function t(t,e,n,r){this._moduleType=t,this._parent=e,this._bootstrapComponents=n,this._def=r,this._destroyListeners=[],this._destroyed=!1,this.injector=this,function i(t){for(var e=t._def,n=t._providers=new Array(e.providers.length),r=0;r<e.providers.length;r++){var i=e.providers[r];4096&i.flags||void 0===n[r]&&(n[r]=sC(t,i))}}(this)}return t.prototype.get=function(t,e,n){void 0===e&&(e=Sy.THROW_IF_NOT_FOUND),void 0===n&&(n=_d.Default);var r=0;return n&_d.SkipSelf?r|=1:n&_d.Self&&(r|=4),oC(this,{token:t,tokenKey:AS(t),flags:r},e)},Object.defineProperty(t.prototype,"instance",{get:function(){return this.get(this._moduleType)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentFactoryResolver",{get:function(){return this.get(qm)},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){if(this._destroyed)throw new Error("The ng module "+yd(this.instance.constructor)+" has already been destroyed.");this._destroyed=!0,function t(e,n){for(var r=e._def,i=new Set,o=0;o<r.providers.length;o++)if(131072&r.providers[o].flags){var s=e._providers[o];if(s&&s!==eC){var a=s.ngOnDestroy;"function"!=typeof a||i.has(s)||(a.apply(s),i.add(s))}}}(this),this._destroyListeners.forEach(function(t){return t()})},t.prototype.onDestroy=function(t){this._destroyListeners.push(t)},t}(),TC=AS(zm),PC=AS(Gm),AC=AS(Km),NC=AS(RE),kC=AS(bb),OC=AS(jE),IC=AS(Sy),MC=AS(wy);
|
|
1455
1455
|
/**
|
|
1456
1456
|
* @license
|
|
1457
1457
|
* Copyright Google Inc. All Rights Reserved.
|
|
1458
1458
|
*
|
|
1459
1459
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1460
1460
|
* found in the LICENSE file at https://angular.io/license
|
|
1461
|
-
*/function
|
|
1461
|
+
*/function DC(t,e){return FC(t,e)}function RC(t,e){for(var n=t;n.parent&&!FS(n);)n=n.parent;return VC(n.parent,LS(n),!0,e.provider.value,e.provider.deps)}function LC(t,e){var n,r=VC(t,e.parent,(32768&e.flags)>0,e.provider.value,e.provider.deps);if(e.outputs.length)for(var i=0;i<e.outputs.length;i++){var o=e.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(jC(t,e.parent.nodeIndex,o.eventName));t.disposables[e.outputIndex+i]=a.unsubscribe.bind(a)}return r}function jC(t,e,n){return function(r){return DS(t,e,n,r)}}function FC(t,e){var n=(8192&e.flags)>0,r=e.provider;switch(201347067&e.flags){case 512:return VC(t,e.parent,n,r.value,r.deps);case 1024:return function i(t,e,n,r,o){var s=o.length;switch(s){case 0:return r();case 1:return r(qC(t,e,n,o[0]));case 2:return r(qC(t,e,n,o[0]),qC(t,e,n,o[1]));case 3:return r(qC(t,e,n,o[0]),qC(t,e,n,o[1]),qC(t,e,n,o[2]));default:for(var a=Array(s),u=0;u<s;u++)a[u]=qC(t,e,n,o[u]);return r.apply(void 0,f(a))}}(t,e.parent,n,r.value,r.deps);case 2048:return qC(t,e.parent,n,r.deps[0]);case 256:return r.value}}function VC(t,e,n,r,i){var o=i.length;switch(o){case 0:return new r;case 1:return new r(qC(t,e,n,i[0]));case 2:return new r(qC(t,e,n,i[0]),qC(t,e,n,i[1]));case 3:return new r(qC(t,e,n,i[0]),qC(t,e,n,i[1]),qC(t,e,n,i[2]));default:for(var s=new Array(o),a=0;a<o;a++)s[a]=qC(t,e,n,i[a]);return new(r.bind.apply(r,f([void 0],s)))}}var BC,HC={};function qC(t,e,n,r,i){if(void 0===i&&(i=Sy.THROW_IF_NOT_FOUND),8&r.flags)return r.token;var o=t;2&r.flags&&(i=null);var s=r.tokenKey;s===OC&&(n=!(!e||!e.element.componentView)),e&&1&r.flags&&(n=!1,e=e.parent);for(var a=t;a;){if(e)switch(s){case TC:return wC(UC(a,e,n));case PC:return UC(a,e,n).renderer;case AC:return new Km(gS(a,e.nodeIndex).renderElement);case NC:return gS(a,e.nodeIndex).viewContainer;case kC:if(e.element.template)return gS(a,e.nodeIndex).template;break;case OC:return yC(UC(a,e,n));case IC:case MC:return bC(a,e);default:var u=(n?e.element.allProviders:e.element.publicProviders)[s];if(u){var c=_S(a,u.nodeIndex);return c||(c={instance:FC(a,u)},a.nodes[u.nodeIndex]=c),c.instance}}n=FS(a),e=LS(a),a=a.parent,4&r.flags&&(a=null)}var l=o.root.injector.get(r.token,HC);return l!==HC||i===HC?l:o.root.ngModule.injector.get(r.token,i)}function UC(t,e,n){var r;if(n)r=gS(t,e.nodeIndex).componentView;else for(r=t;r.parent&&!FS(r);)r=r.parent;return r}function KC(t,e,n,r,i,o){if(32768&n.flags){var s=gS(t,n.parent.nodeIndex).componentView;2&s.def.flags&&(s.state|=8)}if(e.instance[n.bindings[r].name]=i,524288&n.flags){o=o||{};var a=ov.unwrap(t.oldValues[n.bindingIndex+r]);o[n.bindings[r].nonMinifiedName]=new sv(a,i,0!=(2&t.state))}return t.oldValues[n.bindingIndex+r]=i,o}function WC(t,e){if(t.def.nodeFlags&e)for(var n=t.def.nodes,r=0,i=0;i<n.length;i++){var o=n[i],s=o.parent;for(!s&&o.flags&e&&QC(t,i,o.flags&e,r++),0==(o.childFlags&e)&&(i+=o.childCount);s&&1&s.flags&&i===s.nodeIndex+s.childCount;)s.directChildFlags&e&&(r=zC(t,s,e,r)),s=s.parent}}function zC(t,e,n,r){for(var i=e.nodeIndex+1;i<=e.nodeIndex+e.childCount;i++){var o=t.def.nodes[i];o.flags&n&&QC(t,i,o.flags&n,r++),i+=o.childCount}return r}function QC(t,e,n,r){var i=_S(t,e);if(i){var o=i.instance;o&&(wS.setCurrentNode(t,e),1048576&n&&yS(t,512,r)&&o.ngAfterContentInit(),2097152&n&&o.ngAfterContentChecked(),4194304&n&&yS(t,768,r)&&o.ngAfterViewInit(),8388608&n&&o.ngAfterViewChecked(),131072&n&&o.ngOnDestroy())}}
|
|
1462
1462
|
/**
|
|
1463
1463
|
* @license
|
|
1464
1464
|
* Copyright Google Inc. All Rights Reserved.
|
|
1465
1465
|
*
|
|
1466
1466
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1467
1467
|
* found in the LICENSE file at https://angular.io/license
|
|
1468
|
-
*/function
|
|
1468
|
+
*/function GC(t){for(var e=t.def.nodeMatchedQueries;t.parent&&VS(t);){var n=t.parentNodeDef;t=t.parent;for(var r=n.nodeIndex+n.childCount,i=0;i<=r;i++)67108864&(o=t.def.nodes[i]).flags&&536870912&o.flags&&(o.query.filterId&e)===o.query.filterId&&xS(t,i).setDirty(),!(1&o.flags&&i+o.childCount<n.nodeIndex)&&67108864&o.childFlags&&536870912&o.childFlags||(i+=o.childCount)}if(134217728&t.def.nodeFlags)for(i=0;i<t.def.nodes.length;i++){var o;134217728&(o=t.def.nodes[i]).flags&&536870912&o.flags&&xS(t,i).setDirty(),i+=o.childCount}}function XC(t,e){var n=xS(t,e.nodeIndex);if(n.dirty){var r,i=void 0;if(67108864&e.flags){var o=e.parent.parent;i=$C(t,o.nodeIndex,o.nodeIndex+o.childCount,e.query,[]),r=_S(t,e.parent.nodeIndex).instance}else 134217728&e.flags&&(i=$C(t,0,t.def.nodes.length-1,e.query,[]),r=t.component);n.reset(i);for(var s=e.query.bindings,a=!1,u=0;u<s.length;u++){var c=s[u],l=void 0;switch(c.bindingType){case 0:l=n.first;break;case 1:l=n,a=!0}r[c.propName]=l}a&&n.notifyOnChanges()}}function $C(t,e,n,r,i){for(var o=e;o<=n;o++){var s=t.def.nodes[o],a=s.matchedQueries[r.id];if(null!=a&&i.push(YC(t,s,a)),1&s.flags&&s.element.template&&(s.element.template.nodeMatchedQueries&r.filterId)===r.filterId){var u=gS(t,o);if((s.childMatchedQueries&r.filterId)===r.filterId&&($C(t,o+1,o+s.childCount,r,i),o+=s.childCount),16777216&s.flags)for(var c=u.viewContainer._embeddedViews,l=0;l<c.length;l++){var p=c[l],h=RS(p);h&&h===u&&$C(p,0,p.def.nodes.length-1,r,i)}var f=u.template._projectedViews;if(f)for(l=0;l<f.length;l++){var d=f[l];$C(d,0,d.def.nodes.length-1,r,i)}}(s.childMatchedQueries&r.filterId)!==r.filterId&&(o+=s.childCount)}return i}function YC(t,e,n){if(null!=n)switch(n){case 1:return gS(t,e.nodeIndex).renderElement;case 0:return new Km(gS(t,e.nodeIndex).renderElement);case 2:return gS(t,e.nodeIndex).template;case 3:return gS(t,e.nodeIndex).viewContainer;case 4:return _S(t,e.nodeIndex).instance}}
|
|
1469
1469
|
/**
|
|
1470
1470
|
* @license
|
|
1471
1471
|
* Copyright Google Inc. All Rights Reserved.
|
|
1472
1472
|
*
|
|
1473
1473
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1474
1474
|
* found in the LICENSE file at https://angular.io/license
|
|
1475
|
-
*/function
|
|
1475
|
+
*/function ZC(t,e,n){var r=HS(t,e,n);r&&zS(t,n.ngContent.index,1,r,null,void 0)}
|
|
1476
1476
|
/**
|
|
1477
1477
|
* @license
|
|
1478
1478
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1487,21 +1487,21 @@ return function r(t,e,n,i){var o=e.viewContainer._embeddedViews;null!==n&&void 0
|
|
|
1487
1487
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1488
1488
|
* found in the LICENSE file at https://angular.io/license
|
|
1489
1489
|
*/
|
|
1490
|
-
function
|
|
1490
|
+
function JC(t,e,n){var r,i=t.renderer;r=i.createText(n.text.prefix);var o=HS(t,e,n);return o&&i.appendChild(o,r),{renderText:r}}function tT(t,e){return(null!=t?t.toString():"")+e.suffix}
|
|
1491
1491
|
/**
|
|
1492
1492
|
* @license
|
|
1493
1493
|
* Copyright Google Inc. All Rights Reserved.
|
|
1494
1494
|
*
|
|
1495
1495
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1496
1496
|
* found in the LICENSE file at https://angular.io/license
|
|
1497
|
-
*/function
|
|
1497
|
+
*/function eT(t,e,n,r){var i=iT(t.root,t.renderer,t,e,n);return oT(i,t.component,r),sT(i),i}function nT(t,e,n){var r=iT(t,t.renderer,null,null,e);return oT(r,n,n),sT(r),r}function rT(t,e,n,r){var i,o=e.element.componentRendererType;return i=o?t.root.rendererFactory.createRenderer(r,o):t.root.renderer,iT(t.root,i,t,e.element.componentProvider,n)}function iT(t,e,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:t,renderer:e,oldValues:new Array(i.bindingCount),disposables:s,initIndex:-1}}function oT(t,e,n){t.component=e,t.context=n}function sT(t){var e;FS(t)&&(e=gS(t.parent,t.parentNodeDef.parent.nodeIndex).renderElement);for(var n=t.def,r=t.nodes,i=0;i<n.nodes.length;i++){var o=n.nodes[i];wS.setCurrentNode(t,i);var s=void 0;switch(201347067&o.flags){case 1:var a=YS(t,e,o),u=void 0;if(33554432&o.flags){var c=US(o.element.componentView);u=wS.createComponentView(t,o,c,a)}ZS(t,u,o,a),s={renderElement:a,componentView:u,viewContainer:null,template:o.element.template?gC(t,o):void 0},16777216&o.flags&&(s.viewContainer=dC(t,o,s));break;case 2:s=JC(t,e,o);break;case 512:case 1024:case 2048:case 256:(s=r[i])||4096&o.flags||(s={instance:DC(t,o)});break;case 16:s={instance:RC(t,o)};break;case 16384:(s=r[i])||(s={instance:LC(t,o)}),32768&o.flags&&oT(gS(t,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 OE;break;case 8:ZC(t,e,o),s=void 0}r[i]=s}dT(t,BC.CreateViewNodes),gT(t,201326592,268435456,0)}function aT(t){lT(t),wS.updateDirectives(t,1),vT(t,BC.CheckNoChanges),wS.updateRenderer(t,1),dT(t,BC.CheckNoChanges),t.state&=-97}function uT(t){1&t.state?(t.state&=-2,t.state|=2):t.state&=-3,vS(t,0,256),lT(t),wS.updateDirectives(t,0),vT(t,BC.CheckAndUpdate),gT(t,67108864,536870912,0);var e=vS(t,256,512);WC(t,2097152|(e?1048576:0)),wS.updateRenderer(t,0),dT(t,BC.CheckAndUpdate),gT(t,134217728,536870912,0),WC(t,8388608|((e=vS(t,512,768))?4194304:0)),2&t.def.flags&&(t.state&=-9),t.state&=-97,vS(t,768,1024)}function cT(t,e,n,r,i,o,s,a,u,c,l,p,h){return 0===n?function d(t,e,n,r,i,o,s,a,u,c,l,p){switch(201347067&e.flags){case 1:return function h(t,e,n,r,i,o,s,a,u,c,l,p){var h=e.bindings.length,f=!1;return h>0&&tC(t,e,0,n)&&(f=!0),h>1&&tC(t,e,1,r)&&(f=!0),h>2&&tC(t,e,2,i)&&(f=!0),h>3&&tC(t,e,3,o)&&(f=!0),h>4&&tC(t,e,4,s)&&(f=!0),h>5&&tC(t,e,5,a)&&(f=!0),h>6&&tC(t,e,6,u)&&(f=!0),h>7&&tC(t,e,7,c)&&(f=!0),h>8&&tC(t,e,8,l)&&(f=!0),h>9&&tC(t,e,9,p)&&(f=!0),f}(t,e,n,r,i,o,s,a,u,c,l,p);case 2:return function f(t,e,n,r,i,o,s,a,u,c,l,p){var h=!1,f=e.bindings,d=f.length;if(d>0&&kS(t,e,0,n)&&(h=!0),d>1&&kS(t,e,1,r)&&(h=!0),d>2&&kS(t,e,2,i)&&(h=!0),d>3&&kS(t,e,3,o)&&(h=!0),d>4&&kS(t,e,4,s)&&(h=!0),d>5&&kS(t,e,5,a)&&(h=!0),d>6&&kS(t,e,6,u)&&(h=!0),d>7&&kS(t,e,7,c)&&(h=!0),d>8&&kS(t,e,8,l)&&(h=!0),d>9&&kS(t,e,9,p)&&(h=!0),h){var v=e.text.prefix;d>0&&(v+=tT(n,f[0])),d>1&&(v+=tT(r,f[1])),d>2&&(v+=tT(i,f[2])),d>3&&(v+=tT(o,f[3])),d>4&&(v+=tT(s,f[4])),d>5&&(v+=tT(a,f[5])),d>6&&(v+=tT(u,f[6])),d>7&&(v+=tT(c,f[7])),d>8&&(v+=tT(l,f[8])),d>9&&(v+=tT(p,f[9]));var y=mS(t,e.nodeIndex).renderText;t.renderer.setValue(y,v)}return h}(t,e,n,r,i,o,s,a,u,c,l,p);case 16384:return function d(t,e,n,r,i,o,s,a,u,c,l,p){var h=_S(t,e.nodeIndex),f=h.instance,d=!1,v=void 0,y=e.bindings.length;return y>0&&NS(t,e,0,n)&&(d=!0,v=KC(t,h,e,0,n,v)),y>1&&NS(t,e,1,r)&&(d=!0,v=KC(t,h,e,1,r,v)),y>2&&NS(t,e,2,i)&&(d=!0,v=KC(t,h,e,2,i,v)),y>3&&NS(t,e,3,o)&&(d=!0,v=KC(t,h,e,3,o,v)),y>4&&NS(t,e,4,s)&&(d=!0,v=KC(t,h,e,4,s,v)),y>5&&NS(t,e,5,a)&&(d=!0,v=KC(t,h,e,5,a,v)),y>6&&NS(t,e,6,u)&&(d=!0,v=KC(t,h,e,6,u,v)),y>7&&NS(t,e,7,c)&&(d=!0,v=KC(t,h,e,7,c,v)),y>8&&NS(t,e,8,l)&&(d=!0,v=KC(t,h,e,8,l,v)),y>9&&NS(t,e,9,p)&&(d=!0,v=KC(t,h,e,9,p,v)),v&&f.ngOnChanges(v),65536&e.flags&&yS(t,256,e.nodeIndex)&&f.ngOnInit(),262144&e.flags&&f.ngDoCheck(),d}(t,e,n,r,i,o,s,a,u,c,l,p);case 32:case 64:case 128:return function v(t,e,n,r,i,o,s,a,u,c,l,p){var h=e.bindings,f=!1,d=h.length;if(d>0&&kS(t,e,0,n)&&(f=!0),d>1&&kS(t,e,1,r)&&(f=!0),d>2&&kS(t,e,2,i)&&(f=!0),d>3&&kS(t,e,3,o)&&(f=!0),d>4&&kS(t,e,4,s)&&(f=!0),d>5&&kS(t,e,5,a)&&(f=!0),d>6&&kS(t,e,6,u)&&(f=!0),d>7&&kS(t,e,7,c)&&(f=!0),d>8&&kS(t,e,8,l)&&(f=!0),d>9&&kS(t,e,9,p)&&(f=!0),f){var v=bS(t,e.nodeIndex),y=void 0;switch(201347067&e.flags){case 32:y=new Array(h.length),d>0&&(y[0]=n),d>1&&(y[1]=r),d>2&&(y[2]=i),d>3&&(y[3]=o),d>4&&(y[4]=s),d>5&&(y[5]=a),d>6&&(y[6]=u),d>7&&(y[7]=c),d>8&&(y[8]=l),d>9&&(y[9]=p);break;case 64:y={},d>0&&(y[h[0].name]=n),d>1&&(y[h[1].name]=r),d>2&&(y[h[2].name]=i),d>3&&(y[h[3].name]=o),d>4&&(y[h[4].name]=s),d>5&&(y[h[5].name]=a),d>6&&(y[h[6].name]=u),d>7&&(y[h[7].name]=c),d>8&&(y[h[8].name]=l),d>9&&(y[h[9].name]=p);break;case 128:var m=n;switch(d){case 1:y=m.transform(n);break;case 2:y=m.transform(r);break;case 3:y=m.transform(r,i);break;case 4:y=m.transform(r,i,o);break;case 5:y=m.transform(r,i,o,s);break;case 6:y=m.transform(r,i,o,s,a);break;case 7:y=m.transform(r,i,o,s,a,u);break;case 8:y=m.transform(r,i,o,s,a,u,c);break;case 9:y=m.transform(r,i,o,s,a,u,c,l);break;case 10:y=m.transform(r,i,o,s,a,u,c,l,p)}}v.value=y}return f}(t,e,n,r,i,o,s,a,u,c,l,p);default:throw"unreachable"}}(t,e,r,i,o,s,a,u,c,l,p,h):function v(t,e,n){switch(201347067&e.flags){case 1:return function r(t,e,n){for(var r=!1,i=0;i<n.length;i++)tC(t,e,i,n[i])&&(r=!0);return r}(t,e,n);case 2:return function i(t,e,n){for(var r=e.bindings,i=!1,o=0;o<n.length;o++)kS(t,e,o,n[o])&&(i=!0);if(i){var s="";for(o=0;o<n.length;o++)s+=tT(n[o],r[o]);s=e.text.prefix+s;var a=mS(t,e.nodeIndex).renderText;t.renderer.setValue(a,s)}return i}(t,e,n);case 16384:return function o(t,e,n){for(var r=_S(t,e.nodeIndex),i=r.instance,o=!1,s=void 0,a=0;a<n.length;a++)NS(t,e,a,n[a])&&(o=!0,s=KC(t,r,e,a,n[a],s));return s&&i.ngOnChanges(s),65536&e.flags&&yS(t,256,e.nodeIndex)&&i.ngOnInit(),262144&e.flags&&i.ngDoCheck(),o}(t,e,n);case 32:case 64:case 128:return function s(t,e,n){for(var r=e.bindings,i=!1,o=0;o<n.length;o++)kS(t,e,o,n[o])&&(i=!0);if(i){var s=bS(t,e.nodeIndex),a=void 0;switch(201347067&e.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],c=n.slice(1);a=u.transform.apply(u,f(c))}s.value=a}return i}(t,e,n);default:throw"unreachable"}}(t,e,r)}function lT(t){var e=t.def;if(4&e.nodeFlags)for(var n=0;n<e.nodes.length;n++){var r=e.nodes[n];if(4&r.flags){var i=gS(t,n).template._projectedViews;if(i)for(var o=0;o<i.length;o++){var s=i[o];s.state|=32,MS(s,t)}}else 0==(4&r.childFlags)&&(n+=r.childCount)}}function pT(t,e,n,r,i,o,s,a,u,c,l,p,h){return 0===n?function f(t,e,n,r,i,o,s,a,u,c,l,p){var h=e.bindings.length;h>0&&OS(t,e,0,n),h>1&&OS(t,e,1,r),h>2&&OS(t,e,2,i),h>3&&OS(t,e,3,o),h>4&&OS(t,e,4,s),h>5&&OS(t,e,5,a),h>6&&OS(t,e,6,u),h>7&&OS(t,e,7,c),h>8&&OS(t,e,8,l),h>9&&OS(t,e,9,p)}(t,e,r,i,o,s,a,u,c,l,p,h):function d(t,e,n){for(var r=0;r<n.length;r++)OS(t,e,r,n[r])}(t,e,r),!1}function hT(t,e){if(xS(t,e.nodeIndex).dirty)throw ES(wS.createDebugContext(t,e.nodeIndex),"Query "+e.query.id+" not dirty","Query "+e.query.id+" dirty",0!=(1&t.state))}function fT(t){if(!(128&t.state)){if(vT(t,BC.Destroy),dT(t,BC.Destroy),WC(t,131072),t.disposables)for(var e=0;e<t.disposables.length;e++)t.disposables[e]();!function n(t){if(16&t.state){var e=RS(t);if(e){var n=e.template._projectedViews;n&&(pC(n,n.indexOf(t)),wS.dirtyParentQueries(t))}}}(t),t.renderer.destroyNode&&function r(t){for(var e=t.def.nodes.length,n=0;n<e;n++){var r=t.def.nodes[n];1&r.flags?t.renderer.destroyNode(gS(t,n).renderElement):2&r.flags?t.renderer.destroyNode(mS(t,n).renderText):(67108864&r.flags||134217728&r.flags)&&xS(t,n).destroy()}}(t),FS(t)&&t.renderer.destroy(),t.state|=128}}function dT(t,e){var n=t.def;if(33554432&n.nodeFlags)for(var r=0;r<n.nodes.length;r++){var i=n.nodes[r];33554432&i.flags?yT(gS(t,r).componentView,e):0==(33554432&i.childFlags)&&(r+=i.childCount)}}function vT(t,e){var n=t.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=gS(t,r).viewContainer._embeddedViews,s=0;s<o.length;s++)yT(o[s],e);else 0==(16777216&i.childFlags)&&(r+=i.childCount)}}function yT(t,e){var n=t.state;switch(e){case BC.CheckNoChanges:0==(128&n)&&(12==(12&n)?aT(t):64&n&&mT(t,BC.CheckNoChangesProjectedViews));break;case BC.CheckNoChangesProjectedViews:0==(128&n)&&(32&n?aT(t):64&n&&mT(t,e));break;case BC.CheckAndUpdate:0==(128&n)&&(12==(12&n)?uT(t):64&n&&mT(t,BC.CheckAndUpdateProjectedViews));break;case BC.CheckAndUpdateProjectedViews:0==(128&n)&&(32&n?uT(t):64&n&&mT(t,e));break;case BC.Destroy:fT(t);break;case BC.CreateViewNodes:sT(t)}}function mT(t,e){vT(t,e),dT(t,e)}function gT(t,e,n,r){if(t.def.nodeFlags&e&&t.def.nodeFlags&n)for(var i=t.def.nodes.length,o=0;o<i;o++){var s=t.def.nodes[o];if(s.flags&e&&s.flags&n)switch(wS.setCurrentNode(t,s.nodeIndex),r){case 0:XC(t,s);break;case 1:hT(t,s)}s.childFlags&e&&s.childFlags&n||(o+=s.childCount)}}
|
|
1498
1498
|
/**
|
|
1499
1499
|
* @license
|
|
1500
1500
|
* Copyright Google Inc. All Rights Reserved.
|
|
1501
1501
|
*
|
|
1502
1502
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1503
1503
|
* found in the LICENSE file at https://angular.io/license
|
|
1504
|
-
*/!function(t){t[t.CreateViewNodes=0]="CreateViewNodes",t[t.CheckNoChanges=1]="CheckNoChanges",t[t.CheckNoChangesProjectedViews=2]="CheckNoChangesProjectedViews",t[t.CheckAndUpdate=3]="CheckAndUpdate",t[t.CheckAndUpdateProjectedViews=4]="CheckAndUpdateProjectedViews",t[t.Destroy=5]="Destroy"}(VC||(VC={}));var gT=!1;function _T(t,e,n,r,i,o){return eT(xT(t,i,i.injector.get(zm),e,n),r,o)}function bT(t,e,n,r,i,o){var s=i.injector.get(zm),a=xT(t,i,new eP(s),e,n),u=DT(r);return JT(CT.create,eT,null,[a,u,o])}function xT(t,e,n,r,i){var o=e.injector.get(Mb),s=e.injector.get(ax);return{ngModule:e,injector:t,projectableNodes:r,selectorOrNode:i,sanitizer:o,rendererFactory:n,renderer:n.createRenderer(null,null),errorHandler:s}}function wT(t,e,n,r){var i=DT(n);return JT(CT.create,tT,null,[t,e,i,r])}function ET(t,e,n,r){return n=OT.get(e.element.componentProvider.provider.token)||DT(n),JT(CT.create,nT,null,[t,e,n,r])}function ST(t,e,n,r){return EC(t,e,n,function i(t){var e=function n(t){var e=!1,n=!1;return 0===NT.size?{hasOverrides:e,hasDeprecatedOverrides:n}:(t.providers.forEach(function(t){var r=NT.get(t.token);3840&t.flags&&r&&(e=!0,n=n||r.deprecatedBehavior)}),t.modules.forEach(function(t){kT.forEach(function(r,i){Gf(i).providedIn===t&&(e=!0,n=n||r.deprecatedBehavior)})}),{hasOverrides:e,hasDeprecatedOverrides:n})}(t),r=e.hasDeprecatedOverrides;return e.hasOverrides?(function i(t){for(var e=0;e<t.providers.length;e++){var n=t.providers[e];r&&(n.flags|=4096);var i=NT.get(n.token);i&&(n.flags=-3841&n.flags|i.flags,n.deps=VS(i.deps),n.value=i.value)}if(kT.size>0){var o=new Set(t.modules);kT.forEach(function(e,n){if(o.has(Gf(n).providedIn)){var i={token:n,flags:e.flags|(r?4096:0),deps:VS(e.deps),value:e.value,index:t.providers.length};t.providers.push(i),t.providersByKey[PS(n)]=i}})}}(t=t.factory(function(){return CS})),t):t}(r))}var CT,TT,PT,AT,NT=new Map,kT=new Map,OT=new Map;function IT(t){var e;NT.set(t.token,t),"function"==typeof t.token&&(e=Gf(t.token))&&"function"==typeof e.providedIn&&kT.set(t.token,t)}function MT(t,e){var n=qS(qS(function r(t){return t.viewDefFactory}(e)).nodes[0].element.componentView);OT.set(t,n)}function RT(){NT.clear(),kT.clear(),OT.clear()}function DT(t){if(0===NT.size)return t;var e=function n(t){for(var e=[],n=null,r=0;r<t.nodes.length;r++){var i=t.nodes[r];1&i.flags&&(n=i),n&&3840&i.flags&&NT.has(i.provider.token)&&(e.push(n.nodeIndex),n=null)}return e}(t);if(0===e.length)return t;t=t.factory(function(){return CS});for(var r=0;r<e.length;r++)i(t,e[r]);return t;function i(t,e){for(var n=e+1;n<t.nodes.length;n++){var r=t.nodes[n];if(1&r.flags)return;if(3840&r.flags){var i=r.provider,o=NT.get(i.token);o&&(r.flags=-3841&r.flags|o.flags,i.deps=VS(o.deps),i.value=o.value)}}}}function LT(t,e,n,r,i,o,s,a,u,c,l,p,h){var f=t.def.nodes[e];return uT(t,f,n,r,i,o,s,a,u,c,l,p,h),224&f.flags?_S(t,e).value:void 0}function jT(t,e,n,r,i,o,s,a,u,c,l,p,h){var f=t.def.nodes[e];return lT(t,f,n,r,i,o,s,a,u,c,l,p,h),224&f.flags?_S(t,e).value:void 0}function FT(t){return JT(CT.detectChanges,aT,null,[t])}function VT(t){return JT(CT.checkNoChanges,sT,null,[t])}function BT(t){return JT(CT.destroy,hT,null,[t])}function HT(t,e){PT=t,AT=e}function qT(t,e,n,r){return HT(t,e),JT(CT.handleEvent,t.def.handleEvent,null,[t,e,n,r])}function UT(t,e){if(128&t.state)throw SS(CT[TT]);return HT(t,XT(t,0)),t.def.updateDirectives(function n(t,r,i){for(var o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];var a=t.def.nodes[r];return 0===e?WT(t,a,i,o):zT(t,a,i,o),16384&a.flags&&HT(t,XT(t,r)),224&a.flags?_S(t,a.nodeIndex).value:void 0},t)}function KT(t,e){if(128&t.state)throw SS(CT[TT]);return HT(t,$T(t,0)),t.def.updateRenderer(function n(t,r,i){for(var o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];var a=t.def.nodes[r];return 0===e?WT(t,a,i,o):zT(t,a,i,o),3&a.flags&&HT(t,$T(t,r)),224&a.flags?_S(t,a.nodeIndex).value:void 0},t)}function WT(t,e,n,r){if(uT.apply(void 0,f([t,e,n],r))){var i=1===n?r[0]:r;if(16384&e.flags){for(var o={},s=0;s<e.bindings.length;s++){var a=e.bindings[s],u=i[s];8&a.flags&&(o[(d=a.nonMinifiedName,"ng-reflect-"+(d=function c(t){return t.replace(QT,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"-"+t[1].toLowerCase()})}(d.replace(/[$@]/g,"_"))))]=GT(u))}var l=e.parent,p=mS(t,l.nodeIndex).renderElement;if(l.element.name)for(var h in o)null!=(u=o[h])?t.renderer.setAttribute(p,h,u):t.renderer.removeAttribute(p,h);else t.renderer.setValue(p,"bindings="+JSON.stringify(o,null,2))}}var d}function zT(t,e,n,r){lT.apply(void 0,f([t,e,n],r))}!function(t){t[t.create=0]="create",t[t.detectChanges=1]="detectChanges",t[t.checkNoChanges=2]="checkNoChanges",t[t.destroy=3]="destroy",t[t.handleEvent=4]="handleEvent"}(CT||(CT={}));var QT=/([A-Z])/g;function GT(t){try{return null!=t?t.toString().slice(0,30):t}catch(t){return"[ERROR] Exception while trying to serialize the value"}}function XT(t,e){for(var n=e;n<t.def.nodes.length;n++){var r=t.def.nodes[n];if(16384&r.flags&&r.bindings&&r.bindings.length)return n}return null}function $T(t,e){for(var n=e;n<t.def.nodes.length;n++){var r=t.def.nodes[n];if(3&r.flags&&r.bindings&&r.bindings.length)return n}return null}var YT=function(){function t(t,e){this.view=t,this.nodeIndex=e,null==e&&(this.nodeIndex=e=0),this.nodeDef=t.def.nodes[e];for(var n=this.nodeDef,r=t;n&&0==(1&n.flags);)n=n.parent;if(!n)for(;!n&&r;)n=DS(r),r=r.parent;this.elDef=n,this.elView=r}return Object.defineProperty(t.prototype,"elOrCompView",{get:function(){return mS(this.elView,this.elDef.nodeIndex).componentView||this.view},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return _C(this.elView,this.elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){return this.elOrCompView.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this.elOrCompView.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){var t=[];if(this.elDef)for(var e=this.elDef.nodeIndex+1;e<=this.elDef.nodeIndex+this.elDef.childCount;e++){var n=this.elView.def.nodes[e];20224&n.flags&&t.push(n.provider.token),e+=n.childCount}return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){var t={};if(this.elDef){ZT(this.elView,this.elDef,t);for(var e=this.elDef.nodeIndex+1;e<=this.elDef.nodeIndex+this.elDef.childCount;e++){var n=this.elView.def.nodes[e];20224&n.flags&&ZT(this.elView,n,t),e+=n.childCount}}return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentRenderElement",{get:function(){var t=function e(t){for(;t&&!jS(t);)t=t.parent;return t.parent?mS(t.parent,DS(t).nodeIndex):null}(this.elOrCompView);return t?t.renderElement:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderNode",{get:function(){return 2&this.nodeDef.flags?LS(this.view,this.nodeDef):LS(this.elView,this.elDef)},enumerable:!0,configurable:!0}),t.prototype.logError=function(t){for(var e,n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];2&this.nodeDef.flags?(e=this.view.def,n=this.nodeDef.nodeIndex):(e=this.elView.def,n=this.elDef.nodeIndex);var o=function s(t,e){for(var n=-1,r=0;r<=e;r++)3&t.nodes[r].flags&&n++;return n}(e,n),a=-1;e.factory(function(){var e;return++a===o?(e=t.error).bind.apply(e,f([t],r)):CS}),a<o&&(t.error("Illegal state: the ViewDefinitionFactory did not call the logger!"),t.error.apply(t,f(r)))},t}();function ZT(t,e,n){for(var r in e.references)n[r]=$C(t,e,e.references[r])}function JT(t,e,n,r){var i=TT,o=PT,s=AT;try{TT=t;var a=e.apply(n,r);return PT=o,AT=s,TT=i,a}catch(t){if(function u(t){return!!ix(t)}(t)||!PT)throw t;throw function c(t,e){return t instanceof Error||(t=new Error(t.toString())),ES(t,e),t}(t,tP())}}function tP(){return PT?new YT(PT,AT):null}var eP=function(){function t(t){this.delegate=t}return t.prototype.createRenderer=function(t,e){return new nP(this.delegate.createRenderer(t,e))},t.prototype.begin=function(){this.delegate.begin&&this.delegate.begin()},t.prototype.end=function(){this.delegate.end&&this.delegate.end()},t.prototype.whenRenderingDone=function(){return this.delegate.whenRenderingDone?this.delegate.whenRenderingDone():Promise.resolve(null)},t}(),nP=function(){function t(t){this.delegate=t,this.debugContextFactory=tP,this.data=this.delegate.data}return t.prototype.createDebugContext=function(t){return this.debugContextFactory(t)},t.prototype.destroyNode=function(t){!function e(t){UE.delete(t.nativeNode)}(KE(t)),this.delegate.destroyNode&&this.delegate.destroyNode(t)},t.prototype.destroy=function(){this.delegate.destroy()},t.prototype.createElement=function(t,e){var n=this.delegate.createElement(t,e),r=this.createDebugContext(n);if(r){var i=new BE(n,null,r);i.name=t,WE(i)}return n},t.prototype.createComment=function(t){var e=this.delegate.createComment(t),n=this.createDebugContext(e);return n&&WE(new VE(e,null,n)),e},t.prototype.createText=function(t){var e=this.delegate.createText(t),n=this.createDebugContext(e);return n&&WE(new VE(e,null,n)),e},t.prototype.appendChild=function(t,e){var n=KE(t),r=KE(e);n&&r&&n instanceof BE&&n.addChild(r),this.delegate.appendChild(t,e)},t.prototype.insertBefore=function(t,e,n){var r=KE(t),i=KE(e),o=KE(n);r&&i&&r instanceof BE&&r.insertBefore(o,i),this.delegate.insertBefore(t,e,n)},t.prototype.removeChild=function(t,e){var n=KE(t),r=KE(e);n&&r&&n instanceof BE&&n.removeChild(r),this.delegate.removeChild(t,e)},t.prototype.selectRootElement=function(t,e){var n=this.delegate.selectRootElement(t,e),r=tP()||null;return r&&WE(new BE(n,null,r)),n},t.prototype.setAttribute=function(t,e,n,r){var i=KE(t);i&&i instanceof BE&&(i.attributes[r?r+":"+e:e]=n),this.delegate.setAttribute(t,e,n,r)},t.prototype.removeAttribute=function(t,e,n){var r=KE(t);r&&r instanceof BE&&(r.attributes[n?n+":"+e:e]=null),this.delegate.removeAttribute(t,e,n)},t.prototype.addClass=function(t,e){var n=KE(t);n&&n instanceof BE&&(n.classes[e]=!0),this.delegate.addClass(t,e)},t.prototype.removeClass=function(t,e){var n=KE(t);n&&n instanceof BE&&(n.classes[e]=!1),this.delegate.removeClass(t,e)},t.prototype.setStyle=function(t,e,n,r){var i=KE(t);i&&i instanceof BE&&(i.styles[e]=n),this.delegate.setStyle(t,e,n,r)},t.prototype.removeStyle=function(t,e,n){var r=KE(t);r&&r instanceof BE&&(r.styles[e]=null),this.delegate.removeStyle(t,e,n)},t.prototype.setProperty=function(t,e,n){var r=KE(t);r&&r instanceof BE&&(r.properties[e]=n),this.delegate.setProperty(t,e,n)},t.prototype.listen=function(t,e,n){if("string"!=typeof t){var r=KE(t);r&&r.listeners.push(new FE(e,n))}return this.delegate.listen(t,e,n)},t.prototype.parentNode=function(t){return this.delegate.parentNode(t)},t.prototype.nextSibling=function(t){return this.delegate.nextSibling(t)},t.prototype.setValue=function(t,e){return this.delegate.setValue(t,e)},t}();(function(t){function e(e,n,r){var i=t.call(this)||this;return i.moduleType=e,i._bootstrapComponents=n,i._ngModuleDefFactory=r,i}o(e,t),e.prototype.create=function(t){!function e(){if(!gT){gT=!0;var t=sg()?function e(){return{setCurrentNode:HT,createRootView:bT,createEmbeddedView:wT,createComponentView:ET,createNgModuleRef:ST,overrideProvider:IT,overrideComponentView:MT,clearOverrides:RT,checkAndUpdateView:FT,checkNoChangesView:VT,destroyView:BT,createDebugContext:function(t,e){return new YT(t,e)},handleEvent:qT,updateDirectives:UT,updateRenderer:KT}}():function n(){return{setCurrentNode:function(){},createRootView:_T,createEmbeddedView:tT,createComponentView:nT,createNgModuleRef:EC,overrideProvider:CS,overrideComponentView:CS,clearOverrides:CS,checkAndUpdateView:aT,checkNoChangesView:sT,destroyView:hT,createDebugContext:function(t,e){return new YT(t,e)},handleEvent:function(t,e,n,r){return t.def.handleEvent(t,e,n,r)},updateDirectives:function(t,e){return t.def.updateDirectives(0===e?LT:jT,t)},updateRenderer:function(t,e){return t.def.updateRenderer(0===e?LT:jT,t)}}}();xS.setCurrentNode=t.setCurrentNode,xS.createRootView=t.createRootView,xS.createEmbeddedView=t.createEmbeddedView,xS.createComponentView=t.createComponentView,xS.createNgModuleRef=t.createNgModuleRef,xS.overrideProvider=t.overrideProvider,xS.overrideComponentView=t.overrideComponentView,xS.clearOverrides=t.clearOverrides,xS.checkAndUpdateView=t.checkAndUpdateView,xS.checkNoChangesView=t.checkNoChangesView,xS.destroyView=t.destroyView,xS.resolveDep=HC,xS.createDebugContext=t.createDebugContext,xS.handleEvent=t.handleEvent,xS.updateDirectives=t.updateDirectives,xS.updateRenderer=t.updateRenderer,xS.dirtyParentQueries=QC}}();var n=
|
|
1504
|
+
*/!function(t){t[t.CreateViewNodes=0]="CreateViewNodes",t[t.CheckNoChanges=1]="CheckNoChanges",t[t.CheckNoChangesProjectedViews=2]="CheckNoChangesProjectedViews",t[t.CheckAndUpdate=3]="CheckAndUpdate",t[t.CheckAndUpdateProjectedViews=4]="CheckAndUpdateProjectedViews",t[t.Destroy=5]="Destroy"}(BC||(BC={}));var _T=!1;function bT(t,e,n,r,i,o){return nT(wT(t,i,i.injector.get(Qm),e,n),r,o)}function xT(t,e,n,r,i,o){var s=i.injector.get(Qm),a=wT(t,i,new nP(s),e,n),u=LT(r);return tP(TT.create,nT,null,[a,u,o])}function wT(t,e,n,r,i){var o=e.injector.get(Db),s=e.injector.get(ux);return{ngModule:e,injector:t,projectableNodes:r,selectorOrNode:i,sanitizer:o,rendererFactory:n,renderer:n.createRenderer(null,null),errorHandler:s}}function ET(t,e,n,r){var i=LT(n);return tP(TT.create,eT,null,[t,e,i,r])}function ST(t,e,n,r){return n=IT.get(e.element.componentProvider.provider.token)||LT(n),tP(TT.create,rT,null,[t,e,n,r])}function CT(t,e,n,r){return SC(t,e,n,function i(t){var e=function n(t){var e=!1,n=!1;return 0===kT.size?{hasOverrides:e,hasDeprecatedOverrides:n}:(t.providers.forEach(function(t){var r=kT.get(t.token);3840&t.flags&&r&&(e=!0,n=n||r.deprecatedBehavior)}),t.modules.forEach(function(t){OT.forEach(function(r,i){Gf(i).providedIn===t&&(e=!0,n=n||r.deprecatedBehavior)})}),{hasOverrides:e,hasDeprecatedOverrides:n})}(t),r=e.hasDeprecatedOverrides;return e.hasOverrides?(function i(t){for(var e=0;e<t.providers.length;e++){var n=t.providers[e];r&&(n.flags|=4096);var i=kT.get(n.token);i&&(n.flags=-3841&n.flags|i.flags,n.deps=BS(i.deps),n.value=i.value)}if(OT.size>0){var o=new Set(t.modules);OT.forEach(function(e,n){if(o.has(Gf(n).providedIn)){var i={token:n,flags:e.flags|(r?4096:0),deps:BS(e.deps),value:e.value,index:t.providers.length};t.providers.push(i),t.providersByKey[AS(n)]=i}})}}(t=t.factory(function(){return TS})),t):t}(r))}var TT,PT,AT,NT,kT=new Map,OT=new Map,IT=new Map;function MT(t){var e;kT.set(t.token,t),"function"==typeof t.token&&(e=Gf(t.token))&&"function"==typeof e.providedIn&&OT.set(t.token,t)}function DT(t,e){var n=US(US(function r(t){return t.viewDefFactory}(e)).nodes[0].element.componentView);IT.set(t,n)}function RT(){kT.clear(),OT.clear(),IT.clear()}function LT(t){if(0===kT.size)return t;var e=function n(t){for(var e=[],n=null,r=0;r<t.nodes.length;r++){var i=t.nodes[r];1&i.flags&&(n=i),n&&3840&i.flags&&kT.has(i.provider.token)&&(e.push(n.nodeIndex),n=null)}return e}(t);if(0===e.length)return t;t=t.factory(function(){return TS});for(var r=0;r<e.length;r++)i(t,e[r]);return t;function i(t,e){for(var n=e+1;n<t.nodes.length;n++){var r=t.nodes[n];if(1&r.flags)return;if(3840&r.flags){var i=r.provider,o=kT.get(i.token);o&&(r.flags=-3841&r.flags|o.flags,i.deps=BS(o.deps),i.value=o.value)}}}}function jT(t,e,n,r,i,o,s,a,u,c,l,p,h){var f=t.def.nodes[e];return cT(t,f,n,r,i,o,s,a,u,c,l,p,h),224&f.flags?bS(t,e).value:void 0}function FT(t,e,n,r,i,o,s,a,u,c,l,p,h){var f=t.def.nodes[e];return pT(t,f,n,r,i,o,s,a,u,c,l,p,h),224&f.flags?bS(t,e).value:void 0}function VT(t){return tP(TT.detectChanges,uT,null,[t])}function BT(t){return tP(TT.checkNoChanges,aT,null,[t])}function HT(t){return tP(TT.destroy,fT,null,[t])}function qT(t,e){AT=t,NT=e}function UT(t,e,n,r){return qT(t,e),tP(TT.handleEvent,t.def.handleEvent,null,[t,e,n,r])}function KT(t,e){if(128&t.state)throw CS(TT[PT]);return qT(t,$T(t,0)),t.def.updateDirectives(function n(t,r,i){for(var o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];var a=t.def.nodes[r];return 0===e?zT(t,a,i,o):QT(t,a,i,o),16384&a.flags&&qT(t,$T(t,r)),224&a.flags?bS(t,a.nodeIndex).value:void 0},t)}function WT(t,e){if(128&t.state)throw CS(TT[PT]);return qT(t,YT(t,0)),t.def.updateRenderer(function n(t,r,i){for(var o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];var a=t.def.nodes[r];return 0===e?zT(t,a,i,o):QT(t,a,i,o),3&a.flags&&qT(t,YT(t,r)),224&a.flags?bS(t,a.nodeIndex).value:void 0},t)}function zT(t,e,n,r){if(cT.apply(void 0,f([t,e,n],r))){var i=1===n?r[0]:r;if(16384&e.flags){for(var o={},s=0;s<e.bindings.length;s++){var a=e.bindings[s],u=i[s];8&a.flags&&(o[(d=a.nonMinifiedName,"ng-reflect-"+(d=function c(t){return t.replace(GT,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"-"+t[1].toLowerCase()})}(d.replace(/[$@]/g,"_"))))]=XT(u))}var l=e.parent,p=gS(t,l.nodeIndex).renderElement;if(l.element.name)for(var h in o)null!=(u=o[h])?t.renderer.setAttribute(p,h,u):t.renderer.removeAttribute(p,h);else t.renderer.setValue(p,"bindings="+JSON.stringify(o,null,2))}}var d}function QT(t,e,n,r){pT.apply(void 0,f([t,e,n],r))}!function(t){t[t.create=0]="create",t[t.detectChanges=1]="detectChanges",t[t.checkNoChanges=2]="checkNoChanges",t[t.destroy=3]="destroy",t[t.handleEvent=4]="handleEvent"}(TT||(TT={}));var GT=/([A-Z])/g;function XT(t){try{return null!=t?t.toString().slice(0,30):t}catch(t){return"[ERROR] Exception while trying to serialize the value"}}function $T(t,e){for(var n=e;n<t.def.nodes.length;n++){var r=t.def.nodes[n];if(16384&r.flags&&r.bindings&&r.bindings.length)return n}return null}function YT(t,e){for(var n=e;n<t.def.nodes.length;n++){var r=t.def.nodes[n];if(3&r.flags&&r.bindings&&r.bindings.length)return n}return null}var ZT=function(){function t(t,e){this.view=t,this.nodeIndex=e,null==e&&(this.nodeIndex=e=0),this.nodeDef=t.def.nodes[e];for(var n=this.nodeDef,r=t;n&&0==(1&n.flags);)n=n.parent;if(!n)for(;!n&&r;)n=LS(r),r=r.parent;this.elDef=n,this.elView=r}return Object.defineProperty(t.prototype,"elOrCompView",{get:function(){return gS(this.elView,this.elDef.nodeIndex).componentView||this.view},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return bC(this.elView,this.elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){return this.elOrCompView.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this.elOrCompView.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){var t=[];if(this.elDef)for(var e=this.elDef.nodeIndex+1;e<=this.elDef.nodeIndex+this.elDef.childCount;e++){var n=this.elView.def.nodes[e];20224&n.flags&&t.push(n.provider.token),e+=n.childCount}return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){var t={};if(this.elDef){JT(this.elView,this.elDef,t);for(var e=this.elDef.nodeIndex+1;e<=this.elDef.nodeIndex+this.elDef.childCount;e++){var n=this.elView.def.nodes[e];20224&n.flags&&JT(this.elView,n,t),e+=n.childCount}}return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentRenderElement",{get:function(){var t=function e(t){for(;t&&!FS(t);)t=t.parent;return t.parent?gS(t.parent,LS(t).nodeIndex):null}(this.elOrCompView);return t?t.renderElement:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderNode",{get:function(){return 2&this.nodeDef.flags?jS(this.view,this.nodeDef):jS(this.elView,this.elDef)},enumerable:!0,configurable:!0}),t.prototype.logError=function(t){for(var e,n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];2&this.nodeDef.flags?(e=this.view.def,n=this.nodeDef.nodeIndex):(e=this.elView.def,n=this.elDef.nodeIndex);var o=function s(t,e){for(var n=-1,r=0;r<=e;r++)3&t.nodes[r].flags&&n++;return n}(e,n),a=-1;e.factory(function(){var e;return++a===o?(e=t.error).bind.apply(e,f([t],r)):TS}),a<o&&(t.error("Illegal state: the ViewDefinitionFactory did not call the logger!"),t.error.apply(t,f(r)))},t}();function JT(t,e,n){for(var r in e.references)n[r]=YC(t,e,e.references[r])}function tP(t,e,n,r){var i=PT,o=AT,s=NT;try{PT=t;var a=e.apply(n,r);return AT=o,NT=s,PT=i,a}catch(t){if(function u(t){return!!ox(t)}(t)||!AT)throw t;throw function c(t,e){return t instanceof Error||(t=new Error(t.toString())),SS(t,e),t}(t,eP())}}function eP(){return AT?new ZT(AT,NT):null}var nP=function(){function t(t){this.delegate=t}return t.prototype.createRenderer=function(t,e){return new rP(this.delegate.createRenderer(t,e))},t.prototype.begin=function(){this.delegate.begin&&this.delegate.begin()},t.prototype.end=function(){this.delegate.end&&this.delegate.end()},t.prototype.whenRenderingDone=function(){return this.delegate.whenRenderingDone?this.delegate.whenRenderingDone():Promise.resolve(null)},t}(),rP=function(){function t(t){this.delegate=t,this.debugContextFactory=eP,this.data=this.delegate.data}return t.prototype.createDebugContext=function(t){return this.debugContextFactory(t)},t.prototype.destroyNode=function(t){!function e(t){KE.delete(t.nativeNode)}(WE(t)),this.delegate.destroyNode&&this.delegate.destroyNode(t)},t.prototype.destroy=function(){this.delegate.destroy()},t.prototype.createElement=function(t,e){var n=this.delegate.createElement(t,e),r=this.createDebugContext(n);if(r){var i=new HE(n,null,r);i.name=t,zE(i)}return n},t.prototype.createComment=function(t){var e=this.delegate.createComment(t),n=this.createDebugContext(e);return n&&zE(new BE(e,null,n)),e},t.prototype.createText=function(t){var e=this.delegate.createText(t),n=this.createDebugContext(e);return n&&zE(new BE(e,null,n)),e},t.prototype.appendChild=function(t,e){var n=WE(t),r=WE(e);n&&r&&n instanceof HE&&n.addChild(r),this.delegate.appendChild(t,e)},t.prototype.insertBefore=function(t,e,n){var r=WE(t),i=WE(e),o=WE(n);r&&i&&r instanceof HE&&r.insertBefore(o,i),this.delegate.insertBefore(t,e,n)},t.prototype.removeChild=function(t,e){var n=WE(t),r=WE(e);n&&r&&n instanceof HE&&n.removeChild(r),this.delegate.removeChild(t,e)},t.prototype.selectRootElement=function(t,e){var n=this.delegate.selectRootElement(t,e),r=eP()||null;return r&&zE(new HE(n,null,r)),n},t.prototype.setAttribute=function(t,e,n,r){var i=WE(t);i&&i instanceof HE&&(i.attributes[r?r+":"+e:e]=n),this.delegate.setAttribute(t,e,n,r)},t.prototype.removeAttribute=function(t,e,n){var r=WE(t);r&&r instanceof HE&&(r.attributes[n?n+":"+e:e]=null),this.delegate.removeAttribute(t,e,n)},t.prototype.addClass=function(t,e){var n=WE(t);n&&n instanceof HE&&(n.classes[e]=!0),this.delegate.addClass(t,e)},t.prototype.removeClass=function(t,e){var n=WE(t);n&&n instanceof HE&&(n.classes[e]=!1),this.delegate.removeClass(t,e)},t.prototype.setStyle=function(t,e,n,r){var i=WE(t);i&&i instanceof HE&&(i.styles[e]=n),this.delegate.setStyle(t,e,n,r)},t.prototype.removeStyle=function(t,e,n){var r=WE(t);r&&r instanceof HE&&(r.styles[e]=null),this.delegate.removeStyle(t,e,n)},t.prototype.setProperty=function(t,e,n){var r=WE(t);r&&r instanceof HE&&(r.properties[e]=n),this.delegate.setProperty(t,e,n)},t.prototype.listen=function(t,e,n){if("string"!=typeof t){var r=WE(t);r&&r.listeners.push(new VE(e,n))}return this.delegate.listen(t,e,n)},t.prototype.parentNode=function(t){return this.delegate.parentNode(t)},t.prototype.nextSibling=function(t){return this.delegate.nextSibling(t)},t.prototype.setValue=function(t,e){return this.delegate.setValue(t,e)},t}();(function(t){function e(e,n,r){var i=t.call(this)||this;return i.moduleType=e,i._bootstrapComponents=n,i._ngModuleDefFactory=r,i}o(e,t),e.prototype.create=function(t){!function e(){if(!_T){_T=!0;var t=ag()?function e(){return{setCurrentNode:qT,createRootView:xT,createEmbeddedView:ET,createComponentView:ST,createNgModuleRef:CT,overrideProvider:MT,overrideComponentView:DT,clearOverrides:RT,checkAndUpdateView:VT,checkNoChangesView:BT,destroyView:HT,createDebugContext:function(t,e){return new ZT(t,e)},handleEvent:UT,updateDirectives:KT,updateRenderer:WT}}():function n(){return{setCurrentNode:function(){},createRootView:bT,createEmbeddedView:eT,createComponentView:rT,createNgModuleRef:SC,overrideProvider:TS,overrideComponentView:TS,clearOverrides:TS,checkAndUpdateView:uT,checkNoChangesView:aT,destroyView:fT,createDebugContext:function(t,e){return new ZT(t,e)},handleEvent:function(t,e,n,r){return t.def.handleEvent(t,e,n,r)},updateDirectives:function(t,e){return t.def.updateDirectives(0===e?jT:FT,t)},updateRenderer:function(t,e){return t.def.updateRenderer(0===e?jT:FT,t)}}}();wS.setCurrentNode=t.setCurrentNode,wS.createRootView=t.createRootView,wS.createEmbeddedView=t.createEmbeddedView,wS.createComponentView=t.createComponentView,wS.createNgModuleRef=t.createNgModuleRef,wS.overrideProvider=t.overrideProvider,wS.overrideComponentView=t.overrideComponentView,wS.clearOverrides=t.clearOverrides,wS.checkAndUpdateView=t.checkAndUpdateView,wS.checkNoChangesView=t.checkNoChangesView,wS.destroyView=t.destroyView,wS.resolveDep=qC,wS.createDebugContext=t.createDebugContext,wS.handleEvent=t.handleEvent,wS.updateDirectives=t.updateDirectives,wS.updateRenderer=t.updateRenderer,wS.dirtyParentQueries=GC}}();var n=
|
|
1505
1505
|
/**
|
|
1506
1506
|
* @license
|
|
1507
1507
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1509,7 +1509,7 @@ function ZC(t,e,n){var r,i=t.renderer;r=i.createText(n.text.prefix);var o=BS(t,e
|
|
|
1509
1509
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1510
1510
|
* found in the LICENSE file at https://angular.io/license
|
|
1511
1511
|
*/
|
|
1512
|
-
function r(t){var e=Array.from(t.providers),n=Array.from(t.modules),r={};for(var i in t.providersByKey)r[i]=t.providersByKey[i];return{factory:t.factory,isRoot:t.isRoot,providers:e,modules:n,providersByKey:r}}(qS(this._ngModuleDefFactory));return xS.createNgModuleRef(this.moduleType,t||Ey.NULL,this._bootstrapComponents,n)}})(Vy),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}o(e,t),e.prototype.createRenderer=function(e,n){var r=t.prototype.createRenderer.call(this,e,n);return r.debugContextFactory=function(t){return new rP(t)},r}}(eP);var rP=function(){function t(t){this._nativeNode=t}return Object.defineProperty(t.prototype,"nodeIndex",{get:function(){return wm(this._nativeNode).nodeIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){return wm(this._nativeNode).lViewData},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return function t(e){var n=wm(e);return new xm(n.lViewData[jd].data[n.nodeIndex],n.lViewData)}(this._nativeNode)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){return function t(e){if(!(e instanceof Node))throw new Error("Expecting instance of DOM Node");var n=wm(e);return void 0===n.component&&(n.component=function r(t,e){var n=e[jd].data[t],r=hy(n);return 4096&n.flags?e[r]:null}(n.nodeIndex,n.lViewData)),n.component}(this._nativeNode)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){var t=wm(this._nativeNode),e=t.lViewData[jd].data[t.nodeIndex],n=4095&e.flags;if(n>0){var r=e.flags>>16;return this.view[jd].data.slice(r,r+n).map(function(t){return t.type})}return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){return function t(e){var n=wm(e);return void 0===n.localRefs&&(n.localRefs=function r(t,e){var n=t[jd].data[e];if(n&&n.localNames){for(var r={},i=0;i<n.localNames.length;i+=2){var o=n.localNames[i+1];r[n.localNames[i]]=-1===o?fv(n,t):t[o]}return r}return null}(n.lViewData,n.nodeIndex)),n.localRefs||{}}(this._nativeNode)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){throw new Error("Not implemented in ivy")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentRenderElement",{get:function(){throw new Error("Not implemented in ivy")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderNode",{get:function(){throw new Error("Not implemented in ivy")},enumerable:!0,configurable:!0}),t.prototype.logError=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];t.error.apply(t,f(e))},t}(),iP=function(){function t(t,e){var n=this;this.host=t,this.getProgram=e,this.metadataCollector=new Yh({verboseInvalidExpression:!0}),t.directoryExists&&(this.directoryExists=function(t){return n.host.directoryExists(t)})}return t.prototype.fileExists=function(t){return!!this.host.getScriptSnapshot(t)},t.prototype.readFile=function(t){var e=this.host.getScriptSnapshot(t);if(e)return e.getText(0,e.getLength())},t.prototype.getSourceFileMetadata=function(t){var e=this.getProgram().getSourceFile(t);return e?this.metadataCollector.getMetadata(e):void 0},t.prototype.cacheMetadata=function(t){return t.endsWith(".d.ts")},t}(),oP=function(){function t(t,e,n){this.options=n,this.metadataReaderCache=function i(){return{data:new Map}}(),this.hostAdapter=new iP(e,t),this.moduleResolutionCache=r.createModuleResolutionCache(e.getCurrentDirectory(),function(t){return t})}return t.prototype.getMetadataFor=function(t){return function e(t,n,r){var i=r&&r.data.get(t);if(i)return i;if(n.fileExists(t))if(tf.test(t))(i=function o(t,e){var n=e.replace(tf,".metadata.json");if(t.fileExists(n))try{var r=JSON.parse(t.readFile(n)),i=r?Array.isArray(r)?r:[r]:[];if(i.length){var o=i.reduce(function(t,e){return t.version>e.version?t:e});o.version<Nh&&i.push(ef(t,o,e))}return i}catch(t){throw console.error("Failed to read JSON file "+n),t}}(n,t))||(i=[ef(n,{__symbolic:"module",version:1,metadata:{}},t)]);else{var s=n.getSourceFileMetadata(t);i=s?[s]:[]}return!r||n.cacheMetadata&&!n.cacheMetadata(t)||r.data.set(t,i),i}(t,this.hostAdapter,this.metadataReaderCache)},t.prototype.moduleNameToFileName=function(t,e){if(!e){if(0===t.indexOf("."))throw new Error("Resolution of relative paths requires a containing file.");e=n.join(this.options.basePath,"index.ts").replace(/\\/g,"/")}var i=r.resolveModuleName(t,e,this.options,this.hostAdapter).resolvedModule;return i?i.resolvedFileName:null},t.prototype.getOutputName=function(t){return t},t}(),sP=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.parse=function(t,e,n,r){return void 0===n&&(n=!1),void 0===r&&(r=Ls),new va([],[])},e}(_a),aP=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.get=function(t){return Promise.resolve("")},e}(Qp),uP=function(){function t(t,e){this.host=t,this.tsService=e,this._staticSymbolCache=new Ze,this._typeCache=[],this.modulesOutOfDate=!0,this.fileVersions=new Map}return t.prototype.setSite=function(t){this.service=t},Object.defineProperty(t.prototype,"resolver",{get:function(){var t=this;this.validate();var e=this._resolver;if(!e){var n=new Vl(this.reflector),r=new zc(this.reflector),i=new Bl(this.reflector),o=new Da,s=new aP,a=Vp(),u=new sP,c=new Hc({defaultEncapsulation:Zf.Emulated,useJit:!1}),l=new Uc(s,a,u,c);e=this._resolver=new Nl(c,u,n,r,i,new Fp,o,l,new rE,this._staticSymbolCache,this.reflector,function(e,n){return t.collectError(e,n&&n.filePath)})}return e},enumerable:!0,configurable:!0}),t.prototype.getTemplateReferences=function(){return this.ensureTemplateMap(),this.templateReferences||[]},t.prototype.getTemplateAt=function(t,e){var n=this.getSourceFile(t);if(n){this.context=n.fileName;var r=this.findNode(n,e);if(r)return this.getSourceFromNode(t,this.host.getScriptVersion(n.fileName),r)}else{this.ensureTemplateMap();var i=this.fileToComponent.get(t);if(i)return this.getSourceFromType(t,this.host.getScriptVersion(t),i)}},t.prototype.getAnalyzedModules=function(){return this.updateAnalyzedModules(),this.ensureAnalyzedModules()},t.prototype.ensureAnalyzedModules=function(){var t=this.analyzedModules;return t||(t=0===this.host.getScriptFileNames().length?{files:[],ngModuleByPipeOrDirective:new Map,ngModules:[]}:function e(t,n,r,i){return function s(t){var e=[],n=new Map,r=new Set;t.forEach(function(t){t.ngModules.forEach(function(t){e.push(t),t.declaredDirectives.forEach(function(e){return n.set(e.reference,t)}),t.declaredPipes.forEach(function(e){return n.set(e.reference,t)})}),t.directives.forEach(function(t){return r.add(t)}),t.pipes.forEach(function(t){return r.add(t)})});var i=[];return r.forEach(function(t){n.has(t)||i.push(t)}),{ngModules:e,ngModuleByPipeOrDirective:n,symbolsMissingModule:i,files:t}}(function o(t,e,n,r){var i=new Set,o=[],s=function(t){if(i.has(t)||!e.isSourceFile(t))return!1;i.add(t);var a=function u(t,e,n,r){var i=[],o=[],s=[],a=[],u=e.hasDecorators(r),c=!1;return r.endsWith(".d.ts")&&!u||e.getSymbolsOf(r).forEach(function(r){var u=e.resolveSymbol(r).metadata;if(u&&"error"!==u.__symbolic){var l=!1;if("class"===u.__symbolic)if(n.isDirective(r))l=!0,i.push(r);else if(n.isPipe(r))l=!0,o.push(r);else if(n.isNgModule(r)){var p=n.getNgModuleMetadata(r,!1);p&&(l=!0,a.push(p))}else if(n.isInjectable(r)){l=!0;var h=n.getInjectableMetadata(r,null,!1);h&&s.push(h)}l||(c=c||function f(t,e){var n=!1;return we(e,new(function(){function e(){}return e.prototype.visitArray=function(t,e){var n=this;t.forEach(function(t){return we(t,n,e)})},e.prototype.visitStringMap=function(t,e){var n=this;Object.keys(t).forEach(function(r){return we(t[r],n,e)})},e.prototype.visitPrimitive=function(t,e){},e.prototype.visitOther=function(e,r){e instanceof Ye&&!t.isSourceFile(e.filePath)&&(n=!0)},e}()),null),n}(t,u))}}),{fileName:r,directives:i,pipes:o,ngModules:a,injectables:s,exportsNonSourceFiles:c}}(e,n,r,t);o.push(a),a.ngModules.forEach(function(t){t.transitiveModule.modules.forEach(function(t){return s(t.reference.filePath)})})};return t.forEach(function(t){return s(t)}),o}(t,n,r,i))}(this.program.getSourceFiles().map(function(t){return t.fileName}),{isSourceFile:function(t){return!0}},this.staticSymbolResolver,this.resolver),this.analyzedModules=t),t},t.prototype.getTemplates=function(t){var e=this;if(this.ensureTemplateMap(),!this.fileToComponent.get(t)){var n=this.host.getScriptVersion(t),i=[],o=function(s){var a=e.getSourceFromNode(t,n,s);a?i.push(a):r.forEachChild(s,o)},s=this.getSourceFile(t);return s&&(this.context=s.path||s.fileName,r.forEachChild(s,o)),i.length?i:void 0}var a=this.getTemplateAt(t,0);if(a)return[a]},t.prototype.getDeclarations=function(t){var e=this,n=[],i=this.getSourceFile(t);if(i){var o=function(t){var s=e.getDeclarationFromNode(i,t);s?n.push(s):r.forEachChild(t,o)};r.forEachChild(i,o)}return n},t.prototype.getSourceFile=function(t){return this.tsService.getProgram().getSourceFile(t)},t.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(t.prototype,"program",{get:function(){return this.tsService.getProgram()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checker",{get:function(){var t=this._checker;return t||(t=this._checker=this.program.getTypeChecker()),t},enumerable:!0,configurable:!0}),t.prototype.validate=function(){var t,e,n=this,r=this.program;if(this.lastProgram!==r){var i=function(t){return n._staticSymbolResolver.invalidateFile(t)};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 c=this.host.getScriptVersion(u);c!=this.fileVersions.get(u)&&(this.fileVersions.set(u,c),this._staticSymbolResolver&&i(u))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}var l=Array.from(this.fileVersions.keys()).filter(function(t){return!o.has(t)});l.forEach(function(t){return n.fileVersions.delete(t)}),this._staticSymbolResolver&&l.forEach(i),this.lastProgram=r}},t.prototype.clearCaches=function(){this._checker=null,this._typeCache=[],this._resolver=null,this.collectedErrors=null,this.modulesOutOfDate=!0},t.prototype.ensureTemplateMap=function(){var t,e,n,r;if(!this.fileToComponent||!this.templateReferences){var i=new Map,o=[],s=this.getAnalyzedModules(),a=Vp();try{for(var u=p(s.ngModules),c=u.next();!c.done;c=u.next()){var l=c.value;try{for(var h=p(l.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 y=a.resolve(this.reflector.componentModuleUrl(d.reference),v.template.templateUrl);i.set(y,d.reference),o.push(y)}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=u.return)&&e.call(u)}finally{if(t)throw t.error}}this.fileToComponent=i,this.templateReferences=o}},t.prototype.getSourceFromDeclaration=function(t,e,n,r,i,o,s,a){var u=void 0,c=this;if(o)return{version:e,source:n,span:r,type:i,get members(){return function t(e,n,r,i){var o=n.getTypeAtLocation(i);return new lh(o,{node:r,program:e,checker:n}).members()}(c.program,c.checker,a,o)},get query(){if(!u){var e=c.service.getPipesAt(t,s.getStart());u=function n(t,e,r,i){return new sh(t,e,r,i)}(c.program,c.checker,a,function(){return function t(e,n,r,i){return new gh(i,{program:n,checker:r,node:e})}(a,c.program,c.checker,e)})}return u}}},t.prototype.getSourceFromNode=function(t,e,n){switch(n.kind){case r.SyntaxKind.NoSubstitutionTemplateLiteral:case r.SyntaxKind.StringLiteral:var i=h(this.getTemplateClassDeclFromNode(n),2)[0];if(i&&i.name){var o=this.getSourceFile(t);if(o)return this.getSourceFromDeclaration(t,e,this.stringOf(n)||"",function s(t,e){return null==e&&(e=1),{start:t.start+e,end:t.end-e}}(cP(n)),this.reflector.getStaticSymbol(o.fileName,i.name.text),i,n,o)}}},t.prototype.getSourceFromType=function(t,e,n){var r=void 0,i=this.getTemplateClassFromStaticSymbol(n);if(i){var o=this.host.getScriptSnapshot(t);if(o){var s=o.getText(0,o.getLength());r=this.getSourceFromDeclaration(t,e,s,{start:0,end:s.length},n,i,i,i.getSourceFile())}}return r},Object.defineProperty(t.prototype,"reflectorHost",{get:function(){var t=this,r=this._reflectorHost;if(!r){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(t){for(var r=n.dirname(t);e.existsSync(r);){var i=n.join(r,"tsconfig.json");if(e.existsSync(i))return i;var o=n.dirname(r);if(o===r)break;r=o}}(o.fileName),u=n.dirname(s||this.context),c={basePath:u,genDir:u},l=this.host.getCompilationSettings();l&&l.baseUrl&&(c.baseUrl=l.baseUrl),l&&l.paths&&(c.paths=l.paths),r=this._reflectorHost=new oP(function(){return t.tsService.getProgram()},this.host,c)}return r},enumerable:!0,configurable:!0}),t.prototype.collectError=function(t,e){if(e){var n=this.collectedErrors;n&&this.collectedErrors||(n=this.collectedErrors=new Map);var r=n.get(e);r||this.collectedErrors.set(e,r=[]),r.push(t)}},Object.defineProperty(t.prototype,"staticSymbolResolver",{get:function(){var t=this,e=this._staticSymbolResolver;return e||(this._summaryResolver=new jp({loadSummary:function(t){return null},isSourceFile:function(t){return!0},toSummaryFileName:function(t){return t},fromSummaryFileName:function(t){return t}},this._staticSymbolCache),e=this._staticSymbolResolver=new pp(this.reflectorHost,this._staticSymbolCache,this._summaryResolver,function(e,n){return t.collectError(e,n)})),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reflector",{get:function(){var t=this,e=this._reflector;return e||(e=this._reflector=new wp(this._summaryResolver,this.staticSymbolResolver,[],[],function(e,n){return t.collectError(e,n)})),e},enumerable:!0,configurable:!0}),t.prototype.getTemplateClassFromStaticSymbol=function(t){var e=this.getSourceFile(t.filePath);if(e)return r.forEachChild(e,function(e){if(e.kind===r.SyntaxKind.ClassDeclaration&&null!=e.name&&e.name.text===t.name)return e})},t.prototype.getTemplateClassDeclFromNode=function(e){var n=e.parent;if(!n)return t.missingTemplate;if(n.kind!==r.SyntaxKind.PropertyAssignment)return t.missingTemplate;if("template"!==n.name.text)return t.missingTemplate;if(!(n=n.parent)||n.kind!==r.SyntaxKind.ObjectLiteralExpression)return t.missingTemplate;if(!(n=n.parent)||n.kind!==r.SyntaxKind.CallExpression)return t.missingTemplate;var i=n.expression,o=n.parent;if(!o||o.kind!==r.SyntaxKind.Decorator)return t.missingTemplate;var s=o.parent;return s&&s.kind===r.SyntaxKind.ClassDeclaration?[s,i]:t.missingTemplate},t.prototype.getCollectedErrors=function(t,e){var n=this.collectedErrors&&this.collectedErrors.get(e.fileName);return n&&n.map(function(n){var i=function o(t,e,n){if(null!=e&&null!=n){var i=r.getPositionOfLineAndCharacter(t,e,n),o=r.forEachChild(t,function t(e){if(e.kind>r.SyntaxKind.LastToken&&e.pos<=i&&e.end>i)return r.forEachChild(e,t)||e});if(o)return{start:o.getStart(),end:o.getEnd()}}}(e,n.line||n.position&&n.position.line,n.column||n.position&&n.position.column)||t;return function s(t){return!!t[yp]}
|
|
1512
|
+
function r(t){var e=Array.from(t.providers),n=Array.from(t.modules),r={};for(var i in t.providersByKey)r[i]=t.providersByKey[i];return{factory:t.factory,isRoot:t.isRoot,providers:e,modules:n,providersByKey:r}}(US(this._ngModuleDefFactory));return wS.createNgModuleRef(this.moduleType,t||Sy.NULL,this._bootstrapComponents,n)}})(By),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}o(e,t),e.prototype.createRenderer=function(e,n){var r=t.prototype.createRenderer.call(this,e,n);return r.debugContextFactory=function(t){return new iP(t)},r}}(nP);var iP=function(){function t(t){this._nativeNode=t}return Object.defineProperty(t.prototype,"nodeIndex",{get:function(){return Em(this._nativeNode).nodeIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){return Em(this._nativeNode).lViewData},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return function t(e){var n=Em(e);return new wm(n.lViewData[Fd].data[n.nodeIndex],n.lViewData)}(this._nativeNode)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){return function t(e){if(!(e instanceof Node))throw new Error("Expecting instance of DOM Node");var n=Em(e);return void 0===n.component&&(n.component=function r(t,e){var n=e[Fd].data[t],r=fy(n);return 4096&n.flags?e[r]:null}(n.nodeIndex,n.lViewData)),n.component}(this._nativeNode)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){var t=Em(this._nativeNode),e=t.lViewData[Fd].data[t.nodeIndex],n=4095&e.flags;if(n>0){var r=e.flags>>16;return this.view[Fd].data.slice(r,r+n).map(function(t){return t.type})}return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){return function t(e){var n=Em(e);return void 0===n.localRefs&&(n.localRefs=function r(t,e){var n=t[Fd].data[e];if(n&&n.localNames){for(var r={},i=0;i<n.localNames.length;i+=2){var o=n.localNames[i+1];r[n.localNames[i]]=-1===o?dv(n,t):t[o]}return r}return null}(n.lViewData,n.nodeIndex)),n.localRefs||{}}(this._nativeNode)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){throw new Error("Not implemented in ivy")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentRenderElement",{get:function(){throw new Error("Not implemented in ivy")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderNode",{get:function(){throw new Error("Not implemented in ivy")},enumerable:!0,configurable:!0}),t.prototype.logError=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];t.error.apply(t,f(e))},t}(),oP=function(){function t(t,e){var n=this;this.host=t,this.getProgram=e,this.metadataCollector=new Yh({verboseInvalidExpression:!0}),t.directoryExists&&(this.directoryExists=function(t){return n.host.directoryExists(t)})}return t.prototype.fileExists=function(t){return!!this.host.getScriptSnapshot(t)},t.prototype.readFile=function(t){var e=this.host.getScriptSnapshot(t);if(e)return e.getText(0,e.getLength())},t.prototype.getSourceFileMetadata=function(t){var e=this.getProgram().getSourceFile(t);return e?this.metadataCollector.getMetadata(e):void 0},t.prototype.cacheMetadata=function(t){return t.endsWith(".d.ts")},t}(),sP=function(){function t(t,e,n){this.options=n,this.metadataReaderCache=function i(){return{data:new Map}}(),this.hostAdapter=new oP(e,t),this.moduleResolutionCache=r.createModuleResolutionCache(e.getCurrentDirectory(),function(t){return t})}return t.prototype.getMetadataFor=function(t){return function e(t,n,r){var i=r&&r.data.get(t);if(i)return i;if(n.fileExists(t))if(tf.test(t))(i=function o(t,e){var n=e.replace(tf,".metadata.json");if(t.fileExists(n))try{var r=JSON.parse(t.readFile(n)),i=r?Array.isArray(r)?r:[r]:[];if(i.length){var o=i.reduce(function(t,e){return t.version>e.version?t:e});o.version<Nh&&i.push(ef(t,o,e))}return i}catch(t){throw console.error("Failed to read JSON file "+n),t}}(n,t))||(i=[ef(n,{__symbolic:"module",version:1,metadata:{}},t)]);else{var s=n.getSourceFileMetadata(t);i=s?[s]:[]}return!r||n.cacheMetadata&&!n.cacheMetadata(t)||r.data.set(t,i),i}(t,this.hostAdapter,this.metadataReaderCache)},t.prototype.moduleNameToFileName=function(t,e){if(!e){if(0===t.indexOf("."))throw new Error("Resolution of relative paths requires a containing file.");e=n.join(this.options.basePath,"index.ts").replace(/\\/g,"/")}var i=r.resolveModuleName(t,e,this.options,this.hostAdapter).resolvedModule;return i?i.resolvedFileName:null},t.prototype.getOutputName=function(t){return t},t}(),aP=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.parse=function(t,e,n,r){return void 0===n&&(n=!1),void 0===r&&(r=Ls),new va([],[])},e}(_a),uP=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.get=function(t){return Promise.resolve("")},e}(Qp),cP=function(){function t(t,e){this.host=t,this.tsService=e,this._staticSymbolCache=new Ze,this._typeCache=[],this.modulesOutOfDate=!0,this.fileVersions=new Map}return t.prototype.setSite=function(t){this.service=t},Object.defineProperty(t.prototype,"resolver",{get:function(){var t=this;this.validate();var e=this._resolver;if(!e){var n=new Vl(this.reflector),r=new zc(this.reflector),i=new Bl(this.reflector),o=new Ra,s=new uP,a=Vp(),u=new aP,c=new Hc({defaultEncapsulation:Zf.Emulated,useJit:!1}),l=new Uc(s,a,u,c);e=this._resolver=new Nl(c,u,n,r,i,new Fp,o,l,new iE,this._staticSymbolCache,this.reflector,function(e,n){return t.collectError(e,n&&n.filePath)})}return e},enumerable:!0,configurable:!0}),t.prototype.getTemplateReferences=function(){return this.ensureTemplateMap(),this.templateReferences||[]},t.prototype.getTemplateAt=function(t,e){var n=this.getSourceFile(t);if(n){this.context=n.fileName;var r=this.findNode(n,e);if(r)return this.getSourceFromNode(t,this.host.getScriptVersion(n.fileName),r)}else{this.ensureTemplateMap();var i=this.fileToComponent.get(t);if(i)return this.getSourceFromType(t,this.host.getScriptVersion(t),i)}},t.prototype.getAnalyzedModules=function(){return this.updateAnalyzedModules(),this.ensureAnalyzedModules()},t.prototype.ensureAnalyzedModules=function(){var t=this.analyzedModules;return t||(t=0===this.host.getScriptFileNames().length?{files:[],ngModuleByPipeOrDirective:new Map,ngModules:[]}:function e(t,n,r,i){return function s(t){var e=[],n=new Map,r=new Set;t.forEach(function(t){t.ngModules.forEach(function(t){e.push(t),t.declaredDirectives.forEach(function(e){return n.set(e.reference,t)}),t.declaredPipes.forEach(function(e){return n.set(e.reference,t)})}),t.directives.forEach(function(t){return r.add(t)}),t.pipes.forEach(function(t){return r.add(t)})});var i=[];return r.forEach(function(t){n.has(t)||i.push(t)}),{ngModules:e,ngModuleByPipeOrDirective:n,symbolsMissingModule:i,files:t}}(function o(t,e,n,r){var i=new Set,o=[],s=function(t){if(i.has(t)||!e.isSourceFile(t))return!1;i.add(t);var a=function u(t,e,n,r){var i=[],o=[],s=[],a=[],u=e.hasDecorators(r),c=!1;return r.endsWith(".d.ts")&&!u||e.getSymbolsOf(r).forEach(function(r){var u=e.resolveSymbol(r).metadata;if(u&&"error"!==u.__symbolic){var l=!1;if("class"===u.__symbolic)if(n.isDirective(r))l=!0,i.push(r);else if(n.isPipe(r))l=!0,o.push(r);else if(n.isNgModule(r)){var p=n.getNgModuleMetadata(r,!1);p&&(l=!0,a.push(p))}else if(n.isInjectable(r)){l=!0;var h=n.getInjectableMetadata(r,null,!1);h&&s.push(h)}l||(c=c||function f(t,e){var n=!1;return we(e,new(function(){function e(){}return e.prototype.visitArray=function(t,e){var n=this;t.forEach(function(t){return we(t,n,e)})},e.prototype.visitStringMap=function(t,e){var n=this;Object.keys(t).forEach(function(r){return we(t[r],n,e)})},e.prototype.visitPrimitive=function(t,e){},e.prototype.visitOther=function(e,r){e instanceof Ye&&!t.isSourceFile(e.filePath)&&(n=!0)},e}()),null),n}(t,u))}}),{fileName:r,directives:i,pipes:o,ngModules:a,injectables:s,exportsNonSourceFiles:c}}(e,n,r,t);o.push(a),a.ngModules.forEach(function(t){t.transitiveModule.modules.forEach(function(t){return s(t.reference.filePath)})})};return t.forEach(function(t){return s(t)}),o}(t,n,r,i))}(this.program.getSourceFiles().map(function(t){return t.fileName}),{isSourceFile:function(t){return!0}},this.staticSymbolResolver,this.resolver),this.analyzedModules=t),t},t.prototype.getTemplates=function(t){var e=this;if(this.ensureTemplateMap(),!this.fileToComponent.get(t)){var n=this.host.getScriptVersion(t),i=[],o=function(s){var a=e.getSourceFromNode(t,n,s);a?i.push(a):r.forEachChild(s,o)},s=this.getSourceFile(t);return s&&(this.context=s.path||s.fileName,r.forEachChild(s,o)),i.length?i:void 0}var a=this.getTemplateAt(t,0);if(a)return[a]},t.prototype.getDeclarations=function(t){var e=this,n=[],i=this.getSourceFile(t);if(i){var o=function(t){var s=e.getDeclarationFromNode(i,t);s?n.push(s):r.forEachChild(t,o)};r.forEachChild(i,o)}return n},t.prototype.getSourceFile=function(t){return this.tsService.getProgram().getSourceFile(t)},t.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(t.prototype,"program",{get:function(){return this.tsService.getProgram()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checker",{get:function(){var t=this._checker;return t||(t=this._checker=this.program.getTypeChecker()),t},enumerable:!0,configurable:!0}),t.prototype.validate=function(){var t,e,n=this,r=this.program;if(this.lastProgram!==r){var i=function(t){return n._staticSymbolResolver.invalidateFile(t)};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 c=this.host.getScriptVersion(u);c!=this.fileVersions.get(u)&&(this.fileVersions.set(u,c),this._staticSymbolResolver&&i(u))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}var l=Array.from(this.fileVersions.keys()).filter(function(t){return!o.has(t)});l.forEach(function(t){return n.fileVersions.delete(t)}),this._staticSymbolResolver&&l.forEach(i),this.lastProgram=r}},t.prototype.clearCaches=function(){this._checker=null,this._typeCache=[],this._resolver=null,this.collectedErrors=null,this.modulesOutOfDate=!0},t.prototype.ensureTemplateMap=function(){var t,e,n,r;if(!this.fileToComponent||!this.templateReferences){var i=new Map,o=[],s=this.getAnalyzedModules(),a=Vp();try{for(var u=p(s.ngModules),c=u.next();!c.done;c=u.next()){var l=c.value;try{for(var h=p(l.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 y=a.resolve(this.reflector.componentModuleUrl(d.reference),v.template.templateUrl);i.set(y,d.reference),o.push(y)}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=u.return)&&e.call(u)}finally{if(t)throw t.error}}this.fileToComponent=i,this.templateReferences=o}},t.prototype.getSourceFromDeclaration=function(t,e,n,r,i,o,s,a){var u=void 0,c=this;if(o)return{version:e,source:n,span:r,type:i,get members(){return function t(e,n,r,i){var o=n.getTypeAtLocation(i);return new lh(o,{node:r,program:e,checker:n}).members()}(c.program,c.checker,a,o)},get query(){if(!u){var e=c.service.getPipesAt(t,s.getStart());u=function n(t,e,r,i){return new sh(t,e,r,i)}(c.program,c.checker,a,function(){return function t(e,n,r,i){return new gh(i,{program:n,checker:r,node:e})}(a,c.program,c.checker,e)})}return u}}},t.prototype.getSourceFromNode=function(t,e,n){switch(n.kind){case r.SyntaxKind.NoSubstitutionTemplateLiteral:case r.SyntaxKind.StringLiteral:var i=h(this.getTemplateClassDeclFromNode(n),2)[0];if(i&&i.name){var o=this.getSourceFile(t);if(o)return this.getSourceFromDeclaration(t,e,this.stringOf(n)||"",function s(t,e){return null==e&&(e=1),{start:t.start+e,end:t.end-e}}(lP(n)),this.reflector.getStaticSymbol(o.fileName,i.name.text),i,n,o)}}},t.prototype.getSourceFromType=function(t,e,n){var r=void 0,i=this.getTemplateClassFromStaticSymbol(n);if(i){var o=this.host.getScriptSnapshot(t);if(o){var s=o.getText(0,o.getLength());r=this.getSourceFromDeclaration(t,e,s,{start:0,end:s.length},n,i,i,i.getSourceFile())}}return r},Object.defineProperty(t.prototype,"reflectorHost",{get:function(){var t=this,r=this._reflectorHost;if(!r){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(t){for(var r=n.dirname(t);e.existsSync(r);){var i=n.join(r,"tsconfig.json");if(e.existsSync(i))return i;var o=n.dirname(r);if(o===r)break;r=o}}(o.fileName),u=n.dirname(s||this.context),c={basePath:u,genDir:u},l=this.host.getCompilationSettings();l&&l.baseUrl&&(c.baseUrl=l.baseUrl),l&&l.paths&&(c.paths=l.paths),r=this._reflectorHost=new sP(function(){return t.tsService.getProgram()},this.host,c)}return r},enumerable:!0,configurable:!0}),t.prototype.collectError=function(t,e){if(e){var n=this.collectedErrors;n&&this.collectedErrors||(n=this.collectedErrors=new Map);var r=n.get(e);r||this.collectedErrors.set(e,r=[]),r.push(t)}},Object.defineProperty(t.prototype,"staticSymbolResolver",{get:function(){var t=this,e=this._staticSymbolResolver;return e||(this._summaryResolver=new jp({loadSummary:function(t){return null},isSourceFile:function(t){return!0},toSummaryFileName:function(t){return t},fromSummaryFileName:function(t){return t}},this._staticSymbolCache),e=this._staticSymbolResolver=new pp(this.reflectorHost,this._staticSymbolCache,this._summaryResolver,function(e,n){return t.collectError(e,n)})),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reflector",{get:function(){var t=this,e=this._reflector;return e||(e=this._reflector=new wp(this._summaryResolver,this.staticSymbolResolver,[],[],function(e,n){return t.collectError(e,n)})),e},enumerable:!0,configurable:!0}),t.prototype.getTemplateClassFromStaticSymbol=function(t){var e=this.getSourceFile(t.filePath);if(e)return r.forEachChild(e,function(e){if(e.kind===r.SyntaxKind.ClassDeclaration&&null!=e.name&&e.name.text===t.name)return e})},t.prototype.getTemplateClassDeclFromNode=function(e){var n=e.parent;if(!n)return t.missingTemplate;if(n.kind!==r.SyntaxKind.PropertyAssignment)return t.missingTemplate;if("template"!==n.name.text)return t.missingTemplate;if(!(n=n.parent)||n.kind!==r.SyntaxKind.ObjectLiteralExpression)return t.missingTemplate;if(!(n=n.parent)||n.kind!==r.SyntaxKind.CallExpression)return t.missingTemplate;var i=n.expression,o=n.parent;if(!o||o.kind!==r.SyntaxKind.Decorator)return t.missingTemplate;var s=o.parent;return s&&s.kind===r.SyntaxKind.ClassDeclaration?[s,i]:t.missingTemplate},t.prototype.getCollectedErrors=function(t,e){var n=this.collectedErrors&&this.collectedErrors.get(e.fileName);return n&&n.map(function(n){var i=function o(t,e,n){if(null!=e&&null!=n){var i=r.getPositionOfLineAndCharacter(t,e,n),o=r.forEachChild(t,function t(e){if(e.kind>r.SyntaxKind.LastToken&&e.pos<=i&&e.end>i)return r.forEachChild(e,t)||e});if(o)return{start:o.getStart(),end:o.getEnd()}}}(e,n.line||n.position&&n.position.line,n.column||n.position&&n.position.column)||t;return function s(t){return!!t[yp]}
|
|
1513
1513
|
/**
|
|
1514
1514
|
* @license
|
|
1515
1515
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1523,7 +1523,7 @@ function r(t){var e=Array.from(t.providers),n=Array.from(t.modules),r={};for(var
|
|
|
1523
1523
|
*
|
|
1524
1524
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1525
1525
|
* found in the LICENSE file at https://angular.io/license
|
|
1526
|
-
*/(n,i):{message:n.message,span:i}})||[]},t.prototype.getDeclarationFromNode=function(t,e){var n,i;if(e.kind==r.SyntaxKind.ClassDeclaration&&e.decorators&&e.name)try{for(var o=p(e.decorators),s=o.next();!s.done;s=o.next()){var a=s.value;if(a.expression&&a.expression.kind==r.SyntaxKind.CallExpression){var u=e;if(u.name){var c=a.expression.expression;if(this.checker.getTypeAtLocation(c)){var l=this.reflector.getStaticSymbol(t.fileName,u.name.text);try{if(this.resolver.isDirective(l)){var h=this.resolver.getNonNormalizedDirectiveMetadata(l).metadata;return{type:l,declarationSpan:f=
|
|
1526
|
+
*/(n,i):{message:n.message,span:i}})||[]},t.prototype.getDeclarationFromNode=function(t,e){var n,i;if(e.kind==r.SyntaxKind.ClassDeclaration&&e.decorators&&e.name)try{for(var o=p(e.decorators),s=o.next();!s.done;s=o.next()){var a=s.value;if(a.expression&&a.expression.kind==r.SyntaxKind.CallExpression){var u=e;if(u.name){var c=a.expression.expression;if(this.checker.getTypeAtLocation(c)){var l=this.reflector.getStaticSymbol(t.fileName,u.name.text);try{if(this.resolver.isDirective(l)){var h=this.resolver.getNonNormalizedDirectiveMetadata(l).metadata;return{type:l,declarationSpan:f=lP(c),metadata:h,errors:this.getCollectedErrors(f,t)}}}catch(e){var f;if(e.message)return this.collectError(e,t.fileName),{type:l,declarationSpan:f=lP(c),errors:this.getCollectedErrors(f,t)}}}}}}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},t.prototype.stringOf=function(t){switch(t.kind){case r.SyntaxKind.NoSubstitutionTemplateLiteral:case r.SyntaxKind.StringLiteral:return t.text}},t.prototype.findNode=function(t,e){return function t(n){if(e>=n.getStart()&&e<n.getEnd())return r.forEachChild(n,t)||n}(t)},t.missingTemplate=[void 0,void 0],t}();
|
|
1527
1527
|
/**
|
|
1528
1528
|
* @license
|
|
1529
1529
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1544,7 +1544,7 @@ function r(t){var e=Array.from(t.providers),n=Array.from(t.modules),r={};for(var
|
|
|
1544
1544
|
*
|
|
1545
1545
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1546
1546
|
* found in the LICENSE file at https://angular.io/license
|
|
1547
|
-
*/function
|
|
1547
|
+
*/function lP(t){return{start:t.getStart(),end:t.getEnd()}}var pP=new WeakMap,hP=new $m("7.1.4");
|
|
1548
1548
|
/**
|
|
1549
1549
|
* @license
|
|
1550
1550
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1559,7 +1559,7 @@ function r(t){var e=Array.from(t.providers),n=Array.from(t.modules),r={};for(var
|
|
|
1559
1559
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1560
1560
|
* found in the LICENSE file at https://angular.io/license
|
|
1561
1561
|
*/
|
|
1562
|
-
t.createLanguageService=jf,t.TypeScriptServiceHost=
|
|
1562
|
+
t.createLanguageService=jf,t.TypeScriptServiceHost=cP,t.createLanguageServiceFromTypescript=
|
|
1563
1563
|
/**
|
|
1564
1564
|
* @license
|
|
1565
1565
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1567,7 +1567,7 @@ t.createLanguageService=jf,t.TypeScriptServiceHost=uP,t.createLanguageServiceFro
|
|
|
1567
1567
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1568
1568
|
* found in the LICENSE file at https://angular.io/license
|
|
1569
1569
|
*/
|
|
1570
|
-
function
|
|
1570
|
+
function fP(t,e){var n=new cP(t,e),r=jf(n);return n.setSite(r),r},t.VERSION=hP,t.getExternalFiles=function dP(t){var e=pP.get(t);if(e)return e.getTemplateReferences()},t.create=function vP(t){var e=Object.create(null),n=t.languageService;function i(t,e){if(!t||n.getProgram().getSourceFile(t))try{return e()}catch(t){return}}function o(t){return function(e){return i(e,function(){return t.call(y,e)})}}function s(t){return function(e,n){return i(e,function(){return t.call(y,e,n)})}}function a(t){return function(e,n,r){return i(e,function(){return t.call(y,e,n,r)})}}function u(t){return function(e,n,r,o){return i(e,function(){return t.call(y,e,n,r,o)})}}function c(t){return function(e,n,r,o,s,a){return i(e,function(){return t.call(y,e,n,r,o,s,a)})}}n=function l(t){return{cleanupSemanticCache:function(){return t.cleanupSemanticCache()},getSyntacticDiagnostics:o(t.getSyntacticDiagnostics),getSemanticDiagnostics:o(t.getSemanticDiagnostics),getCompilerOptionsDiagnostics:function(){return t.getCompilerOptionsDiagnostics()},getSyntacticClassifications:s(t.getSemanticClassifications),getSemanticClassifications:s(t.getSemanticClassifications),getEncodedSyntacticClassifications:s(t.getEncodedSyntacticClassifications),getEncodedSemanticClassifications:s(t.getEncodedSemanticClassifications),getCompletionsAtPosition:a(t.getCompletionsAtPosition),getCompletionEntryDetails:c(t.getCompletionEntryDetails),getCompletionEntrySymbol:u(t.getCompletionEntrySymbol),getJsxClosingTagAtPosition:s(t.getJsxClosingTagAtPosition),getQuickInfoAtPosition:s(t.getQuickInfoAtPosition),getNameOrDottedNameSpan:a(t.getNameOrDottedNameSpan),getBreakpointStatementAtPosition:s(t.getBreakpointStatementAtPosition),getSignatureHelpItems:a(t.getSignatureHelpItems),getRenameInfo:s(t.getRenameInfo),findRenameLocations:u(t.findRenameLocations),getDefinitionAtPosition:s(t.getDefinitionAtPosition),getTypeDefinitionAtPosition:s(t.getTypeDefinitionAtPosition),getImplementationAtPosition:s(t.getImplementationAtPosition),getReferencesAtPosition:s(t.getReferencesAtPosition),findReferences:s(t.findReferences),getDocumentHighlights:a(t.getDocumentHighlights),getOccurrencesAtPosition:s(t.getOccurrencesAtPosition),getNavigateToItems:function(e,n,r,o){return i(r,function(){return t.getNavigateToItems(e,n,r,o)})},getNavigationBarItems:o(t.getNavigationBarItems),getNavigationTree:o(t.getNavigationTree),getOutliningSpans:o(t.getOutliningSpans),getTodoComments:s(t.getTodoComments),getBraceMatchingAtPosition:s(t.getBraceMatchingAtPosition),getIndentationAtPosition:a(t.getIndentationAtPosition),getFormattingEditsForRange:u(t.getFormattingEditsForRange),getFormattingEditsForDocument:s(t.getFormattingEditsForDocument),getFormattingEditsAfterKeystroke:u(t.getFormattingEditsAfterKeystroke),getDocCommentTemplateAtPosition:s(t.getDocCommentTemplateAtPosition),isValidBraceCompletionAtPosition:a(t.isValidBraceCompletionAtPosition),getSpanOfEnclosingComment:a(t.getSpanOfEnclosingComment),getCodeFixesAtPosition:c(t.getCodeFixesAtPosition),applyCodeActionCommand:function(e){return i(void 0,function(){return t.applyCodeActionCommand(e)})},getEmitOutput:o(t.getEmitOutput),getProgram:function(){return t.getProgram()},dispose:function(){return t.dispose()},getApplicableRefactors:a(t.getApplicableRefactors),getEditsForRefactor:c(t.getEditsForRefactor),getDefinitionAndBoundSpan:s(t.getDefinitionAndBoundSpan),getCombinedCodeFix:function(e,n,r,o){return i(void 0,function(){return t.getCombinedCodeFix(e,n,r,o)})},getSuggestionDiagnostics:function(t){return[]},organizeImports:function(t,e){return[]},getEditsForFileRename:function(t,e,n,r){return[]}}}(n);var h=function(t){e[t]=function(){return n[t].apply(n,arguments)}};for(var f in n)h(f);function d(e,n){try{return n()}catch(n){return t.project.projectService.logger.info("Failed to "+e+": "+n.toString()),t.project.projectService.logger.info("Stack trace: "+n.stack),null}}var v=new cP(t.languageServiceHost,t.languageService),y=jf(v);return v.setSite(y),pP.set(t.project,v),e.getCompletionsAtPosition=function(t,e,r){var i=n.getCompletionsAtPosition(t,e,r)||{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:[]};return d("get completions",function(){var n,r,o,s=y.getCompletionsAt(t,e);if(s&&s.length){void 0===i&&(i={isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:[]});try{for(var a=p(s),u=a.next();!u.done;u=a.next())i.entries.push({kind:(o=u.value).kind,name:o.name,sortText:o.sort,kindModifiers:""})}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}}),i},e.getQuickInfoAtPosition=function(t,e){var r=n.getQuickInfoAtPosition(t,e);return d("get quick info",function(){var n,i,o=y.getHoverAt(t,e);if(o){var s=[];try{for(var a=p(o.text),u=a.next();!u.done;u=a.next()){var c=u.value;s.push({kind:c.language||"angular",text:c.text})}}catch(t){n={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}var l=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}},l&&(r.tags=l)}}),r},e.getSemanticDiagnostics=function(e){var i=n.getSemanticDiagnostics(e)||[];return d("get diagnostics",function(){t.project.projectService.logger.info("Computing Angular semantic diagnostics...");var o=y.getDiagnostics(e);if(o&&o.length){var s=n.getProgram().getSourceFile(e);s&&i.push.apply(i,o.map(function(t){return function e(t,n){return{file:n,start:t.span.start,length:t.span.end-t.span.start,messageText:function i(t){return"string"==typeof t?t:function t(e){return{messageText:e.message,category:r.DiagnosticCategory.Error,code:0,next:e.next?t(e.next):void 0}}(t)}(t.message),category:r.DiagnosticCategory.Error,code:0,source:"ng"}}(t,s)}))}}),i},e.getDefinitionAtPosition=function(t,e){var r=n.getDefinitionAtPosition(t,e);return r&&r.length?r:d("get definition",function(){var n,i,o=y.getDefinitionAt(t,e);if(o&&o.length){r=r||[];try{for(var s=p(o),a=s.next();!a.done;a=s.next()){var u=a.value;r.push({fileName:u.fileName,textSpan:{start:u.span.start,length:u.span.end-u.span.start},name:"",kind:"definition",containerName:u.fileName,containerKind:"file"})}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}}return r})||[]},e}
|
|
1571
1571
|
/**
|
|
1572
1572
|
* @license
|
|
1573
1573
|
* Copyright Google Inc. All Rights Reserved.
|