webpackJsonp(["vendor"],{ /***/ "../../../../css-loader/lib/css-base.js": /***/ (function(module, exports) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader module.exports = function(useSourceMap) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item, useSourceMap); if(item[2]) { return "@media " + item[2] + "{" + content + "}"; } else { return content; } }).join(""); }; // import a list of modules into the list list.i = function(modules, mediaQuery) { if(typeof modules === "string") modules = [[null, modules, ""]]; var alreadyImportedModules = {}; for(var i = 0; i < this.length; i++) { var id = this[i][0]; if(typeof id === "number") alreadyImportedModules[id] = true; } for(i = 0; i < modules.length; i++) { var item = modules[i]; // skip already imported module // this implementation is not 100% perfect for weird media query combinations // when a module is imported multiple times with different media queries. // I hope this will never occur (Hey this way we have smaller bundles) if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { if(mediaQuery && !item[2]) { item[2] = mediaQuery; } else if(mediaQuery) { item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; } list.push(item); } } }; return list; }; function cssWithMappingToString(item, useSourceMap) { var content = item[1] || ''; var cssMapping = item[3]; if (!cssMapping) { return content; } if (useSourceMap && typeof btoa === 'function') { var sourceMapping = toComment(cssMapping); var sourceURLs = cssMapping.sources.map(function (source) { return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' }); return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); } return [content].join('\n'); } // Adapted from convert-source-map (MIT) function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; return '/*# ' + data + ' */'; } /***/ }), /***/ "../../../../css-loader/lib/url/escape.js": /***/ (function(module, exports) { module.exports = function escape(url) { if (typeof url !== 'string') { return url } // If url is already wrapped in quotes, remove them if (/^['"].*['"]$/.test(url)) { url = url.slice(1, -1); } // Should url be wrapped? // See https://drafts.csswg.org/css-values-3/#urls if (/["'() \t\n]/.test(url)) { return '"' + url.replace(/"/g, '\\"').replace(/\n/g, '\\n') + '"' } return url } /***/ }), /***/ "../../../../highcharts/highcharts.js": /***/ (function(module, exports) { /* Highcharts JS v6.0.7 (2018-02-16) (c) 2009-2016 Torstein Honsi License: www.highcharts.com/license */ (function(S,K){"object"===typeof module&&module.exports?module.exports=S.document?K(S):K:S.Highcharts=K(S)})("undefined"!==typeof window?window:this,function(S){var K=function(){var a="undefined"===typeof S?window:S,B=a.document,H=a.navigator&&a.navigator.userAgent||"",E=B&&B.createElementNS&&!!B.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,q=/(edge|msie|trident)/i.test(H)&&!a.opera,f=-1!==H.indexOf("Firefox"),l=-1!==H.indexOf("Chrome"),t=f&&4>parseInt(H.split("Firefox/")[1], 10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highcharts",version:"6.0.7",deg2rad:2*Math.PI/360,doc:B,hasBidiBug:t,hasTouch:B&&void 0!==B.documentElement.ontouchstart,isMS:q,isWebKit:-1!==H.indexOf("AppleWebKit"),isFirefox:f,isChrome:l,isSafari:!l&&-1!==H.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(H),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:E,win:a,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){}, charts:[]}}();(function(a){a.timers=[];var B=a.charts,H=a.doc,E=a.win;a.error=function(q,f){q=a.isNumber(q)?"Highcharts error #"+q+": www.highcharts.com/errors/"+q:q;if(f)throw Error(q);E.console&&console.log(q)};a.Fx=function(a,f,l){this.options=f;this.elem=a;this.prop=l};a.Fx.prototype={dSetter:function(){var a=this.paths[0],f=this.paths[1],l=[],t=this.now,n=a.length,v;if(1===t)l=this.toD;else if(n===f.length&&1>t)for(;n--;)v=parseFloat(a[n]),l[n]=isNaN(v)?f[n]:t*parseFloat(f[n]-v)+v;else l=f;this.elem.attr("d", l,null,!0)},update:function(){var a=this.elem,f=this.prop,l=this.now,t=this.options.step;if(this[f+"Setter"])this[f+"Setter"]();else a.attr?a.element&&a.attr(f,l,null,!0):a.style[f]=l+this.unit;t&&t.call(a,l,this)},run:function(q,f,l){var t=this,n=t.options,v=function(a){return v.stopped?!1:t.step(a)},u=E.requestAnimationFrame||function(a){setTimeout(a,13)},c=function(){for(var b=0;b=u+this.startTime?(this.now=this.end,this.pos=1,this.update(),l=c[this.prop]=!0,a.objectEach(c,function(a){!0!==a&&(l=!1)}),l&&v&&v.call(n),q= !1):(this.pos=t.easing((f-this.startTime)/u),this.now=this.start+(this.end-this.start)*this.pos,this.update(),q=!0);return q},initPath:function(q,f,l){function t(a){var c,h;for(e=a.length;e--;)c="M"===a[e]||"L"===a[e],h=/[a-zA-Z]/.test(a[e+3]),c&&h&&a.splice(e+1,0,a[e+1],a[e+2],a[e+1],a[e+2])}function n(a,c){for(;a.lengtha&&-Infinity=l&&(f=[1/l])));for(t=0;t=q||!n&&v<=(f[t]+(f[t+1]||f[t]))/2);t++);return u=a.correctFloat(u*l,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,f){var l= a.length,t,n;for(n=0;nl&&(l=a[f]);return l};a.destroyObjectProperties=function(q,f){a.objectEach(q,function(a,t){a&&a!==f&&a.destroy&&a.destroy();delete q[t]})};a.discardElement=function(q){var f=a.garbageBin;f||(f=a.createElement("div"));q&&f.appendChild(q); f.innerHTML=""};a.correctFloat=function(a,f){return parseFloat(a.toPrecision(f||14))};a.setAnimation=function(q,f){f.renderer.globalAnimation=a.pick(q,f.options.chart.animation,!0)};a.animObject=function(q){return a.isObject(q)?a.merge(q):{duration:q?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(q,f,l,t){q=+q||0;f=+f;var n=a.defaultOptions.lang,v=(q.toString().split(".")[1]||"").split("e")[0].length,u, c,b=q.toString().split("e");-1===f?f=Math.min(v,20):a.isNumber(f)?f&&b[1]&&0>b[1]&&(u=f+ +b[1],0<=u?(b[0]=(+b[0]).toExponential(u).split("e")[0],f=u):(b[0]=b[0].split(".")[0]||0,q=20>f?(b[0]*Math.pow(10,b[1])).toFixed(f):0,b[1]=0)):f=2;c=(Math.abs(b[1]?b[0]:q)+Math.pow(10,-Math.max(f,v)-1)).toFixed(f);v=String(a.pInt(c));u=3q?"-":"")+(u?v.substr(0,u)+t:"");q+=v.substr(u).replace(/(\d{3})(?=\d)/g,"$1"+t);f&&(q+=l+c.slice(-f)); b[1]&&0!==+q&&(q+="e"+b[1]);return q};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(q,f,l){if("width"===f)return Math.min(q.offsetWidth,q.scrollWidth)-a.getStyle(q,"padding-left")-a.getStyle(q,"padding-right");if("height"===f)return Math.min(q.offsetHeight,q.scrollHeight)-a.getStyle(q,"padding-top")-a.getStyle(q,"padding-bottom");E.getComputedStyle||a.error(27,!0);if(q=E.getComputedStyle(q,void 0))q=q.getPropertyValue(f),a.pick(l,"opacity"!==f)&&(q=a.pInt(q)); return q};a.inArray=function(q,f){return(a.indexOfPolyfill||Array.prototype.indexOf).call(f,q)};a.grep=function(q,f){return(a.filterPolyfill||Array.prototype.filter).call(q,f)};a.find=Array.prototype.find?function(a,f){return a.find(f)}:function(a,f){var l,t=a.length;for(l=0;l>16,(l&65280)>>8,l&255,1]:4===f&&(n=[(l&3840)>>4|(l&3840)>>8,(l&240)>>4|l&240,(l&15)<<4|l&15,1])),!n)for(v=this.parsers.length;v--&&!n;)u=this.parsers[v],(f=u.regex.exec(l))&&(n=u.parse(f));this.rgba=n||[]},get:function(a){var l=this.input,n=this.rgba,v;this.stops? (v=q(l),v.stops=[].concat(v.stops),B(this.stops,function(n,c){v.stops[c]=[v.stops[c][0],n.get(a)]})):v=n&&H(n[0])?"rgb"===a||!a&&1===n[3]?"rgb("+n[0]+","+n[1]+","+n[2]+")":"a"===a?n[3]:"rgba("+n.join(",")+")":l;return v},brighten:function(a){var l,n=this.rgba;if(this.stops)B(this.stops,function(n){n.brighten(a)});else if(H(a)&&0!==a)for(l=0;3>l;l++)n[l]+=f(255*a),0>n[l]&&(n[l]=0),255y.width)y={width:0,height:0}}else y=this.htmlGetBBox();w.isSVG&&(a=y.width,w=y.height,k&&"11px"===k.fontSize&&17===Math.round(w)&&(y.height=w=14),g&&(y.width=Math.abs(w*Math.sin(b))+Math.abs(a*Math.cos(b)),y.height=Math.abs(w*Math.cos(b))+Math.abs(a*Math.sin(b))));if(F&&0]*>/g,"").replace(/</g,"\x3c").replace(/>/g,"\x3e")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))}, fillSetter:function(a,g,c){"string"===typeof a?c.setAttribute(g,a):a&&this.colorGradient(a,g,c)},visibilitySetter:function(a,g,c){"inherit"===a?c.removeAttribute(g):this[g]!==a&&c.setAttribute(g,a);this[g]=a},zIndexSetter:function(a,c){var w=this.renderer,y=this.parentGroup,h=(y||w).element||w.box,e,b=this.element,d,k,w=h===w.box;e=this.added;var p;u(a)&&(b.zIndex=a,a=+a,this[c]===a&&(e=!1),this[c]=a);if(e){(a=this.zIndex)&&y&&(y.handleZ=!0);c=h.childNodes;for(p=c.length-1;0<=p&&!d;p--)if(y=c[p], e=y.zIndex,k=!u(e),y!==b)if(0>a&&k&&!w&&!p)h.insertBefore(b,c[p]),d=!0;else if(g(e)<=a||k&&(!u(a)||0<=a))h.insertBefore(b,c[p+1]||null),d=!0;d||(h.insertBefore(b,c[w?3:0]||null),d=!0)}return d},_defaultSetter:function(a,g,c){c.setAttribute(g,a)}});B.prototype.yGetter=B.prototype.xGetter;B.prototype.translateXSetter=B.prototype.translateYSetter=B.prototype.rotationSetter=B.prototype.verticalAlignSetter=B.prototype.rotationOriginXSetter=B.prototype.rotationOriginYSetter=B.prototype.scaleXSetter=B.prototype.scaleYSetter= B.prototype.matrixSetter=function(a,g){this[g]=a;this.doTransform=!0};B.prototype["stroke-widthSetter"]=B.prototype.strokeSetter=function(a,g,c){this[g]=a;this.stroke&&this["stroke-width"]?(B.prototype.fillSetter.call(this,this.stroke,"stroke",c),c.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===g&&0===a&&this.hasStroke&&(c.removeAttribute("stroke"),this.hasStroke=!1)};H=a.SVGRenderer=function(){this.init.apply(this,arguments)};h(H.prototype,{Element:B,SVG_NS:N, init:function(a,g,c,w,h,e){var y;w=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"}).css(this.getStyle(w));y=w.element;a.appendChild(y);f(a,"dir","ltr");-1===a.innerHTML.indexOf("xmlns")&&f(y,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=y;this.boxWrapper=w;this.alignedObjects=[];this.url=(z||x)&&m.getElementsByTagName("base").length?R.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(m.createTextNode("Created with Highcharts 6.0.7")); this.defs=this.createElement("defs").add();this.allowHTML=e;this.forExport=h;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(g,c,!1);var b;z&&a.getBoundingClientRect&&(g=function(){n(a,{left:0,top:0});b=a.getBoundingClientRect();n(a,{left:Math.ceil(b.left)-b.left+"px",top:Math.ceil(b.top)-b.top+"px"})},g(),this.unSubPixelFix=E(R,"resize",g))},getStyle:function(a){return this.style=h({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"}, a)},setStyle:function(a){this.boxWrapper.css(this.getStyle(a))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();b(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var g=new this.Element;g.init(this,a);return g},draw:A,getRadialAttr:function(a,g){return{cx:a[0]-a[2]/2+g.cx*a[2],cy:a[1]- a[2]/2+g.cy*a[2],r:g.r*a[2]}},getSpanWidth:function(a){return a.getBBox(!0).width},applyEllipsis:function(a,g,c,w){var h=a.rotation,y=c,b,e=0,d=c.length,k=function(a){g.removeChild(g.firstChild);a&&g.appendChild(m.createTextNode(a))},p;a.rotation=0;y=this.getSpanWidth(a,g);if(p=y>w){for(;e<=d;)b=Math.ceil((e+d)/2),y=c.substring(0,b)+"\u2026",k(y),y=this.getSpanWidth(a,g),e===d?e=d+1:y>w?d=b-1:e=b;0===d&&k("")}a.rotation=h;return p},escapes:{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;","'":"\x26#39;", '"':"\x26quot;"},buildText:function(a){var c=a.element,w=this,h=w.forExport,b=G(a.textStr,"").toString(),y=-1!==b.indexOf("\x3c"),k=c.childNodes,p,x,A,F,z=f(c,"x"),L=a.styles,O=a.textWidth,l=L&&L.lineHeight,D=L&&L.textOutline,C=L&&"ellipsis"===L.textOverflow,v=L&&"nowrap"===L.whiteSpace,u=L&&L.fontSize,M,t,I=k.length,L=O&&!a.added&&this.box,R=function(a){var h;h=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:u||w.style.fontSize||12;return l?g(l):w.fontMetrics(h,a.getAttribute("style")?a:c).h}, q=function(a,g){J(w.escapes,function(c,w){g&&-1!==r(c,g)||(a=a.toString().replace(new RegExp(c,"g"),w))});return a};M=[b,C,v,l,D,u,O].join();if(M!==a.textCache){for(a.textCache=M;I--;)c.removeChild(k[I]);y||D||C||O||-1!==b.indexOf(" ")?(p=/<.*class="([^"]+)".*>/,x=/<.*style="([^"]+)".*>/,A=/<.*href="([^"]+)".*>/,L&&L.appendChild(c),b=y?b.replace(/<(b|strong)>/g,'\x3cspan style\x3d"font-weight:bold"\x3e').replace(/<(i|em)>/g,'\x3cspan style\x3d"font-style:italic"\x3e').replace(//g, "\x3c/span\x3e").split(//g):[b],b=e(b,function(a){return""!==a}),d(b,function(g,b){var e,y=0;g=g.replace(/^\s+|\s+$/g,"").replace(//g,"\x3c/span\x3e|||");e=g.split("|||");d(e,function(g){if(""!==g||1===e.length){var d={},k=m.createElementNS(w.SVG_NS,"tspan"),r,L;p.test(g)&&(r=g.match(p)[1],f(k,"class",r));x.test(g)&&(L=g.match(x)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),f(k,"style",L));A.test(g)&&!h&&(f(k,"onclick",'location.href\x3d"'+g.match(A)[1]+ '"'),f(k,"class","highcharts-anchor"),n(k,{cursor:"pointer"}));g=q(g.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!==g){k.appendChild(m.createTextNode(g));y?d.dx=0:b&&null!==z&&(d.x=z);f(k,d);c.appendChild(k);!y&&t&&(!P&&h&&n(k,{display:"block"}),f(k,"dy",R(k)));if(O){d=g.replace(/([^\^])-/g,"$1- ").split(" ");r=1O,void 0===F&&(F=g), g&&1!==d.length?(k.removeChild(k.firstChild),l.unshift(d.pop())):(d=l,l=[],d.length&&!v&&(k=m.createElementNS(N,"tspan"),f(k,{dy:J,x:z}),L&&f(k,"style",L),c.appendChild(k)),D>O&&(O=D)),d.length&&k.appendChild(m.createTextNode(d.join(" ").replace(/- /g,"-")));a.rotation=G}y++}}});t=t||c.childNodes.length}),F&&a.attr("title",q(a.textStr,["\x26lt;","\x26gt;"])),L&&L.removeChild(c),D&&a.applyTextOutline&&a.applyTextOutline(D)):c.appendChild(m.createTextNode(q(b)))}},getContrast:function(a){a=t(a).rgba; return 510Math.abs(b.end-b.start-2*Math.PI));var p=Math.cos(h),y=Math.sin(h),x=Math.cos(k),k=Math.sin(k);b=.001>b.end-h-Math.PI?0:1;d=["M",a+d*p,g+e*y,"A",d,e,0,b,1,a+d*x,g+e*k];u(c)&&d.push(w?"M":"L",a+c*x,g+c*k,"A",c,c,0,b,0,a+c*p,g+c*y);d.push(w?"":"Z");return d},callout:function(a,g,c,w,b){var h=Math.min(b&&b.r||0,c,w),d=h+6,e=b&&b.anchorX;b=b&&b.anchorY;var k;k=["M",a+h,g,"L",a+c-h,g,"C",a+c,g,a+c,g,a+c,g+h,"L",a+c,g+w- h,"C",a+c,g+w,a+c,g+w,a+c-h,g+w,"L",a+h,g+w,"C",a,g+w,a,g+w,a,g+w-h,"L",a,g+h,"C",a,g,a,g,a+h,g];e&&e>c?b>g+d&&be?b>g+d&&bw&&e>a+d&&eb&&e>a+d&&ea?a+3:Math.round(1.2*a);return{h:c,b:Math.round(.8*c),f:a}},rotCorr:function(a,g,w){var b=a;g&&w&&(b=Math.max(b*Math.cos(g*c),4));return{x:-a/3*Math.sin(g*c),y:b}},label:function(g,c,b,e,k,p,x,N,m){var A=this,r=A.g("button"!==m&&"label"),y=r.text=A.text("",0,0,x).attr({zIndex:1}), L,P,z=0,O=3,l=0,n,D,f,J,C,G={},v,M,t=/^url\((.*?)\)$/.test(e),I=t,R,q,Q,T;m&&r.addClass("highcharts-"+m);I=t;R=function(){return(v||0)%2/2};q=function(){var a=y.element.style,g={};P=(void 0===n||void 0===D||C)&&u(y.textStr)&&y.getBBox();r.width=(n||P.width||0)+2*O+l;r.height=(D||P.height||0)+2*O;M=O+A.fontMetrics(a&&a.fontSize,y).b;I&&(L||(r.box=L=A.symbols[e]||t?A.symbol(e):A.rect(),L.addClass(("button"===m?"":"highcharts-label-box")+(m?" highcharts-"+m+"-box":"")),L.add(r),a=R(),g.x=a,g.y=(N?-M: 0)+a),g.width=Math.round(r.width),g.height=Math.round(r.height),L.attr(h(g,G)),G={})};Q=function(){var a=l+O,g;g=N?0:M;u(n)&&P&&("center"===C||"right"===C)&&(a+={center:.5,right:1}[C]*(n-P.width));if(a!==y.x||g!==y.y)y.attr("x",a),void 0!==g&&y.attr("y",g);y.x=a;y.y=g};T=function(a,g){L?L.attr(a,g):G[a]=g};r.onAdd=function(){y.add(r);r.attr({text:g||0===g?g:"",x:c,y:b});L&&u(k)&&r.attr({anchorX:k,anchorY:p})};r.widthSetter=function(g){n=a.isNumber(g)?g:null};r.heightSetter=function(a){D=a};r["text-alignSetter"]= function(a){C=a};r.paddingSetter=function(a){u(a)&&a!==O&&(O=r.padding=a,Q())};r.paddingLeftSetter=function(a){u(a)&&a!==l&&(l=a,Q())};r.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==z&&(z=a,P&&r.attr({x:f}))};r.textSetter=function(a){void 0!==a&&y.textSetter(a);q();Q()};r["stroke-widthSetter"]=function(a,g){a&&(I=!0);v=this["stroke-width"]=a;T(g,a)};r.strokeSetter=r.fillSetter=r.rSetter=function(a,g){"r"!==g&&("fill"===g&&a&&(I=!0),r[g]=a);T(g,a)};r.anchorXSetter=function(a,g){k=r.anchorX= a;T(g,Math.round(a)-R()-f)};r.anchorYSetter=function(a,g){p=r.anchorY=a;T(g,a-J)};r.xSetter=function(a){r.x=a;z&&(a-=z*((n||P.width)+2*O));f=Math.round(a);r.attr("translateX",f)};r.ySetter=function(a){J=r.y=Math.round(a);r.attr("translateY",J)};var U=r.css;return h(r,{css:function(a){if(a){var g={};a=F(a);d(r.textProps,function(c){void 0!==a[c]&&(g[c]=a[c],delete a[c])});y.css(g)}return U.call(r,a)},getBBox:function(){return{width:P.width+2*O,height:P.height+2*O,x:P.x-O,y:P.y-O}},shadow:function(a){a&& (q(),L&&L.shadow(a));return r},destroy:function(){w(r.element,"mouseenter");w(r.element,"mouseleave");y&&(y=y.destroy());L&&(L=L.destroy());B.prototype.destroy.call(r);r=A=q=Q=T=null}})}});a.Renderer=H})(K);(function(a){var B=a.attr,H=a.createElement,E=a.css,q=a.defined,f=a.each,l=a.extend,t=a.isFirefox,n=a.isMS,v=a.isWebKit,u=a.pick,c=a.pInt,b=a.SVGRenderer,m=a.win,d=a.wrap;l(a.SVGElement.prototype,{htmlCss:function(a){var c=this.element;if(c=a&&"SPAN"===c.tagName&&a.width)delete a.width,this.textWidth= c,this.updateTransform();a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=l(this.styles,a);E(this.element,a);return this},htmlGetBBox:function(){var a=this.element;return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,d=this.translateX||0,p=this.translateY||0,r=this.x||0,m=this.y||0,z=this.textAlign||"left",l={left:0,center:.5,right:1}[z],n=this.styles, C=n&&n.whiteSpace;E(b,{marginLeft:d,marginTop:p});this.shadows&&f(this.shadows,function(a){E(a,{marginLeft:d+1,marginTop:p+1})});this.inverted&&f(b.childNodes,function(c){a.invertChild(c,b)});if("SPAN"===b.tagName){var n=this.rotation,x=this.textWidth&&c(this.textWidth),F=[n,z,b.innerHTML,this.textWidth,this.textAlign].join(),A;(A=x!==this.oldTextWidth)&&!(A=x>this.oldTextWidth)&&((A=this.textPxLength)||(E(b,{width:"",whiteSpace:C||"nowrap"}),A=b.offsetWidth),A=A>x);A&&/[ \-]/.test(b.textContent|| b.innerText)&&(E(b,{width:x+"px",display:"block",whiteSpace:C||"normal"}),this.oldTextWidth=x);F!==this.cTT&&(C=a.fontMetrics(b.style.fontSize).b,q(n)&&n!==(this.oldRotation||0)&&this.setSpanRotation(n,l,C),this.getSpanCorrection(this.textPxLength||b.offsetWidth,C,l,n,z));E(b,{left:r+(this.xCorr||0)+"px",top:m+(this.yCorr||0)+"px"});this.cTT=F;this.oldRotation=n}}else this.alignOnAdd=!0},setSpanRotation:function(a,c,b){var d={},e=this.renderer.getTransformKey();d[e]=d.transform="rotate("+a+"deg)"; d[e+(t?"Origin":"-origin")]=d.transformOrigin=100*c+"% "+b+"px";E(this.element,d)},getSpanCorrection:function(a,c,b){this.xCorr=-a*b;this.yCorr=-c}});l(b.prototype,{getTransformKey:function(){return n&&!/Edge/.test(m.navigator.userAgent)?"-ms-transform":v?"-webkit-transform":t?"MozTransform":m.opera?"-o-transform":""},html:function(a,c,b){var e=this.createElement("span"),h=e.element,k=e.renderer,m=k.isSVG,n=function(a,c){f(["opacity","visibility"],function(b){d(a,b+"Setter",function(a,b,e,d){a.call(this, b,e,d);c[e]=b})})};e.textSetter=function(a){a!==h.innerHTML&&delete this.bBox;this.textStr=a;h.innerHTML=u(a,"");e.doTransform=!0};m&&n(e,e.element.style);e.xSetter=e.ySetter=e.alignSetter=e.rotationSetter=function(a,c){"align"===c&&(c="textAlign");e[c]=a;e.doTransform=!0};e.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)};e.attr({text:a,x:Math.round(c),y:Math.round(b)}).css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize,position:"absolute"}); h.style.whiteSpace="nowrap";e.css=e.htmlCss;m&&(e.add=function(a){var c,b=k.box.parentNode,d=[];if(this.parentGroup=a){if(c=a.div,!c){for(;a;)d.push(a),a=a.parentGroup;f(d.reverse(),function(a){function h(g,c){a[c]=g;"translateX"===c?k.left=g+"px":k.top=g+"px";a.doTransform=!0}var k,g=B(a.element,"class");g&&(g={className:g});c=a.div=a.div||H("div",g,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents}, c||b);k=c.style;l(a,{classSetter:function(a){return function(g){this.element.setAttribute("class",g);a.className=g}}(c),on:function(){d[0].div&&e.on.apply({element:d[0].div},arguments);return a},translateXSetter:h,translateYSetter:h});n(a,k)})}}else c=b;c.appendChild(h);e.added=!0;e.alignOnAdd&&e.htmlUpdateTransform();return e});return e}})})(K);(function(a){var B=a.defined,H=a.each,E=a.extend,q=a.merge,f=a.pick,l=a.timeUnits,t=a.win;a.Time=function(a){this.update(a,!1)};a.Time.prototype={defaultOptions:{}, update:function(n){var l=f(n&&n.useUTC,!0),u=this;this.options=n=q(!0,this.options||{},n);this.Date=n.Date||t.Date;this.timezoneOffset=(this.useUTC=l)&&n.timezoneOffset;this.getTimezoneOffset=this.timezoneOffsetFunction();(this.variableTimezone=!(l&&!n.getTimezoneOffset&&!n.timezone))||this.timezoneOffset?(this.get=function(a,b){var c=b.getTime(),d=c-u.getTimezoneOffset(b);b.setTime(d);a=b["getUTC"+a]();b.setTime(c);return a},this.set=function(c,b,m){var d;if(-1!==a.inArray(c,["Milliseconds","Seconds", "Minutes"]))b["set"+c](m);else d=u.getTimezoneOffset(b),d=b.getTime()-d,b.setTime(d),b["setUTC"+c](m),c=u.getTimezoneOffset(b),d=b.getTime()+c,b.setTime(d)}):l?(this.get=function(a,b){return b["getUTC"+a]()},this.set=function(a,b,m){return b["setUTC"+a](m)}):(this.get=function(a,b){return b["get"+a]()},this.set=function(a,b,m){return b["set"+a](m)})},makeTime:function(l,v,u,c,b,m){var d,h,k;this.useUTC?(d=this.Date.UTC.apply(0,arguments),h=this.getTimezoneOffset(d),d+=h,k=this.getTimezoneOffset(d), h!==k?d+=k-h:h-36E5!==this.getTimezoneOffset(d-36E5)||a.isSafari||(d-=36E5)):d=(new this.Date(l,v,f(u,1),f(c,0),f(b,0),f(m,0))).getTime();return d},timezoneOffsetFunction:function(){var l=this,f=this.options,u=t.moment;if(!this.useUTC)return function(a){return 6E4*(new Date(a)).getTimezoneOffset()};if(f.timezone){if(u)return function(a){return 6E4*-u.tz(a,f.timezone).utcOffset()};a.error(25)}return this.useUTC&&f.getTimezoneOffset?function(a){return 6E4*f.getTimezoneOffset(a)}:function(){return 6E4* (l.timezoneOffset||0)}},dateFormat:function(l,f,u){if(!a.defined(f)||isNaN(f))return a.defaultOptions.lang.invalidDate||"";l=a.pick(l,"%Y-%m-%d %H:%M:%S");var c=this,b=new this.Date(f),m=this.get("Hours",b),d=this.get("Day",b),h=this.get("Date",b),k=this.get("Month",b),e=this.get("FullYear",b),p=a.defaultOptions.lang,r=p.weekdays,n=p.shortWeekdays,z=a.pad,b=a.extend({a:n?n[d]:r[d].substr(0,3),A:r[d],d:z(h),e:z(h,2," "),w:d,b:p.shortMonths[k],B:p.months[k],m:z(k+1),y:e.toString().substr(2,2),Y:e,H:z(m), k:m,I:z(m%12||12),l:m%12||12,M:z(c.get("Minutes",b)),p:12>m?"AM":"PM",P:12>m?"am":"pm",S:z(b.getSeconds()),L:z(Math.round(f%1E3),3)},a.dateFormats);a.objectEach(b,function(a,b){for(;-1!==l.indexOf("%"+b);)l=l.replace("%"+b,"function"===typeof a?a.call(c,f):a)});return u?l.substr(0,1).toUpperCase()+l.substr(1):l},getTimeTicks:function(a,v,u,c){var b=this,m=[],d={},h,k=new b.Date(v),e=a.unitRange,p=a.count||1,r;if(B(v)){b.set("Milliseconds",k,e>=l.second?0:p*Math.floor(b.get("Milliseconds",k)/p));e>= l.second&&b.set("Seconds",k,e>=l.minute?0:p*Math.floor(b.get("Seconds",k)/p));e>=l.minute&&b.set("Minutes",k,e>=l.hour?0:p*Math.floor(b.get("Minutes",k)/p));e>=l.hour&&b.set("Hours",k,e>=l.day?0:p*Math.floor(b.get("Hours",k)/p));e>=l.day&&b.set("Date",k,e>=l.month?1:p*Math.floor(b.get("Date",k)/p));e>=l.month&&(b.set("Month",k,e>=l.year?0:p*Math.floor(b.get("Month",k)/p)),h=b.get("FullYear",k));e>=l.year&&b.set("FullYear",k,h-h%p);e===l.week&&b.set("Date",k,b.get("Date",k)-b.get("Day",k)+f(c,1)); h=b.get("FullYear",k);c=b.get("Month",k);var n=b.get("Date",k),z=b.get("Hours",k);v=k.getTime();b.variableTimezone&&(r=u-v>4*l.month||b.getTimezoneOffset(v)!==b.getTimezoneOffset(u));k=k.getTime();for(v=1;km.length&&H(m,function(a){0===a%18E5&&"000000000"===b.dateFormat("%H%M%S%L", a)&&(d[a]="day")})}m.info=E(a,{higherRanks:d,totalRange:e*p});return m}}})(K);(function(a){var B=a.color,H=a.merge;a.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:a.Time.prototype.defaultOptions,chart:{borderRadius:0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}, title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"}, shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:a.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M", day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:a.isTouchDevice?25:10,backgroundColor:B("#f7f7f7").setOpacity(.85).get(),borderWidth:1,headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{point.key}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e',shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",pointerEvents:"none", whiteSpace:"nowrap"}},credits:{enabled:!0,href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}};a.setOptions=function(B){a.defaultOptions=H(!0,a.defaultOptions,B);a.time.update(H(a.defaultOptions.global,a.defaultOptions.time),!1);return a.defaultOptions};a.getOptions=function(){return a.defaultOptions};a.defaultPlotOptions=a.defaultOptions.plotOptions;a.time=new a.Time(H(a.defaultOptions.global, a.defaultOptions.time));a.dateFormat=function(B,q,f){return a.time.dateFormat(B,q,f)}})(K);(function(a){var B=a.correctFloat,H=a.defined,E=a.destroyObjectProperties,q=a.isNumber,f=a.merge,l=a.pick,t=a.deg2rad;a.Tick=function(a,l,f,c){this.axis=a;this.pos=l;this.type=f||"";this.isNewLabel=this.isNew=!0;f||c||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,v=a.options,u=a.chart,c=a.categories,b=a.names,m=this.pos,d=v.labels,h=a.tickPositions,k=m===h[0],e=m===h[h.length-1],b=c? l(c[m],b[m],m):m,c=this.label,h=h.info,p;a.isDatetimeAxis&&h&&(p=v.dateTimeLabelFormats[h.higherRanks[m]||h.unitName]);this.isFirst=k;this.isLast=e;v=a.labelFormatter.call({axis:a,chart:u,isFirst:k,isLast:e,dateTimeLabelFormat:p,value:a.isLog?B(a.lin2log(b)):b,pos:m});if(H(c))c&&c.attr({text:v});else{if(this.label=c=H(v)&&d.enabled?u.renderer.text(v,0,0,d.useHTML).css(f(d.style)).add(a.labelGroup):null)c.textPxLength=c.getBBox().width;this.rotation=0}},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz? "height":"width"]:0},handleOverflow:function(a){var f=this.axis,n=f.options.labels,c=a.x,b=f.chart.chartWidth,m=f.chart.spacing,d=l(f.labelLeft,Math.min(f.pos,m[3])),m=l(f.labelRight,Math.max(f.isRadial?0:f.pos+f.len,b-m[1])),h=this.label,k=this.rotation,e={left:0,center:.5,right:1}[f.labelAlign||h.attr("align")],p=h.getBBox().width,r=f.getSlotWidth(),I=r,z=1,M,D={};if(k||!1===n.overflow)0>k&&c-e*pm&&(M=Math.round((b-c)/Math.cos(k*t)));else if(b=c+(1- e)*p,c-e*pm&&(I=m-a.x+I*e,z=-1),I=Math.min(r,I),II||f.autoRotation&&(h.styles||{}).width)M=I;M&&(D.width=M,(n.style||{}).textOverflow||(D.textOverflow="ellipsis"),h.css(D))},getPosition:function(l,f,u,c){var b=this.axis,m=b.chart,d=c&&m.oldChartHeight||m.chartHeight;return{x:l?a.correctFloat(b.translate(f+u,null,null,c)+b.transB):b.left+b.offset+(b.opposite?(c&&m.oldChartWidth||m.chartWidth)-b.right-b.left:0),y:l? d-b.bottom+b.offset-(b.opposite?b.height:0):a.correctFloat(d-b.translate(f+u,null,null,c)-b.transB)}},getLabelPosition:function(a,l,f,c,b,m,d,h){var k=this.axis,e=k.transA,p=k.reversed,r=k.staggerLines,n=k.tickRotCorr||{x:0,y:0},z=b.y,u=c||k.reserveSpaceDefault?0:-k.labelOffset*("center"===k.labelAlign?.5:1);H(z)||(z=0===k.side?f.rotation?-8:-f.getBBox().height:2===k.side?n.y+8:Math.cos(f.rotation*t)*(n.y-f.getBBox(!1,0).height/2));a=a+b.x+u+n.x-(m&&c?m*e*(p?-1:1):0);l=l+z-(m&&!c?m*e*(p?1:-1):0); r&&(f=d/(h||1)%r,k.opposite&&(f=r-f-1),l+=k.labelOffset/r*f);return{x:a,y:Math.round(l)}},getMarkPath:function(a,l,f,c,b,m){return m.crispLine(["M",a,l,"L",a+(b?0:-f),l+(b?f:0)],c)},renderGridLine:function(a,l,f){var c=this.axis,b=c.options,m=this.gridLine,d={},h=this.pos,k=this.type,e=c.tickmarkOffset,p=c.chart.renderer,r=k?k+"Grid":"grid",n=b[r+"LineWidth"],z=b[r+"LineColor"],b=b[r+"LineDashStyle"];m||(d.stroke=z,d["stroke-width"]=n,b&&(d.dashstyle=b),k||(d.zIndex=1),a&&(d.opacity=0),this.gridLine= m=p.path().attr(d).addClass("highcharts-"+(k?k+"-":"")+"grid-line").add(c.gridGroup));if(!a&&m&&(a=c.getPlotLinePath(h+e,m.strokeWidth()*f,a,!0)))m[this.isNew?"attr":"animate"]({d:a,opacity:l})},renderMark:function(a,f,u){var c=this.axis,b=c.options,m=c.chart.renderer,d=this.type,h=d?d+"Tick":"tick",k=c.tickSize(h),e=this.mark,p=!e,r=a.x;a=a.y;var n=l(b[h+"Width"],!d&&c.isXAxis?1:0),b=b[h+"Color"];k&&(c.opposite&&(k[0]=-k[0]),p&&(this.mark=e=m.path().addClass("highcharts-"+(d?d+"-":"")+"tick").add(c.axisGroup), e.attr({stroke:b,"stroke-width":n})),e[p?"attr":"animate"]({d:this.getMarkPath(r,a,k[0],e.strokeWidth()*u,c.horiz,m),opacity:f}))},renderLabel:function(a,f,u,c){var b=this.axis,m=b.horiz,d=b.options,h=this.label,k=d.labels,e=k.step,b=b.tickmarkOffset,p=!0,r=a.x;a=a.y;h&&q(r)&&(h.xy=a=this.getLabelPosition(r,a,h,m,k,b,c,e),this.isFirst&&!this.isLast&&!l(d.showFirstLabel,1)||this.isLast&&!this.isFirst&&!l(d.showLastLabel,1)?p=!1:!m||k.step||k.rotation||f||0===u||this.handleOverflow(a),e&&c%e&&(p=!1), p&&q(a.y)?(a.opacity=u,h[this.isNewLabel?"attr":"animate"](a),this.isNewLabel=!1):(h.attr("y",-9999),this.isNewLabel=!0))},render:function(f,t,u){var c=this.axis,b=c.horiz,m=this.getPosition(b,this.pos,c.tickmarkOffset,t),d=m.x,h=m.y,c=b&&d===c.pos+c.len||!b&&h===c.pos?-1:1;u=l(u,1);this.isActive=!0;this.renderGridLine(t,u,c);this.renderMark(m,u,c);this.renderLabel(m,t,u,f);this.isNew=!1;a.fireEvent(this,"afterRender")},destroy:function(){E(this,this.axis)}}})(K);var V=function(a){var B=a.addEvent, H=a.animObject,E=a.arrayMax,q=a.arrayMin,f=a.color,l=a.correctFloat,t=a.defaultOptions,n=a.defined,v=a.deg2rad,u=a.destroyObjectProperties,c=a.each,b=a.extend,m=a.fireEvent,d=a.format,h=a.getMagnitude,k=a.grep,e=a.inArray,p=a.isArray,r=a.isNumber,I=a.isString,z=a.merge,M=a.normalizeTickInterval,D=a.objectEach,C=a.pick,x=a.removeEvent,F=a.splat,A=a.syncTimeout,J=a.Tick,G=function(){this.init.apply(this,arguments)};a.extend(G.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L", second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,labels:{enabled:!0,style:{color:"#666666",cursor:"default",fontSize:"11px"},x:0},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,startOfWeek:1,startOnTick:!1,tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999", lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,formatter:function(){return a.numberFormat(this.total,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"#000000",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}}, defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(a,c){var g=c.isX,b=this;b.chart=a;b.horiz=a.inverted&&!b.isZAxis?!g:g;b.isXAxis=g;b.coll=b.coll||(g?"xAxis":"yAxis");b.opposite=c.opposite;b.side=c.side||(b.horiz?b.opposite?0:2:b.opposite?1:3);b.setOptions(c);var w=this.options,d=w.type;b.labelFormatter=w.labels.formatter|| b.defaultLabelFormatter;b.userOptions=c;b.minPixelPadding=0;b.reversed=w.reversed;b.visible=!1!==w.visible;b.zoomEnabled=!1!==w.zoomEnabled;b.hasNames="category"===d||!0===w.categories;b.categories=w.categories||b.hasNames;b.names||(b.names=[],b.names.keys={});b.plotLinesAndBandsGroups={};b.isLog="logarithmic"===d;b.isDatetimeAxis="datetime"===d;b.positiveValuesOnly=b.isLog&&!b.allowNegativeLog;b.isLinked=n(w.linkedTo);b.ticks={};b.labelEdge=[];b.minorTicks={};b.plotLinesAndBands=[];b.alternateBands= {};b.len=0;b.minRange=b.userMinRange=w.minRange||w.maxZoom;b.range=w.range;b.offset=w.offset||0;b.stacks={};b.oldStacks={};b.stacksTouched=0;b.max=null;b.min=null;b.crosshair=C(w.crosshair,F(a.options.tooltip.crosshairs)[g?0:1],!1);c=b.options.events;-1===e(b,a.axes)&&(g?a.axes.splice(a.xAxis.length,0,b):a.axes.push(b),a[b.coll].push(b));b.series=b.series||[];a.inverted&&!b.isZAxis&&g&&void 0===b.reversed&&(b.reversed=!0);D(c,function(a,g){B(b,g,a)});b.lin2log=w.linearToLogConverter||b.lin2log;b.isLog&& (b.val2lin=b.log2lin,b.lin2val=b.lin2log)},setOptions:function(a){this.options=z(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],z(t[this.coll],a))},defaultLabelFormatter:function(){var g=this.axis,c=this.value,b=g.chart.time,e=g.categories,h=this.dateTimeLabelFormat,k=t.lang,p=k.numericSymbols,k=k.numericSymbolMagnitude||1E3,x=p&&p.length,r,m=g.options.labels.format, g=g.isLog?Math.abs(c):g.tickInterval;if(m)r=d(m,this,b);else if(e)r=c;else if(h)r=b.dateFormat(h,c);else if(x&&1E3<=g)for(;x--&&void 0===r;)b=Math.pow(k,x+1),g>=b&&0===10*c%b&&null!==p[x]&&0!==c&&(r=a.numberFormat(c/b,-1)+p[x]);void 0===r&&(r=1E4<=Math.abs(c)?a.numberFormat(c,-1):a.numberFormat(c,-1,void 0,""));return r},getSeriesExtremes:function(){var a=this,b=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();c(a.series, function(g){if(g.visible||!b.options.chart.ignoreHiddenSeries){var c=g.options,w=c.threshold,d;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=w&&(w=null);if(a.isXAxis)c=g.xData,c.length&&(g=q(c),d=E(c),r(g)||g instanceof Date||(c=k(c,r),g=q(c),d=E(c)),c.length&&(a.dataMin=Math.min(C(a.dataMin,c[0],g),g),a.dataMax=Math.max(C(a.dataMax,c[0],d),d)));else if(g.getExtremes(),d=g.dataMax,g=g.dataMin,n(g)&&n(d)&&(a.dataMin=Math.min(C(a.dataMin,g),g),a.dataMax=Math.max(C(a.dataMax,d),d)),n(w)&&(a.threshold= w),!c.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})},translate:function(a,c,b,d,e,h){var g=this.linkedParent||this,w=1,k=0,p=d?g.oldTransA:g.transA;d=d?g.oldMin:g.min;var x=g.minPixelPadding;e=(g.isOrdinal||g.isBroken||g.isLog&&e)&&g.lin2val;p||(p=g.transA);b&&(w*=-1,k=g.len);g.reversed&&(w*=-1,k-=w*(g.sector||g.len));c?(a=(a*w+k-x)/p+d,e&&(a=g.lin2val(a))):(e&&(a=g.val2lin(a)),a=r(d)?w*(a-d)*p+k+w*x+(r(h)?p*h:0):void 0);return a},toPixels:function(a,c){return this.translate(a,!1,!this.horiz, null,!0)+(c?0:this.pos)},toValue:function(a,c){return this.translate(a-(c?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,c,b,d,e){var g=this.chart,w=this.left,h=this.top,k,p,x=b&&g.oldChartHeight||g.chartHeight,m=b&&g.oldChartWidth||g.chartWidth,N;k=this.transB;var A=function(a,g,c){if(ac)d?a=Math.min(Math.max(g,a),c):N=!0;return a};e=C(e,this.translate(a,null,null,b));e=Math.min(Math.max(-1E5,e),1E5);a=b=Math.round(e+k);k=p=Math.round(x-e-k);r(e)?this.horiz?(k=h,p=x-this.bottom, a=b=A(a,w,w+this.width)):(a=w,b=m-this.right,k=p=A(k,h,h+this.height)):(N=!0,d=!1);return N&&!d?null:g.renderer.crispLine(["M",a,k,"L",b,p],c||1)},getLinearTickPositions:function(a,c,b){var g,w=l(Math.floor(c/a)*a);b=l(Math.ceil(b/a)*a);var d=[],e;l(w+a)===w&&(e=20);if(this.single)return[c];for(c=w;c<=b;){d.push(c);c=l(c+a,e);if(c===g)break;g=c}return d},getMinorTickInterval:function(){var a=this.options;return!0===a.minorTicks?C(a.minorTickInterval,"auto"):!1===a.minorTicks?null:a.minorTickInterval}, getMinorTickPositions:function(){var a=this,b=a.options,d=a.tickPositions,e=a.minorTickInterval,h=[],k=a.pointRangePadding||0,p=a.min-k,k=a.max+k,x=k-p;if(x&&x/e=this.minRange,A=this.minRange,e=(A-d+b)/2,e=[b-e,C(a.min,b-e)],h&&(e[2]=this.isLog?this.log2lin(this.dataMin): this.dataMin),b=E(e),d=[b+A,C(a.max,b+A)],h&&(d[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),d=q(d),d-b=u?(v=u,z=0):b.dataMax<=u&&(q=u,f=0)),b.min=C(I,v,b.dataMin),b.max=C(B,q,b.dataMax));k&&(b.positiveValuesOnly&&!g&&0>=Math.min(b.min,C(b.dataMin,b.min))&&a.error(10,1),b.min=l(p(b.min),15),b.max= l(p(b.max),15));b.range&&n(b.max)&&(b.userMin=b.min=I=Math.max(b.dataMin,b.minFromRange()),b.userMax=B=b.max,b.range=null);m(b,"foundExtremes");b.beforePadding&&b.beforePadding();b.adjustForMinRange();!(G||b.axisPointRange||b.usePercentage||F)&&n(b.min)&&n(b.max)&&(p=b.max-b.min)&&(!n(I)&&z&&(b.min-=p*z),!n(B)&&f&&(b.max+=p*f));r(e.softMin)&&!r(b.userMin)&&(b.min=Math.min(b.min,e.softMin));r(e.softMax)&&!r(b.userMax)&&(b.max=Math.max(b.max,e.softMax));r(e.floor)&&(b.min=Math.max(b.min,e.floor));r(e.ceiling)&& (b.max=Math.min(b.max,e.ceiling));t&&n(b.dataMin)&&(u=u||0,!n(I)&&b.min=u?b.min=u:!n(B)&&b.max>u&&b.dataMax<=u&&(b.max=u));b.tickInterval=b.min===b.max||void 0===b.min||void 0===b.max?1:F&&!D&&J===b.linkedParent.options.tickPixelInterval?D=b.linkedParent.tickInterval:C(D,this.tickAmount?(b.max-b.min)/Math.max(this.tickAmount-1,1):void 0,G?1:(b.max-b.min)*J/Math.max(b.len,J));A&&!g&&c(b.series,function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(!0);b.beforeSetTickPositions&& b.beforeSetTickPositions();b.postProcessTickInterval&&(b.tickInterval=b.postProcessTickInterval(b.tickInterval));b.pointRange&&!D&&(b.tickInterval=Math.max(b.pointRange,b.tickInterval));g=C(e.minTickInterval,b.isDatetimeAxis&&b.closestPointRange);!D&&b.tickIntervalb.tickInterval&&1E3b.max)),!!this.tickAmount));this.tickAmount||(b.tickInterval=b.unsquish()); this.setTickPositions()},setTickPositions:function(){var a=this.options,b,c=a.tickPositions;b=this.getMinorTickInterval();var d=a.tickPositioner,e=a.startOnTick,h=a.endOnTick;this.tickmarkOffset=this.categories&&"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===b&&this.tickInterval?this.tickInterval/5:b;this.single=this.min===this.max&&n(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=b=c&&c.slice(); !b&&(b=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,a.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),b.length>this.len&&(b=[b[0],b.pop()],b[0]===b[1]&&(b.length=1)),this.tickPositions=b,d&&(d=d.apply(this,[this.min,this.max])))&&(this.tickPositions=b=d);this.paddedTicks=b.slice(0); this.trimTicks(b,e,h);this.isLinked||(this.single&&2>b.length&&(this.min-=.5,this.max+=.5),c||d||this.adjustTickAmount())},trimTicks:function(a,b,c){var g=a[0],d=a[a.length-1],e=this.minPointOffset||0;if(!this.isLinked){if(b&&-Infinity!==g)this.min=g;else for(;this.min-e>a[0];)a.shift();if(c)this.max=d;else for(;this.max+eb&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a= this.tickInterval,b=this.tickPositions,c=this.tickAmount,d=this.finalTickAmt,e=b&&b.length,h=C(this.threshold,this.softThreshold?0:null);if(this.hasData()){if(ec&&(this.tickInterval*=2,this.setTickPositions());if(n(d)){for(a=c=b.length;a--;)(3===d&&1===a%2||2>=d&&0d&&(a=d)),n(c)&&(bd&&(b=d))),this.displayBtn=void 0!==a||void 0!==b,this.setExtremes(a,b,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var b=this.chart,c=this.options,d=c.offsets||[0,0,0,0],e=this.horiz,h=this.width=Math.round(a.relativeLength(C(c.width,b.plotWidth-d[3]+d[1]),b.plotWidth)),k=this.height=Math.round(a.relativeLength(C(c.height,b.plotHeight-d[0]+d[2]),b.plotHeight)),p=this.top=Math.round(a.relativeLength(C(c.top,b.plotTop+d[0]),b.plotHeight, b.plotTop)),c=this.left=Math.round(a.relativeLength(C(c.left,b.plotLeft+d[3]),b.plotWidth,b.plotLeft));this.bottom=b.chartHeight-k-p;this.right=b.chartWidth-h-c;this.len=Math.max(e?h:k,0);this.pos=e?c:p},getExtremes:function(){var a=this.isLog,b=this.lin2log;return{min:a?l(b(this.min)):this.min,max:a?l(b(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,c=this.lin2log,g=b?c(this.min):this.min,b=b?c(this.max): this.max;null===a?a=g:g>a?a=g:ba?"right":195a?"left":"center"},tickSize:function(a){var b=this.options,c=b[a+"Length"],g=C(b[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(g&&c)return"inside"===b[a+"Position"]&&(c=-c),[c,g]},labelMetrics:function(){var a=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize, this.ticks[a]&&this.ticks[a].label)},unsquish:function(){var a=this.options.labels,b=this.horiz,d=this.tickInterval,e=d,h=this.len/(((this.categories?1:0)+this.max-this.min)/d),k,p=a.rotation,x=this.labelMetrics(),r,m=Number.MAX_VALUE,A,F=function(a){a/=h||1;a=1=a)r=F(Math.abs(x.h/Math.sin(v*a))),b=r+Math.abs(a/360),b(c.step||0)&&!c.rotation&&(this.staggerLines||1)*this.len/d||!b&&(c.style&&parseInt(c.style.width,10)||e&&e-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,d=this.tickPositions,e=this.ticks,h=this.options.labels,k=this.horiz, p=this.getSlotWidth(),x=Math.max(1,Math.round(p-2*(h.padding||5))),r={},m=this.labelMetrics(),A=h.style&&h.style.textOverflow,F,l,f=0,z;I(h.rotation)||(r.rotation=h.rotation||0);c(d,function(a){(a=e[a])&&a.label&&a.label.textPxLength>f&&(f=a.label.textPxLength)});this.maxLabelLength=f;if(this.autoRotation)f>x&&f>m.h?r.rotation=this.labelRotation:this.labelRotation=0;else if(p&&(F=x,!A))for(l="clip",x=d.length;!k&&x--;)if(z=d[x],z=e[z].label)z.styles&&"ellipsis"===z.styles.textOverflow?z.css({textOverflow:"clip"}): z.textPxLength>p&&z.css({width:p+"px"}),z.getBBox().height>this.len/d.length-(m.h-m.f)&&(z.specificTextOverflow="ellipsis");r.rotation&&(F=f>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight,A||(l="ellipsis"));if(this.labelAlign=h.align||this.autoLabelAlign(this.labelRotation))r.align=this.labelAlign;c(d,function(a){var b=(a=e[a])&&a.label;b&&(b.attr(r),!F||h.style&&h.style.width||!(F=this.min&&a<=this.max)g[a]||(g[a]=new J(this,a)),d&&g[a].isNew&&g[a].render(b,!0,.1),g[a].render(b)},render:function(){var b=this,d=b.chart,e=b.options,h=b.isLog,k=b.lin2log,p=b.isLinked,x=b.tickPositions, m=b.axisTitle,F=b.ticks,l=b.minorTicks,f=b.alternateBands,z=e.stackLabels,G=e.alternateGridColor,n=b.tickmarkOffset,u=b.axisLine,C=b.showAxis,t=H(d.renderer.globalAnimation),v,M;b.labelEdge.length=0;b.overlap=!1;c([F,l,f],function(a){D(a,function(a){a.isActive=!1})});if(b.hasData()||p)b.minorTickInterval&&!b.categories&&c(b.getMinorTickPositions(),function(a){b.renderMinorTick(a)}),x.length&&(c(x,function(a,c){b.renderTick(a,c)}),n&&(0===b.min||b.single)&&(F[-1]||(F[-1]=new J(b,-1,null,!0)),F[-1].render(-1))), G&&c(x,function(c,e){M=void 0!==x[e+1]?x[e+1]+n:b.max-n;0===e%2&&ct&&(!v||p<=n)&&void 0!==p&&d.push(p),p>n&&(r=!0),p=e;else t=b(t),n=b(n),a=v?this.getMinorTickInterval():l.tickInterval,a=f("auto"===a?null:a,this._minorAutoInterval,l.tickPixelInterval/(v?5:1)*(n-t)/((v?c/this.tickPositions.length:c)||1)),a=q(a,null,H(a)),d=E(this.getLinearTickPositions(a,t,n),m),v||(this._minorAutoInterval=a/5);v||(this.tickInterval=a);return d};B.prototype.log2lin= function(a){return Math.log(a)/Math.LN10};B.prototype.lin2log=function(a){return Math.pow(10,a)}})(K);(function(a,B){var H=a.arrayMax,E=a.arrayMin,q=a.defined,f=a.destroyObjectProperties,l=a.each,t=a.erase,n=a.merge,v=a.pick;a.PlotLineOrBand=function(a,c){this.axis=a;c&&(this.options=c,this.id=c.id)};a.PlotLineOrBand.prototype={render:function(){var f=this,c=f.axis,b=c.horiz,m=f.options,d=m.label,h=f.label,k=m.to,e=m.from,p=m.value,r=q(e)&&q(k),l=q(p),z=f.svgElem,t=!z,D=[],C=m.color,x=v(m.zIndex, 0),F=m.events,D={"class":"highcharts-plot-"+(r?"band ":"line ")+(m.className||"")},A={},J=c.chart.renderer,G=r?"bands":"lines",g=c.log2lin;c.isLog&&(e=g(e),k=g(k),p=g(p));l?(D={stroke:C,"stroke-width":m.width},m.dashStyle&&(D.dashstyle=m.dashStyle)):r&&(C&&(D.fill=C),m.borderWidth&&(D.stroke=m.borderColor,D["stroke-width"]=m.borderWidth));A.zIndex=x;G+="-"+x;(C=c.plotLinesAndBandsGroups[G])||(c.plotLinesAndBandsGroups[G]=C=J.g("plot-"+G).attr(A).add());t&&(f.svgElem=z=J.path().attr(D).add(C));if(l)D= c.getPlotLinePath(p,z.strokeWidth());else if(r)D=c.getPlotBandPath(e,k,m);else return;t&&D&&D.length?(z.attr({d:D}),F&&a.objectEach(F,function(a,b){z.on(b,function(a){F[b].apply(f,[a])})})):z&&(D?(z.show(),z.animate({d:D})):(z.hide(),h&&(f.label=h=h.destroy())));d&&q(d.text)&&D&&D.length&&0this.max&&c>this.max;if(m&&b)for(a&&(e=m.toString()===b.toString(),k=0),a=0;am-e?m:m-e);else if(r)k[a]=Math.max(g,d+e+c>b?d:d+e);else return!1},D=function(a,b,c,d){var e;db-h?e=!1:k[a]=db-c/2?b-c-2:d-c/2;return e},C= function(a){var b=r;r=f;f=b;p=a},x=function(){!1!==n.apply(0,r)?!1!==D.apply(0,f)||p||(C(!0),x()):p?k.x=k.y=0:(C(!0),x())};(c.inverted||1x&&(e=!1);a=(c.series&&c.series.yAxis&&c.series.yAxis.pos)+(c.plotY||0);a-=h.plotTop;d.push({target:c.isHeader?h.plotHeight+r:a,rank:c.isHeader?1:0,size:l.tt.getBBox().height+1,point:c,x:x,tt:z})}});this.cleanSplit();a.distribute(d,h.plotHeight+r);B(d,function(a){var b=a.point,c=b.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:e||b.isHeader?a.x:b.plotX+h.plotLeft+t(p.distance, 16),y:a.pos+h.plotTop,anchorX:b.isHeader?b.plotX+h.plotLeft:b.plotX+c.xAxis.pos,anchorY:b.isHeader?a.pos+h.plotTop-15:b.plotY+c.yAxis.pos})})},updatePosition:function(a){var b=this.chart,c=this.getLabel(),c=(this.options.positioner||this.getPosition).call(this,c.width,c.height,a);this.move(Math.round(c.x),Math.round(c.y||0),a.plotX+b.plotLeft,a.plotY+b.plotTop)},getDateFormat:function(a,b,m,d){var c=this.chart.time,k=c.dateFormat("%m-%d %H:%M:%S.%L",b),e,p,r={millisecond:15,second:12,minute:9,hour:6, day:3},f="millisecond";for(p in u){if(a===u.week&&+c.dateFormat("%w",b)===m&&"00:00:00.000"===k.substr(6)){p="week";break}if(u[p]>a){p=f;break}if(r[p]&&k.substr(r[p])!=="01-01 00:00:00.000".substr(r[p]))break;"week"!==p&&(f=p)}p&&(e=d[p]);return e},getXDateFormat:function(a,b,m){b=b.dateTimeLabelFormats;var c=m&&m.closestPointRange;return(c?this.getDateFormat(c,a.x,m.options.startOfWeek,b):b.day)||b.year},tooltipFooterHeaderFormatter:function(a,b){b=b?"footer":"header";var c=a.series,d=c.tooltipOptions, h=d.xDateFormat,k=c.xAxis,e=k&&"datetime"===k.options.type&&q(a.key),p=d[b+"Format"];e&&!h&&(h=this.getXDateFormat(a,d,k));e&&h&&B(a.point&&a.point.tooltipDateKeys||["key"],function(a){p=p.replace("{point."+a+"}","{point."+a+":"+h+"}")});return E(p,{point:a,series:c},this.chart.time)},bodyFormatter:function(a){return f(a,function(a){var b=a.series.tooltipOptions;return(b[(a.point.formatPrefix||"point")+"Formatter"]||a.point.tooltipFormatter).call(a.point,b[(a.point.formatPrefix||"point")+"Format"])})}}})(K); (function(a){var B=a.addEvent,H=a.attr,E=a.charts,q=a.color,f=a.css,l=a.defined,t=a.each,n=a.extend,v=a.find,u=a.fireEvent,c=a.isNumber,b=a.isObject,m=a.offset,d=a.pick,h=a.splat,k=a.Tooltip;a.Pointer=function(a,b){this.init(a,b)};a.Pointer.prototype={init:function(a,b){this.options=b;this.chart=a;this.runChartClick=b.chart.events&&!!b.chart.events.click;this.pinchDown=[];this.lastValidTouch={};k&&(a.tooltip=new k(a,b.tooltip),this.followTouchMove=d(b.tooltip.followTouchMove,!0));this.setDOMEvents()}, zoomOption:function(a){var b=this.chart,c=b.options.chart,e=c.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(e=d(c.pinchType,e));this.zoomX=a=/x/.test(e);this.zoomY=e=/y/.test(e);this.zoomHor=a&&!b||e&&b;this.zoomVert=e&&!b||a&&b;this.hasZoom=a||e},normalize:function(a,b){var c;c=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;b||(this.chartPosition=b=m(this.chart.container));return n(a,{chartX:Math.round(c.pageX-b.left),chartY:Math.round(c.pageY-b.top)})},getCoordinates:function(a){var b= {xAxis:[],yAxis:[]};t(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return b},findNearestKDPoint:function(a,c,d){var e;t(a,function(a){var h=!(a.noSharedTooltip&&c)&&0>a.options.findNearestPointBy.indexOf("y");a=a.searchPoint(d,h);if((h=b(a,!0))&&!(h=!b(e,!0)))var h=e.distX-a.distX,k=e.dist-a.dist,p=(a.series.group&&a.series.group.zIndex)-(e.series.group&&e.series.group.zIndex),h=0<(0!==h&&c?h:0!==k?k:0!==p?p:e.series.index> a.series.index?-1:1);h&&(e=a)});return e},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getChartCoordinatesFromPoint:function(a,b){var c=a.series,e=c.xAxis,c=c.yAxis,h=d(a.clientX,a.plotX);if(e&&c)return b?{chartX:e.len+e.pos-h,chartY:c.len+c.pos-a.plotY}:{chartX:h+e.pos,chartY:a.plotY+c.pos}},getHoverData:function(c,h,k,f,m,l,n){var e,x=[],p=n&&n.isBoosting;f=!(!f||!c);n=h&&!h.stickyTracking?[h]:a.grep(k,function(a){return a.visible&&!(!m&&a.directTouch)&& d(a.options.enableMouseTracking,!0)&&a.stickyTracking});h=(e=f?c:this.findNearestKDPoint(n,m,l))&&e.series;e&&(m&&!h.noSharedTooltip?(n=a.grep(k,function(a){return a.visible&&!(!m&&a.directTouch)&&d(a.options.enableMouseTracking,!0)&&!a.noSharedTooltip}),t(n,function(a){var c=v(a.points,function(a){return a.x===e.x&&!a.isNull});b(c)&&(p&&(c=a.getPoint(c)),x.push(c))})):x.push(e));return{hoverPoint:e,hoverSeries:h,hoverPoints:x}},runPointActions:function(b,c){var e=this.chart,h=e.tooltip&&e.tooltip.options.enabled? e.tooltip:void 0,k=h?h.shared:!1,p=c||e.hoverPoint,f=p&&p.series||e.hoverSeries,f=this.getHoverData(p,f,e.series,!!c||f&&f.directTouch&&this.isDirectTouch,k,b,{isBoosting:e.isBoosting}),m,p=f.hoverPoint;m=f.hoverPoints;c=(f=f.hoverSeries)&&f.tooltipOptions.followPointer;k=k&&f&&!f.noSharedTooltip;if(p&&(p!==e.hoverPoint||h&&h.isHidden)){t(e.hoverPoints||[],function(b){-1===a.inArray(b,m)&&b.setState()});t(m||[],function(a){a.setState("hover")});if(e.hoverSeries!==f)f.onMouseOver();e.hoverPoint&&e.hoverPoint.firePointEvent("mouseOut"); if(!p.series)return;p.firePointEvent("mouseOver");e.hoverPoints=m;e.hoverPoint=p;h&&h.refresh(k?m:p,b)}else c&&h&&!h.isHidden&&(p=h.getAnchor([{}],b),h.updatePosition({plotX:p[0],plotY:p[1]}));this.unDocMouseMove||(this.unDocMouseMove=B(e.container.ownerDocument,"mousemove",function(b){var c=E[a.hoverChartIndex];if(c)c.pointer.onDocumentMouseMove(b)}));t(e.axes,function(c){var e=d(c.crosshair.snap,!0),h=e?a.find(m,function(a){return a.series[c.coll]===c}):void 0;h||!e?c.drawCrosshair(b,h):c.hideCrosshair()})}, reset:function(a,b){var c=this.chart,d=c.hoverSeries,e=c.hoverPoint,k=c.hoverPoints,p=c.tooltip,f=p&&p.shared?k:e;a&&f&&t(h(f),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)p&&f&&(p.refresh(f),e&&(e.setState(e.state,!0),t(c.axes,function(a){a.crosshair&&a.drawCrosshair(null,e)})));else{if(e)e.onMouseOut();k&&t(k,function(a){a.setState()});if(d)d.onMouseOut();p&&p.hide(b);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());t(c.axes,function(a){a.hideCrosshair()});this.hoverX= c.hoverPoints=c.hoverPoint=null}},scaleGroups:function(a,b){var c=this.chart,d;t(c.series,function(e){d=a||e.getPlotBox();e.xAxis&&e.xAxis.zoomEnabled&&e.group&&(e.group.attr(d),e.markerGroup&&(e.markerGroup.attr(d),e.markerGroup.clip(b?c.clipRect:null)),e.dataLabelsGroup&&e.dataLabelsGroup.attr(d))});c.clipRect.attr(b||c.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b= this.chart,c=b.options.chart,d=a.chartX,e=a.chartY,h=this.zoomHor,k=this.zoomVert,f=b.plotLeft,x=b.plotTop,m=b.plotWidth,A=b.plotHeight,l,n=this.selectionMarker,g=this.mouseDownX,w=this.mouseDownY,t=c.panKey&&a[c.panKey+"Key"];n&&n.touch||(df+m&&(d=f+m),ex+A&&(e=x+A),this.hasDragged=Math.sqrt(Math.pow(g-d,2)+Math.pow(w-e,2)),10x.max&&(f=x.max-z,w=!0);w?(J-=.8*(J-m[k][0]),F||(g-=.8*(g-m[k][1])),l()):m[k]= [J,g];C||(b[k]=t-n,b[r]=z);b=C?1/D:D;c[r]=z;c[k]=f;q[C?a?"scaleY":"scaleX":"scale"+e]=D;q["translate"+e]=b*n+(J-b*A)},pinch:function(a){var n=this,t=n.chart,u=n.pinchDown,c=a.touches,b=c.length,m=n.lastValidTouch,d=n.hasZoom,h=n.selectionMarker,k={},e=1===b&&(n.inClass(a.target,"highcharts-tracker")&&t.runTrackerClick||n.runChartClick),p={};1b-6&&k(F||b.spacingBox.width-2*D-d.x)&&(this.itemX=D,this.itemY+=J+this.lastLineHeight+A,this.lastLineHeight=0);this.maxItemWidth=Math.max(this.maxItemWidth,z); this.lastItemY=J+this.itemY+A;this.lastLineHeight=Math.max(c,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];f?this.itemX+=z:(this.itemY+=J+c+A,this.lastLineHeight=c);this.offsetWidth=F||Math.max((f?this.itemX-D-(a.checkbox?0:C):z)+D,this.offsetWidth)},getAllItems:function(){var a=[];f(this.chart.series,function(b){var c=b&&b.options;b&&v(c.showInLegend,q(c.linkedTo)?!1:void 0,!0)&&(a=a.concat(b.legendItems||("point"===c.legendType?b.data:b)))});return a},getAlignment:function(){var a= this.options;return a.floating?"":a.align.charAt(0)+a.verticalAlign.charAt(0)+a.layout.charAt(0)},adjustMargins:function(a,b){var c=this.chart,d=this.options,h=this.getAlignment();h&&f([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(e,k){e.test(h)&&!q(a[k])&&(c[t[k]]=Math.max(c[t[k]],c.legend[(k+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][k]*d[k%2?"x":"y"]+v(d.margin,12)+b[k]+(0===k?c.titleOffset+c.options.title.margin:0)))})},render:function(){var a=this,b=a.chart,k=b.renderer, e=a.group,m,l,t,z,q=a.box,D=a.options,C=a.padding;a.itemX=C;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;e||(a.group=e=k.g("legend").attr({zIndex:7}).add(),a.contentGroup=k.g().attr({zIndex:1}).add(e),a.scrollGroup=k.g().add(a.contentGroup));a.renderTitle();m=a.getAllItems();c(m,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});D.reversed&&m.reverse();a.allItems=m;a.display=l=!!m.length;a.lastLineHeight=0;f(m,function(b){a.renderItem(b)});t= (D.width||a.offsetWidth)+C;z=a.lastItemY+a.lastLineHeight+a.titleHeight;z=a.handleOverflow(z);z+=C;q||(a.box=q=k.rect().addClass("highcharts-legend-box").attr({r:D.borderRadius}).add(e),q.isNew=!0);q.attr({stroke:D.borderColor,"stroke-width":D.borderWidth||0,fill:D.backgroundColor||"none"}).shadow(D.shadow);0c&&!1!==D.enabled?(this.clipHeight=z=Math.max(c-20-this.titleHeight-n,0),this.currentPage=v(this.currentPage,1),this.fullHeight=a,f(G,function(a,b){var c=a._legendItemPos[1],d=Math.round(a.legendItem.getBBox().height),g=A.length; if(!g||c-A[g-1]>z&&(J||c)!==A[g-1])A.push(J||c),g++;a.pageIx=g-1;J&&(G[b-1].pageIx=g-1);b===G.length-1&&c+d-A[g-1]>z&&(A.push(c),a.pageIx=g);c!==J&&(J=c)}),q||(q=b.clipRect=d.clipRect(0,n,9999,0),b.contentGroup.clip(q)),g(z),F||(this.nav=F=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,x,x).on("click",function(){b.scroll(-1,t)}).add(F),this.pager=d.text("",15,10).addClass("highcharts-legend-navigation").css(D.style).add(F),this.down=d.symbol("triangle-down",0,0,x,x).on("click", function(){b.scroll(1,t)}).add(F)),b.scroll(0),a=c):F&&(g(),this.nav=F.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,b){var c=this.pages,d=c.length;a=this.currentPage+a;var h=this.clipHeight,f=this.options.navigation,m=this.pager,l=this.padding;a>d&&(a=d);0k&&(c=typeof a[0],"string"===c?b.name=a[0]:"number"===c&&(b.x=a[0]),e++);f=d.value;)d=b[++f];d&&d.color&&!this.options.color&&(this.color=d.color);return d},destroy:function(){var a=this.series.chart,b=a.hoverPoints,f;a.pointCount--;b&&(this.setState(),q(b,this),b.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)u(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(f in this)this[f]=null},destroyElements:function(){for(var a= ["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],b,f=6;f--;)b=a[f],this[b]&&(this[b]=this[b].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var b=this.series,c=b.tooltipOptions,d=v(c.valueDecimals,""),h=c.valuePrefix||"",k=c.valueSuffix||"";H(b.pointArrayMap||["y"], function(b){b="{point."+b;if(h||k)a=a.replace(b+"}",h+b+"}"+k);a=a.replace(b+"}",b+":,."+d+"f}")});return l(a,{point:this,series:this.series},b.chart.time)},firePointEvent:function(a,b,m){var c=this,h=this.series.options;(h.point.events[a]||c.options&&c.options.events&&c.options.events[a])&&this.importEvents();"click"===a&&h.allowPointSelect&&(m=function(a){c.select&&c.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});f(this,a,b,m)},visible:!0}})(K);(function(a){var B=a.addEvent,H=a.animObject,E=a.arrayMax, q=a.arrayMin,f=a.correctFloat,l=a.defaultOptions,t=a.defaultPlotOptions,n=a.defined,v=a.each,u=a.erase,c=a.extend,b=a.fireEvent,m=a.grep,d=a.isArray,h=a.isNumber,k=a.isString,e=a.merge,p=a.objectEach,r=a.pick,I=a.removeEvent,z=a.splat,M=a.SVGElement,D=a.syncTimeout,C=a.win;a.Series=a.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",enabledThreshold:2,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50}, enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}}, select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:a.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,b){var d=this,e,h=a.series,g;d.chart=a;d.options=b=d.setOptions(b);d.linkedSeries=[];d.bindAxes();c(d,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===b.selected});e=b.events;p(e,function(a,b){B(d,b,a)});if(e&&e.click||b.point&&b.point.events&& b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;d.getColor();d.getSymbol();v(d.parallelArrays,function(a){d[a+"Data"]=[]});d.setData(b.data,!1);d.isCartesian&&(a.hasCartesianSeries=!0);h.length&&(g=h[h.length-1]);d._i=r(g&&g._i,-1)+1;a.orderSeries(this.insert(h))},insert:function(a){var b=this.options.index,c;if(h(b)){for(c=a.length;c--;)if(b>=r(a[c].options.index,a[c]._i)){a.splice(c+1,0,this);break}-1===c&&a.unshift(this);c+=1}else a.push(this);return r(c,a.length-1)},bindAxes:function(){var b= this,c=b.options,d=b.chart,e;v(b.axisTypes||[],function(h){v(d[h],function(a){e=a.options;if(c[h]===e.index||void 0!==c[h]&&c[h]===e.id||void 0===c[h]&&0===e.index)b.insert(a.series),b[h]=a,a.isDirty=!0});b[h]||b.optionalAxis===h||a.error(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,d=arguments,e=h(b)?function(g){var d="y"===g&&c.toYData?c.toYData(a):a[g];c[g+"Data"][b]=d}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(d,2))};v(c.parallelArrays,e)},autoIncrement:function(){var a= this.options,b=this.xIncrement,c,d=a.pointIntervalUnit,e=this.chart.time,b=r(b,a.pointStart,0);this.pointInterval=c=r(this.pointInterval,a.pointInterval,1);d&&(a=new e.Date(b),"day"===d?e.set("Date",a,e.get("Date",a)+c):"month"===d?e.set("Month",a,e.get("Month",a)+c):"year"===d&&e.set("FullYear",a,e.get("FullYear",a)+c),c=a.getTime()-b);this.xIncrement=b+c;return b},setOptions:function(a){var b=this.chart,c=b.options,d=c.plotOptions,h=(b.userOptions||{}).plotOptions||{},g=d[this.type];this.userOptions= a;b=e(g,d.series,a);this.tooltipOptions=e(l.tooltip,l.plotOptions.series&&l.plotOptions.series.tooltip,l.plotOptions[this.type].tooltip,c.tooltip.userOptions,d.series&&d.series.tooltip,d[this.type].tooltip,a.tooltip);this.stickyTracking=r(a.stickyTracking,h[this.type]&&h[this.type].stickyTracking,h.series&&h.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:b.stickyTracking);null===g.marker&&delete b.marker;this.zoneAxis=b.zoneAxis;a=this.zones=(b.zones||[]).slice();!b.negativeColor&& !b.negativeFillColor||b.zones||a.push({value:b[this.zoneAxis+"Threshold"]||b.threshold||0,className:"highcharts-negative",color:b.negativeColor,fillColor:b.negativeFillColor});a.length&&n(a[a.length-1].value)&&a.push({color:this.color,fillColor:this.fillColor});return b},getName:function(){return this.name||"Series "+(this.index+1)},getCyclic:function(a,b,c){var d,e=this.chart,g=this.userOptions,h=a+"Index",k=a+"Counter",f=c?c.length:r(e.options.chart[a+"Count"],e[a+"Count"]);b||(d=r(g[h],g["_"+h]), n(d)||(e.series.length||(e[k]=0),g["_"+h]=d=e[k]%f,e[k]+=1),c&&(b=c[d]));void 0!==d&&(this[h]=d);this[a]=b},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||t[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,setData:function(b,c,e,f){var m=this,g=m.points,l=g&&g.length||0,x,p=m.options,F= m.chart,n=null,A=m.xAxis,z=p.turboThreshold,q=this.xData,D=this.yData,t=(x=m.pointArrayMap)&&x.length;b=b||[];x=b.length;c=r(c,!0);if(!1!==f&&x&&l===x&&!m.cropped&&!m.hasGroupedData&&m.visible)v(b,function(a,b){g[b].update&&a!==p.data[b]&&g[b].update(a,!1,null,!1)});else{m.xIncrement=null;m.colorCounter=0;v(this.parallelArrays,function(a){m[a+"Data"].length=0});if(z&&x>z){for(e=0;null===n&&em||this.forceCrop))if(c[e-1]q)c=[],d=[];else if(c[0]q)h=this.cropData(this.xData, this.yData,z,q),c=h.xData,d=h.yData,h=h.start,g=!0;for(m=c.length||1;--m;)e=n?l(c[m])-l(c[m-1]):c[m]-c[m-1],0e&&r&&(a.error(15),r=!1);this.cropped=g;this.cropStart=h;this.processedXData=c;this.processedYData=d;this.closestPointRange=k},cropData:function(a,b,c,d){var e=a.length,g=0,h=e,k=r(this.cropShoulder,1),f;for(f=0;f=c){g=Math.max(0,f-k);break}for(c=f;cd){h=c+k;break}return{xData:a.slice(g,h),yData:b.slice(g,h),start:g,end:h}},generatePoints:function(){var a= this.options,b=a.data,c=this.data,d,e=this.processedXData,g=this.processedYData,h=this.pointClass,k=e.length,f=this.cropStart||0,m,l=this.hasGroupedData,a=a.keys,p,n=[],r;c||l||(c=[],c.length=b.length,c=this.data=c);a&&l&&(this.options.keys=!1);for(r=0;r=f&&(c[n-1]||p)<=m,l&&p)if(l=x.length)for(;l--;)"number"=== typeof x[l]&&(k[g++]=x[l]);else k[g++]=x;this.dataMin=q(k);this.dataMax=E(k)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,c=a.stacking,e=this.xAxis,d=e.categories,k=this.yAxis,g=this.points,m=g.length,l=!!this.modifyValue,p=a.pointPlacement,z="between"===p||h(p),q=a.threshold,D=a.startFromThreshold?q:0,t,C,v,u,M=Number.MAX_VALUE;"between"===p&&(p=.5);h(p)&&(p*=r(a.pointRange||e.pointRange));for(a=0;a=E&&(I.isNull=!0);I.plotX=t=f(Math.min(Math.max(-1E5,e.translate(B,0,0,0,1,p,"flags"===this.type)),1E5));c&&this.visible&&!I.isNull&&H&&H[B]&&(u=this.getStackIndicator(u,B,this.index),K=H[B],E=K.points[u.key],C=E[0],E=E[1],C===D&&u.key===H[B].base&&(C=r(q,k.min)),k.positiveValuesOnly&&0>=C&&(C=null),I.total=I.stackTotal=K.total,I.percentage=K.total&&I.y/K.total*100,I.stackY=E,K.setOffset(this.pointXOffset|| 0,this.barW||0));I.yBottom=n(C)?Math.min(Math.max(-1E5,k.translate(C,0,1,0,1)),1E5):null;l&&(E=this.modifyValue(E,I));I.plotY=C="number"===typeof E&&Infinity!==E?Math.min(Math.max(-1E5,k.translate(E,0,1,0,1)),1E5):void 0;I.isInside=void 0!==C&&0<=C&&C<=k.len&&0<=t&&t<=e.len;I.clientX=z?f(e.translate(B,0,0,0,1,p)):t;I.negative=I.y<(q||0);I.category=d&&void 0!==d[I.x]?d[I.x]:I.x;I.isNull||(void 0!==v&&(M=Math.min(M,Math.abs(t-v))),v=t);I.zone=this.zones.length&&I.getZone()}this.closestPointRangePx= M;b(this,"afterTranslate")},getValidPoints:function(a,b){var c=this.chart;return m(a||this.points||[],function(a){return b&&!c.isInsidePlot(a.plotX,a.plotY,c.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,c=this.options,e=b.renderer,d=b.inverted,g=this.clipBox,h=g||b.clipBox,k=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,h.height,c.xAxis,c.yAxis].join(),f=b[k],m=b[k+"m"];f||(a&&(h.width=0,d&&(h.x=b.plotSizeX),b[k+"m"]=m=e.clipRect(d?b.plotSizeX+99:-99,d?-b.plotLeft: -b.plotTop,99,d?b.chartWidth:b.chartHeight)),b[k]=f=e.clipRect(h),f.count={length:0});a&&!f.count[this.index]&&(f.count[this.index]=!0,f.count.length+=1);!1!==c.clip&&(this.group.clip(a||g?f:b.clipRect),this.markerGroup.clip(m),this.sharedClipKey=k);a||(f.count[this.index]&&(delete f.count[this.index],--f.count.length),0===f.count.length&&k&&b[k]&&(g||(b[k]=b[k].destroy()),b[k+"m"]&&(b[k+"m"]=b[k+"m"].destroy())))},animate:function(a){var b=this.chart,c=H(this.options.animation),e;a?this.setClip(c): (e=this.sharedClipKey,(a=b[e])&&a.animate({width:b.plotSizeX,x:0},c),b[e+"m"]&&b[e+"m"].animate({width:b.plotSizeX+99,x:0},c),this.animate=null)},afterAnimate:function(){this.setClip();b(this,"afterAnimate");this.finishedAnimating=!0},drawPoints:function(){var a=this.points,b=this.chart,c,e,d,g,h=this.options.marker,k,f,m,l=this[this.specialGroup]||this.markerGroup,p,n=r(h.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>=h.enabledThreshold*h.radius);if(!1!==h.enabled||this._hasPointMarkers)for(c= 0;cd&&b.shadow));h&&(h.startX=c.xMap,h.isArea=c.isArea)})},applyZones:function(){var a=this,b=this.chart,c=b.renderer,e=this.zones,d,g,h=this.clips||[],k,f=this.graph,m=this.area,l=Math.max(b.chartWidth,b.chartHeight),p=this[(this.zoneAxis||"y")+"Axis"],n,z,q=b.inverted,D,t,C,u,M=!1;e.length&&(f||m)&&p&&void 0!==p.min&&(z=p.reversed,D=p.horiz,f&&f.hide(),m&&m.hide(), n=p.getExtremes(),v(e,function(e,x){d=z?D?b.plotWidth:0:D?0:p.toPixels(n.min);d=Math.min(Math.max(r(g,d),0),l);g=Math.min(Math.max(Math.round(p.toPixels(r(e.value,n.max),!0)),0),l);M&&(d=g=p.toPixels(n.max));t=Math.abs(d-g);C=Math.min(d,g);u=Math.max(d,g);p.isXAxis?(k={x:q?u:C,y:0,width:t,height:l},D||(k.x=b.plotHeight-k.x)):(k={x:0,y:q?u:C,width:l,height:t},D&&(k.y=b.plotWidth-k.y));q&&c.isVML&&(k=p.isXAxis?{x:0,y:z?C:u,height:k.width,width:b.chartWidth}:{x:k.y-b.plotLeft-b.spacingBox.x,y:0,width:k.height, height:b.chartHeight});h[x]?h[x].animate(k):(h[x]=c.clipRect(k),f&&a["zone-graph-"+x].clip(h[x]),m&&a["zone-area-"+x].clip(h[x]));M=e.value>n.max}),this.clips=h)},invertGroups:function(a){function b(){v(["group","markerGroup"],function(b){c[b]&&(e.renderer.isVML&&c[b].attr({width:c.yAxis.len,height:c.xAxis.len}),c[b].width=c.yAxis.len,c[b].height=c.xAxis.len,c[b].invert(a))})}var c=this,e=c.chart,d;c.xAxis&&(d=B(e,"resize",b),B(c,"destroy",d),b(a),c.invertGroups=b)},plotGroup:function(a,b,c,e,d){var g= this[a],h=!g;h&&(this[a]=g=this.chart.renderer.g().attr({zIndex:e||.1}).add(d));g.addClass("highcharts-"+b+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(n(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(g.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0);g.attr({visibility:c})[h?"attr":"animate"](this.getPlotBox());return g},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;a.inverted&&(b=c,c=this.xAxis); return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,c=a.chart,e,d=a.options,h=!!a.animate&&c.renderer.isSVG&&H(d.animation).duration,g=a.visible?"inherit":"hidden",k=d.zIndex,f=a.hasRendered,m=c.seriesGroup,l=c.inverted;e=a.plotGroup("group","series",g,k,m);a.markerGroup=a.plotGroup("markerGroup","markers",g,k,m);h&&a.animate(!0);e.inverted=a.isCartesian?l:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.drawDataLabels&&a.drawDataLabels(); a.visible&&a.drawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(l);!1===d.clip||a.sharedClipKey||f||e.clip(c.clipRect);h&&a.animate();f||(a.animationTimeout=D(function(){a.afterAnimate()},h));a.isDirty=!1;a.hasRendered=!0;b(a,"afterRender")},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,c=this.group,e=this.xAxis,d=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:r(e&&e.left,a.plotLeft), translateY:r(d&&d.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var c=this.xAxis,e=this.yAxis,d=this.chart.inverted;return this.searchKDTree({clientX:d?c.len-a.chartY+c.pos:a.chartX-c.pos,plotY:d?e.len-a.chartX+e.pos:a.chartY-e.pos},b)},buildKDTree:function(){function a(c,e,d){var g,h;if(h=c&&c.length)return g=b.kdAxisArray[e%d],c.sort(function(a,b){return a[g]-b[g]}),h=Math.floor(h/2),{point:c[h],left:a(c.slice(0, h),e+1,d),right:a(c.slice(h+1),e+1,d)}}this.buildingKdTree=!0;var b=this,c=-1l?"left":"right";r=0>l?"right":"left";b[p]&&(p=c(a,b[p],k+1,f),z=p[h]z;)r--;this.updateParallelArrays(l,"splice",r,0,0);this.updateParallelArrays(l,r);g&&l.name&&(g[z]=l.name);p.splice(r,0,a);m&&(this.data.splice(r,0,null),this.processData());"point"===h.legendType&&this.generatePoints();c&&(k[0]&&k[0].remove?k[0].remove(!1):(k.shift(),this.updateParallelArrays(l,"shift"),p.shift()));this.isDirtyData=this.isDirty=!0;b&&f.redraw(d)},removePoint:function(a,b,c){var d=this,h=d.data,k=h[a],f=d.points,g=d.chart,p=function(){f&&f.length===h.length&& f.splice(a,1);h.splice(a,1);d.options.data.splice(a,1);d.updateParallelArrays(k||{series:d},"splice",a,1);k&&k.destroy();d.isDirty=!0;d.isDirtyData=!0;b&&g.redraw()};z(c,g);b=e(b,!0);k?k.firePointEvent("remove",null,p):p()},remove:function(a,b,c){function d(){h.destroy();k.isDirtyLegend=k.isDirtyBox=!0;k.linkSeries();e(a,!0)&&k.redraw(b)}var h=this,k=h.chart;!1!==c?u(h,"remove",null,d):d()},update:function(a,b){var c=this,d=c.chart,k=c.userOptions,f=c.oldType||c.type,p=a.type||k.type||d.options.chart.type, g=I[f].prototype,l,m=["group","markerGroup","dataLabelsGroup"],n=["navigatorSeries","baseSeries"],r=c.finishedAnimating&&{animation:!1};if(Object.keys&&"data"===Object.keys(a).toString())return this.setData(a.data,b);n=m.concat(n);t(n,function(a){n[a]=c[a];delete c[a]});a=h(k,r,{index:c.index,pointStart:c.xData[0]},{data:c.options.data},a);c.remove(!1,null,!1);for(l in g)c[l]=void 0;v(c,I[p||f].prototype);t(n,function(a){c[a]=n[a]});c.init(d,a);a.zIndex!==k.zIndex&&t(m,function(b){c[b]&&c[b].attr({zIndex:a.zIndex})}); c.oldType=f;d.linkSeries();e(b,!0)&&d.redraw(!1)}});v(E.prototype,{update:function(a,b){var c=this.chart;a=c.options[this.coll][this.options.index]=h(this.userOptions,a);this.destroy(!0);this.init(c,v(a,{events:void 0}));c.isDirtyBox=!0;e(b,!0)&&c.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,h=this.series,k=h.length;k--;)h[k]&&h[k].remove(!1);n(b.axes,this);n(b[c],this);d(b.options[c])?b.options[c].splice(this.options.index,1):delete b.options[c];t(b[c],function(a,b){a.options.index= b});this.destroy();b.isDirtyBox=!0;e(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})})(K);(function(a){var B=a.color,H=a.each,E=a.map,q=a.pick,f=a.Series,l=a.seriesType;l("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(f){var l=[],t=[],u=this.xAxis,c=this.yAxis,b=c.stacks[this.stackKey],m={},d=this.index,h=c.series,k=h.length,e,p=q(c.options.reversedStacks,!0)?1:-1,r;f=f||this.points; if(this.options.stacking){for(r=0;ra&&v>l?(v=Math.max(a,l),c=2*l-v):vq&&c>l?(c=Math.max(q,l),v=2*l-c):c=Math.abs(b)&&.5a.closestPointRange*a.xAxis.transA,d=a.borderWidth=t(f.borderWidth,d?0:1),h=a.yAxis,k=f.threshold,e=a.translatedThreshold=h.getThreshold(k),l=t(f.minPointLength,5),r=a.getColumnMetrics(),q=r.width,z=a.barW=Math.max(q,1+2*d),u=a.pointXOffset=r.offset;b.inverted&&(e-=.5);f.pointPadding&&(z=Math.ceil(z));n.prototype.translate.apply(a);E(a.points,function(c){var d=t(c.yBottom,e),f=999+Math.abs(d),f=Math.min(Math.max(-f,c.plotY),h.len+f),p=c.plotX+u,m=z,n=Math.min(f,d),r,g=Math.max(f,d)-n;l&& Math.abs(g)l?d-l:e-(r?l:0));c.barX=p;c.pointWidth=q;c.tooltipPos=b.inverted?[h.len+h.pos-b.plotLeft-f,a.xAxis.len-p-m/2,g]:[p+m/2,f+h.pos-b.plotTop,g];c.shapeType="rect";c.shapeArgs=a.crispCol.apply(a,c.isNull?[p,e,m,0]:[p,n,m,g])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")}, pointAttribs:function(a,b){var c=this.options,d,h=this.pointAttrToOptions||{};d=h.stroke||"borderColor";var f=h["stroke-width"]||"borderWidth",e=a&&a.color||this.color,p=a&&a[d]||c[d]||this.color||e,n=a&&a[f]||c[f]||this[f]||0,h=c.dashStyle;a&&this.zones.length&&(e=a.getZone(),e=a.options.color||e&&e.color||this.color);b&&(a=l(c.states[b],a.options.states&&a.options.states[b]||{}),b=a.brightness,e=a.color||void 0!==b&&H(e).brighten(a.brightness).get()||e,p=a[d]||p,n=a[f]||n,h=a.dashStyle||h);d={fill:e, stroke:p,"stroke-width":n};h&&(d.dashstyle=h);return d},drawPoints:function(){var a=this,b=this.chart,m=a.options,d=b.renderer,h=m.animationLimit||250,k;E(a.points,function(c){var e=c.graphic;if(f(c.plotY)&&null!==c.y){k=c.shapeArgs;if(e)e[b.pointCountc;++c)b=v[c],a=2>c||2===c&&/%$/.test(b),v[c]=q(b,[n,l,u,v[2]][c])+(a?t:0);v[3]>v[2]&&(v[3]=v[2]);return v},getStartAndEndRadians:function(a,l){a=H(a)?a:0;l=H(l)&&l>a&&360>l-a?l:a+360;return{start:B*(a+-90),end:B*(l+-90)}}}})(K);(function(a){var B=a.addEvent,H=a.CenteredSeriesMixin,E=a.defined,q=a.each,f=a.extend,l=H.getStartAndEndRadians,t=a.inArray,n=a.noop,v=a.pick,u=a.Point,c=a.Series,b=a.seriesType,m=a.setAnimation;b("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30, enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:a.seriesTypes.column.prototype.pointAttribs,animate:function(a){var b=this, c=b.points,d=b.startAngleRad;a||(q(c,function(a){var c=a.graphic,e=a.shapeArgs;c&&(c.attr({r:a.startR||b.center[3]/2,start:d,end:d}),c.animate({r:e.r,start:e.start,end:e.end},b.options.animation))}),b.animate=null)},updateTotals:function(){var a,b=0,c=this.points,e=c.length,f,l=this.options.ignoreHiddenPoint;for(a=0;a1.5*Math.PI?n-=2*Math.PI:n<-Math.PI/2&&(n+=2*Math.PI);G.slicedTranslation={translateX:Math.round(Math.cos(n)*e),translateY:Math.round(Math.sin(n)*e)};m=Math.cos(n)*a[2]/ 2;x=Math.sin(n)*a[2]/2;G.tooltipPos=[a[0]+.7*m,a[1]+.7*x];G.half=n<-Math.PI/2||n>Math.PI/2?1:0;G.angle=n;f=Math.min(d,G.labelDistance/5);G.labelPos=[a[0]+m+Math.cos(n)*G.labelDistance,a[1]+x+Math.sin(n)*G.labelDistance,a[0]+m+Math.cos(n)*f,a[1]+x+Math.sin(n)*f,a[0]+m,a[1]+x,0>G.labelDistance?"center":G.half?"right":"left",n]}},drawGraph:null,drawPoints:function(){var a=this,b=a.chart.renderer,c,e,l,m,n=a.options.shadow;n&&!a.shadowGroup&&(a.shadowGroup=b.g("shadow").add(a.group));q(a.points,function(d){e= d.graphic;if(d.isNull)e&&(d.graphic=e.destroy());else{m=d.shapeArgs;c=d.getTranslate();var h=d.shadowGroup;n&&!h&&(h=d.shadowGroup=b.g("shadow").add(a.shadowGroup));h&&h.attr(c);l=a.pointAttribs(d,d.selected&&"select");e?e.setRadialReference(a.center).attr(l).animate(f(m,c)):(d.graphic=e=b[d.shapeType](m).setRadialReference(a.center).attr(c).add(a.group),d.visible||e.attr({visibility:"hidden"}),e.attr(l).attr({"stroke-linejoin":"round"}).shadow(n,h));e.addClass(d.getClassName())}})},searchPoint:n, sortByAngle:function(a,b){a.sort(function(a,c){return void 0!==a.angle&&(c.angle-a.angle)*b})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:H.getCenter,getSymbol:n},{init:function(){u.prototype.init.apply(this,arguments);var a=this,b;a.name=v(a.name,"Slice");b=function(b){a.slice("select"===b.type)};B(a,"select",b);B(a,"unselect",b);return a},isValid:function(){return a.isNumber(this.y,!0)&&0<=this.y},setVisible:function(a,b){var c=this,e=c.series,d=e.chart,h=e.options.ignoreHiddenPoint; b=v(b,h);a!==c.visible&&(c.visible=c.options.visible=a=void 0===a?!c.visible:a,e.options.data[t(c,e.data)]=c.options,q(["graphic","dataLabel","connector","shadowGroup"],function(b){if(c[b])c[b][a?"show":"hide"](!0)}),c.legendItem&&d.legend.colorizeItem(c,a),a||"hover"!==c.state||c.setState(""),h&&(e.isDirty=!0),b&&d.redraw())},slice:function(a,b,c){var e=this.series;m(c,e.chart);v(b,!0);this.sliced=this.options.sliced=E(a)?a:!this.sliced;e.options.data[t(this,e.data)]=this.options;this.graphic.animate(this.getTranslate()); this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(a){var b=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(b.x,b.y,b.r+a,b.r+a,{innerR:this.shapeArgs.r-1,start:b.start,end:b.end})}})})(K);(function(a){var B=a.addEvent,H=a.arrayMax,E=a.defined,q=a.each,f=a.extend,l=a.format,t=a.map,n=a.merge,v=a.noop,u=a.pick,c=a.relativeLength,b= a.Series,m=a.seriesTypes,d=a.stableSort;a.distribute=function(a,b){function c(a,b){return a.target-b.target}var f,h=!0,k=a,l=[],m;m=0;for(f=a.length;f--;)m+=a[f].size;if(m>b){d(a,function(a,b){return(b.rank||0)-(a.rank||0)});for(m=f=0;m<=b;)m+=a[f].size,f++;l=a.splice(f-1,a.length)}d(a,c);for(a=t(a,function(a){return{size:a.size,targets:[a.target],align:u(a.align,.5)}});h;){for(f=a.length;f--;)h=a[f],m=(Math.min.apply(0,h.targets)+Math.max.apply(0,h.targets))/2,h.pos=Math.min(Math.max(0,m-h.size* h.align),b-h.size);f=a.length;for(h=!1;f--;)0a[f].pos&&(a[f-1].size+=a[f].size,a[f-1].targets=a[f-1].targets.concat(a[f].targets),a[f-1].align=.5,a[f-1].pos+a[f-1].size>b&&(a[f-1].pos=b-a[f-1].size),a.splice(f,1),h=!0)}f=0;q(a,function(a){var b=0;q(a.targets,function(){k[f].pos=a.pos+b;b+=k[f].size;f++})});k.push.apply(k,l);d(k,c)};b.prototype.drawDataLabels=function(){function b(a,b){var c=b.filter;return c?(b=c.operator,a=a[c.property],c=c.value,"\x3e"===b&&a>c||"\x3c"=== b&&a=c||"\x3c\x3d"===b&&a<=c||"\x3d\x3d"===b&&a==c||"\x3d\x3d\x3d"===b&&a===c?!0:!1):!0}var c=this,e=c.chart,d=c.options,f=d.dataLabels,m=c.points,z,t,v=c.hasRendered||0,C,x,F=u(f.defer,!!d.animation),A=e.renderer;if(f.enabled||c._hasPointLabels)c.dlProcessOptions&&c.dlProcessOptions(f),x=c.plotGroup("dataLabelsGroup","data-labels",F&&!v?"hidden":"visible",f.zIndex||6),F&&(x.attr({opacity:+v}),v||B(c,"afterAnimate",function(){c.visible&&x.show(!0);x[d.animation?"animate":"attr"]({opacity:1}, {duration:200})})),t=f,q(m,function(h){var k,g=h.dataLabel,m,p,q=h.connector,r=!g,v;z=h.dlOptions||h.options&&h.options.dataLabels;(k=u(z&&z.enabled,t.enabled)&&!h.isNull)&&(k=!0===b(h,z||f));k&&(f=n(t,z),m=h.getLabelConfig(),v=f[h.formatPrefix+"Format"]||f.format,C=E(v)?l(v,m,e.time):(f[h.formatPrefix+"Formatter"]||f.formatter).call(m,f),v=f.style,m=f.rotation,v.color=u(f.color,v.color,c.color,"#000000"),"contrast"===v.color&&(h.contrastColor=A.getContrast(h.color||c.color),v.color=f.inside||0>u(h.labelDistance, f.distance)||d.stacking?h.contrastColor:"#000000"),d.cursor&&(v.cursor=d.cursor),p={fill:f.backgroundColor,stroke:f.borderColor,"stroke-width":f.borderWidth,r:f.borderRadius||0,rotation:m,padding:f.padding,zIndex:1},a.objectEach(p,function(a,b){void 0===a&&delete p[b]}));!g||k&&E(C)?k&&E(C)&&(g?p.text=C:(g=h.dataLabel=m?A.text(C,0,-9999).addClass("highcharts-data-label"):A.label(C,0,-9999,f.shape,null,null,f.useHTML,null,"data-label"),g.addClass(" highcharts-data-label-color-"+h.colorIndex+" "+(f.className|| "")+(f.useHTML?"highcharts-tracker":""))),g.attr(p),g.css(v).shadow(f.shadow),g.added||g.add(x),c.alignDataLabel(h,g,f,null,r)):(h.dataLabel=g=g.destroy(),q&&(h.connector=q.destroy()))});a.fireEvent(this,"afterDrawDataLabels")};b.prototype.alignDataLabel=function(a,b,c,d,l){var e=this.chart,h=e.inverted,k=u(a.dlBox&&a.dlBox.centerX,a.plotX,-9999),m=u(a.plotY,-9999),n=b.getBBox(),p,q=c.rotation,r=c.align,t=this.visible&&(a.series.forceDL||e.isInsidePlot(k,Math.round(m),h)||d&&e.isInsidePlot(k,h?d.x+ 1:d.y+d.height-1,h)),v="justify"===u(c.overflow,"justify");if(t&&(p=c.style.fontSize,p=e.renderer.fontMetrics(p,b).b,d=f({x:h?this.yAxis.len-m:k,y:Math.round(h?this.xAxis.len-k:m),width:0,height:0},d),f(c,{width:n.width,height:n.height}),q?(v=!1,k=e.renderer.rotCorr(p,q),k={x:d.x+c.x+d.width/2+k.x,y:d.y+c.y+{top:0,middle:.5,bottom:1}[c.verticalAlign]*d.height},b[l?"attr":"animate"](k).attr({align:r}),m=(q+720)%360,m=180m,"left"===r?k.y-=m?n.height:0:"center"===r?(k.x-=n.width/2,k.y-=n.height/ 2):"right"===r&&(k.x-=n.width,k.y-=m?0:n.height)):(b.align(c,null,d),k=b.alignAttr),v?a.isLabelJustified=this.justifyDataLabel(b,c,k,n,d,l):u(c.crop,!0)&&(t=e.isInsidePlot(k.x,k.y)&&e.isInsidePlot(k.x+n.width,k.y+n.height)),c.shape&&!q))b[l?"attr":"animate"]({anchorX:h?e.plotWidth-a.plotY:a.plotX,anchorY:h?e.plotHeight-a.plotX:a.plotY});t||(b.attr({y:-9999}),b.placed=!1)};b.prototype.justifyDataLabel=function(a,b,c,d,f,l){var e=this.chart,h=b.align,k=b.verticalAlign,m,n,p=a.box?0:a.padding||0;m=c.x+ p;0>m&&("right"===h?b.align="left":b.x=-m,n=!0);m=c.x+d.width-p;m>e.plotWidth&&("left"===h?b.align="right":b.x=e.plotWidth-m,n=!0);m=c.y+p;0>m&&("bottom"===k?b.verticalAlign="top":b.y=-m,n=!0);m=c.y+d.height-p;m>e.plotHeight&&("top"===k?b.verticalAlign="bottom":b.y=e.plotHeight-m,n=!0);n&&(a.placed=!l,a.align(b,null,f));return n};m.pie&&(m.pie.prototype.drawDataLabels=function(){var c=this,d=c.data,e,f=c.chart,l=c.options.dataLabels,m=u(l.connectorPadding,10),n=u(l.connectorWidth,1),t=f.plotWidth, v=f.plotHeight,C,x=c.center,F=x[2]/2,A=x[1],B,G,g,w,L=[[],[]],P,N,O,K,y=[0,0,0,0];c.visible&&(l.enabled||c._hasPointLabels)&&(q(d,function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),b.prototype.drawDataLabels.apply(c),q(d,function(a){a.dataLabel&&a.visible&&(L[a.half].push(a),a.dataLabel._pos=null)}),q(L,function(b,d){var h,k,n=b.length,p=[],r;if(n)for(c.sortByAngle(b,d-.5),0e.bottom-2?h:N,d,e),B._attr={visibility:O,align:g[6]},B._pos={x:P+l.x+({left:m,right:-m}[g[6]]||0),y:N+l.y-10},g.x=P,g.y=N,u(l.crop,!0)&&(G=B.getBBox().width,h=null,P-Gt-m&&(h=Math.round(P+G-t+m),y[1]=Math.max(h,y[1])),0>N-w/2?y[0]=Math.max(Math.round(-N+w/2),y[0]):N+w/2>v&&(y[2]=Math.max(Math.round(N+w/2-v),y[2])),B.sideOverflow= h)}),0===H(y)||this.verifyDataLabelOverflow(y))&&(this.placeDataLabels(),n&&q(this.points,function(a){var b;C=a.connector;if((B=a.dataLabel)&&B._pos&&a.visible&&0u(this.translatedThreshold,h.yAxis.len)),p=u(d.inside,!!this.options.stacking);k&&(f=n(k),0>f.y&&(f.height+=f.y,f.y=0),k=f.y+f.height-h.yAxis.len,0a+c||f+kb+d||h+lthis.pointCount))},pan:function(a, b){var c=this,d=c.hoverPoints,e;d&&t(d,function(a){a.setState()});t("xy"===b?[1,0]:[1],function(b){b=c[b?"xAxis":"yAxis"][0];var d=b.horiz,f=a[d?"chartX":"chartY"],d=d?"mouseDownX":"mouseDownY",h=c[d],g=(b.pointRange||0)/2,k=b.getExtremes(),l=b.toValue(h-f,!0)+g,m=b.toValue(h+b.len-f,!0)-g,n=m=l(n.minWidth,0)&&this.chartHeight>=l(n.minHeight,0)}).call(this)&&f.push(a._id)};B.prototype.currentOptions=function(l){function n(c, b,l,d){var h;a.objectEach(c,function(a,c){if(!d&&-1 */ var BehaviorSubject = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(BehaviorSubject, _super); function BehaviorSubject(_value) { _super.call(this); this._value = _value; } Object.defineProperty(BehaviorSubject.prototype, "value", { get: function () { return this.getValue(); }, enumerable: true, configurable: true }); BehaviorSubject.prototype._subscribe = function (subscriber) { var subscription = _super.prototype._subscribe.call(this, subscriber); if (subscription && !subscription.closed) { subscriber.next(this._value); } return subscription; }; BehaviorSubject.prototype.getValue = function () { if (this.hasError) { throw this.thrownError; } else if (this.closed) { throw new __WEBPACK_IMPORTED_MODULE_1__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); } else { return this._value; } }; BehaviorSubject.prototype.next = function (value) { _super.prototype.next.call(this, this._value = value); }; return BehaviorSubject; }(__WEBPACK_IMPORTED_MODULE_0__Subject__["a" /* Subject */])); //# sourceMappingURL=BehaviorSubject.js.map /***/ }), /***/ "../../../../rxjs/_esm5/InnerSubscriber.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return InnerSubscriber; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /** PURE_IMPORTS_START ._Subscriber PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var InnerSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(InnerSubscriber, _super); function InnerSubscriber(parent, outerValue, outerIndex) { _super.call(this); this.parent = parent; this.outerValue = outerValue; this.outerIndex = outerIndex; this.index = 0; } InnerSubscriber.prototype._next = function (value) { this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this); }; InnerSubscriber.prototype._error = function (error) { this.parent.notifyError(error, this); this.unsubscribe(); }; InnerSubscriber.prototype._complete = function () { this.parent.notifyComplete(this); this.unsubscribe(); }; return InnerSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=InnerSubscriber.js.map /***/ }), /***/ "../../../../rxjs/_esm5/Notification.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Notification; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /** PURE_IMPORTS_START ._Observable PURE_IMPORTS_END */ /** * Represents a push-based event or value that an {@link Observable} can emit. * This class is particularly useful for operators that manage notifications, * like {@link materialize}, {@link dematerialize}, {@link observeOn}, and * others. Besides wrapping the actual delivered value, it also annotates it * with metadata of, for instance, what type of push message it is (`next`, * `error`, or `complete`). * * @see {@link materialize} * @see {@link dematerialize} * @see {@link observeOn} * * @class Notification */ var Notification = /*@__PURE__*/ (/*@__PURE__*/ function () { function Notification(kind, value, error) { this.kind = kind; this.value = value; this.error = error; this.hasValue = kind === 'N'; } /** * Delivers to the given `observer` the value wrapped by this Notification. * @param {Observer} observer * @return */ Notification.prototype.observe = function (observer) { switch (this.kind) { case 'N': return observer.next && observer.next(this.value); case 'E': return observer.error && observer.error(this.error); case 'C': return observer.complete && observer.complete(); } }; /** * Given some {@link Observer} callbacks, deliver the value represented by the * current Notification to the correctly corresponding callback. * @param {function(value: T): void} next An Observer `next` callback. * @param {function(err: any): void} [error] An Observer `error` callback. * @param {function(): void} [complete] An Observer `complete` callback. * @return {any} */ Notification.prototype.do = function (next, error, complete) { var kind = this.kind; switch (kind) { case 'N': return next && next(this.value); case 'E': return error && error(this.error); case 'C': return complete && complete(); } }; /** * Takes an Observer or its individual callback functions, and calls `observe` * or `do` methods accordingly. * @param {Observer|function(value: T): void} nextOrObserver An Observer or * the `next` callback. * @param {function(err: any): void} [error] An Observer `error` callback. * @param {function(): void} [complete] An Observer `complete` callback. * @return {any} */ Notification.prototype.accept = function (nextOrObserver, error, complete) { if (nextOrObserver && typeof nextOrObserver.next === 'function') { return this.observe(nextOrObserver); } else { return this.do(nextOrObserver, error, complete); } }; /** * Returns a simple Observable that just delivers the notification represented * by this Notification instance. * @return {any} */ Notification.prototype.toObservable = function () { var kind = this.kind; switch (kind) { case 'N': return __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */].of(this.value); case 'E': return __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */].throw(this.error); case 'C': return __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */].empty(); } throw new Error('unexpected notification kind value'); }; /** * A shortcut to create a Notification instance of the type `next` from a * given value. * @param {T} value The `next` value. * @return {Notification} The "next" Notification representing the * argument. */ Notification.createNext = function (value) { if (typeof value !== 'undefined') { return new Notification('N', value); } return Notification.undefinedValueNotification; }; /** * A shortcut to create a Notification instance of the type `error` from a * given error. * @param {any} [err] The `error` error. * @return {Notification} The "error" Notification representing the * argument. */ Notification.createError = function (err) { return new Notification('E', undefined, err); }; /** * A shortcut to create a Notification instance of the type `complete`. * @return {Notification} The valueless "complete" Notification. */ Notification.createComplete = function () { return Notification.completeNotification; }; Notification.completeNotification = new Notification('C'); Notification.undefinedValueNotification = new Notification('N', undefined); return Notification; }()); //# sourceMappingURL=Notification.js.map /***/ }), /***/ "../../../../rxjs/_esm5/Observable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Observable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_root__ = __webpack_require__("../../../../rxjs/_esm5/util/root.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_toSubscriber__ = __webpack_require__("../../../../rxjs/_esm5/util/toSubscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__symbol_observable__ = __webpack_require__("../../../../rxjs/_esm5/symbol/observable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__("../../../../rxjs/_esm5/util/pipe.js"); /** PURE_IMPORTS_START ._util_root,._util_toSubscriber,._symbol_observable,._util_pipe PURE_IMPORTS_END */ /** * A representation of any set of values over any amount of time. This is the most basic building block * of RxJS. * * @class Observable */ var Observable = /*@__PURE__*/ (/*@__PURE__*/ function () { /** * @constructor * @param {Function} subscribe the function that is called when the Observable is * initially subscribed to. This function is given a Subscriber, to which new values * can be `next`ed, or an `error` method can be called to raise an error, or * `complete` can be called to notify of a successful completion. */ function Observable(subscribe) { this._isScalar = false; if (subscribe) { this._subscribe = subscribe; } } /** * Creates a new Observable, with this Observable as the source, and the passed * operator defined as the new observable's operator. * @method lift * @param {Operator} operator the operator defining the operation to take on the observable * @return {Observable} a new observable with the Operator applied */ Observable.prototype.lift = function (operator) { var observable = new Observable(); observable.source = this; observable.operator = operator; return observable; }; /** * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit. * * Use it when you have all these Observables, but still nothing is happening. * * `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It * might be for example a function that you passed to a {@link create} static factory, but most of the time it is * a library implementation, which defines what and when will be emitted by an Observable. This means that calling * `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often * thought. * * Apart from starting the execution of an Observable, this method allows you to listen for values * that an Observable emits, as well as for when it completes or errors. You can achieve this in two * following ways. * * The first way is creating an object that implements {@link Observer} interface. It should have methods * defined by that interface, but note that it should be just a regular JavaScript object, which you can create * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular do * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also * that your object does not have to implement all methods. If you find yourself creating a method that doesn't * do anything, you can simply omit it. Note however, that if `error` method is not provided, all errors will * be left uncaught. * * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods. * This means you can provide three functions as arguments to `subscribe`, where first function is equivalent * of a `next` method, second of an `error` method and third of a `complete` method. Just as in case of Observer, * if you do not need to listen for something, you can omit a function, preferably by passing `undefined` or `null`, * since `subscribe` recognizes these functions by where they were placed in function call. When it comes * to `error` function, just as before, if not provided, errors emitted by an Observable will be thrown. * * Whatever style of calling `subscribe` you use, in both cases it returns a Subscription object. * This object allows you to call `unsubscribe` on it, which in turn will stop work that an Observable does and will clean * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable. * * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously. * It is an Observable itself that decides when these functions will be called. For example {@link of} * by default emits all its values synchronously. Always check documentation for how given Observable * will behave when subscribed and if its default behavior can be modified with a {@link Scheduler}. * * @example Subscribe with an Observer * const sumObserver = { * sum: 0, * next(value) { * console.log('Adding: ' + value); * this.sum = this.sum + value; * }, * error() { // We actually could just remove this method, * }, // since we do not really care about errors right now. * complete() { * console.log('Sum equals: ' + this.sum); * } * }; * * Rx.Observable.of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes. * .subscribe(sumObserver); * * // Logs: * // "Adding: 1" * // "Adding: 2" * // "Adding: 3" * // "Sum equals: 6" * * * @example Subscribe with functions * let sum = 0; * * Rx.Observable.of(1, 2, 3) * .subscribe( * function(value) { * console.log('Adding: ' + value); * sum = sum + value; * }, * undefined, * function() { * console.log('Sum equals: ' + sum); * } * ); * * // Logs: * // "Adding: 1" * // "Adding: 2" * // "Adding: 3" * // "Sum equals: 6" * * * @example Cancel a subscription * const subscription = Rx.Observable.interval(1000).subscribe( * num => console.log(num), * undefined, * () => console.log('completed!') // Will not be called, even * ); // when cancelling subscription * * * setTimeout(() => { * subscription.unsubscribe(); * console.log('unsubscribed!'); * }, 2500); * * // Logs: * // 0 after 1s * // 1 after 2s * // "unsubscribed!" after 2.5s * * * @param {Observer|Function} observerOrNext (optional) Either an observer with methods to be called, * or the first of three possible handlers, which is the handler for each value emitted from the subscribed * Observable. * @param {Function} error (optional) A handler for a terminal event resulting from an error. If no error handler is provided, * the error will be thrown as unhandled. * @param {Function} complete (optional) A handler for a terminal event resulting from successful completion. * @return {ISubscription} a subscription reference to the registered handlers * @method subscribe */ Observable.prototype.subscribe = function (observerOrNext, error, complete) { var operator = this.operator; var sink = Object(__WEBPACK_IMPORTED_MODULE_1__util_toSubscriber__["a" /* toSubscriber */])(observerOrNext, error, complete); if (operator) { operator.call(sink, this.source); } else { sink.add(this.source || !sink.syncErrorThrowable ? this._subscribe(sink) : this._trySubscribe(sink)); } if (sink.syncErrorThrowable) { sink.syncErrorThrowable = false; if (sink.syncErrorThrown) { throw sink.syncErrorValue; } } return sink; }; Observable.prototype._trySubscribe = function (sink) { try { return this._subscribe(sink); } catch (err) { sink.syncErrorThrown = true; sink.syncErrorValue = err; sink.error(err); } }; /** * @method forEach * @param {Function} next a handler for each value emitted by the observable * @param {PromiseConstructor} [PromiseCtor] a constructor function used to instantiate the Promise * @return {Promise} a promise that either resolves on observable completion or * rejects with the handled error */ Observable.prototype.forEach = function (next, PromiseCtor) { var _this = this; if (!PromiseCtor) { if (__WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].Rx && __WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].Rx.config && __WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].Rx.config.Promise) { PromiseCtor = __WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].Rx.config.Promise; } else if (__WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].Promise) { PromiseCtor = __WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].Promise; } } if (!PromiseCtor) { throw new Error('no Promise impl found'); } return new PromiseCtor(function (resolve, reject) { // Must be declared in a separate statement to avoid a RefernceError when // accessing subscription below in the closure due to Temporal Dead Zone. var subscription; subscription = _this.subscribe(function (value) { if (subscription) { // if there is a subscription, then we can surmise // the next handling is asynchronous. Any errors thrown // need to be rejected explicitly and unsubscribe must be // called manually try { next(value); } catch (err) { reject(err); subscription.unsubscribe(); } } else { // if there is NO subscription, then we're getting a nexted // value synchronously during subscription. We can just call it. // If it errors, Observable's `subscribe` will ensure the // unsubscription logic is called, then synchronously rethrow the error. // After that, Promise will trap the error and send it // down the rejection path. next(value); } }, reject, resolve); }); }; Observable.prototype._subscribe = function (subscriber) { return this.source.subscribe(subscriber); }; /** * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable * @method Symbol.observable * @return {Observable} this instance of the observable */ Observable.prototype[__WEBPACK_IMPORTED_MODULE_2__symbol_observable__["a" /* observable */]] = function () { return this; }; /* tslint:enable:max-line-length */ /** * Used to stitch together functional operators into a chain. * @method pipe * @return {Observable} the Observable result of all of the operators having * been called in the order they were passed in. * * @example * * import { map, filter, scan } from 'rxjs/operators'; * * Rx.Observable.interval(1000) * .pipe( * filter(x => x % 2 === 0), * map(x => x + x), * scan((acc, x) => acc + x) * ) * .subscribe(x => console.log(x)) */ Observable.prototype.pipe = function () { var operations = []; for (var _i = 0; _i < arguments.length; _i++) { operations[_i - 0] = arguments[_i]; } if (operations.length === 0) { return this; } return Object(__WEBPACK_IMPORTED_MODULE_3__util_pipe__["b" /* pipeFromArray */])(operations)(this); }; /* tslint:enable:max-line-length */ Observable.prototype.toPromise = function (PromiseCtor) { var _this = this; if (!PromiseCtor) { if (__WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].Rx && __WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].Rx.config && __WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].Rx.config.Promise) { PromiseCtor = __WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].Rx.config.Promise; } else if (__WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].Promise) { PromiseCtor = __WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].Promise; } } if (!PromiseCtor) { throw new Error('no Promise impl found'); } return new PromiseCtor(function (resolve, reject) { var value; _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); }); }); }; // HACK: Since TypeScript inherits static properties too, we have to // fight against TypeScript here so Subject can have a different static create signature /** * Creates a new cold Observable by calling the Observable constructor * @static true * @owner Observable * @method create * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor * @return {Observable} a new cold observable */ Observable.create = function (subscribe) { return new Observable(subscribe); }; return Observable; }()); //# sourceMappingURL=Observable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/Observer.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return empty; }); /** PURE_IMPORTS_START PURE_IMPORTS_END */ var empty = { closed: true, next: function (value) { }, error: function (err) { throw err; }, complete: function () { } }; //# sourceMappingURL=Observer.js.map /***/ }), /***/ "../../../../rxjs/_esm5/OuterSubscriber.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OuterSubscriber; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /** PURE_IMPORTS_START ._Subscriber PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var OuterSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(OuterSubscriber, _super); function OuterSubscriber() { _super.apply(this, arguments); } OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { this.destination.next(innerValue); }; OuterSubscriber.prototype.notifyError = function (error, innerSub) { this.destination.error(error); }; OuterSubscriber.prototype.notifyComplete = function (innerSub) { this.destination.complete(); }; return OuterSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=OuterSubscriber.js.map /***/ }), /***/ "../../../../rxjs/_esm5/Scheduler.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Scheduler; }); /** * An execution context and a data structure to order tasks and schedule their * execution. Provides a notion of (potentially virtual) time, through the * `now()` getter method. * * Each unit of work in a Scheduler is called an {@link Action}. * * ```ts * class Scheduler { * now(): number; * schedule(work, delay?, state?): Subscription; * } * ``` * * @class Scheduler */ var Scheduler = /*@__PURE__*/ (/*@__PURE__*/ function () { function Scheduler(SchedulerAction, now) { if (now === void 0) { now = Scheduler.now; } this.SchedulerAction = SchedulerAction; this.now = now; } /** * Schedules a function, `work`, for execution. May happen at some point in * the future, according to the `delay` parameter, if specified. May be passed * some context object, `state`, which will be passed to the `work` function. * * The given arguments will be processed an stored as an Action object in a * queue of actions. * * @param {function(state: ?T): ?Subscription} work A function representing a * task, or some unit of work to be executed by the Scheduler. * @param {number} [delay] Time to wait before executing the work, where the * time unit is implicit and defined by the Scheduler itself. * @param {T} [state] Some contextual data that the `work` function uses when * called by the Scheduler. * @return {Subscription} A subscription in order to be able to unsubscribe * the scheduled work. */ Scheduler.prototype.schedule = function (work, delay, state) { if (delay === void 0) { delay = 0; } return new this.SchedulerAction(this, work).schedule(state, delay); }; Scheduler.now = Date.now ? Date.now : function () { return +new Date(); }; return Scheduler; }()); //# sourceMappingURL=Scheduler.js.map /***/ }), /***/ "../../../../rxjs/_esm5/Subject.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SubjectSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subject; }); /* unused harmony export AnonymousSubject */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscription__ = __webpack_require__("../../../../rxjs/_esm5/Subscription.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_ObjectUnsubscribedError__ = __webpack_require__("../../../../rxjs/_esm5/util/ObjectUnsubscribedError.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__SubjectSubscription__ = __webpack_require__("../../../../rxjs/_esm5/SubjectSubscription.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__symbol_rxSubscriber__ = __webpack_require__("../../../../rxjs/_esm5/symbol/rxSubscriber.js"); /** PURE_IMPORTS_START ._Observable,._Subscriber,._Subscription,._util_ObjectUnsubscribedError,._SubjectSubscription,._symbol_rxSubscriber PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * @class SubjectSubscriber */ var SubjectSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(SubjectSubscriber, _super); function SubjectSubscriber(destination) { _super.call(this, destination); this.destination = destination; } return SubjectSubscriber; }(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); /** * @class Subject */ var Subject = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(Subject, _super); function Subject() { _super.call(this); this.observers = []; this.closed = false; this.isStopped = false; this.hasError = false; this.thrownError = null; } Subject.prototype[__WEBPACK_IMPORTED_MODULE_5__symbol_rxSubscriber__["a" /* rxSubscriber */]] = function () { return new SubjectSubscriber(this); }; Subject.prototype.lift = function (operator) { var subject = new AnonymousSubject(this, this); subject.operator = operator; return subject; }; Subject.prototype.next = function (value) { if (this.closed) { throw new __WEBPACK_IMPORTED_MODULE_3__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); } if (!this.isStopped) { var observers = this.observers; var len = observers.length; var copy = observers.slice(); for (var i = 0; i < len; i++) { copy[i].next(value); } } }; Subject.prototype.error = function (err) { if (this.closed) { throw new __WEBPACK_IMPORTED_MODULE_3__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); } this.hasError = true; this.thrownError = err; this.isStopped = true; var observers = this.observers; var len = observers.length; var copy = observers.slice(); for (var i = 0; i < len; i++) { copy[i].error(err); } this.observers.length = 0; }; Subject.prototype.complete = function () { if (this.closed) { throw new __WEBPACK_IMPORTED_MODULE_3__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); } this.isStopped = true; var observers = this.observers; var len = observers.length; var copy = observers.slice(); for (var i = 0; i < len; i++) { copy[i].complete(); } this.observers.length = 0; }; Subject.prototype.unsubscribe = function () { this.isStopped = true; this.closed = true; this.observers = null; }; Subject.prototype._trySubscribe = function (subscriber) { if (this.closed) { throw new __WEBPACK_IMPORTED_MODULE_3__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); } else { return _super.prototype._trySubscribe.call(this, subscriber); } }; Subject.prototype._subscribe = function (subscriber) { if (this.closed) { throw new __WEBPACK_IMPORTED_MODULE_3__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); } else if (this.hasError) { subscriber.error(this.thrownError); return __WEBPACK_IMPORTED_MODULE_2__Subscription__["a" /* Subscription */].EMPTY; } else if (this.isStopped) { subscriber.complete(); return __WEBPACK_IMPORTED_MODULE_2__Subscription__["a" /* Subscription */].EMPTY; } else { this.observers.push(subscriber); return new __WEBPACK_IMPORTED_MODULE_4__SubjectSubscription__["a" /* SubjectSubscription */](this, subscriber); } }; Subject.prototype.asObservable = function () { var observable = new __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */](); observable.source = this; return observable; }; Subject.create = function (destination, source) { return new AnonymousSubject(destination, source); }; return Subject; }(__WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */])); /** * @class AnonymousSubject */ var AnonymousSubject = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(AnonymousSubject, _super); function AnonymousSubject(destination, source) { _super.call(this); this.destination = destination; this.source = source; } AnonymousSubject.prototype.next = function (value) { var destination = this.destination; if (destination && destination.next) { destination.next(value); } }; AnonymousSubject.prototype.error = function (err) { var destination = this.destination; if (destination && destination.error) { this.destination.error(err); } }; AnonymousSubject.prototype.complete = function () { var destination = this.destination; if (destination && destination.complete) { this.destination.complete(); } }; AnonymousSubject.prototype._subscribe = function (subscriber) { var source = this.source; if (source) { return this.source.subscribe(subscriber); } else { return __WEBPACK_IMPORTED_MODULE_2__Subscription__["a" /* Subscription */].EMPTY; } }; return AnonymousSubject; }(Subject)); //# sourceMappingURL=Subject.js.map /***/ }), /***/ "../../../../rxjs/_esm5/SubjectSubscription.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SubjectSubscription; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscription__ = __webpack_require__("../../../../rxjs/_esm5/Subscription.js"); /** PURE_IMPORTS_START ._Subscription PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var SubjectSubscription = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(SubjectSubscription, _super); function SubjectSubscription(subject, subscriber) { _super.call(this); this.subject = subject; this.subscriber = subscriber; this.closed = false; } SubjectSubscription.prototype.unsubscribe = function () { if (this.closed) { return; } this.closed = true; var subject = this.subject; var observers = subject.observers; this.subject = null; if (!observers || observers.length === 0 || subject.isStopped || subject.closed) { return; } var subscriberIndex = observers.indexOf(this.subscriber); if (subscriberIndex !== -1) { observers.splice(subscriberIndex, 1); } }; return SubjectSubscription; }(__WEBPACK_IMPORTED_MODULE_0__Subscription__["a" /* Subscription */])); //# sourceMappingURL=SubjectSubscription.js.map /***/ }), /***/ "../../../../rxjs/_esm5/Subscriber.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscriber; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isFunction__ = __webpack_require__("../../../../rxjs/_esm5/util/isFunction.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscription__ = __webpack_require__("../../../../rxjs/_esm5/Subscription.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observer__ = __webpack_require__("../../../../rxjs/_esm5/Observer.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__symbol_rxSubscriber__ = __webpack_require__("../../../../rxjs/_esm5/symbol/rxSubscriber.js"); /** PURE_IMPORTS_START ._util_isFunction,._Subscription,._Observer,._symbol_rxSubscriber PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * Implements the {@link Observer} interface and extends the * {@link Subscription} class. While the {@link Observer} is the public API for * consuming the values of an {@link Observable}, all Observers get converted to * a Subscriber, in order to provide Subscription-like capabilities such as * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for * implementing operators, but it is rarely used as a public API. * * @class Subscriber */ var Subscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(Subscriber, _super); /** * @param {Observer|function(value: T): void} [destinationOrNext] A partially * defined Observer or a `next` callback function. * @param {function(e: ?any): void} [error] The `error` callback of an * Observer. * @param {function(): void} [complete] The `complete` callback of an * Observer. */ function Subscriber(destinationOrNext, error, complete) { _super.call(this); this.syncErrorValue = null; this.syncErrorThrown = false; this.syncErrorThrowable = false; this.isStopped = false; switch (arguments.length) { case 0: this.destination = __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */]; break; case 1: if (!destinationOrNext) { this.destination = __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */]; break; } if (typeof destinationOrNext === 'object') { if (destinationOrNext instanceof Subscriber) { this.syncErrorThrowable = destinationOrNext.syncErrorThrowable; this.destination = destinationOrNext; this.destination.add(this); } else { this.syncErrorThrowable = true; this.destination = new SafeSubscriber(this, destinationOrNext); } break; } default: this.syncErrorThrowable = true; this.destination = new SafeSubscriber(this, destinationOrNext, error, complete); break; } } Subscriber.prototype[__WEBPACK_IMPORTED_MODULE_3__symbol_rxSubscriber__["a" /* rxSubscriber */]] = function () { return this; }; /** * A static factory for a Subscriber, given a (potentially partial) definition * of an Observer. * @param {function(x: ?T): void} [next] The `next` callback of an Observer. * @param {function(e: ?any): void} [error] The `error` callback of an * Observer. * @param {function(): void} [complete] The `complete` callback of an * Observer. * @return {Subscriber} A Subscriber wrapping the (partially defined) * Observer represented by the given arguments. */ Subscriber.create = function (next, error, complete) { var subscriber = new Subscriber(next, error, complete); subscriber.syncErrorThrowable = false; return subscriber; }; /** * The {@link Observer} callback to receive notifications of type `next` from * the Observable, with a value. The Observable may call this method 0 or more * times. * @param {T} [value] The `next` value. * @return {void} */ Subscriber.prototype.next = function (value) { if (!this.isStopped) { this._next(value); } }; /** * The {@link Observer} callback to receive notifications of type `error` from * the Observable, with an attached {@link Error}. Notifies the Observer that * the Observable has experienced an error condition. * @param {any} [err] The `error` exception. * @return {void} */ Subscriber.prototype.error = function (err) { if (!this.isStopped) { this.isStopped = true; this._error(err); } }; /** * The {@link Observer} callback to receive a valueless notification of type * `complete` from the Observable. Notifies the Observer that the Observable * has finished sending push-based notifications. * @return {void} */ Subscriber.prototype.complete = function () { if (!this.isStopped) { this.isStopped = true; this._complete(); } }; Subscriber.prototype.unsubscribe = function () { if (this.closed) { return; } this.isStopped = true; _super.prototype.unsubscribe.call(this); }; Subscriber.prototype._next = function (value) { this.destination.next(value); }; Subscriber.prototype._error = function (err) { this.destination.error(err); this.unsubscribe(); }; Subscriber.prototype._complete = function () { this.destination.complete(); this.unsubscribe(); }; Subscriber.prototype._unsubscribeAndRecycle = function () { var _a = this, _parent = _a._parent, _parents = _a._parents; this._parent = null; this._parents = null; this.unsubscribe(); this.closed = false; this.isStopped = false; this._parent = _parent; this._parents = _parents; return this; }; return Subscriber; }(__WEBPACK_IMPORTED_MODULE_1__Subscription__["a" /* Subscription */])); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var SafeSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(SafeSubscriber, _super); function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) { _super.call(this); this._parentSubscriber = _parentSubscriber; var next; var context = this; if (Object(__WEBPACK_IMPORTED_MODULE_0__util_isFunction__["a" /* isFunction */])(observerOrNext)) { next = observerOrNext; } else if (observerOrNext) { next = observerOrNext.next; error = observerOrNext.error; complete = observerOrNext.complete; if (observerOrNext !== __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */]) { context = Object.create(observerOrNext); if (Object(__WEBPACK_IMPORTED_MODULE_0__util_isFunction__["a" /* isFunction */])(context.unsubscribe)) { this.add(context.unsubscribe.bind(context)); } context.unsubscribe = this.unsubscribe.bind(this); } } this._context = context; this._next = next; this._error = error; this._complete = complete; } SafeSubscriber.prototype.next = function (value) { if (!this.isStopped && this._next) { var _parentSubscriber = this._parentSubscriber; if (!_parentSubscriber.syncErrorThrowable) { this.__tryOrUnsub(this._next, value); } else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) { this.unsubscribe(); } } }; SafeSubscriber.prototype.error = function (err) { if (!this.isStopped) { var _parentSubscriber = this._parentSubscriber; if (this._error) { if (!_parentSubscriber.syncErrorThrowable) { this.__tryOrUnsub(this._error, err); this.unsubscribe(); } else { this.__tryOrSetError(_parentSubscriber, this._error, err); this.unsubscribe(); } } else if (!_parentSubscriber.syncErrorThrowable) { this.unsubscribe(); throw err; } else { _parentSubscriber.syncErrorValue = err; _parentSubscriber.syncErrorThrown = true; this.unsubscribe(); } } }; SafeSubscriber.prototype.complete = function () { var _this = this; if (!this.isStopped) { var _parentSubscriber = this._parentSubscriber; if (this._complete) { var wrappedComplete = function () { return _this._complete.call(_this._context); }; if (!_parentSubscriber.syncErrorThrowable) { this.__tryOrUnsub(wrappedComplete); this.unsubscribe(); } else { this.__tryOrSetError(_parentSubscriber, wrappedComplete); this.unsubscribe(); } } else { this.unsubscribe(); } } }; SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) { try { fn.call(this._context, value); } catch (err) { this.unsubscribe(); throw err; } }; SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) { try { fn.call(this._context, value); } catch (err) { parent.syncErrorValue = err; parent.syncErrorThrown = true; return true; } return false; }; SafeSubscriber.prototype._unsubscribe = function () { var _parentSubscriber = this._parentSubscriber; this._context = null; this._parentSubscriber = null; _parentSubscriber.unsubscribe(); }; return SafeSubscriber; }(Subscriber)); //# sourceMappingURL=Subscriber.js.map /***/ }), /***/ "../../../../rxjs/_esm5/Subscription.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isArray__ = __webpack_require__("../../../../rxjs/_esm5/util/isArray.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isObject__ = __webpack_require__("../../../../rxjs/_esm5/util/isObject.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__("../../../../rxjs/_esm5/util/isFunction.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__("../../../../rxjs/_esm5/util/tryCatch.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__("../../../../rxjs/_esm5/util/errorObject.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__ = __webpack_require__("../../../../rxjs/_esm5/util/UnsubscriptionError.js"); /** PURE_IMPORTS_START ._util_isArray,._util_isObject,._util_isFunction,._util_tryCatch,._util_errorObject,._util_UnsubscriptionError PURE_IMPORTS_END */ /** * Represents a disposable resource, such as the execution of an Observable. A * Subscription has one important method, `unsubscribe`, that takes no argument * and just disposes the resource held by the subscription. * * Additionally, subscriptions may be grouped together through the `add()` * method, which will attach a child Subscription to the current Subscription. * When a Subscription is unsubscribed, all its children (and its grandchildren) * will be unsubscribed as well. * * @class Subscription */ var Subscription = /*@__PURE__*/ (/*@__PURE__*/ function () { /** * @param {function(): void} [unsubscribe] A function describing how to * perform the disposal of resources when the `unsubscribe` method is called. */ function Subscription(unsubscribe) { /** * A flag to indicate whether this Subscription has already been unsubscribed. * @type {boolean} */ this.closed = false; this._parent = null; this._parents = null; this._subscriptions = null; if (unsubscribe) { this._unsubscribe = unsubscribe; } } /** * Disposes the resources held by the subscription. May, for instance, cancel * an ongoing Observable execution or cancel any other type of work that * started when the Subscription was created. * @return {void} */ Subscription.prototype.unsubscribe = function () { var hasErrors = false; var errors; if (this.closed) { return; } var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions; this.closed = true; this._parent = null; this._parents = null; // null out _subscriptions first so any child subscriptions that attempt // to remove themselves from this subscription will noop this._subscriptions = null; var index = -1; var len = _parents ? _parents.length : 0; // if this._parent is null, then so is this._parents, and we // don't have to remove ourselves from any parent subscriptions. while (_parent) { _parent.remove(this); // if this._parents is null or index >= len, // then _parent is set to null, and the loop exits _parent = ++index < len && _parents[index] || null; } if (Object(__WEBPACK_IMPORTED_MODULE_2__util_isFunction__["a" /* isFunction */])(_unsubscribe)) { var trial = Object(__WEBPACK_IMPORTED_MODULE_3__util_tryCatch__["a" /* tryCatch */])(_unsubscribe).call(this); if (trial === __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */]) { hasErrors = true; errors = errors || (__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */] ? flattenUnsubscriptionErrors(__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e.errors) : [__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e]); } } if (Object(__WEBPACK_IMPORTED_MODULE_0__util_isArray__["a" /* isArray */])(_subscriptions)) { index = -1; len = _subscriptions.length; while (++index < len) { var sub = _subscriptions[index]; if (Object(__WEBPACK_IMPORTED_MODULE_1__util_isObject__["a" /* isObject */])(sub)) { var trial = Object(__WEBPACK_IMPORTED_MODULE_3__util_tryCatch__["a" /* tryCatch */])(sub.unsubscribe).call(sub); if (trial === __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */]) { hasErrors = true; errors = errors || []; var err = __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e; if (err instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */]) { errors = errors.concat(flattenUnsubscriptionErrors(err.errors)); } else { errors.push(err); } } } } } if (hasErrors) { throw new __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */](errors); } }; /** * Adds a tear down to be called during the unsubscribe() of this * Subscription. * * If the tear down being added is a subscription that is already * unsubscribed, is the same reference `add` is being called on, or is * `Subscription.EMPTY`, it will not be added. * * If this subscription is already in an `closed` state, the passed * tear down logic will be executed immediately. * * @param {TeardownLogic} teardown The additional logic to execute on * teardown. * @return {Subscription} Returns the Subscription used or created to be * added to the inner subscriptions list. This Subscription can be used with * `remove()` to remove the passed teardown logic from the inner subscriptions * list. */ Subscription.prototype.add = function (teardown) { if (!teardown || (teardown === Subscription.EMPTY)) { return Subscription.EMPTY; } if (teardown === this) { return this; } var subscription = teardown; switch (typeof teardown) { case 'function': subscription = new Subscription(teardown); case 'object': if (subscription.closed || typeof subscription.unsubscribe !== 'function') { return subscription; } else if (this.closed) { subscription.unsubscribe(); return subscription; } else if (typeof subscription._addParent !== 'function' /* quack quack */) { var tmp = subscription; subscription = new Subscription(); subscription._subscriptions = [tmp]; } break; default: throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.'); } var subscriptions = this._subscriptions || (this._subscriptions = []); subscriptions.push(subscription); subscription._addParent(this); return subscription; }; /** * Removes a Subscription from the internal list of subscriptions that will * unsubscribe during the unsubscribe process of this Subscription. * @param {Subscription} subscription The subscription to remove. * @return {void} */ Subscription.prototype.remove = function (subscription) { var subscriptions = this._subscriptions; if (subscriptions) { var subscriptionIndex = subscriptions.indexOf(subscription); if (subscriptionIndex !== -1) { subscriptions.splice(subscriptionIndex, 1); } } }; Subscription.prototype._addParent = function (parent) { var _a = this, _parent = _a._parent, _parents = _a._parents; if (!_parent || _parent === parent) { // If we don't have a parent, or the new parent is the same as the // current parent, then set this._parent to the new parent. this._parent = parent; } else if (!_parents) { // If there's already one parent, but not multiple, allocate an Array to // store the rest of the parent Subscriptions. this._parents = [parent]; } else if (_parents.indexOf(parent) === -1) { // Only add the new parent to the _parents list if it's not already there. _parents.push(parent); } }; Subscription.EMPTY = (function (empty) { empty.closed = true; return empty; }(new Subscription())); return Subscription; }()); function flattenUnsubscriptionErrors(errors) { return errors.reduce(function (errs, err) { return errs.concat((err instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */]) ? err.errors : err); }, []); } //# sourceMappingURL=Subscription.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/ArrayLikeObservable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ArrayLikeObservable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ScalarObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/ScalarObservable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__EmptyObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/EmptyObservable.js"); /** PURE_IMPORTS_START .._Observable,._ScalarObservable,._EmptyObservable PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var ArrayLikeObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(ArrayLikeObservable, _super); function ArrayLikeObservable(arrayLike, scheduler) { _super.call(this); this.arrayLike = arrayLike; this.scheduler = scheduler; if (!scheduler && arrayLike.length === 1) { this._isScalar = true; this.value = arrayLike[0]; } } ArrayLikeObservable.create = function (arrayLike, scheduler) { var length = arrayLike.length; if (length === 0) { return new __WEBPACK_IMPORTED_MODULE_2__EmptyObservable__["a" /* EmptyObservable */](); } else if (length === 1) { return new __WEBPACK_IMPORTED_MODULE_1__ScalarObservable__["a" /* ScalarObservable */](arrayLike[0], scheduler); } else { return new ArrayLikeObservable(arrayLike, scheduler); } }; ArrayLikeObservable.dispatch = function (state) { var arrayLike = state.arrayLike, index = state.index, length = state.length, subscriber = state.subscriber; if (subscriber.closed) { return; } if (index >= length) { subscriber.complete(); return; } subscriber.next(arrayLike[index]); state.index = index + 1; this.schedule(state); }; ArrayLikeObservable.prototype._subscribe = function (subscriber) { var index = 0; var _a = this, arrayLike = _a.arrayLike, scheduler = _a.scheduler; var length = arrayLike.length; if (scheduler) { return scheduler.schedule(ArrayLikeObservable.dispatch, 0, { arrayLike: arrayLike, index: index, length: length, subscriber: subscriber }); } else { for (var i = 0; i < length && !subscriber.closed; i++) { subscriber.next(arrayLike[i]); } subscriber.complete(); } }; return ArrayLikeObservable; }(__WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */])); //# sourceMappingURL=ArrayLikeObservable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/ArrayObservable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ArrayObservable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ScalarObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/ScalarObservable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__EmptyObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/EmptyObservable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isScheduler__ = __webpack_require__("../../../../rxjs/_esm5/util/isScheduler.js"); /** PURE_IMPORTS_START .._Observable,._ScalarObservable,._EmptyObservable,.._util_isScheduler PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var ArrayObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(ArrayObservable, _super); function ArrayObservable(array, scheduler) { _super.call(this); this.array = array; this.scheduler = scheduler; if (!scheduler && array.length === 1) { this._isScalar = true; this.value = array[0]; } } ArrayObservable.create = function (array, scheduler) { return new ArrayObservable(array, scheduler); }; /** * Creates an Observable that emits some values you specify as arguments, * immediately one after the other, and then emits a complete notification. * * Emits the arguments you provide, then completes. * * * * * This static operator is useful for creating a simple Observable that only * emits the arguments given, and the complete notification thereafter. It can * be used for composing with other Observables, such as with {@link concat}. * By default, it uses a `null` IScheduler, which means the `next` * notifications are sent synchronously, although with a different IScheduler * it is possible to determine when those notifications will be delivered. * * @example Emit 10, 20, 30, then 'a', 'b', 'c', then start ticking every second. * var numbers = Rx.Observable.of(10, 20, 30); * var letters = Rx.Observable.of('a', 'b', 'c'); * var interval = Rx.Observable.interval(1000); * var result = numbers.concat(letters).concat(interval); * result.subscribe(x => console.log(x)); * * @see {@link create} * @see {@link empty} * @see {@link never} * @see {@link throw} * * @param {...T} values Arguments that represent `next` values to be emitted. * @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling * the emissions of the `next` notifications. * @return {Observable} An Observable that emits each given input value. * @static true * @name of * @owner Observable */ ArrayObservable.of = function () { var array = []; for (var _i = 0; _i < arguments.length; _i++) { array[_i - 0] = arguments[_i]; } var scheduler = array[array.length - 1]; if (Object(__WEBPACK_IMPORTED_MODULE_3__util_isScheduler__["a" /* isScheduler */])(scheduler)) { array.pop(); } else { scheduler = null; } var len = array.length; if (len > 1) { return new ArrayObservable(array, scheduler); } else if (len === 1) { return new __WEBPACK_IMPORTED_MODULE_1__ScalarObservable__["a" /* ScalarObservable */](array[0], scheduler); } else { return new __WEBPACK_IMPORTED_MODULE_2__EmptyObservable__["a" /* EmptyObservable */](scheduler); } }; ArrayObservable.dispatch = function (state) { var array = state.array, index = state.index, count = state.count, subscriber = state.subscriber; if (index >= count) { subscriber.complete(); return; } subscriber.next(array[index]); if (subscriber.closed) { return; } state.index = index + 1; this.schedule(state); }; ArrayObservable.prototype._subscribe = function (subscriber) { var index = 0; var array = this.array; var count = array.length; var scheduler = this.scheduler; if (scheduler) { return scheduler.schedule(ArrayObservable.dispatch, 0, { array: array, index: index, count: count, subscriber: subscriber }); } else { for (var i = 0; i < count && !subscriber.closed; i++) { subscriber.next(array[i]); } subscriber.complete(); } }; return ArrayObservable; }(__WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */])); //# sourceMappingURL=ArrayObservable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/ConnectableObservable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export ConnectableObservable */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return connectableObservableDescriptor; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subject__ = __webpack_require__("../../../../rxjs/_esm5/Subject.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__("../../../../rxjs/_esm5/Subscription.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__operators_refCount__ = __webpack_require__("../../../../rxjs/_esm5/operators/refCount.js"); /** PURE_IMPORTS_START .._Subject,.._Observable,.._Subscriber,.._Subscription,.._operators_refCount PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * @class ConnectableObservable */ var ConnectableObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(ConnectableObservable, _super); function ConnectableObservable(source, subjectFactory) { _super.call(this); this.source = source; this.subjectFactory = subjectFactory; this._refCount = 0; this._isComplete = false; } ConnectableObservable.prototype._subscribe = function (subscriber) { return this.getSubject().subscribe(subscriber); }; ConnectableObservable.prototype.getSubject = function () { var subject = this._subject; if (!subject || subject.isStopped) { this._subject = this.subjectFactory(); } return this._subject; }; ConnectableObservable.prototype.connect = function () { var connection = this._connection; if (!connection) { this._isComplete = false; connection = this._connection = new __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */](); connection.add(this.source .subscribe(new ConnectableSubscriber(this.getSubject(), this))); if (connection.closed) { this._connection = null; connection = __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY; } else { this._connection = connection; } } return connection; }; ConnectableObservable.prototype.refCount = function () { return Object(__WEBPACK_IMPORTED_MODULE_4__operators_refCount__["a" /* refCount */])()(this); }; return ConnectableObservable; }(__WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */])); var connectableProto = ConnectableObservable.prototype; var connectableObservableDescriptor = { operator: { value: null }, _refCount: { value: 0, writable: true }, _subject: { value: null, writable: true }, _connection: { value: null, writable: true }, _subscribe: { value: connectableProto._subscribe }, _isComplete: { value: connectableProto._isComplete, writable: true }, getSubject: { value: connectableProto.getSubject }, connect: { value: connectableProto.connect }, refCount: { value: connectableProto.refCount } }; var ConnectableSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(ConnectableSubscriber, _super); function ConnectableSubscriber(destination, connectable) { _super.call(this, destination); this.connectable = connectable; } ConnectableSubscriber.prototype._error = function (err) { this._unsubscribe(); _super.prototype._error.call(this, err); }; ConnectableSubscriber.prototype._complete = function () { this.connectable._isComplete = true; this._unsubscribe(); _super.prototype._complete.call(this); }; ConnectableSubscriber.prototype._unsubscribe = function () { var connectable = this.connectable; if (connectable) { this.connectable = null; var connection = connectable._connection; connectable._refCount = 0; connectable._subject = null; connectable._connection = null; if (connection) { connection.unsubscribe(); } } }; return ConnectableSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subject__["b" /* SubjectSubscriber */])); var RefCountOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function RefCountOperator(connectable) { this.connectable = connectable; } RefCountOperator.prototype.call = function (subscriber, source) { var connectable = this.connectable; connectable._refCount++; var refCounter = new RefCountSubscriber(subscriber, connectable); var subscription = source.subscribe(refCounter); if (!refCounter.closed) { refCounter.connection = connectable.connect(); } return subscription; }; return RefCountOperator; }()); var RefCountSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(RefCountSubscriber, _super); function RefCountSubscriber(destination, connectable) { _super.call(this, destination); this.connectable = connectable; } RefCountSubscriber.prototype._unsubscribe = function () { var connectable = this.connectable; if (!connectable) { this.connection = null; return; } this.connectable = null; var refCount = connectable._refCount; if (refCount <= 0) { this.connection = null; return; } connectable._refCount = refCount - 1; if (refCount > 1) { this.connection = null; return; } /// // Compare the local RefCountSubscriber's connection Subscription to the // connection Subscription on the shared ConnectableObservable. In cases // where the ConnectableObservable source synchronously emits values, and // the RefCountSubscriber's downstream Observers synchronously unsubscribe, // execution continues to here before the RefCountOperator has a chance to // supply the RefCountSubscriber with the shared connection Subscription. // For example: // ``` // Observable.range(0, 10) // .publish() // .refCount() // .take(5) // .subscribe(); // ``` // In order to account for this case, RefCountSubscriber should only dispose // the ConnectableObservable's shared connection Subscription if the // connection Subscription exists, *and* either: // a. RefCountSubscriber doesn't have a reference to the shared connection // Subscription yet, or, // b. RefCountSubscriber's connection Subscription reference is identical // to the shared connection Subscription /// var connection = this.connection; var sharedConnection = connectable._connection; this.connection = null; if (sharedConnection && (!connection || sharedConnection === connection)) { sharedConnection.unsubscribe(); } }; return RefCountSubscriber; }(__WEBPACK_IMPORTED_MODULE_2__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=ConnectableObservable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/DeferObservable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DeferObservable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_subscribeToResult__ = __webpack_require__("../../../../rxjs/_esm5/util/subscribeToResult.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__OuterSubscriber__ = __webpack_require__("../../../../rxjs/_esm5/OuterSubscriber.js"); /** PURE_IMPORTS_START .._Observable,.._util_subscribeToResult,.._OuterSubscriber PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var DeferObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(DeferObservable, _super); function DeferObservable(observableFactory) { _super.call(this); this.observableFactory = observableFactory; } /** * Creates an Observable that, on subscribe, calls an Observable factory to * make an Observable for each new Observer. * * Creates the Observable lazily, that is, only when it * is subscribed. * * * * * `defer` allows you to create the Observable only when the Observer * subscribes, and create a fresh Observable for each Observer. It waits until * an Observer subscribes to it, and then it generates an Observable, * typically with an Observable factory function. It does this afresh for each * subscriber, so although each subscriber may think it is subscribing to the * same Observable, in fact each subscriber gets its own individual * Observable. * * @example Subscribe to either an Observable of clicks or an Observable of interval, at random * var clicksOrInterval = Rx.Observable.defer(function () { * if (Math.random() > 0.5) { * return Rx.Observable.fromEvent(document, 'click'); * } else { * return Rx.Observable.interval(1000); * } * }); * clicksOrInterval.subscribe(x => console.log(x)); * * // Results in the following behavior: * // If the result of Math.random() is greater than 0.5 it will listen * // for clicks anywhere on the "document"; when document is clicked it * // will log a MouseEvent object to the console. If the result is less * // than 0.5 it will emit ascending numbers, one every second(1000ms). * * @see {@link create} * * @param {function(): SubscribableOrPromise} observableFactory The Observable * factory function to invoke for each Observer that subscribes to the output * Observable. May also return a Promise, which will be converted on the fly * to an Observable. * @return {Observable} An Observable whose Observers' subscriptions trigger * an invocation of the given Observable factory function. * @static true * @name defer * @owner Observable */ DeferObservable.create = function (observableFactory) { return new DeferObservable(observableFactory); }; DeferObservable.prototype._subscribe = function (subscriber) { return new DeferSubscriber(subscriber, this.observableFactory); }; return DeferObservable; }(__WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */])); var DeferSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(DeferSubscriber, _super); function DeferSubscriber(destination, factory) { _super.call(this, destination); this.factory = factory; this.tryDefer(); } DeferSubscriber.prototype.tryDefer = function () { try { this._callFactory(); } catch (err) { this._error(err); } }; DeferSubscriber.prototype._callFactory = function () { var result = this.factory(); if (result) { this.add(Object(__WEBPACK_IMPORTED_MODULE_1__util_subscribeToResult__["a" /* subscribeToResult */])(this, result)); } }; return DeferSubscriber; }(__WEBPACK_IMPORTED_MODULE_2__OuterSubscriber__["a" /* OuterSubscriber */])); //# sourceMappingURL=DeferObservable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/EmptyObservable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EmptyObservable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /** PURE_IMPORTS_START .._Observable PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var EmptyObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(EmptyObservable, _super); function EmptyObservable(scheduler) { _super.call(this); this.scheduler = scheduler; } /** * Creates an Observable that emits no items to the Observer and immediately * emits a complete notification. * * Just emits 'complete', and nothing else. * * * * * This static operator is useful for creating a simple Observable that only * emits the complete notification. It can be used for composing with other * Observables, such as in a {@link mergeMap}. * * @example Emit the number 7, then complete. * var result = Rx.Observable.empty().startWith(7); * result.subscribe(x => console.log(x)); * * @example Map and flatten only odd numbers to the sequence 'a', 'b', 'c' * var interval = Rx.Observable.interval(1000); * var result = interval.mergeMap(x => * x % 2 === 1 ? Rx.Observable.of('a', 'b', 'c') : Rx.Observable.empty() * ); * result.subscribe(x => console.log(x)); * * // Results in the following to the console: * // x is equal to the count on the interval eg(0,1,2,3,...) * // x will occur every 1000ms * // if x % 2 is equal to 1 print abc * // if x % 2 is not equal to 1 nothing will be output * * @see {@link create} * @see {@link never} * @see {@link of} * @see {@link throw} * * @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling * the emission of the complete notification. * @return {Observable} An "empty" Observable: emits only the complete * notification. * @static true * @name empty * @owner Observable */ EmptyObservable.create = function (scheduler) { return new EmptyObservable(scheduler); }; EmptyObservable.dispatch = function (arg) { var subscriber = arg.subscriber; subscriber.complete(); }; EmptyObservable.prototype._subscribe = function (subscriber) { var scheduler = this.scheduler; if (scheduler) { return scheduler.schedule(EmptyObservable.dispatch, 0, { subscriber: subscriber }); } else { subscriber.complete(); } }; return EmptyObservable; }(__WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */])); //# sourceMappingURL=EmptyObservable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/ErrorObservable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ErrorObservable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /** PURE_IMPORTS_START .._Observable PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var ErrorObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(ErrorObservable, _super); function ErrorObservable(error, scheduler) { _super.call(this); this.error = error; this.scheduler = scheduler; } /** * Creates an Observable that emits no items to the Observer and immediately * emits an error notification. * * Just emits 'error', and nothing else. * * * * * This static operator is useful for creating a simple Observable that only * emits the error notification. It can be used for composing with other * Observables, such as in a {@link mergeMap}. * * @example Emit the number 7, then emit an error. * var result = Rx.Observable.throw(new Error('oops!')).startWith(7); * result.subscribe(x => console.log(x), e => console.error(e)); * * @example Map and flatten numbers to the sequence 'a', 'b', 'c', but throw an error for 13 * var interval = Rx.Observable.interval(1000); * var result = interval.mergeMap(x => * x === 13 ? * Rx.Observable.throw('Thirteens are bad') : * Rx.Observable.of('a', 'b', 'c') * ); * result.subscribe(x => console.log(x), e => console.error(e)); * * @see {@link create} * @see {@link empty} * @see {@link never} * @see {@link of} * * @param {any} error The particular Error to pass to the error notification. * @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling * the emission of the error notification. * @return {Observable} An error Observable: emits only the error notification * using the given error argument. * @static true * @name throw * @owner Observable */ ErrorObservable.create = function (error, scheduler) { return new ErrorObservable(error, scheduler); }; ErrorObservable.dispatch = function (arg) { var error = arg.error, subscriber = arg.subscriber; subscriber.error(error); }; ErrorObservable.prototype._subscribe = function (subscriber) { var error = this.error; var scheduler = this.scheduler; subscriber.syncErrorThrowable = true; if (scheduler) { return scheduler.schedule(ErrorObservable.dispatch, 0, { error: error, subscriber: subscriber }); } else { subscriber.error(error); } }; return ErrorObservable; }(__WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */])); //# sourceMappingURL=ErrorObservable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/ForkJoinObservable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ForkJoinObservable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__EmptyObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/EmptyObservable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isArray__ = __webpack_require__("../../../../rxjs/_esm5/util/isArray.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_subscribeToResult__ = __webpack_require__("../../../../rxjs/_esm5/util/subscribeToResult.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__ = __webpack_require__("../../../../rxjs/_esm5/OuterSubscriber.js"); /** PURE_IMPORTS_START .._Observable,._EmptyObservable,.._util_isArray,.._util_subscribeToResult,.._OuterSubscriber PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var ForkJoinObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(ForkJoinObservable, _super); function ForkJoinObservable(sources, resultSelector) { _super.call(this); this.sources = sources; this.resultSelector = resultSelector; } /* tslint:enable:max-line-length */ /** * Joins last values emitted by passed Observables. * * Wait for Observables to complete and then combine last values they emitted. * * * * `forkJoin` is an operator that takes any number of Observables which can be passed either as an array * or directly as arguments. If no input Observables are provided, resulting stream will complete * immediately. * * `forkJoin` will wait for all passed Observables to complete and then it will emit an array with last * values from corresponding Observables. So if you pass `n` Observables to the operator, resulting * array will have `n` values, where first value is the last thing emitted by the first Observable, * second value is the last thing emitted by the second Observable and so on. That means `forkJoin` will * not emit more than once and it will complete after that. If you need to emit combined values not only * at the end of lifecycle of passed Observables, but also throughout it, try out {@link combineLatest} * or {@link zip} instead. * * In order for resulting array to have the same length as the number of input Observables, whenever any of * that Observables completes without emitting any value, `forkJoin` will complete at that moment as well * and it will not emit anything either, even if it already has some last values from other Observables. * Conversely, if there is an Observable that never completes, `forkJoin` will never complete as well, * unless at any point some other Observable completes without emitting value, which brings us back to * the previous case. Overall, in order for `forkJoin` to emit a value, all Observables passed as arguments * have to emit something at least once and complete. * * If any input Observable errors at some point, `forkJoin` will error as well and all other Observables * will be immediately unsubscribed. * * Optionally `forkJoin` accepts project function, that will be called with values which normally * would land in emitted array. Whatever is returned by project function, will appear in output * Observable instead. This means that default project can be thought of as a function that takes * all its arguments and puts them into an array. Note that project function will be called only * when output Observable is supposed to emit a result. * * @example Use forkJoin with operator emitting immediately * const observable = Rx.Observable.forkJoin( * Rx.Observable.of(1, 2, 3, 4), * Rx.Observable.of(5, 6, 7, 8) * ); * observable.subscribe( * value => console.log(value), * err => {}, * () => console.log('This is how it ends!') * ); * * // Logs: * // [4, 8] * // "This is how it ends!" * * * @example Use forkJoin with operator emitting after some time * const observable = Rx.Observable.forkJoin( * Rx.Observable.interval(1000).take(3), // emit 0, 1, 2 every second and complete * Rx.Observable.interval(500).take(4) // emit 0, 1, 2, 3 every half a second and complete * ); * observable.subscribe( * value => console.log(value), * err => {}, * () => console.log('This is how it ends!') * ); * * // Logs: * // [2, 3] after 3 seconds * // "This is how it ends!" immediately after * * * @example Use forkJoin with project function * const observable = Rx.Observable.forkJoin( * Rx.Observable.interval(1000).take(3), // emit 0, 1, 2 every second and complete * Rx.Observable.interval(500).take(4), // emit 0, 1, 2, 3 every half a second and complete * (n, m) => n + m * ); * observable.subscribe( * value => console.log(value), * err => {}, * () => console.log('This is how it ends!') * ); * * // Logs: * // 5 after 3 seconds * // "This is how it ends!" immediately after * * @see {@link combineLatest} * @see {@link zip} * * @param {...SubscribableOrPromise} sources Any number of Observables provided either as an array or as an arguments * passed directly to the operator. * @param {function} [project] Function that takes values emitted by input Observables and returns value * that will appear in resulting Observable instead of default array. * @return {Observable} Observable emitting either an array of last values emitted by passed Observables * or value from project function. * @static true * @name forkJoin * @owner Observable */ ForkJoinObservable.create = function () { var sources = []; for (var _i = 0; _i < arguments.length; _i++) { sources[_i - 0] = arguments[_i]; } if (sources === null || arguments.length === 0) { return new __WEBPACK_IMPORTED_MODULE_1__EmptyObservable__["a" /* EmptyObservable */](); } var resultSelector = null; if (typeof sources[sources.length - 1] === 'function') { resultSelector = sources.pop(); } // if the first and only other argument besides the resultSelector is an array // assume it's been called with `forkJoin([obs1, obs2, obs3], resultSelector)` if (sources.length === 1 && Object(__WEBPACK_IMPORTED_MODULE_2__util_isArray__["a" /* isArray */])(sources[0])) { sources = sources[0]; } if (sources.length === 0) { return new __WEBPACK_IMPORTED_MODULE_1__EmptyObservable__["a" /* EmptyObservable */](); } return new ForkJoinObservable(sources, resultSelector); }; ForkJoinObservable.prototype._subscribe = function (subscriber) { return new ForkJoinSubscriber(subscriber, this.sources, this.resultSelector); }; return ForkJoinObservable; }(__WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */])); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var ForkJoinSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(ForkJoinSubscriber, _super); function ForkJoinSubscriber(destination, sources, resultSelector) { _super.call(this, destination); this.sources = sources; this.resultSelector = resultSelector; this.completed = 0; this.haveValues = 0; var len = sources.length; this.total = len; this.values = new Array(len); for (var i = 0; i < len; i++) { var source = sources[i]; var innerSubscription = Object(__WEBPACK_IMPORTED_MODULE_3__util_subscribeToResult__["a" /* subscribeToResult */])(this, source, null, i); if (innerSubscription) { innerSubscription.outerIndex = i; this.add(innerSubscription); } } } ForkJoinSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { this.values[outerIndex] = innerValue; if (!innerSub._hasValue) { innerSub._hasValue = true; this.haveValues++; } }; ForkJoinSubscriber.prototype.notifyComplete = function (innerSub) { var destination = this.destination; var _a = this, haveValues = _a.haveValues, resultSelector = _a.resultSelector, values = _a.values; var len = values.length; if (!innerSub._hasValue) { destination.complete(); return; } this.completed++; if (this.completed !== len) { return; } if (haveValues === len) { var value = resultSelector ? resultSelector.apply(this, values) : values; destination.next(value); } destination.complete(); }; return ForkJoinSubscriber; }(__WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__["a" /* OuterSubscriber */])); //# sourceMappingURL=ForkJoinObservable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/FromEventObservable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FromEventObservable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_tryCatch__ = __webpack_require__("../../../../rxjs/_esm5/util/tryCatch.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__("../../../../rxjs/_esm5/util/isFunction.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__("../../../../rxjs/_esm5/util/errorObject.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Subscription__ = __webpack_require__("../../../../rxjs/_esm5/Subscription.js"); /** PURE_IMPORTS_START .._Observable,.._util_tryCatch,.._util_isFunction,.._util_errorObject,.._Subscription PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var toString = Object.prototype.toString; function isNodeStyleEventEmitter(sourceObj) { return !!sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function'; } function isJQueryStyleEventEmitter(sourceObj) { return !!sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function'; } function isNodeList(sourceObj) { return !!sourceObj && toString.call(sourceObj) === '[object NodeList]'; } function isHTMLCollection(sourceObj) { return !!sourceObj && toString.call(sourceObj) === '[object HTMLCollection]'; } function isEventTarget(sourceObj) { return !!sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function'; } /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var FromEventObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(FromEventObservable, _super); function FromEventObservable(sourceObj, eventName, selector, options) { _super.call(this); this.sourceObj = sourceObj; this.eventName = eventName; this.selector = selector; this.options = options; } /* tslint:enable:max-line-length */ /** * Creates an Observable that emits events of a specific type coming from the * given event target. * * Creates an Observable from DOM events, or Node.js * EventEmitter events or others. * * * * `fromEvent` accepts as a first argument event target, which is an object with methods * for registering event handler functions. As a second argument it takes string that indicates * type of event we want to listen for. `fromEvent` supports selected types of event targets, * which are described in detail below. If your event target does not match any of the ones listed, * you should use {@link fromEventPattern}, which can be used on arbitrary APIs. * When it comes to APIs supported by `fromEvent`, their methods for adding and removing event * handler functions have different names, but they all accept a string describing event type * and function itself, which will be called whenever said event happens. * * Every time resulting Observable is subscribed, event handler function will be registered * to event target on given event type. When that event fires, value * passed as a first argument to registered function will be emitted by output Observable. * When Observable is unsubscribed, function will be unregistered from event target. * * Note that if event target calls registered function with more than one argument, second * and following arguments will not appear in resulting stream. In order to get access to them, * you can pass to `fromEvent` optional project function, which will be called with all arguments * passed to event handler. Output Observable will then emit value returned by project function, * instead of the usual value. * * Remember that event targets listed below are checked via duck typing. It means that * no matter what kind of object you have and no matter what environment you work in, * you can safely use `fromEvent` on that object if it exposes described methods (provided * of course they behave as was described above). So for example if Node.js library exposes * event target which has the same method names as DOM EventTarget, `fromEvent` is still * a good choice. * * If the API you use is more callback then event handler oriented (subscribed * callback function fires only once and thus there is no need to manually * unregister it), you should use {@link bindCallback} or {@link bindNodeCallback} * instead. * * `fromEvent` supports following types of event targets: * * **DOM EventTarget** * * This is an object with `addEventListener` and `removeEventListener` methods. * * In the browser, `addEventListener` accepts - apart from event type string and event * handler function arguments - optional third parameter, which is either an object or boolean, * both used for additional configuration how and when passed function will be called. When * `fromEvent` is used with event target of that type, you can provide this values * as third parameter as well. * * **Node.js EventEmitter** * * An object with `addListener` and `removeListener` methods. * * **JQuery-style event target** * * An object with `on` and `off` methods * * **DOM NodeList** * * List of DOM Nodes, returned for example by `document.querySelectorAll` or `Node.childNodes`. * * Although this collection is not event target in itself, `fromEvent` will iterate over all Nodes * it contains and install event handler function in every of them. When returned Observable * is unsubscribed, function will be removed from all Nodes. * * **DOM HtmlCollection** * * Just as in case of NodeList it is a collection of DOM nodes. Here as well event handler function is * installed and removed in each of elements. * * * @example Emits clicks happening on the DOM document * var clicks = Rx.Observable.fromEvent(document, 'click'); * clicks.subscribe(x => console.log(x)); * * // Results in: * // MouseEvent object logged to console every time a click * // occurs on the document. * * * @example Use addEventListener with capture option * var clicksInDocument = Rx.Observable.fromEvent(document, 'click', true); // note optional configuration parameter * // which will be passed to addEventListener * var clicksInDiv = Rx.Observable.fromEvent(someDivInDocument, 'click'); * * clicksInDocument.subscribe(() => console.log('document')); * clicksInDiv.subscribe(() => console.log('div')); * * // By default events bubble UP in DOM tree, so normally * // when we would click on div in document * // "div" would be logged first and then "document". * // Since we specified optional `capture` option, document * // will catch event when it goes DOWN DOM tree, so console * // will log "document" and then "div". * * @see {@link bindCallback} * @see {@link bindNodeCallback} * @see {@link fromEventPattern} * * @param {EventTargetLike} target The DOM EventTarget, Node.js * EventEmitter, JQuery-like event target, NodeList or HTMLCollection to attach the event handler to. * @param {string} eventName The event name of interest, being emitted by the * `target`. * @param {EventListenerOptions} [options] Options to pass through to addEventListener * @param {SelectorMethodSignature} [selector] An optional function to * post-process results. It takes the arguments from the event handler and * should return a single value. * @return {Observable} * @static true * @name fromEvent * @owner Observable */ FromEventObservable.create = function (target, eventName, options, selector) { if (Object(__WEBPACK_IMPORTED_MODULE_2__util_isFunction__["a" /* isFunction */])(options)) { selector = options; options = undefined; } return new FromEventObservable(target, eventName, selector, options); }; FromEventObservable.setupSubscription = function (sourceObj, eventName, handler, subscriber, options) { var unsubscribe; if (isNodeList(sourceObj) || isHTMLCollection(sourceObj)) { for (var i = 0, len = sourceObj.length; i < len; i++) { FromEventObservable.setupSubscription(sourceObj[i], eventName, handler, subscriber, options); } } else if (isEventTarget(sourceObj)) { var source_1 = sourceObj; sourceObj.addEventListener(eventName, handler, options); unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); }; } else if (isJQueryStyleEventEmitter(sourceObj)) { var source_2 = sourceObj; sourceObj.on(eventName, handler); unsubscribe = function () { return source_2.off(eventName, handler); }; } else if (isNodeStyleEventEmitter(sourceObj)) { var source_3 = sourceObj; sourceObj.addListener(eventName, handler); unsubscribe = function () { return source_3.removeListener(eventName, handler); }; } else { throw new TypeError('Invalid event target'); } subscriber.add(new __WEBPACK_IMPORTED_MODULE_4__Subscription__["a" /* Subscription */](unsubscribe)); }; FromEventObservable.prototype._subscribe = function (subscriber) { var sourceObj = this.sourceObj; var eventName = this.eventName; var options = this.options; var selector = this.selector; var handler = selector ? function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i - 0] = arguments[_i]; } var result = Object(__WEBPACK_IMPORTED_MODULE_1__util_tryCatch__["a" /* tryCatch */])(selector).apply(void 0, args); if (result === __WEBPACK_IMPORTED_MODULE_3__util_errorObject__["a" /* errorObject */]) { subscriber.error(__WEBPACK_IMPORTED_MODULE_3__util_errorObject__["a" /* errorObject */].e); } else { subscriber.next(result); } } : function (e) { return subscriber.next(e); }; FromEventObservable.setupSubscription(sourceObj, eventName, handler, subscriber, options); }; return FromEventObservable; }(__WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */])); //# sourceMappingURL=FromEventObservable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/FromEventPatternObservable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FromEventPatternObservable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isFunction__ = __webpack_require__("../../../../rxjs/_esm5/util/isFunction.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscription__ = __webpack_require__("../../../../rxjs/_esm5/Subscription.js"); /** PURE_IMPORTS_START .._util_isFunction,.._Observable,.._Subscription PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var FromEventPatternObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(FromEventPatternObservable, _super); function FromEventPatternObservable(addHandler, removeHandler, selector) { _super.call(this); this.addHandler = addHandler; this.removeHandler = removeHandler; this.selector = selector; } /** * Creates an Observable from an API based on addHandler/removeHandler * functions. * * Converts any addHandler/removeHandler API to an * Observable. * * * * Creates an Observable by using the `addHandler` and `removeHandler` * functions to add and remove the handlers, with an optional selector * function to project the event arguments to a result. The `addHandler` is * called when the output Observable is subscribed, and `removeHandler` is * called when the Subscription is unsubscribed. * * @example Emits clicks happening on the DOM document * function addClickHandler(handler) { * document.addEventListener('click', handler); * } * * function removeClickHandler(handler) { * document.removeEventListener('click', handler); * } * * var clicks = Rx.Observable.fromEventPattern( * addClickHandler, * removeClickHandler * ); * clicks.subscribe(x => console.log(x)); * * @see {@link from} * @see {@link fromEvent} * * @param {function(handler: Function): any} addHandler A function that takes * a `handler` function as argument and attaches it somehow to the actual * source of events. * @param {function(handler: Function, signal?: any): void} [removeHandler] An optional function that * takes a `handler` function as argument and removes it in case it was * previously attached using `addHandler`. if addHandler returns signal to teardown when remove, * removeHandler function will forward it. * @param {function(...args: any): T} [selector] An optional function to * post-process results. It takes the arguments from the event handler and * should return a single value. * @return {Observable} * @static true * @name fromEventPattern * @owner Observable */ FromEventPatternObservable.create = function (addHandler, removeHandler, selector) { return new FromEventPatternObservable(addHandler, removeHandler, selector); }; FromEventPatternObservable.prototype._subscribe = function (subscriber) { var _this = this; var removeHandler = this.removeHandler; var handler = !!this.selector ? function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i - 0] = arguments[_i]; } _this._callSelector(subscriber, args); } : function (e) { subscriber.next(e); }; var retValue = this._callAddHandler(handler, subscriber); if (!Object(__WEBPACK_IMPORTED_MODULE_0__util_isFunction__["a" /* isFunction */])(removeHandler)) { return; } subscriber.add(new __WEBPACK_IMPORTED_MODULE_2__Subscription__["a" /* Subscription */](function () { //TODO: determine whether or not to forward to error handler removeHandler(handler, retValue); })); }; FromEventPatternObservable.prototype._callSelector = function (subscriber, args) { try { var result = this.selector.apply(this, args); subscriber.next(result); } catch (e) { subscriber.error(e); } }; FromEventPatternObservable.prototype._callAddHandler = function (handler, errorSubscriber) { try { return this.addHandler(handler) || null; } catch (e) { errorSubscriber.error(e); } }; return FromEventPatternObservable; }(__WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */])); //# sourceMappingURL=FromEventPatternObservable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/FromObservable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FromObservable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isArray__ = __webpack_require__("../../../../rxjs/_esm5/util/isArray.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isArrayLike__ = __webpack_require__("../../../../rxjs/_esm5/util/isArrayLike.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isPromise__ = __webpack_require__("../../../../rxjs/_esm5/util/isPromise.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PromiseObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/PromiseObservable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IteratorObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/IteratorObservable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ArrayObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/ArrayObservable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ArrayLikeObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/ArrayLikeObservable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__symbol_iterator__ = __webpack_require__("../../../../rxjs/_esm5/symbol/iterator.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__operators_observeOn__ = __webpack_require__("../../../../rxjs/_esm5/operators/observeOn.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__symbol_observable__ = __webpack_require__("../../../../rxjs/_esm5/symbol/observable.js"); /** PURE_IMPORTS_START .._util_isArray,.._util_isArrayLike,.._util_isPromise,._PromiseObservable,._IteratorObservable,._ArrayObservable,._ArrayLikeObservable,.._symbol_iterator,.._Observable,.._operators_observeOn,.._symbol_observable PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var FromObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(FromObservable, _super); function FromObservable(ish, scheduler) { _super.call(this, null); this.ish = ish; this.scheduler = scheduler; } /** * Creates an Observable from an Array, an array-like object, a Promise, an * iterable object, or an Observable-like object. * * Converts almost anything to an Observable. * * * * Convert various other objects and data types into Observables. `from` * converts a Promise or an array-like or an * [iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterable) * object into an Observable that emits the items in that promise or array or * iterable. A String, in this context, is treated as an array of characters. * Observable-like objects (contains a function named with the ES2015 Symbol * for Observable) can also be converted through this operator. * * @example Converts an array to an Observable * var array = [10, 20, 30]; * var result = Rx.Observable.from(array); * result.subscribe(x => console.log(x)); * * // Results in the following: * // 10 20 30 * * @example Convert an infinite iterable (from a generator) to an Observable * function* generateDoubles(seed) { * var i = seed; * while (true) { * yield i; * i = 2 * i; // double it * } * } * * var iterator = generateDoubles(3); * var result = Rx.Observable.from(iterator).take(10); * result.subscribe(x => console.log(x)); * * // Results in the following: * // 3 6 12 24 48 96 192 384 768 1536 * * @see {@link create} * @see {@link fromEvent} * @see {@link fromEventPattern} * @see {@link fromPromise} * * @param {ObservableInput} ish A subscribable object, a Promise, an * Observable-like, an Array, an iterable or an array-like object to be * converted. * @param {Scheduler} [scheduler] The scheduler on which to schedule the * emissions of values. * @return {Observable} The Observable whose values are originally from the * input object that was converted. * @static true * @name from * @owner Observable */ FromObservable.create = function (ish, scheduler) { if (ish != null) { if (typeof ish[__WEBPACK_IMPORTED_MODULE_10__symbol_observable__["a" /* observable */]] === 'function') { if (ish instanceof __WEBPACK_IMPORTED_MODULE_8__Observable__["a" /* Observable */] && !scheduler) { return ish; } return new FromObservable(ish, scheduler); } else if (Object(__WEBPACK_IMPORTED_MODULE_0__util_isArray__["a" /* isArray */])(ish)) { return new __WEBPACK_IMPORTED_MODULE_5__ArrayObservable__["a" /* ArrayObservable */](ish, scheduler); } else if (Object(__WEBPACK_IMPORTED_MODULE_2__util_isPromise__["a" /* isPromise */])(ish)) { return new __WEBPACK_IMPORTED_MODULE_3__PromiseObservable__["a" /* PromiseObservable */](ish, scheduler); } else if (typeof ish[__WEBPACK_IMPORTED_MODULE_7__symbol_iterator__["a" /* iterator */]] === 'function' || typeof ish === 'string') { return new __WEBPACK_IMPORTED_MODULE_4__IteratorObservable__["a" /* IteratorObservable */](ish, scheduler); } else if (Object(__WEBPACK_IMPORTED_MODULE_1__util_isArrayLike__["a" /* isArrayLike */])(ish)) { return new __WEBPACK_IMPORTED_MODULE_6__ArrayLikeObservable__["a" /* ArrayLikeObservable */](ish, scheduler); } } throw new TypeError((ish !== null && typeof ish || ish) + ' is not observable'); }; FromObservable.prototype._subscribe = function (subscriber) { var ish = this.ish; var scheduler = this.scheduler; if (scheduler == null) { return ish[__WEBPACK_IMPORTED_MODULE_10__symbol_observable__["a" /* observable */]]().subscribe(subscriber); } else { return ish[__WEBPACK_IMPORTED_MODULE_10__symbol_observable__["a" /* observable */]]().subscribe(new __WEBPACK_IMPORTED_MODULE_9__operators_observeOn__["a" /* ObserveOnSubscriber */](subscriber, scheduler, 0)); } }; return FromObservable; }(__WEBPACK_IMPORTED_MODULE_8__Observable__["a" /* Observable */])); //# sourceMappingURL=FromObservable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/IteratorObservable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return IteratorObservable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_root__ = __webpack_require__("../../../../rxjs/_esm5/util/root.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__symbol_iterator__ = __webpack_require__("../../../../rxjs/_esm5/symbol/iterator.js"); /** PURE_IMPORTS_START .._util_root,.._Observable,.._symbol_iterator PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var IteratorObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(IteratorObservable, _super); function IteratorObservable(iterator, scheduler) { _super.call(this); this.scheduler = scheduler; if (iterator == null) { throw new Error('iterator cannot be null.'); } this.iterator = getIterator(iterator); } IteratorObservable.create = function (iterator, scheduler) { return new IteratorObservable(iterator, scheduler); }; IteratorObservable.dispatch = function (state) { var index = state.index, hasError = state.hasError, iterator = state.iterator, subscriber = state.subscriber; if (hasError) { subscriber.error(state.error); return; } var result = iterator.next(); if (result.done) { subscriber.complete(); return; } subscriber.next(result.value); state.index = index + 1; if (subscriber.closed) { if (typeof iterator.return === 'function') { iterator.return(); } return; } this.schedule(state); }; IteratorObservable.prototype._subscribe = function (subscriber) { var index = 0; var _a = this, iterator = _a.iterator, scheduler = _a.scheduler; if (scheduler) { return scheduler.schedule(IteratorObservable.dispatch, 0, { index: index, iterator: iterator, subscriber: subscriber }); } else { do { var result = iterator.next(); if (result.done) { subscriber.complete(); break; } else { subscriber.next(result.value); } if (subscriber.closed) { if (typeof iterator.return === 'function') { iterator.return(); } break; } } while (true); } }; return IteratorObservable; }(__WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */])); var StringIterator = /*@__PURE__*/ (/*@__PURE__*/ function () { function StringIterator(str, idx, len) { if (idx === void 0) { idx = 0; } if (len === void 0) { len = str.length; } this.str = str; this.idx = idx; this.len = len; } StringIterator.prototype[__WEBPACK_IMPORTED_MODULE_2__symbol_iterator__["a" /* iterator */]] = function () { return (this); }; StringIterator.prototype.next = function () { return this.idx < this.len ? { done: false, value: this.str.charAt(this.idx++) } : { done: true, value: undefined }; }; return StringIterator; }()); var ArrayIterator = /*@__PURE__*/ (/*@__PURE__*/ function () { function ArrayIterator(arr, idx, len) { if (idx === void 0) { idx = 0; } if (len === void 0) { len = toLength(arr); } this.arr = arr; this.idx = idx; this.len = len; } ArrayIterator.prototype[__WEBPACK_IMPORTED_MODULE_2__symbol_iterator__["a" /* iterator */]] = function () { return this; }; ArrayIterator.prototype.next = function () { return this.idx < this.len ? { done: false, value: this.arr[this.idx++] } : { done: true, value: undefined }; }; return ArrayIterator; }()); function getIterator(obj) { var i = obj[__WEBPACK_IMPORTED_MODULE_2__symbol_iterator__["a" /* iterator */]]; if (!i && typeof obj === 'string') { return new StringIterator(obj); } if (!i && obj.length !== undefined) { return new ArrayIterator(obj); } if (!i) { throw new TypeError('object is not iterable'); } return obj[__WEBPACK_IMPORTED_MODULE_2__symbol_iterator__["a" /* iterator */]](); } var maxSafeInteger = /*@__PURE__*/ Math.pow(2, 53) - 1; function toLength(o) { var len = +o.length; if (isNaN(len)) { return 0; } if (len === 0 || !numberIsFinite(len)) { return len; } len = sign(len) * Math.floor(Math.abs(len)); if (len <= 0) { return 0; } if (len > maxSafeInteger) { return maxSafeInteger; } return len; } function numberIsFinite(value) { return typeof value === 'number' && __WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].isFinite(value); } function sign(value) { var valueAsNumber = +value; if (valueAsNumber === 0) { return valueAsNumber; } if (isNaN(valueAsNumber)) { return valueAsNumber; } return valueAsNumber < 0 ? -1 : 1; } //# sourceMappingURL=IteratorObservable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/PromiseObservable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PromiseObservable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_root__ = __webpack_require__("../../../../rxjs/_esm5/util/root.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /** PURE_IMPORTS_START .._util_root,.._Observable PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var PromiseObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(PromiseObservable, _super); function PromiseObservable(promise, scheduler) { _super.call(this); this.promise = promise; this.scheduler = scheduler; } /** * Converts a Promise to an Observable. * * Returns an Observable that just emits the Promise's * resolved value, then completes. * * Converts an ES2015 Promise or a Promises/A+ spec compliant Promise to an * Observable. If the Promise resolves with a value, the output Observable * emits that resolved value as a `next`, and then completes. If the Promise * is rejected, then the output Observable emits the corresponding Error. * * @example Convert the Promise returned by Fetch to an Observable * var result = Rx.Observable.fromPromise(fetch('http://myserver.com/')); * result.subscribe(x => console.log(x), e => console.error(e)); * * @see {@link bindCallback} * @see {@link from} * * @param {PromiseLike} promise The promise to be converted. * @param {Scheduler} [scheduler] An optional IScheduler to use for scheduling * the delivery of the resolved value (or the rejection). * @return {Observable} An Observable which wraps the Promise. * @static true * @name fromPromise * @owner Observable */ PromiseObservable.create = function (promise, scheduler) { return new PromiseObservable(promise, scheduler); }; PromiseObservable.prototype._subscribe = function (subscriber) { var _this = this; var promise = this.promise; var scheduler = this.scheduler; if (scheduler == null) { if (this._isScalar) { if (!subscriber.closed) { subscriber.next(this.value); subscriber.complete(); } } else { promise.then(function (value) { _this.value = value; _this._isScalar = true; if (!subscriber.closed) { subscriber.next(value); subscriber.complete(); } }, function (err) { if (!subscriber.closed) { subscriber.error(err); } }) .then(null, function (err) { // escape the promise trap, throw unhandled errors __WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].setTimeout(function () { throw err; }); }); } } else { if (this._isScalar) { if (!subscriber.closed) { return scheduler.schedule(dispatchNext, 0, { value: this.value, subscriber: subscriber }); } } else { promise.then(function (value) { _this.value = value; _this._isScalar = true; if (!subscriber.closed) { subscriber.add(scheduler.schedule(dispatchNext, 0, { value: value, subscriber: subscriber })); } }, function (err) { if (!subscriber.closed) { subscriber.add(scheduler.schedule(dispatchError, 0, { err: err, subscriber: subscriber })); } }) .then(null, function (err) { // escape the promise trap, throw unhandled errors __WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].setTimeout(function () { throw err; }); }); } } }; return PromiseObservable; }(__WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */])); function dispatchNext(arg) { var value = arg.value, subscriber = arg.subscriber; if (!subscriber.closed) { subscriber.next(value); subscriber.complete(); } } function dispatchError(arg) { var err = arg.err, subscriber = arg.subscriber; if (!subscriber.closed) { subscriber.error(err); } } //# sourceMappingURL=PromiseObservable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/ScalarObservable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ScalarObservable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /** PURE_IMPORTS_START .._Observable PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var ScalarObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(ScalarObservable, _super); function ScalarObservable(value, scheduler) { _super.call(this); this.value = value; this.scheduler = scheduler; this._isScalar = true; if (scheduler) { this._isScalar = false; } } ScalarObservable.create = function (value, scheduler) { return new ScalarObservable(value, scheduler); }; ScalarObservable.dispatch = function (state) { var done = state.done, value = state.value, subscriber = state.subscriber; if (done) { subscriber.complete(); return; } subscriber.next(value); if (subscriber.closed) { return; } state.done = true; this.schedule(state); }; ScalarObservable.prototype._subscribe = function (subscriber) { var value = this.value; var scheduler = this.scheduler; if (scheduler) { return scheduler.schedule(ScalarObservable.dispatch, 0, { done: false, value: value, subscriber: subscriber }); } else { subscriber.next(value); if (!subscriber.closed) { subscriber.complete(); } } }; return ScalarObservable; }(__WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */])); //# sourceMappingURL=ScalarObservable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/TimerObservable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TimerObservable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isNumeric__ = __webpack_require__("../../../../rxjs/_esm5/util/isNumeric.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__scheduler_async__ = __webpack_require__("../../../../rxjs/_esm5/scheduler/async.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isScheduler__ = __webpack_require__("../../../../rxjs/_esm5/util/isScheduler.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isDate__ = __webpack_require__("../../../../rxjs/_esm5/util/isDate.js"); /** PURE_IMPORTS_START .._util_isNumeric,.._Observable,.._scheduler_async,.._util_isScheduler,.._util_isDate PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var TimerObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(TimerObservable, _super); function TimerObservable(dueTime, period, scheduler) { if (dueTime === void 0) { dueTime = 0; } _super.call(this); this.period = -1; this.dueTime = 0; if (Object(__WEBPACK_IMPORTED_MODULE_0__util_isNumeric__["a" /* isNumeric */])(period)) { this.period = Number(period) < 1 && 1 || Number(period); } else if (Object(__WEBPACK_IMPORTED_MODULE_3__util_isScheduler__["a" /* isScheduler */])(period)) { scheduler = period; } if (!Object(__WEBPACK_IMPORTED_MODULE_3__util_isScheduler__["a" /* isScheduler */])(scheduler)) { scheduler = __WEBPACK_IMPORTED_MODULE_2__scheduler_async__["a" /* async */]; } this.scheduler = scheduler; this.dueTime = Object(__WEBPACK_IMPORTED_MODULE_4__util_isDate__["a" /* isDate */])(dueTime) ? (+dueTime - this.scheduler.now()) : dueTime; } /** * Creates an Observable that starts emitting after an `initialDelay` and * emits ever increasing numbers after each `period` of time thereafter. * * Its like {@link interval}, but you can specify when * should the emissions start. * * * * `timer` returns an Observable that emits an infinite sequence of ascending * integers, with a constant interval of time, `period` of your choosing * between those emissions. The first emission happens after the specified * `initialDelay`. The initial delay may be a {@link Date}. By default, this * operator uses the `async` IScheduler to provide a notion of time, but you * may pass any IScheduler to it. If `period` is not specified, the output * Observable emits only one value, `0`. Otherwise, it emits an infinite * sequence. * * @example Emits ascending numbers, one every second (1000ms), starting after 3 seconds * var numbers = Rx.Observable.timer(3000, 1000); * numbers.subscribe(x => console.log(x)); * * @example Emits one number after five seconds * var numbers = Rx.Observable.timer(5000); * numbers.subscribe(x => console.log(x)); * * @see {@link interval} * @see {@link delay} * * @param {number|Date} initialDelay The initial delay time to wait before * emitting the first value of `0`. * @param {number} [period] The period of time between emissions of the * subsequent numbers. * @param {Scheduler} [scheduler=async] The IScheduler to use for scheduling * the emission of values, and providing a notion of "time". * @return {Observable} An Observable that emits a `0` after the * `initialDelay` and ever increasing numbers after each `period` of time * thereafter. * @static true * @name timer * @owner Observable */ TimerObservable.create = function (initialDelay, period, scheduler) { if (initialDelay === void 0) { initialDelay = 0; } return new TimerObservable(initialDelay, period, scheduler); }; TimerObservable.dispatch = function (state) { var index = state.index, period = state.period, subscriber = state.subscriber; var action = this; subscriber.next(index); if (subscriber.closed) { return; } else if (period === -1) { return subscriber.complete(); } state.index = index + 1; action.schedule(state, period); }; TimerObservable.prototype._subscribe = function (subscriber) { var index = 0; var _a = this, period = _a.period, dueTime = _a.dueTime, scheduler = _a.scheduler; return scheduler.schedule(TimerObservable.dispatch, dueTime, { index: index, period: period, subscriber: subscriber }); }; return TimerObservable; }(__WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */])); //# sourceMappingURL=TimerObservable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/combineLatest.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = combineLatest; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isScheduler__ = __webpack_require__("../../../../rxjs/_esm5/util/isScheduler.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isArray__ = __webpack_require__("../../../../rxjs/_esm5/util/isArray.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ArrayObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/ArrayObservable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_combineLatest__ = __webpack_require__("../../../../rxjs/_esm5/operators/combineLatest.js"); /** PURE_IMPORTS_START .._util_isScheduler,.._util_isArray,._ArrayObservable,.._operators_combineLatest PURE_IMPORTS_END */ /* tslint:enable:max-line-length */ /** * Combines multiple Observables to create an Observable whose values are * calculated from the latest values of each of its input Observables. * * Whenever any input Observable emits a value, it * computes a formula using the latest values from all the inputs, then emits * the output of that formula. * * * * `combineLatest` combines the values from all the Observables passed as * arguments. This is done by subscribing to each Observable in order and, * whenever any Observable emits, collecting an array of the most recent * values from each Observable. So if you pass `n` Observables to operator, * returned Observable will always emit an array of `n` values, in order * corresponding to order of passed Observables (value from the first Observable * on the first place and so on). * * Static version of `combineLatest` accepts either an array of Observables * or each Observable can be put directly as an argument. Note that array of * Observables is good choice, if you don't know beforehand how many Observables * you will combine. Passing empty array will result in Observable that * completes immediately. * * To ensure output array has always the same length, `combineLatest` will * actually wait for all input Observables to emit at least once, * before it starts emitting results. This means if some Observable emits * values before other Observables started emitting, all that values but last * will be lost. On the other hand, is some Observable does not emit value but * completes, resulting Observable will complete at the same moment without * emitting anything, since it will be now impossible to include value from * completed Observable in resulting array. Also, if some input Observable does * not emit any value and never completes, `combineLatest` will also never emit * and never complete, since, again, it will wait for all streams to emit some * value. * * If at least one Observable was passed to `combineLatest` and all passed Observables * emitted something, resulting Observable will complete when all combined * streams complete. So even if some Observable completes, result of * `combineLatest` will still emit values when other Observables do. In case * of completed Observable, its value from now on will always be the last * emitted value. On the other hand, if any Observable errors, `combineLatest` * will error immediately as well, and all other Observables will be unsubscribed. * * `combineLatest` accepts as optional parameter `project` function, which takes * as arguments all values that would normally be emitted by resulting Observable. * `project` can return any kind of value, which will be then emitted by Observable * instead of default array. Note that `project` does not take as argument that array * of values, but values themselves. That means default `project` can be imagined * as function that takes all its arguments and puts them into an array. * * * @example Combine two timer Observables * const firstTimer = Rx.Observable.timer(0, 1000); // emit 0, 1, 2... after every second, starting from now * const secondTimer = Rx.Observable.timer(500, 1000); // emit 0, 1, 2... after every second, starting 0,5s from now * const combinedTimers = Rx.Observable.combineLatest(firstTimer, secondTimer); * combinedTimers.subscribe(value => console.log(value)); * // Logs * // [0, 0] after 0.5s * // [1, 0] after 1s * // [1, 1] after 1.5s * // [2, 1] after 2s * * * @example Combine an array of Observables * const observables = [1, 5, 10].map( * n => Rx.Observable.of(n).delay(n * 1000).startWith(0) // emit 0 and then emit n after n seconds * ); * const combined = Rx.Observable.combineLatest(observables); * combined.subscribe(value => console.log(value)); * // Logs * // [0, 0, 0] immediately * // [1, 0, 0] after 1s * // [1, 5, 0] after 5s * // [1, 5, 10] after 10s * * * @example Use project function to dynamically calculate the Body-Mass Index * var weight = Rx.Observable.of(70, 72, 76, 79, 75); * var height = Rx.Observable.of(1.76, 1.77, 1.78); * var bmi = Rx.Observable.combineLatest(weight, height, (w, h) => w / (h * h)); * bmi.subscribe(x => console.log('BMI is ' + x)); * * // With output to console: * // BMI is 24.212293388429753 * // BMI is 23.93948099205209 * // BMI is 23.671253629592222 * * * @see {@link combineAll} * @see {@link merge} * @see {@link withLatestFrom} * * @param {ObservableInput} observable1 An input Observable to combine with other Observables. * @param {ObservableInput} observable2 An input Observable to combine with other Observables. * More than one input Observables may be given as arguments * or an array of Observables may be given as the first argument. * @param {function} [project] An optional function to project the values from * the combined latest values into a new value on the output Observable. * @param {Scheduler} [scheduler=null] The IScheduler to use for subscribing to * each input Observable. * @return {Observable} An Observable of projected values from the most recent * values from each input Observable, or an array of the most recent values from * each input Observable. * @static true * @name combineLatest * @owner Observable */ function combineLatest() { var observables = []; for (var _i = 0; _i < arguments.length; _i++) { observables[_i - 0] = arguments[_i]; } var project = null; var scheduler = null; if (Object(__WEBPACK_IMPORTED_MODULE_0__util_isScheduler__["a" /* isScheduler */])(observables[observables.length - 1])) { scheduler = observables.pop(); } if (typeof observables[observables.length - 1] === 'function') { project = observables.pop(); } // if the first and only other argument besides the resultSelector is an array // assume it's been called with `combineLatest([obs1, obs2, obs3], project)` if (observables.length === 1 && Object(__WEBPACK_IMPORTED_MODULE_1__util_isArray__["a" /* isArray */])(observables[0])) { observables = observables[0]; } return new __WEBPACK_IMPORTED_MODULE_2__ArrayObservable__["a" /* ArrayObservable */](observables, scheduler).lift(new __WEBPACK_IMPORTED_MODULE_3__operators_combineLatest__["a" /* CombineLatestOperator */](project)); } //# sourceMappingURL=combineLatest.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/concat.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = concat; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isScheduler__ = __webpack_require__("../../../../rxjs/_esm5/util/isScheduler.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__of__ = __webpack_require__("../../../../rxjs/_esm5/observable/of.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__from__ = __webpack_require__("../../../../rxjs/_esm5/observable/from.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_concatAll__ = __webpack_require__("../../../../rxjs/_esm5/operators/concatAll.js"); /** PURE_IMPORTS_START .._util_isScheduler,._of,._from,.._operators_concatAll PURE_IMPORTS_END */ /* tslint:enable:max-line-length */ /** * Creates an output Observable which sequentially emits all values from given * Observable and then moves on to the next. * * Concatenates multiple Observables together by * sequentially emitting their values, one Observable after the other. * * * * `concat` joins multiple Observables together, by subscribing to them one at a time and * merging their results into the output Observable. You can pass either an array of * Observables, or put them directly as arguments. Passing an empty array will result * in Observable that completes immediately. * * `concat` will subscribe to first input Observable and emit all its values, without * changing or affecting them in any way. When that Observable completes, it will * subscribe to then next Observable passed and, again, emit its values. This will be * repeated, until the operator runs out of Observables. When last input Observable completes, * `concat` will complete as well. At any given moment only one Observable passed to operator * emits values. If you would like to emit values from passed Observables concurrently, check out * {@link merge} instead, especially with optional `concurrent` parameter. As a matter of fact, * `concat` is an equivalent of `merge` operator with `concurrent` parameter set to `1`. * * Note that if some input Observable never completes, `concat` will also never complete * and Observables following the one that did not complete will never be subscribed. On the other * hand, if some Observable simply completes immediately after it is subscribed, it will be * invisible for `concat`, which will just move on to the next Observable. * * If any Observable in chain errors, instead of passing control to the next Observable, * `concat` will error immediately as well. Observables that would be subscribed after * the one that emitted error, never will. * * If you pass to `concat` the same Observable many times, its stream of values * will be "replayed" on every subscription, which means you can repeat given Observable * as many times as you like. If passing the same Observable to `concat` 1000 times becomes tedious, * you can always use {@link repeat}. * * @example Concatenate a timer counting from 0 to 3 with a synchronous sequence from 1 to 10 * var timer = Rx.Observable.interval(1000).take(4); * var sequence = Rx.Observable.range(1, 10); * var result = Rx.Observable.concat(timer, sequence); * result.subscribe(x => console.log(x)); * * // results in: * // 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 -immediate-> 1 ... 10 * * * @example Concatenate an array of 3 Observables * var timer1 = Rx.Observable.interval(1000).take(10); * var timer2 = Rx.Observable.interval(2000).take(6); * var timer3 = Rx.Observable.interval(500).take(10); * var result = Rx.Observable.concat([timer1, timer2, timer3]); // note that array is passed * result.subscribe(x => console.log(x)); * * // results in the following: * // (Prints to console sequentially) * // -1000ms-> 0 -1000ms-> 1 -1000ms-> ... 9 * // -2000ms-> 0 -2000ms-> 1 -2000ms-> ... 5 * // -500ms-> 0 -500ms-> 1 -500ms-> ... 9 * * * @example Concatenate the same Observable to repeat it * const timer = Rx.Observable.interval(1000).take(2); * * Rx.Observable.concat(timer, timer) // concating the same Observable! * .subscribe( * value => console.log(value), * err => {}, * () => console.log('...and it is done!') * ); * * // Logs: * // 0 after 1s * // 1 after 2s * // 0 after 3s * // 1 after 4s * // "...and it is done!" also after 4s * * @see {@link concatAll} * @see {@link concatMap} * @see {@link concatMapTo} * * @param {ObservableInput} input1 An input Observable to concatenate with others. * @param {ObservableInput} input2 An input Observable to concatenate with others. * More than one input Observables may be given as argument. * @param {Scheduler} [scheduler=null] An optional IScheduler to schedule each * Observable subscription on. * @return {Observable} All values of each passed Observable merged into a * single Observable, in order, in serial fashion. * @static true * @name concat * @owner Observable */ function concat() { var observables = []; for (var _i = 0; _i < arguments.length; _i++) { observables[_i - 0] = arguments[_i]; } if (observables.length === 1 || (observables.length === 2 && Object(__WEBPACK_IMPORTED_MODULE_0__util_isScheduler__["a" /* isScheduler */])(observables[1]))) { return Object(__WEBPACK_IMPORTED_MODULE_2__from__["a" /* from */])(observables[0]); } return Object(__WEBPACK_IMPORTED_MODULE_3__operators_concatAll__["a" /* concatAll */])()(__WEBPACK_IMPORTED_MODULE_1__of__["a" /* of */].apply(void 0, observables)); } //# sourceMappingURL=concat.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/defer.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return defer; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DeferObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/DeferObservable.js"); /** PURE_IMPORTS_START ._DeferObservable PURE_IMPORTS_END */ var defer = __WEBPACK_IMPORTED_MODULE_0__DeferObservable__["a" /* DeferObservable */].create; //# sourceMappingURL=defer.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/empty.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return empty; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__EmptyObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/EmptyObservable.js"); /** PURE_IMPORTS_START ._EmptyObservable PURE_IMPORTS_END */ var empty = __WEBPACK_IMPORTED_MODULE_0__EmptyObservable__["a" /* EmptyObservable */].create; //# sourceMappingURL=empty.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/forkJoin.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return forkJoin; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ForkJoinObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/ForkJoinObservable.js"); /** PURE_IMPORTS_START ._ForkJoinObservable PURE_IMPORTS_END */ var forkJoin = __WEBPACK_IMPORTED_MODULE_0__ForkJoinObservable__["a" /* ForkJoinObservable */].create; //# sourceMappingURL=forkJoin.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/from.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return from; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__FromObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/FromObservable.js"); /** PURE_IMPORTS_START ._FromObservable PURE_IMPORTS_END */ var from = __WEBPACK_IMPORTED_MODULE_0__FromObservable__["a" /* FromObservable */].create; //# sourceMappingURL=from.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/fromEvent.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return fromEvent; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__FromEventObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/FromEventObservable.js"); /** PURE_IMPORTS_START ._FromEventObservable PURE_IMPORTS_END */ var fromEvent = __WEBPACK_IMPORTED_MODULE_0__FromEventObservable__["a" /* FromEventObservable */].create; //# sourceMappingURL=fromEvent.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/fromEventPattern.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return fromEventPattern; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__FromEventPatternObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/FromEventPatternObservable.js"); /** PURE_IMPORTS_START ._FromEventPatternObservable PURE_IMPORTS_END */ var fromEventPattern = __WEBPACK_IMPORTED_MODULE_0__FromEventPatternObservable__["a" /* FromEventPatternObservable */].create; //# sourceMappingURL=fromEventPattern.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/fromPromise.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return fromPromise; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PromiseObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/PromiseObservable.js"); /** PURE_IMPORTS_START ._PromiseObservable PURE_IMPORTS_END */ var fromPromise = __WEBPACK_IMPORTED_MODULE_0__PromiseObservable__["a" /* PromiseObservable */].create; //# sourceMappingURL=fromPromise.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/merge.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = merge; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ArrayObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/ArrayObservable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isScheduler__ = __webpack_require__("../../../../rxjs/_esm5/util/isScheduler.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_mergeAll__ = __webpack_require__("../../../../rxjs/_esm5/operators/mergeAll.js"); /** PURE_IMPORTS_START .._Observable,._ArrayObservable,.._util_isScheduler,.._operators_mergeAll PURE_IMPORTS_END */ /* tslint:enable:max-line-length */ /** * Creates an output Observable which concurrently emits all values from every * given input Observable. * * Flattens multiple Observables together by blending * their values into one Observable. * * * * `merge` subscribes to each given input Observable (as arguments), and simply * forwards (without doing any transformation) all the values from all the input * Observables to the output Observable. The output Observable only completes * once all input Observables have completed. Any error delivered by an input * Observable will be immediately emitted on the output Observable. * * @example Merge together two Observables: 1s interval and clicks * var clicks = Rx.Observable.fromEvent(document, 'click'); * var timer = Rx.Observable.interval(1000); * var clicksOrTimer = Rx.Observable.merge(clicks, timer); * clicksOrTimer.subscribe(x => console.log(x)); * * // Results in the following: * // timer will emit ascending values, one every second(1000ms) to console * // clicks logs MouseEvents to console everytime the "document" is clicked * // Since the two streams are merged you see these happening * // as they occur. * * @example Merge together 3 Observables, but only 2 run concurrently * var timer1 = Rx.Observable.interval(1000).take(10); * var timer2 = Rx.Observable.interval(2000).take(6); * var timer3 = Rx.Observable.interval(500).take(10); * var concurrent = 2; // the argument * var merged = Rx.Observable.merge(timer1, timer2, timer3, concurrent); * merged.subscribe(x => console.log(x)); * * // Results in the following: * // - First timer1 and timer2 will run concurrently * // - timer1 will emit a value every 1000ms for 10 iterations * // - timer2 will emit a value every 2000ms for 6 iterations * // - after timer1 hits it's max iteration, timer2 will * // continue, and timer3 will start to run concurrently with timer2 * // - when timer2 hits it's max iteration it terminates, and * // timer3 will continue to emit a value every 500ms until it is complete * * @see {@link mergeAll} * @see {@link mergeMap} * @see {@link mergeMapTo} * @see {@link mergeScan} * * @param {...ObservableInput} observables Input Observables to merge together. * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input * Observables being subscribed to concurrently. * @param {Scheduler} [scheduler=null] The IScheduler to use for managing * concurrency of input Observables. * @return {Observable} an Observable that emits items that are the result of * every input Observable. * @static true * @name merge * @owner Observable */ function merge() { var observables = []; for (var _i = 0; _i < arguments.length; _i++) { observables[_i - 0] = arguments[_i]; } var concurrent = Number.POSITIVE_INFINITY; var scheduler = null; var last = observables[observables.length - 1]; if (Object(__WEBPACK_IMPORTED_MODULE_2__util_isScheduler__["a" /* isScheduler */])(last)) { scheduler = observables.pop(); if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') { concurrent = observables.pop(); } } else if (typeof last === 'number') { concurrent = observables.pop(); } if (scheduler === null && observables.length === 1 && observables[0] instanceof __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */]) { return observables[0]; } return Object(__WEBPACK_IMPORTED_MODULE_3__operators_mergeAll__["a" /* mergeAll */])(concurrent)(new __WEBPACK_IMPORTED_MODULE_1__ArrayObservable__["a" /* ArrayObservable */](observables, scheduler)); } //# sourceMappingURL=merge.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/of.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return of; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ArrayObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/ArrayObservable.js"); /** PURE_IMPORTS_START ._ArrayObservable PURE_IMPORTS_END */ var of = __WEBPACK_IMPORTED_MODULE_0__ArrayObservable__["a" /* ArrayObservable */].of; //# sourceMappingURL=of.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/throw.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _throw; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ErrorObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/ErrorObservable.js"); /** PURE_IMPORTS_START ._ErrorObservable PURE_IMPORTS_END */ var _throw = __WEBPACK_IMPORTED_MODULE_0__ErrorObservable__["a" /* ErrorObservable */].create; //# sourceMappingURL=throw.js.map /***/ }), /***/ "../../../../rxjs/_esm5/observable/timer.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return timer; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__TimerObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/TimerObservable.js"); /** PURE_IMPORTS_START ._TimerObservable PURE_IMPORTS_END */ var timer = __WEBPACK_IMPORTED_MODULE_0__TimerObservable__["a" /* TimerObservable */].create; //# sourceMappingURL=timer.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operator/catch.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = _catch; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__operators_catchError__ = __webpack_require__("../../../../rxjs/_esm5/operators/catchError.js"); /** PURE_IMPORTS_START .._operators_catchError PURE_IMPORTS_END */ /** * Catches errors on the observable to be handled by returning a new observable or throwing an error. * * * * @example Continues with a different Observable when there's an error * * Observable.of(1, 2, 3, 4, 5) * .map(n => { * if (n == 4) { * throw 'four!'; * } * return n; * }) * .catch(err => Observable.of('I', 'II', 'III', 'IV', 'V')) * .subscribe(x => console.log(x)); * // 1, 2, 3, I, II, III, IV, V * * @example Retries the caught source Observable again in case of error, similar to retry() operator * * Observable.of(1, 2, 3, 4, 5) * .map(n => { * if (n === 4) { * throw 'four!'; * } * return n; * }) * .catch((err, caught) => caught) * .take(30) * .subscribe(x => console.log(x)); * // 1, 2, 3, 1, 2, 3, ... * * @example Throws a new error when the source Observable throws an error * * Observable.of(1, 2, 3, 4, 5) * .map(n => { * if (n == 4) { * throw 'four!'; * } * return n; * }) * .catch(err => { * throw 'error in source. Details: ' + err; * }) * .subscribe( * x => console.log(x), * err => console.log(err) * ); * // 1, 2, 3, error in source. Details: four! * * @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which * is the source observable, in case you'd like to "retry" that observable by returning it again. Whatever observable * is returned by the `selector` will be used to continue the observable chain. * @return {Observable} An observable that originates from either the source or the observable returned by the * catch `selector` function. * @method catch * @name catch * @owner Observable */ function _catch(selector) { return Object(__WEBPACK_IMPORTED_MODULE_0__operators_catchError__["a" /* catchError */])(selector)(this); } //# sourceMappingURL=catch.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operator/concatAll.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = concatAll; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__operators_concatAll__ = __webpack_require__("../../../../rxjs/_esm5/operators/concatAll.js"); /** PURE_IMPORTS_START .._operators_concatAll PURE_IMPORTS_END */ /* tslint:enable:max-line-length */ /** * Converts a higher-order Observable into a first-order Observable by * concatenating the inner Observables in order. * * Flattens an Observable-of-Observables by putting one * inner Observable after the other. * * * * Joins every Observable emitted by the source (a higher-order Observable), in * a serial fashion. It subscribes to each inner Observable only after the * previous inner Observable has completed, and merges all of their values into * the returned observable. * * __Warning:__ If the source Observable emits Observables quickly and * endlessly, and the inner Observables it emits generally complete slower than * the source emits, you can run into memory issues as the incoming Observables * collect in an unbounded buffer. * * Note: `concatAll` is equivalent to `mergeAll` with concurrency parameter set * to `1`. * * @example For each click event, tick every second from 0 to 3, with no concurrency * var clicks = Rx.Observable.fromEvent(document, 'click'); * var higherOrder = clicks.map(ev => Rx.Observable.interval(1000).take(4)); * var firstOrder = higherOrder.concatAll(); * firstOrder.subscribe(x => console.log(x)); * * // Results in the following: * // (results are not concurrent) * // For every click on the "document" it will emit values 0 to 3 spaced * // on a 1000ms interval * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 * * @see {@link combineAll} * @see {@link concat} * @see {@link concatMap} * @see {@link concatMapTo} * @see {@link exhaust} * @see {@link mergeAll} * @see {@link switch} * @see {@link zipAll} * * @return {Observable} An Observable emitting values from all the inner * Observables concatenated. * @method concatAll * @owner Observable */ function concatAll() { return Object(__WEBPACK_IMPORTED_MODULE_0__operators_concatAll__["a" /* concatAll */])()(this); } //# sourceMappingURL=concatAll.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operator/concatMap.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = concatMap; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__operators_concatMap__ = __webpack_require__("../../../../rxjs/_esm5/operators/concatMap.js"); /** PURE_IMPORTS_START .._operators_concatMap PURE_IMPORTS_END */ /* tslint:enable:max-line-length */ /** * Projects each source value to an Observable which is merged in the output * Observable, in a serialized fashion waiting for each one to complete before * merging the next. * * Maps each value to an Observable, then flattens all of * these inner Observables using {@link concatAll}. * * * * Returns an Observable that emits items based on applying a function that you * supply to each item emitted by the source Observable, where that function * returns an (so-called "inner") Observable. Each new inner Observable is * concatenated with the previous inner Observable. * * __Warning:__ if source values arrive endlessly and faster than their * corresponding inner Observables can complete, it will result in memory issues * as inner Observables amass in an unbounded buffer waiting for their turn to * be subscribed to. * * Note: `concatMap` is equivalent to `mergeMap` with concurrency parameter set * to `1`. * * @example For each click event, tick every second from 0 to 3, with no concurrency * var clicks = Rx.Observable.fromEvent(document, 'click'); * var result = clicks.concatMap(ev => Rx.Observable.interval(1000).take(4)); * result.subscribe(x => console.log(x)); * * // Results in the following: * // (results are not concurrent) * // For every click on the "document" it will emit values 0 to 3 spaced * // on a 1000ms interval * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 * * @see {@link concat} * @see {@link concatAll} * @see {@link concatMapTo} * @see {@link exhaustMap} * @see {@link mergeMap} * @see {@link switchMap} * * @param {function(value: T, ?index: number): ObservableInput} project A function * that, when applied to an item emitted by the source Observable, returns an * Observable. * @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector] * A function to produce the value on the output Observable based on the values * and the indices of the source (outer) emission and the inner Observable * emission. The arguments passed to this function are: * - `outerValue`: the value that came from the source * - `innerValue`: the value that came from the projected Observable * - `outerIndex`: the "index" of the value that came from the source * - `innerIndex`: the "index" of the value from the projected Observable * @return {Observable} An Observable that emits the result of applying the * projection function (and the optional `resultSelector`) to each item emitted * by the source Observable and taking values from each projected inner * Observable sequentially. * @method concatMap * @owner Observable */ function concatMap(project, resultSelector) { return Object(__WEBPACK_IMPORTED_MODULE_0__operators_concatMap__["a" /* concatMap */])(project, resultSelector)(this); } //# sourceMappingURL=concatMap.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operator/every.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = every; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__operators_every__ = __webpack_require__("../../../../rxjs/_esm5/operators/every.js"); /** PURE_IMPORTS_START .._operators_every PURE_IMPORTS_END */ /** * Returns an Observable that emits whether or not every item of the source satisfies the condition specified. * * @example A simple example emitting true if all elements are less than 5, false otherwise * Observable.of(1, 2, 3, 4, 5, 6) * .every(x => x < 5) * .subscribe(x => console.log(x)); // -> false * * @param {function} predicate A function for determining if an item meets a specified condition. * @param {any} [thisArg] Optional object to use for `this` in the callback. * @return {Observable} An Observable of booleans that determines if all items of the source Observable meet the condition specified. * @method every * @owner Observable */ function every(predicate, thisArg) { return Object(__WEBPACK_IMPORTED_MODULE_0__operators_every__["a" /* every */])(predicate, thisArg)(this); } //# sourceMappingURL=every.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operator/filter.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = filter; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__operators_filter__ = __webpack_require__("../../../../rxjs/_esm5/operators/filter.js"); /** PURE_IMPORTS_START .._operators_filter PURE_IMPORTS_END */ /* tslint:enable:max-line-length */ /** * Filter items emitted by the source Observable by only emitting those that * satisfy a specified predicate. * * Like * [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), * it only emits a value from the source if it passes a criterion function. * * * * Similar to the well-known `Array.prototype.filter` method, this operator * takes values from the source Observable, passes them through a `predicate` * function and only emits those values that yielded `true`. * * @example Emit only click events whose target was a DIV element * var clicks = Rx.Observable.fromEvent(document, 'click'); * var clicksOnDivs = clicks.filter(ev => ev.target.tagName === 'DIV'); * clicksOnDivs.subscribe(x => console.log(x)); * * @see {@link distinct} * @see {@link distinctUntilChanged} * @see {@link distinctUntilKeyChanged} * @see {@link ignoreElements} * @see {@link partition} * @see {@link skip} * * @param {function(value: T, index: number): boolean} predicate A function that * evaluates each value emitted by the source Observable. If it returns `true`, * the value is emitted, if `false` the value is not passed to the output * Observable. The `index` parameter is the number `i` for the i-th source * emission that has happened since the subscription, starting from the number * `0`. * @param {any} [thisArg] An optional argument to determine the value of `this` * in the `predicate` function. * @return {Observable} An Observable of values from the source that were * allowed by the `predicate` function. * @method filter * @owner Observable */ function filter(predicate, thisArg) { return Object(__WEBPACK_IMPORTED_MODULE_0__operators_filter__["a" /* filter */])(predicate, thisArg)(this); } //# sourceMappingURL=filter.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operator/first.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = first; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__operators_first__ = __webpack_require__("../../../../rxjs/_esm5/operators/first.js"); /** PURE_IMPORTS_START .._operators_first PURE_IMPORTS_END */ /** * Emits only the first value (or the first value that meets some condition) * emitted by the source Observable. * * Emits only the first value. Or emits only the first * value that passes some test. * * * * If called with no arguments, `first` emits the first value of the source * Observable, then completes. If called with a `predicate` function, `first` * emits the first value of the source that matches the specified condition. It * may also take a `resultSelector` function to produce the output value from * the input value, and a `defaultValue` to emit in case the source completes * before it is able to emit a valid value. Throws an error if `defaultValue` * was not provided and a matching element is not found. * * @example Emit only the first click that happens on the DOM * var clicks = Rx.Observable.fromEvent(document, 'click'); * var result = clicks.first(); * result.subscribe(x => console.log(x)); * * @example Emits the first click that happens on a DIV * var clicks = Rx.Observable.fromEvent(document, 'click'); * var result = clicks.first(ev => ev.target.tagName === 'DIV'); * result.subscribe(x => console.log(x)); * * @see {@link filter} * @see {@link find} * @see {@link take} * * @throws {EmptyError} Delivers an EmptyError to the Observer's `error` * callback if the Observable completes before any `next` notification was sent. * * @param {function(value: T, index: number, source: Observable): boolean} [predicate] * An optional function called with each item to test for condition matching. * @param {function(value: T, index: number): R} [resultSelector] A function to * produce the value on the output Observable based on the values * and the indices of the source Observable. The arguments passed to this * function are: * - `value`: the value that was emitted on the source. * - `index`: the "index" of the value from the source. * @param {R} [defaultValue] The default value emitted in case no valid value * was found on the source. * @return {Observable} An Observable of the first item that matches the * condition. * @method first * @owner Observable */ function first(predicate, resultSelector, defaultValue) { return Object(__WEBPACK_IMPORTED_MODULE_0__operators_first__["a" /* first */])(predicate, resultSelector, defaultValue)(this); } //# sourceMappingURL=first.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operator/last.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = last; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__operators_last__ = __webpack_require__("../../../../rxjs/_esm5/operators/last.js"); /** PURE_IMPORTS_START .._operators_last PURE_IMPORTS_END */ /* tslint:enable:max-line-length */ /** * Returns an Observable that emits only the last item emitted by the source Observable. * It optionally takes a predicate function as a parameter, in which case, rather than emitting * the last item from the source Observable, the resulting Observable will emit the last item * from the source Observable that satisfies the predicate. * * * * @throws {EmptyError} Delivers an EmptyError to the Observer's `error` * callback if the Observable completes before any `next` notification was sent. * @param {function} predicate - The condition any source emitted item has to satisfy. * @return {Observable} An Observable that emits only the last item satisfying the given condition * from the source, or an NoSuchElementException if no such items are emitted. * @throws - Throws if no items that match the predicate are emitted by the source Observable. * @method last * @owner Observable */ function last(predicate, resultSelector, defaultValue) { return Object(__WEBPACK_IMPORTED_MODULE_0__operators_last__["a" /* last */])(predicate, resultSelector, defaultValue)(this); } //# sourceMappingURL=last.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operator/map.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = map; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__operators_map__ = __webpack_require__("../../../../rxjs/_esm5/operators/map.js"); /** PURE_IMPORTS_START .._operators_map PURE_IMPORTS_END */ /** * Applies a given `project` function to each value emitted by the source * Observable, and emits the resulting values as an Observable. * * Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map), * it passes each source value through a transformation function to get * corresponding output values. * * * * Similar to the well known `Array.prototype.map` function, this operator * applies a projection to each value and emits that projection in the output * Observable. * * @example Map every click to the clientX position of that click * var clicks = Rx.Observable.fromEvent(document, 'click'); * var positions = clicks.map(ev => ev.clientX); * positions.subscribe(x => console.log(x)); * * @see {@link mapTo} * @see {@link pluck} * * @param {function(value: T, index: number): R} project The function to apply * to each `value` emitted by the source Observable. The `index` parameter is * the number `i` for the i-th emission that has happened since the * subscription, starting from the number `0`. * @param {any} [thisArg] An optional argument to define what `this` is in the * `project` function. * @return {Observable} An Observable that emits the values from the source * Observable transformed by the given `project` function. * @method map * @owner Observable */ function map(project, thisArg) { return Object(__WEBPACK_IMPORTED_MODULE_0__operators_map__["a" /* map */])(project, thisArg)(this); } //# sourceMappingURL=map.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operator/mergeAll.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = mergeAll; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__operators_mergeAll__ = __webpack_require__("../../../../rxjs/_esm5/operators/mergeAll.js"); /** PURE_IMPORTS_START .._operators_mergeAll PURE_IMPORTS_END */ /** * Converts a higher-order Observable into a first-order Observable which * concurrently delivers all values that are emitted on the inner Observables. * * Flattens an Observable-of-Observables. * * * * `mergeAll` subscribes to an Observable that emits Observables, also known as * a higher-order Observable. Each time it observes one of these emitted inner * Observables, it subscribes to that and delivers all the values from the * inner Observable on the output Observable. The output Observable only * completes once all inner Observables have completed. Any error delivered by * a inner Observable will be immediately emitted on the output Observable. * * @example Spawn a new interval Observable for each click event, and blend their outputs as one Observable * var clicks = Rx.Observable.fromEvent(document, 'click'); * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000)); * var firstOrder = higherOrder.mergeAll(); * firstOrder.subscribe(x => console.log(x)); * * @example Count from 0 to 9 every second for each click, but only allow 2 concurrent timers * var clicks = Rx.Observable.fromEvent(document, 'click'); * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000).take(10)); * var firstOrder = higherOrder.mergeAll(2); * firstOrder.subscribe(x => console.log(x)); * * @see {@link combineAll} * @see {@link concatAll} * @see {@link exhaust} * @see {@link merge} * @see {@link mergeMap} * @see {@link mergeMapTo} * @see {@link mergeScan} * @see {@link switch} * @see {@link zipAll} * * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of inner * Observables being subscribed to concurrently. * @return {Observable} An Observable that emits values coming from all the * inner Observables emitted by the source Observable. * @method mergeAll * @owner Observable */ function mergeAll(concurrent) { if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } return Object(__WEBPACK_IMPORTED_MODULE_0__operators_mergeAll__["a" /* mergeAll */])(concurrent)(this); } //# sourceMappingURL=mergeAll.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operator/mergeMap.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = mergeMap; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__operators_mergeMap__ = __webpack_require__("../../../../rxjs/_esm5/operators/mergeMap.js"); /** PURE_IMPORTS_START .._operators_mergeMap PURE_IMPORTS_END */ /* tslint:enable:max-line-length */ /** * Projects each source value to an Observable which is merged in the output * Observable. * * Maps each value to an Observable, then flattens all of * these inner Observables using {@link mergeAll}. * * * * Returns an Observable that emits items based on applying a function that you * supply to each item emitted by the source Observable, where that function * returns an Observable, and then merging those resulting Observables and * emitting the results of this merger. * * @example Map and flatten each letter to an Observable ticking every 1 second * var letters = Rx.Observable.of('a', 'b', 'c'); * var result = letters.mergeMap(x => * Rx.Observable.interval(1000).map(i => x+i) * ); * result.subscribe(x => console.log(x)); * * // Results in the following: * // a0 * // b0 * // c0 * // a1 * // b1 * // c1 * // continues to list a,b,c with respective ascending integers * * @see {@link concatMap} * @see {@link exhaustMap} * @see {@link merge} * @see {@link mergeAll} * @see {@link mergeMapTo} * @see {@link mergeScan} * @see {@link switchMap} * * @param {function(value: T, ?index: number): ObservableInput} project A function * that, when applied to an item emitted by the source Observable, returns an * Observable. * @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector] * A function to produce the value on the output Observable based on the values * and the indices of the source (outer) emission and the inner Observable * emission. The arguments passed to this function are: * - `outerValue`: the value that came from the source * - `innerValue`: the value that came from the projected Observable * - `outerIndex`: the "index" of the value that came from the source * - `innerIndex`: the "index" of the value from the projected Observable * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input * Observables being subscribed to concurrently. * @return {Observable} An Observable that emits the result of applying the * projection function (and the optional `resultSelector`) to each item emitted * by the source Observable and merging the results of the Observables obtained * from this transformation. * @method mergeMap * @owner Observable */ function mergeMap(project, resultSelector, concurrent) { if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } return Object(__WEBPACK_IMPORTED_MODULE_0__operators_mergeMap__["a" /* mergeMap */])(project, resultSelector, concurrent)(this); } //# sourceMappingURL=mergeMap.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operator/reduce.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = reduce; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__operators_reduce__ = __webpack_require__("../../../../rxjs/_esm5/operators/reduce.js"); /** PURE_IMPORTS_START .._operators_reduce PURE_IMPORTS_END */ /* tslint:enable:max-line-length */ /** * Applies an accumulator function over the source Observable, and returns the * accumulated result when the source completes, given an optional seed value. * * Combines together all values emitted on the source, * using an accumulator function that knows how to join a new source value into * the accumulation from the past. * * * * Like * [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce), * `reduce` applies an `accumulator` function against an accumulation and each * value of the source Observable (from the past) to reduce it to a single * value, emitted on the output Observable. Note that `reduce` will only emit * one value, only when the source Observable completes. It is equivalent to * applying operator {@link scan} followed by operator {@link last}. * * Returns an Observable that applies a specified `accumulator` function to each * item emitted by the source Observable. If a `seed` value is specified, then * that value will be used as the initial value for the accumulator. If no seed * value is specified, the first item of the source is used as the seed. * * @example Count the number of click events that happened in 5 seconds * var clicksInFiveSeconds = Rx.Observable.fromEvent(document, 'click') * .takeUntil(Rx.Observable.interval(5000)); * var ones = clicksInFiveSeconds.mapTo(1); * var seed = 0; * var count = ones.reduce((acc, one) => acc + one, seed); * count.subscribe(x => console.log(x)); * * @see {@link count} * @see {@link expand} * @see {@link mergeScan} * @see {@link scan} * * @param {function(acc: R, value: T, index: number): R} accumulator The accumulator function * called on each source value. * @param {R} [seed] The initial accumulation value. * @return {Observable} An Observable that emits a single value that is the * result of accumulating the values emitted by the source Observable. * @method reduce * @owner Observable */ function reduce(accumulator, seed) { // providing a seed of `undefined` *should* be valid and trigger // hasSeed! so don't use `seed !== undefined` checks! // For this reason, we have to check it here at the original call site // otherwise inside Operator/Subscriber we won't know if `undefined` // means they didn't provide anything or if they literally provided `undefined` if (arguments.length >= 2) { return Object(__WEBPACK_IMPORTED_MODULE_0__operators_reduce__["a" /* reduce */])(accumulator, seed)(this); } return Object(__WEBPACK_IMPORTED_MODULE_0__operators_reduce__["a" /* reduce */])(accumulator)(this); } //# sourceMappingURL=reduce.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operator/share.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = share; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__operators_share__ = __webpack_require__("../../../../rxjs/_esm5/operators/share.js"); /** PURE_IMPORTS_START .._operators_share PURE_IMPORTS_END */ /** * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one * Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will * unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`. * * This behaves similarly to .publish().refCount(), with a behavior difference when the source observable emits complete. * .publish().refCount() will not resubscribe to the original source, however .share() will resubscribe to the original source. * Observable.of("test").publish().refCount() will not re-emit "test" on new subscriptions, Observable.of("test").share() will * re-emit "test" to new subscriptions. * * * * @return {Observable} An Observable that upon connection causes the source Observable to emit items to its Observers. * @method share * @owner Observable */ function share() { return Object(__WEBPACK_IMPORTED_MODULE_0__operators_share__["a" /* share */])()(this); } ; //# sourceMappingURL=share.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/audit.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = audit; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_tryCatch__ = __webpack_require__("../../../../rxjs/_esm5/util/tryCatch.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_errorObject__ = __webpack_require__("../../../../rxjs/_esm5/util/errorObject.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__OuterSubscriber__ = __webpack_require__("../../../../rxjs/_esm5/OuterSubscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_subscribeToResult__ = __webpack_require__("../../../../rxjs/_esm5/util/subscribeToResult.js"); /** PURE_IMPORTS_START .._util_tryCatch,.._util_errorObject,.._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * Ignores source values for a duration determined by another Observable, then * emits the most recent value from the source Observable, then repeats this * process. * * It's like {@link auditTime}, but the silencing * duration is determined by a second Observable. * * * * `audit` is similar to `throttle`, but emits the last value from the silenced * time window, instead of the first value. `audit` emits the most recent value * from the source Observable on the output Observable as soon as its internal * timer becomes disabled, and ignores source values while the timer is enabled. * Initially, the timer is disabled. As soon as the first source value arrives, * the timer is enabled by calling the `durationSelector` function with the * source value, which returns the "duration" Observable. When the duration * Observable emits a value or completes, the timer is disabled, then the most * recent source value is emitted on the output Observable, and this process * repeats for the next source value. * * @example Emit clicks at a rate of at most one click per second * var clicks = Rx.Observable.fromEvent(document, 'click'); * var result = clicks.audit(ev => Rx.Observable.interval(1000)); * result.subscribe(x => console.log(x)); * * @see {@link auditTime} * @see {@link debounce} * @see {@link delayWhen} * @see {@link sample} * @see {@link throttle} * * @param {function(value: T): SubscribableOrPromise} durationSelector A function * that receives a value from the source Observable, for computing the silencing * duration, returned as an Observable or a Promise. * @return {Observable} An Observable that performs rate-limiting of * emissions from the source Observable. * @method audit * @owner Observable */ function audit(durationSelector) { return function auditOperatorFunction(source) { return source.lift(new AuditOperator(durationSelector)); }; } var AuditOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function AuditOperator(durationSelector) { this.durationSelector = durationSelector; } AuditOperator.prototype.call = function (subscriber, source) { return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector)); }; return AuditOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var AuditSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(AuditSubscriber, _super); function AuditSubscriber(destination, durationSelector) { _super.call(this, destination); this.durationSelector = durationSelector; this.hasValue = false; } AuditSubscriber.prototype._next = function (value) { this.value = value; this.hasValue = true; if (!this.throttled) { var duration = Object(__WEBPACK_IMPORTED_MODULE_0__util_tryCatch__["a" /* tryCatch */])(this.durationSelector)(value); if (duration === __WEBPACK_IMPORTED_MODULE_1__util_errorObject__["a" /* errorObject */]) { this.destination.error(__WEBPACK_IMPORTED_MODULE_1__util_errorObject__["a" /* errorObject */].e); } else { var innerSubscription = Object(__WEBPACK_IMPORTED_MODULE_3__util_subscribeToResult__["a" /* subscribeToResult */])(this, duration); if (innerSubscription.closed) { this.clearThrottle(); } else { this.add(this.throttled = innerSubscription); } } } }; AuditSubscriber.prototype.clearThrottle = function () { var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled; if (throttled) { this.remove(throttled); this.throttled = null; throttled.unsubscribe(); } if (hasValue) { this.value = null; this.hasValue = false; this.destination.next(value); } }; AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) { this.clearThrottle(); }; AuditSubscriber.prototype.notifyComplete = function () { this.clearThrottle(); }; return AuditSubscriber; }(__WEBPACK_IMPORTED_MODULE_2__OuterSubscriber__["a" /* OuterSubscriber */])); //# sourceMappingURL=audit.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/auditTime.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = auditTime; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scheduler_async__ = __webpack_require__("../../../../rxjs/_esm5/scheduler/async.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__audit__ = __webpack_require__("../../../../rxjs/_esm5/operators/audit.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_timer__ = __webpack_require__("../../../../rxjs/_esm5/observable/timer.js"); /** PURE_IMPORTS_START .._scheduler_async,._audit,.._observable_timer PURE_IMPORTS_END */ /** * Ignores source values for `duration` milliseconds, then emits the most recent * value from the source Observable, then repeats this process. * * When it sees a source values, it ignores that plus * the next ones for `duration` milliseconds, and then it emits the most recent * value from the source. * * * * `auditTime` is similar to `throttleTime`, but emits the last value from the * silenced time window, instead of the first value. `auditTime` emits the most * recent value from the source Observable on the output Observable as soon as * its internal timer becomes disabled, and ignores source values while the * timer is enabled. Initially, the timer is disabled. As soon as the first * source value arrives, the timer is enabled. After `duration` milliseconds (or * the time unit determined internally by the optional `scheduler`) has passed, * the timer is disabled, then the most recent source value is emitted on the * output Observable, and this process repeats for the next source value. * Optionally takes a {@link IScheduler} for managing timers. * * @example Emit clicks at a rate of at most one click per second * var clicks = Rx.Observable.fromEvent(document, 'click'); * var result = clicks.auditTime(1000); * result.subscribe(x => console.log(x)); * * @see {@link audit} * @see {@link debounceTime} * @see {@link delay} * @see {@link sampleTime} * @see {@link throttleTime} * * @param {number} duration Time to wait before emitting the most recent source * value, measured in milliseconds or the time unit determined internally * by the optional `scheduler`. * @param {Scheduler} [scheduler=async] The {@link IScheduler} to use for * managing the timers that handle the rate-limiting behavior. * @return {Observable} An Observable that performs rate-limiting of * emissions from the source Observable. * @method auditTime * @owner Observable */ function auditTime(duration, scheduler) { if (scheduler === void 0) { scheduler = __WEBPACK_IMPORTED_MODULE_0__scheduler_async__["a" /* async */]; } return Object(__WEBPACK_IMPORTED_MODULE_1__audit__["a" /* audit */])(function () { return Object(__WEBPACK_IMPORTED_MODULE_2__observable_timer__["a" /* timer */])(duration, scheduler); }); } //# sourceMappingURL=auditTime.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/catchError.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = catchError; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__OuterSubscriber__ = __webpack_require__("../../../../rxjs/_esm5/OuterSubscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_subscribeToResult__ = __webpack_require__("../../../../rxjs/_esm5/util/subscribeToResult.js"); /** PURE_IMPORTS_START .._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * Catches errors on the observable to be handled by returning a new observable or throwing an error. * * * * @example Continues with a different Observable when there's an error * * Observable.of(1, 2, 3, 4, 5) * .map(n => { * if (n == 4) { * throw 'four!'; * } * return n; * }) * .catch(err => Observable.of('I', 'II', 'III', 'IV', 'V')) * .subscribe(x => console.log(x)); * // 1, 2, 3, I, II, III, IV, V * * @example Retries the caught source Observable again in case of error, similar to retry() operator * * Observable.of(1, 2, 3, 4, 5) * .map(n => { * if (n === 4) { * throw 'four!'; * } * return n; * }) * .catch((err, caught) => caught) * .take(30) * .subscribe(x => console.log(x)); * // 1, 2, 3, 1, 2, 3, ... * * @example Throws a new error when the source Observable throws an error * * Observable.of(1, 2, 3, 4, 5) * .map(n => { * if (n == 4) { * throw 'four!'; * } * return n; * }) * .catch(err => { * throw 'error in source. Details: ' + err; * }) * .subscribe( * x => console.log(x), * err => console.log(err) * ); * // 1, 2, 3, error in source. Details: four! * * @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which * is the source observable, in case you'd like to "retry" that observable by returning it again. Whatever observable * is returned by the `selector` will be used to continue the observable chain. * @return {Observable} An observable that originates from either the source or the observable returned by the * catch `selector` function. * @name catchError */ function catchError(selector) { return function catchErrorOperatorFunction(source) { var operator = new CatchOperator(selector); var caught = source.lift(operator); return (operator.caught = caught); }; } var CatchOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function CatchOperator(selector) { this.selector = selector; } CatchOperator.prototype.call = function (subscriber, source) { return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught)); }; return CatchOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var CatchSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(CatchSubscriber, _super); function CatchSubscriber(destination, selector, caught) { _super.call(this, destination); this.selector = selector; this.caught = caught; } // NOTE: overriding `error` instead of `_error` because we don't want // to have this flag this subscriber as `isStopped`. We can mimic the // behavior of the RetrySubscriber (from the `retry` operator), where // we unsubscribe from our source chain, reset our Subscriber flags, // then subscribe to the selector result. CatchSubscriber.prototype.error = function (err) { if (!this.isStopped) { var result = void 0; try { result = this.selector(err, this.caught); } catch (err2) { _super.prototype.error.call(this, err2); return; } this._unsubscribeAndRecycle(); this.add(Object(__WEBPACK_IMPORTED_MODULE_1__util_subscribeToResult__["a" /* subscribeToResult */])(this, result)); } }; return CatchSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__OuterSubscriber__["a" /* OuterSubscriber */])); //# sourceMappingURL=catchError.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/combineLatest.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = combineLatest; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CombineLatestOperator; }); /* unused harmony export CombineLatestSubscriber */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_ArrayObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/ArrayObservable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isArray__ = __webpack_require__("../../../../rxjs/_esm5/util/isArray.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__OuterSubscriber__ = __webpack_require__("../../../../rxjs/_esm5/OuterSubscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_subscribeToResult__ = __webpack_require__("../../../../rxjs/_esm5/util/subscribeToResult.js"); /** PURE_IMPORTS_START .._observable_ArrayObservable,.._util_isArray,.._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var none = {}; /* tslint:enable:max-line-length */ /** * Combines multiple Observables to create an Observable whose values are * calculated from the latest values of each of its input Observables. * * Whenever any input Observable emits a value, it * computes a formula using the latest values from all the inputs, then emits * the output of that formula. * * * * `combineLatest` combines the values from this Observable with values from * Observables passed as arguments. This is done by subscribing to each * Observable, in order, and collecting an array of each of the most recent * values any time any of the input Observables emits, then either taking that * array and passing it as arguments to an optional `project` function and * emitting the return value of that, or just emitting the array of recent * values directly if there is no `project` function. * * @example Dynamically calculate the Body-Mass Index from an Observable of weight and one for height * var weight = Rx.Observable.of(70, 72, 76, 79, 75); * var height = Rx.Observable.of(1.76, 1.77, 1.78); * var bmi = weight.combineLatest(height, (w, h) => w / (h * h)); * bmi.subscribe(x => console.log('BMI is ' + x)); * * // With output to console: * // BMI is 24.212293388429753 * // BMI is 23.93948099205209 * // BMI is 23.671253629592222 * * @see {@link combineAll} * @see {@link merge} * @see {@link withLatestFrom} * * @param {ObservableInput} other An input Observable to combine with the source * Observable. More than one input Observables may be given as argument. * @param {function} [project] An optional function to project the values from * the combined latest values into a new value on the output Observable. * @return {Observable} An Observable of projected values from the most recent * values from each input Observable, or an array of the most recent values from * each input Observable. * @method combineLatest * @owner Observable */ function combineLatest() { var observables = []; for (var _i = 0; _i < arguments.length; _i++) { observables[_i - 0] = arguments[_i]; } var project = null; if (typeof observables[observables.length - 1] === 'function') { project = observables.pop(); } // if the first and only other argument besides the resultSelector is an array // assume it's been called with `combineLatest([obs1, obs2, obs3], project)` if (observables.length === 1 && Object(__WEBPACK_IMPORTED_MODULE_1__util_isArray__["a" /* isArray */])(observables[0])) { observables = observables[0].slice(); } return function (source) { return source.lift.call(new __WEBPACK_IMPORTED_MODULE_0__observable_ArrayObservable__["a" /* ArrayObservable */]([source].concat(observables)), new CombineLatestOperator(project)); }; } var CombineLatestOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function CombineLatestOperator(project) { this.project = project; } CombineLatestOperator.prototype.call = function (subscriber, source) { return source.subscribe(new CombineLatestSubscriber(subscriber, this.project)); }; return CombineLatestOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var CombineLatestSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(CombineLatestSubscriber, _super); function CombineLatestSubscriber(destination, project) { _super.call(this, destination); this.project = project; this.active = 0; this.values = []; this.observables = []; } CombineLatestSubscriber.prototype._next = function (observable) { this.values.push(none); this.observables.push(observable); }; CombineLatestSubscriber.prototype._complete = function () { var observables = this.observables; var len = observables.length; if (len === 0) { this.destination.complete(); } else { this.active = len; this.toRespond = len; for (var i = 0; i < len; i++) { var observable = observables[i]; this.add(Object(__WEBPACK_IMPORTED_MODULE_3__util_subscribeToResult__["a" /* subscribeToResult */])(this, observable, observable, i)); } } }; CombineLatestSubscriber.prototype.notifyComplete = function (unused) { if ((this.active -= 1) === 0) { this.destination.complete(); } }; CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { var values = this.values; var oldVal = values[outerIndex]; var toRespond = !this.toRespond ? 0 : oldVal === none ? --this.toRespond : this.toRespond; values[outerIndex] = innerValue; if (toRespond === 0) { if (this.project) { this._tryProject(values); } else { this.destination.next(values.slice()); } } }; CombineLatestSubscriber.prototype._tryProject = function (values) { var result; try { result = this.project.apply(this, values); } catch (err) { this.destination.error(err); return; } this.destination.next(result); }; return CombineLatestSubscriber; }(__WEBPACK_IMPORTED_MODULE_2__OuterSubscriber__["a" /* OuterSubscriber */])); //# sourceMappingURL=combineLatest.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/concatAll.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = concatAll; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeAll__ = __webpack_require__("../../../../rxjs/_esm5/operators/mergeAll.js"); /** PURE_IMPORTS_START ._mergeAll PURE_IMPORTS_END */ /** * Converts a higher-order Observable into a first-order Observable by * concatenating the inner Observables in order. * * Flattens an Observable-of-Observables by putting one * inner Observable after the other. * * * * Joins every Observable emitted by the source (a higher-order Observable), in * a serial fashion. It subscribes to each inner Observable only after the * previous inner Observable has completed, and merges all of their values into * the returned observable. * * __Warning:__ If the source Observable emits Observables quickly and * endlessly, and the inner Observables it emits generally complete slower than * the source emits, you can run into memory issues as the incoming Observables * collect in an unbounded buffer. * * Note: `concatAll` is equivalent to `mergeAll` with concurrency parameter set * to `1`. * * @example For each click event, tick every second from 0 to 3, with no concurrency * var clicks = Rx.Observable.fromEvent(document, 'click'); * var higherOrder = clicks.map(ev => Rx.Observable.interval(1000).take(4)); * var firstOrder = higherOrder.concatAll(); * firstOrder.subscribe(x => console.log(x)); * * // Results in the following: * // (results are not concurrent) * // For every click on the "document" it will emit values 0 to 3 spaced * // on a 1000ms interval * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 * * @see {@link combineAll} * @see {@link concat} * @see {@link concatMap} * @see {@link concatMapTo} * @see {@link exhaust} * @see {@link mergeAll} * @see {@link switch} * @see {@link zipAll} * * @return {Observable} An Observable emitting values from all the inner * Observables concatenated. * @method concatAll * @owner Observable */ function concatAll() { return Object(__WEBPACK_IMPORTED_MODULE_0__mergeAll__["a" /* mergeAll */])(1); } //# sourceMappingURL=concatAll.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/concatMap.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = concatMap; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__("../../../../rxjs/_esm5/operators/mergeMap.js"); /** PURE_IMPORTS_START ._mergeMap PURE_IMPORTS_END */ /* tslint:enable:max-line-length */ /** * Projects each source value to an Observable which is merged in the output * Observable, in a serialized fashion waiting for each one to complete before * merging the next. * * Maps each value to an Observable, then flattens all of * these inner Observables using {@link concatAll}. * * * * Returns an Observable that emits items based on applying a function that you * supply to each item emitted by the source Observable, where that function * returns an (so-called "inner") Observable. Each new inner Observable is * concatenated with the previous inner Observable. * * __Warning:__ if source values arrive endlessly and faster than their * corresponding inner Observables can complete, it will result in memory issues * as inner Observables amass in an unbounded buffer waiting for their turn to * be subscribed to. * * Note: `concatMap` is equivalent to `mergeMap` with concurrency parameter set * to `1`. * * @example For each click event, tick every second from 0 to 3, with no concurrency * var clicks = Rx.Observable.fromEvent(document, 'click'); * var result = clicks.concatMap(ev => Rx.Observable.interval(1000).take(4)); * result.subscribe(x => console.log(x)); * * // Results in the following: * // (results are not concurrent) * // For every click on the "document" it will emit values 0 to 3 spaced * // on a 1000ms interval * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 * * @see {@link concat} * @see {@link concatAll} * @see {@link concatMapTo} * @see {@link exhaustMap} * @see {@link mergeMap} * @see {@link switchMap} * * @param {function(value: T, ?index: number): ObservableInput} project A function * that, when applied to an item emitted by the source Observable, returns an * Observable. * @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector] * A function to produce the value on the output Observable based on the values * and the indices of the source (outer) emission and the inner Observable * emission. The arguments passed to this function are: * - `outerValue`: the value that came from the source * - `innerValue`: the value that came from the projected Observable * - `outerIndex`: the "index" of the value that came from the source * - `innerIndex`: the "index" of the value from the projected Observable * @return {Observable} An Observable that emits the result of applying the * projection function (and the optional `resultSelector`) to each item emitted * by the source Observable and taking values from each projected inner * Observable sequentially. * @method concatMap * @owner Observable */ function concatMap(project, resultSelector) { return Object(__WEBPACK_IMPORTED_MODULE_0__mergeMap__["a" /* mergeMap */])(project, resultSelector, 1); } //# sourceMappingURL=concatMap.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/debounceTime.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = debounceTime; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scheduler_async__ = __webpack_require__("../../../../rxjs/_esm5/scheduler/async.js"); /** PURE_IMPORTS_START .._Subscriber,.._scheduler_async PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * Emits a value from the source Observable only after a particular time span * has passed without another source emission. * * It's like {@link delay}, but passes only the most * recent value from each burst of emissions. * * * * `debounceTime` delays values emitted by the source Observable, but drops * previous pending delayed emissions if a new value arrives on the source * Observable. This operator keeps track of the most recent value from the * source Observable, and emits that only when `dueTime` enough time has passed * without any other value appearing on the source Observable. If a new value * appears before `dueTime` silence occurs, the previous value will be dropped * and will not be emitted on the output Observable. * * This is a rate-limiting operator, because it is impossible for more than one * value to be emitted in any time window of duration `dueTime`, but it is also * a delay-like operator since output emissions do not occur at the same time as * they did on the source Observable. Optionally takes a {@link IScheduler} for * managing timers. * * @example Emit the most recent click after a burst of clicks * var clicks = Rx.Observable.fromEvent(document, 'click'); * var result = clicks.debounceTime(1000); * result.subscribe(x => console.log(x)); * * @see {@link auditTime} * @see {@link debounce} * @see {@link delay} * @see {@link sampleTime} * @see {@link throttleTime} * * @param {number} dueTime The timeout duration in milliseconds (or the time * unit determined internally by the optional `scheduler`) for the window of * time required to wait for emission silence before emitting the most recent * source value. * @param {Scheduler} [scheduler=async] The {@link IScheduler} to use for * managing the timers that handle the timeout for each value. * @return {Observable} An Observable that delays the emissions of the source * Observable by the specified `dueTime`, and may drop some values if they occur * too frequently. * @method debounceTime * @owner Observable */ function debounceTime(dueTime, scheduler) { if (scheduler === void 0) { scheduler = __WEBPACK_IMPORTED_MODULE_1__scheduler_async__["a" /* async */]; } return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); }; } var DebounceTimeOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function DebounceTimeOperator(dueTime, scheduler) { this.dueTime = dueTime; this.scheduler = scheduler; } DebounceTimeOperator.prototype.call = function (subscriber, source) { return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler)); }; return DebounceTimeOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var DebounceTimeSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(DebounceTimeSubscriber, _super); function DebounceTimeSubscriber(destination, dueTime, scheduler) { _super.call(this, destination); this.dueTime = dueTime; this.scheduler = scheduler; this.debouncedSubscription = null; this.lastValue = null; this.hasValue = false; } DebounceTimeSubscriber.prototype._next = function (value) { this.clearDebounce(); this.lastValue = value; this.hasValue = true; this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this)); }; DebounceTimeSubscriber.prototype._complete = function () { this.debouncedNext(); this.destination.complete(); }; DebounceTimeSubscriber.prototype.debouncedNext = function () { this.clearDebounce(); if (this.hasValue) { this.destination.next(this.lastValue); this.lastValue = null; this.hasValue = false; } }; DebounceTimeSubscriber.prototype.clearDebounce = function () { var debouncedSubscription = this.debouncedSubscription; if (debouncedSubscription !== null) { this.remove(debouncedSubscription); debouncedSubscription.unsubscribe(); this.debouncedSubscription = null; } }; return DebounceTimeSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); function dispatchNext(subscriber) { subscriber.debouncedNext(); } //# sourceMappingURL=debounceTime.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/defaultIfEmpty.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = defaultIfEmpty; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /* tslint:enable:max-line-length */ /** * Emits a given value if the source Observable completes without emitting any * `next` value, otherwise mirrors the source Observable. * * If the source Observable turns out to be empty, then * this operator will emit a default value. * * * * `defaultIfEmpty` emits the values emitted by the source Observable or a * specified default value if the source Observable is empty (completes without * having emitted any `next` value). * * @example If no clicks happen in 5 seconds, then emit "no clicks" * var clicks = Rx.Observable.fromEvent(document, 'click'); * var clicksBeforeFive = clicks.takeUntil(Rx.Observable.interval(5000)); * var result = clicksBeforeFive.defaultIfEmpty('no clicks'); * result.subscribe(x => console.log(x)); * * @see {@link empty} * @see {@link last} * * @param {any} [defaultValue=null] The default value used if the source * Observable is empty. * @return {Observable} An Observable that emits either the specified * `defaultValue` if the source Observable emits no items, or the values emitted * by the source Observable. * @method defaultIfEmpty * @owner Observable */ function defaultIfEmpty(defaultValue) { if (defaultValue === void 0) { defaultValue = null; } return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); }; } var DefaultIfEmptyOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function DefaultIfEmptyOperator(defaultValue) { this.defaultValue = defaultValue; } DefaultIfEmptyOperator.prototype.call = function (subscriber, source) { return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue)); }; return DefaultIfEmptyOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var DefaultIfEmptySubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(DefaultIfEmptySubscriber, _super); function DefaultIfEmptySubscriber(destination, defaultValue) { _super.call(this, destination); this.defaultValue = defaultValue; this.isEmpty = true; } DefaultIfEmptySubscriber.prototype._next = function (value) { this.isEmpty = false; this.destination.next(value); }; DefaultIfEmptySubscriber.prototype._complete = function () { if (this.isEmpty) { this.destination.next(this.defaultValue); } this.destination.complete(); }; return DefaultIfEmptySubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=defaultIfEmpty.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/delay.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = delay; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scheduler_async__ = __webpack_require__("../../../../rxjs/_esm5/scheduler/async.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isDate__ = __webpack_require__("../../../../rxjs/_esm5/util/isDate.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Notification__ = __webpack_require__("../../../../rxjs/_esm5/Notification.js"); /** PURE_IMPORTS_START .._scheduler_async,.._util_isDate,.._Subscriber,.._Notification PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * Delays the emission of items from the source Observable by a given timeout or * until a given Date. * * Time shifts each item by some specified amount of * milliseconds. * * * * If the delay argument is a Number, this operator time shifts the source * Observable by that amount of time expressed in milliseconds. The relative * time intervals between the values are preserved. * * If the delay argument is a Date, this operator time shifts the start of the * Observable execution until the given date occurs. * * @example Delay each click by one second * var clicks = Rx.Observable.fromEvent(document, 'click'); * var delayedClicks = clicks.delay(1000); // each click emitted after 1 second * delayedClicks.subscribe(x => console.log(x)); * * @example Delay all clicks until a future date happens * var clicks = Rx.Observable.fromEvent(document, 'click'); * var date = new Date('March 15, 2050 12:00:00'); // in the future * var delayedClicks = clicks.delay(date); // click emitted only after that date * delayedClicks.subscribe(x => console.log(x)); * * @see {@link debounceTime} * @see {@link delayWhen} * * @param {number|Date} delay The delay duration in milliseconds (a `number`) or * a `Date` until which the emission of the source items is delayed. * @param {Scheduler} [scheduler=async] The IScheduler to use for * managing the timers that handle the time-shift for each item. * @return {Observable} An Observable that delays the emissions of the source * Observable by the specified timeout or Date. * @method delay * @owner Observable */ function delay(delay, scheduler) { if (scheduler === void 0) { scheduler = __WEBPACK_IMPORTED_MODULE_0__scheduler_async__["a" /* async */]; } var absoluteDelay = Object(__WEBPACK_IMPORTED_MODULE_1__util_isDate__["a" /* isDate */])(delay); var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay); return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); }; } var DelayOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function DelayOperator(delay, scheduler) { this.delay = delay; this.scheduler = scheduler; } DelayOperator.prototype.call = function (subscriber, source) { return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler)); }; return DelayOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var DelaySubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(DelaySubscriber, _super); function DelaySubscriber(destination, delay, scheduler) { _super.call(this, destination); this.delay = delay; this.scheduler = scheduler; this.queue = []; this.active = false; this.errored = false; } DelaySubscriber.dispatch = function (state) { var source = state.source; var queue = source.queue; var scheduler = state.scheduler; var destination = state.destination; while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) { queue.shift().notification.observe(destination); } if (queue.length > 0) { var delay_1 = Math.max(0, queue[0].time - scheduler.now()); this.schedule(state, delay_1); } else { source.active = false; } }; DelaySubscriber.prototype._schedule = function (scheduler) { this.active = true; this.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, { source: this, destination: this.destination, scheduler: scheduler })); }; DelaySubscriber.prototype.scheduleNotification = function (notification) { if (this.errored === true) { return; } var scheduler = this.scheduler; var message = new DelayMessage(scheduler.now() + this.delay, notification); this.queue.push(message); if (this.active === false) { this._schedule(scheduler); } }; DelaySubscriber.prototype._next = function (value) { this.scheduleNotification(__WEBPACK_IMPORTED_MODULE_3__Notification__["a" /* Notification */].createNext(value)); }; DelaySubscriber.prototype._error = function (err) { this.errored = true; this.queue = []; this.destination.error(err); }; DelaySubscriber.prototype._complete = function () { this.scheduleNotification(__WEBPACK_IMPORTED_MODULE_3__Notification__["a" /* Notification */].createComplete()); }; return DelaySubscriber; }(__WEBPACK_IMPORTED_MODULE_2__Subscriber__["a" /* Subscriber */])); var DelayMessage = /*@__PURE__*/ (/*@__PURE__*/ function () { function DelayMessage(time, notification) { this.time = time; this.notification = notification; } return DelayMessage; }()); //# sourceMappingURL=delay.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/every.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = every; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * Returns an Observable that emits whether or not every item of the source satisfies the condition specified. * * @example A simple example emitting true if all elements are less than 5, false otherwise * Observable.of(1, 2, 3, 4, 5, 6) * .every(x => x < 5) * .subscribe(x => console.log(x)); // -> false * * @param {function} predicate A function for determining if an item meets a specified condition. * @param {any} [thisArg] Optional object to use for `this` in the callback. * @return {Observable} An Observable of booleans that determines if all items of the source Observable meet the condition specified. * @method every * @owner Observable */ function every(predicate, thisArg) { return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); }; } var EveryOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function EveryOperator(predicate, thisArg, source) { this.predicate = predicate; this.thisArg = thisArg; this.source = source; } EveryOperator.prototype.call = function (observer, source) { return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source)); }; return EveryOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var EverySubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(EverySubscriber, _super); function EverySubscriber(destination, predicate, thisArg, source) { _super.call(this, destination); this.predicate = predicate; this.thisArg = thisArg; this.source = source; this.index = 0; this.thisArg = thisArg || this; } EverySubscriber.prototype.notifyComplete = function (everyValueMatch) { this.destination.next(everyValueMatch); this.destination.complete(); }; EverySubscriber.prototype._next = function (value) { var result = false; try { result = this.predicate.call(this.thisArg, value, this.index++, this.source); } catch (err) { this.destination.error(err); return; } if (!result) { this.notifyComplete(false); } }; EverySubscriber.prototype._complete = function () { this.notifyComplete(true); }; return EverySubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=every.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/filter.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = filter; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /* tslint:enable:max-line-length */ /** * Filter items emitted by the source Observable by only emitting those that * satisfy a specified predicate. * * Like * [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), * it only emits a value from the source if it passes a criterion function. * * * * Similar to the well-known `Array.prototype.filter` method, this operator * takes values from the source Observable, passes them through a `predicate` * function and only emits those values that yielded `true`. * * @example Emit only click events whose target was a DIV element * var clicks = Rx.Observable.fromEvent(document, 'click'); * var clicksOnDivs = clicks.filter(ev => ev.target.tagName === 'DIV'); * clicksOnDivs.subscribe(x => console.log(x)); * * @see {@link distinct} * @see {@link distinctUntilChanged} * @see {@link distinctUntilKeyChanged} * @see {@link ignoreElements} * @see {@link partition} * @see {@link skip} * * @param {function(value: T, index: number): boolean} predicate A function that * evaluates each value emitted by the source Observable. If it returns `true`, * the value is emitted, if `false` the value is not passed to the output * Observable. The `index` parameter is the number `i` for the i-th source * emission that has happened since the subscription, starting from the number * `0`. * @param {any} [thisArg] An optional argument to determine the value of `this` * in the `predicate` function. * @return {Observable} An Observable of values from the source that were * allowed by the `predicate` function. * @method filter * @owner Observable */ function filter(predicate, thisArg) { return function filterOperatorFunction(source) { return source.lift(new FilterOperator(predicate, thisArg)); }; } var FilterOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function FilterOperator(predicate, thisArg) { this.predicate = predicate; this.thisArg = thisArg; } FilterOperator.prototype.call = function (subscriber, source) { return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg)); }; return FilterOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var FilterSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(FilterSubscriber, _super); function FilterSubscriber(destination, predicate, thisArg) { _super.call(this, destination); this.predicate = predicate; this.thisArg = thisArg; this.count = 0; } // the try catch block below is left specifically for // optimization and perf reasons. a tryCatcher is not necessary here. FilterSubscriber.prototype._next = function (value) { var result; try { result = this.predicate.call(this.thisArg, value, this.count++); } catch (err) { this.destination.error(err); return; } if (result) { this.destination.next(value); } }; return FilterSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=filter.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/finalize.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = finalize; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscription__ = __webpack_require__("../../../../rxjs/_esm5/Subscription.js"); /** PURE_IMPORTS_START .._Subscriber,.._Subscription PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * Returns an Observable that mirrors the source Observable, but will call a specified function when * the source terminates on complete or error. * @param {function} callback Function to be called when source terminates. * @return {Observable} An Observable that mirrors the source, but will call the specified function on termination. * @method finally * @owner Observable */ function finalize(callback) { return function (source) { return source.lift(new FinallyOperator(callback)); }; } var FinallyOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function FinallyOperator(callback) { this.callback = callback; } FinallyOperator.prototype.call = function (subscriber, source) { return source.subscribe(new FinallySubscriber(subscriber, this.callback)); }; return FinallyOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var FinallySubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(FinallySubscriber, _super); function FinallySubscriber(destination, callback) { _super.call(this, destination); this.add(new __WEBPACK_IMPORTED_MODULE_1__Subscription__["a" /* Subscription */](callback)); } return FinallySubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=finalize.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/first.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = first; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_EmptyError__ = __webpack_require__("../../../../rxjs/_esm5/util/EmptyError.js"); /** PURE_IMPORTS_START .._Subscriber,.._util_EmptyError PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * Emits only the first value (or the first value that meets some condition) * emitted by the source Observable. * * Emits only the first value. Or emits only the first * value that passes some test. * * * * If called with no arguments, `first` emits the first value of the source * Observable, then completes. If called with a `predicate` function, `first` * emits the first value of the source that matches the specified condition. It * may also take a `resultSelector` function to produce the output value from * the input value, and a `defaultValue` to emit in case the source completes * before it is able to emit a valid value. Throws an error if `defaultValue` * was not provided and a matching element is not found. * * @example Emit only the first click that happens on the DOM * var clicks = Rx.Observable.fromEvent(document, 'click'); * var result = clicks.first(); * result.subscribe(x => console.log(x)); * * @example Emits the first click that happens on a DIV * var clicks = Rx.Observable.fromEvent(document, 'click'); * var result = clicks.first(ev => ev.target.tagName === 'DIV'); * result.subscribe(x => console.log(x)); * * @see {@link filter} * @see {@link find} * @see {@link take} * * @throws {EmptyError} Delivers an EmptyError to the Observer's `error` * callback if the Observable completes before any `next` notification was sent. * * @param {function(value: T, index: number, source: Observable): boolean} [predicate] * An optional function called with each item to test for condition matching. * @param {function(value: T, index: number): R} [resultSelector] A function to * produce the value on the output Observable based on the values * and the indices of the source Observable. The arguments passed to this * function are: * - `value`: the value that was emitted on the source. * - `index`: the "index" of the value from the source. * @param {R} [defaultValue] The default value emitted in case no valid value * was found on the source. * @return {Observable} An Observable of the first item that matches the * condition. * @method first * @owner Observable */ function first(predicate, resultSelector, defaultValue) { return function (source) { return source.lift(new FirstOperator(predicate, resultSelector, defaultValue, source)); }; } var FirstOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function FirstOperator(predicate, resultSelector, defaultValue, source) { this.predicate = predicate; this.resultSelector = resultSelector; this.defaultValue = defaultValue; this.source = source; } FirstOperator.prototype.call = function (observer, source) { return source.subscribe(new FirstSubscriber(observer, this.predicate, this.resultSelector, this.defaultValue, this.source)); }; return FirstOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var FirstSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(FirstSubscriber, _super); function FirstSubscriber(destination, predicate, resultSelector, defaultValue, source) { _super.call(this, destination); this.predicate = predicate; this.resultSelector = resultSelector; this.defaultValue = defaultValue; this.source = source; this.index = 0; this.hasCompleted = false; this._emitted = false; } FirstSubscriber.prototype._next = function (value) { var index = this.index++; if (this.predicate) { this._tryPredicate(value, index); } else { this._emit(value, index); } }; FirstSubscriber.prototype._tryPredicate = function (value, index) { var result; try { result = this.predicate(value, index, this.source); } catch (err) { this.destination.error(err); return; } if (result) { this._emit(value, index); } }; FirstSubscriber.prototype._emit = function (value, index) { if (this.resultSelector) { this._tryResultSelector(value, index); return; } this._emitFinal(value); }; FirstSubscriber.prototype._tryResultSelector = function (value, index) { var result; try { result = this.resultSelector(value, index); } catch (err) { this.destination.error(err); return; } this._emitFinal(result); }; FirstSubscriber.prototype._emitFinal = function (value) { var destination = this.destination; if (!this._emitted) { this._emitted = true; destination.next(value); destination.complete(); this.hasCompleted = true; } }; FirstSubscriber.prototype._complete = function () { var destination = this.destination; if (!this.hasCompleted && typeof this.defaultValue !== 'undefined') { destination.next(this.defaultValue); destination.complete(); } else if (!this.hasCompleted) { destination.error(new __WEBPACK_IMPORTED_MODULE_1__util_EmptyError__["a" /* EmptyError */]); } }; return FirstSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=first.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/last.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = last; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_EmptyError__ = __webpack_require__("../../../../rxjs/_esm5/util/EmptyError.js"); /** PURE_IMPORTS_START .._Subscriber,.._util_EmptyError PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /* tslint:enable:max-line-length */ /** * Returns an Observable that emits only the last item emitted by the source Observable. * It optionally takes a predicate function as a parameter, in which case, rather than emitting * the last item from the source Observable, the resulting Observable will emit the last item * from the source Observable that satisfies the predicate. * * * * @throws {EmptyError} Delivers an EmptyError to the Observer's `error` * callback if the Observable completes before any `next` notification was sent. * @param {function} predicate - The condition any source emitted item has to satisfy. * @return {Observable} An Observable that emits only the last item satisfying the given condition * from the source, or an NoSuchElementException if no such items are emitted. * @throws - Throws if no items that match the predicate are emitted by the source Observable. * @method last * @owner Observable */ function last(predicate, resultSelector, defaultValue) { return function (source) { return source.lift(new LastOperator(predicate, resultSelector, defaultValue, source)); }; } var LastOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function LastOperator(predicate, resultSelector, defaultValue, source) { this.predicate = predicate; this.resultSelector = resultSelector; this.defaultValue = defaultValue; this.source = source; } LastOperator.prototype.call = function (observer, source) { return source.subscribe(new LastSubscriber(observer, this.predicate, this.resultSelector, this.defaultValue, this.source)); }; return LastOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var LastSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(LastSubscriber, _super); function LastSubscriber(destination, predicate, resultSelector, defaultValue, source) { _super.call(this, destination); this.predicate = predicate; this.resultSelector = resultSelector; this.defaultValue = defaultValue; this.source = source; this.hasValue = false; this.index = 0; if (typeof defaultValue !== 'undefined') { this.lastValue = defaultValue; this.hasValue = true; } } LastSubscriber.prototype._next = function (value) { var index = this.index++; if (this.predicate) { this._tryPredicate(value, index); } else { if (this.resultSelector) { this._tryResultSelector(value, index); return; } this.lastValue = value; this.hasValue = true; } }; LastSubscriber.prototype._tryPredicate = function (value, index) { var result; try { result = this.predicate(value, index, this.source); } catch (err) { this.destination.error(err); return; } if (result) { if (this.resultSelector) { this._tryResultSelector(value, index); return; } this.lastValue = value; this.hasValue = true; } }; LastSubscriber.prototype._tryResultSelector = function (value, index) { var result; try { result = this.resultSelector(value, index); } catch (err) { this.destination.error(err); return; } this.lastValue = result; this.hasValue = true; }; LastSubscriber.prototype._complete = function () { var destination = this.destination; if (this.hasValue) { destination.next(this.lastValue); destination.complete(); } else { destination.error(new __WEBPACK_IMPORTED_MODULE_1__util_EmptyError__["a" /* EmptyError */]); } }; return LastSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=last.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/map.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = map; /* unused harmony export MapOperator */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * Applies a given `project` function to each value emitted by the source * Observable, and emits the resulting values as an Observable. * * Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map), * it passes each source value through a transformation function to get * corresponding output values. * * * * Similar to the well known `Array.prototype.map` function, this operator * applies a projection to each value and emits that projection in the output * Observable. * * @example Map every click to the clientX position of that click * var clicks = Rx.Observable.fromEvent(document, 'click'); * var positions = clicks.map(ev => ev.clientX); * positions.subscribe(x => console.log(x)); * * @see {@link mapTo} * @see {@link pluck} * * @param {function(value: T, index: number): R} project The function to apply * to each `value` emitted by the source Observable. The `index` parameter is * the number `i` for the i-th emission that has happened since the * subscription, starting from the number `0`. * @param {any} [thisArg] An optional argument to define what `this` is in the * `project` function. * @return {Observable} An Observable that emits the values from the source * Observable transformed by the given `project` function. * @method map * @owner Observable */ function map(project, thisArg) { return function mapOperation(source) { if (typeof project !== 'function') { throw new TypeError('argument is not a function. Are you looking for `mapTo()`?'); } return source.lift(new MapOperator(project, thisArg)); }; } var MapOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function MapOperator(project, thisArg) { this.project = project; this.thisArg = thisArg; } MapOperator.prototype.call = function (subscriber, source) { return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg)); }; return MapOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var MapSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(MapSubscriber, _super); function MapSubscriber(destination, project, thisArg) { _super.call(this, destination); this.project = project; this.count = 0; this.thisArg = thisArg || this; } // NOTE: This looks unoptimized, but it's actually purposefully NOT // using try/catch optimizations. MapSubscriber.prototype._next = function (value) { var result; try { result = this.project.call(this.thisArg, value, this.count++); } catch (err) { this.destination.error(err); return; } this.destination.next(result); }; return MapSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=map.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/mergeAll.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = mergeAll; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__("../../../../rxjs/_esm5/operators/mergeMap.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_identity__ = __webpack_require__("../../../../rxjs/_esm5/util/identity.js"); /** PURE_IMPORTS_START ._mergeMap,.._util_identity PURE_IMPORTS_END */ /** * Converts a higher-order Observable into a first-order Observable which * concurrently delivers all values that are emitted on the inner Observables. * * Flattens an Observable-of-Observables. * * * * `mergeAll` subscribes to an Observable that emits Observables, also known as * a higher-order Observable. Each time it observes one of these emitted inner * Observables, it subscribes to that and delivers all the values from the * inner Observable on the output Observable. The output Observable only * completes once all inner Observables have completed. Any error delivered by * a inner Observable will be immediately emitted on the output Observable. * * @example Spawn a new interval Observable for each click event, and blend their outputs as one Observable * var clicks = Rx.Observable.fromEvent(document, 'click'); * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000)); * var firstOrder = higherOrder.mergeAll(); * firstOrder.subscribe(x => console.log(x)); * * @example Count from 0 to 9 every second for each click, but only allow 2 concurrent timers * var clicks = Rx.Observable.fromEvent(document, 'click'); * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000).take(10)); * var firstOrder = higherOrder.mergeAll(2); * firstOrder.subscribe(x => console.log(x)); * * @see {@link combineAll} * @see {@link concatAll} * @see {@link exhaust} * @see {@link merge} * @see {@link mergeMap} * @see {@link mergeMapTo} * @see {@link mergeScan} * @see {@link switch} * @see {@link zipAll} * * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of inner * Observables being subscribed to concurrently. * @return {Observable} An Observable that emits values coming from all the * inner Observables emitted by the source Observable. * @method mergeAll * @owner Observable */ function mergeAll(concurrent) { if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } return Object(__WEBPACK_IMPORTED_MODULE_0__mergeMap__["a" /* mergeMap */])(__WEBPACK_IMPORTED_MODULE_1__util_identity__["a" /* identity */], null, concurrent); } //# sourceMappingURL=mergeAll.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/mergeMap.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = mergeMap; /* unused harmony export MergeMapOperator */ /* unused harmony export MergeMapSubscriber */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_subscribeToResult__ = __webpack_require__("../../../../rxjs/_esm5/util/subscribeToResult.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__OuterSubscriber__ = __webpack_require__("../../../../rxjs/_esm5/OuterSubscriber.js"); /** PURE_IMPORTS_START .._util_subscribeToResult,.._OuterSubscriber PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /* tslint:enable:max-line-length */ /** * Projects each source value to an Observable which is merged in the output * Observable. * * Maps each value to an Observable, then flattens all of * these inner Observables using {@link mergeAll}. * * * * Returns an Observable that emits items based on applying a function that you * supply to each item emitted by the source Observable, where that function * returns an Observable, and then merging those resulting Observables and * emitting the results of this merger. * * @example Map and flatten each letter to an Observable ticking every 1 second * var letters = Rx.Observable.of('a', 'b', 'c'); * var result = letters.mergeMap(x => * Rx.Observable.interval(1000).map(i => x+i) * ); * result.subscribe(x => console.log(x)); * * // Results in the following: * // a0 * // b0 * // c0 * // a1 * // b1 * // c1 * // continues to list a,b,c with respective ascending integers * * @see {@link concatMap} * @see {@link exhaustMap} * @see {@link merge} * @see {@link mergeAll} * @see {@link mergeMapTo} * @see {@link mergeScan} * @see {@link switchMap} * * @param {function(value: T, ?index: number): ObservableInput} project A function * that, when applied to an item emitted by the source Observable, returns an * Observable. * @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector] * A function to produce the value on the output Observable based on the values * and the indices of the source (outer) emission and the inner Observable * emission. The arguments passed to this function are: * - `outerValue`: the value that came from the source * - `innerValue`: the value that came from the projected Observable * - `outerIndex`: the "index" of the value that came from the source * - `innerIndex`: the "index" of the value from the projected Observable * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input * Observables being subscribed to concurrently. * @return {Observable} An Observable that emits the result of applying the * projection function (and the optional `resultSelector`) to each item emitted * by the source Observable and merging the results of the Observables obtained * from this transformation. * @method mergeMap * @owner Observable */ function mergeMap(project, resultSelector, concurrent) { if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } return function mergeMapOperatorFunction(source) { if (typeof resultSelector === 'number') { concurrent = resultSelector; resultSelector = null; } return source.lift(new MergeMapOperator(project, resultSelector, concurrent)); }; } var MergeMapOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function MergeMapOperator(project, resultSelector, concurrent) { if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } this.project = project; this.resultSelector = resultSelector; this.concurrent = concurrent; } MergeMapOperator.prototype.call = function (observer, source) { return source.subscribe(new MergeMapSubscriber(observer, this.project, this.resultSelector, this.concurrent)); }; return MergeMapOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var MergeMapSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(MergeMapSubscriber, _super); function MergeMapSubscriber(destination, project, resultSelector, concurrent) { if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } _super.call(this, destination); this.project = project; this.resultSelector = resultSelector; this.concurrent = concurrent; this.hasCompleted = false; this.buffer = []; this.active = 0; this.index = 0; } MergeMapSubscriber.prototype._next = function (value) { if (this.active < this.concurrent) { this._tryNext(value); } else { this.buffer.push(value); } }; MergeMapSubscriber.prototype._tryNext = function (value) { var result; var index = this.index++; try { result = this.project(value, index); } catch (err) { this.destination.error(err); return; } this.active++; this._innerSub(result, value, index); }; MergeMapSubscriber.prototype._innerSub = function (ish, value, index) { this.add(Object(__WEBPACK_IMPORTED_MODULE_0__util_subscribeToResult__["a" /* subscribeToResult */])(this, ish, value, index)); }; MergeMapSubscriber.prototype._complete = function () { this.hasCompleted = true; if (this.active === 0 && this.buffer.length === 0) { this.destination.complete(); } }; MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { if (this.resultSelector) { this._notifyResultSelector(outerValue, innerValue, outerIndex, innerIndex); } else { this.destination.next(innerValue); } }; MergeMapSubscriber.prototype._notifyResultSelector = function (outerValue, innerValue, outerIndex, innerIndex) { var result; try { result = this.resultSelector(outerValue, innerValue, outerIndex, innerIndex); } catch (err) { this.destination.error(err); return; } this.destination.next(result); }; MergeMapSubscriber.prototype.notifyComplete = function (innerSub) { var buffer = this.buffer; this.remove(innerSub); this.active--; if (buffer.length > 0) { this._next(buffer.shift()); } else if (this.active === 0 && this.hasCompleted) { this.destination.complete(); } }; return MergeMapSubscriber; }(__WEBPACK_IMPORTED_MODULE_1__OuterSubscriber__["a" /* OuterSubscriber */])); //# sourceMappingURL=mergeMap.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/multicast.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = multicast; /* unused harmony export MulticastOperator */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_ConnectableObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/ConnectableObservable.js"); /** PURE_IMPORTS_START .._observable_ConnectableObservable PURE_IMPORTS_END */ /* tslint:enable:max-line-length */ /** * Returns an Observable that emits the results of invoking a specified selector on items * emitted by a ConnectableObservable that shares a single subscription to the underlying stream. * * * * @param {Function|Subject} subjectOrSubjectFactory - Factory function to create an intermediate subject through * which the source sequence's elements will be multicast to the selector function * or Subject to push source elements into. * @param {Function} [selector] - Optional selector function that can use the multicasted source stream * as many times as needed, without causing multiple subscriptions to the source stream. * Subscribers to the given source will receive all notifications of the source from the * time of the subscription forward. * @return {Observable} An Observable that emits the results of invoking the selector * on the items emitted by a `ConnectableObservable` that shares a single subscription to * the underlying stream. * @method multicast * @owner Observable */ function multicast(subjectOrSubjectFactory, selector) { return function multicastOperatorFunction(source) { var subjectFactory; if (typeof subjectOrSubjectFactory === 'function') { subjectFactory = subjectOrSubjectFactory; } else { subjectFactory = function subjectFactory() { return subjectOrSubjectFactory; }; } if (typeof selector === 'function') { return source.lift(new MulticastOperator(subjectFactory, selector)); } var connectable = Object.create(source, __WEBPACK_IMPORTED_MODULE_0__observable_ConnectableObservable__["a" /* connectableObservableDescriptor */]); connectable.source = source; connectable.subjectFactory = subjectFactory; return connectable; }; } var MulticastOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function MulticastOperator(subjectFactory, selector) { this.subjectFactory = subjectFactory; this.selector = selector; } MulticastOperator.prototype.call = function (subscriber, source) { var selector = this.selector; var subject = this.subjectFactory(); var subscription = selector(subject).subscribe(subscriber); subscription.add(source.subscribe(subject)); return subscription; }; return MulticastOperator; }()); //# sourceMappingURL=multicast.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/observeOn.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export observeOn */ /* unused harmony export ObserveOnOperator */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ObserveOnSubscriber; }); /* unused harmony export ObserveOnMessage */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Notification__ = __webpack_require__("../../../../rxjs/_esm5/Notification.js"); /** PURE_IMPORTS_START .._Subscriber,.._Notification PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * * Re-emits all notifications from source Observable with specified scheduler. * * Ensure a specific scheduler is used, from outside of an Observable. * * `observeOn` is an operator that accepts a scheduler as a first parameter, which will be used to reschedule * notifications emitted by the source Observable. It might be useful, if you do not have control over * internal scheduler of a given Observable, but want to control when its values are emitted nevertheless. * * Returned Observable emits the same notifications (nexted values, complete and error events) as the source Observable, * but rescheduled with provided scheduler. Note that this doesn't mean that source Observables internal * scheduler will be replaced in any way. Original scheduler still will be used, but when the source Observable emits * notification, it will be immediately scheduled again - this time with scheduler passed to `observeOn`. * An anti-pattern would be calling `observeOn` on Observable that emits lots of values synchronously, to split * that emissions into asynchronous chunks. For this to happen, scheduler would have to be passed into the source * Observable directly (usually into the operator that creates it). `observeOn` simply delays notifications a * little bit more, to ensure that they are emitted at expected moments. * * As a matter of fact, `observeOn` accepts second parameter, which specifies in milliseconds with what delay notifications * will be emitted. The main difference between {@link delay} operator and `observeOn` is that `observeOn` * will delay all notifications - including error notifications - while `delay` will pass through error * from source Observable immediately when it is emitted. In general it is highly recommended to use `delay` operator * for any kind of delaying of values in the stream, while using `observeOn` to specify which scheduler should be used * for notification emissions in general. * * @example Ensure values in subscribe are called just before browser repaint. * const intervals = Rx.Observable.interval(10); // Intervals are scheduled * // with async scheduler by default... * * intervals * .observeOn(Rx.Scheduler.animationFrame) // ...but we will observe on animationFrame * .subscribe(val => { // scheduler to ensure smooth animation. * someDiv.style.height = val + 'px'; * }); * * @see {@link delay} * * @param {IScheduler} scheduler Scheduler that will be used to reschedule notifications from source Observable. * @param {number} [delay] Number of milliseconds that states with what delay every notification should be rescheduled. * @return {Observable} Observable that emits the same notifications as the source Observable, * but with provided scheduler. * * @method observeOn * @owner Observable */ function observeOn(scheduler, delay) { if (delay === void 0) { delay = 0; } return function observeOnOperatorFunction(source) { return source.lift(new ObserveOnOperator(scheduler, delay)); }; } var ObserveOnOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function ObserveOnOperator(scheduler, delay) { if (delay === void 0) { delay = 0; } this.scheduler = scheduler; this.delay = delay; } ObserveOnOperator.prototype.call = function (subscriber, source) { return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay)); }; return ObserveOnOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var ObserveOnSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(ObserveOnSubscriber, _super); function ObserveOnSubscriber(destination, scheduler, delay) { if (delay === void 0) { delay = 0; } _super.call(this, destination); this.scheduler = scheduler; this.delay = delay; } ObserveOnSubscriber.dispatch = function (arg) { var notification = arg.notification, destination = arg.destination; notification.observe(destination); this.unsubscribe(); }; ObserveOnSubscriber.prototype.scheduleMessage = function (notification) { this.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination))); }; ObserveOnSubscriber.prototype._next = function (value) { this.scheduleMessage(__WEBPACK_IMPORTED_MODULE_1__Notification__["a" /* Notification */].createNext(value)); }; ObserveOnSubscriber.prototype._error = function (err) { this.scheduleMessage(__WEBPACK_IMPORTED_MODULE_1__Notification__["a" /* Notification */].createError(err)); }; ObserveOnSubscriber.prototype._complete = function () { this.scheduleMessage(__WEBPACK_IMPORTED_MODULE_1__Notification__["a" /* Notification */].createComplete()); }; return ObserveOnSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); var ObserveOnMessage = /*@__PURE__*/ (/*@__PURE__*/ function () { function ObserveOnMessage(notification, destination) { this.notification = notification; this.destination = destination; } return ObserveOnMessage; }()); //# sourceMappingURL=observeOn.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/reduce.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = reduce; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scan__ = __webpack_require__("../../../../rxjs/_esm5/operators/scan.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__takeLast__ = __webpack_require__("../../../../rxjs/_esm5/operators/takeLast.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultIfEmpty__ = __webpack_require__("../../../../rxjs/_esm5/operators/defaultIfEmpty.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__("../../../../rxjs/_esm5/util/pipe.js"); /** PURE_IMPORTS_START ._scan,._takeLast,._defaultIfEmpty,.._util_pipe PURE_IMPORTS_END */ /* tslint:enable:max-line-length */ /** * Applies an accumulator function over the source Observable, and returns the * accumulated result when the source completes, given an optional seed value. * * Combines together all values emitted on the source, * using an accumulator function that knows how to join a new source value into * the accumulation from the past. * * * * Like * [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce), * `reduce` applies an `accumulator` function against an accumulation and each * value of the source Observable (from the past) to reduce it to a single * value, emitted on the output Observable. Note that `reduce` will only emit * one value, only when the source Observable completes. It is equivalent to * applying operator {@link scan} followed by operator {@link last}. * * Returns an Observable that applies a specified `accumulator` function to each * item emitted by the source Observable. If a `seed` value is specified, then * that value will be used as the initial value for the accumulator. If no seed * value is specified, the first item of the source is used as the seed. * * @example Count the number of click events that happened in 5 seconds * var clicksInFiveSeconds = Rx.Observable.fromEvent(document, 'click') * .takeUntil(Rx.Observable.interval(5000)); * var ones = clicksInFiveSeconds.mapTo(1); * var seed = 0; * var count = ones.reduce((acc, one) => acc + one, seed); * count.subscribe(x => console.log(x)); * * @see {@link count} * @see {@link expand} * @see {@link mergeScan} * @see {@link scan} * * @param {function(acc: R, value: T, index: number): R} accumulator The accumulator function * called on each source value. * @param {R} [seed] The initial accumulation value. * @return {Observable} An Observable that emits a single value that is the * result of accumulating the values emitted by the source Observable. * @method reduce * @owner Observable */ function reduce(accumulator, seed) { // providing a seed of `undefined` *should* be valid and trigger // hasSeed! so don't use `seed !== undefined` checks! // For this reason, we have to check it here at the original call site // otherwise inside Operator/Subscriber we won't know if `undefined` // means they didn't provide anything or if they literally provided `undefined` if (arguments.length >= 2) { return function reduceOperatorFunctionWithSeed(source) { return Object(__WEBPACK_IMPORTED_MODULE_3__util_pipe__["a" /* pipe */])(Object(__WEBPACK_IMPORTED_MODULE_0__scan__["a" /* scan */])(accumulator, seed), Object(__WEBPACK_IMPORTED_MODULE_1__takeLast__["a" /* takeLast */])(1), Object(__WEBPACK_IMPORTED_MODULE_2__defaultIfEmpty__["a" /* defaultIfEmpty */])(seed))(source); }; } return function reduceOperatorFunction(source) { return Object(__WEBPACK_IMPORTED_MODULE_3__util_pipe__["a" /* pipe */])(Object(__WEBPACK_IMPORTED_MODULE_0__scan__["a" /* scan */])(function (acc, value, index) { return accumulator(acc, value, index + 1); }), Object(__WEBPACK_IMPORTED_MODULE_1__takeLast__["a" /* takeLast */])(1))(source); }; } //# sourceMappingURL=reduce.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/refCount.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = refCount; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; function refCount() { return function refCountOperatorFunction(source) { return source.lift(new RefCountOperator(source)); }; } var RefCountOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function RefCountOperator(connectable) { this.connectable = connectable; } RefCountOperator.prototype.call = function (subscriber, source) { var connectable = this.connectable; connectable._refCount++; var refCounter = new RefCountSubscriber(subscriber, connectable); var subscription = source.subscribe(refCounter); if (!refCounter.closed) { refCounter.connection = connectable.connect(); } return subscription; }; return RefCountOperator; }()); var RefCountSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(RefCountSubscriber, _super); function RefCountSubscriber(destination, connectable) { _super.call(this, destination); this.connectable = connectable; } RefCountSubscriber.prototype._unsubscribe = function () { var connectable = this.connectable; if (!connectable) { this.connection = null; return; } this.connectable = null; var refCount = connectable._refCount; if (refCount <= 0) { this.connection = null; return; } connectable._refCount = refCount - 1; if (refCount > 1) { this.connection = null; return; } /// // Compare the local RefCountSubscriber's connection Subscription to the // connection Subscription on the shared ConnectableObservable. In cases // where the ConnectableObservable source synchronously emits values, and // the RefCountSubscriber's downstream Observers synchronously unsubscribe, // execution continues to here before the RefCountOperator has a chance to // supply the RefCountSubscriber with the shared connection Subscription. // For example: // ``` // Observable.range(0, 10) // .publish() // .refCount() // .take(5) // .subscribe(); // ``` // In order to account for this case, RefCountSubscriber should only dispose // the ConnectableObservable's shared connection Subscription if the // connection Subscription exists, *and* either: // a. RefCountSubscriber doesn't have a reference to the shared connection // Subscription yet, or, // b. RefCountSubscriber's connection Subscription reference is identical // to the shared connection Subscription /// var connection = this.connection; var sharedConnection = connectable._connection; this.connection = null; if (sharedConnection && (!connection || sharedConnection === connection)) { sharedConnection.unsubscribe(); } }; return RefCountSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=refCount.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/scan.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = scan; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /* tslint:enable:max-line-length */ /** * Applies an accumulator function over the source Observable, and returns each * intermediate result, with an optional seed value. * * It's like {@link reduce}, but emits the current * accumulation whenever the source emits a value. * * * * Combines together all values emitted on the source, using an accumulator * function that knows how to join a new source value into the accumulation from * the past. Is similar to {@link reduce}, but emits the intermediate * accumulations. * * Returns an Observable that applies a specified `accumulator` function to each * item emitted by the source Observable. If a `seed` value is specified, then * that value will be used as the initial value for the accumulator. If no seed * value is specified, the first item of the source is used as the seed. * * @example Count the number of click events * var clicks = Rx.Observable.fromEvent(document, 'click'); * var ones = clicks.mapTo(1); * var seed = 0; * var count = ones.scan((acc, one) => acc + one, seed); * count.subscribe(x => console.log(x)); * * @see {@link expand} * @see {@link mergeScan} * @see {@link reduce} * * @param {function(acc: R, value: T, index: number): R} accumulator * The accumulator function called on each source value. * @param {T|R} [seed] The initial accumulation value. * @return {Observable} An observable of the accumulated values. * @method scan * @owner Observable */ function scan(accumulator, seed) { var hasSeed = false; // providing a seed of `undefined` *should* be valid and trigger // hasSeed! so don't use `seed !== undefined` checks! // For this reason, we have to check it here at the original call site // otherwise inside Operator/Subscriber we won't know if `undefined` // means they didn't provide anything or if they literally provided `undefined` if (arguments.length >= 2) { hasSeed = true; } return function scanOperatorFunction(source) { return source.lift(new ScanOperator(accumulator, seed, hasSeed)); }; } var ScanOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function ScanOperator(accumulator, seed, hasSeed) { if (hasSeed === void 0) { hasSeed = false; } this.accumulator = accumulator; this.seed = seed; this.hasSeed = hasSeed; } ScanOperator.prototype.call = function (subscriber, source) { return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed)); }; return ScanOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var ScanSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(ScanSubscriber, _super); function ScanSubscriber(destination, accumulator, _seed, hasSeed) { _super.call(this, destination); this.accumulator = accumulator; this._seed = _seed; this.hasSeed = hasSeed; this.index = 0; } Object.defineProperty(ScanSubscriber.prototype, "seed", { get: function () { return this._seed; }, set: function (value) { this.hasSeed = true; this._seed = value; }, enumerable: true, configurable: true }); ScanSubscriber.prototype._next = function (value) { if (!this.hasSeed) { this.seed = value; this.destination.next(value); } else { return this._tryNext(value); } }; ScanSubscriber.prototype._tryNext = function (value) { var index = this.index++; var result; try { result = this.accumulator(this.seed, value, index); } catch (err) { this.destination.error(err); } this.seed = result; this.destination.next(result); }; return ScanSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=scan.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/share.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = share; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__multicast__ = __webpack_require__("../../../../rxjs/_esm5/operators/multicast.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__refCount__ = __webpack_require__("../../../../rxjs/_esm5/operators/refCount.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subject__ = __webpack_require__("../../../../rxjs/_esm5/Subject.js"); /** PURE_IMPORTS_START ._multicast,._refCount,.._Subject PURE_IMPORTS_END */ function shareSubjectFactory() { return new __WEBPACK_IMPORTED_MODULE_2__Subject__["a" /* Subject */](); } /** * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one * Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will * unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`. * This is an alias for .multicast(() => new Subject()).refCount(). * * * * @return {Observable} An Observable that upon connection causes the source Observable to emit items to its Observers. * @method share * @owner Observable */ function share() { return function (source) { return Object(__WEBPACK_IMPORTED_MODULE_1__refCount__["a" /* refCount */])()(Object(__WEBPACK_IMPORTED_MODULE_0__multicast__["a" /* multicast */])(shareSubjectFactory)(source)); }; } ; //# sourceMappingURL=share.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/startWith.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = startWith; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_ArrayObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/ArrayObservable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_ScalarObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/ScalarObservable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_EmptyObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/EmptyObservable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_concat__ = __webpack_require__("../../../../rxjs/_esm5/observable/concat.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__("../../../../rxjs/_esm5/util/isScheduler.js"); /** PURE_IMPORTS_START .._observable_ArrayObservable,.._observable_ScalarObservable,.._observable_EmptyObservable,.._observable_concat,.._util_isScheduler PURE_IMPORTS_END */ /* tslint:enable:max-line-length */ /** * Returns an Observable that emits the items you specify as arguments before it begins to emit * items emitted by the source Observable. * * * * @param {...T} values - Items you want the modified Observable to emit first. * @param {Scheduler} [scheduler] - A {@link IScheduler} to use for scheduling * the emissions of the `next` notifications. * @return {Observable} An Observable that emits the items in the specified Iterable and then emits the items * emitted by the source Observable. * @method startWith * @owner Observable */ function startWith() { var array = []; for (var _i = 0; _i < arguments.length; _i++) { array[_i - 0] = arguments[_i]; } return function (source) { var scheduler = array[array.length - 1]; if (Object(__WEBPACK_IMPORTED_MODULE_4__util_isScheduler__["a" /* isScheduler */])(scheduler)) { array.pop(); } else { scheduler = null; } var len = array.length; if (len === 1) { return Object(__WEBPACK_IMPORTED_MODULE_3__observable_concat__["a" /* concat */])(new __WEBPACK_IMPORTED_MODULE_1__observable_ScalarObservable__["a" /* ScalarObservable */](array[0], scheduler), source); } else if (len > 1) { return Object(__WEBPACK_IMPORTED_MODULE_3__observable_concat__["a" /* concat */])(new __WEBPACK_IMPORTED_MODULE_0__observable_ArrayObservable__["a" /* ArrayObservable */](array, scheduler), source); } else { return Object(__WEBPACK_IMPORTED_MODULE_3__observable_concat__["a" /* concat */])(new __WEBPACK_IMPORTED_MODULE_2__observable_EmptyObservable__["a" /* EmptyObservable */](scheduler), source); } }; } //# sourceMappingURL=startWith.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/switchMap.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = switchMap; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__OuterSubscriber__ = __webpack_require__("../../../../rxjs/_esm5/OuterSubscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_subscribeToResult__ = __webpack_require__("../../../../rxjs/_esm5/util/subscribeToResult.js"); /** PURE_IMPORTS_START .._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /* tslint:enable:max-line-length */ /** * Projects each source value to an Observable which is merged in the output * Observable, emitting values only from the most recently projected Observable. * * Maps each value to an Observable, then flattens all of * these inner Observables using {@link switch}. * * * * Returns an Observable that emits items based on applying a function that you * supply to each item emitted by the source Observable, where that function * returns an (so-called "inner") Observable. Each time it observes one of these * inner Observables, the output Observable begins emitting the items emitted by * that inner Observable. When a new inner Observable is emitted, `switchMap` * stops emitting items from the earlier-emitted inner Observable and begins * emitting items from the new one. It continues to behave like this for * subsequent inner Observables. * * @example Rerun an interval Observable on every click event * var clicks = Rx.Observable.fromEvent(document, 'click'); * var result = clicks.switchMap((ev) => Rx.Observable.interval(1000)); * result.subscribe(x => console.log(x)); * * @see {@link concatMap} * @see {@link exhaustMap} * @see {@link mergeMap} * @see {@link switch} * @see {@link switchMapTo} * * @param {function(value: T, ?index: number): ObservableInput} project A function * that, when applied to an item emitted by the source Observable, returns an * Observable. * @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector] * A function to produce the value on the output Observable based on the values * and the indices of the source (outer) emission and the inner Observable * emission. The arguments passed to this function are: * - `outerValue`: the value that came from the source * - `innerValue`: the value that came from the projected Observable * - `outerIndex`: the "index" of the value that came from the source * - `innerIndex`: the "index" of the value from the projected Observable * @return {Observable} An Observable that emits the result of applying the * projection function (and the optional `resultSelector`) to each item emitted * by the source Observable and taking only the values from the most recently * projected inner Observable. * @method switchMap * @owner Observable */ function switchMap(project, resultSelector) { return function switchMapOperatorFunction(source) { return source.lift(new SwitchMapOperator(project, resultSelector)); }; } var SwitchMapOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function SwitchMapOperator(project, resultSelector) { this.project = project; this.resultSelector = resultSelector; } SwitchMapOperator.prototype.call = function (subscriber, source) { return source.subscribe(new SwitchMapSubscriber(subscriber, this.project, this.resultSelector)); }; return SwitchMapOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var SwitchMapSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(SwitchMapSubscriber, _super); function SwitchMapSubscriber(destination, project, resultSelector) { _super.call(this, destination); this.project = project; this.resultSelector = resultSelector; this.index = 0; } SwitchMapSubscriber.prototype._next = function (value) { var result; var index = this.index++; try { result = this.project(value, index); } catch (error) { this.destination.error(error); return; } this._innerSub(result, value, index); }; SwitchMapSubscriber.prototype._innerSub = function (result, value, index) { var innerSubscription = this.innerSubscription; if (innerSubscription) { innerSubscription.unsubscribe(); } this.add(this.innerSubscription = Object(__WEBPACK_IMPORTED_MODULE_1__util_subscribeToResult__["a" /* subscribeToResult */])(this, result, value, index)); }; SwitchMapSubscriber.prototype._complete = function () { var innerSubscription = this.innerSubscription; if (!innerSubscription || innerSubscription.closed) { _super.prototype._complete.call(this); } }; SwitchMapSubscriber.prototype._unsubscribe = function () { this.innerSubscription = null; }; SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) { this.remove(innerSub); this.innerSubscription = null; if (this.isStopped) { _super.prototype._complete.call(this); } }; SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { if (this.resultSelector) { this._tryNotifyNext(outerValue, innerValue, outerIndex, innerIndex); } else { this.destination.next(innerValue); } }; SwitchMapSubscriber.prototype._tryNotifyNext = function (outerValue, innerValue, outerIndex, innerIndex) { var result; try { result = this.resultSelector(outerValue, innerValue, outerIndex, innerIndex); } catch (err) { this.destination.error(err); return; } this.destination.next(result); }; return SwitchMapSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__OuterSubscriber__["a" /* OuterSubscriber */])); //# sourceMappingURL=switchMap.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/take.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = take; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_ArgumentOutOfRangeError__ = __webpack_require__("../../../../rxjs/_esm5/util/ArgumentOutOfRangeError.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_EmptyObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/EmptyObservable.js"); /** PURE_IMPORTS_START .._Subscriber,.._util_ArgumentOutOfRangeError,.._observable_EmptyObservable PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * Emits only the first `count` values emitted by the source Observable. * * Takes the first `count` values from the source, then * completes. * * * * `take` returns an Observable that emits only the first `count` values emitted * by the source Observable. If the source emits fewer than `count` values then * all of its values are emitted. After that, it completes, regardless if the * source completes. * * @example Take the first 5 seconds of an infinite 1-second interval Observable * var interval = Rx.Observable.interval(1000); * var five = interval.take(5); * five.subscribe(x => console.log(x)); * * @see {@link takeLast} * @see {@link takeUntil} * @see {@link takeWhile} * @see {@link skip} * * @throws {ArgumentOutOfRangeError} When using `take(i)`, it delivers an * ArgumentOutOrRangeError to the Observer's `error` callback if `i < 0`. * * @param {number} count The maximum number of `next` values to emit. * @return {Observable} An Observable that emits only the first `count` * values emitted by the source Observable, or all of the values from the source * if the source emits fewer than `count` values. * @method take * @owner Observable */ function take(count) { return function (source) { if (count === 0) { return new __WEBPACK_IMPORTED_MODULE_2__observable_EmptyObservable__["a" /* EmptyObservable */](); } else { return source.lift(new TakeOperator(count)); } }; } var TakeOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function TakeOperator(total) { this.total = total; if (this.total < 0) { throw new __WEBPACK_IMPORTED_MODULE_1__util_ArgumentOutOfRangeError__["a" /* ArgumentOutOfRangeError */]; } } TakeOperator.prototype.call = function (subscriber, source) { return source.subscribe(new TakeSubscriber(subscriber, this.total)); }; return TakeOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var TakeSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(TakeSubscriber, _super); function TakeSubscriber(destination, total) { _super.call(this, destination); this.total = total; this.count = 0; } TakeSubscriber.prototype._next = function (value) { var total = this.total; var count = ++this.count; if (count <= total) { this.destination.next(value); if (count === total) { this.destination.complete(); this.unsubscribe(); } } }; return TakeSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=take.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/takeLast.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = takeLast; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_ArgumentOutOfRangeError__ = __webpack_require__("../../../../rxjs/_esm5/util/ArgumentOutOfRangeError.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_EmptyObservable__ = __webpack_require__("../../../../rxjs/_esm5/observable/EmptyObservable.js"); /** PURE_IMPORTS_START .._Subscriber,.._util_ArgumentOutOfRangeError,.._observable_EmptyObservable PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * Emits only the last `count` values emitted by the source Observable. * * Remembers the latest `count` values, then emits those * only when the source completes. * * * * `takeLast` returns an Observable that emits at most the last `count` values * emitted by the source Observable. If the source emits fewer than `count` * values then all of its values are emitted. This operator must wait until the * `complete` notification emission from the source in order to emit the `next` * values on the output Observable, because otherwise it is impossible to know * whether or not more values will be emitted on the source. For this reason, * all values are emitted synchronously, followed by the complete notification. * * @example Take the last 3 values of an Observable with many values * var many = Rx.Observable.range(1, 100); * var lastThree = many.takeLast(3); * lastThree.subscribe(x => console.log(x)); * * @see {@link take} * @see {@link takeUntil} * @see {@link takeWhile} * @see {@link skip} * * @throws {ArgumentOutOfRangeError} When using `takeLast(i)`, it delivers an * ArgumentOutOrRangeError to the Observer's `error` callback if `i < 0`. * * @param {number} count The maximum number of values to emit from the end of * the sequence of values emitted by the source Observable. * @return {Observable} An Observable that emits at most the last count * values emitted by the source Observable. * @method takeLast * @owner Observable */ function takeLast(count) { return function takeLastOperatorFunction(source) { if (count === 0) { return new __WEBPACK_IMPORTED_MODULE_2__observable_EmptyObservable__["a" /* EmptyObservable */](); } else { return source.lift(new TakeLastOperator(count)); } }; } var TakeLastOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function TakeLastOperator(total) { this.total = total; if (this.total < 0) { throw new __WEBPACK_IMPORTED_MODULE_1__util_ArgumentOutOfRangeError__["a" /* ArgumentOutOfRangeError */]; } } TakeLastOperator.prototype.call = function (subscriber, source) { return source.subscribe(new TakeLastSubscriber(subscriber, this.total)); }; return TakeLastOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var TakeLastSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(TakeLastSubscriber, _super); function TakeLastSubscriber(destination, total) { _super.call(this, destination); this.total = total; this.ring = new Array(); this.count = 0; } TakeLastSubscriber.prototype._next = function (value) { var ring = this.ring; var total = this.total; var count = this.count++; if (ring.length < total) { ring.push(value); } else { var index = count % total; ring[index] = value; } }; TakeLastSubscriber.prototype._complete = function () { var destination = this.destination; var count = this.count; if (count > 0) { var total = this.count >= this.total ? this.total : this.count; var ring = this.ring; for (var i = 0; i < total; i++) { var idx = (count++) % total; destination.next(ring[idx]); } } destination.complete(); }; return TakeLastSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=takeLast.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/takeUntil.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = takeUntil; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__OuterSubscriber__ = __webpack_require__("../../../../rxjs/_esm5/OuterSubscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_subscribeToResult__ = __webpack_require__("../../../../rxjs/_esm5/util/subscribeToResult.js"); /** PURE_IMPORTS_START .._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * Emits the values emitted by the source Observable until a `notifier` * Observable emits a value. * * Lets values pass until a second Observable, * `notifier`, emits something. Then, it completes. * * * * `takeUntil` subscribes and begins mirroring the source Observable. It also * monitors a second Observable, `notifier` that you provide. If the `notifier` * emits a value or a complete notification, the output Observable stops * mirroring the source Observable and completes. * * @example Tick every second until the first click happens * var interval = Rx.Observable.interval(1000); * var clicks = Rx.Observable.fromEvent(document, 'click'); * var result = interval.takeUntil(clicks); * result.subscribe(x => console.log(x)); * * @see {@link take} * @see {@link takeLast} * @see {@link takeWhile} * @see {@link skip} * * @param {Observable} notifier The Observable whose first emitted value will * cause the output Observable of `takeUntil` to stop emitting values from the * source Observable. * @return {Observable} An Observable that emits the values from the source * Observable until such time as `notifier` emits its first value. * @method takeUntil * @owner Observable */ function takeUntil(notifier) { return function (source) { return source.lift(new TakeUntilOperator(notifier)); }; } var TakeUntilOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function TakeUntilOperator(notifier) { this.notifier = notifier; } TakeUntilOperator.prototype.call = function (subscriber, source) { return source.subscribe(new TakeUntilSubscriber(subscriber, this.notifier)); }; return TakeUntilOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var TakeUntilSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(TakeUntilSubscriber, _super); function TakeUntilSubscriber(destination, notifier) { _super.call(this, destination); this.notifier = notifier; this.add(Object(__WEBPACK_IMPORTED_MODULE_1__util_subscribeToResult__["a" /* subscribeToResult */])(this, notifier)); } TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { this.complete(); }; TakeUntilSubscriber.prototype.notifyComplete = function () { // noop }; return TakeUntilSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__OuterSubscriber__["a" /* OuterSubscriber */])); //# sourceMappingURL=takeUntil.js.map /***/ }), /***/ "../../../../rxjs/_esm5/operators/tap.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = tap; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /* tslint:enable:max-line-length */ /** * Perform a side effect for every emission on the source Observable, but return * an Observable that is identical to the source. * * Intercepts each emission on the source and runs a * function, but returns an output which is identical to the source as long as errors don't occur. * * * * Returns a mirrored Observable of the source Observable, but modified so that * the provided Observer is called to perform a side effect for every value, * error, and completion emitted by the source. Any errors that are thrown in * the aforementioned Observer or handlers are safely sent down the error path * of the output Observable. * * This operator is useful for debugging your Observables for the correct values * or performing other side effects. * * Note: this is different to a `subscribe` on the Observable. If the Observable * returned by `do` is not subscribed, the side effects specified by the * Observer will never happen. `do` therefore simply spies on existing * execution, it does not trigger an execution to happen like `subscribe` does. * * @example Map every click to the clientX position of that click, while also logging the click event * var clicks = Rx.Observable.fromEvent(document, 'click'); * var positions = clicks * .do(ev => console.log(ev)) * .map(ev => ev.clientX); * positions.subscribe(x => console.log(x)); * * @see {@link map} * @see {@link subscribe} * * @param {Observer|function} [nextOrObserver] A normal Observer object or a * callback for `next`. * @param {function} [error] Callback for errors in the source. * @param {function} [complete] Callback for the completion of the source. * @return {Observable} An Observable identical to the source, but runs the * specified Observer or callback(s) for each item. * @name tap */ function tap(nextOrObserver, error, complete) { return function tapOperatorFunction(source) { return source.lift(new DoOperator(nextOrObserver, error, complete)); }; } var DoOperator = /*@__PURE__*/ (/*@__PURE__*/ function () { function DoOperator(nextOrObserver, error, complete) { this.nextOrObserver = nextOrObserver; this.error = error; this.complete = complete; } DoOperator.prototype.call = function (subscriber, source) { return source.subscribe(new DoSubscriber(subscriber, this.nextOrObserver, this.error, this.complete)); }; return DoOperator; }()); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var DoSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(DoSubscriber, _super); function DoSubscriber(destination, nextOrObserver, error, complete) { _super.call(this, destination); var safeSubscriber = new __WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */](nextOrObserver, error, complete); safeSubscriber.syncErrorThrowable = true; this.add(safeSubscriber); this.safeSubscriber = safeSubscriber; } DoSubscriber.prototype._next = function (value) { var safeSubscriber = this.safeSubscriber; safeSubscriber.next(value); if (safeSubscriber.syncErrorThrown) { this.destination.error(safeSubscriber.syncErrorValue); } else { this.destination.next(value); } }; DoSubscriber.prototype._error = function (err) { var safeSubscriber = this.safeSubscriber; safeSubscriber.error(err); if (safeSubscriber.syncErrorThrown) { this.destination.error(safeSubscriber.syncErrorValue); } else { this.destination.error(err); } }; DoSubscriber.prototype._complete = function () { var safeSubscriber = this.safeSubscriber; safeSubscriber.complete(); if (safeSubscriber.syncErrorThrown) { this.destination.error(safeSubscriber.syncErrorValue); } else { this.destination.complete(); } }; return DoSubscriber; }(__WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */])); //# sourceMappingURL=tap.js.map /***/ }), /***/ "../../../../rxjs/_esm5/scheduler/Action.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Action; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscription__ = __webpack_require__("../../../../rxjs/_esm5/Subscription.js"); /** PURE_IMPORTS_START .._Subscription PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * A unit of work to be executed in a {@link Scheduler}. An action is typically * created from within a Scheduler and an RxJS user does not need to concern * themselves about creating and manipulating an Action. * * ```ts * class Action extends Subscription { * new (scheduler: Scheduler, work: (state?: T) => void); * schedule(state?: T, delay: number = 0): Subscription; * } * ``` * * @class Action */ var Action = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(Action, _super); function Action(scheduler, work) { _super.call(this); } /** * Schedules this action on its parent Scheduler for execution. May be passed * some context object, `state`. May happen at some point in the future, * according to the `delay` parameter, if specified. * @param {T} [state] Some contextual data that the `work` function uses when * called by the Scheduler. * @param {number} [delay] Time to wait before executing the work, where the * time unit is implicit and defined by the Scheduler. * @return {void} */ Action.prototype.schedule = function (state, delay) { if (delay === void 0) { delay = 0; } return this; }; return Action; }(__WEBPACK_IMPORTED_MODULE_0__Subscription__["a" /* Subscription */])); //# sourceMappingURL=Action.js.map /***/ }), /***/ "../../../../rxjs/_esm5/scheduler/AsyncAction.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsyncAction; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_root__ = __webpack_require__("../../../../rxjs/_esm5/util/root.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Action__ = __webpack_require__("../../../../rxjs/_esm5/scheduler/Action.js"); /** PURE_IMPORTS_START .._util_root,._Action PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var AsyncAction = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(AsyncAction, _super); function AsyncAction(scheduler, work) { _super.call(this, scheduler, work); this.scheduler = scheduler; this.work = work; this.pending = false; } AsyncAction.prototype.schedule = function (state, delay) { if (delay === void 0) { delay = 0; } if (this.closed) { return this; } // Always replace the current state with the new state. this.state = state; // Set the pending flag indicating that this action has been scheduled, or // has recursively rescheduled itself. this.pending = true; var id = this.id; var scheduler = this.scheduler; // // Important implementation note: // // Actions only execute once by default, unless rescheduled from within the // scheduled callback. This allows us to implement single and repeat // actions via the same code path, without adding API surface area, as well // as mimic traditional recursion but across asynchronous boundaries. // // However, JS runtimes and timers distinguish between intervals achieved by // serial `setTimeout` calls vs. a single `setInterval` call. An interval of // serial `setTimeout` calls can be individually delayed, which delays // scheduling the next `setTimeout`, and so on. `setInterval` attempts to // guarantee the interval callback will be invoked more precisely to the // interval period, regardless of load. // // Therefore, we use `setInterval` to schedule single and repeat actions. // If the action reschedules itself with the same delay, the interval is not // canceled. If the action doesn't reschedule, or reschedules with a // different delay, the interval will be canceled after scheduled callback // execution. // if (id != null) { this.id = this.recycleAsyncId(scheduler, id, delay); } this.delay = delay; // If this action has already an async Id, don't request a new one. this.id = this.id || this.requestAsyncId(scheduler, this.id, delay); return this; }; AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) { if (delay === void 0) { delay = 0; } return __WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].setInterval(scheduler.flush.bind(scheduler, this), delay); }; AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) { if (delay === void 0) { delay = 0; } // If this action is rescheduled with the same delay time, don't clear the interval id. if (delay !== null && this.delay === delay && this.pending === false) { return id; } // Otherwise, if the action's delay time is different from the current delay, // or the action has been rescheduled before it's executed, clear the interval id return __WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].clearInterval(id) && undefined || undefined; }; /** * Immediately executes this action and the `work` it contains. * @return {any} */ AsyncAction.prototype.execute = function (state, delay) { if (this.closed) { return new Error('executing a cancelled action'); } this.pending = false; var error = this._execute(state, delay); if (error) { return error; } else if (this.pending === false && this.id != null) { // Dequeue if the action didn't reschedule itself. Don't call // unsubscribe(), because the action could reschedule later. // For example: // ``` // scheduler.schedule(function doWork(counter) { // /* ... I'm a busy worker bee ... */ // var originalAction = this; // /* wait 100ms before rescheduling the action */ // setTimeout(function () { // originalAction.schedule(counter + 1); // }, 100); // }, 1000); // ``` this.id = this.recycleAsyncId(this.scheduler, this.id, null); } }; AsyncAction.prototype._execute = function (state, delay) { var errored = false; var errorValue = undefined; try { this.work(state); } catch (e) { errored = true; errorValue = !!e && e || new Error(e); } if (errored) { this.unsubscribe(); return errorValue; } }; AsyncAction.prototype._unsubscribe = function () { var id = this.id; var scheduler = this.scheduler; var actions = scheduler.actions; var index = actions.indexOf(this); this.work = null; this.state = null; this.pending = false; this.scheduler = null; if (index !== -1) { actions.splice(index, 1); } if (id != null) { this.id = this.recycleAsyncId(scheduler, id, null); } this.delay = null; }; return AsyncAction; }(__WEBPACK_IMPORTED_MODULE_1__Action__["a" /* Action */])); //# sourceMappingURL=AsyncAction.js.map /***/ }), /***/ "../../../../rxjs/_esm5/scheduler/AsyncScheduler.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsyncScheduler; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Scheduler__ = __webpack_require__("../../../../rxjs/_esm5/Scheduler.js"); /** PURE_IMPORTS_START .._Scheduler PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var AsyncScheduler = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(AsyncScheduler, _super); function AsyncScheduler() { _super.apply(this, arguments); this.actions = []; /** * A flag to indicate whether the Scheduler is currently executing a batch of * queued actions. * @type {boolean} */ this.active = false; /** * An internal ID used to track the latest asynchronous task such as those * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and * others. * @type {any} */ this.scheduled = undefined; } AsyncScheduler.prototype.flush = function (action) { var actions = this.actions; if (this.active) { actions.push(action); return; } var error; this.active = true; do { if (error = action.execute(action.state, action.delay)) { break; } } while (action = actions.shift()); // exhaust the scheduler queue this.active = false; if (error) { while (action = actions.shift()) { action.unsubscribe(); } throw error; } }; return AsyncScheduler; }(__WEBPACK_IMPORTED_MODULE_0__Scheduler__["a" /* Scheduler */])); //# sourceMappingURL=AsyncScheduler.js.map /***/ }), /***/ "../../../../rxjs/_esm5/scheduler/async.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return async; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncAction__ = __webpack_require__("../../../../rxjs/_esm5/scheduler/AsyncAction.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__("../../../../rxjs/_esm5/scheduler/AsyncScheduler.js"); /** PURE_IMPORTS_START ._AsyncAction,._AsyncScheduler PURE_IMPORTS_END */ /** * * Async Scheduler * * Schedule task as if you used setTimeout(task, duration) * * `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript * event loop queue. It is best used to delay tasks in time or to schedule tasks repeating * in intervals. * * If you just want to "defer" task, that is to perform it right after currently * executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`), * better choice will be the {@link asap} scheduler. * * @example Use async scheduler to delay task * const task = () => console.log('it works!'); * * Rx.Scheduler.async.schedule(task, 2000); * * // After 2 seconds logs: * // "it works!" * * * @example Use async scheduler to repeat task in intervals * function task(state) { * console.log(state); * this.schedule(state + 1, 1000); // `this` references currently executing Action, * // which we reschedule with new state and delay * } * * Rx.Scheduler.async.schedule(task, 3000, 0); * * // Logs: * // 0 after 3s * // 1 after 4s * // 2 after 5s * // 3 after 6s * * @static true * @name async * @owner Scheduler */ var async = /*@__PURE__*/ new __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__["a" /* AsyncScheduler */](__WEBPACK_IMPORTED_MODULE_0__AsyncAction__["a" /* AsyncAction */]); //# sourceMappingURL=async.js.map /***/ }), /***/ "../../../../rxjs/_esm5/symbol/iterator.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export symbolIteratorPonyfill */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return iterator; }); /* unused harmony export $$iterator */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_root__ = __webpack_require__("../../../../rxjs/_esm5/util/root.js"); /** PURE_IMPORTS_START .._util_root PURE_IMPORTS_END */ function symbolIteratorPonyfill(root) { var Symbol = root.Symbol; if (typeof Symbol === 'function') { if (!Symbol.iterator) { Symbol.iterator = Symbol('iterator polyfill'); } return Symbol.iterator; } else { // [for Mozilla Gecko 27-35:](https://mzl.la/2ewE1zC) var Set_1 = root.Set; if (Set_1 && typeof new Set_1()['@@iterator'] === 'function') { return '@@iterator'; } var Map_1 = root.Map; // required for compatability with es6-shim if (Map_1) { var keys = Object.getOwnPropertyNames(Map_1.prototype); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; // according to spec, Map.prototype[@@iterator] and Map.orototype.entries must be equal. if (key !== 'entries' && key !== 'size' && Map_1.prototype[key] === Map_1.prototype['entries']) { return key; } } } return '@@iterator'; } } var iterator = /*@__PURE__*/ symbolIteratorPonyfill(__WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */]); /** * @deprecated use iterator instead */ var $$iterator = iterator; //# sourceMappingURL=iterator.js.map /***/ }), /***/ "../../../../rxjs/_esm5/symbol/observable.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export getSymbolObservable */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return observable; }); /* unused harmony export $$observable */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_root__ = __webpack_require__("../../../../rxjs/_esm5/util/root.js"); /** PURE_IMPORTS_START .._util_root PURE_IMPORTS_END */ function getSymbolObservable(context) { var $$observable; var Symbol = context.Symbol; if (typeof Symbol === 'function') { if (Symbol.observable) { $$observable = Symbol.observable; } else { $$observable = Symbol('observable'); Symbol.observable = $$observable; } } else { $$observable = '@@observable'; } return $$observable; } var observable = /*@__PURE__*/ getSymbolObservable(__WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */]); /** * @deprecated use observable instead */ var $$observable = observable; //# sourceMappingURL=observable.js.map /***/ }), /***/ "../../../../rxjs/_esm5/symbol/rxSubscriber.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return rxSubscriber; }); /* unused harmony export $$rxSubscriber */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_root__ = __webpack_require__("../../../../rxjs/_esm5/util/root.js"); /** PURE_IMPORTS_START .._util_root PURE_IMPORTS_END */ var Symbol = __WEBPACK_IMPORTED_MODULE_0__util_root__["a" /* root */].Symbol; var rxSubscriber = (typeof Symbol === 'function' && typeof Symbol.for === 'function') ? /*@__PURE__*/ Symbol.for('rxSubscriber') : '@@rxSubscriber'; /** * @deprecated use rxSubscriber instead */ var $$rxSubscriber = rxSubscriber; //# sourceMappingURL=rxSubscriber.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/ArgumentOutOfRangeError.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ArgumentOutOfRangeError; }); /** PURE_IMPORTS_START PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * An error thrown when an element was queried at a certain index of an * Observable, but no such index or position exists in that sequence. * * @see {@link elementAt} * @see {@link take} * @see {@link takeLast} * * @class ArgumentOutOfRangeError */ var ArgumentOutOfRangeError = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(ArgumentOutOfRangeError, _super); function ArgumentOutOfRangeError() { var err = _super.call(this, 'argument out of range'); this.name = err.name = 'ArgumentOutOfRangeError'; this.stack = err.stack; this.message = err.message; } return ArgumentOutOfRangeError; }(Error)); //# sourceMappingURL=ArgumentOutOfRangeError.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/EmptyError.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EmptyError; }); /** PURE_IMPORTS_START PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * An error thrown when an Observable or a sequence was queried but has no * elements. * * @see {@link first} * @see {@link last} * @see {@link single} * * @class EmptyError */ var EmptyError = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(EmptyError, _super); function EmptyError() { var err = _super.call(this, 'no elements in sequence'); this.name = err.name = 'EmptyError'; this.stack = err.stack; this.message = err.message; } return EmptyError; }(Error)); //# sourceMappingURL=EmptyError.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/ObjectUnsubscribedError.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ObjectUnsubscribedError; }); /** PURE_IMPORTS_START PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * An error thrown when an action is invalid because the object has been * unsubscribed. * * @see {@link Subject} * @see {@link BehaviorSubject} * * @class ObjectUnsubscribedError */ var ObjectUnsubscribedError = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(ObjectUnsubscribedError, _super); function ObjectUnsubscribedError() { var err = _super.call(this, 'object unsubscribed'); this.name = err.name = 'ObjectUnsubscribedError'; this.stack = err.stack; this.message = err.message; } return ObjectUnsubscribedError; }(Error)); //# sourceMappingURL=ObjectUnsubscribedError.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/UnsubscriptionError.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UnsubscriptionError; }); /** PURE_IMPORTS_START PURE_IMPORTS_END */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * An error thrown when one or more errors have occurred during the * `unsubscribe` of a {@link Subscription}. */ var UnsubscriptionError = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { __extends(UnsubscriptionError, _super); function UnsubscriptionError(errors) { _super.call(this); this.errors = errors; var err = Error.call(this, errors ? errors.length + " errors occurred during unsubscription:\n " + errors.map(function (err, i) { return ((i + 1) + ") " + err.toString()); }).join('\n ') : ''); this.name = err.name = 'UnsubscriptionError'; this.stack = err.stack; this.message = err.message; } return UnsubscriptionError; }(Error)); //# sourceMappingURL=UnsubscriptionError.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/errorObject.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return errorObject; }); // typeof any so that it we don't have to cast when comparing a result to the error object /** PURE_IMPORTS_START PURE_IMPORTS_END */ var errorObject = { e: {} }; //# sourceMappingURL=errorObject.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/identity.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = identity; /** PURE_IMPORTS_START PURE_IMPORTS_END */ function identity(x) { return x; } //# sourceMappingURL=identity.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/isArray.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isArray; }); /** PURE_IMPORTS_START PURE_IMPORTS_END */ var isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); //# sourceMappingURL=isArray.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/isArrayLike.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isArrayLike; }); /** PURE_IMPORTS_START PURE_IMPORTS_END */ var isArrayLike = (function (x) { return x && typeof x.length === 'number'; }); //# sourceMappingURL=isArrayLike.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/isDate.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = isDate; /** PURE_IMPORTS_START PURE_IMPORTS_END */ function isDate(value) { return value instanceof Date && !isNaN(+value); } //# sourceMappingURL=isDate.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/isFunction.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = isFunction; /** PURE_IMPORTS_START PURE_IMPORTS_END */ function isFunction(x) { return typeof x === 'function'; } //# sourceMappingURL=isFunction.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/isNumeric.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = isNumeric; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isArray__ = __webpack_require__("../../../../rxjs/_esm5/util/isArray.js"); /** PURE_IMPORTS_START .._util_isArray PURE_IMPORTS_END */ function isNumeric(val) { // parseFloat NaNs numeric-cast false positives (null|true|false|"") // ...but misinterprets leading-number strings, particularly hex literals ("0x...") // subtraction forces infinities to NaN // adding 1 corrects loss of precision from parseFloat (#15100) return !Object(__WEBPACK_IMPORTED_MODULE_0__util_isArray__["a" /* isArray */])(val) && (val - parseFloat(val) + 1) >= 0; } ; //# sourceMappingURL=isNumeric.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/isObject.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = isObject; /** PURE_IMPORTS_START PURE_IMPORTS_END */ function isObject(x) { return x != null && typeof x === 'object'; } //# sourceMappingURL=isObject.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/isPromise.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = isPromise; /** PURE_IMPORTS_START PURE_IMPORTS_END */ function isPromise(value) { return value && typeof value.subscribe !== 'function' && typeof value.then === 'function'; } //# sourceMappingURL=isPromise.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/isScheduler.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = isScheduler; /** PURE_IMPORTS_START PURE_IMPORTS_END */ function isScheduler(value) { return value && typeof value.schedule === 'function'; } //# sourceMappingURL=isScheduler.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/noop.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = noop; /* tslint:disable:no-empty */ /** PURE_IMPORTS_START PURE_IMPORTS_END */ function noop() { } //# sourceMappingURL=noop.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/pipe.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = pipe; /* harmony export (immutable) */ __webpack_exports__["b"] = pipeFromArray; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__noop__ = __webpack_require__("../../../../rxjs/_esm5/util/noop.js"); /** PURE_IMPORTS_START ._noop PURE_IMPORTS_END */ /* tslint:enable:max-line-length */ function pipe() { var fns = []; for (var _i = 0; _i < arguments.length; _i++) { fns[_i - 0] = arguments[_i]; } return pipeFromArray(fns); } /* @internal */ function pipeFromArray(fns) { if (!fns) { return __WEBPACK_IMPORTED_MODULE_0__noop__["a" /* noop */]; } if (fns.length === 1) { return fns[0]; } return function piped(input) { return fns.reduce(function (prev, fn) { return fn(prev); }, input); }; } //# sourceMappingURL=pipe.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/root.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _root; }); // CommonJS / Node have global context exposed as "global" variable. // We don't want to include the whole node.d.ts this this compilation unit so we'll just fake // the global "global" var for now. /** PURE_IMPORTS_START PURE_IMPORTS_END */ var __window = typeof window !== 'undefined' && window; var __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && self; var __global = typeof global !== 'undefined' && global; var _root = __window || __global || __self; // Workaround Closure Compiler restriction: The body of a goog.module cannot use throw. // This is needed when used with angular/tsickle which inserts a goog.module statement. // Wrap in IIFE /*@__PURE__*/ (function () { if (!_root) { throw new Error('RxJS could not find any global context (window, self, global)'); } })(); //# sourceMappingURL=root.js.map /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__("../../../../webpack/buildin/global.js"))) /***/ }), /***/ "../../../../rxjs/_esm5/util/subscribeToResult.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = subscribeToResult; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root__ = __webpack_require__("../../../../rxjs/_esm5/util/root.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike__ = __webpack_require__("../../../../rxjs/_esm5/util/isArrayLike.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isPromise__ = __webpack_require__("../../../../rxjs/_esm5/util/isPromise.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isObject__ = __webpack_require__("../../../../rxjs/_esm5/util/isObject.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__symbol_iterator__ = __webpack_require__("../../../../rxjs/_esm5/symbol/iterator.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__InnerSubscriber__ = __webpack_require__("../../../../rxjs/_esm5/InnerSubscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__symbol_observable__ = __webpack_require__("../../../../rxjs/_esm5/symbol/observable.js"); /** PURE_IMPORTS_START ._root,._isArrayLike,._isPromise,._isObject,.._Observable,.._symbol_iterator,.._InnerSubscriber,.._symbol_observable PURE_IMPORTS_END */ function subscribeToResult(outerSubscriber, result, outerValue, outerIndex) { var destination = new __WEBPACK_IMPORTED_MODULE_6__InnerSubscriber__["a" /* InnerSubscriber */](outerSubscriber, outerValue, outerIndex); if (destination.closed) { return null; } if (result instanceof __WEBPACK_IMPORTED_MODULE_4__Observable__["a" /* Observable */]) { if (result._isScalar) { destination.next(result.value); destination.complete(); return null; } else { destination.syncErrorThrowable = true; return result.subscribe(destination); } } else if (Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike__["a" /* isArrayLike */])(result)) { for (var i = 0, len = result.length; i < len && !destination.closed; i++) { destination.next(result[i]); } if (!destination.closed) { destination.complete(); } } else if (Object(__WEBPACK_IMPORTED_MODULE_2__isPromise__["a" /* isPromise */])(result)) { result.then(function (value) { if (!destination.closed) { destination.next(value); destination.complete(); } }, function (err) { return destination.error(err); }) .then(null, function (err) { // Escaping the Promise trap: globally throw unhandled errors __WEBPACK_IMPORTED_MODULE_0__root__["a" /* root */].setTimeout(function () { throw err; }); }); return destination; } else if (result && typeof result[__WEBPACK_IMPORTED_MODULE_5__symbol_iterator__["a" /* iterator */]] === 'function') { var iterator = result[__WEBPACK_IMPORTED_MODULE_5__symbol_iterator__["a" /* iterator */]](); do { var item = iterator.next(); if (item.done) { destination.complete(); break; } destination.next(item.value); if (destination.closed) { break; } } while (true); } else if (result && typeof result[__WEBPACK_IMPORTED_MODULE_7__symbol_observable__["a" /* observable */]] === 'function') { var obs = result[__WEBPACK_IMPORTED_MODULE_7__symbol_observable__["a" /* observable */]](); if (typeof obs.subscribe !== 'function') { destination.error(new TypeError('Provided object does not correctly implement Symbol.observable')); } else { return obs.subscribe(new __WEBPACK_IMPORTED_MODULE_6__InnerSubscriber__["a" /* InnerSubscriber */](outerSubscriber, outerValue, outerIndex)); } } else { var value = Object(__WEBPACK_IMPORTED_MODULE_3__isObject__["a" /* isObject */])(result) ? 'an invalid object' : "'" + result + "'"; var msg = ("You provided " + value + " where a stream was expected.") + ' You can provide an Observable, Promise, Array, or Iterable.'; destination.error(new TypeError(msg)); } return null; } //# sourceMappingURL=subscribeToResult.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/toSubscriber.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = toSubscriber; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__("../../../../rxjs/_esm5/Subscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__symbol_rxSubscriber__ = __webpack_require__("../../../../rxjs/_esm5/symbol/rxSubscriber.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observer__ = __webpack_require__("../../../../rxjs/_esm5/Observer.js"); /** PURE_IMPORTS_START .._Subscriber,.._symbol_rxSubscriber,.._Observer PURE_IMPORTS_END */ function toSubscriber(nextOrObserver, error, complete) { if (nextOrObserver) { if (nextOrObserver instanceof __WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */]) { return nextOrObserver; } if (nextOrObserver[__WEBPACK_IMPORTED_MODULE_1__symbol_rxSubscriber__["a" /* rxSubscriber */]]) { return nextOrObserver[__WEBPACK_IMPORTED_MODULE_1__symbol_rxSubscriber__["a" /* rxSubscriber */]](); } } if (!nextOrObserver && !error && !complete) { return new __WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */](__WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */]); } return new __WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */](nextOrObserver, error, complete); } //# sourceMappingURL=toSubscriber.js.map /***/ }), /***/ "../../../../rxjs/_esm5/util/tryCatch.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = tryCatch; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__errorObject__ = __webpack_require__("../../../../rxjs/_esm5/util/errorObject.js"); /** PURE_IMPORTS_START ._errorObject PURE_IMPORTS_END */ var tryCatchTarget; function tryCatcher() { try { return tryCatchTarget.apply(this, arguments); } catch (e) { __WEBPACK_IMPORTED_MODULE_0__errorObject__["a" /* errorObject */].e = e; return __WEBPACK_IMPORTED_MODULE_0__errorObject__["a" /* errorObject */]; } } function tryCatch(fn) { tryCatchTarget = fn; return tryCatcher; } ; //# sourceMappingURL=tryCatch.js.map /***/ }), /***/ "../../../../tslib/tslib.es6.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = __extends; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __assign; }); /* unused harmony export __rest */ /* unused harmony export __decorate */ /* unused harmony export __param */ /* unused harmony export __metadata */ /* unused harmony export __awaiter */ /* unused harmony export __generator */ /* unused harmony export __exportStar */ /* unused harmony export __values */ /* unused harmony export __read */ /* unused harmony export __spread */ /* unused harmony export __await */ /* unused harmony export __asyncGenerator */ /* unused harmony export __asyncDelegator */ /* unused harmony export __asyncValues */ /* unused harmony export __makeTemplateObject */ /* unused harmony export __importStar */ /* unused harmony export __importDefault */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ /* global Reflect, Promise */ var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; function __extends(d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; } function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]]; return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } } function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(thisArg, _arguments, P, generator) { return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [0, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } function __exportStar(m, exports) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } function __values(o) { var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; if (m) return m.call(o); return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; } function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; }; } } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator]; return m ? m.call(o) : typeof __values === "function" ? __values(o) : o[Symbol.iterator](); } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result.default = mod; return result; } function __importDefault(mod) { return (mod && mod.__esModule) ? mod : { default: mod }; } /***/ }), /***/ "../../../../webpack/buildin/global.js": /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || Function("return this")() || (1,eval)("this"); } catch(e) { // This works if the window reference is available if(typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /***/ "../../../animations/esm5/animations.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return AnimationBuilder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return AnimationFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AUTO_STYLE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return animate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return animateChild; }); /* unused harmony export animation */ /* unused harmony export group */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return keyframes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return query; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return sequence; }); /* unused harmony export stagger */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return state; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return style; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return transition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return trigger; }); /* unused harmony export useAnimation */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return NoopAnimationPlayer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return AnimationGroupPlayer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return ɵPRE_STYLE; }); /** * @license Angular v5.2.9 * (c) 2010-2018 Google, Inc. https://angular.io/ * License: MIT */ /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * AnimationBuilder is an injectable service that is available when the {\@link * BrowserAnimationsModule BrowserAnimationsModule} or {\@link NoopAnimationsModule * NoopAnimationsModule} modules are used within an application. * * The purpose if this service is to produce an animation sequence programmatically within an * angular component or directive. * * Programmatic animations are first built and then a player is created when the build animation is * attached to an element. * * ```ts * // remember to include the BrowserAnimationsModule module for this to work... * import {AnimationBuilder} from '\@angular/animations'; * * class MyCmp { * constructor(private _builder: AnimationBuilder) {} * * makeAnimation(element: any) { * // first build the animation * const myAnimation = this._builder.build([ * style({ width: 0 }), * animate(1000, style({ width: '100px' })) * ]); * * // then create a player from it * const player = myAnimation.create(element); * * player.play(); * } * } * ``` * * When an animation is built an instance of {\@link AnimationFactory AnimationFactory} will be * returned. Using that an {\@link AnimationPlayer AnimationPlayer} can be created which can then be * used to start the animation. * * \@experimental Animation support is experimental. * @abstract */ var AnimationBuilder = /** @class */ (function () { function AnimationBuilder() { } return AnimationBuilder; }()); /** * An instance of `AnimationFactory` is returned from {\@link AnimationBuilder#build * AnimationBuilder.build}. * * \@experimental Animation support is experimental. * @abstract */ var AnimationFactory = /** @class */ (function () { function AnimationFactory() { } return AnimationFactory; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license * @record */ /** * \@experimental Animation support is experimental. */ var AUTO_STYLE = '*'; /** * \@experimental Animation support is experimental. * @record */ /** * Metadata representing the entry of animations. Instances of this interface are provided via the * animation DSL when the {\@link trigger trigger animation function} is called. * * \@experimental Animation support is experimental. * @record */ /** * Metadata representing the entry of animations. Instances of this interface are provided via the * animation DSL when the {\@link state state animation function} is called. * * \@experimental Animation support is experimental. * @record */ /** * Metadata representing the entry of animations. Instances of this interface are provided via the * animation DSL when the {\@link transition transition animation function} is called. * * \@experimental Animation support is experimental. * @record */ /** * \@experimental Animation support is experimental. * @record */ /** * \@experimental Animation support is experimental. * @record */ /** * Metadata representing the entry of animations. Instances of this interface are provided via the * animation DSL when the {\@link keyframes keyframes animation function} is called. * * \@experimental Animation support is experimental. * @record */ /** * Metadata representing the entry of animations. Instances of this interface are provided via the * animation DSL when the {\@link style style animation function} is called. * * \@experimental Animation support is experimental. * @record */ /** * Metadata representing the entry of animations. Instances of this interface are provided via the * animation DSL when the {\@link animate animate animation function} is called. * * \@experimental Animation support is experimental. * @record */ /** * Metadata representing the entry of animations. Instances of this interface are provided via the * animation DSL when the {\@link animateChild animateChild animation function} is called. * * \@experimental Animation support is experimental. * @record */ /** * Metadata representing the entry of animations. Instances of this interface are provided via the * animation DSL when the {\@link useAnimation useAnimation animation function} is called. * * \@experimental Animation support is experimental. * @record */ /** * Metadata representing the entry of animations. Instances of this interface are provided via the * animation DSL when the {\@link sequence sequence animation function} is called. * * \@experimental Animation support is experimental. * @record */ /** * Metadata representing the entry of animations. Instances of this interface are provided via the * animation DSL when the {\@link group group animation function} is called. * * \@experimental Animation support is experimental. * @record */ /** * Metadata representing the entry of animations. Instances of this interface are provided via the * animation DSL when the {\@link stagger stagger animation function} is called. * * \@experimental Animation support is experimental. * @record */ /** * `trigger` is an animation-specific function that is designed to be used inside of Angular's * animation DSL language. If this information is new, please navigate to the * {\@link Component#animations component animations metadata page} to gain a better * understanding of how animations in Angular are used. * * `trigger` Creates an animation trigger which will a list of {\@link state state} and * {\@link transition transition} entries that will be evaluated when the expression * bound to the trigger changes. * * Triggers are registered within the component annotation data under the * {\@link Component#animations animations section}. An animation trigger can be placed on an element * within a template by referencing the name of the trigger followed by the expression value that * the * trigger is bound to (in the form of `[\@triggerName]="expression"`. * * Animation trigger bindings strigify values and then match the previous and current values against * any linked transitions. If a boolean value is provided into the trigger binding then it will both * be represented as `1` or `true` and `0` or `false` for a true and false boolean values * respectively. * * ### Usage * * `trigger` will create an animation trigger reference based on the provided `name` value. The * provided `animation` value is expected to be an array consisting of {\@link state state} and * {\@link transition transition} declarations. * * ```typescript * \@Component({ * selector: 'my-component', * templateUrl: 'my-component-tpl.html', * animations: [ * trigger("myAnimationTrigger", [ * state(...), * state(...), * transition(...), * transition(...) * ]) * ] * }) * class MyComponent { * myStatusExp = "something"; * } * ``` * * The template associated with this component will make use of the `myAnimationTrigger` animation * trigger by binding to an element within its template code. * * ```html * *
...
* ``` * * ## Disable Animations * A special animation control binding called `\@.disabled` can be placed on an element which will * then disable animations for any inner animation triggers situated within the element as well as * any animations on the element itself. * * When true, the `\@.disabled` binding will prevent all animations from rendering. The example * below shows how to use this feature: * * ```ts * \@Component({ * selector: 'my-component', * template: ` *
*
*
* `, * animations: [ * trigger("childAnimation", [ * // ... * ]) * ] * }) * class MyComponent { * isDisabled = true; * exp = '...'; * } * ``` * * The `\@childAnimation` trigger will not animate because `\@.disabled` prevents it from happening * (when true). * * Note that `\@.disabled` will only disable all animations (this means any animations running on * the same element will also be disabled). * * ### Disabling Animations Application-wide * When an area of the template is set to have animations disabled, **all** inner components will * also have their animations disabled as well. This means that all animations for an angular * application can be disabled by placing a host binding set on `\@.disabled` on the topmost Angular * component. * * ```ts * import {Component, HostBinding} from '\@angular/core'; * * \@Component({ * selector: 'app-component', * templateUrl: 'app.component.html', * }) * class AppComponent { * \@HostBinding('\@.disabled') * public animationsDisabled = true; * } * ``` * * ### What about animations that us `query()` and `animateChild()`? * Despite inner animations being disabled, a parent animation can {\@link query query} for inner * elements located in disabled areas of the template and still animate them as it sees fit. This is * also the case for when a sub animation is queried by a parent and then later animated using {\@link * animateChild animateChild}. * * \@experimental Animation support is experimental. * @param {?} name * @param {?} definitions * @return {?} */ function trigger(name, definitions) { return { type: 7 /* Trigger */, name: name, definitions: definitions, options: {} }; } /** * `animate` is an animation-specific function that is designed to be used inside of Angular's * animation DSL language. If this information is new, please navigate to the {\@link * Component#animations component animations metadata page} to gain a better understanding of * how animations in Angular are used. * * `animate` specifies an animation step that will apply the provided `styles` data for a given * amount of time based on the provided `timing` expression value. Calls to `animate` are expected * to be used within {\@link sequence an animation sequence}, {\@link group group}, or {\@link * transition transition}. * * ### Usage * * The `animate` function accepts two input parameters: `timing` and `styles`: * * - `timing` is a string based value that can be a combination of a duration with optional delay * and easing values. The format for the expression breaks down to `duration delay easing` * (therefore a value such as `1s 100ms ease-out` will be parse itself into `duration=1000, * delay=100, easing=ease-out`. If a numeric value is provided then that will be used as the * `duration` value in millisecond form. * - `styles` is the style input data which can either be a call to {\@link style style} or {\@link * keyframes keyframes}. If left empty then the styles from the destination state will be collected * and used (this is useful when describing an animation step that will complete an animation by * {\@link transition#the-final-animate-call animating to the final state}). * * ```typescript * // various functions for specifying timing data * animate(500, style(...)) * animate("1s", style(...)) * animate("100ms 0.5s", style(...)) * animate("5s ease", style(...)) * animate("5s 10ms cubic-bezier(.17,.67,.88,.1)", style(...)) * * // either style() of keyframes() can be used * animate(500, style({ background: "red" })) * animate(500, keyframes([ * style({ background: "blue" })), * style({ background: "red" })) * ]) * ``` * * {\@example core/animation/ts/dsl/animation_example.ts region='Component'} * * \@experimental Animation support is experimental. * @param {?} timings * @param {?=} styles * @return {?} */ function animate(timings, styles) { if (styles === void 0) { styles = null; } return { type: 4 /* Animate */, styles: styles, timings: timings }; } /** * `group` is an animation-specific function that is designed to be used inside of Angular's * animation DSL language. If this information is new, please navigate to the {\@link * Component#animations component animations metadata page} to gain a better understanding of * how animations in Angular are used. * * `group` specifies a list of animation steps that are all run in parallel. Grouped animations are * useful when a series of styles must be animated/closed off at different starting/ending times. * * The `group` function can either be used within a {\@link sequence sequence} or a {\@link transition * transition} and it will only continue to the next instruction once all of the inner animation * steps have completed. * * ### Usage * * The `steps` data that is passed into the `group` animation function can either consist of {\@link * style style} or {\@link animate animate} function calls. Each call to `style()` or `animate()` * within a group will be executed instantly (use {\@link keyframes keyframes} or a {\@link * animate#usage animate() with a delay value} to offset styles to be applied at a later time). * * ```typescript * group([ * animate("1s", { background: "black" })) * animate("2s", { color: "white" })) * ]) * ``` * * {\@example core/animation/ts/dsl/animation_example.ts region='Component'} * * \@experimental Animation support is experimental. * @param {?} steps * @param {?=} options * @return {?} */ function group(steps, options) { if (options === void 0) { options = null; } return { type: 3 /* Group */, steps: steps, options: options }; } /** * `sequence` is an animation-specific function that is designed to be used inside of Angular's * animation DSL language. If this information is new, please navigate to the {\@link * Component#animations component animations metadata page} to gain a better understanding of * how animations in Angular are used. * * `sequence` Specifies a list of animation steps that are run one by one. (`sequence` is used by * default when an array is passed as animation data into {\@link transition transition}.) * * The `sequence` function can either be used within a {\@link group group} or a {\@link transition * transition} and it will only continue to the next instruction once each of the inner animation * steps have completed. * * To perform animation styling in parallel with other animation steps then have a look at the * {\@link group group} animation function. * * ### Usage * * The `steps` data that is passed into the `sequence` animation function can either consist of * {\@link style style} or {\@link animate animate} function calls. A call to `style()` will apply the * provided styling data immediately while a call to `animate()` will apply its styling data over a * given time depending on its timing data. * * ```typescript * sequence([ * style({ opacity: 0 })), * animate("1s", { opacity: 1 })) * ]) * ``` * * {\@example core/animation/ts/dsl/animation_example.ts region='Component'} * * \@experimental Animation support is experimental. * @param {?} steps * @param {?=} options * @return {?} */ function sequence(steps, options) { if (options === void 0) { options = null; } return { type: 2 /* Sequence */, steps: steps, options: options }; } /** * `style` is an animation-specific function that is designed to be used inside of Angular's * animation DSL language. If this information is new, please navigate to the {\@link * Component#animations component animations metadata page} to gain a better understanding of * how animations in Angular are used. * * `style` declares a key/value object containing CSS properties/styles that can then be used for * {\@link state animation states}, within an {\@link sequence animation sequence}, or as styling data * for both {\@link animate animate} and {\@link keyframes keyframes}. * * ### Usage * * `style` takes in a key/value string map as data and expects one or more CSS property/value pairs * to be defined. * * ```typescript * // string values are used for css properties * style({ background: "red", color: "blue" }) * * // numerical (pixel) values are also supported * style({ width: 100, height: 0 }) * ``` * * #### Auto-styles (using `*`) * * When an asterix (`*`) character is used as a value then it will be detected from the element * being animated and applied as animation data when the animation starts. * * This feature proves useful for a state depending on layout and/or environment factors; in such * cases the styles are calculated just before the animation starts. * * ```typescript * // the steps below will animate from 0 to the * // actual height of the element * style({ height: 0 }), * animate("1s", style({ height: "*" })) * ``` * * {\@example core/animation/ts/dsl/animation_example.ts region='Component'} * * \@experimental Animation support is experimental. * @param {?} tokens * @return {?} */ function style(tokens) { return { type: 6 /* Style */, styles: tokens, offset: null }; } /** * `state` is an animation-specific function that is designed to be used inside of Angular's * animation DSL language. If this information is new, please navigate to the {\@link * Component#animations component animations metadata page} to gain a better understanding of * how animations in Angular are used. * * `state` declares an animation state within the given trigger. When a state is active within a * component then its associated styles will persist on the element that the trigger is attached to * (even when the animation ends). * * To animate between states, have a look at the animation {\@link transition transition} DSL * function. To register states to an animation trigger please have a look at the {\@link trigger * trigger} function. * * #### The `void` state * * The `void` state value is a reserved word that angular uses to determine when the element is not * apart of the application anymore (e.g. when an `ngIf` evaluates to false then the state of the * associated element is void). * * #### The `*` (default) state * * The `*` state (when styled) is a fallback state that will be used if the state that is being * animated is not declared within the trigger. * * ### Usage * * `state` will declare an animation state with its associated styles * within the given trigger. * * - `stateNameExpr` can be one or more state names separated by commas. * - `styles` refers to the {\@link style styling data} that will be persisted on the element once * the state has been reached. * * ```typescript * // "void" is a reserved name for a state and is used to represent * // the state in which an element is detached from from the application. * state("void", style({ height: 0 })) * * // user-defined states * state("closed", style({ height: 0 })) * state("open, visible", style({ height: "*" })) * ``` * * {\@example core/animation/ts/dsl/animation_example.ts region='Component'} * * \@experimental Animation support is experimental. * @param {?} name * @param {?} styles * @param {?=} options * @return {?} */ function state(name, styles, options) { return { type: 0 /* State */, name: name, styles: styles, options: options }; } /** * `keyframes` is an animation-specific function that is designed to be used inside of Angular's * animation DSL language. If this information is new, please navigate to the {\@link * Component#animations component animations metadata page} to gain a better understanding of * how animations in Angular are used. * * `keyframes` specifies a collection of {\@link style style} entries each optionally characterized * by an `offset` value. * * ### Usage * * The `keyframes` animation function is designed to be used alongside the {\@link animate animate} * animation function. Instead of applying animations from where they are currently to their * destination, keyframes can describe how each style entry is applied and at what point within the * animation arc (much like CSS Keyframe Animations do). * * For each `style()` entry an `offset` value can be set. Doing so allows to specifiy at what * percentage of the animate time the styles will be applied. * * ```typescript * // the provided offset values describe when each backgroundColor value is applied. * animate("5s", keyframes([ * style({ backgroundColor: "red", offset: 0 }), * style({ backgroundColor: "blue", offset: 0.2 }), * style({ backgroundColor: "orange", offset: 0.3 }), * style({ backgroundColor: "black", offset: 1 }) * ])) * ``` * * Alternatively, if there are no `offset` values used within the style entries then the offsets * will be calculated automatically. * * ```typescript * animate("5s", keyframes([ * style({ backgroundColor: "red" }) // offset = 0 * style({ backgroundColor: "blue" }) // offset = 0.33 * style({ backgroundColor: "orange" }) // offset = 0.66 * style({ backgroundColor: "black" }) // offset = 1 * ])) * ``` * * {\@example core/animation/ts/dsl/animation_example.ts region='Component'} * * \@experimental Animation support is experimental. * @param {?} steps * @return {?} */ function keyframes(steps) { return { type: 5 /* Keyframes */, steps: steps }; } /** * `transition` is an animation-specific function that is designed to be used inside of Angular's * animation DSL language. If this information is new, please navigate to the {\@link * Component#animations component animations metadata page} to gain a better understanding of * how animations in Angular are used. * * `transition` declares the {\@link sequence sequence of animation steps} that will be run when the * provided `stateChangeExpr` value is satisfied. The `stateChangeExpr` consists of a `state1 => * state2` which consists of two known states (use an asterix (`*`) to refer to a dynamic starting * and/or ending state). * * A function can also be provided as the `stateChangeExpr` argument for a transition and this * function will be executed each time a state change occurs. If the value returned within the * function is true then the associated animation will be run. * * Animation transitions are placed within an {\@link trigger animation trigger}. For an transition * to animate to a state value and persist its styles then one or more {\@link state animation * states} is expected to be defined. * * ### Usage * * An animation transition is kicked off the `stateChangeExpr` predicate evaluates to true based on * what the previous state is and what the current state has become. In other words, if a transition * is defined that matches the old/current state criteria then the associated animation will be * triggered. * * ```typescript * // all transition/state changes are defined within an animation trigger * trigger("myAnimationTrigger", [ * // if a state is defined then its styles will be persisted when the * // animation has fully completed itself * state("on", style({ background: "green" })), * state("off", style({ background: "grey" })), * * // a transition animation that will be kicked off when the state value * // bound to "myAnimationTrigger" changes from "on" to "off" * transition("on => off", animate(500)), * * // it is also possible to do run the same animation for both directions * transition("on <=> off", animate(500)), * * // or to define multiple states pairs separated by commas * transition("on => off, off => void", animate(500)), * * // this is a catch-all state change for when an element is inserted into * // the page and the destination state is unknown * transition("void => *", [ * style({ opacity: 0 }), * animate(500) * ]), * * // this will capture a state change between any states * transition("* => *", animate("1s 0s")), * * // you can also go full out and include a function * transition((fromState, toState) => { * // when `true` then it will allow the animation below to be invoked * return fromState == "off" && toState == "on"; * }, animate("1s 0s")) * ]) * ``` * * The template associated with this component will make use of the `myAnimationTrigger` animation * trigger by binding to an element within its template code. * * ```html * *
...
* ``` * * #### The final `animate` call * * If the final step within the transition steps is a call to `animate()` that **only** uses a * timing value with **no style data** then it will be automatically used as the final animation arc * for the element to animate itself to the final state. This involves an automatic mix of * adding/removing CSS styles so that the element will be in the exact state it should be for the * applied state to be presented correctly. * * ``` * // start off by hiding the element, but make sure that it animates properly to whatever state * // is currently active for "myAnimationTrigger" * transition("void => *", [ * style({ opacity: 0 }), * animate(500) * ]) * ``` * * ### Using :enter and :leave * * Given that enter (insertion) and leave (removal) animations are so common, the `transition` * function accepts both `:enter` and `:leave` values which are aliases for the `void => *` and `* * => void` state changes. * * ``` * transition(":enter", [ * style({ opacity: 0 }), * animate(500, style({ opacity: 1 })) * ]), * transition(":leave", [ * animate(500, style({ opacity: 0 })) * ]) * ``` * * ### Boolean values * if a trigger binding value is a boolean value then it can be matched using a transition * expression that compares `true` and `false` or `1` and `0`. * * ``` * // in the template *
...
* * // in the component metadata * trigger('openClose', [ * state('true', style({ height: '*' })), * state('false', style({ height: '0px' })), * transition('false <=> true', animate(500)) * ]) * ``` * * ### Using :increment and :decrement * In addition to the :enter and :leave transition aliases, the :increment and :decrement aliases * can be used to kick off a transition when a numeric value has increased or decreased in value. * * ``` * import {group, animate, query, transition, style, trigger} from '\@angular/animations'; * import {Component} from '\@angular/core'; * * \@Component({ * selector: 'banner-carousel-component', * styles: [` * .banner-container { * position:relative; * height:500px; * overflow:hidden; * } * .banner-container > .banner { * position:absolute; * left:0; * top:0; * font-size:200px; * line-height:500px; * font-weight:bold; * text-align:center; * width:100%; * } * `], * template: ` * * *
* * `, * animations: [ * trigger('bannerAnimation', [ * transition(":increment", group([ * query(':enter', [ * style({ left: '100%' }), * animate('0.5s ease-out', style('*')) * ]), * query(':leave', [ * animate('0.5s ease-out', style({ left: '-100%' })) * ]) * ])), * transition(":decrement", group([ * query(':enter', [ * style({ left: '-100%' }), * animate('0.5s ease-out', style('*')) * ]), * query(':leave', [ * animate('0.5s ease-out', style({ left: '100%' })) * ]) * ])) * ]) * ] * }) * class BannerCarouselComponent { * allBanners: string[] = ['1', '2', '3', '4']; * selectedIndex: number = 0; * * get banners() { * return [this.allBanners[this.selectedIndex]]; * } * * previous() { * this.selectedIndex = Math.max(this.selectedIndex - 1, 0); * } * * next() { * this.selectedIndex = Math.min(this.selectedIndex + 1, this.allBanners.length - 1); * } * } * ``` * * {\@example core/animation/ts/dsl/animation_example.ts region='Component'} * * \@experimental Animation support is experimental. * @param {?} stateChangeExpr * @param {?} steps * @param {?=} options * @return {?} */ function transition(stateChangeExpr, steps, options) { if (options === void 0) { options = null; } return { type: 1 /* Transition */, expr: stateChangeExpr, animation: steps, options: options }; } /** * `animation` is an animation-specific function that is designed to be used inside of Angular's * animation DSL language. * * `var myAnimation = animation(...)` is designed to produce a reusable animation that can be later * invoked in another animation or sequence. Reusable animations are designed to make use of * animation parameters and the produced animation can be used via the `useAnimation` method. * * ``` * var fadeAnimation = animation([ * style({ opacity: '{{ start }}' }), * animate('{{ time }}', * style({ opacity: '{{ end }}'})) * ], { params: { time: '1000ms', start: 0, end: 1 }}); * ``` * * If parameters are attached to an animation then they act as **default parameter values**. When an * animation is invoked via `useAnimation` then parameter values are allowed to be passed in * directly. If any of the passed in parameter values are missing then the default values will be * used. * * ``` * useAnimation(fadeAnimation, { * params: { * time: '2s', * start: 1, * end: 0 * } * }) * ``` * * If one or more parameter values are missing before animated then an error will be thrown. * * \@experimental Animation support is experimental. * @param {?} steps * @param {?=} options * @return {?} */ function animation(steps, options) { if (options === void 0) { options = null; } return { type: 8 /* Reference */, animation: steps, options: options }; } /** * `animateChild` is an animation-specific function that is designed to be used inside of Angular's * animation DSL language. It works by allowing a queried element to execute its own * animation within the animation sequence. * * Each time an animation is triggered in angular, the parent animation * will always get priority and any child animations will be blocked. In order * for a child animation to run, the parent animation must query each of the elements * containing child animations and then allow the animations to run using `animateChild`. * * The example HTML code below shows both parent and child elements that have animation * triggers that will execute at the same time. * * ```html * * *
* *
*
Hello
*
* one *
*
* two *
*
* three *
*
* ``` * * Now when the `exp` value changes to true, only the `parentAnimation` animation will animate * because it has priority. However, using `query` and `animateChild` each of the inner animations * can also fire: * * ```ts * // parent-child.component.ts * import {trigger, transition, animate, style, query, animateChild} from '\@angular/animations'; * \@Component({ * selector: 'parent-child-component', * animations: [ * trigger('parentAnimation', [ * transition('false => true', [ * query('header', [ * style({ opacity: 0 }), * animate(500, style({ opacity: 1 })) * ]), * query('\@childAnimation', [ * animateChild() * ]) * ]) * ]), * trigger('childAnimation', [ * transition('false => true', [ * style({ opacity: 0 }), * animate(500, style({ opacity: 1 })) * ]) * ]) * ] * }) * class ParentChildCmp { * exp: boolean = false; * } * ``` * * In the animation code above, when the `parentAnimation` transition kicks off it first queries to * find the header element and fades it in. It then finds each of the sub elements that contain the * `\@childAnimation` trigger and then allows for their animations to fire. * * This example can be further extended by using stagger: * * ```ts * query('\@childAnimation', stagger(100, [ * animateChild() * ])) * ``` * * Now each of the sub animations start off with respect to the `100ms` staggering step. * * ## The first frame of child animations * When sub animations are executed using `animateChild` the animation engine will always apply the * first frame of every sub animation immediately at the start of the animation sequence. This way * the parent animation does not need to set any initial styling data on the sub elements before the * sub animations kick off. * * In the example above the first frame of the `childAnimation`'s `false => true` transition * consists of a style of `opacity: 0`. This is applied immediately when the `parentAnimation` * animation transition sequence starts. Only then when the `\@childAnimation` is queried and called * with `animateChild` will it then animate to its destination of `opacity: 1`. * * Note that this feature designed to be used alongside {\@link query query()} and it will only work * with animations that are assigned using the Angular animation DSL (this means that CSS keyframes * and transitions are not handled by this API). * * \@experimental Animation support is experimental. * @param {?=} options * @return {?} */ function animateChild(options) { if (options === void 0) { options = null; } return { type: 9 /* AnimateChild */, options: options }; } /** * `useAnimation` is an animation-specific function that is designed to be used inside of Angular's * animation DSL language. It is used to kick off a reusable animation that is created using {\@link * animation animation()}. * * \@experimental Animation support is experimental. * @param {?} animation * @param {?=} options * @return {?} */ function useAnimation(animation, options) { if (options === void 0) { options = null; } return { type: 10 /* AnimateRef */, animation: animation, options: options }; } /** * `query` is an animation-specific function that is designed to be used inside of Angular's * animation DSL language. * * query() is used to find one or more inner elements within the current element that is * being animated within the sequence. The provided animation steps are applied * to the queried element (by default, an array is provided, then this will be * treated as an animation sequence). * * ### Usage * * query() is designed to collect mutiple elements and works internally by using * `element.querySelectorAll`. An additional options object can be provided which * can be used to limit the total amount of items to be collected. * * ```js * query('div', [ * animate(...), * animate(...) * ], { limit: 1 }) * ``` * * query(), by default, will throw an error when zero items are found. If a query * has the `optional` flag set to true then this error will be ignored. * * ```js * query('.some-element-that-may-not-be-there', [ * animate(...), * animate(...) * ], { optional: true }) * ``` * * ### Special Selector Values * * The selector value within a query can collect elements that contain angular-specific * characteristics * using special pseudo-selectors tokens. * * These include: * * - Querying for newly inserted/removed elements using `query(":enter")`/`query(":leave")` * - Querying all currently animating elements using `query(":animating")` * - Querying elements that contain an animation trigger using `query("\@triggerName")` * - Querying all elements that contain an animation triggers using `query("\@*")` * - Including the current element into the animation sequence using `query(":self")` * * * Each of these pseudo-selector tokens can be merged together into a combined query selector * string: * * ``` * query(':self, .record:enter, .record:leave, \@subTrigger', [...]) * ``` * * ### Demo * * ``` * \@Component({ * selector: 'inner', * template: ` *
*

Title

*
* Blah blah blah *
*
* `, * animations: [ * trigger('queryAnimation', [ * transition('* => goAnimate', [ * // hide the inner elements * query('h1', style({ opacity: 0 })), * query('.content', style({ opacity: 0 })), * * // animate the inner elements in, one by one * query('h1', animate(1000, style({ opacity: 1 })), * query('.content', animate(1000, style({ opacity: 1 })), * ]) * ]) * ] * }) * class Cmp { * exp = ''; * * goAnimate() { * this.exp = 'goAnimate'; * } * } * ``` * * \@experimental Animation support is experimental. * @param {?} selector * @param {?} animation * @param {?=} options * @return {?} */ function query(selector, animation, options) { if (options === void 0) { options = null; } return { type: 11 /* Query */, selector: selector, animation: animation, options: options }; } /** * `stagger` is an animation-specific function that is designed to be used inside of Angular's * animation DSL language. It is designed to be used inside of an animation {\@link query query()} * and works by issuing a timing gap between after each queried item is animated. * * ### Usage * * In the example below there is a container element that wraps a list of items stamped out * by an ngFor. The container element contains an animation trigger that will later be set * to query for each of the inner items. * * ```html * * *
*
*
* {{ item }} *
*
* ``` * * The component code for this looks as such: * * ```ts * import {trigger, transition, style, animate, query, stagger} from '\@angular/animations'; * \@Component({ * templateUrl: 'list.component.html', * animations: [ * trigger('listAnimation', [ * //... * ]) * ] * }) * class ListComponent { * items = []; * * showItems() { * this.items = [0,1,2,3,4]; * } * * hideItems() { * this.items = []; * } * * toggle() { * this.items.length ? this.hideItems() : this.showItems(); * } * } * ``` * * And now for the animation trigger code: * * ```ts * trigger('listAnimation', [ * transition('* => *', [ // each time the binding value changes * query(':leave', [ * stagger(100, [ * animate('0.5s', style({ opacity: 0 })) * ]) * ]), * query(':enter', [ * style({ opacity: 0 }), * stagger(100, [ * animate('0.5s', style({ opacity: 1 })) * ]) * ]) * ]) * ]) * ``` * * Now each time the items are added/removed then either the opacity * fade-in animation will run or each removed item will be faded out. * When either of these animations occur then a stagger effect will be * applied after each item's animation is started. * * \@experimental Animation support is experimental. * @param {?} timings * @param {?} animation * @return {?} */ function stagger(timings, animation) { return { type: 12 /* Stagger */, timings: timings, animation: animation }; } /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license * @param {?} cb * @return {?} */ function scheduleMicroTask(cb) { Promise.resolve(null).then(cb); } /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * AnimationPlayer controls an animation sequence that was produced from a programmatic animation. * (see {\@link AnimationBuilder AnimationBuilder} for more information on how to create programmatic * animations.) * * \@experimental Animation support is experimental. * @record */ /** * \@experimental Animation support is experimental. */ var NoopAnimationPlayer = /** @class */ (function () { function NoopAnimationPlayer() { this._onDoneFns = []; this._onStartFns = []; this._onDestroyFns = []; this._started = false; this._destroyed = false; this._finished = false; this.parentPlayer = null; this.totalTime = 0; } /** * @return {?} */ NoopAnimationPlayer.prototype._onFinish = /** * @return {?} */ function () { if (!this._finished) { this._finished = true; this._onDoneFns.forEach(function (fn) { return fn(); }); this._onDoneFns = []; } }; /** * @param {?} fn * @return {?} */ NoopAnimationPlayer.prototype.onStart = /** * @param {?} fn * @return {?} */ function (fn) { this._onStartFns.push(fn); }; /** * @param {?} fn * @return {?} */ NoopAnimationPlayer.prototype.onDone = /** * @param {?} fn * @return {?} */ function (fn) { this._onDoneFns.push(fn); }; /** * @param {?} fn * @return {?} */ NoopAnimationPlayer.prototype.onDestroy = /** * @param {?} fn * @return {?} */ function (fn) { this._onDestroyFns.push(fn); }; /** * @return {?} */ NoopAnimationPlayer.prototype.hasStarted = /** * @return {?} */ function () { return this._started; }; /** * @return {?} */ NoopAnimationPlayer.prototype.init = /** * @return {?} */ function () { }; /** * @return {?} */ NoopAnimationPlayer.prototype.play = /** * @return {?} */ function () { if (!this.hasStarted()) { this._onStart(); this.triggerMicrotask(); } this._started = true; }; /* @internal */ /** * @return {?} */ NoopAnimationPlayer.prototype.triggerMicrotask = /** * @return {?} */ function () { var _this = this; scheduleMicroTask(function () { return _this._onFinish(); }); }; /** * @return {?} */ NoopAnimationPlayer.prototype._onStart = /** * @return {?} */ function () { this._onStartFns.forEach(function (fn) { return fn(); }); this._onStartFns = []; }; /** * @return {?} */ NoopAnimationPlayer.prototype.pause = /** * @return {?} */ function () { }; /** * @return {?} */ NoopAnimationPlayer.prototype.restart = /** * @return {?} */ function () { }; /** * @return {?} */ NoopAnimationPlayer.prototype.finish = /** * @return {?} */ function () { this._onFinish(); }; /** * @return {?} */ NoopAnimationPlayer.prototype.destroy = /** * @return {?} */ function () { if (!this._destroyed) { this._destroyed = true; if (!this.hasStarted()) { this._onStart(); } this.finish(); this._onDestroyFns.forEach(function (fn) { return fn(); }); this._onDestroyFns = []; } }; /** * @return {?} */ NoopAnimationPlayer.prototype.reset = /** * @return {?} */ function () { }; /** * @param {?} p * @return {?} */ NoopAnimationPlayer.prototype.setPosition = /** * @param {?} p * @return {?} */ function (p) { }; /** * @return {?} */ NoopAnimationPlayer.prototype.getPosition = /** * @return {?} */ function () { return 0; }; /* @internal */ /** * @param {?} phaseName * @return {?} */ NoopAnimationPlayer.prototype.triggerCallback = /** * @param {?} phaseName * @return {?} */ function (phaseName) { var /** @type {?} */ methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns; methods.forEach(function (fn) { return fn(); }); methods.length = 0; }; return NoopAnimationPlayer; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var AnimationGroupPlayer = /** @class */ (function () { function AnimationGroupPlayer(_players) { var _this = this; this._onDoneFns = []; this._onStartFns = []; this._finished = false; this._started = false; this._destroyed = false; this._onDestroyFns = []; this.parentPlayer = null; this.totalTime = 0; this.players = _players; var /** @type {?} */ doneCount = 0; var /** @type {?} */ destroyCount = 0; var /** @type {?} */ startCount = 0; var /** @type {?} */ total = this.players.length; if (total == 0) { scheduleMicroTask(function () { return _this._onFinish(); }); } else { this.players.forEach(function (player) { player.onDone(function () { if (++doneCount == total) { _this._onFinish(); } }); player.onDestroy(function () { if (++destroyCount == total) { _this._onDestroy(); } }); player.onStart(function () { if (++startCount == total) { _this._onStart(); } }); }); } this.totalTime = this.players.reduce(function (time, player) { return Math.max(time, player.totalTime); }, 0); } /** * @return {?} */ AnimationGroupPlayer.prototype._onFinish = /** * @return {?} */ function () { if (!this._finished) { this._finished = true; this._onDoneFns.forEach(function (fn) { return fn(); }); this._onDoneFns = []; } }; /** * @return {?} */ AnimationGroupPlayer.prototype.init = /** * @return {?} */ function () { this.players.forEach(function (player) { return player.init(); }); }; /** * @param {?} fn * @return {?} */ AnimationGroupPlayer.prototype.onStart = /** * @param {?} fn * @return {?} */ function (fn) { this._onStartFns.push(fn); }; /** * @return {?} */ AnimationGroupPlayer.prototype._onStart = /** * @return {?} */ function () { if (!this.hasStarted()) { this._started = true; this._onStartFns.forEach(function (fn) { return fn(); }); this._onStartFns = []; } }; /** * @param {?} fn * @return {?} */ AnimationGroupPlayer.prototype.onDone = /** * @param {?} fn * @return {?} */ function (fn) { this._onDoneFns.push(fn); }; /** * @param {?} fn * @return {?} */ AnimationGroupPlayer.prototype.onDestroy = /** * @param {?} fn * @return {?} */ function (fn) { this._onDestroyFns.push(fn); }; /** * @return {?} */ AnimationGroupPlayer.prototype.hasStarted = /** * @return {?} */ function () { return this._started; }; /** * @return {?} */ AnimationGroupPlayer.prototype.play = /** * @return {?} */ function () { if (!this.parentPlayer) { this.init(); } this._onStart(); this.players.forEach(function (player) { return player.play(); }); }; /** * @return {?} */ AnimationGroupPlayer.prototype.pause = /** * @return {?} */ function () { this.players.forEach(function (player) { return player.pause(); }); }; /** * @return {?} */ AnimationGroupPlayer.prototype.restart = /** * @return {?} */ function () { this.players.forEach(function (player) { return player.restart(); }); }; /** * @return {?} */ AnimationGroupPlayer.prototype.finish = /** * @return {?} */ function () { this._onFinish(); this.players.forEach(function (player) { return player.finish(); }); }; /** * @return {?} */ AnimationGroupPlayer.prototype.destroy = /** * @return {?} */ function () { this._onDestroy(); }; /** * @return {?} */ AnimationGroupPlayer.prototype._onDestroy = /** * @return {?} */ function () { if (!this._destroyed) { this._destroyed = true; this._onFinish(); this.players.forEach(function (player) { return player.destroy(); }); this._onDestroyFns.forEach(function (fn) { return fn(); }); this._onDestroyFns = []; } }; /** * @return {?} */ AnimationGroupPlayer.prototype.reset = /** * @return {?} */ function () { this.players.forEach(function (player) { return player.reset(); }); this._destroyed = false; this._finished = false; this._started = false; }; /** * @param {?} p * @return {?} */ AnimationGroupPlayer.prototype.setPosition = /** * @param {?} p * @return {?} */ function (p) { var /** @type {?} */ timeAtPosition = p * this.totalTime; this.players.forEach(function (player) { var /** @type {?} */ position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1; player.setPosition(position); }); }; /** * @return {?} */ AnimationGroupPlayer.prototype.getPosition = /** * @return {?} */ function () { var /** @type {?} */ min = 0; this.players.forEach(function (player) { var /** @type {?} */ p = player.getPosition(); min = Math.min(p, min); }); return min; }; /** * @return {?} */ AnimationGroupPlayer.prototype.beforeDestroy = /** * @return {?} */ function () { this.players.forEach(function (player) { if (player.beforeDestroy) { player.beforeDestroy(); } }); }; /* @internal */ /** * @param {?} phaseName * @return {?} */ AnimationGroupPlayer.prototype.triggerCallback = /** * @param {?} phaseName * @return {?} */ function (phaseName) { var /** @type {?} */ methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns; methods.forEach(function (fn) { return fn(); }); methods.length = 0; }; return AnimationGroupPlayer; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var ɵPRE_STYLE = '!'; /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @module * @description * Entry point for all public APIs of this package. */ /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * Generated bundle index. Do not edit. */ //# sourceMappingURL=animations.js.map /***/ }), /***/ "../../../animations/esm5/browser.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AnimationDriver; }); /* unused harmony export ɵAnimation */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return AnimationStyleNormalizer; }); /* unused harmony export ɵNoopAnimationStyleNormalizer */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return WebAnimationsStyleNormalizer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return NoopAnimationDriver; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return AnimationEngine; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return WebAnimationsDriver; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return supportsWebAnimations; }); /* unused harmony export ɵWebAnimationsPlayer */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_animations__ = __webpack_require__("../../../animations/esm5/animations.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_tslib__ = __webpack_require__("../../../../tslib/tslib.es6.js"); /** * @license Angular v5.2.9 * (c) 2010-2018 Google, Inc. https://angular.io/ * License: MIT */ /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * @param {?} players * @return {?} */ function optimizeGroupPlayer(players) { switch (players.length) { case 0: return new __WEBPACK_IMPORTED_MODULE_0__angular_animations__["d" /* NoopAnimationPlayer */](); case 1: return players[0]; default: return new __WEBPACK_IMPORTED_MODULE_0__angular_animations__["n" /* ɵAnimationGroupPlayer */](players); } } /** * @param {?} driver * @param {?} normalizer * @param {?} element * @param {?} keyframes * @param {?=} preStyles * @param {?=} postStyles * @return {?} */ function normalizeKeyframes(driver, normalizer, element, keyframes, preStyles, postStyles) { if (preStyles === void 0) { preStyles = {}; } if (postStyles === void 0) { postStyles = {}; } var /** @type {?} */ errors = []; var /** @type {?} */ normalizedKeyframes = []; var /** @type {?} */ previousOffset = -1; var /** @type {?} */ previousKeyframe = null; keyframes.forEach(function (kf) { var /** @type {?} */ offset = /** @type {?} */ (kf['offset']); var /** @type {?} */ isSameOffset = offset == previousOffset; var /** @type {?} */ normalizedKeyframe = (isSameOffset && previousKeyframe) || {}; Object.keys(kf).forEach(function (prop) { var /** @type {?} */ normalizedProp = prop; var /** @type {?} */ normalizedValue = kf[prop]; if (prop !== 'offset') { normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors); switch (normalizedValue) { case __WEBPACK_IMPORTED_MODULE_0__angular_animations__["o" /* ɵPRE_STYLE */]: normalizedValue = preStyles[prop]; break; case __WEBPACK_IMPORTED_MODULE_0__angular_animations__["a" /* AUTO_STYLE */]: normalizedValue = postStyles[prop]; break; default: normalizedValue = normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors); break; } } normalizedKeyframe[normalizedProp] = normalizedValue; }); if (!isSameOffset) { normalizedKeyframes.push(normalizedKeyframe); } previousKeyframe = normalizedKeyframe; previousOffset = offset; }); if (errors.length) { var /** @type {?} */ LINE_START = '\n - '; throw new Error("Unable to animate due to the following errors:" + LINE_START + errors.join(LINE_START)); } return normalizedKeyframes; } /** * @param {?} player * @param {?} eventName * @param {?} event * @param {?} callback * @return {?} */ function listenOnPlayer(player, eventName, event, callback) { switch (eventName) { case 'start': player.onStart(function () { return callback(event && copyAnimationEvent(event, 'start', player.totalTime)); }); break; case 'done': player.onDone(function () { return callback(event && copyAnimationEvent(event, 'done', player.totalTime)); }); break; case 'destroy': player.onDestroy(function () { return callback(event && copyAnimationEvent(event, 'destroy', player.totalTime)); }); break; } } /** * @param {?} e * @param {?=} phaseName * @param {?=} totalTime * @return {?} */ function copyAnimationEvent(e, phaseName, totalTime) { var /** @type {?} */ event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime); var /** @type {?} */ data = (/** @type {?} */ (e))['_data']; if (data != null) { (/** @type {?} */ (event))['_data'] = data; } return event; } /** * @param {?} element * @param {?} triggerName * @param {?} fromState * @param {?} toState * @param {?=} phaseName * @param {?=} totalTime * @return {?} */ function makeAnimationEvent(element, triggerName, fromState, toState, phaseName, totalTime) { if (phaseName === void 0) { phaseName = ''; } if (totalTime === void 0) { totalTime = 0; } return { element: element, triggerName: triggerName, fromState: fromState, toState: toState, phaseName: phaseName, totalTime: totalTime }; } /** * @param {?} map * @param {?} key * @param {?} defaultValue * @return {?} */ function getOrSetAsInMap(map, key, defaultValue) { var /** @type {?} */ value; if (map instanceof Map) { value = map.get(key); if (!value) { map.set(key, value = defaultValue); } } else { value = map[key]; if (!value) { value = map[key] = defaultValue; } } return value; } /** * @param {?} command * @return {?} */ function parseTimelineCommand(command) { var /** @type {?} */ separatorPos = command.indexOf(':'); var /** @type {?} */ id = command.substring(1, separatorPos); var /** @type {?} */ action = command.substr(separatorPos + 1); return [id, action]; } var _contains = function (elm1, elm2) { return false; }; var _matches = function (element, selector) { return false; }; var _query = function (element, selector, multi) { return []; }; if (typeof Element != 'undefined') { // this is well supported in all browsers _contains = function (elm1, elm2) { return /** @type {?} */ (elm1.contains(elm2)); }; if (Element.prototype.matches) { _matches = function (element, selector) { return element.matches(selector); }; } else { var /** @type {?} */ proto = /** @type {?} */ (Element.prototype); var /** @type {?} */ fn_1 = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector; if (fn_1) { _matches = function (element, selector) { return fn_1.apply(element, [selector]); }; } } _query = function (element, selector, multi) { var /** @type {?} */ results = []; if (multi) { results.push.apply(results, element.querySelectorAll(selector)); } else { var /** @type {?} */ elm = element.querySelector(selector); if (elm) { results.push(elm); } } return results; }; } /** * @param {?} prop * @return {?} */ function containsVendorPrefix(prop) { // Webkit is the only real popular vendor prefix nowadays // cc: http://shouldiprefix.com/ return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit } var _CACHED_BODY = null; var _IS_WEBKIT = false; /** * @param {?} prop * @return {?} */ function validateStyleProperty(prop) { if (!_CACHED_BODY) { _CACHED_BODY = getBodyNode() || {}; _IS_WEBKIT = /** @type {?} */ ((_CACHED_BODY)).style ? ('WebkitAppearance' in /** @type {?} */ ((_CACHED_BODY)).style) : false; } var /** @type {?} */ result = true; if (/** @type {?} */ ((_CACHED_BODY)).style && !containsVendorPrefix(prop)) { result = prop in /** @type {?} */ ((_CACHED_BODY)).style; if (!result && _IS_WEBKIT) { var /** @type {?} */ camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.substr(1); result = camelProp in /** @type {?} */ ((_CACHED_BODY)).style; } } return result; } /** * @return {?} */ function getBodyNode() { if (typeof document != 'undefined') { return document.body; } return null; } var matchesElement = _matches; var containsElement = _contains; var invokeQuery = _query; /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * \@experimental */ var NoopAnimationDriver = /** @class */ (function () { function NoopAnimationDriver() { } /** * @param {?} prop * @return {?} */ NoopAnimationDriver.prototype.validateStyleProperty = /** * @param {?} prop * @return {?} */ function (prop) { return validateStyleProperty(prop); }; /** * @param {?} element * @param {?} selector * @return {?} */ NoopAnimationDriver.prototype.matchesElement = /** * @param {?} element * @param {?} selector * @return {?} */ function (element, selector) { return matchesElement(element, selector); }; /** * @param {?} elm1 * @param {?} elm2 * @return {?} */ NoopAnimationDriver.prototype.containsElement = /** * @param {?} elm1 * @param {?} elm2 * @return {?} */ function (elm1, elm2) { return containsElement(elm1, elm2); }; /** * @param {?} element * @param {?} selector * @param {?} multi * @return {?} */ NoopAnimationDriver.prototype.query = /** * @param {?} element * @param {?} selector * @param {?} multi * @return {?} */ function (element, selector, multi) { return invokeQuery(element, selector, multi); }; /** * @param {?} element * @param {?} prop * @param {?=} defaultValue * @return {?} */ NoopAnimationDriver.prototype.computeStyle = /** * @param {?} element * @param {?} prop * @param {?=} defaultValue * @return {?} */ function (element, prop, defaultValue) { return defaultValue || ''; }; /** * @param {?} element * @param {?} keyframes * @param {?} duration * @param {?} delay * @param {?} easing * @param {?=} previousPlayers * @return {?} */ NoopAnimationDriver.prototype.animate = /** * @param {?} element * @param {?} keyframes * @param {?} duration * @param {?} delay * @param {?} easing * @param {?=} previousPlayers * @return {?} */ function (element, keyframes, duration, delay, easing, previousPlayers) { if (previousPlayers === void 0) { previousPlayers = []; } return new __WEBPACK_IMPORTED_MODULE_0__angular_animations__["d" /* NoopAnimationPlayer */](); }; return NoopAnimationDriver; }()); /** * \@experimental * @abstract */ var AnimationDriver = /** @class */ (function () { function AnimationDriver() { } AnimationDriver.NOOP = new NoopAnimationDriver(); return AnimationDriver; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var ONE_SECOND = 1000; var SUBSTITUTION_EXPR_START = '{{'; var SUBSTITUTION_EXPR_END = '}}'; var ENTER_CLASSNAME = 'ng-enter'; var LEAVE_CLASSNAME = 'ng-leave'; var NG_TRIGGER_CLASSNAME = 'ng-trigger'; var NG_TRIGGER_SELECTOR = '.ng-trigger'; var NG_ANIMATING_CLASSNAME = 'ng-animating'; var NG_ANIMATING_SELECTOR = '.ng-animating'; /** * @param {?} value * @return {?} */ function resolveTimingValue(value) { if (typeof value == 'number') return value; var /** @type {?} */ matches = (/** @type {?} */ (value)).match(/^(-?[\.\d]+)(m?s)/); if (!matches || matches.length < 2) return 0; return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]); } /** * @param {?} value * @param {?} unit * @return {?} */ function _convertTimeValueToMS(value, unit) { switch (unit) { case 's': return value * ONE_SECOND; default: // ms or something else return value; } } /** * @param {?} timings * @param {?} errors * @param {?=} allowNegativeValues * @return {?} */ function resolveTiming(timings, errors, allowNegativeValues) { return timings.hasOwnProperty('duration') ? /** @type {?} */ (timings) : parseTimeExpression(/** @type {?} */ (timings), errors, allowNegativeValues); } /** * @param {?} exp * @param {?} errors * @param {?=} allowNegativeValues * @return {?} */ function parseTimeExpression(exp, errors, allowNegativeValues) { var /** @type {?} */ regex = /^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i; var /** @type {?} */ duration; var /** @type {?} */ delay = 0; var /** @type {?} */ easing = ''; if (typeof exp === 'string') { var /** @type {?} */ matches = exp.match(regex); if (matches === null) { errors.push("The provided timing value \"" + exp + "\" is invalid."); return { duration: 0, delay: 0, easing: '' }; } duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]); var /** @type {?} */ delayMatch = matches[3]; if (delayMatch != null) { delay = _convertTimeValueToMS(Math.floor(parseFloat(delayMatch)), matches[4]); } var /** @type {?} */ easingVal = matches[5]; if (easingVal) { easing = easingVal; } } else { duration = /** @type {?} */ (exp); } if (!allowNegativeValues) { var /** @type {?} */ containsErrors = false; var /** @type {?} */ startIndex = errors.length; if (duration < 0) { errors.push("Duration values below 0 are not allowed for this animation step."); containsErrors = true; } if (delay < 0) { errors.push("Delay values below 0 are not allowed for this animation step."); containsErrors = true; } if (containsErrors) { errors.splice(startIndex, 0, "The provided timing value \"" + exp + "\" is invalid."); } } return { duration: duration, delay: delay, easing: easing }; } /** * @param {?} obj * @param {?=} destination * @return {?} */ function copyObj(obj, destination) { if (destination === void 0) { destination = {}; } Object.keys(obj).forEach(function (prop) { destination[prop] = obj[prop]; }); return destination; } /** * @param {?} styles * @return {?} */ function normalizeStyles(styles) { var /** @type {?} */ normalizedStyles = {}; if (Array.isArray(styles)) { styles.forEach(function (data) { return copyStyles(data, false, normalizedStyles); }); } else { copyStyles(styles, false, normalizedStyles); } return normalizedStyles; } /** * @param {?} styles * @param {?} readPrototype * @param {?=} destination * @return {?} */ function copyStyles(styles, readPrototype, destination) { if (destination === void 0) { destination = {}; } if (readPrototype) { // we make use of a for-in loop so that the // prototypically inherited properties are // revealed from the backFill map for (var /** @type {?} */ prop in styles) { destination[prop] = styles[prop]; } } else { copyObj(styles, destination); } return destination; } /** * @param {?} element * @param {?} styles * @return {?} */ function setStyles(element, styles) { if (element['style']) { Object.keys(styles).forEach(function (prop) { var /** @type {?} */ camelProp = dashCaseToCamelCase(prop); element.style[camelProp] = styles[prop]; }); } } /** * @param {?} element * @param {?} styles * @return {?} */ function eraseStyles(element, styles) { if (element['style']) { Object.keys(styles).forEach(function (prop) { var /** @type {?} */ camelProp = dashCaseToCamelCase(prop); element.style[camelProp] = ''; }); } } /** * @param {?} steps * @return {?} */ function normalizeAnimationEntry(steps) { if (Array.isArray(steps)) { if (steps.length == 1) return steps[0]; return Object(__WEBPACK_IMPORTED_MODULE_0__angular_animations__["i" /* sequence */])(steps); } return /** @type {?} */ (steps); } /** * @param {?} value * @param {?} options * @param {?} errors * @return {?} */ function validateStyleParams(value, options, errors) { var /** @type {?} */ params = options.params || {}; var /** @type {?} */ matches = extractStyleParams(value); if (matches.length) { matches.forEach(function (varName) { if (!params.hasOwnProperty(varName)) { errors.push("Unable to resolve the local animation param " + varName + " in the given list of values"); } }); } } var PARAM_REGEX = new RegExp(SUBSTITUTION_EXPR_START + "\\s*(.+?)\\s*" + SUBSTITUTION_EXPR_END, 'g'); /** * @param {?} value * @return {?} */ function extractStyleParams(value) { var /** @type {?} */ params = []; if (typeof value === 'string') { var /** @type {?} */ val = value.toString(); var /** @type {?} */ match = void 0; while (match = PARAM_REGEX.exec(val)) { params.push(/** @type {?} */ (match[1])); } PARAM_REGEX.lastIndex = 0; } return params; } /** * @param {?} value * @param {?} params * @param {?} errors * @return {?} */ function interpolateParams(value, params, errors) { var /** @type {?} */ original = value.toString(); var /** @type {?} */ str = original.replace(PARAM_REGEX, function (_, varName) { var /** @type {?} */ localVal = params[varName]; // this means that the value was never overidden by the data passed in by the user if (!params.hasOwnProperty(varName)) { errors.push("Please provide a value for the animation param " + varName); localVal = ''; } return localVal.toString(); }); // we do this to assert that numeric values stay as they are return str == original ? value : str; } /** * @param {?} iterator * @return {?} */ function iteratorToArray(iterator) { var /** @type {?} */ arr = []; var /** @type {?} */ item = iterator.next(); while (!item.done) { arr.push(item.value); item = iterator.next(); } return arr; } /** * @param {?} source * @param {?} destination * @return {?} */ var DASH_CASE_REGEXP = /-+([a-z0-9])/g; /** * @param {?} input * @return {?} */ function dashCaseToCamelCase(input) { return input.replace(DASH_CASE_REGEXP, function () { var m = []; for (var _i = 0; _i < arguments.length; _i++) { m[_i] = arguments[_i]; } return m[1].toUpperCase(); }); } /** * @param {?} duration * @param {?} delay * @return {?} */ function allowPreviousPlayerStylesMerge(duration, delay) { return duration === 0 || delay === 0; } /** * @param {?} visitor * @param {?} node * @param {?} context * @return {?} */ function visitDslNode(visitor, node, context) { switch (node.type) { case 7 /* Trigger */: return visitor.visitTrigger(node, context); case 0 /* State */: return visitor.visitState(node, context); case 1 /* Transition */: return visitor.visitTransition(node, context); case 2 /* Sequence */: return visitor.visitSequence(node, context); case 3 /* Group */: return visitor.visitGroup(node, context); case 4 /* Animate */: return visitor.visitAnimate(node, context); case 5 /* Keyframes */: return visitor.visitKeyframes(node, context); case 6 /* Style */: return visitor.visitStyle(node, context); case 8 /* Reference */: return visitor.visitReference(node, context); case 9 /* AnimateChild */: return visitor.visitAnimateChild(node, context); case 10 /* AnimateRef */: return visitor.visitAnimateRef(node, context); case 11 /* Query */: return visitor.visitQuery(node, context); case 12 /* Stagger */: return visitor.visitStagger(node, context); default: throw new Error("Unable to resolve animation metadata node #" + node.type); } } /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var ANY_STATE = '*'; /** * @param {?} transitionValue * @param {?} errors * @return {?} */ function parseTransitionExpr(transitionValue, errors) { var /** @type {?} */ expressions = []; if (typeof transitionValue == 'string') { (/** @type {?} */ (transitionValue)) .split(/\s*,\s*/) .forEach(function (str) { return parseInnerTransitionStr(str, expressions, errors); }); } else { expressions.push(/** @type {?} */ (transitionValue)); } return expressions; } /** * @param {?} eventStr * @param {?} expressions * @param {?} errors * @return {?} */ function parseInnerTransitionStr(eventStr, expressions, errors) { if (eventStr[0] == ':') { var /** @type {?} */ result = parseAnimationAlias(eventStr, errors); if (typeof result == 'function') { expressions.push(result); return; } eventStr = /** @type {?} */ (result); } var /** @type {?} */ match = eventStr.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/); if (match == null || match.length < 4) { errors.push("The provided transition expression \"" + eventStr + "\" is not supported"); return expressions; } var /** @type {?} */ fromState = match[1]; var /** @type {?} */ separator = match[2]; var /** @type {?} */ toState = match[3]; expressions.push(makeLambdaFromStates(fromState, toState)); var /** @type {?} */ isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE; if (separator[0] == '<' && !isFullAnyStateExpr) { expressions.push(makeLambdaFromStates(toState, fromState)); } } /** * @param {?} alias * @param {?} errors * @return {?} */ function parseAnimationAlias(alias, errors) { switch (alias) { case ':enter': return 'void => *'; case ':leave': return '* => void'; case ':increment': return function (fromState, toState) { return parseFloat(toState) > parseFloat(fromState); }; case ':decrement': return function (fromState, toState) { return parseFloat(toState) < parseFloat(fromState); }; default: errors.push("The transition alias value \"" + alias + "\" is not supported"); return '* => *'; } } // DO NOT REFACTOR ... keep the follow set instantiations // with the values intact (closure compiler for some reason // removes follow-up lines that add the values outside of // the constructor... var TRUE_BOOLEAN_VALUES = new Set(['true', '1']); var FALSE_BOOLEAN_VALUES = new Set(['false', '0']); /** * @param {?} lhs * @param {?} rhs * @return {?} */ function makeLambdaFromStates(lhs, rhs) { var /** @type {?} */ LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs); var /** @type {?} */ RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs); return function (fromState, toState) { var /** @type {?} */ lhsMatch = lhs == ANY_STATE || lhs == fromState; var /** @type {?} */ rhsMatch = rhs == ANY_STATE || rhs == toState; if (!lhsMatch && LHS_MATCH_BOOLEAN && typeof fromState === 'boolean') { lhsMatch = fromState ? TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs); } if (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') { rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : FALSE_BOOLEAN_VALUES.has(rhs); } return lhsMatch && rhsMatch; }; } /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var SELF_TOKEN = ':self'; var SELF_TOKEN_REGEX = new RegExp("s*" + SELF_TOKEN + "s*,?", 'g'); /** * @param {?} driver * @param {?} metadata * @param {?} errors * @return {?} */ function buildAnimationAst(driver, metadata, errors) { return new AnimationAstBuilderVisitor(driver).build(metadata, errors); } var ROOT_SELECTOR = ''; var AnimationAstBuilderVisitor = /** @class */ (function () { function AnimationAstBuilderVisitor(_driver) { this._driver = _driver; } /** * @param {?} metadata * @param {?} errors * @return {?} */ AnimationAstBuilderVisitor.prototype.build = /** * @param {?} metadata * @param {?} errors * @return {?} */ function (metadata, errors) { var /** @type {?} */ context = new AnimationAstBuilderContext(errors); this._resetContextStyleTimingState(context); return /** @type {?} */ (visitDslNode(this, normalizeAnimationEntry(metadata), context)); }; /** * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype._resetContextStyleTimingState = /** * @param {?} context * @return {?} */ function (context) { context.currentQuerySelector = ROOT_SELECTOR; context.collectedStyles = {}; context.collectedStyles[ROOT_SELECTOR] = {}; context.currentTime = 0; }; /** * @param {?} metadata * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype.visitTrigger = /** * @param {?} metadata * @param {?} context * @return {?} */ function (metadata, context) { var _this = this; var /** @type {?} */ queryCount = context.queryCount = 0; var /** @type {?} */ depCount = context.depCount = 0; var /** @type {?} */ states = []; var /** @type {?} */ transitions = []; if (metadata.name.charAt(0) == '@') { context.errors.push('animation triggers cannot be prefixed with an `@` sign (e.g. trigger(\'@foo\', [...]))'); } metadata.definitions.forEach(function (def) { _this._resetContextStyleTimingState(context); if (def.type == 0 /* State */) { var /** @type {?} */ stateDef_1 = /** @type {?} */ (def); var /** @type {?} */ name_1 = stateDef_1.name; name_1.split(/\s*,\s*/).forEach(function (n) { stateDef_1.name = n; states.push(_this.visitState(stateDef_1, context)); }); stateDef_1.name = name_1; } else if (def.type == 1 /* Transition */) { var /** @type {?} */ transition = _this.visitTransition(/** @type {?} */ (def), context); queryCount += transition.queryCount; depCount += transition.depCount; transitions.push(transition); } else { context.errors.push('only state() and transition() definitions can sit inside of a trigger()'); } }); return { type: 7 /* Trigger */, name: metadata.name, states: states, transitions: transitions, queryCount: queryCount, depCount: depCount, options: null }; }; /** * @param {?} metadata * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype.visitState = /** * @param {?} metadata * @param {?} context * @return {?} */ function (metadata, context) { var /** @type {?} */ styleAst = this.visitStyle(metadata.styles, context); var /** @type {?} */ astParams = (metadata.options && metadata.options.params) || null; if (styleAst.containsDynamicStyles) { var /** @type {?} */ missingSubs_1 = new Set(); var /** @type {?} */ params_1 = astParams || {}; styleAst.styles.forEach(function (value) { if (isObject(value)) { var /** @type {?} */ stylesObj_1 = /** @type {?} */ (value); Object.keys(stylesObj_1).forEach(function (prop) { extractStyleParams(stylesObj_1[prop]).forEach(function (sub) { if (!params_1.hasOwnProperty(sub)) { missingSubs_1.add(sub); } }); }); } }); if (missingSubs_1.size) { var /** @type {?} */ missingSubsArr = iteratorToArray(missingSubs_1.values()); context.errors.push("state(\"" + metadata.name + "\", ...) must define default values for all the following style substitutions: " + missingSubsArr.join(', ')); } } return { type: 0 /* State */, name: metadata.name, style: styleAst, options: astParams ? { params: astParams } : null }; }; /** * @param {?} metadata * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype.visitTransition = /** * @param {?} metadata * @param {?} context * @return {?} */ function (metadata, context) { context.queryCount = 0; context.depCount = 0; var /** @type {?} */ animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context); var /** @type {?} */ matchers = parseTransitionExpr(metadata.expr, context.errors); return { type: 1 /* Transition */, matchers: matchers, animation: animation, queryCount: context.queryCount, depCount: context.depCount, options: normalizeAnimationOptions(metadata.options) }; }; /** * @param {?} metadata * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype.visitSequence = /** * @param {?} metadata * @param {?} context * @return {?} */ function (metadata, context) { var _this = this; return { type: 2 /* Sequence */, steps: metadata.steps.map(function (s) { return visitDslNode(_this, s, context); }), options: normalizeAnimationOptions(metadata.options) }; }; /** * @param {?} metadata * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype.visitGroup = /** * @param {?} metadata * @param {?} context * @return {?} */ function (metadata, context) { var _this = this; var /** @type {?} */ currentTime = context.currentTime; var /** @type {?} */ furthestTime = 0; var /** @type {?} */ steps = metadata.steps.map(function (step) { context.currentTime = currentTime; var /** @type {?} */ innerAst = visitDslNode(_this, step, context); furthestTime = Math.max(furthestTime, context.currentTime); return innerAst; }); context.currentTime = furthestTime; return { type: 3 /* Group */, steps: steps, options: normalizeAnimationOptions(metadata.options) }; }; /** * @param {?} metadata * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype.visitAnimate = /** * @param {?} metadata * @param {?} context * @return {?} */ function (metadata, context) { var /** @type {?} */ timingAst = constructTimingAst(metadata.timings, context.errors); context.currentAnimateTimings = timingAst; var /** @type {?} */ styleAst; var /** @type {?} */ styleMetadata = metadata.styles ? metadata.styles : Object(__WEBPACK_IMPORTED_MODULE_0__angular_animations__["k" /* style */])({}); if (styleMetadata.type == 5 /* Keyframes */) { styleAst = this.visitKeyframes(/** @type {?} */ (styleMetadata), context); } else { var /** @type {?} */ styleMetadata_1 = /** @type {?} */ (metadata.styles); var /** @type {?} */ isEmpty = false; if (!styleMetadata_1) { isEmpty = true; var /** @type {?} */ newStyleData = {}; if (timingAst.easing) { newStyleData['easing'] = timingAst.easing; } styleMetadata_1 = Object(__WEBPACK_IMPORTED_MODULE_0__angular_animations__["k" /* style */])(newStyleData); } context.currentTime += timingAst.duration + timingAst.delay; var /** @type {?} */ _styleAst = this.visitStyle(styleMetadata_1, context); _styleAst.isEmptyStep = isEmpty; styleAst = _styleAst; } context.currentAnimateTimings = null; return { type: 4 /* Animate */, timings: timingAst, style: styleAst, options: null }; }; /** * @param {?} metadata * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype.visitStyle = /** * @param {?} metadata * @param {?} context * @return {?} */ function (metadata, context) { var /** @type {?} */ ast = this._makeStyleAst(metadata, context); this._validateStyleAst(ast, context); return ast; }; /** * @param {?} metadata * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype._makeStyleAst = /** * @param {?} metadata * @param {?} context * @return {?} */ function (metadata, context) { var /** @type {?} */ styles = []; if (Array.isArray(metadata.styles)) { (/** @type {?} */ (metadata.styles)).forEach(function (styleTuple) { if (typeof styleTuple == 'string') { if (styleTuple == __WEBPACK_IMPORTED_MODULE_0__angular_animations__["a" /* AUTO_STYLE */]) { styles.push(/** @type {?} */ (styleTuple)); } else { context.errors.push("The provided style string value " + styleTuple + " is not allowed."); } } else { styles.push(/** @type {?} */ (styleTuple)); } }); } else { styles.push(metadata.styles); } var /** @type {?} */ containsDynamicStyles = false; var /** @type {?} */ collectedEasing = null; styles.forEach(function (styleData) { if (isObject(styleData)) { var /** @type {?} */ styleMap = /** @type {?} */ (styleData); var /** @type {?} */ easing = styleMap['easing']; if (easing) { collectedEasing = /** @type {?} */ (easing); delete styleMap['easing']; } if (!containsDynamicStyles) { for (var /** @type {?} */ prop in styleMap) { var /** @type {?} */ value = styleMap[prop]; if (value.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) { containsDynamicStyles = true; break; } } } } }); return { type: 6 /* Style */, styles: styles, easing: collectedEasing, offset: metadata.offset, containsDynamicStyles: containsDynamicStyles, options: null }; }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype._validateStyleAst = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { var _this = this; var /** @type {?} */ timings = context.currentAnimateTimings; var /** @type {?} */ endTime = context.currentTime; var /** @type {?} */ startTime = context.currentTime; if (timings && startTime > 0) { startTime -= timings.duration + timings.delay; } ast.styles.forEach(function (tuple) { if (typeof tuple == 'string') return; Object.keys(tuple).forEach(function (prop) { if (!_this._driver.validateStyleProperty(prop)) { context.errors.push("The provided animation property \"" + prop + "\" is not a supported CSS property for animations"); return; } var /** @type {?} */ collectedStyles = context.collectedStyles[/** @type {?} */ ((context.currentQuerySelector))]; var /** @type {?} */ collectedEntry = collectedStyles[prop]; var /** @type {?} */ updateCollectedStyle = true; if (collectedEntry) { if (startTime != endTime && startTime >= collectedEntry.startTime && endTime <= collectedEntry.endTime) { context.errors.push("The CSS property \"" + prop + "\" that exists between the times of \"" + collectedEntry.startTime + "ms\" and \"" + collectedEntry.endTime + "ms\" is also being animated in a parallel animation between the times of \"" + startTime + "ms\" and \"" + endTime + "ms\""); updateCollectedStyle = false; } // we always choose the smaller start time value since we // want to have a record of the entire animation window where // the style property is being animated in between startTime = collectedEntry.startTime; } if (updateCollectedStyle) { collectedStyles[prop] = { startTime: startTime, endTime: endTime }; } if (context.options) { validateStyleParams(tuple[prop], context.options, context.errors); } }); }); }; /** * @param {?} metadata * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype.visitKeyframes = /** * @param {?} metadata * @param {?} context * @return {?} */ function (metadata, context) { var _this = this; var /** @type {?} */ ast = { type: 5 /* Keyframes */, styles: [], options: null }; if (!context.currentAnimateTimings) { context.errors.push("keyframes() must be placed inside of a call to animate()"); return ast; } var /** @type {?} */ MAX_KEYFRAME_OFFSET = 1; var /** @type {?} */ totalKeyframesWithOffsets = 0; var /** @type {?} */ offsets = []; var /** @type {?} */ offsetsOutOfOrder = false; var /** @type {?} */ keyframesOutOfRange = false; var /** @type {?} */ previousOffset = 0; var /** @type {?} */ keyframes = metadata.steps.map(function (styles) { var /** @type {?} */ style$$1 = _this._makeStyleAst(styles, context); var /** @type {?} */ offsetVal = style$$1.offset != null ? style$$1.offset : consumeOffset(style$$1.styles); var /** @type {?} */ offset = 0; if (offsetVal != null) { totalKeyframesWithOffsets++; offset = style$$1.offset = offsetVal; } keyframesOutOfRange = keyframesOutOfRange || offset < 0 || offset > 1; offsetsOutOfOrder = offsetsOutOfOrder || offset < previousOffset; previousOffset = offset; offsets.push(offset); return style$$1; }); if (keyframesOutOfRange) { context.errors.push("Please ensure that all keyframe offsets are between 0 and 1"); } if (offsetsOutOfOrder) { context.errors.push("Please ensure that all keyframe offsets are in order"); } var /** @type {?} */ length = metadata.steps.length; var /** @type {?} */ generatedOffset = 0; if (totalKeyframesWithOffsets > 0 && totalKeyframesWithOffsets < length) { context.errors.push("Not all style() steps within the declared keyframes() contain offsets"); } else if (totalKeyframesWithOffsets == 0) { generatedOffset = MAX_KEYFRAME_OFFSET / (length - 1); } var /** @type {?} */ limit = length - 1; var /** @type {?} */ currentTime = context.currentTime; var /** @type {?} */ currentAnimateTimings = /** @type {?} */ ((context.currentAnimateTimings)); var /** @type {?} */ animateDuration = currentAnimateTimings.duration; keyframes.forEach(function (kf, i) { var /** @type {?} */ offset = generatedOffset > 0 ? (i == limit ? 1 : (generatedOffset * i)) : offsets[i]; var /** @type {?} */ durationUpToThisFrame = offset * animateDuration; context.currentTime = currentTime + currentAnimateTimings.delay + durationUpToThisFrame; currentAnimateTimings.duration = durationUpToThisFrame; _this._validateStyleAst(kf, context); kf.offset = offset; ast.styles.push(kf); }); return ast; }; /** * @param {?} metadata * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype.visitReference = /** * @param {?} metadata * @param {?} context * @return {?} */ function (metadata, context) { return { type: 8 /* Reference */, animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context), options: normalizeAnimationOptions(metadata.options) }; }; /** * @param {?} metadata * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype.visitAnimateChild = /** * @param {?} metadata * @param {?} context * @return {?} */ function (metadata, context) { context.depCount++; return { type: 9 /* AnimateChild */, options: normalizeAnimationOptions(metadata.options) }; }; /** * @param {?} metadata * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype.visitAnimateRef = /** * @param {?} metadata * @param {?} context * @return {?} */ function (metadata, context) { return { type: 10 /* AnimateRef */, animation: this.visitReference(metadata.animation, context), options: normalizeAnimationOptions(metadata.options) }; }; /** * @param {?} metadata * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype.visitQuery = /** * @param {?} metadata * @param {?} context * @return {?} */ function (metadata, context) { var /** @type {?} */ parentSelector = /** @type {?} */ ((context.currentQuerySelector)); var /** @type {?} */ options = /** @type {?} */ ((metadata.options || {})); context.queryCount++; context.currentQuery = metadata; var _a = normalizeSelector(metadata.selector), selector = _a[0], includeSelf = _a[1]; context.currentQuerySelector = parentSelector.length ? (parentSelector + ' ' + selector) : selector; getOrSetAsInMap(context.collectedStyles, context.currentQuerySelector, {}); var /** @type {?} */ animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context); context.currentQuery = null; context.currentQuerySelector = parentSelector; return { type: 11 /* Query */, selector: selector, limit: options.limit || 0, optional: !!options.optional, includeSelf: includeSelf, animation: animation, originalSelector: metadata.selector, options: normalizeAnimationOptions(metadata.options) }; }; /** * @param {?} metadata * @param {?} context * @return {?} */ AnimationAstBuilderVisitor.prototype.visitStagger = /** * @param {?} metadata * @param {?} context * @return {?} */ function (metadata, context) { if (!context.currentQuery) { context.errors.push("stagger() can only be used inside of query()"); } var /** @type {?} */ timings = metadata.timings === 'full' ? { duration: 0, delay: 0, easing: 'full' } : resolveTiming(metadata.timings, context.errors, true); return { type: 12 /* Stagger */, animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context), timings: timings, options: null }; }; return AnimationAstBuilderVisitor; }()); /** * @param {?} selector * @return {?} */ function normalizeSelector(selector) { var /** @type {?} */ hasAmpersand = selector.split(/\s*,\s*/).find(function (token) { return token == SELF_TOKEN; }) ? true : false; if (hasAmpersand) { selector = selector.replace(SELF_TOKEN_REGEX, ''); } // the :enter and :leave selectors are filled in at runtime during timeline building selector = selector.replace(/@\*/g, NG_TRIGGER_SELECTOR) .replace(/@\w+/g, function (match) { return NG_TRIGGER_SELECTOR + '-' + match.substr(1); }) .replace(/:animating/g, NG_ANIMATING_SELECTOR); return [selector, hasAmpersand]; } /** * @param {?} obj * @return {?} */ function normalizeParams(obj) { return obj ? copyObj(obj) : null; } var AnimationAstBuilderContext = /** @class */ (function () { function AnimationAstBuilderContext(errors) { this.errors = errors; this.queryCount = 0; this.depCount = 0; this.currentTransition = null; this.currentQuery = null; this.currentQuerySelector = null; this.currentAnimateTimings = null; this.currentTime = 0; this.collectedStyles = {}; this.options = null; } return AnimationAstBuilderContext; }()); /** * @param {?} styles * @return {?} */ function consumeOffset(styles) { if (typeof styles == 'string') return null; var /** @type {?} */ offset = null; if (Array.isArray(styles)) { styles.forEach(function (styleTuple) { if (isObject(styleTuple) && styleTuple.hasOwnProperty('offset')) { var /** @type {?} */ obj = /** @type {?} */ (styleTuple); offset = parseFloat(/** @type {?} */ (obj['offset'])); delete obj['offset']; } }); } else if (isObject(styles) && styles.hasOwnProperty('offset')) { var /** @type {?} */ obj = /** @type {?} */ (styles); offset = parseFloat(/** @type {?} */ (obj['offset'])); delete obj['offset']; } return offset; } /** * @param {?} value * @return {?} */ function isObject(value) { return !Array.isArray(value) && typeof value == 'object'; } /** * @param {?} value * @param {?} errors * @return {?} */ function constructTimingAst(value, errors) { var /** @type {?} */ timings = null; if (value.hasOwnProperty('duration')) { timings = /** @type {?} */ (value); } else if (typeof value == 'number') { var /** @type {?} */ duration = resolveTiming(/** @type {?} */ (value), errors).duration; return makeTimingAst(/** @type {?} */ (duration), 0, ''); } var /** @type {?} */ strValue = /** @type {?} */ (value); var /** @type {?} */ isDynamic = strValue.split(/\s+/).some(function (v) { return v.charAt(0) == '{' && v.charAt(1) == '{'; }); if (isDynamic) { var /** @type {?} */ ast = /** @type {?} */ (makeTimingAst(0, 0, '')); ast.dynamic = true; ast.strValue = strValue; return /** @type {?} */ (ast); } timings = timings || resolveTiming(strValue, errors); return makeTimingAst(timings.duration, timings.delay, timings.easing); } /** * @param {?} options * @return {?} */ function normalizeAnimationOptions(options) { if (options) { options = copyObj(options); if (options['params']) { options['params'] = /** @type {?} */ ((normalizeParams(options['params']))); } } else { options = {}; } return options; } /** * @param {?} duration * @param {?} delay * @param {?} easing * @return {?} */ function makeTimingAst(duration, delay, easing) { return { duration: duration, delay: delay, easing: easing }; } /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * @record */ /** * @param {?} element * @param {?} keyframes * @param {?} preStyleProps * @param {?} postStyleProps * @param {?} duration * @param {?} delay * @param {?=} easing * @param {?=} subTimeline * @return {?} */ function createTimelineInstruction(element, keyframes, preStyleProps, postStyleProps, duration, delay, easing, subTimeline) { if (easing === void 0) { easing = null; } if (subTimeline === void 0) { subTimeline = false; } return { type: 1 /* TimelineAnimation */, element: element, keyframes: keyframes, preStyleProps: preStyleProps, postStyleProps: postStyleProps, duration: duration, delay: delay, totalTime: duration + delay, easing: easing, subTimeline: subTimeline }; } /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var ElementInstructionMap = /** @class */ (function () { function ElementInstructionMap() { this._map = new Map(); } /** * @param {?} element * @return {?} */ ElementInstructionMap.prototype.consume = /** * @param {?} element * @return {?} */ function (element) { var /** @type {?} */ instructions = this._map.get(element); if (instructions) { this._map.delete(element); } else { instructions = []; } return instructions; }; /** * @param {?} element * @param {?} instructions * @return {?} */ ElementInstructionMap.prototype.append = /** * @param {?} element * @param {?} instructions * @return {?} */ function (element, instructions) { var /** @type {?} */ existingInstructions = this._map.get(element); if (!existingInstructions) { this._map.set(element, existingInstructions = []); } existingInstructions.push.apply(existingInstructions, instructions); }; /** * @param {?} element * @return {?} */ ElementInstructionMap.prototype.has = /** * @param {?} element * @return {?} */ function (element) { return this._map.has(element); }; /** * @return {?} */ ElementInstructionMap.prototype.clear = /** * @return {?} */ function () { this._map.clear(); }; return ElementInstructionMap; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var ONE_FRAME_IN_MILLISECONDS = 1; var ENTER_TOKEN = ':enter'; var ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g'); var LEAVE_TOKEN = ':leave'; var LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g'); /** * @param {?} driver * @param {?} rootElement * @param {?} ast * @param {?} enterClassName * @param {?} leaveClassName * @param {?=} startingStyles * @param {?=} finalStyles * @param {?=} options * @param {?=} subInstructions * @param {?=} errors * @return {?} */ function buildAnimationTimelines(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors) { if (startingStyles === void 0) { startingStyles = {}; } if (finalStyles === void 0) { finalStyles = {}; } if (errors === void 0) { errors = []; } return new AnimationTimelineBuilderVisitor().buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors); } var AnimationTimelineBuilderVisitor = /** @class */ (function () { function AnimationTimelineBuilderVisitor() { } /** * @param {?} driver * @param {?} rootElement * @param {?} ast * @param {?} enterClassName * @param {?} leaveClassName * @param {?} startingStyles * @param {?} finalStyles * @param {?} options * @param {?=} subInstructions * @param {?=} errors * @return {?} */ AnimationTimelineBuilderVisitor.prototype.buildKeyframes = /** * @param {?} driver * @param {?} rootElement * @param {?} ast * @param {?} enterClassName * @param {?} leaveClassName * @param {?} startingStyles * @param {?} finalStyles * @param {?} options * @param {?=} subInstructions * @param {?=} errors * @return {?} */ function (driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors) { if (errors === void 0) { errors = []; } subInstructions = subInstructions || new ElementInstructionMap(); var /** @type {?} */ context = new AnimationTimelineContext(driver, rootElement, subInstructions, enterClassName, leaveClassName, errors, []); context.options = options; context.currentTimeline.setStyles([startingStyles], null, context.errors, options); visitDslNode(this, ast, context); // this checks to see if an actual animation happened var /** @type {?} */ timelines = context.timelines.filter(function (timeline) { return timeline.containsAnimation(); }); if (timelines.length && Object.keys(finalStyles).length) { var /** @type {?} */ tl = timelines[timelines.length - 1]; if (!tl.allowOnlyTimelineStyles()) { tl.setStyles([finalStyles], null, context.errors, options); } } return timelines.length ? timelines.map(function (timeline) { return timeline.buildKeyframes(); }) : [createTimelineInstruction(rootElement, [], [], [], 0, 0, '', false)]; }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationTimelineBuilderVisitor.prototype.visitTrigger = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { // these values are not visited in this AST }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationTimelineBuilderVisitor.prototype.visitState = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { // these values are not visited in this AST }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationTimelineBuilderVisitor.prototype.visitTransition = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { // these values are not visited in this AST }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationTimelineBuilderVisitor.prototype.visitAnimateChild = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { var /** @type {?} */ elementInstructions = context.subInstructions.consume(context.element); if (elementInstructions) { var /** @type {?} */ innerContext = context.createSubContext(ast.options); var /** @type {?} */ startTime = context.currentTimeline.currentTime; var /** @type {?} */ endTime = this._visitSubInstructions(elementInstructions, innerContext, /** @type {?} */ (innerContext.options)); if (startTime != endTime) { // we do this on the upper context because we created a sub context for // the sub child animations context.transformIntoNewTimeline(endTime); } } context.previousNode = ast; }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationTimelineBuilderVisitor.prototype.visitAnimateRef = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { var /** @type {?} */ innerContext = context.createSubContext(ast.options); innerContext.transformIntoNewTimeline(); this.visitReference(ast.animation, innerContext); context.transformIntoNewTimeline(innerContext.currentTimeline.currentTime); context.previousNode = ast; }; /** * @param {?} instructions * @param {?} context * @param {?} options * @return {?} */ AnimationTimelineBuilderVisitor.prototype._visitSubInstructions = /** * @param {?} instructions * @param {?} context * @param {?} options * @return {?} */ function (instructions, context, options) { var /** @type {?} */ startTime = context.currentTimeline.currentTime; var /** @type {?} */ furthestTime = startTime; // this is a special-case for when a user wants to skip a sub // animation from being fired entirely. var /** @type {?} */ duration = options.duration != null ? resolveTimingValue(options.duration) : null; var /** @type {?} */ delay = options.delay != null ? resolveTimingValue(options.delay) : null; if (duration !== 0) { instructions.forEach(function (instruction) { var /** @type {?} */ instructionTimings = context.appendInstructionToTimeline(instruction, duration, delay); furthestTime = Math.max(furthestTime, instructionTimings.duration + instructionTimings.delay); }); } return furthestTime; }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationTimelineBuilderVisitor.prototype.visitReference = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { context.updateOptions(ast.options, true); visitDslNode(this, ast.animation, context); context.previousNode = ast; }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationTimelineBuilderVisitor.prototype.visitSequence = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { var _this = this; var /** @type {?} */ subContextCount = context.subContextCount; var /** @type {?} */ ctx = context; var /** @type {?} */ options = ast.options; if (options && (options.params || options.delay)) { ctx = context.createSubContext(options); ctx.transformIntoNewTimeline(); if (options.delay != null) { if (ctx.previousNode.type == 6 /* Style */) { ctx.currentTimeline.snapshotCurrentStyles(); ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE; } var /** @type {?} */ delay = resolveTimingValue(options.delay); ctx.delayNextStep(delay); } } if (ast.steps.length) { ast.steps.forEach(function (s) { return visitDslNode(_this, s, ctx); }); // this is here just incase the inner steps only contain or end with a style() call ctx.currentTimeline.applyStylesToKeyframe(); // this means that some animation function within the sequence // ended up creating a sub timeline (which means the current // timeline cannot overlap with the contents of the sequence) if (ctx.subContextCount > subContextCount) { ctx.transformIntoNewTimeline(); } } context.previousNode = ast; }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationTimelineBuilderVisitor.prototype.visitGroup = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { var _this = this; var /** @type {?} */ innerTimelines = []; var /** @type {?} */ furthestTime = context.currentTimeline.currentTime; var /** @type {?} */ delay = ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0; ast.steps.forEach(function (s) { var /** @type {?} */ innerContext = context.createSubContext(ast.options); if (delay) { innerContext.delayNextStep(delay); } visitDslNode(_this, s, innerContext); furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime); innerTimelines.push(innerContext.currentTimeline); }); // this operation is run after the AST loop because otherwise // if the parent timeline's collected styles were updated then // it would pass in invalid data into the new-to-be forked items innerTimelines.forEach(function (timeline) { return context.currentTimeline.mergeTimelineCollectedStyles(timeline); }); context.transformIntoNewTimeline(furthestTime); context.previousNode = ast; }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationTimelineBuilderVisitor.prototype._visitTiming = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { if ((/** @type {?} */ (ast)).dynamic) { var /** @type {?} */ strValue = (/** @type {?} */ (ast)).strValue; var /** @type {?} */ timingValue = context.params ? interpolateParams(strValue, context.params, context.errors) : strValue; return resolveTiming(timingValue, context.errors); } else { return { duration: ast.duration, delay: ast.delay, easing: ast.easing }; } }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationTimelineBuilderVisitor.prototype.visitAnimate = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { var /** @type {?} */ timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context); var /** @type {?} */ timeline = context.currentTimeline; if (timings.delay) { context.incrementTime(timings.delay); timeline.snapshotCurrentStyles(); } var /** @type {?} */ style$$1 = ast.style; if (style$$1.type == 5 /* Keyframes */) { this.visitKeyframes(style$$1, context); } else { context.incrementTime(timings.duration); this.visitStyle(/** @type {?} */ (style$$1), context); timeline.applyStylesToKeyframe(); } context.currentAnimateTimings = null; context.previousNode = ast; }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationTimelineBuilderVisitor.prototype.visitStyle = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { var /** @type {?} */ timeline = context.currentTimeline; var /** @type {?} */ timings = /** @type {?} */ ((context.currentAnimateTimings)); // this is a special case for when a style() call // directly follows an animate() call (but not inside of an animate() call) if (!timings && timeline.getCurrentStyleProperties().length) { timeline.forwardFrame(); } var /** @type {?} */ easing = (timings && timings.easing) || ast.easing; if (ast.isEmptyStep) { timeline.applyEmptyStep(easing); } else { timeline.setStyles(ast.styles, easing, context.errors, context.options); } context.previousNode = ast; }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationTimelineBuilderVisitor.prototype.visitKeyframes = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { var /** @type {?} */ currentAnimateTimings = /** @type {?} */ ((context.currentAnimateTimings)); var /** @type {?} */ startTime = (/** @type {?} */ ((context.currentTimeline))).duration; var /** @type {?} */ duration = currentAnimateTimings.duration; var /** @type {?} */ innerContext = context.createSubContext(); var /** @type {?} */ innerTimeline = innerContext.currentTimeline; innerTimeline.easing = currentAnimateTimings.easing; ast.styles.forEach(function (step) { var /** @type {?} */ offset = step.offset || 0; innerTimeline.forwardTime(offset * duration); innerTimeline.setStyles(step.styles, step.easing, context.errors, context.options); innerTimeline.applyStylesToKeyframe(); }); // this will ensure that the parent timeline gets all the styles from // the child even if the new timeline below is not used context.currentTimeline.mergeTimelineCollectedStyles(innerTimeline); // we do this because the window between this timeline and the sub timeline // should ensure that the styles within are exactly the same as they were before context.transformIntoNewTimeline(startTime + duration); context.previousNode = ast; }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationTimelineBuilderVisitor.prototype.visitQuery = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { var _this = this; // in the event that the first step before this is a style step we need // to ensure the styles are applied before the children are animated var /** @type {?} */ startTime = context.currentTimeline.currentTime; var /** @type {?} */ options = /** @type {?} */ ((ast.options || {})); var /** @type {?} */ delay = options.delay ? resolveTimingValue(options.delay) : 0; if (delay && (context.previousNode.type === 6 /* Style */ || (startTime == 0 && context.currentTimeline.getCurrentStyleProperties().length))) { context.currentTimeline.snapshotCurrentStyles(); context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE; } var /** @type {?} */ furthestTime = startTime; var /** @type {?} */ elms = context.invokeQuery(ast.selector, ast.originalSelector, ast.limit, ast.includeSelf, options.optional ? true : false, context.errors); context.currentQueryTotal = elms.length; var /** @type {?} */ sameElementTimeline = null; elms.forEach(function (element, i) { context.currentQueryIndex = i; var /** @type {?} */ innerContext = context.createSubContext(ast.options, element); if (delay) { innerContext.delayNextStep(delay); } if (element === context.element) { sameElementTimeline = innerContext.currentTimeline; } visitDslNode(_this, ast.animation, innerContext); // this is here just incase the inner steps only contain or end // with a style() call (which is here to signal that this is a preparatory // call to style an element before it is animated again) innerContext.currentTimeline.applyStylesToKeyframe(); var /** @type {?} */ endTime = innerContext.currentTimeline.currentTime; furthestTime = Math.max(furthestTime, endTime); }); context.currentQueryIndex = 0; context.currentQueryTotal = 0; context.transformIntoNewTimeline(furthestTime); if (sameElementTimeline) { context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline); context.currentTimeline.snapshotCurrentStyles(); } context.previousNode = ast; }; /** * @param {?} ast * @param {?} context * @return {?} */ AnimationTimelineBuilderVisitor.prototype.visitStagger = /** * @param {?} ast * @param {?} context * @return {?} */ function (ast, context) { var /** @type {?} */ parentContext = /** @type {?} */ ((context.parentContext)); var /** @type {?} */ tl = context.currentTimeline; var /** @type {?} */ timings = ast.timings; var /** @type {?} */ duration = Math.abs(timings.duration); var /** @type {?} */ maxTime = duration * (context.currentQueryTotal - 1); var /** @type {?} */ delay = duration * context.currentQueryIndex; var /** @type {?} */ staggerTransformer = timings.duration < 0 ? 'reverse' : timings.easing; switch (staggerTransformer) { case 'reverse': delay = maxTime - delay; break; case 'full': delay = parentContext.currentStaggerTime; break; } var /** @type {?} */ timeline = context.currentTimeline; if (delay) { timeline.delayNextStep(delay); } var /** @type {?} */ startingTime = timeline.currentTime; visitDslNode(this, ast.animation, context); context.previousNode = ast; // time = duration + delay // the reason why this computation is so complex is because // the inner timeline may either have a delay value or a stretched // keyframe depending on if a subtimeline is not used or is used. parentContext.currentStaggerTime = (tl.currentTime - startingTime) + (tl.startTime - parentContext.currentTimeline.startTime); }; return AnimationTimelineBuilderVisitor; }()); var DEFAULT_NOOP_PREVIOUS_NODE = /** @type {?} */ ({}); var AnimationTimelineContext = /** @class */ (function () { function AnimationTimelineContext(_driver, element, subInstructions, _enterClassName, _leaveClassName, errors, timelines, initialTimeline) { this._driver = _driver; this.element = element; this.subInstructions = subInstructions; this._enterClassName = _enterClassName; this._leaveClassName = _leaveClassName; this.errors = errors; this.timelines = timelines; this.parentContext = null; this.currentAnimateTimings = null; this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE; this.subContextCount = 0; this.options = {}; this.currentQueryIndex = 0; this.currentQueryTotal = 0; this.currentStaggerTime = 0; this.currentTimeline = initialTimeline || new TimelineBuilder(this._driver, element, 0); timelines.push(this.currentTimeline); } Object.defineProperty(AnimationTimelineContext.prototype, "params", { get: /** * @return {?} */ function () { return this.options.params; }, enumerable: true, configurable: true }); /** * @param {?} options * @param {?=} skipIfExists * @return {?} */ AnimationTimelineContext.prototype.updateOptions = /** * @param {?} options * @param {?=} skipIfExists * @return {?} */ function (options, skipIfExists) { var _this = this; if (!options) return; var /** @type {?} */ newOptions = /** @type {?} */ (options); var /** @type {?} */ optionsToUpdate = this.options; // NOTE: this will get patched up when other animation methods support duration overrides if (newOptions.duration != null) { (/** @type {?} */ (optionsToUpdate)).duration = resolveTimingValue(newOptions.duration); } if (newOptions.delay != null) { optionsToUpdate.delay = resolveTimingValue(newOptions.delay); } var /** @type {?} */ newParams = newOptions.params; if (newParams) { var /** @type {?} */ paramsToUpdate_1 = /** @type {?} */ ((optionsToUpdate.params)); if (!paramsToUpdate_1) { paramsToUpdate_1 = this.options.params = {}; } Object.keys(newParams).forEach(function (name) { if (!skipIfExists || !paramsToUpdate_1.hasOwnProperty(name)) { paramsToUpdate_1[name] = interpolateParams(newParams[name], paramsToUpdate_1, _this.errors); } }); } }; /** * @return {?} */ AnimationTimelineContext.prototype._copyOptions = /** * @return {?} */ function () { var /** @type {?} */ options = {}; if (this.options) { var /** @type {?} */ oldParams_1 = this.options.params; if (oldParams_1) { var /** @type {?} */ params_1 = options['params'] = {}; Object.keys(oldParams_1).forEach(function (name) { params_1[name] = oldParams_1[name]; }); } } return options; }; /** * @param {?=} options * @param {?=} element * @param {?=} newTime * @return {?} */ AnimationTimelineContext.prototype.createSubContext = /** * @param {?=} options * @param {?=} element * @param {?=} newTime * @return {?} */ function (options, element, newTime) { if (options === void 0) { options = null; } var /** @type {?} */ target = element || this.element; var /** @type {?} */ context = new AnimationTimelineContext(this._driver, target, this.subInstructions, this._enterClassName, this._leaveClassName, this.errors, this.timelines, this.currentTimeline.fork(target, newTime || 0)); context.previousNode = this.previousNode; context.currentAnimateTimings = this.currentAnimateTimings; context.options = this._copyOptions(); context.updateOptions(options); context.currentQueryIndex = this.currentQueryIndex; context.currentQueryTotal = this.currentQueryTotal; context.parentContext = this; this.subContextCount++; return context; }; /** * @param {?=} newTime * @return {?} */ AnimationTimelineContext.prototype.transformIntoNewTimeline = /** * @param {?=} newTime * @return {?} */ function (newTime) { this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE; this.currentTimeline = this.currentTimeline.fork(this.element, newTime); this.timelines.push(this.currentTimeline); return this.currentTimeline; }; /** * @param {?} instruction * @param {?} duration * @param {?} delay * @return {?} */ AnimationTimelineContext.prototype.appendInstructionToTimeline = /** * @param {?} instruction * @param {?} duration * @param {?} delay * @return {?} */ function (instruction, duration, delay) { var /** @type {?} */ updatedTimings = { duration: duration != null ? duration : instruction.duration, delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay, easing: '' }; var /** @type {?} */ builder = new SubTimelineBuilder(this._driver, instruction.element, instruction.keyframes, instruction.preStyleProps, instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe); this.timelines.push(builder); return updatedTimings; }; /** * @param {?} time * @return {?} */ AnimationTimelineContext.prototype.incrementTime = /** * @param {?} time * @return {?} */ function (time) { this.currentTimeline.forwardTime(this.currentTimeline.duration + time); }; /** * @param {?} delay * @return {?} */ AnimationTimelineContext.prototype.delayNextStep = /** * @param {?} delay * @return {?} */ function (delay) { // negative delays are not yet supported if (delay > 0) { this.currentTimeline.delayNextStep(delay); } }; /** * @param {?} selector * @param {?} originalSelector * @param {?} limit * @param {?} includeSelf * @param {?} optional * @param {?} errors * @return {?} */ AnimationTimelineContext.prototype.invokeQuery = /** * @param {?} selector * @param {?} originalSelector * @param {?} limit * @param {?} includeSelf * @param {?} optional * @param {?} errors * @return {?} */ function (selector, originalSelector, limit, includeSelf, optional, errors) { var /** @type {?} */ results = []; if (includeSelf) { results.push(this.element); } if (selector.length > 0) { // if :self is only used then the selector is empty selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName); selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + this._leaveClassName); var /** @type {?} */ multi = limit != 1; var /** @type {?} */ elements = this._driver.query(this.element, selector, multi); if (limit !== 0) { elements = limit < 0 ? elements.slice(elements.length + limit, elements.length) : elements.slice(0, limit); } results.push.apply(results, elements); } if (!optional && results.length == 0) { errors.push("`query(\"" + originalSelector + "\")` returned zero elements. (Use `query(\"" + originalSelector + "\", { optional: true })` if you wish to allow this.)"); } return results; }; return AnimationTimelineContext; }()); var TimelineBuilder = /** @class */ (function () { function TimelineBuilder(_driver, element, startTime, _elementTimelineStylesLookup) { this._driver = _driver; this.element = element; this.startTime = startTime; this._elementTimelineStylesLookup = _elementTimelineStylesLookup; this.duration = 0; this._previousKeyframe = {}; this._currentKeyframe = {}; this._keyframes = new Map(); this._styleSummary = {}; this._pendingStyles = {}; this._backFill = {}; this._currentEmptyStepKeyframe = null; if (!this._elementTimelineStylesLookup) { this._elementTimelineStylesLookup = new Map(); } this._localTimelineStyles = Object.create(this._backFill, {}); this._globalTimelineStyles = /** @type {?} */ ((this._elementTimelineStylesLookup.get(element))); if (!this._globalTimelineStyles) { this._globalTimelineStyles = this._localTimelineStyles; this._elementTimelineStylesLookup.set(element, this._localTimelineStyles); } this._loadKeyframe(); } /** * @return {?} */ TimelineBuilder.prototype.containsAnimation = /** * @return {?} */ function () { switch (this._keyframes.size) { case 0: return false; case 1: return this.getCurrentStyleProperties().length > 0; default: return true; } }; /** * @return {?} */ TimelineBuilder.prototype.getCurrentStyleProperties = /** * @return {?} */ function () { return Object.keys(this._currentKeyframe); }; Object.defineProperty(TimelineBuilder.prototype, "currentTime", { get: /** * @return {?} */ function () { return this.startTime + this.duration; }, enumerable: true, configurable: true }); /** * @param {?} delay * @return {?} */ TimelineBuilder.prototype.delayNextStep = /** * @param {?} delay * @return {?} */ function (delay) { // in the event that a style() step is placed right before a stagger() // and that style() step is the very first style() value in the animation // then we need to make a copy of the keyframe [0, copy, 1] so that the delay // properly applies the style() values to work with the stagger... var /** @type {?} */ hasPreStyleStep = this._keyframes.size == 1 && Object.keys(this._pendingStyles).length; if (this.duration || hasPreStyleStep) { this.forwardTime(this.currentTime + delay); if (hasPreStyleStep) { this.snapshotCurrentStyles(); } } else { this.startTime += delay; } }; /** * @param {?} element * @param {?=} currentTime * @return {?} */ TimelineBuilder.prototype.fork = /** * @param {?} element * @param {?=} currentTime * @return {?} */ function (element, currentTime) { this.applyStylesToKeyframe(); return new TimelineBuilder(this._driver, element, currentTime || this.currentTime, this._elementTimelineStylesLookup); }; /** * @return {?} */ TimelineBuilder.prototype._loadKeyframe = /** * @return {?} */ function () { if (this._currentKeyframe) { this._previousKeyframe = this._currentKeyframe; } this._currentKeyframe = /** @type {?} */ ((this._keyframes.get(this.duration))); if (!this._currentKeyframe) { this._currentKeyframe = Object.create(this._backFill, {}); this._keyframes.set(this.duration, this._currentKeyframe); } }; /** * @return {?} */ TimelineBuilder.prototype.forwardFrame = /** * @return {?} */ function () { this.duration += ONE_FRAME_IN_MILLISECONDS; this._loadKeyframe(); }; /** * @param {?} time * @return {?} */ TimelineBuilder.prototype.forwardTime = /** * @param {?} time * @return {?} */ function (time) { this.applyStylesToKeyframe(); this.duration = time; this._loadKeyframe(); }; /** * @param {?} prop * @param {?} value * @return {?} */ TimelineBuilder.prototype._updateStyle = /** * @param {?} prop * @param {?} value * @return {?} */ function (prop, value) { this._localTimelineStyles[prop] = value; this._globalTimelineStyles[prop] = value; this._styleSummary[prop] = { time: this.currentTime, value: value }; }; /** * @return {?} */ TimelineBuilder.prototype.allowOnlyTimelineStyles = /** * @return {?} */ function () { return this._currentEmptyStepKeyframe !== this._currentKeyframe; }; /** * @param {?} easing * @return {?} */ TimelineBuilder.prototype.applyEmptyStep = /** * @param {?} easing * @return {?} */ function (easing) { var _this = this; if (easing) { this._previousKeyframe['easing'] = easing; } // special case for animate(duration): // all missing styles are filled with a `*` value then // if any destination styles are filled in later on the same // keyframe then they will override the overridden styles // We use `_globalTimelineStyles` here because there may be // styles in previous keyframes that are not present in this timeline Object.keys(this._globalTimelineStyles).forEach(function (prop) { _this._backFill[prop] = _this._globalTimelineStyles[prop] || __WEBPACK_IMPORTED_MODULE_0__angular_animations__["a" /* AUTO_STYLE */]; _this._currentKeyframe[prop] = __WEBPACK_IMPORTED_MODULE_0__angular_animations__["a" /* AUTO_STYLE */]; }); this._currentEmptyStepKeyframe = this._currentKeyframe; }; /** * @param {?} input * @param {?} easing * @param {?} errors * @param {?=} options * @return {?} */ TimelineBuilder.prototype.setStyles = /** * @param {?} input * @param {?} easing * @param {?} errors * @param {?=} options * @return {?} */ function (input, easing, errors, options) { var _this = this; if (easing) { this._previousKeyframe['easing'] = easing; } var /** @type {?} */ params = (options && options.params) || {}; var /** @type {?} */ styles = flattenStyles(input, this._globalTimelineStyles); Object.keys(styles).forEach(function (prop) { var /** @type {?} */ val = interpolateParams(styles[prop], params, errors); _this._pendingStyles[prop] = val; if (!_this._localTimelineStyles.hasOwnProperty(prop)) { _this._backFill[prop] = _this._globalTimelineStyles.hasOwnProperty(prop) ? _this._globalTimelineStyles[prop] : __WEBPACK_IMPORTED_MODULE_0__angular_animations__["a" /* AUTO_STYLE */]; } _this._updateStyle(prop, val); }); }; /** * @return {?} */ TimelineBuilder.prototype.applyStylesToKeyframe = /** * @return {?} */ function () { var _this = this; var /** @type {?} */ styles = this._pendingStyles; var /** @type {?} */ props = Object.keys(styles); if (props.length == 0) return; this._pendingStyles = {}; props.forEach(function (prop) { var /** @type {?} */ val = styles[prop]; _this._currentKeyframe[prop] = val; }); Object.keys(this._localTimelineStyles).forEach(function (prop) { if (!_this._currentKeyframe.hasOwnProperty(prop)) { _this._currentKeyframe[prop] = _this._localTimelineStyles[prop]; } }); }; /** * @return {?} */ TimelineBuilder.prototype.snapshotCurrentStyles = /** * @return {?} */ function () { var _this = this; Object.keys(this._localTimelineStyles).forEach(function (prop) { var /** @type {?} */ val = _this._localTimelineStyles[prop]; _this._pendingStyles[prop] = val; _this._updateStyle(prop, val); }); }; /** * @return {?} */ TimelineBuilder.prototype.getFinalKeyframe = /** * @return {?} */ function () { return this._keyframes.get(this.duration); }; Object.defineProperty(TimelineBuilder.prototype, "properties", { get: /** * @return {?} */ function () { var /** @type {?} */ properties = []; for (var /** @type {?} */ prop in this._currentKeyframe) { properties.push(prop); } return properties; }, enumerable: true, configurable: true }); /** * @param {?} timeline * @return {?} */ TimelineBuilder.prototype.mergeTimelineCollectedStyles = /** * @param {?} timeline * @return {?} */ function (timeline) { var _this = this; Object.keys(timeline._styleSummary).forEach(function (prop) { var /** @type {?} */ details0 = _this._styleSummary[prop]; var /** @type {?} */ details1 = timeline._styleSummary[prop]; if (!details0 || details1.time > details0.time) { _this._updateStyle(prop, details1.value); } }); }; /** * @return {?} */ TimelineBuilder.prototype.buildKeyframes = /** * @return {?} */ function () { var _this = this; this.applyStylesToKeyframe(); var /** @type {?} */ preStyleProps = new Set(); var /** @type {?} */ postStyleProps = new Set(); var /** @type {?} */ isEmpty = this._keyframes.size === 1 && this.duration === 0; var /** @type {?} */ finalKeyframes = []; this._keyframes.forEach(function (keyframe, time) { var /** @type {?} */ finalKeyframe = copyStyles(keyframe, true); Object.keys(finalKeyframe).forEach(function (prop) { var /** @type {?} */ value = finalKeyframe[prop]; if (value == __WEBPACK_IMPORTED_MODULE_0__angular_animations__["o" /* ɵPRE_STYLE */]) { preStyleProps.add(prop); } else if (value == __WEBPACK_IMPORTED_MODULE_0__angular_animations__["a" /* AUTO_STYLE */]) { postStyleProps.add(prop); } }); if (!isEmpty) { finalKeyframe['offset'] = time / _this.duration; } finalKeyframes.push(finalKeyframe); }); var /** @type {?} */ preProps = preStyleProps.size ? iteratorToArray(preStyleProps.values()) : []; var /** @type {?} */ postProps = postStyleProps.size ? iteratorToArray(postStyleProps.values()) : []; // special case for a 0-second animation (which is designed just to place styles onscreen) if (isEmpty) { var /** @type {?} */ kf0 = finalKeyframes[0]; var /** @type {?} */ kf1 = copyObj(kf0); kf0['offset'] = 0; kf1['offset'] = 1; finalKeyframes = [kf0, kf1]; } return createTimelineInstruction(this.element, finalKeyframes, preProps, postProps, this.duration, this.startTime, this.easing, false); }; return TimelineBuilder; }()); var SubTimelineBuilder = /** @class */ (function (_super) { Object(__WEBPACK_IMPORTED_MODULE_1_tslib__["b" /* __extends */])(SubTimelineBuilder, _super); function SubTimelineBuilder(driver, element, keyframes, preStyleProps, postStyleProps, timings, _stretchStartingKeyframe) { if (_stretchStartingKeyframe === void 0) { _stretchStartingKeyframe = false; } var _this = _super.call(this, driver, element, timings.delay) || this; _this.element = element; _this.keyframes = keyframes; _this.preStyleProps = preStyleProps; _this.postStyleProps = postStyleProps; _this._stretchStartingKeyframe = _stretchStartingKeyframe; _this.timings = { duration: timings.duration, delay: timings.delay, easing: timings.easing }; return _this; } /** * @return {?} */ SubTimelineBuilder.prototype.containsAnimation = /** * @return {?} */ function () { return this.keyframes.length > 1; }; /** * @return {?} */ SubTimelineBuilder.prototype.buildKeyframes = /** * @return {?} */ function () { var /** @type {?} */ keyframes = this.keyframes; var _a = this.timings, delay = _a.delay, duration = _a.duration, easing = _a.easing; if (this._stretchStartingKeyframe && delay) { var /** @type {?} */ newKeyframes = []; var /** @type {?} */ totalTime = duration + delay; var /** @type {?} */ startingGap = delay / totalTime; // the original starting keyframe now starts once the delay is done var /** @type {?} */ newFirstKeyframe = copyStyles(keyframes[0], false); newFirstKeyframe['offset'] = 0; newKeyframes.push(newFirstKeyframe); var /** @type {?} */ oldFirstKeyframe = copyStyles(keyframes[0], false); oldFirstKeyframe['offset'] = roundOffset(startingGap); newKeyframes.push(oldFirstKeyframe); /* When the keyframe is stretched then it means that the delay before the animation starts is gone. Instead the first keyframe is placed at the start of the animation and it is then copied to where it starts when the original delay is over. This basically means nothing animates during that delay, but the styles are still renderered. For this to work the original offset values that exist in the original keyframes must be "warped" so that they can take the new keyframe + delay into account. delay=1000, duration=1000, keyframes = 0 .5 1 turns into delay=0, duration=2000, keyframes = 0 .33 .66 1 */ // offsets between 1 ... n -1 are all warped by the keyframe stretch var /** @type {?} */ limit = keyframes.length - 1; for (var /** @type {?} */ i = 1; i <= limit; i++) { var /** @type {?} */ kf = copyStyles(keyframes[i], false); var /** @type {?} */ oldOffset = /** @type {?} */ (kf['offset']); var /** @type {?} */ timeAtKeyframe = delay + oldOffset * duration; kf['offset'] = roundOffset(timeAtKeyframe / totalTime); newKeyframes.push(kf); } // the new starting keyframe should be added at the start duration = totalTime; delay = 0; easing = ''; keyframes = newKeyframes; } return createTimelineInstruction(this.element, keyframes, this.preStyleProps, this.postStyleProps, duration, delay, easing, true); }; return SubTimelineBuilder; }(TimelineBuilder)); /** * @param {?} offset * @param {?=} decimalPoints * @return {?} */ function roundOffset(offset, decimalPoints) { if (decimalPoints === void 0) { decimalPoints = 3; } var /** @type {?} */ mult = Math.pow(10, decimalPoints - 1); return Math.round(offset * mult) / mult; } /** * @param {?} input * @param {?} allStyles * @return {?} */ function flattenStyles(input, allStyles) { var /** @type {?} */ styles = {}; var /** @type {?} */ allProperties; input.forEach(function (token) { if (token === '*') { allProperties = allProperties || Object.keys(allStyles); allProperties.forEach(function (prop) { styles[prop] = __WEBPACK_IMPORTED_MODULE_0__angular_animations__["a" /* AUTO_STYLE */]; }); } else { copyStyles(/** @type {?} */ (token), false, styles); } }); return styles; } /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var Animation = /** @class */ (function () { function Animation(_driver, input) { this._driver = _driver; var /** @type {?} */ errors = []; var /** @type {?} */ ast = buildAnimationAst(_driver, input, errors); if (errors.length) { var /** @type {?} */ errorMessage = "animation validation failed:\n" + errors.join("\n"); throw new Error(errorMessage); } this._animationAst = ast; } /** * @param {?} element * @param {?} startingStyles * @param {?} destinationStyles * @param {?} options * @param {?=} subInstructions * @return {?} */ Animation.prototype.buildTimelines = /** * @param {?} element * @param {?} startingStyles * @param {?} destinationStyles * @param {?} options * @param {?=} subInstructions * @return {?} */ function (element, startingStyles, destinationStyles, options, subInstructions) { var /** @type {?} */ start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) : /** @type {?} */ (startingStyles); var /** @type {?} */ dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) : /** @type {?} */ (destinationStyles); var /** @type {?} */ errors = []; subInstructions = subInstructions || new ElementInstructionMap(); var /** @type {?} */ result = buildAnimationTimelines(this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest, options, subInstructions, errors); if (errors.length) { var /** @type {?} */ errorMessage = "animation building failed:\n" + errors.join("\n"); throw new Error(errorMessage); } return result; }; return Animation; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * \@experimental Animation support is experimental. * @abstract */ var AnimationStyleNormalizer = /** @class */ (function () { function AnimationStyleNormalizer() { } return AnimationStyleNormalizer; }()); /** * \@experimental Animation support is experimental. */ var NoopAnimationStyleNormalizer = /** @class */ (function () { function NoopAnimationStyleNormalizer() { } /** * @param {?} propertyName * @param {?} errors * @return {?} */ NoopAnimationStyleNormalizer.prototype.normalizePropertyName = /** * @param {?} propertyName * @param {?} errors * @return {?} */ function (propertyName, errors) { return propertyName; }; /** * @param {?} userProvidedProperty * @param {?} normalizedProperty * @param {?} value * @param {?} errors * @return {?} */ NoopAnimationStyleNormalizer.prototype.normalizeStyleValue = /** * @param {?} userProvidedProperty * @param {?} normalizedProperty * @param {?} value * @param {?} errors * @return {?} */ function (userProvidedProperty, normalizedProperty, value, errors) { return /** @type {?} */ (value); }; return NoopAnimationStyleNormalizer; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var WebAnimationsStyleNormalizer = /** @class */ (function (_super) { Object(__WEBPACK_IMPORTED_MODULE_1_tslib__["b" /* __extends */])(WebAnimationsStyleNormalizer, _super); function WebAnimationsStyleNormalizer() { return _super !== null && _super.apply(this, arguments) || this; } /** * @param {?} propertyName * @param {?} errors * @return {?} */ WebAnimationsStyleNormalizer.prototype.normalizePropertyName = /** * @param {?} propertyName * @param {?} errors * @return {?} */ function (propertyName, errors) { return dashCaseToCamelCase(propertyName); }; /** * @param {?} userProvidedProperty * @param {?} normalizedProperty * @param {?} value * @param {?} errors * @return {?} */ WebAnimationsStyleNormalizer.prototype.normalizeStyleValue = /** * @param {?} userProvidedProperty * @param {?} normalizedProperty * @param {?} value * @param {?} errors * @return {?} */ function (userProvidedProperty, normalizedProperty, value, errors) { var /** @type {?} */ unit = ''; var /** @type {?} */ strVal = value.toString().trim(); if (DIMENSIONAL_PROP_MAP[normalizedProperty] && value !== 0 && value !== '0') { if (typeof value === 'number') { unit = 'px'; } else { var /** @type {?} */ valAndSuffixMatch = value.match(/^[+-]?[\d\.]+([a-z]*)$/); if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) { errors.push("Please provide a CSS unit value for " + userProvidedProperty + ":" + value); } } } return strVal + unit; }; return WebAnimationsStyleNormalizer; }(AnimationStyleNormalizer)); var DIMENSIONAL_PROP_MAP = makeBooleanMap('width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective' .split(',')); /** * @param {?} keys * @return {?} */ function makeBooleanMap(keys) { var /** @type {?} */ map = {}; keys.forEach(function (key) { return map[key] = true; }); return map; } /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * @record */ /** * @param {?} element * @param {?} triggerName * @param {?} fromState * @param {?} toState * @param {?} isRemovalTransition * @param {?} fromStyles * @param {?} toStyles * @param {?} timelines * @param {?} queriedElements * @param {?} preStyleProps * @param {?} postStyleProps * @param {?=} errors * @return {?} */ function createTransitionInstruction(element, triggerName, fromState, toState, isRemovalTransition, fromStyles, toStyles, timelines, queriedElements, preStyleProps, postStyleProps, errors) { return { type: 0 /* TransitionAnimation */, element: element, triggerName: triggerName, isRemovalTransition: isRemovalTransition, fromState: fromState, fromStyles: fromStyles, toState: toState, toStyles: toStyles, timelines: timelines, queriedElements: queriedElements, preStyleProps: preStyleProps, postStyleProps: postStyleProps, errors: errors }; } /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var EMPTY_OBJECT = {}; var AnimationTransitionFactory = /** @class */ (function () { function AnimationTransitionFactory(_triggerName, ast, _stateStyles) { this._triggerName = _triggerName; this.ast = ast; this._stateStyles = _stateStyles; } /** * @param {?} currentState * @param {?} nextState * @return {?} */ AnimationTransitionFactory.prototype.match = /** * @param {?} currentState * @param {?} nextState * @return {?} */ function (currentState, nextState) { return oneOrMoreTransitionsMatch(this.ast.matchers, currentState, nextState); }; /** * @param {?} stateName * @param {?} params * @param {?} errors * @return {?} */ AnimationTransitionFactory.prototype.buildStyles = /** * @param {?} stateName * @param {?} params * @param {?} errors * @return {?} */ function (stateName, params, errors) { var /** @type {?} */ backupStateStyler = this._stateStyles['*']; var /** @type {?} */ stateStyler = this._stateStyles[stateName]; var /** @type {?} */ backupStyles = backupStateStyler ? backupStateStyler.buildStyles(params, errors) : {}; return stateStyler ? stateStyler.buildStyles(params, errors) : backupStyles; }; /** * @param {?} driver * @param {?} element * @param {?} currentState * @param {?} nextState * @param {?} enterClassName * @param {?} leaveClassName * @param {?=} currentOptions * @param {?=} nextOptions * @param {?=} subInstructions * @return {?} */ AnimationTransitionFactory.prototype.build = /** * @param {?} driver * @param {?} element * @param {?} currentState * @param {?} nextState * @param {?} enterClassName * @param {?} leaveClassName * @param {?=} currentOptions * @param {?=} nextOptions * @param {?=} subInstructions * @return {?} */ function (driver, element, currentState, nextState, enterClassName, leaveClassName, currentOptions, nextOptions, subInstructions) { var /** @type {?} */ errors = []; var /** @type {?} */ transitionAnimationParams = this.ast.options && this.ast.options.params || EMPTY_OBJECT; var /** @type {?} */ currentAnimationParams = currentOptions && currentOptions.params || EMPTY_OBJECT; var /** @type {?} */ currentStateStyles = this.buildStyles(currentState, currentAnimationParams, errors); var /** @type {?} */ nextAnimationParams = nextOptions && nextOptions.params || EMPTY_OBJECT; var /** @type {?} */ nextStateStyles = this.buildStyles(nextState, nextAnimationParams, errors); var /** @type {?} */ queriedElements = new Set(); var /** @type {?} */ preStyleMap = new Map(); var /** @type {?} */ postStyleMap = new Map(); var /** @type {?} */ isRemoval = nextState === 'void'; var /** @type {?} */ animationOptions = { params: Object(__WEBPACK_IMPORTED_MODULE_1_tslib__["a" /* __assign */])({}, transitionAnimationParams, nextAnimationParams) }; var /** @type {?} */ timelines = buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors); if (errors.length) { return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, [], [], preStyleMap, postStyleMap, errors); } timelines.forEach(function (tl) { var /** @type {?} */ elm = tl.element; var /** @type {?} */ preProps = getOrSetAsInMap(preStyleMap, elm, {}); tl.preStyleProps.forEach(function (prop) { return preProps[prop] = true; }); var /** @type {?} */ postProps = getOrSetAsInMap(postStyleMap, elm, {}); tl.postStyleProps.forEach(function (prop) { return postProps[prop] = true; }); if (elm !== element) { queriedElements.add(elm); } }); var /** @type {?} */ queriedElementsList = iteratorToArray(queriedElements.values()); return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, timelines, queriedElementsList, preStyleMap, postStyleMap); }; return AnimationTransitionFactory; }()); /** * @param {?} matchFns * @param {?} currentState * @param {?} nextState * @return {?} */ function oneOrMoreTransitionsMatch(matchFns, currentState, nextState) { return matchFns.some(function (fn) { return fn(currentState, nextState); }); } var AnimationStateStyles = /** @class */ (function () { function AnimationStateStyles(styles, defaultParams) { this.styles = styles; this.defaultParams = defaultParams; } /** * @param {?} params * @param {?} errors * @return {?} */ AnimationStateStyles.prototype.buildStyles = /** * @param {?} params * @param {?} errors * @return {?} */ function (params, errors) { var /** @type {?} */ finalStyles = {}; var /** @type {?} */ combinedParams = copyObj(this.defaultParams); Object.keys(params).forEach(function (key) { var /** @type {?} */ value = params[key]; if (value != null) { combinedParams[key] = value; } }); this.styles.styles.forEach(function (value) { if (typeof value !== 'string') { var /** @type {?} */ styleObj_1 = /** @type {?} */ (value); Object.keys(styleObj_1).forEach(function (prop) { var /** @type {?} */ val = styleObj_1[prop]; if (val.length > 1) { val = interpolateParams(val, combinedParams, errors); } finalStyles[prop] = val; }); } }); return finalStyles; }; return AnimationStateStyles; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * \@experimental Animation support is experimental. * @param {?} name * @param {?} ast * @return {?} */ function buildTrigger(name, ast) { return new AnimationTrigger(name, ast); } /** * \@experimental Animation support is experimental. */ var AnimationTrigger = /** @class */ (function () { function AnimationTrigger(name, ast) { var _this = this; this.name = name; this.ast = ast; this.transitionFactories = []; this.states = {}; ast.states.forEach(function (ast) { var /** @type {?} */ defaultParams = (ast.options && ast.options.params) || {}; _this.states[ast.name] = new AnimationStateStyles(ast.style, defaultParams); }); balanceProperties(this.states, 'true', '1'); balanceProperties(this.states, 'false', '0'); ast.transitions.forEach(function (ast) { _this.transitionFactories.push(new AnimationTransitionFactory(name, ast, _this.states)); }); this.fallbackTransition = createFallbackTransition(name, this.states); } Object.defineProperty(AnimationTrigger.prototype, "containsQueries", { get: /** * @return {?} */ function () { return this.ast.queryCount > 0; }, enumerable: true, configurable: true }); /** * @param {?} currentState * @param {?} nextState * @return {?} */ AnimationTrigger.prototype.matchTransition = /** * @param {?} currentState * @param {?} nextState * @return {?} */ function (currentState, nextState) { var /** @type {?} */ entry = this.transitionFactories.find(function (f) { return f.match(currentState, nextState); }); return entry || null; }; /** * @param {?} currentState * @param {?} params * @param {?} errors * @return {?} */ AnimationTrigger.prototype.matchStyles = /** * @param {?} currentState * @param {?} params * @param {?} errors * @return {?} */ function (currentState, params, errors) { return this.fallbackTransition.buildStyles(currentState, params, errors); }; return AnimationTrigger; }()); /** * @param {?} triggerName * @param {?} states * @return {?} */ function createFallbackTransition(triggerName, states) { var /** @type {?} */ matchers = [function (fromState, toState) { return true; }]; var /** @type {?} */ animation = { type: 2 /* Sequence */, steps: [], options: null }; var /** @type {?} */ transition = { type: 1 /* Transition */, animation: animation, matchers: matchers, options: null, queryCount: 0, depCount: 0 }; return new AnimationTransitionFactory(triggerName, transition, states); } /** * @param {?} obj * @param {?} key1 * @param {?} key2 * @return {?} */ function balanceProperties(obj, key1, key2) { if (obj.hasOwnProperty(key1)) { if (!obj.hasOwnProperty(key2)) { obj[key2] = obj[key1]; } } else if (obj.hasOwnProperty(key2)) { obj[key1] = obj[key2]; } } /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var EMPTY_INSTRUCTION_MAP = new ElementInstructionMap(); var TimelineAnimationEngine = /** @class */ (function () { function TimelineAnimationEngine(_driver, _normalizer) { this._driver = _driver; this._normalizer = _normalizer; this._animations = {}; this._playersById = {}; this.players = []; } /** * @param {?} id * @param {?} metadata * @return {?} */ TimelineAnimationEngine.prototype.register = /** * @param {?} id * @param {?} metadata * @return {?} */ function (id, metadata) { var /** @type {?} */ errors = []; var /** @type {?} */ ast = buildAnimationAst(this._driver, metadata, errors); if (errors.length) { throw new Error("Unable to build the animation due to the following errors: " + errors.join("\n")); } else { this._animations[id] = ast; } }; /** * @param {?} i * @param {?} preStyles * @param {?=} postStyles * @return {?} */ TimelineAnimationEngine.prototype._buildPlayer = /** * @param {?} i * @param {?} preStyles * @param {?=} postStyles * @return {?} */ function (i, preStyles, postStyles) { var /** @type {?} */ element = i.element; var /** @type {?} */ keyframes = normalizeKeyframes(this._driver, this._normalizer, element, i.keyframes, preStyles, postStyles); return this._driver.animate(element, keyframes, i.duration, i.delay, i.easing, []); }; /** * @param {?} id * @param {?} element * @param {?=} options * @return {?} */ TimelineAnimationEngine.prototype.create = /** * @param {?} id * @param {?} element * @param {?=} options * @return {?} */ function (id, element, options) { var _this = this; if (options === void 0) { options = {}; } var /** @type {?} */ errors = []; var /** @type {?} */ ast = this._animations[id]; var /** @type {?} */ instructions; var /** @type {?} */ autoStylesMap = new Map(); if (ast) { instructions = buildAnimationTimelines(this._driver, element, ast, ENTER_CLASSNAME, LEAVE_CLASSNAME, {}, {}, options, EMPTY_INSTRUCTION_MAP, errors); instructions.forEach(function (inst) { var /** @type {?} */ styles = getOrSetAsInMap(autoStylesMap, inst.element, {}); inst.postStyleProps.forEach(function (prop) { return styles[prop] = null; }); }); } else { errors.push('The requested animation doesn\'t exist or has already been destroyed'); instructions = []; } if (errors.length) { throw new Error("Unable to create the animation due to the following errors: " + errors.join("\n")); } autoStylesMap.forEach(function (styles, element) { Object.keys(styles).forEach(function (prop) { styles[prop] = _this._driver.computeStyle(element, prop, __WEBPACK_IMPORTED_MODULE_0__angular_animations__["a" /* AUTO_STYLE */]); }); }); var /** @type {?} */ players = instructions.map(function (i) { var /** @type {?} */ styles = autoStylesMap.get(i.element); return _this._buildPlayer(i, {}, styles); }); var /** @type {?} */ player = optimizeGroupPlayer(players); this._playersById[id] = player; player.onDestroy(function () { return _this.destroy(id); }); this.players.push(player); return player; }; /** * @param {?} id * @return {?} */ TimelineAnimationEngine.prototype.destroy = /** * @param {?} id * @return {?} */ function (id) { var /** @type {?} */ player = this._getPlayer(id); player.destroy(); delete this._playersById[id]; var /** @type {?} */ index = this.players.indexOf(player); if (index >= 0) { this.players.splice(index, 1); } }; /** * @param {?} id * @return {?} */ TimelineAnimationEngine.prototype._getPlayer = /** * @param {?} id * @return {?} */ function (id) { var /** @type {?} */ player = this._playersById[id]; if (!player) { throw new Error("Unable to find the timeline player referenced by " + id); } return player; }; /** * @param {?} id * @param {?} element * @param {?} eventName * @param {?} callback * @return {?} */ TimelineAnimationEngine.prototype.listen = /** * @param {?} id * @param {?} element * @param {?} eventName * @param {?} callback * @return {?} */ function (id, element, eventName, callback) { // triggerName, fromState, toState are all ignored for timeline animations var /** @type {?} */ baseEvent = makeAnimationEvent(element, '', '', ''); listenOnPlayer(this._getPlayer(id), eventName, baseEvent, callback); return function () { }; }; /** * @param {?} id * @param {?} element * @param {?} command * @param {?} args * @return {?} */ TimelineAnimationEngine.prototype.command = /** * @param {?} id * @param {?} element * @param {?} command * @param {?} args * @return {?} */ function (id, element, command, args) { if (command == 'register') { this.register(id, /** @type {?} */ (args[0])); return; } if (command == 'create') { var /** @type {?} */ options = /** @type {?} */ ((args[0] || {})); this.create(id, element, options); return; } var /** @type {?} */ player = this._getPlayer(id); switch (command) { case 'play': player.play(); break; case 'pause': player.pause(); break; case 'reset': player.reset(); break; case 'restart': player.restart(); break; case 'finish': player.finish(); break; case 'init': player.init(); break; case 'setPosition': player.setPosition(parseFloat(/** @type {?} */ (args[0]))); break; case 'destroy': this.destroy(id); break; } }; return TimelineAnimationEngine; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var QUEUED_CLASSNAME = 'ng-animate-queued'; var QUEUED_SELECTOR = '.ng-animate-queued'; var DISABLED_CLASSNAME = 'ng-animate-disabled'; var DISABLED_SELECTOR = '.ng-animate-disabled'; var STAR_CLASSNAME = 'ng-star-inserted'; var STAR_SELECTOR = '.ng-star-inserted'; var EMPTY_PLAYER_ARRAY = []; var NULL_REMOVAL_STATE = { namespaceId: '', setForRemoval: null, hasAnimation: false, removedBeforeQueried: false }; var NULL_REMOVED_QUERIED_STATE = { namespaceId: '', setForRemoval: null, hasAnimation: false, removedBeforeQueried: true }; /** * @record */ var REMOVAL_FLAG = '__ng_removed'; /** * @record */ var StateValue = /** @class */ (function () { function StateValue(input, namespaceId) { if (namespaceId === void 0) { namespaceId = ''; } this.namespaceId = namespaceId; var /** @type {?} */ isObj = input && input.hasOwnProperty('value'); var /** @type {?} */ value = isObj ? input['value'] : input; this.value = normalizeTriggerValue(value); if (isObj) { var /** @type {?} */ options = copyObj(/** @type {?} */ (input)); delete options['value']; this.options = /** @type {?} */ (options); } else { this.options = {}; } if (!this.options.params) { this.options.params = {}; } } Object.defineProperty(StateValue.prototype, "params", { get: /** * @return {?} */ function () { return /** @type {?} */ (this.options.params); }, enumerable: true, configurable: true }); /** * @param {?} options * @return {?} */ StateValue.prototype.absorbOptions = /** * @param {?} options * @return {?} */ function (options) { var /** @type {?} */ newParams = options.params; if (newParams) { var /** @type {?} */ oldParams_1 = /** @type {?} */ ((this.options.params)); Object.keys(newParams).forEach(function (prop) { if (oldParams_1[prop] == null) { oldParams_1[prop] = newParams[prop]; } }); } }; return StateValue; }()); var VOID_VALUE = 'void'; var DEFAULT_STATE_VALUE = new StateValue(VOID_VALUE); var DELETED_STATE_VALUE = new StateValue('DELETED'); var AnimationTransitionNamespace = /** @class */ (function () { function AnimationTransitionNamespace(id, hostElement, _engine) { this.id = id; this.hostElement = hostElement; this._engine = _engine; this.players = []; this._triggers = {}; this._queue = []; this._elementListeners = new Map(); this._hostClassName = 'ng-tns-' + id; addClass(hostElement, this._hostClassName); } /** * @param {?} element * @param {?} name * @param {?} phase * @param {?} callback * @return {?} */ AnimationTransitionNamespace.prototype.listen = /** * @param {?} element * @param {?} name * @param {?} phase * @param {?} callback * @return {?} */ function (element, name, phase, callback) { var _this = this; if (!this._triggers.hasOwnProperty(name)) { throw new Error("Unable to listen on the animation trigger event \"" + phase + "\" because the animation trigger \"" + name + "\" doesn't exist!"); } if (phase == null || phase.length == 0) { throw new Error("Unable to listen on the animation trigger \"" + name + "\" because the provided event is undefined!"); } if (!isTriggerEventValid(phase)) { throw new Error("The provided animation trigger event \"" + phase + "\" for the animation trigger \"" + name + "\" is not supported!"); } var /** @type {?} */ listeners = getOrSetAsInMap(this._elementListeners, element, []); var /** @type {?} */ data = { name: name, phase: phase, callback: callback }; listeners.push(data); var /** @type {?} */ triggersWithStates = getOrSetAsInMap(this._engine.statesByElement, element, {}); if (!triggersWithStates.hasOwnProperty(name)) { addClass(element, NG_TRIGGER_CLASSNAME); addClass(element, NG_TRIGGER_CLASSNAME + '-' + name); triggersWithStates[name] = DEFAULT_STATE_VALUE; } return function () { // the event listener is removed AFTER the flush has occurred such // that leave animations callbacks can fire (otherwise if the node // is removed in between then the listeners would be deregistered) // the event listener is removed AFTER the flush has occurred such // that leave animations callbacks can fire (otherwise if the node // is removed in between then the listeners would be deregistered) _this._engine.afterFlush(function () { var /** @type {?} */ index = listeners.indexOf(data); if (index >= 0) { listeners.splice(index, 1); } if (!_this._triggers[name]) { delete triggersWithStates[name]; } }); }; }; /** * @param {?} name * @param {?} ast * @return {?} */ AnimationTransitionNamespace.prototype.register = /** * @param {?} name * @param {?} ast * @return {?} */ function (name, ast) { if (this._triggers[name]) { // throw return false; } else { this._triggers[name] = ast; return true; } }; /** * @param {?} name * @return {?} */ AnimationTransitionNamespace.prototype._getTrigger = /** * @param {?} name * @return {?} */ function (name) { var /** @type {?} */ trigger = this._triggers[name]; if (!trigger) { throw new Error("The provided animation trigger \"" + name + "\" has not been registered!"); } return trigger; }; /** * @param {?} element * @param {?} triggerName * @param {?} value * @param {?=} defaultToFallback * @return {?} */ AnimationTransitionNamespace.prototype.trigger = /** * @param {?} element * @param {?} triggerName * @param {?} value * @param {?=} defaultToFallback * @return {?} */ function (element, triggerName, value, defaultToFallback) { var _this = this; if (defaultToFallback === void 0) { defaultToFallback = true; } var /** @type {?} */ trigger = this._getTrigger(triggerName); var /** @type {?} */ player = new TransitionAnimationPlayer(this.id, triggerName, element); var /** @type {?} */ triggersWithStates = this._engine.statesByElement.get(element); if (!triggersWithStates) { addClass(element, NG_TRIGGER_CLASSNAME); addClass(element, NG_TRIGGER_CLASSNAME + '-' + triggerName); this._engine.statesByElement.set(element, triggersWithStates = {}); } var /** @type {?} */ fromState = triggersWithStates[triggerName]; var /** @type {?} */ toState = new StateValue(value, this.id); var /** @type {?} */ isObj = value && value.hasOwnProperty('value'); if (!isObj && fromState) { toState.absorbOptions(fromState.options); } triggersWithStates[triggerName] = toState; if (!fromState) { fromState = DEFAULT_STATE_VALUE; } else if (fromState === DELETED_STATE_VALUE) { return player; } var /** @type {?} */ isRemoval = toState.value === VOID_VALUE; // normally this isn't reached by here, however, if an object expression // is passed in then it may be a new object each time. Comparing the value // is important since that will stay the same despite there being a new object. // The removal arc here is special cased because the same element is triggered // twice in the event that it contains animations on the outer/inner portions // of the host container if (!isRemoval && fromState.value === toState.value) { // this means that despite the value not changing, some inner params // have changed which means that the animation final styles need to be applied if (!objEquals(fromState.params, toState.params)) { var /** @type {?} */ errors = []; var /** @type {?} */ fromStyles_1 = trigger.matchStyles(fromState.value, fromState.params, errors); var /** @type {?} */ toStyles_1 = trigger.matchStyles(toState.value, toState.params, errors); if (errors.length) { this._engine.reportError(errors); } else { this._engine.afterFlush(function () { eraseStyles(element, fromStyles_1); setStyles(element, toStyles_1); }); } } return; } var /** @type {?} */ playersOnElement = getOrSetAsInMap(this._engine.playersByElement, element, []); playersOnElement.forEach(function (player) { // only remove the player if it is queued on the EXACT same trigger/namespace // we only also deal with queued players here because if the animation has // started then we want to keep the player alive until the flush happens // (which is where the previousPlayers are passed into the new palyer) if (player.namespaceId == _this.id && player.triggerName == triggerName && player.queued) { player.destroy(); } }); var /** @type {?} */ transition = trigger.matchTransition(fromState.value, toState.value); var /** @type {?} */ isFallbackTransition = false; if (!transition) { if (!defaultToFallback) return; transition = trigger.fallbackTransition; isFallbackTransition = true; } this._engine.totalQueuedPlayers++; this._queue.push({ element: element, triggerName: triggerName, transition: transition, fromState: fromState, toState: toState, player: player, isFallbackTransition: isFallbackTransition }); if (!isFallbackTransition) { addClass(element, QUEUED_CLASSNAME); player.onStart(function () { removeClass(element, QUEUED_CLASSNAME); }); } player.onDone(function () { var /** @type {?} */ index = _this.players.indexOf(player); if (index >= 0) { _this.players.splice(index, 1); } var /** @type {?} */ players = _this._engine.playersByElement.get(element); if (players) { var /** @type {?} */ index_1 = players.indexOf(player); if (index_1 >= 0) { players.splice(index_1, 1); } } }); this.players.push(player); playersOnElement.push(player); return player; }; /** * @param {?} name * @return {?} */ AnimationTransitionNamespace.prototype.deregister = /** * @param {?} name * @return {?} */ function (name) { var _this = this; delete this._triggers[name]; this._engine.statesByElement.forEach(function (stateMap, element) { delete stateMap[name]; }); this._elementListeners.forEach(function (listeners, element) { _this._elementListeners.set(element, listeners.filter(function (entry) { return entry.name != name; })); }); }; /** * @param {?} element * @return {?} */ AnimationTransitionNamespace.prototype.clearElementCache = /** * @param {?} element * @return {?} */ function (element) { this._engine.statesByElement.delete(element); this._elementListeners.delete(element); var /** @type {?} */ elementPlayers = this._engine.playersByElement.get(element); if (elementPlayers) { elementPlayers.forEach(function (player) { return player.destroy(); }); this._engine.playersByElement.delete(element); } }; /** * @param {?} rootElement * @param {?} context * @param {?=} animate * @return {?} */ AnimationTransitionNamespace.prototype._signalRemovalForInnerTriggers = /** * @param {?} rootElement * @param {?} context * @param {?=} animate * @return {?} */ function (rootElement, context, animate) { var _this = this; if (animate === void 0) { animate = false; } // emulate a leave animation for all inner nodes within this node. // If there are no animations found for any of the nodes then clear the cache // for the element. this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true).forEach(function (elm) { // this means that an inner remove() operation has already kicked off // the animation on this element... if (elm[REMOVAL_FLAG]) return; var /** @type {?} */ namespaces = _this._engine.fetchNamespacesByElement(elm); if (namespaces.size) { namespaces.forEach(function (ns) { return ns.triggerLeaveAnimation(elm, context, false, true); }); } else { _this.clearElementCache(elm); } }); }; /** * @param {?} element * @param {?} context * @param {?=} destroyAfterComplete * @param {?=} defaultToFallback * @return {?} */ AnimationTransitionNamespace.prototype.triggerLeaveAnimation = /** * @param {?} element * @param {?} context * @param {?=} destroyAfterComplete * @param {?=} defaultToFallback * @return {?} */ function (element, context, destroyAfterComplete, defaultToFallback) { var _this = this; var /** @type {?} */ triggerStates = this._engine.statesByElement.get(element); if (triggerStates) { var /** @type {?} */ players_1 = []; Object.keys(triggerStates).forEach(function (triggerName) { // this check is here in the event that an element is removed // twice (both on the host level and the component level) if (_this._triggers[triggerName]) { var /** @type {?} */ player = _this.trigger(element, triggerName, VOID_VALUE, defaultToFallback); if (player) { players_1.push(player); } } }); if (players_1.length) { this._engine.markElementAsRemoved(this.id, element, true, context); if (destroyAfterComplete) { optimizeGroupPlayer(players_1).onDone(function () { return _this._engine.processLeaveNode(element); }); } return true; } } return false; }; /** * @param {?} element * @return {?} */ AnimationTransitionNamespace.prototype.prepareLeaveAnimationListeners = /** * @param {?} element * @return {?} */ function (element) { var _this = this; var /** @type {?} */ listeners = this._elementListeners.get(element); if (listeners) { var /** @type {?} */ visitedTriggers_1 = new Set(); listeners.forEach(function (listener) { var /** @type {?} */ triggerName = listener.name; if (visitedTriggers_1.has(triggerName)) return; visitedTriggers_1.add(triggerName); var /** @type {?} */ trigger = _this._triggers[triggerName]; var /** @type {?} */ transition = trigger.fallbackTransition; var /** @type {?} */ elementStates = /** @type {?} */ ((_this._engine.statesByElement.get(element))); var /** @type {?} */ fromState = elementStates[triggerName] || DEFAULT_STATE_VALUE; var /** @type {?} */ toState = new StateValue(VOID_VALUE); var /** @type {?} */ player = new TransitionAnimationPlayer(_this.id, triggerName, element); _this._engine.totalQueuedPlayers++; _this._queue.push({ element: element, triggerName: triggerName, transition: transition, fromState: fromState, toState: toState, player: player, isFallbackTransition: true }); }); } }; /** * @param {?} element * @param {?} context * @return {?} */ AnimationTransitionNamespace.prototype.removeNode = /** * @param {?} element * @param {?} context * @return {?} */ function (element, context) { var _this = this; var /** @type {?} */ engine = this._engine; if (element.childElementCount) { this._signalRemovalForInnerTriggers(element, context, true); } // this means that a * => VOID animation was detected and kicked off if (this.triggerLeaveAnimation(element, context, true)) return; // find the player that is animating and make sure that the // removal is delayed until that player has completed var /** @type {?} */ containsPotentialParentTransition = false; if (engine.totalAnimations) { var /** @type {?} */ currentPlayers = engine.players.length ? engine.playersByQueriedElement.get(element) : []; // when this `if statement` does not continue forward it means that // a previous animation query has selected the current element and // is animating it. In this situation want to continue fowards and // allow the element to be queued up for animation later. if (currentPlayers && currentPlayers.length) { containsPotentialParentTransition = true; } else { var /** @type {?} */ parent_1 = element; while (parent_1 = parent_1.parentNode) { var /** @type {?} */ triggers = engine.statesByElement.get(parent_1); if (triggers) { containsPotentialParentTransition = true; break; } } } } // at this stage we know that the element will either get removed // during flush or will be picked up by a parent query. Either way // we need to fire the listeners for this element when it DOES get // removed (once the query parent animation is done or after flush) this.prepareLeaveAnimationListeners(element); // whether or not a parent has an animation we need to delay the deferral of the leave // operation until we have more information (which we do after flush() has been called) if (containsPotentialParentTransition) { engine.markElementAsRemoved(this.id, element, false, context); } else { // we do this after the flush has occurred such // that the callbacks can be fired engine.afterFlush(function () { return _this.clearElementCache(element); }); engine.destroyInnerAnimations(element); engine._onRemovalComplete(element, context); } }; /** * @param {?} element * @param {?} parent * @return {?} */ AnimationTransitionNamespace.prototype.insertNode = /** * @param {?} element * @param {?} parent * @return {?} */ function (element, parent) { addClass(element, this._hostClassName); }; /** * @param {?} microtaskId * @return {?} */ AnimationTransitionNamespace.prototype.drainQueuedTransitions = /** * @param {?} microtaskId * @return {?} */ function (microtaskId) { var _this = this; var /** @type {?} */ instructions = []; this._queue.forEach(function (entry) { var /** @type {?} */ player = entry.player; if (player.destroyed) return; var /** @type {?} */ element = entry.element; var /** @type {?} */ listeners = _this._elementListeners.get(element); if (listeners) { listeners.forEach(function (listener) { if (listener.name == entry.triggerName) { var /** @type {?} */ baseEvent = makeAnimationEvent(element, entry.triggerName, entry.fromState.value, entry.toState.value); (/** @type {?} */ (baseEvent))['_data'] = microtaskId; listenOnPlayer(entry.player, listener.phase, baseEvent, listener.callback); } }); } if (player.markedForDestroy) { _this._engine.afterFlush(function () { // now we can destroy the element properly since the event listeners have // been bound to the player player.destroy(); }); } else { instructions.push(entry); } }); this._queue = []; return instructions.sort(function (a, b) { // if depCount == 0 them move to front // otherwise if a contains b then move back var /** @type {?} */ d0 = a.transition.ast.depCount; var /** @type {?} */ d1 = b.transition.ast.depCount; if (d0 == 0 || d1 == 0) { return d0 - d1; } return _this._engine.driver.containsElement(a.element, b.element) ? 1 : -1; }); }; /** * @param {?} context * @return {?} */ AnimationTransitionNamespace.prototype.destroy = /** * @param {?} context * @return {?} */ function (context) { this.players.forEach(function (p) { return p.destroy(); }); this._signalRemovalForInnerTriggers(this.hostElement, context); }; /** * @param {?} element * @return {?} */ AnimationTransitionNamespace.prototype.elementContainsData = /** * @param {?} element * @return {?} */ function (element) { var /** @type {?} */ containsData = false; if (this._elementListeners.has(element)) containsData = true; containsData = (this._queue.find(function (entry) { return entry.element === element; }) ? true : false) || containsData; return containsData; }; return AnimationTransitionNamespace; }()); /** * @record */ var TransitionAnimationEngine = /** @class */ (function () { function TransitionAnimationEngine(driver, _normalizer) { this.driver = driver; this._normalizer = _normalizer; this.players = []; this.newHostElements = new Map(); this.playersByElement = new Map(); this.playersByQueriedElement = new Map(); this.statesByElement = new Map(); this.disabledNodes = new Set(); this.totalAnimations = 0; this.totalQueuedPlayers = 0; this._namespaceLookup = {}; this._namespaceList = []; this._flushFns = []; this._whenQuietFns = []; this.namespacesByHostElement = new Map(); this.collectedEnterElements = []; this.collectedLeaveElements = []; this.onRemovalComplete = function (element, context) { }; } /** @internal */ /** * \@internal * @param {?} element * @param {?} context * @return {?} */ TransitionAnimationEngine.prototype._onRemovalComplete = /** * \@internal * @param {?} element * @param {?} context * @return {?} */ function (element, context) { this.onRemovalComplete(element, context); }; Object.defineProperty(TransitionAnimationEngine.prototype, "queuedPlayers", { get: /** * @return {?} */ function () { var /** @type {?} */ players = []; this._namespaceList.forEach(function (ns) { ns.players.forEach(function (player) { if (player.queued) { players.push(player); } }); }); return players; }, enumerable: true, configurable: true }); /** * @param {?} namespaceId * @param {?} hostElement * @return {?} */ TransitionAnimationEngine.prototype.createNamespace = /** * @param {?} namespaceId * @param {?} hostElement * @return {?} */ function (namespaceId, hostElement) { var /** @type {?} */ ns = new AnimationTransitionNamespace(namespaceId, hostElement, this); if (hostElement.parentNode) { this._balanceNamespaceList(ns, hostElement); } else { // defer this later until flush during when the host element has // been inserted so that we know exactly where to place it in // the namespace list this.newHostElements.set(hostElement, ns); // given that this host element is apart of the animation code, it // may or may not be inserted by a parent node that is an of an // animation renderer type. If this happens then we can still have // access to this item when we query for :enter nodes. If the parent // is a renderer then the set data-structure will normalize the entry this.collectEnterElement(hostElement); } return this._namespaceLookup[namespaceId] = ns; }; /** * @param {?} ns * @param {?} hostElement * @return {?} */ TransitionAnimationEngine.prototype._balanceNamespaceList = /** * @param {?} ns * @param {?} hostElement * @return {?} */ function (ns, hostElement) { var /** @type {?} */ limit = this._namespaceList.length - 1; if (limit >= 0) { var /** @type {?} */ found = false; for (var /** @type {?} */ i = limit; i >= 0; i--) { var /** @type {?} */ nextNamespace = this._namespaceList[i]; if (this.driver.containsElement(nextNamespace.hostElement, hostElement)) { this._namespaceList.splice(i + 1, 0, ns); found = true; break; } } if (!found) { this._namespaceList.splice(0, 0, ns); } } else { this._namespaceList.push(ns); } this.namespacesByHostElement.set(hostElement, ns); return ns; }; /** * @param {?} namespaceId * @param {?} hostElement * @return {?} */ TransitionAnimationEngine.prototype.register = /** * @param {?} namespaceId * @param {?} hostElement * @return {?} */ function (namespaceId, hostElement) { var /** @type {?} */ ns = this._namespaceLookup[namespaceId]; if (!ns) { ns = this.createNamespace(namespaceId, hostElement); } return ns; }; /** * @param {?} namespaceId * @param {?} name * @param {?} trigger * @return {?} */ TransitionAnimationEngine.prototype.registerTrigger = /** * @param {?} namespaceId * @param {?} name * @param {?} trigger * @return {?} */ function (namespaceId, name, trigger) { var /** @type {?} */ ns = this._namespaceLookup[namespaceId]; if (ns && ns.register(name, trigger)) { this.totalAnimations++; } }; /** * @param {?} namespaceId * @param {?} context * @return {?} */ TransitionAnimationEngine.prototype.destroy = /** * @param {?} namespaceId * @param {?} context * @return {?} */ function (namespaceId, context) { var _this = this; if (!namespaceId) return; var /** @type {?} */ ns = this._fetchNamespace(namespaceId); this.afterFlush(function () { _this.namespacesByHostElement.delete(ns.hostElement); delete _this._namespaceLookup[namespaceId]; var /** @type {?} */ index = _this._namespaceList.indexOf(ns); if (index >= 0) { _this._namespaceList.splice(index, 1); } }); this.afterFlushAnimationsDone(function () { return ns.destroy(context); }); }; /** * @param {?} id * @return {?} */ TransitionAnimationEngine.prototype._fetchNamespace = /** * @param {?} id * @return {?} */ function (id) { return this._namespaceLookup[id]; }; /** * @param {?} element * @return {?} */ TransitionAnimationEngine.prototype.fetchNamespacesByElement = /** * @param {?} element * @return {?} */ function (element) { // normally there should only be one namespace per element, however // if @triggers are placed on both the component element and then // its host element (within the component code) then there will be // two namespaces returned. We use a set here to simply the dedupe // of namespaces incase there are multiple triggers both the elm and host var /** @type {?} */ namespaces = new Set(); var /** @type {?} */ elementStates = this.statesByElement.get(element); if (elementStates) { var /** @type {?} */ keys = Object.keys(elementStates); for (var /** @type {?} */ i = 0; i < keys.length; i++) { var /** @type {?} */ nsId = elementStates[keys[i]].namespaceId; if (nsId) { var /** @type {?} */ ns = this._fetchNamespace(nsId); if (ns) { namespaces.add(ns); } } } } return namespaces; }; /** * @param {?} namespaceId * @param {?} element * @param {?} name * @param {?} value * @return {?} */ TransitionAnimationEngine.prototype.trigger = /** * @param {?} namespaceId * @param {?} element * @param {?} name * @param {?} value * @return {?} */ function (namespaceId, element, name, value) { if (isElementNode(element)) { this._fetchNamespace(namespaceId).trigger(element, name, value); return true; } return false; }; /** * @param {?} namespaceId * @param {?} element * @param {?} parent * @param {?} insertBefore * @return {?} */ TransitionAnimationEngine.prototype.insertNode = /** * @param {?} namespaceId * @param {?} element * @param {?} parent * @param {?} insertBefore * @return {?} */ function (namespaceId, element, parent, insertBefore) { if (!isElementNode(element)) return; // special case for when an element is removed and reinserted (move operation) // when this occurs we do not want to use the element for deletion later var /** @type {?} */ details = /** @type {?} */ (element[REMOVAL_FLAG]); if (details && details.setForRemoval) { details.setForRemoval = false; } // in the event that the namespaceId is blank then the caller // code does not contain any animation code in it, but it is // just being called so that the node is marked as being inserted if (namespaceId) { this._fetchNamespace(namespaceId).insertNode(element, parent); } // only *directives and host elements are inserted before if (insertBefore) { this.collectEnterElement(element); } }; /** * @param {?} element * @return {?} */ TransitionAnimationEngine.prototype.collectEnterElement = /** * @param {?} element * @return {?} */ function (element) { this.collectedEnterElements.push(element); }; /** * @param {?} element * @param {?} value * @return {?} */ TransitionAnimationEngine.prototype.markElementAsDisabled = /** * @param {?} element * @param {?} value * @return {?} */ function (element, value) { if (value) { if (!this.disabledNodes.has(element)) { this.disabledNodes.add(element); addClass(element, DISABLED_CLASSNAME); } } else if (this.disabledNodes.has(element)) { this.disabledNodes.delete(element); removeClass(element, DISABLED_CLASSNAME); } }; /** * @param {?} namespaceId * @param {?} element * @param {?} context * @return {?} */ TransitionAnimationEngine.prototype.removeNode = /** * @param {?} namespaceId * @param {?} element * @param {?} context * @return {?} */ function (namespaceId, element, context) { if (!isElementNode(element)) { this._onRemovalComplete(element, context); return; } var /** @type {?} */ ns = namespaceId ? this._fetchNamespace(namespaceId) : null; if (ns) { ns.removeNode(element, context); } else { this.markElementAsRemoved(namespaceId, element, false, context); } }; /** * @param {?} namespaceId * @param {?} element * @param {?=} hasAnimation * @param {?=} context * @return {?} */ TransitionAnimationEngine.prototype.markElementAsRemoved = /** * @param {?} namespaceId * @param {?} element * @param {?=} hasAnimation * @param {?=} context * @return {?} */ function (namespaceId, element, hasAnimation, context) { this.collectedLeaveElements.push(element); element[REMOVAL_FLAG] = { namespaceId: namespaceId, setForRemoval: context, hasAnimation: hasAnimation, removedBeforeQueried: false }; }; /** * @param {?} namespaceId * @param {?} element * @param {?} name * @param {?} phase * @param {?} callback * @return {?} */ TransitionAnimationEngine.prototype.listen = /** * @param {?} namespaceId * @param {?} element * @param {?} name * @param {?} phase * @param {?} callback * @return {?} */ function (namespaceId, element, name, phase, callback) { if (isElementNode(element)) { return this._fetchNamespace(namespaceId).listen(element, name, phase, callback); } return function () { }; }; /** * @param {?} entry * @param {?} subTimelines * @param {?} enterClassName * @param {?} leaveClassName * @return {?} */ TransitionAnimationEngine.prototype._buildInstruction = /** * @param {?} entry * @param {?} subTimelines * @param {?} enterClassName * @param {?} leaveClassName * @return {?} */ function (entry, subTimelines, enterClassName, leaveClassName) { return entry.transition.build(this.driver, entry.element, entry.fromState.value, entry.toState.value, enterClassName, leaveClassName, entry.fromState.options, entry.toState.options, subTimelines); }; /** * @param {?} containerElement * @return {?} */ TransitionAnimationEngine.prototype.destroyInnerAnimations = /** * @param {?} containerElement * @return {?} */ function (containerElement) { var _this = this; var /** @type {?} */ elements = this.driver.query(containerElement, NG_TRIGGER_SELECTOR, true); elements.forEach(function (element) { return _this.destroyActiveAnimationsForElement(element); }); if (this.playersByQueriedElement.size == 0) return; elements = this.driver.query(containerElement, NG_ANIMATING_SELECTOR, true); elements.forEach(function (element) { return _this.finishActiveQueriedAnimationOnElement(element); }); }; /** * @param {?} element * @return {?} */ TransitionAnimationEngine.prototype.destroyActiveAnimationsForElement = /** * @param {?} element * @return {?} */ function (element) { var /** @type {?} */ players = this.playersByElement.get(element); if (players) { players.forEach(function (player) { // special case for when an element is set for destruction, but hasn't started. // in this situation we want to delay the destruction until the flush occurs // so that any event listeners attached to the player are triggered. if (player.queued) { player.markedForDestroy = true; } else { player.destroy(); } }); } var /** @type {?} */ stateMap = this.statesByElement.get(element); if (stateMap) { Object.keys(stateMap).forEach(function (triggerName) { return stateMap[triggerName] = DELETED_STATE_VALUE; }); } }; /** * @param {?} element * @return {?} */ TransitionAnimationEngine.prototype.finishActiveQueriedAnimationOnElement = /** * @param {?} element * @return {?} */ function (element) { var /** @type {?} */ players = this.playersByQueriedElement.get(element); if (players) { players.forEach(function (player) { return player.finish(); }); } }; /** * @return {?} */ TransitionAnimationEngine.prototype.whenRenderingDone = /** * @return {?} */ function () { var _this = this; return new Promise(function (resolve) { if (_this.players.length) { return optimizeGroupPlayer(_this.players).onDone(function () { return resolve(); }); } else { resolve(); } }); }; /** * @param {?} element * @return {?} */ TransitionAnimationEngine.prototype.processLeaveNode = /** * @param {?} element * @return {?} */ function (element) { var _this = this; var /** @type {?} */ details = /** @type {?} */ (element[REMOVAL_FLAG]); if (details && details.setForRemoval) { // this will prevent it from removing it twice element[REMOVAL_FLAG] = NULL_REMOVAL_STATE; if (details.namespaceId) { this.destroyInnerAnimations(element); var /** @type {?} */ ns = this._fetchNamespace(details.namespaceId); if (ns) { ns.clearElementCache(element); } } this._onRemovalComplete(element, details.setForRemoval); } if (this.driver.matchesElement(element, DISABLED_SELECTOR)) { this.markElementAsDisabled(element, false); } this.driver.query(element, DISABLED_SELECTOR, true).forEach(function (node) { _this.markElementAsDisabled(element, false); }); }; /** * @param {?=} microtaskId * @return {?} */ TransitionAnimationEngine.prototype.flush = /** * @param {?=} microtaskId * @return {?} */ function (microtaskId) { var _this = this; if (microtaskId === void 0) { microtaskId = -1; } var /** @type {?} */ players = []; if (this.newHostElements.size) { this.newHostElements.forEach(function (ns, element) { return _this._balanceNamespaceList(ns, element); }); this.newHostElements.clear(); } if (this.totalAnimations && this.collectedEnterElements.length) { for (var /** @type {?} */ i = 0; i < this.collectedEnterElements.length; i++) { var /** @type {?} */ elm = this.collectedEnterElements[i]; addClass(elm, STAR_CLASSNAME); } } if (this._namespaceList.length && (this.totalQueuedPlayers || this.collectedLeaveElements.length)) { var /** @type {?} */ cleanupFns = []; try { players = this._flushAnimations(cleanupFns, microtaskId); } finally { for (var /** @type {?} */ i = 0; i < cleanupFns.length; i++) { cleanupFns[i](); } } } else { for (var /** @type {?} */ i = 0; i < this.collectedLeaveElements.length; i++) { var /** @type {?} */ element = this.collectedLeaveElements[i]; this.processLeaveNode(element); } } this.totalQueuedPlayers = 0; this.collectedEnterElements.length = 0; this.collectedLeaveElements.length = 0; this._flushFns.forEach(function (fn) { return fn(); }); this._flushFns = []; if (this._whenQuietFns.length) { // we move these over to a variable so that // if any new callbacks are registered in another // flush they do not populate the existing set var /** @type {?} */ quietFns_1 = this._whenQuietFns; this._whenQuietFns = []; if (players.length) { optimizeGroupPlayer(players).onDone(function () { quietFns_1.forEach(function (fn) { return fn(); }); }); } else { quietFns_1.forEach(function (fn) { return fn(); }); } } }; /** * @param {?} errors * @return {?} */ TransitionAnimationEngine.prototype.reportError = /** * @param {?} errors * @return {?} */ function (errors) { throw new Error("Unable to process animations due to the following failed trigger transitions\n " + errors.join('\n')); }; /** * @param {?} cleanupFns * @param {?} microtaskId * @return {?} */ TransitionAnimationEngine.prototype._flushAnimations = /** * @param {?} cleanupFns * @param {?} microtaskId * @return {?} */ function (cleanupFns, microtaskId) { var _this = this; var /** @type {?} */ subTimelines = new ElementInstructionMap(); var /** @type {?} */ skippedPlayers = []; var /** @type {?} */ skippedPlayersMap = new Map(); var /** @type {?} */ queuedInstructions = []; var /** @type {?} */ queriedElements = new Map(); var /** @type {?} */ allPreStyleElements = new Map(); var /** @type {?} */ allPostStyleElements = new Map(); var /** @type {?} */ disabledElementsSet = new Set(); this.disabledNodes.forEach(function (node) { disabledElementsSet.add(node); var /** @type {?} */ nodesThatAreDisabled = _this.driver.query(node, QUEUED_SELECTOR, true); for (var /** @type {?} */ i_1 = 0; i_1 < nodesThatAreDisabled.length; i_1++) { disabledElementsSet.add(nodesThatAreDisabled[i_1]); } }); var /** @type {?} */ bodyNode = getBodyNode(); var /** @type {?} */ allTriggerElements = Array.from(this.statesByElement.keys()); var /** @type {?} */ enterNodeMap = buildRootMap(allTriggerElements, this.collectedEnterElements); // this must occur before the instructions are built below such that // the :enter queries match the elements (since the timeline queries // are fired during instruction building). var /** @type {?} */ enterNodeMapIds = new Map(); var /** @type {?} */ i = 0; enterNodeMap.forEach(function (nodes, root) { var /** @type {?} */ className = ENTER_CLASSNAME + i++; enterNodeMapIds.set(root, className); nodes.forEach(function (node) { return addClass(node, className); }); }); var /** @type {?} */ allLeaveNodes = []; var /** @type {?} */ mergedLeaveNodes = new Set(); var /** @type {?} */ leaveNodesWithoutAnimations = new Set(); for (var /** @type {?} */ i_2 = 0; i_2 < this.collectedLeaveElements.length; i_2++) { var /** @type {?} */ element = this.collectedLeaveElements[i_2]; var /** @type {?} */ details = /** @type {?} */ (element[REMOVAL_FLAG]); if (details && details.setForRemoval) { allLeaveNodes.push(element); mergedLeaveNodes.add(element); if (details.hasAnimation) { this.driver.query(element, STAR_SELECTOR, true).forEach(function (elm) { return mergedLeaveNodes.add(elm); }); } else { leaveNodesWithoutAnimations.add(element); } } } var /** @type {?} */ leaveNodeMapIds = new Map(); var /** @type {?} */ leaveNodeMap = buildRootMap(allTriggerElements, Array.from(mergedLeaveNodes)); leaveNodeMap.forEach(function (nodes, root) { var /** @type {?} */ className = LEAVE_CLASSNAME + i++; leaveNodeMapIds.set(root, className); nodes.forEach(function (node) { return addClass(node, className); }); }); cleanupFns.push(function () { enterNodeMap.forEach(function (nodes, root) { var /** @type {?} */ className = /** @type {?} */ ((enterNodeMapIds.get(root))); nodes.forEach(function (node) { return removeClass(node, className); }); }); leaveNodeMap.forEach(function (nodes, root) { var /** @type {?} */ className = /** @type {?} */ ((leaveNodeMapIds.get(root))); nodes.forEach(function (node) { return removeClass(node, className); }); }); allLeaveNodes.forEach(function (element) { _this.processLeaveNode(element); }); }); var /** @type {?} */ allPlayers = []; var /** @type {?} */ erroneousTransitions = []; for (var /** @type {?} */ i_3 = this._namespaceList.length - 1; i_3 >= 0; i_3--) { var /** @type {?} */ ns = this._namespaceList[i_3]; ns.drainQueuedTransitions(microtaskId).forEach(function (entry) { var /** @type {?} */ player = entry.player; allPlayers.push(player); var /** @type {?} */ element = entry.element; if (!bodyNode || !_this.driver.containsElement(bodyNode, element)) { player.destroy(); return; } var /** @type {?} */ leaveClassName = /** @type {?} */ ((leaveNodeMapIds.get(element))); var /** @type {?} */ enterClassName = /** @type {?} */ ((enterNodeMapIds.get(element))); var /** @type {?} */ instruction = /** @type {?} */ ((_this._buildInstruction(entry, subTimelines, enterClassName, leaveClassName))); if (instruction.errors && instruction.errors.length) { erroneousTransitions.push(instruction); return; } // if a unmatched transition is queued to go then it SHOULD NOT render // an animation and cancel the previously running animations. if (entry.isFallbackTransition) { player.onStart(function () { return eraseStyles(element, instruction.fromStyles); }); player.onDestroy(function () { return setStyles(element, instruction.toStyles); }); skippedPlayers.push(player); return; } // this means that if a parent animation uses this animation as a sub trigger // then it will instruct the timeline builder to not add a player delay, but // instead stretch the first keyframe gap up until the animation starts. The // reason this is important is to prevent extra initialization styles from being // required by the user in the animation. instruction.timelines.forEach(function (tl) { return tl.stretchStartingKeyframe = true; }); subTimelines.append(element, instruction.timelines); var /** @type {?} */ tuple = { instruction: instruction, player: player, element: element }; queuedInstructions.push(tuple); instruction.queriedElements.forEach(function (element) { return getOrSetAsInMap(queriedElements, element, []).push(player); }); instruction.preStyleProps.forEach(function (stringMap, element) { var /** @type {?} */ props = Object.keys(stringMap); if (props.length) { var /** @type {?} */ setVal_1 = /** @type {?} */ ((allPreStyleElements.get(element))); if (!setVal_1) { allPreStyleElements.set(element, setVal_1 = new Set()); } props.forEach(function (prop) { return setVal_1.add(prop); }); } }); instruction.postStyleProps.forEach(function (stringMap, element) { var /** @type {?} */ props = Object.keys(stringMap); var /** @type {?} */ setVal = /** @type {?} */ ((allPostStyleElements.get(element))); if (!setVal) { allPostStyleElements.set(element, setVal = new Set()); } props.forEach(function (prop) { return setVal.add(prop); }); }); }); } if (erroneousTransitions.length) { var /** @type {?} */ errors_1 = []; erroneousTransitions.forEach(function (instruction) { errors_1.push("@" + instruction.triggerName + " has failed due to:\n"); /** @type {?} */ ((instruction.errors)).forEach(function (error) { return errors_1.push("- " + error + "\n"); }); }); allPlayers.forEach(function (player) { return player.destroy(); }); this.reportError(errors_1); } var /** @type {?} */ allPreviousPlayersMap = new Map(); // this map works to tell which element in the DOM tree is contained by // which animation. Further down below this map will get populated once // the players are built and in doing so it can efficiently figure out // if a sub player is skipped due to a parent player having priority. var /** @type {?} */ animationElementMap = new Map(); queuedInstructions.forEach(function (entry) { var /** @type {?} */ element = entry.element; if (subTimelines.has(element)) { animationElementMap.set(element, element); _this._beforeAnimationBuild(entry.player.namespaceId, entry.instruction, allPreviousPlayersMap); } }); skippedPlayers.forEach(function (player) { var /** @type {?} */ element = player.element; var /** @type {?} */ previousPlayers = _this._getPreviousPlayers(element, false, player.namespaceId, player.triggerName, null); previousPlayers.forEach(function (prevPlayer) { getOrSetAsInMap(allPreviousPlayersMap, element, []).push(prevPlayer); prevPlayer.destroy(); }); }); // this is a special case for nodes that will be removed (either by) // having their own leave animations or by being queried in a container // that will be removed once a parent animation is complete. The idea // here is that * styles must be identical to ! styles because of // backwards compatibility (* is also filled in by default in many places). // Otherwise * styles will return an empty value or auto since the element // that is being getComputedStyle'd will not be visible (since * = destination) var /** @type {?} */ replaceNodes = allLeaveNodes.filter(function (node) { return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements); }); // POST STAGE: fill the * styles var /** @type {?} */ postStylesMap = new Map(); var /** @type {?} */ allLeaveQueriedNodes = cloakAndComputeStyles(postStylesMap, this.driver, leaveNodesWithoutAnimations, allPostStyleElements, __WEBPACK_IMPORTED_MODULE_0__angular_animations__["a" /* AUTO_STYLE */]); allLeaveQueriedNodes.forEach(function (node) { if (replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements)) { replaceNodes.push(node); } }); // PRE STAGE: fill the ! styles var /** @type {?} */ preStylesMap = new Map(); enterNodeMap.forEach(function (nodes, root) { cloakAndComputeStyles(preStylesMap, _this.driver, new Set(nodes), allPreStyleElements, __WEBPACK_IMPORTED_MODULE_0__angular_animations__["o" /* ɵPRE_STYLE */]); }); replaceNodes.forEach(function (node) { var /** @type {?} */ post = postStylesMap.get(node); var /** @type {?} */ pre = preStylesMap.get(node); postStylesMap.set(node, /** @type {?} */ (Object(__WEBPACK_IMPORTED_MODULE_1_tslib__["a" /* __assign */])({}, post, pre))); }); var /** @type {?} */ rootPlayers = []; var /** @type {?} */ subPlayers = []; var /** @type {?} */ NO_PARENT_ANIMATION_ELEMENT_DETECTED = {}; queuedInstructions.forEach(function (entry) { var element = entry.element, player = entry.player, instruction = entry.instruction; // this means that it was never consumed by a parent animation which // means that it is independent and therefore should be set for animation if (subTimelines.has(element)) { if (disabledElementsSet.has(element)) { player.onDestroy(function () { return setStyles(element, instruction.toStyles); }); skippedPlayers.push(player); return; } // this will flow up the DOM and query the map to figure out // if a parent animation has priority over it. In the situation // that a parent is detected then it will cancel the loop. If // nothing is detected, or it takes a few hops to find a parent, // then it will fill in the missing nodes and signal them as having // a detected parent (or a NO_PARENT value via a special constant). var /** @type {?} */ parentWithAnimation_1 = NO_PARENT_ANIMATION_ELEMENT_DETECTED; if (animationElementMap.size > 1) { var /** @type {?} */ elm = element; var /** @type {?} */ parentsToAdd = []; while (elm = elm.parentNode) { var /** @type {?} */ detectedParent = animationElementMap.get(elm); if (detectedParent) { parentWithAnimation_1 = detectedParent; break; } parentsToAdd.push(elm); } parentsToAdd.forEach(function (parent) { return animationElementMap.set(parent, parentWithAnimation_1); }); } var /** @type {?} */ innerPlayer = _this._buildAnimation(player.namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap); player.setRealPlayer(innerPlayer); if (parentWithAnimation_1 === NO_PARENT_ANIMATION_ELEMENT_DETECTED) { rootPlayers.push(player); } else { var /** @type {?} */ parentPlayers = _this.playersByElement.get(parentWithAnimation_1); if (parentPlayers && parentPlayers.length) { player.parentPlayer = optimizeGroupPlayer(parentPlayers); } skippedPlayers.push(player); } } else { eraseStyles(element, instruction.fromStyles); player.onDestroy(function () { return setStyles(element, instruction.toStyles); }); // there still might be a ancestor player animating this // element therefore we will still add it as a sub player // even if its animation may be disabled subPlayers.push(player); if (disabledElementsSet.has(element)) { skippedPlayers.push(player); } } }); // find all of the sub players' corresponding inner animation player subPlayers.forEach(function (player) { // even if any players are not found for a sub animation then it // will still complete itself after the next tick since it's Noop var /** @type {?} */ playersForElement = skippedPlayersMap.get(player.element); if (playersForElement && playersForElement.length) { var /** @type {?} */ innerPlayer = optimizeGroupPlayer(playersForElement); player.setRealPlayer(innerPlayer); } }); // the reason why we don't actually play the animation is // because all that a skipped player is designed to do is to // fire the start/done transition callback events skippedPlayers.forEach(function (player) { if (player.parentPlayer) { player.syncPlayerEvents(player.parentPlayer); } else { player.destroy(); } }); // run through all of the queued removals and see if they // were picked up by a query. If not then perform the removal // operation right away unless a parent animation is ongoing. for (var /** @type {?} */ i_4 = 0; i_4 < allLeaveNodes.length; i_4++) { var /** @type {?} */ element = allLeaveNodes[i_4]; var /** @type {?} */ details = /** @type {?} */ (element[REMOVAL_FLAG]); removeClass(element, LEAVE_CLASSNAME); // this means the element has a removal animation that is being // taken care of and therefore the inner elements will hang around // until that animation is over (or the parent queried animation) if (details && details.hasAnimation) continue; var /** @type {?} */ players = []; // if this element is queried or if it contains queried children // then we want for the element not to be removed from the page // until the queried animations have finished if (queriedElements.size) { var /** @type {?} */ queriedPlayerResults = queriedElements.get(element); if (queriedPlayerResults && queriedPlayerResults.length) { players.push.apply(players, queriedPlayerResults); } var /** @type {?} */ queriedInnerElements = this.driver.query(element, NG_ANIMATING_SELECTOR, true); for (var /** @type {?} */ j = 0; j < queriedInnerElements.length; j++) { var /** @type {?} */ queriedPlayers = queriedElements.get(queriedInnerElements[j]); if (queriedPlayers && queriedPlayers.length) { players.push.apply(players, queriedPlayers); } } } var /** @type {?} */ activePlayers = players.filter(function (p) { return !p.destroyed; }); if (activePlayers.length) { removeNodesAfterAnimationDone(this, element, activePlayers); } else { this.processLeaveNode(element); } } // this is required so the cleanup method doesn't remove them allLeaveNodes.length = 0; rootPlayers.forEach(function (player) { _this.players.push(player); player.onDone(function () { player.destroy(); var /** @type {?} */ index = _this.players.indexOf(player); _this.players.splice(index, 1); }); player.play(); }); return rootPlayers; }; /** * @param {?} namespaceId * @param {?} element * @return {?} */ TransitionAnimationEngine.prototype.elementContainsData = /** * @param {?} namespaceId * @param {?} element * @return {?} */ function (namespaceId, element) { var /** @type {?} */ containsData = false; var /** @type {?} */ details = /** @type {?} */ (element[REMOVAL_FLAG]); if (details && details.setForRemoval) containsData = true; if (this.playersByElement.has(element)) containsData = true; if (this.playersByQueriedElement.has(element)) containsData = true; if (this.statesByElement.has(element)) containsData = true; return this._fetchNamespace(namespaceId).elementContainsData(element) || containsData; }; /** * @param {?} callback * @return {?} */ TransitionAnimationEngine.prototype.afterFlush = /** * @param {?} callback * @return {?} */ function (callback) { this._flushFns.push(callback); }; /** * @param {?} callback * @return {?} */ TransitionAnimationEngine.prototype.afterFlushAnimationsDone = /** * @param {?} callback * @return {?} */ function (callback) { this._whenQuietFns.push(callback); }; /** * @param {?} element * @param {?} isQueriedElement * @param {?=} namespaceId * @param {?=} triggerName * @param {?=} toStateValue * @return {?} */ TransitionAnimationEngine.prototype._getPreviousPlayers = /** * @param {?} element * @param {?} isQueriedElement * @param {?=} namespaceId * @param {?=} triggerName * @param {?=} toStateValue * @return {?} */ function (element, isQueriedElement, namespaceId, triggerName, toStateValue) { var /** @type {?} */ players = []; if (isQueriedElement) { var /** @type {?} */ queriedElementPlayers = this.playersByQueriedElement.get(element); if (queriedElementPlayers) { players = queriedElementPlayers; } } else { var /** @type {?} */ elementPlayers = this.playersByElement.get(element); if (elementPlayers) { var /** @type {?} */ isRemovalAnimation_1 = !toStateValue || toStateValue == VOID_VALUE; elementPlayers.forEach(function (player) { if (player.queued) return; if (!isRemovalAnimation_1 && player.triggerName != triggerName) return; players.push(player); }); } } if (namespaceId || triggerName) { players = players.filter(function (player) { if (namespaceId && namespaceId != player.namespaceId) return false; if (triggerName && triggerName != player.triggerName) return false; return true; }); } return players; }; /** * @param {?} namespaceId * @param {?} instruction * @param {?} allPreviousPlayersMap * @return {?} */ TransitionAnimationEngine.prototype._beforeAnimationBuild = /** * @param {?} namespaceId * @param {?} instruction * @param {?} allPreviousPlayersMap * @return {?} */ function (namespaceId, instruction, allPreviousPlayersMap) { var /** @type {?} */ triggerName = instruction.triggerName; var /** @type {?} */ rootElement = instruction.element; // when a removal animation occurs, ALL previous players are collected // and destroyed (even if they are outside of the current namespace) var /** @type {?} */ targetNameSpaceId = instruction.isRemovalTransition ? undefined : namespaceId; var /** @type {?} */ targetTriggerName = instruction.isRemovalTransition ? undefined : triggerName; var _loop_1 = function (timelineInstruction) { var /** @type {?} */ element = timelineInstruction.element; var /** @type {?} */ isQueriedElement = element !== rootElement; var /** @type {?} */ players = getOrSetAsInMap(allPreviousPlayersMap, element, []); var /** @type {?} */ previousPlayers = this_1._getPreviousPlayers(element, isQueriedElement, targetNameSpaceId, targetTriggerName, instruction.toState); previousPlayers.forEach(function (player) { var /** @type {?} */ realPlayer = /** @type {?} */ (player.getRealPlayer()); if (realPlayer.beforeDestroy) { realPlayer.beforeDestroy(); } player.destroy(); players.push(player); }); }; var this_1 = this; for (var _i = 0, _a = instruction.timelines; _i < _a.length; _i++) { var timelineInstruction = _a[_i]; _loop_1(timelineInstruction); } // this needs to be done so that the PRE/POST styles can be // computed properly without interfering with the previous animation eraseStyles(rootElement, instruction.fromStyles); }; /** * @param {?} namespaceId * @param {?} instruction * @param {?} allPreviousPlayersMap * @param {?} skippedPlayersMap * @param {?} preStylesMap * @param {?} postStylesMap * @return {?} */ TransitionAnimationEngine.prototype._buildAnimation = /** * @param {?} namespaceId * @param {?} instruction * @param {?} allPreviousPlayersMap * @param {?} skippedPlayersMap * @param {?} preStylesMap * @param {?} postStylesMap * @return {?} */ function (namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap) { var _this = this; var /** @type {?} */ triggerName = instruction.triggerName; var /** @type {?} */ rootElement = instruction.element; // we first run this so that the previous animation player // data can be passed into the successive animation players var /** @type {?} */ allQueriedPlayers = []; var /** @type {?} */ allConsumedElements = new Set(); var /** @type {?} */ allSubElements = new Set(); var /** @type {?} */ allNewPlayers = instruction.timelines.map(function (timelineInstruction) { var /** @type {?} */ element = timelineInstruction.element; allConsumedElements.add(element); // FIXME (matsko): make sure to-be-removed animations are removed properly var /** @type {?} */ details = element[REMOVAL_FLAG]; if (details && details.removedBeforeQueried) return new __WEBPACK_IMPORTED_MODULE_0__angular_animations__["d" /* NoopAnimationPlayer */](); var /** @type {?} */ isQueriedElement = element !== rootElement; var /** @type {?} */ previousPlayers = flattenGroupPlayers((allPreviousPlayersMap.get(element) || EMPTY_PLAYER_ARRAY) .map(function (p) { return p.getRealPlayer(); })) .filter(function (p) { // the `element` is not apart of the AnimationPlayer definition, but // Mock/WebAnimations // use the element within their implementation. This will be added in Angular5 to // AnimationPlayer var /** @type {?} */ pp = /** @type {?} */ (p); return pp.element ? pp.element === element : false; }); var /** @type {?} */ preStyles = preStylesMap.get(element); var /** @type {?} */ postStyles = postStylesMap.get(element); var /** @type {?} */ keyframes = normalizeKeyframes(_this.driver, _this._normalizer, element, timelineInstruction.keyframes, preStyles, postStyles); var /** @type {?} */ player = _this._buildPlayer(timelineInstruction, keyframes, previousPlayers); // this means that this particular player belongs to a sub trigger. It is // important that we match this player up with the corresponding (@trigger.listener) if (timelineInstruction.subTimeline && skippedPlayersMap) { allSubElements.add(element); } if (isQueriedElement) { var /** @type {?} */ wrappedPlayer = new TransitionAnimationPlayer(namespaceId, triggerName, element); wrappedPlayer.setRealPlayer(player); allQueriedPlayers.push(wrappedPlayer); } return player; }); allQueriedPlayers.forEach(function (player) { getOrSetAsInMap(_this.playersByQueriedElement, player.element, []).push(player); player.onDone(function () { return deleteOrUnsetInMap(_this.playersByQueriedElement, player.element, player); }); }); allConsumedElements.forEach(function (element) { return addClass(element, NG_ANIMATING_CLASSNAME); }); var /** @type {?} */ player = optimizeGroupPlayer(allNewPlayers); player.onDestroy(function () { allConsumedElements.forEach(function (element) { return removeClass(element, NG_ANIMATING_CLASSNAME); }); setStyles(rootElement, instruction.toStyles); }); // this basically makes all of the callbacks for sub element animations // be dependent on the upper players for when they finish allSubElements.forEach(function (element) { getOrSetAsInMap(skippedPlayersMap, element, []).push(player); }); return player; }; /** * @param {?} instruction * @param {?} keyframes * @param {?} previousPlayers * @return {?} */ TransitionAnimationEngine.prototype._buildPlayer = /** * @param {?} instruction * @param {?} keyframes * @param {?} previousPlayers * @return {?} */ function (instruction, keyframes, previousPlayers) { if (keyframes.length > 0) { return this.driver.animate(instruction.element, keyframes, instruction.duration, instruction.delay, instruction.easing, previousPlayers); } // special case for when an empty transition|definition is provided // ... there is no point in rendering an empty animation return new __WEBPACK_IMPORTED_MODULE_0__angular_animations__["d" /* NoopAnimationPlayer */](); }; return TransitionAnimationEngine; }()); var TransitionAnimationPlayer = /** @class */ (function () { function TransitionAnimationPlayer(namespaceId, triggerName, element) { this.namespaceId = namespaceId; this.triggerName = triggerName; this.element = element; this._player = new __WEBPACK_IMPORTED_MODULE_0__angular_animations__["d" /* NoopAnimationPlayer */](); this._containsRealPlayer = false; this._queuedCallbacks = {}; this.destroyed = false; this.markedForDestroy = false; this.queued = true; } /** * @param {?} player * @return {?} */ TransitionAnimationPlayer.prototype.setRealPlayer = /** * @param {?} player * @return {?} */ function (player) { var _this = this; if (this._containsRealPlayer) return; this._player = player; Object.keys(this._queuedCallbacks).forEach(function (phase) { _this._queuedCallbacks[phase].forEach(function (callback) { return listenOnPlayer(player, phase, undefined, callback); }); }); this._queuedCallbacks = {}; this._containsRealPlayer = true; (/** @type {?} */ (this)).queued = false; }; /** * @return {?} */ TransitionAnimationPlayer.prototype.getRealPlayer = /** * @return {?} */ function () { return this._player; }; /** * @param {?} player * @return {?} */ TransitionAnimationPlayer.prototype.syncPlayerEvents = /** * @param {?} player * @return {?} */ function (player) { var _this = this; var /** @type {?} */ p = /** @type {?} */ (this._player); if (p.triggerCallback) { player.onStart(function () { return p.triggerCallback('start'); }); } player.onDone(function () { return _this.finish(); }); player.onDestroy(function () { return _this.destroy(); }); }; /** * @param {?} name * @param {?} callback * @return {?} */ TransitionAnimationPlayer.prototype._queueEvent = /** * @param {?} name * @param {?} callback * @return {?} */ function (name, callback) { getOrSetAsInMap(this._queuedCallbacks, name, []).push(callback); }; /** * @param {?} fn * @return {?} */ TransitionAnimationPlayer.prototype.onDone = /** * @param {?} fn * @return {?} */ function (fn) { if (this.queued) { this._queueEvent('done', fn); } this._player.onDone(fn); }; /** * @param {?} fn * @return {?} */ TransitionAnimationPlayer.prototype.onStart = /** * @param {?} fn * @return {?} */ function (fn) { if (this.queued) { this._queueEvent('start', fn); } this._player.onStart(fn); }; /** * @param {?} fn * @return {?} */ TransitionAnimationPlayer.prototype.onDestroy = /** * @param {?} fn * @return {?} */ function (fn) { if (this.queued) { this._queueEvent('destroy', fn); } this._player.onDestroy(fn); }; /** * @return {?} */ TransitionAnimationPlayer.prototype.init = /** * @return {?} */ function () { this._player.init(); }; /** * @return {?} */ TransitionAnimationPlayer.prototype.hasStarted = /** * @return {?} */ function () { return this.queued ? false : this._player.hasStarted(); }; /** * @return {?} */ TransitionAnimationPlayer.prototype.play = /** * @return {?} */ function () { !this.queued && this._player.play(); }; /** * @return {?} */ TransitionAnimationPlayer.prototype.pause = /** * @return {?} */ function () { !this.queued && this._player.pause(); }; /** * @return {?} */ TransitionAnimationPlayer.prototype.restart = /** * @return {?} */ function () { !this.queued && this._player.restart(); }; /** * @return {?} */ TransitionAnimationPlayer.prototype.finish = /** * @return {?} */ function () { this._player.finish(); }; /** * @return {?} */ TransitionAnimationPlayer.prototype.destroy = /** * @return {?} */ function () { (/** @type {?} */ (this)).destroyed = true; this._player.destroy(); }; /** * @return {?} */ TransitionAnimationPlayer.prototype.reset = /** * @return {?} */ function () { !this.queued && this._player.reset(); }; /** * @param {?} p * @return {?} */ TransitionAnimationPlayer.prototype.setPosition = /** * @param {?} p * @return {?} */ function (p) { if (!this.queued) { this._player.setPosition(p); } }; /** * @return {?} */ TransitionAnimationPlayer.prototype.getPosition = /** * @return {?} */ function () { return this.queued ? 0 : this._player.getPosition(); }; Object.defineProperty(TransitionAnimationPlayer.prototype, "totalTime", { get: /** * @return {?} */ function () { return this._player.totalTime; }, enumerable: true, configurable: true }); /* @internal */ /** * @param {?} phaseName * @return {?} */ TransitionAnimationPlayer.prototype.triggerCallback = /** * @param {?} phaseName * @return {?} */ function (phaseName) { var /** @type {?} */ p = /** @type {?} */ (this._player); if (p.triggerCallback) { p.triggerCallback(phaseName); } }; return TransitionAnimationPlayer; }()); /** * @param {?} map * @param {?} key * @param {?} value * @return {?} */ function deleteOrUnsetInMap(map, key, value) { var /** @type {?} */ currentValues; if (map instanceof Map) { currentValues = map.get(key); if (currentValues) { if (currentValues.length) { var /** @type {?} */ index = currentValues.indexOf(value); currentValues.splice(index, 1); } if (currentValues.length == 0) { map.delete(key); } } } else { currentValues = map[key]; if (currentValues) { if (currentValues.length) { var /** @type {?} */ index = currentValues.indexOf(value); currentValues.splice(index, 1); } if (currentValues.length == 0) { delete map[key]; } } } return currentValues; } /** * @param {?} value * @return {?} */ function normalizeTriggerValue(value) { // we use `!= null` here because it's the most simple // way to test against a "falsy" value without mixing // in empty strings or a zero value. DO NOT OPTIMIZE. return value != null ? value : null; } /** * @param {?} node * @return {?} */ function isElementNode(node) { return node && node['nodeType'] === 1; } /** * @param {?} eventName * @return {?} */ function isTriggerEventValid(eventName) { return eventName == 'start' || eventName == 'done'; } /** * @param {?} element * @param {?=} value * @return {?} */ function cloakElement(element, value) { var /** @type {?} */ oldValue = element.style.display; element.style.display = value != null ? value : 'none'; return oldValue; } /** * @param {?} valuesMap * @param {?} driver * @param {?} elements * @param {?} elementPropsMap * @param {?} defaultStyle * @return {?} */ function cloakAndComputeStyles(valuesMap, driver, elements, elementPropsMap, defaultStyle) { var /** @type {?} */ cloakVals = []; elements.forEach(function (element) { return cloakVals.push(cloakElement(element)); }); var /** @type {?} */ failedElements = []; elementPropsMap.forEach(function (props, element) { var /** @type {?} */ styles = {}; props.forEach(function (prop) { var /** @type {?} */ value = styles[prop] = driver.computeStyle(element, prop, defaultStyle); // there is no easy way to detect this because a sub element could be removed // by a parent animation element being detached. if (!value || value.length == 0) { element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE; failedElements.push(element); } }); valuesMap.set(element, styles); }); // we use a index variable here since Set.forEach(a, i) does not return // an index value for the closure (but instead just the value) var /** @type {?} */ i = 0; elements.forEach(function (element) { return cloakElement(element, cloakVals[i++]); }); return failedElements; } /** * @param {?} roots * @param {?} nodes * @return {?} */ function buildRootMap(roots, nodes) { var /** @type {?} */ rootMap = new Map(); roots.forEach(function (root) { return rootMap.set(root, []); }); if (nodes.length == 0) return rootMap; var /** @type {?} */ NULL_NODE = 1; var /** @type {?} */ nodeSet = new Set(nodes); var /** @type {?} */ localRootMap = new Map(); /** * @param {?} node * @return {?} */ function getRoot(node) { if (!node) return NULL_NODE; var /** @type {?} */ root = localRootMap.get(node); if (root) return root; var /** @type {?} */ parent = node.parentNode; if (rootMap.has(parent)) { // ngIf inside @trigger root = parent; } else if (nodeSet.has(parent)) { // ngIf inside ngIf root = NULL_NODE; } else { // recurse upwards root = getRoot(parent); } localRootMap.set(node, root); return root; } nodes.forEach(function (node) { var /** @type {?} */ root = getRoot(node); if (root !== NULL_NODE) { /** @type {?} */ ((rootMap.get(root))).push(node); } }); return rootMap; } var CLASSES_CACHE_KEY = '$$classes'; /** * @param {?} element * @param {?} className * @return {?} */ function addClass(element, className) { if (element.classList) { element.classList.add(className); } else { var /** @type {?} */ classes = element[CLASSES_CACHE_KEY]; if (!classes) { classes = element[CLASSES_CACHE_KEY] = {}; } classes[className] = true; } } /** * @param {?} element * @param {?} className * @return {?} */ function removeClass(element, className) { if (element.classList) { element.classList.remove(className); } else { var /** @type {?} */ classes = element[CLASSES_CACHE_KEY]; if (classes) { delete classes[className]; } } } /** * @param {?} engine * @param {?} element * @param {?} players * @return {?} */ function removeNodesAfterAnimationDone(engine, element, players) { optimizeGroupPlayer(players).onDone(function () { return engine.processLeaveNode(element); }); } /** * @param {?} players * @return {?} */ function flattenGroupPlayers(players) { var /** @type {?} */ finalPlayers = []; _flattenGroupPlayersRecur(players, finalPlayers); return finalPlayers; } /** * @param {?} players * @param {?} finalPlayers * @return {?} */ function _flattenGroupPlayersRecur(players, finalPlayers) { for (var /** @type {?} */ i = 0; i < players.length; i++) { var /** @type {?} */ player = players[i]; if (player instanceof __WEBPACK_IMPORTED_MODULE_0__angular_animations__["n" /* ɵAnimationGroupPlayer */]) { _flattenGroupPlayersRecur(player.players, finalPlayers); } else { finalPlayers.push(/** @type {?} */ (player)); } } } /** * @param {?} a * @param {?} b * @return {?} */ function objEquals(a, b) { var /** @type {?} */ k1 = Object.keys(a); var /** @type {?} */ k2 = Object.keys(b); if (k1.length != k2.length) return false; for (var /** @type {?} */ i = 0; i < k1.length; i++) { var /** @type {?} */ prop = k1[i]; if (!b.hasOwnProperty(prop) || a[prop] !== b[prop]) return false; } return true; } /** * @param {?} element * @param {?} allPreStyleElements * @param {?} allPostStyleElements * @return {?} */ function replacePostStylesAsPre(element, allPreStyleElements, allPostStyleElements) { var /** @type {?} */ postEntry = allPostStyleElements.get(element); if (!postEntry) return false; var /** @type {?} */ preEntry = allPreStyleElements.get(element); if (preEntry) { postEntry.forEach(function (data) { return ((preEntry)).add(data); }); } else { allPreStyleElements.set(element, postEntry); } allPostStyleElements.delete(element); return true; } /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var AnimationEngine = /** @class */ (function () { function AnimationEngine(_driver, normalizer) { var _this = this; this._driver = _driver; this._triggerCache = {}; this.onRemovalComplete = function (element, context) { }; this._transitionEngine = new TransitionAnimationEngine(_driver, normalizer); this._timelineEngine = new TimelineAnimationEngine(_driver, normalizer); this._transitionEngine.onRemovalComplete = function (element, context) { return _this.onRemovalComplete(element, context); }; } /** * @param {?} componentId * @param {?} namespaceId * @param {?} hostElement * @param {?} name * @param {?} metadata * @return {?} */ AnimationEngine.prototype.registerTrigger = /** * @param {?} componentId * @param {?} namespaceId * @param {?} hostElement * @param {?} name * @param {?} metadata * @return {?} */ function (componentId, namespaceId, hostElement, name, metadata) { var /** @type {?} */ cacheKey = componentId + '-' + name; var /** @type {?} */ trigger = this._triggerCache[cacheKey]; if (!trigger) { var /** @type {?} */ errors = []; var /** @type {?} */ ast = /** @type {?} */ (buildAnimationAst(this._driver, /** @type {?} */ (metadata), errors)); if (errors.length) { throw new Error("The animation trigger \"" + name + "\" has failed to build due to the following errors:\n - " + errors.join("\n - ")); } trigger = buildTrigger(name, ast); this._triggerCache[cacheKey] = trigger; } this._transitionEngine.registerTrigger(namespaceId, name, trigger); }; /** * @param {?} namespaceId * @param {?} hostElement * @return {?} */ AnimationEngine.prototype.register = /** * @param {?} namespaceId * @param {?} hostElement * @return {?} */ function (namespaceId, hostElement) { this._transitionEngine.register(namespaceId, hostElement); }; /** * @param {?} namespaceId * @param {?} context * @return {?} */ AnimationEngine.prototype.destroy = /** * @param {?} namespaceId * @param {?} context * @return {?} */ function (namespaceId, context) { this._transitionEngine.destroy(namespaceId, context); }; /** * @param {?} namespaceId * @param {?} element * @param {?} parent * @param {?} insertBefore * @return {?} */ AnimationEngine.prototype.onInsert = /** * @param {?} namespaceId * @param {?} element * @param {?} parent * @param {?} insertBefore * @return {?} */ function (namespaceId, element, parent, insertBefore) { this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore); }; /** * @param {?} namespaceId * @param {?} element * @param {?} context * @return {?} */ AnimationEngine.prototype.onRemove = /** * @param {?} namespaceId * @param {?} element * @param {?} context * @return {?} */ function (namespaceId, element, context) { this._transitionEngine.removeNode(namespaceId, element, context); }; /** * @param {?} element * @param {?} disable * @return {?} */ AnimationEngine.prototype.disableAnimations = /** * @param {?} element * @param {?} disable * @return {?} */ function (element, disable) { this._transitionEngine.markElementAsDisabled(element, disable); }; /** * @param {?} namespaceId * @param {?} element * @param {?} property * @param {?} value * @return {?} */ AnimationEngine.prototype.process = /** * @param {?} namespaceId * @param {?} element * @param {?} property * @param {?} value * @return {?} */ function (namespaceId, element, property, value) { if (property.charAt(0) == '@') { var _a = parseTimelineCommand(property), id = _a[0], action = _a[1]; var /** @type {?} */ args = /** @type {?} */ (value); this._timelineEngine.command(id, element, action, args); } else { this._transitionEngine.trigger(namespaceId, element, property, value); } }; /** * @param {?} namespaceId * @param {?} element * @param {?} eventName * @param {?} eventPhase * @param {?} callback * @return {?} */ AnimationEngine.prototype.listen = /** * @param {?} namespaceId * @param {?} element * @param {?} eventName * @param {?} eventPhase * @param {?} callback * @return {?} */ function (namespaceId, element, eventName, eventPhase, callback) { // @@listen if (eventName.charAt(0) == '@') { var _a = parseTimelineCommand(eventName), id = _a[0], action = _a[1]; return this._timelineEngine.listen(id, element, action, callback); } return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback); }; /** * @param {?=} microtaskId * @return {?} */ AnimationEngine.prototype.flush = /** * @param {?=} microtaskId * @return {?} */ function (microtaskId) { if (microtaskId === void 0) { microtaskId = -1; } this._transitionEngine.flush(microtaskId); }; Object.defineProperty(AnimationEngine.prototype, "players", { get: /** * @return {?} */ function () { return (/** @type {?} */ (this._transitionEngine.players)) .concat(/** @type {?} */ (this._timelineEngine.players)); }, enumerable: true, configurable: true }); /** * @return {?} */ AnimationEngine.prototype.whenRenderingDone = /** * @return {?} */ function () { return this._transitionEngine.whenRenderingDone(); }; return AnimationEngine; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var WebAnimationsPlayer = /** @class */ (function () { function WebAnimationsPlayer(element, keyframes, options, previousPlayers) { if (previousPlayers === void 0) { previousPlayers = []; } var _this = this; this.element = element; this.keyframes = keyframes; this.options = options; this.previousPlayers = previousPlayers; this._onDoneFns = []; this._onStartFns = []; this._onDestroyFns = []; this._initialized = false; this._finished = false; this._started = false; this._destroyed = false; this.time = 0; this.parentPlayer = null; this.previousStyles = {}; this.currentSnapshot = {}; this._duration = /** @type {?} */ (options['duration']); this._delay = /** @type {?} */ (options['delay']) || 0; this.time = this._duration + this._delay; if (allowPreviousPlayerStylesMerge(this._duration, this._delay)) { previousPlayers.forEach(function (player) { var /** @type {?} */ styles = player.currentSnapshot; Object.keys(styles).forEach(function (prop) { return _this.previousStyles[prop] = styles[prop]; }); }); } } /** * @return {?} */ WebAnimationsPlayer.prototype._onFinish = /** * @return {?} */ function () { if (!this._finished) { this._finished = true; this._onDoneFns.forEach(function (fn) { return fn(); }); this._onDoneFns = []; } }; /** * @return {?} */ WebAnimationsPlayer.prototype.init = /** * @return {?} */ function () { this._buildPlayer(); this._preparePlayerBeforeStart(); }; /** * @return {?} */ WebAnimationsPlayer.prototype._buildPlayer = /** * @return {?} */ function () { var _this = this; if (this._initialized) return; this._initialized = true; var /** @type {?} */ keyframes = this.keyframes.map(function (styles) { return copyStyles(styles, false); }); var /** @type {?} */ previousStyleProps = Object.keys(this.previousStyles); if (previousStyleProps.length && keyframes.length) { var /** @type {?} */ startingKeyframe_1 = keyframes[0]; var /** @type {?} */ missingStyleProps_1 = []; previousStyleProps.forEach(function (prop) { if (!startingKeyframe_1.hasOwnProperty(prop)) { missingStyleProps_1.push(prop); } startingKeyframe_1[prop] = _this.previousStyles[prop]; }); if (missingStyleProps_1.length) { var /** @type {?} */ self_1 = this; var _loop_1 = function () { var /** @type {?} */ kf = keyframes[i]; missingStyleProps_1.forEach(function (prop) { kf[prop] = _computeStyle(self_1.element, prop); }); }; // tslint:disable-next-line for (var /** @type {?} */ i = 1; i < keyframes.length; i++) { _loop_1(); } } } (/** @type {?} */ (this)).domPlayer = this._triggerWebAnimation(this.element, keyframes, this.options); this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : {}; this.domPlayer.addEventListener('finish', function () { return _this._onFinish(); }); }; /** * @return {?} */ WebAnimationsPlayer.prototype._preparePlayerBeforeStart = /** * @return {?} */ function () { // this is required so that the player doesn't start to animate right away if (this._delay) { this._resetDomPlayerState(); } else { this.domPlayer.pause(); } }; /** @internal */ /** * \@internal * @param {?} element * @param {?} keyframes * @param {?} options * @return {?} */ WebAnimationsPlayer.prototype._triggerWebAnimation = /** * \@internal * @param {?} element * @param {?} keyframes * @param {?} options * @return {?} */ function (element, keyframes, options) { // jscompiler doesn't seem to know animate is a native property because it's not fully // supported yet across common browsers (we polyfill it for Edge/Safari) [CL #143630929] return /** @type {?} */ (element['animate'](keyframes, options)); }; /** * @param {?} fn * @return {?} */ WebAnimationsPlayer.prototype.onStart = /** * @param {?} fn * @return {?} */ function (fn) { this._onStartFns.push(fn); }; /** * @param {?} fn * @return {?} */ WebAnimationsPlayer.prototype.onDone = /** * @param {?} fn * @return {?} */ function (fn) { this._onDoneFns.push(fn); }; /** * @param {?} fn * @return {?} */ WebAnimationsPlayer.prototype.onDestroy = /** * @param {?} fn * @return {?} */ function (fn) { this._onDestroyFns.push(fn); }; /** * @return {?} */ WebAnimationsPlayer.prototype.play = /** * @return {?} */ function () { this._buildPlayer(); if (!this.hasStarted()) { this._onStartFns.forEach(function (fn) { return fn(); }); this._onStartFns = []; this._started = true; } this.domPlayer.play(); }; /** * @return {?} */ WebAnimationsPlayer.prototype.pause = /** * @return {?} */ function () { this.init(); this.domPlayer.pause(); }; /** * @return {?} */ WebAnimationsPlayer.prototype.finish = /** * @return {?} */ function () { this.init(); this._onFinish(); this.domPlayer.finish(); }; /** * @return {?} */ WebAnimationsPlayer.prototype.reset = /** * @return {?} */ function () { this._resetDomPlayerState(); this._destroyed = false; this._finished = false; this._started = false; }; /** * @return {?} */ WebAnimationsPlayer.prototype._resetDomPlayerState = /** * @return {?} */ function () { if (this.domPlayer) { this.domPlayer.cancel(); } }; /** * @return {?} */ WebAnimationsPlayer.prototype.restart = /** * @return {?} */ function () { this.reset(); this.play(); }; /** * @return {?} */ WebAnimationsPlayer.prototype.hasStarted = /** * @return {?} */ function () { return this._started; }; /** * @return {?} */ WebAnimationsPlayer.prototype.destroy = /** * @return {?} */ function () { if (!this._destroyed) { this._destroyed = true; this._resetDomPlayerState(); this._onFinish(); this._onDestroyFns.forEach(function (fn) { return fn(); }); this._onDestroyFns = []; } }; /** * @param {?} p * @return {?} */ WebAnimationsPlayer.prototype.setPosition = /** * @param {?} p * @return {?} */ function (p) { this.domPlayer.currentTime = p * this.time; }; /** * @return {?} */ WebAnimationsPlayer.prototype.getPosition = /** * @return {?} */ function () { return this.domPlayer.currentTime / this.time; }; Object.defineProperty(WebAnimationsPlayer.prototype, "totalTime", { get: /** * @return {?} */ function () { return this._delay + this._duration; }, enumerable: true, configurable: true }); /** * @return {?} */ WebAnimationsPlayer.prototype.beforeDestroy = /** * @return {?} */ function () { var _this = this; var /** @type {?} */ styles = {}; if (this.hasStarted()) { Object.keys(this._finalKeyframe).forEach(function (prop) { if (prop != 'offset') { styles[prop] = _this._finished ? _this._finalKeyframe[prop] : _computeStyle(_this.element, prop); } }); } this.currentSnapshot = styles; }; /* @internal */ /** * @param {?} phaseName * @return {?} */ WebAnimationsPlayer.prototype.triggerCallback = /** * @param {?} phaseName * @return {?} */ function (phaseName) { var /** @type {?} */ methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns; methods.forEach(function (fn) { return fn(); }); methods.length = 0; }; return WebAnimationsPlayer; }()); /** * @param {?} element * @param {?} prop * @return {?} */ function _computeStyle(element, prop) { return (/** @type {?} */ (window.getComputedStyle(element)))[prop]; } /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var WebAnimationsDriver = /** @class */ (function () { function WebAnimationsDriver() { } /** * @param {?} prop * @return {?} */ WebAnimationsDriver.prototype.validateStyleProperty = /** * @param {?} prop * @return {?} */ function (prop) { return validateStyleProperty(prop); }; /** * @param {?} element * @param {?} selector * @return {?} */ WebAnimationsDriver.prototype.matchesElement = /** * @param {?} element * @param {?} selector * @return {?} */ function (element, selector) { return matchesElement(element, selector); }; /** * @param {?} elm1 * @param {?} elm2 * @return {?} */ WebAnimationsDriver.prototype.containsElement = /** * @param {?} elm1 * @param {?} elm2 * @return {?} */ function (elm1, elm2) { return containsElement(elm1, elm2); }; /** * @param {?} element * @param {?} selector * @param {?} multi * @return {?} */ WebAnimationsDriver.prototype.query = /** * @param {?} element * @param {?} selector * @param {?} multi * @return {?} */ function (element, selector, multi) { return invokeQuery(element, selector, multi); }; /** * @param {?} element * @param {?} prop * @param {?=} defaultValue * @return {?} */ WebAnimationsDriver.prototype.computeStyle = /** * @param {?} element * @param {?} prop * @param {?=} defaultValue * @return {?} */ function (element, prop, defaultValue) { return /** @type {?} */ ((/** @type {?} */ (window.getComputedStyle(element)))[prop]); }; /** * @param {?} element * @param {?} keyframes * @param {?} duration * @param {?} delay * @param {?} easing * @param {?=} previousPlayers * @return {?} */ WebAnimationsDriver.prototype.animate = /** * @param {?} element * @param {?} keyframes * @param {?} duration * @param {?} delay * @param {?} easing * @param {?=} previousPlayers * @return {?} */ function (element, keyframes, duration, delay, easing, previousPlayers) { if (previousPlayers === void 0) { previousPlayers = []; } var /** @type {?} */ fill = delay == 0 ? 'both' : 'forwards'; var /** @type {?} */ playerOptions = { duration: duration, delay: delay, fill: fill }; // we check for this to avoid having a null|undefined value be present // for the easing (which results in an error for certain browsers #9752) if (easing) { playerOptions['easing'] = easing; } var /** @type {?} */ previousWebAnimationPlayers = /** @type {?} */ (previousPlayers.filter(function (player) { return player instanceof WebAnimationsPlayer; })); return new WebAnimationsPlayer(element, keyframes, playerOptions, previousWebAnimationPlayers); }; return WebAnimationsDriver; }()); /** * @return {?} */ function supportsWebAnimations() { return typeof Element !== 'undefined' && typeof (/** @type {?} */ (Element)).prototype['animate'] === 'function'; } /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @module * @description * Entry point for all public APIs of this package. */ /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * Generated bundle index. Do not edit. */ //# sourceMappingURL=browser.js.map /***/ }), /***/ "../../../cdk/esm5/a11y.es5.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export FocusTrapDirective */ /* unused harmony export MESSAGES_CONTAINER_ID */ /* unused harmony export CDK_DESCRIBEDBY_ID_PREFIX */ /* unused harmony export CDK_DESCRIBEDBY_HOST_ATTRIBUTE */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return AriaDescriber; }); /* unused harmony export ARIA_DESCRIBER_PROVIDER_FACTORY */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ARIA_DESCRIBER_PROVIDER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ActiveDescendantKeyManager; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return FocusKeyManager; }); /* unused harmony export ListKeyManager */ /* unused harmony export FocusTrap */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return FocusTrapFactory; }); /* unused harmony export FocusTrapDeprecatedDirective */ /* unused harmony export CdkTrapFocus */ /* unused harmony export InteractivityChecker */ /* unused harmony export LIVE_ANNOUNCER_ELEMENT_TOKEN */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return LiveAnnouncer; }); /* unused harmony export LIVE_ANNOUNCER_PROVIDER_FACTORY */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return LIVE_ANNOUNCER_PROVIDER; }); /* unused harmony export TOUCH_BUFFER_MS */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return FocusMonitor; }); /* unused harmony export CdkMonitorFocus */ /* unused harmony export FOCUS_MONITOR_PROVIDER_FACTORY */ /* unused harmony export FOCUS_MONITOR_PROVIDER */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return isFakeMousedownFromScreenReader; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return A11yModule; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_cdk_coercion__ = __webpack_require__("../../../cdk/esm5/coercion.es5.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rxjs_operators_take__ = __webpack_require__("../../../../rxjs/_esm5/operators/take.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__angular_cdk_platform__ = __webpack_require__("../../../cdk/esm5/platform.es5.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_tslib__ = __webpack_require__("../../../../tslib/tslib.es6.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_rxjs_Subject__ = __webpack_require__("../../../../rxjs/_esm5/Subject.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_rxjs_Subscription__ = __webpack_require__("../../../../rxjs/_esm5/Subscription.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__angular_cdk_keycodes__ = __webpack_require__("../../../cdk/esm5/keycodes.es5.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_rxjs_operators_debounceTime__ = __webpack_require__("../../../../rxjs/_esm5/operators/debounceTime.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_rxjs_operators_filter__ = __webpack_require__("../../../../rxjs/_esm5/operators/filter.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_rxjs_operators_map__ = __webpack_require__("../../../../rxjs/_esm5/operators/map.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_rxjs_operators_tap__ = __webpack_require__("../../../../rxjs/_esm5/operators/tap.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_rxjs_observable_of__ = __webpack_require__("../../../../rxjs/_esm5/observable/of.js"); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * Utility for checking the interactivity of an element, such as whether is is focusable or * tabbable. */ var InteractivityChecker = /** @class */ (function () { function InteractivityChecker(_platform) { this._platform = _platform; } /** * Gets whether an element is disabled. * * @param element Element to be checked. * @returns Whether the element is disabled. */ /** * Gets whether an element is disabled. * * @param {?} element Element to be checked. * @return {?} Whether the element is disabled. */ InteractivityChecker.prototype.isDisabled = /** * Gets whether an element is disabled. * * @param {?} element Element to be checked. * @return {?} Whether the element is disabled. */ function (element) { // This does not capture some cases, such as a non-form control with a disabled attribute or // a form control inside of a disabled form, but should capture the most common cases. return element.hasAttribute('disabled'); }; /** * Gets whether an element is visible for the purposes of interactivity. * * This will capture states like `display: none` and `visibility: hidden`, but not things like * being clipped by an `overflow: hidden` parent or being outside the viewport. * * @returns Whether the element is visible. */ /** * Gets whether an element is visible for the purposes of interactivity. * * This will capture states like `display: none` and `visibility: hidden`, but not things like * being clipped by an `overflow: hidden` parent or being outside the viewport. * * @param {?} element * @return {?} Whether the element is visible. */ InteractivityChecker.prototype.isVisible = /** * Gets whether an element is visible for the purposes of interactivity. * * This will capture states like `display: none` and `visibility: hidden`, but not things like * being clipped by an `overflow: hidden` parent or being outside the viewport. * * @param {?} element * @return {?} Whether the element is visible. */ function (element) { return hasGeometry(element) && getComputedStyle(element).visibility === 'visible'; }; /** * Gets whether an element can be reached via Tab key. * Assumes that the element has already been checked with isFocusable. * * @param element Element to be checked. * @returns Whether the element is tabbable. */ /** * Gets whether an element can be reached via Tab key. * Assumes that the element has already been checked with isFocusable. * * @param {?} element Element to be checked. * @return {?} Whether the element is tabbable. */ InteractivityChecker.prototype.isTabbable = /** * Gets whether an element can be reached via Tab key. * Assumes that the element has already been checked with isFocusable. * * @param {?} element Element to be checked. * @return {?} Whether the element is tabbable. */ function (element) { // Nothing is tabbable on the the server 😎 if (!this._platform.isBrowser) { return false; } var /** @type {?} */ frameElement = getFrameElement(getWindow(element)); if (frameElement) { var /** @type {?} */ frameType = frameElement && frameElement.nodeName.toLowerCase(); // Frame elements inherit their tabindex onto all child elements. if (getTabIndexValue(frameElement) === -1) { return false; } // Webkit and Blink consider anything inside of an element as non-tabbable. if ((this._platform.BLINK || this._platform.WEBKIT) && frameType === 'object') { return false; } // Webkit and Blink disable tabbing to an element inside of an invisible frame. if ((this._platform.BLINK || this._platform.WEBKIT) && !this.isVisible(frameElement)) { return false; } } var /** @type {?} */ nodeName = element.nodeName.toLowerCase(); var /** @type {?} */ tabIndexValue = getTabIndexValue(element); if (element.hasAttribute('contenteditable')) { return tabIndexValue !== -1; } if (nodeName === 'iframe') { // The frames may be tabbable depending on content, but it's not possibly to reliably // investigate the content of the frames. return false; } if (nodeName === 'audio') { if (!element.hasAttribute('controls')) { // By default an