(function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("rxjs",["exports"],t):t(n.rxjs={})})(this,function(n){function s(n,t){function i(){this.constructor=n}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ku(n,t);n.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}function yf(n,t){var u={},i,r;for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&0>t.indexOf(i)&&(u[i]=n[i]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols)for(r=0,i=Object.getOwnPropertySymbols(n);rt.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(n,i[r])&&(u[i[r]]=n[i[r]]);return u}function al(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})}function ar(n,t){function f(n){return function(t){return s([n,t])}}function s(f){if(e)throw new TypeError("Generator is already executing.");for(;r;)try{if(e=1,u&&(i=f[0]&2?u["return"]:f[0]?u["throw"]||((i=u["return"])&&i.call(u),0):u.next)&&!(i=i.call(u,f[1])).done)return i;(u=0,i)&&(f=[f[0]&2,i.value]);switch(f[0]){case 0:case 1:i=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++;u=f[1];f=[0];continue;case 7:f=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=0i[0]&&f[1]=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.");}function e(n,t){var i="function"==typeof Symbol&&n[Symbol.iterator],r,u,f;if(!i)return n;n=i.call(n);u=[];try{for(;(void 0===t||0=n._refCount||0<--n._refCount)r=null;else{var t=n._connection,u=r;r=null;!t||u&&t!==u||t.unsubscribe();i.unsubscribe()}});n.subscribe(u);u.closed||(r=n.connect())})}function gf(n){var t=ft.schedule;return new u(function(i){var r=new l,u=n||cr,e=u.now(),f=function(o){var s=u.now();i.next({timestamp:n?s:o,elapsed:s-e});i.closed||r.add(t(f))};return r.add(t(f)),r})}function ne(n){return n in tf?(delete tf[n],!0):!1}function wl(n){return new u(function(t){return n.schedule(function(){return t.complete()})})}function ki(n){return n&&r(n.schedule)}function ti(n){if(r(n[n.length-1]))return n.pop()}function it(n){if(ki(n[n.length-1]))return n.pop()}function te(n){return Symbol.asyncIterator&&r(null===n||void 0===n?void 0:n[Symbol.asyncIterator])}function ie(n){return new TypeError("You provided "+(null!==n&&"object"==typeof n?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function re(n){return r(null===n||void 0===n?void 0:n[ef])}function ue(n){return vl(this,arguments,function(){var t,i,r,u;return ar(this,function(f){switch(f.label){case 0:t=n.getReader();f.label=1;case 1:f.trys.push([1,,9,10]);f.label=2;case 2:return[4,vt(t.read())];case 3:return i=f.sent(),r=i.value,(u=i.done)?[4,vt(void 0)]:[3,5];case 4:return[2,f.sent()];case 5:return[4,vt(r)];case 6:return[4,f.sent()];case 7:return f.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function f(n){if(n instanceof u)return n;if(null!=n){if(r(n[li]))return bl(n);if(ff(n))return kl(n);if(r(null===n||void 0===n?void 0:n.then))return dl(n);if(te(n))return fe(n);if(re(n))return gl(n);if(r(null===n||void 0===n?void 0:n.getReader))return fe(ue(n))}throw ie(n);}function bl(n){return new u(function(t){var i=n[li]();if(r(i.subscribe))return i.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable");})}function kl(n){return new u(function(t){for(var i=0;iu&&(u=0),f=0,i.schedule(function(){t.closed||(t.next(f++),0<=r?this.schedule(void 0,r):t.complete())},u)})}function be(n,t){return void 0===n&&(n=0),void 0===t&&(t=nt),0>n&&(n=0),yt(n,n,t)}function ot(n){return 1===n.length&&vv(n[0])?n[0]:n}function ke(){for(var u,r=[],n=0;n=n?function(){return k}:i(function(i,r){var u=0;i.subscribe(new t(r,function(t){++u<=n&&(r.next(t),n<=u&&r.complete())}))})}function eu(){return i(function(n,i){n.subscribe(new t(i,h))})}function ou(n){return d(function(){return n})}function ur(n,t){return t?function(i){return fi(t.pipe(st(1),eu()),i.pipe(ur(n)))}:p(function(t,i){return n(t,i).pipe(st(1),ou(t))})}function po(n,t){void 0===t&&(t=nt);var i=yt(n,t);return ur(function(){return i})}function wo(){return i(function(n,i){n.subscribe(new t(i,function(n){return di(n,i)}))})}function bo(n,r){return i(function(i,u){var f=new Set;i.subscribe(new t(u,function(t){var i=n?n(t):t;f.has(i)||(f.add(i),u.next(t))}));null===r||void 0===r?void 0:r.subscribe(new t(u,function(){return f.clear()},h))})}function su(n,r){return void 0===r&&(r=a),n=null!==n&&void 0!==n?n:oa,i(function(i,u){var f,e=!0;i.subscribe(new t(u,function(t){var i=r(t);(e||!n(f,i))&&(e=!1,f=i,u.next(t))}))})}function oa(n,t){return n===t}function ko(n,t){return su(function(i,r){return t?t(i[n],r[n]):i[n]===r[n]})}function si(n){return void 0===n&&(n=sa),i(function(i,r){var u=!1;i.subscribe(new t(r,function(n){u=!0;r.next(n)},function(){return u?r.complete():r.error(n())}))})}function sa(){return new lt}function go(n,t){if(0>n)throw new sf;var i=2<=arguments.length;return function(r){return r.pipe(g(function(t,i){return i===n}),st(1),i?oi(t):si(function(){return new sf}))}}function ns(){for(var t=[],n=0;n(t||0)?Infinity:t,i(function(i,u){return gr(i,u,n,t,void 0,!0,r)})}function rs(n){return i(function(t,i){try{t.subscribe(i)}finally{i.add(n)}})}function us(n,t){return i(fs(n,t,"value"))}function fs(n,i,r){var u="index"===r;return function(r,f){var e=0;r.subscribe(new t(f,function(t){var o=e++;n.call(i,t,o,r)&&(f.next(u?o:t),f.complete())},function(){f.next(u?-1:void 0);f.complete()}))}}function es(n,t){return i(fs(n,t,"index"))}function os(n,t){var i=2<=arguments.length;return function(r){return r.pipe(n?g(function(t,i){return n(t,i,r)}):a,st(1),i?oi(t):si(function(){return new lt}))}}function ss(n,r,e,o){return i(function(i,s){function p(n,t){var i=new u(function(n){h.activeGroups++;var i=t.subscribe(n);return function(){i.unsubscribe();0==--h.activeGroups&&h.teardownAttempted&&h.unsubscribe()}});return i.key=n,i}var a;r&&"function"!=typeof r?(e=r.duration,a=r.element,o=r.connector):a=r;var l=new Map,v=function(n){l.forEach(n);n(s)},y=function(n){return v(function(t){return t.error(n)})},h=new wv(s,function(i){var u,r,w,v;try{u=n(i);r=l.get(u);r||(l.set(u,r=o?o():new c),w=p(u,r),s.next(w),e&&(v=new t(r,function(){r.complete();null===v||void 0===v?void 0:v.unsubscribe()},void 0,void 0,function(){return l.delete(u)}),h.add(f(e(w)).subscribe(v))));r.next(a?a(i):i)}catch(b){y(b)}},function(){return v(function(n){return n.complete()})},y,function(){return l.clear()});i.subscribe(h)})}function hs(){return i(function(n,i){n.subscribe(new t(i,function(){i.next(!1);i.complete()},function(){i.next(!0);i.complete()}))})}function cu(n){return 0>=n?function(){return k}:i(function(i,r){var u=[];i.subscribe(new t(r,function(t){u.push(t);nt?n:t})}function vs(n,t,i){return(void 0===i&&(i=Infinity),r(t))?p(function(){return n},t,i):("number"==typeof t&&(i=t),p(function(){return n},i))}function ys(n,t,r){return void 0===r&&(r=Infinity),i(function(i,u){var f=t;return gr(i,u,function(t,i){return n(f,t,i)},r,function(n){f=n},!1,void 0,function(){return f=null})})}function ps(){for(var n=[],t=0;tn(t,i)?t:i}:function(n,t){return n=n?function(){return k}:i(function(i,r){var e=0,u,f=function(){var o=!1;u=i.subscribe(new t(r,void 0,function(){++e=e?a:i(function(n,i){var s=0,u,h=function(){var c=!1;u=n.subscribe(new t(i,function(n){o&&(s=0);i.next(n)},void 0,function(n){var o,l;s++=n?a:i(function(i,r){var u=Array(n),f=0;return i.subscribe(new t(r,function(t){var i=f++,e;io){null===(u=null===r||void 0===r?void 0:r.complete)||void 0===u?void 0:u.call(r);u=void 0;try{u=new lf(n,i,e,hl+"_"+n.type)}catch(s){t.error(s);return}t.next(u);t.complete()}else null===(f=null===r||void 0===r?void 0:r.error)||void 0===f?void 0:f.call(r,n),w(o)});o=e.user;s=e.method;h=e.async;o?i.open(s,f,h,o,e.password):i.open(s,f,h);h&&(i.timeout=e.timeout,i.responseType=e.responseType);"withCredentials"in i&&(i.withCredentials=e.withCredentials);for(c in u)u.hasOwnProperty(c)&&i.setRequestHeader(c,u[c]);return l?i.send(l):i.send(),function(){i&&4!==i.readyState&&i.abort()}})}function wa(n,t){var i;if(!n||"string"==typeof n||"undefined"!=typeof FormData&&n instanceof FormData||"undefined"!=typeof URLSearchParams&&n instanceof URLSearchParams||bu(n,"ArrayBuffer")||bu(n,"File")||bu(n,"Blob")||"undefined"!=typeof ReadableStream&&n instanceof ReadableStream)return n;if("undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView(n))return n.buffer;if("object"==typeof n)return t["content-type"]=null!==(i=t["content-type"])&&void 0!==i?i:"application/json;charset=utf-8",JSON.stringify(n);throw new TypeError("Unknown body type");}function bu(n,t){return iy.call(n)==="[object "+t+"]"}var ku=function(n,t){return ku=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},ku(n,t)},ht=function(){return ht=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;ir&&ut.index?1:-1:n.delay>t.delay?1:-1},t}(ai),k=new u(function(n){return n.complete()}),ff=function(n){return n&&"number"==typeof n.length&&"function"!=typeof n},ef,cf;ef="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",function(n){n.NEXT="N";n.ERROR="E";n.COMPLETE="C"}(n.NotificationKind||(n.NotificationKind={}));var lr=function(){function n(n,t,i){this.kind=n;this.value=t;this.error=i;this.hasValue="N"===n}return n.prototype.observe=function(n){return di(this,n)},n.prototype.do=function(n,t,i){var r=this.kind,u=this.value,f=this.error;return"N"===r?null===n||void 0===n?void 0:n(u):"E"===r?null===t||void 0===t?void 0:t(f):null===i||void 0===i?void 0:i()},n.prototype.accept=function(n,t,i){return r(null===n||void 0===n?void 0:n.next)?this.observe(n):this.do(n,t,i)},n.prototype.toObservable=function(){var n=this.kind,t=this.value,i=this.error,t="N"===n?br(t):"E"===n?he(function(){return i}):"C"===n?k:0;if(!t)throw new TypeError("Unexpected notification kind "+n);return t},n.createNext=function(t){return new n("N",t)},n.createError=function(t){return new n("E",void 0,t)},n.createComplete=function(){return n.completeNotification},n.completeNotification=new n("C"),n}(),lt=rt(function(n){return function(){n(this);this.name="EmptyError";this.message="no elements in sequence"}}),sf=rt(function(n){return function(){n(this);this.name="ArgumentOutOfRangeError";this.message="argument out of range"}}),il=rt(function(n){return function(t){n(this);this.name="NotFoundError";this.message=t}}),rl=rt(function(n){return function(t){n(this);this.name="SequenceError";this.message=t}}),ul=rt(function(n){return function(t){void 0===t&&(t=null);n(this);this.message="Timeout has occurred";this.name="TimeoutError";this.info=t}}),uv=Array.isArray,fv=Array.isArray,ev=Object.getPrototypeOf,ov=Object.prototype,sv=Object.keys,hv={connector:function(){return new c},resetOnDisconnect:!0},cv=["addListener","removeListener"],lv=["addEventListener","removeEventListener"],av=["on","off"],fl=new u(h),vv=Array.isArray,yv=function(n,t){return n.push(t),n},pv={connector:function(){return new c}},wv=function(n){function t(){var t=null!==n&&n.apply(this,arguments)||this;return t.activeGroups=0,t.teardownAttempted=!1,t}return s(t,n),t.prototype.unsubscribe=function(){this.teardownAttempted=!0;0===this.activeGroups&&n.prototype.unsubscribe.call(this)},t}(t),el={leading:!0,trailing:!1},bv=function(){return function(n,t){this.value=n;this.interval=t}}(),kv=Object.freeze({audit:iu,auditTime:no,buffer:to,bufferCount:io,bufferTime:ro,bufferToggle:uo,bufferWhen:fo,catchError:ru,combineAll:tr,combineLatestAll:tr,combineLatest:fu,combineLatestWith:so,concat:co,concatAll:nr,concatMap:ir,concatMapTo:ho,concatWith:lo,connect:rr,count:ao,debounce:vo,debounceTime:yo,defaultIfEmpty:oi,delay:po,delayWhen:ur,dematerialize:wo,distinct:bo,distinctUntilChanged:su,distinctUntilKeyChanged:ko,elementAt:go,endWith:ns,every:ts,exhaust:fr,exhaustAll:fr,exhaustMap:hu,expand:is,filter:g,finalize:rs,find:us,findIndex:es,first:os,groupBy:ss,ignoreElements:eu,isEmpty:hs,last:cs,map:d,mapTo:ou,materialize:ls,max:as,merge:ps,mergeAll:ui,flatMap:p,mergeMap:p,mergeMapTo:vs,mergeScan:ys,mergeWith:ws,min:bs,multicast:er,observeOn:ii,onErrorResumeNext:ke,pairwise:ks,partition:function(n,t){return function(i){return[g(n,t)(i),g(de(n,t))(i)]}},pluck:ds,publish:gs,publishBehavior:nh,publishLast:th,publishReplay:ih,race:function(){for(var t=[],n=0;ns?new pi(f):new pi(f,s)},t.parseMarbles=function(n,t,i,r,u){var y=this,a,v,f;if(void 0===r&&(r=!1),void 0===u&&(u=!1),-1!==n.indexOf("!"))throw Error('conventional marble diagrams cannot have the unsubscription marker "!"');var s=o([],e(n)),p=s.length,l=[];n=u?n.replace(/^[ ]+/,"").indexOf("^"):n.indexOf("^");var h=-1===n?0:n*-this.frameTimeFactor,b="object"!=typeof t?function(n){return n}:function(n){return r&&t[n]instanceof hf?t[n].messages:t[n]},c=-1;for(n=function(n){var p=h,t=function(n){p+=n*y.frameTimeFactor},f=void 0,r=s[n],e,o;switch(r){case" ":u||t(1);break;case"-":t(1);break;case"(":c=h;t(1);break;case")":c=-1;t(1);break;case"|":f=hi;t(1);break;case"^":t(1);break;case"#":f=w("E",void 0,i||"error");t(1);break;default:if(u&&r.match(/^[0-9]$/)&&(0===n||" "===s[n-1])&&(e=s.slice(n).join("").match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /),e)){n+=e[0].length-1;r=parseFloat(e[1]);o=void 0;switch(e[2]){case"ms":o=r;break;case"s":o=1e3*r;break;case"m":o=6e4*r}t(o/a.frameTimeFactor);break}f=w("N",b(r),void 0);t(1)}f&&l.push({frame:-1=t)return k;var r=t+n;return new u(i?function(t){var u=n;return i.schedule(function(){u