import{g as Ut}from"./vendor-@amap.00a31695.js";/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var D=function(e,r){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])},D(e,r)};function f(e,r){D(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}function j(e){return typeof e=="function"}var K=!1,y={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var r=new Error;""+r.stack}K=e},get useDeprecatedSynchronousErrorHandling(){return K}};function E(e){setTimeout(function(){throw e},0)}var Y={closed:!0,next:function(e){},error:function(e){if(y.useDeprecatedSynchronousErrorHandling)throw e;E(e)},complete:function(){}},m=function(){return Array.isArray||function(e){return e&&typeof e.length=="number"}}();function Z(e){return e!==null&&typeof e=="object"}var Lt=function(){function e(r){return Error.call(this),this.message=r?r.length+` errors occurred during unsubscription:
`+r.map(function(t,n){return n+1+") "+t.toString()}).join(`
  `):"",this.name="UnsubscriptionError",this.errors=r,this}return e.prototype=Object.create(Error.prototype),e}(),T=Lt,v=function(){function e(r){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,r&&(this._ctorUnsubscribe=!0,this._unsubscribe=r)}return e.prototype.unsubscribe=function(){var r;if(!this.closed){var t=this,n=t._parentOrParents,i=t._ctorUnsubscribe,o=t._unsubscribe,s=t._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof e)n.remove(this);else if(n!==null)for(var u=0;u<n.length;++u){var c=n[u];c.remove(this)}if(j(o)){i&&(this._unsubscribe=void 0);try{o.call(this)}catch(l){r=l instanceof T?tt(l.errors):[l]}}if(m(s))for(var u=-1,d=s.length;++u<d;){var h=s[u];if(Z(h))try{h.unsubscribe()}catch(p){r=r||[],p instanceof T?r=r.concat(tt(p.errors)):r.push(p)}}if(r)throw new T(r)}},e.prototype.add=function(r){var t=r;if(!r)return e.EMPTY;switch(typeof r){case"function":t=new e(r);case"object":if(t===this||t.closed||typeof t.unsubscribe!="function")return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof e)){var n=t;t=new e,t._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+r+" added to Subscription.")}var i=t._parentOrParents;if(i===null)t._parentOrParents=this;else if(i instanceof e){if(i===this)return t;t._parentOrParents=[i,this]}else if(i.indexOf(this)===-1)i.push(this);else return t;var o=this._subscriptions;return o===null?this._subscriptions=[t]:o.push(t),t},e.prototype.remove=function(r){var t=this._subscriptions;if(t){var n=t.indexOf(r);n!==-1&&t.splice(n,1)}},e.EMPTY=function(r){return r.closed=!0,r}(new e),e}();function tt(e){return e.reduce(function(r,t){return r.concat(t instanceof T?t.errors:t)},[])}var U=function(){return typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),b=function(e){f(r,e);function r(t,n,i){var o=e.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=Y;break;case 1:if(!t){o.destination=Y;break}if(typeof t=="object"){t instanceof r?(o.syncErrorThrowable=t.syncErrorThrowable,o.destination=t,t.add(o)):(o.syncErrorThrowable=!0,o.destination=new et(o,t));break}default:o.syncErrorThrowable=!0,o.destination=new et(o,t,n,i);break}return o}return r.prototype[U]=function(){return this},r.create=function(t,n,i){var o=new r(t,n,i);return o.syncErrorThrowable=!1,o},r.prototype.next=function(t){this.isStopped||this._next(t)},r.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},r.prototype._next=function(t){this.destination.next(t)},r.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},r.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},r.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},r}(v),et=function(e){f(r,e);function r(t,n,i,o){var s=e.call(this)||this;s._parentSubscriber=t;var u,c=s;return j(n)?u=n:n&&(u=n.next,i=n.error,o=n.complete,n!==Y&&(c=Object.create(n),j(c.unsubscribe)&&s.add(c.unsubscribe.bind(c)),c.unsubscribe=s.unsubscribe.bind(s))),s._context=c,s._next=u,s._error=i,s._complete=o,s}return r.prototype.next=function(t){if(!this.isStopped&&this._next){var n=this._parentSubscriber;!y.useDeprecatedSynchronousErrorHandling||!n.syncErrorThrowable?this.__tryOrUnsub(this._next,t):this.__tryOrSetError(n,this._next,t)&&this.unsubscribe()}},r.prototype.error=function(t){if(!this.isStopped){var n=this._parentSubscriber,i=y.useDeprecatedSynchronousErrorHandling;if(this._error)!i||!n.syncErrorThrowable?(this.__tryOrUnsub(this._error,t),this.unsubscribe()):(this.__tryOrSetError(n,this._error,t),this.unsubscribe());else if(n.syncErrorThrowable)i?(n.syncErrorValue=t,n.syncErrorThrown=!0):E(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;E(t)}}},r.prototype.complete=function(){var t=this;if(!this.isStopped){var n=this._parentSubscriber;if(this._complete){var i=function(){return t._complete.call(t._context)};!y.useDeprecatedSynchronousErrorHandling||!n.syncErrorThrowable?(this.__tryOrUnsub(i),this.unsubscribe()):(this.__tryOrSetError(n,i),this.unsubscribe())}else this.unsubscribe()}},r.prototype.__tryOrUnsub=function(t,n){try{t.call(this._context,n)}catch(i){if(this.unsubscribe(),y.useDeprecatedSynchronousErrorHandling)throw i;E(i)}},r.prototype.__tryOrSetError=function(t,n,i){if(!y.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,i)}catch(o){return y.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=o,t.syncErrorThrown=!0,!0):(E(o),!0)}return!1},r.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},r}(b);function z(e){for(;e;){var r=e,t=r.closed,n=r.destination,i=r.isStopped;if(t||i)return!1;n&&n instanceof b?e=n:e=null}return!0}function qt(e,r,t){if(e){if(e instanceof b)return e;if(e[U])return e[U]()}return!e&&!r&&!t?new b(Y):new b(e,r,t)}var _=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function C(e){return e}function Dt(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return at(e)}function at(e){return e.length===0?C:e.length===1?e[0]:function(t){return e.reduce(function(n,i){return i(n)},t)}}var a=function(){function e(r){this._isScalar=!1,r&&(this._subscribe=r)}return e.prototype.lift=function(r){var t=new e;return t.source=this,t.operator=r,t},e.prototype.subscribe=function(r,t,n){var i=this.operator,o=qt(r,t,n);if(i?o.add(i.call(o,this.source)):o.add(this.source||y.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),y.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(t){y.useDeprecatedSynchronousErrorHandling&&(r.syncErrorThrown=!0,r.syncErrorValue=t),z(r)?r.error(t):console.warn(t)}},e.prototype.forEach=function(r,t){var n=this;return t=rt(t),new t(function(i,o){var s;s=n.subscribe(function(u){try{r(u)}catch(c){o(c),s&&s.unsubscribe()}},o,i)})},e.prototype._subscribe=function(r){var t=this.source;return t&&t.subscribe(r)},e.prototype[_]=function(){return this},e.prototype.pipe=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return r.length===0?this:at(r)(this)},e.prototype.toPromise=function(r){var t=this;return r=rt(r),new r(function(n,i){var o;t.subscribe(function(s){return o=s},function(s){return i(s)},function(){return n(o)})})},e.create=function(r){return new e(r)},e}();function rt(e){if(e||(e=y.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var $t=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),g=$t,ft=function(e){f(r,e);function r(t,n){var i=e.call(this)||this;return i.subject=t,i.subscriber=n,i.closed=!1,i}return r.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,n=t.observers;if(this.subject=null,!(!n||n.length===0||t.isStopped||t.closed)){var i=n.indexOf(this.subscriber);i!==-1&&n.splice(i,1)}}},r}(v),ht=function(e){f(r,e);function r(t){var n=e.call(this,t)||this;return n.destination=t,n}return r}(b),O=function(e){f(r,e);function r(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r.prototype[U]=function(){return new ht(this)},r.prototype.lift=function(t){var n=new nt(this,this);return n.operator=t,n},r.prototype.next=function(t){if(this.closed)throw new g;if(!this.isStopped)for(var n=this.observers,i=n.length,o=n.slice(),s=0;s<i;s++)o[s].next(t)},r.prototype.error=function(t){if(this.closed)throw new g;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var n=this.observers,i=n.length,o=n.slice(),s=0;s<i;s++)o[s].error(t);this.observers.length=0},r.prototype.complete=function(){if(this.closed)throw new g;this.isStopped=!0;for(var t=this.observers,n=t.length,i=t.slice(),o=0;o<n;o++)i[o].complete();this.observers.length=0},r.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},r.prototype._trySubscribe=function(t){if(this.closed)throw new g;return e.prototype._trySubscribe.call(this,t)},r.prototype._subscribe=function(t){if(this.closed)throw new g;return this.hasError?(t.error(this.thrownError),v.EMPTY):this.isStopped?(t.complete(),v.EMPTY):(this.observers.push(t),new ft(this,t))},r.prototype.asObservable=function(){var t=new a;return t.source=this,t},r.create=function(t,n){return new nt(t,n)},r}(a),nt=function(e){f(r,e);function r(t,n){var i=e.call(this)||this;return i.destination=t,i.source=n,i}return r.prototype.next=function(t){var n=this.destination;n&&n.next&&n.next(t)},r.prototype.error=function(t){var n=this.destination;n&&n.error&&this.destination.error(t)},r.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},r.prototype._subscribe=function(t){var n=this.source;return n?this.source.subscribe(t):v.EMPTY},r}(O);function Ht(){return function(r){return r.lift(new Bt(r))}}var Bt=function(){function e(r){this.connectable=r}return e.prototype.call=function(r,t){var n=this.connectable;n._refCount++;var i=new Wt(r,n),o=t.subscribe(i);return i.closed||(i.connection=n.connect()),o},e}(),Wt=function(e){f(r,e);function r(t,n){var i=e.call(this,t)||this;return i.connectable=n,i}return r.prototype._unsubscribe=function(){var t=this.connectable;if(!t){this.connection=null;return}this.connectable=null;var n=t._refCount;if(n<=0){this.connection=null;return}if(t._refCount=n-1,n>1){this.connection=null;return}var i=this.connection,o=t._connection;this.connection=null,o&&(!i||o===i)&&o.unsubscribe()},r}(b),Gt=function(e){f(r,e);function r(t,n){var i=e.call(this)||this;return i.source=t,i.subjectFactory=n,i._refCount=0,i._isComplete=!1,i}return r.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},r.prototype.getSubject=function(){var t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject},r.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,t=this._connection=new v,t.add(this.source.subscribe(new Zt(this.getSubject(),this))),t.closed&&(this._connection=null,t=v.EMPTY)),t},r.prototype.refCount=function(){return Ht()(this)},r}(a),Zt=function(e){f(r,e);function r(t,n){var i=e.call(this,t)||this;return i.connectable=n,i}return r.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},r.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},r.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var n=t._connection;t._refCount=0,t._subject=null,t._connection=null,n&&n.unsubscribe()}},r}(ht),zt=function(e){f(r,e);function r(t,n,i){var o=e.call(this)||this;return o.key=t,o.groupSubject=n,o.refCountSubscription=i,o}return r.prototype._subscribe=function(t){var n=new v,i=this,o=i.refCountSubscription,s=i.groupSubject;return o&&!o.closed&&n.add(new Jt(o)),n.add(s.subscribe(t)),n},r}(a),Jt=function(e){f(r,e);function r(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return r.prototype.unsubscribe=function(){var t=this.parent;!t.closed&&!this.closed&&(e.prototype.unsubscribe.call(this),t.count-=1,t.count===0&&t.attemptedToUnsubscribe&&t.unsubscribe())},r}(v),Qt=function(e){f(r,e);function r(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(r.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),r.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},r.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new g;return this._value},r.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},r}(O),Xt=function(e){f(r,e);function r(t,n){return e.call(this)||this}return r.prototype.schedule=function(t,n){return this},r}(v),P=function(e){f(r,e);function r(t,n){var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.pending=!1,i}return r.prototype.schedule=function(t,n){if(n===void 0&&(n=0),this.closed)return this;this.state=t;var i=this.id,o=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(o,i,n)),this.pending=!0,this.delay=n,this.id=this.id||this.requestAsyncId(o,this.id,n),this},r.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),setInterval(t.flush.bind(t,this),i)},r.prototype.recycleAsyncId=function(t,n,i){if(i===void 0&&(i=0),i!==null&&this.delay===i&&this.pending===!1)return n;clearInterval(n)},r.prototype.execute=function(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(t,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},r.prototype._execute=function(t,n){var i=!1,o=void 0;try{this.work(t)}catch(s){i=!0,o=!!s&&s||new Error(s)}if(i)return this.unsubscribe(),o},r.prototype._unsubscribe=function(){var t=this.id,n=this.scheduler,i=n.actions,o=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,o!==-1&&i.splice(o,1),t!=null&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null},r}(Xt),Kt=function(e){f(r,e);function r(t,n){var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i}return r.prototype.schedule=function(t,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},r.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},r.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!==null&&i>0||i===null&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,i):t.flush(this)},r}(P),$=function(){function e(r,t){t===void 0&&(t=e.now),this.SchedulerAction=r,this.now=t}return e.prototype.schedule=function(r,t,n){return t===void 0&&(t=0),new this.SchedulerAction(this,r).schedule(n,t)},e.now=function(){return Date.now()},e}(),V=function(e){f(r,e);function r(t,n){n===void 0&&(n=$.now);var i=e.call(this,t,function(){return r.delegate&&r.delegate!==i?r.delegate.now():n()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return r.prototype.schedule=function(t,n,i){return n===void 0&&(n=0),r.delegate&&r.delegate!==this?r.delegate.schedule(t,n,i):e.prototype.schedule.call(this,t,n,i)},r.prototype.flush=function(t){var n=this.actions;if(this.active){n.push(t);return}var i;this.active=!0;do if(i=t.execute(t.state,t.delay))break;while(t=n.shift());if(this.active=!1,i){for(;t=n.shift();)t.unsubscribe();throw i}},r}($),te=function(e){f(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r}(V),lt=new te(Kt),pt=lt,x=new a(function(e){return e.complete()});function J(e){return e?ee(e):x}function ee(e){return new a(function(r){return e.schedule(function(){return r.complete()})})}function w(e){return e&&typeof e.schedule=="function"}var dt=function(e){return function(r){for(var t=0,n=e.length;t<n&&!r.closed;t++)r.next(e[t]);r.complete()}};function Q(e,r){return new a(function(t){var n=new v,i=0;return n.add(r.schedule(function(){if(i===e.length){t.complete();return}t.next(e[i++]),t.closed||n.add(this.schedule())})),n})}function k(e,r){return r?Q(e,r):new a(dt(e))}function X(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var t=e[e.length-1];return w(t)?(e.pop(),Q(e,t)):k(e)}function vt(e,r){return r?new a(function(t){return r.schedule(re,0,{error:e,subscriber:t})}):new a(function(t){return t.error(e)})}function re(e){var r=e.error,t=e.subscriber;t.error(r)}var H;H||(H={});var M=function(){function e(r,t,n){this.kind=r,this.value=t,this.error=n,this.hasValue=r==="N"}return e.prototype.observe=function(r){switch(this.kind){case"N":return r.next&&r.next(this.value);case"E":return r.error&&r.error(this.error);case"C":return r.complete&&r.complete()}},e.prototype.do=function(r,t,n){var i=this.kind;switch(i){case"N":return r&&r(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(r,t,n){return r&&typeof r.next=="function"?this.observe(r):this.do(r,t,n)},e.prototype.toObservable=function(){var r=this.kind;switch(r){case"N":return X(this.value);case"E":return vt(this.error);case"C":return J()}throw new Error("unexpected notification kind value")},e.createNext=function(r){return typeof r!="undefined"?new e("N",r):e.undefinedValueNotification},e.createError=function(r){return new e("E",void 0,r)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}(),ne=function(e){f(r,e);function r(t,n,i){i===void 0&&(i=0);var o=e.call(this,t)||this;return o.scheduler=n,o.delay=i,o}return r.dispatch=function(t){var n=t.notification,i=t.destination;n.observe(i),this.unsubscribe()},r.prototype.scheduleMessage=function(t){var n=this.destination;n.add(this.scheduler.schedule(r.dispatch,this.delay,new ie(t,this.destination)))},r.prototype._next=function(t){this.scheduleMessage(M.createNext(t))},r.prototype._error=function(t){this.scheduleMessage(M.createError(t)),this.unsubscribe()},r.prototype._complete=function(){this.scheduleMessage(M.createComplete()),this.unsubscribe()},r}(b),ie=function(){function e(r,t){this.notification=r,this.destination=t}return e}(),oe=function(e){f(r,e);function r(t,n,i){t===void 0&&(t=Number.POSITIVE_INFINITY),n===void 0&&(n=Number.POSITIVE_INFINITY);var o=e.call(this)||this;return o.scheduler=i,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return r.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var n=this._events;n.push(t),n.length>this._bufferSize&&n.shift()}e.prototype.next.call(this,t)},r.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new se(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},r.prototype._subscribe=function(t){var n=this._infiniteTimeWindow,i=n?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,s=i.length,u;if(this.closed)throw new g;if(this.isStopped||this.hasError?u=v.EMPTY:(this.observers.push(t),u=new ft(this,t)),o&&t.add(t=new ne(t,o)),n)for(var c=0;c<s&&!t.closed;c++)t.next(i[c]);else for(var c=0;c<s&&!t.closed;c++)t.next(i[c].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),u},r.prototype._getNow=function(){return(this.scheduler||pt).now()},r.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),n=this._bufferSize,i=this._windowTime,o=this._events,s=o.length,u=0;u<s&&!(t-o[u].time<i);)u++;return s>n&&(u=Math.max(u,s-n)),u>0&&o.splice(0,u),o},r}(O),se=function(){function e(r,t){this.time=r,this.value=t}return e}(),R=function(e){f(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return r.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),v.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),v.EMPTY):e.prototype._subscribe.call(this,t)},r.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},r.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},r.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},r}(O),ue=1,ce=function(){return Promise.resolve()}(),B={};function it(e){return e in B?(delete B[e],!0):!1}var ot={setImmediate:function(e){var r=ue++;return B[r]=!0,ce.then(function(){return it(r)&&e()}),r},clearImmediate:function(e){it(e)}},ae=function(e){f(r,e);function r(t,n){var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i}return r.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,t,n,i):(t.actions.push(this),t.scheduled||(t.scheduled=ot.setImmediate(t.flush.bind(t,null))))},r.prototype.recycleAsyncId=function(t,n,i){if(i===void 0&&(i=0),i!==null&&i>0||i===null&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,i);t.actions.length===0&&(ot.clearImmediate(n),t.scheduled=void 0)},r}(P),fe=function(e){f(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var n=this.actions,i,o=-1,s=n.length;t=t||n.shift();do if(i=t.execute(t.state,t.delay))break;while(++o<s&&(t=n.shift()));if(this.active=!1,i){for(;++o<s&&(t=n.shift());)t.unsubscribe();throw i}},r}(V),bt=new fe(ae),he=bt,yt=new V(P),L=yt,le=function(e){f(r,e);function r(t,n){var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i}return r.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,t,n,i):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(function(){return t.flush(null)})))},r.prototype.recycleAsyncId=function(t,n,i){if(i===void 0&&(i=0),i!==null&&i>0||i===null&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,i);t.actions.length===0&&(cancelAnimationFrame(n),t.scheduled=void 0)},r}(P),pe=function(e){f(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var n=this.actions,i,o=-1,s=n.length;t=t||n.shift();do if(i=t.execute(t.state,t.delay))break;while(++o<s&&(t=n.shift()));if(this.active=!1,i){for(;++o<s&&(t=n.shift());)t.unsubscribe();throw i}},r}(V),mt=new pe(le),de=mt,ve=function(e){f(r,e);function r(t,n){t===void 0&&(t=gt),n===void 0&&(n=Number.POSITIVE_INFINITY);var i=e.call(this,t,function(){return i.frame})||this;return i.maxFrames=n,i.frame=0,i.index=-1,i}return r.prototype.flush=function(){for(var t=this,n=t.actions,i=t.maxFrames,o,s;(s=n[0])&&s.delay<=i&&(n.shift(),this.frame=s.delay,!(o=s.execute(s.state,s.delay))););if(o){for(;s=n.shift();)s.unsubscribe();throw o}},r.frameTimeFactor=10,r}(V),gt=function(e){f(r,e);function r(t,n,i){i===void 0&&(i=t.index+=1);var o=e.call(this,t,n)||this;return o.scheduler=t,o.work=n,o.index=i,o.active=!0,o.index=t.index=i,o}return r.prototype.schedule=function(t,n){if(n===void 0&&(n=0),!this.id)return e.prototype.schedule.call(this,t,n);this.active=!1;var i=new r(this.scheduler,this.work);return this.add(i),i.schedule(t,n)},r.prototype.requestAsyncId=function(t,n,i){i===void 0&&(i=0),this.delay=t.frame+i;var o=t.actions;return o.push(this),o.sort(r.sortActions),!0},r.prototype.recycleAsyncId=function(t,n,i){},r.prototype._execute=function(t,n){if(this.active===!0)return e.prototype._execute.call(this,t,n)},r.sortActions=function(t,n){return t.delay===n.delay?t.index===n.index?0:t.index>n.index?1:-1:t.delay>n.delay?1:-1},r}(P);function wt(){}function be(e){return!!e&&(e instanceof a||typeof e.lift=="function"&&typeof e.subscribe=="function")}var ye=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}(),me=ye,ge=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}(),we=ge,Se=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}(),Ee=Se;function I(e,r){return function(n){if(typeof e!="function")throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new xe(e,r))}}var xe=function(){function e(r,t){this.project=r,this.thisArg=t}return e.prototype.call=function(r,t){return t.subscribe(new _e(r,this.project,this.thisArg))},e}(),_e=function(e){f(r,e);function r(t,n,i){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=i||o,o}return r.prototype._next=function(t){var n;try{n=this.project.call(this.thisArg,t,this.count++)}catch(i){this.destination.error(i);return}this.destination.next(n)},r}(b);function St(e,r,t){if(r)if(w(r))t=r;else return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return St(e,t).apply(void 0,n).pipe(I(function(o){return m(o)?r.apply(void 0,o):r(o)}))};return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=this,s,u={context:o,subject:s,callbackFunc:e,scheduler:t};return new a(function(c){if(t){var h={args:n,subscriber:c,params:u};return t.schedule(Ie,0,h)}else{if(!s){s=new R;var d=function(){for(var l=[],p=0;p<arguments.length;p++)l[p]=arguments[p];s.next(l.length<=1?l[0]:l),s.complete()};try{e.apply(o,n.concat([d]))}catch(l){z(s)?s.error(l):console.warn(l)}}return s.subscribe(c)}})}}function Ie(e){var r=this,t=e.args,n=e.subscriber,i=e.params,o=i.callbackFunc,s=i.context,u=i.scheduler,c=i.subject;if(!c){c=i.subject=new R;var d=function(){for(var h=[],l=0;l<arguments.length;l++)h[l]=arguments[l];var p=h.length<=1?h[0]:h;r.add(u.schedule(Ae,0,{value:p,subject:c}))};try{o.apply(s,t.concat([d]))}catch(h){c.error(h)}}this.add(c.subscribe(n))}function Ae(e){var r=e.value,t=e.subject;t.next(r),t.complete()}function Et(e,r,t){if(r)if(w(r))t=r;else return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return Et(e,t).apply(void 0,n).pipe(I(function(o){return m(o)?r.apply(void 0,o):r(o)}))};return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o={subject:void 0,args:n,callbackFunc:e,scheduler:t,context:this};return new a(function(s){var u=o.context,c=o.subject;if(t)return t.schedule(Te,0,{params:o,subscriber:s,context:u});if(!c){c=o.subject=new R;var d=function(){for(var h=[],l=0;l<arguments.length;l++)h[l]=arguments[l];var p=h.shift();if(p){c.error(p);return}c.next(h.length<=1?h[0]:h),c.complete()};try{e.apply(u,n.concat([d]))}catch(h){z(c)?c.error(h):console.warn(h)}}return c.subscribe(s)})}}function Te(e){var r=this,t=e.params,n=e.subscriber,i=e.context,o=t.callbackFunc,s=t.args,u=t.scheduler,c=t.subject;if(!c){c=t.subject=new R;var d=function(){for(var h=[],l=0;l<arguments.length;l++)h[l]=arguments[l];var p=h.shift();if(p)r.add(u.schedule(st,0,{err:p,subject:c}));else{var q=h.length<=1?h[0]:h;r.add(u.schedule(je,0,{value:q,subject:c}))}};try{o.apply(i,s.concat([d]))}catch(h){this.add(u.schedule(st,0,{err:h,subject:c}))}}this.add(c.subscribe(n))}function je(e){var r=e.value,t=e.subject;t.next(r),t.complete()}function st(e){var r=e.err,t=e.subject;t.error(r)}var xt=function(e){f(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.notifyNext=function(t,n,i,o,s){this.destination.next(n)},r.prototype.notifyError=function(t,n){this.destination.error(t)},r.prototype.notifyComplete=function(t){this.destination.complete()},r}(b),Ce=function(e){f(r,e);function r(t,n,i){var o=e.call(this)||this;return o.parent=t,o.outerValue=n,o.outerIndex=i,o.index=0,o}return r.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},r.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},r.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},r}(b),Ne=function(e){return function(r){return e.then(function(t){r.closed||(r.next(t),r.complete())},function(t){return r.error(t)}).then(null,E),r}};function Oe(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var S=Oe(),Pe=function(e){return function(r){var t=e[S]();do{var n=void 0;try{n=t.next()}catch(i){return r.error(i),r}if(n.done){r.complete();break}if(r.next(n.value),r.closed)break}while(!0);return typeof t.return=="function"&&r.add(function(){t.return&&t.return()}),r}},Ve=function(e){return function(r){var t=e[_]();if(typeof t.subscribe!="function")throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(r)}},_t=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function It(e){return!!e&&typeof e.subscribe!="function"&&typeof e.then=="function"}var N=function(e){if(!!e&&typeof e[_]=="function")return Ve(e);if(_t(e))return dt(e);if(It(e))return Ne(e);if(!!e&&typeof e[S]=="function")return Pe(e);var r=Z(e)?"an invalid object":"'"+e+"'",t="You provided "+r+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";throw new TypeError(t)};function At(e,r,t,n,i){if(i===void 0&&(i=new Ce(e,t,n)),!i.closed)return r instanceof a?r.subscribe(i):N(r)(i)}var ut={};function ke(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var t=void 0,n=void 0;return w(e[e.length-1])&&(n=e.pop()),typeof e[e.length-1]=="function"&&(t=e.pop()),e.length===1&&m(e[0])&&(e=e[0]),k(e,n).lift(new Re(t))}var Re=function(){function e(r){this.resultSelector=r}return e.prototype.call=function(r,t){return t.subscribe(new Fe(r,this.resultSelector))},e}(),Fe=function(e){f(r,e);function r(t,n){var i=e.call(this,t)||this;return i.resultSelector=n,i.active=0,i.values=[],i.observables=[],i}return r.prototype._next=function(t){this.values.push(ut),this.observables.push(t)},r.prototype._complete=function(){var t=this.observables,n=t.length;if(n===0)this.destination.complete();else{this.active=n,this.toRespond=n;for(var i=0;i<n;i++){var o=t[i];this.add(At(this,o,void 0,i))}}},r.prototype.notifyComplete=function(t){(this.active-=1)===0&&this.destination.complete()},r.prototype.notifyNext=function(t,n,i){var o=this.values,s=o[i],u=this.toRespond?s===ut?--this.toRespond:this.toRespond:0;o[i]=n,u===0&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))},r.prototype._tryResultSelector=function(t){var n;try{n=this.resultSelector.apply(this,t)}catch(i){this.destination.error(i);return}this.destination.next(n)},r}(xt);function Me(e,r){return new a(function(t){var n=new v;return n.add(r.schedule(function(){var i=e[_]();n.add(i.subscribe({next:function(o){n.add(r.schedule(function(){return t.next(o)}))},error:function(o){n.add(r.schedule(function(){return t.error(o)}))},complete:function(){n.add(r.schedule(function(){return t.complete()}))}}))})),n})}function Ye(e,r){return new a(function(t){var n=new v;return n.add(r.schedule(function(){return e.then(function(i){n.add(r.schedule(function(){t.next(i),n.add(r.schedule(function(){return t.complete()}))}))},function(i){n.add(r.schedule(function(){return t.error(i)}))})})),n})}function Ue(e,r){if(!e)throw new Error("Iterable cannot be null");return new a(function(t){var n=new v,i;return n.add(function(){i&&typeof i.return=="function"&&i.return()}),n.add(r.schedule(function(){i=e[S](),n.add(r.schedule(function(){if(!t.closed){var o,s;try{var u=i.next();o=u.value,s=u.done}catch(c){t.error(c);return}s?t.complete():(t.next(o),this.schedule())}}))})),n})}function Le(e){return e&&typeof e[_]=="function"}function qe(e){return e&&typeof e[S]=="function"}function Tt(e,r){if(e!=null){if(Le(e))return Me(e,r);if(It(e))return Ye(e,r);if(_t(e))return Q(e,r);if(qe(e)||typeof e=="string")return Ue(e,r)}throw new TypeError((e!==null&&typeof e||e)+" is not observable")}function A(e,r){return r?Tt(e,r):e instanceof a?e:new a(N(e))}var jt=function(e){f(r,e);function r(t){var n=e.call(this)||this;return n.parent=t,n}return r.prototype._next=function(t){this.parent.notifyNext(t)},r.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},r.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},r}(b),Ct=function(e){f(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.notifyNext=function(t){this.destination.next(t)},r.prototype.notifyError=function(t){this.destination.error(t)},r.prototype.notifyComplete=function(){this.destination.complete()},r}(b);function Nt(e,r){if(!r.closed){if(e instanceof a)return e.subscribe(r);var t;try{t=N(e)(r)}catch(n){r.error(n)}return t}}function Ot(e,r,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),typeof r=="function"?function(n){return n.pipe(Ot(function(i,o){return A(e(i,o)).pipe(I(function(s,u){return r(i,s,o,u)}))},t))}:(typeof r=="number"&&(t=r),function(n){return n.lift(new De(e,t))})}var De=function(){function e(r,t){t===void 0&&(t=Number.POSITIVE_INFINITY),this.project=r,this.concurrent=t}return e.prototype.call=function(r,t){return t.subscribe(new $e(r,this.project,this.concurrent))},e}(),$e=function(e){f(r,e);function r(t,n,i){i===void 0&&(i=Number.POSITIVE_INFINITY);var o=e.call(this,t)||this;return o.project=n,o.concurrent=i,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return r.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},r.prototype._tryNext=function(t){var n,i=this.index++;try{n=this.project(t,i)}catch(o){this.destination.error(o);return}this.active++,this._innerSub(n)},r.prototype._innerSub=function(t){var n=new jt(this),i=this.destination;i.add(n);var o=Nt(t,n);o!==n&&i.add(o)},r.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&this.destination.complete(),this.unsubscribe()},r.prototype.notifyNext=function(t){this.destination.next(t)},r.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()},r}(Ct);function Pt(e){return e===void 0&&(e=Number.POSITIVE_INFINITY),Ot(C,e)}function He(){return Pt(1)}function Be(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return He()(X.apply(void 0,e))}function Vt(e){return new a(function(r){var t;try{t=e()}catch(i){r.error(i);return}var n=t?A(t):J();return n.subscribe(r)})}function We(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length===1){var t=e[0];if(m(t))return F(t,null);if(Z(t)&&Object.getPrototypeOf(t)===Object.prototype){var n=Object.keys(t);return F(n.map(function(o){return t[o]}),n)}}if(typeof e[e.length-1]=="function"){var i=e.pop();return e=e.length===1&&m(e[0])?e[0]:e,F(e,null).pipe(I(function(o){return i.apply(void 0,o)}))}return F(e,null)}function F(e,r){return new a(function(t){var n=e.length;if(n===0){t.complete();return}for(var i=new Array(n),o=0,s=0,u=function(d){var h=A(e[d]),l=!1;t.add(h.subscribe({next:function(p){l||(l=!0,s++),i[d]=p},error:function(p){return t.error(p)},complete:function(){o++,(o===n||!l)&&(s===n&&t.next(r?r.reduce(function(p,q,Yt){return p[q]=i[Yt],p},{}):i),t.complete())}}))},c=0;c<n;c++)u(c)})}function kt(e,r,t,n){return j(t)&&(n=t,t=void 0),n?kt(e,r,t).pipe(I(function(i){return m(i)?n.apply(void 0,i):n(i)})):new a(function(i){function o(s){arguments.length>1?i.next(Array.prototype.slice.call(arguments)):i.next(s)}Rt(e,r,o,i,t)})}function Rt(e,r,t,n,i){var o;if(ze(e)){var s=e;e.addEventListener(r,t,i),o=function(){return s.removeEventListener(r,t,i)}}else if(Ze(e)){var u=e;e.on(r,t),o=function(){return u.off(r,t)}}else if(Ge(e)){var c=e;e.addListener(r,t),o=function(){return c.removeListener(r,t)}}else if(e&&e.length)for(var d=0,h=e.length;d<h;d++)Rt(e[d],r,t,n,i);else throw new TypeError("Invalid event target");n.add(o)}function Ge(e){return e&&typeof e.addListener=="function"&&typeof e.removeListener=="function"}function Ze(e){return e&&typeof e.on=="function"&&typeof e.off=="function"}function ze(e){return e&&typeof e.addEventListener=="function"&&typeof e.removeEventListener=="function"}function Ft(e,r,t){return t?Ft(e,r).pipe(I(function(n){return m(n)?t.apply(void 0,n):t(n)})):new a(function(n){var i=function(){for(var s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];return n.next(s.length===1?s[0]:s)},o;try{o=e(i)}catch(s){n.error(s);return}if(!!j(r))return function(){return r(i,o)}})}function Je(e,r,t,n,i){var o,s;if(arguments.length==1){var u=e;s=u.initialState,r=u.condition,t=u.iterate,o=u.resultSelector||C,i=u.scheduler}else n===void 0||w(n)?(s=e,o=C,i=n):(s=e,o=n);return new a(function(c){var d=s;if(i)return i.schedule(Qe,0,{subscriber:c,iterate:t,condition:r,resultSelector:o,state:d});do{if(r){var h=void 0;try{h=r(d)}catch(p){c.error(p);return}if(!h){c.complete();break}}var l=void 0;try{l=o(d)}catch(p){c.error(p);return}if(c.next(l),c.closed)break;try{d=t(d)}catch(p){c.error(p);return}}while(!0)})}function Qe(e){var r=e.subscriber,t=e.condition;if(!r.closed){if(e.needIterate)try{e.state=e.iterate(e.state)}catch(o){r.error(o);return}else e.needIterate=!0;if(t){var n=void 0;try{n=t(e.state)}catch(o){r.error(o);return}if(!n){r.complete();return}if(r.closed)return}var i;try{i=e.resultSelector(e.state)}catch(o){r.error(o);return}if(!r.closed&&(r.next(i),!r.closed))return this.schedule(e)}}function Xe(e,r,t){return r===void 0&&(r=x),t===void 0&&(t=x),Vt(function(){return e()?r:t})}function W(e){return!m(e)&&e-parseFloat(e)+1>=0}function Ke(e,r){return e===void 0&&(e=0),r===void 0&&(r=L),(!W(e)||e<0)&&(e=0),(!r||typeof r.schedule!="function")&&(r=L),new a(function(t){return t.add(r.schedule(tr,e,{subscriber:t,counter:0,period:e})),t})}function tr(e){var r=e.subscriber,t=e.counter,n=e.period;r.next(t),this.schedule({subscriber:r,counter:t+1,period:n},n)}function er(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var t=Number.POSITIVE_INFINITY,n=null,i=e[e.length-1];return w(i)?(n=e.pop(),e.length>1&&typeof e[e.length-1]=="number"&&(t=e.pop())):typeof i=="number"&&(t=e.pop()),n===null&&e.length===1&&e[0]instanceof a?e[0]:Pt(t)(k(e,n))}var Mt=new a(wt);function rr(){return Mt}function G(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length===0)return x;var t=e[0],n=e.slice(1);return e.length===1&&m(t)?G.apply(void 0,t):new a(function(i){var o=function(){return i.add(G.apply(void 0,n).subscribe(i))};return A(t).subscribe({next:function(s){i.next(s)},error:o,complete:o})})}function nr(e,r){return r?new a(function(t){var n=Object.keys(e),i=new v;return i.add(r.schedule(ir,0,{keys:n,index:0,subscriber:t,subscription:i,obj:e})),i}):new a(function(t){for(var n=Object.keys(e),i=0;i<n.length&&!t.closed;i++){var o=n[i];e.hasOwnProperty(o)&&t.next([o,e[o]])}t.complete()})}function ir(e){var r=e.keys,t=e.index,n=e.subscriber,i=e.subscription,o=e.obj;if(!n.closed)if(t<r.length){var s=r[t];n.next([s,o[s]]),i.add(this.schedule({keys:r,index:t+1,subscriber:n,subscription:i,obj:o}))}else n.complete()}function or(e,r){function t(){return!t.pred.apply(t.thisArg,arguments)}return t.pred=e,t.thisArg=r,t}function ct(e,r){return function(n){return n.lift(new sr(e,r))}}var sr=function(){function e(r,t){this.predicate=r,this.thisArg=t}return e.prototype.call=function(r,t){return t.subscribe(new ur(r,this.predicate,this.thisArg))},e}(),ur=function(e){f(r,e);function r(t,n,i){var o=e.call(this,t)||this;return o.predicate=n,o.thisArg=i,o.count=0,o}return r.prototype._next=function(t){var n;try{n=this.predicate.call(this.thisArg,t,this.count++)}catch(i){this.destination.error(i);return}n&&this.destination.next(t)},r}(b);function cr(e,r,t){return[ct(r,t)(new a(N(e))),ct(or(r,t))(new a(N(e)))]}function ar(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length===1)if(m(e[0]))e=e[0];else return e[0];return k(e,void 0).lift(new fr)}var fr=function(){function e(){}return e.prototype.call=function(r,t){return t.subscribe(new hr(r))},e}(),hr=function(e){f(r,e);function r(t){var n=e.call(this,t)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return r.prototype._next=function(t){this.observables.push(t)},r.prototype._complete=function(){var t=this.observables,n=t.length;if(n===0)this.destination.complete();else{for(var i=0;i<n&&!this.hasFirst;i++){var o=t[i],s=At(this,o,void 0,i);this.subscriptions&&this.subscriptions.push(s),this.add(s)}this.observables=null}},r.prototype.notifyNext=function(t,n,i){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==i){var s=this.subscriptions[o];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(n)},r}(xt);function lr(e,r,t){return e===void 0&&(e=0),new a(function(n){r===void 0&&(r=e,e=0);var i=0,o=e;if(t)return t.schedule(pr,0,{index:i,count:r,start:e,subscriber:n});do{if(i++>=r){n.complete();break}if(n.next(o++),n.closed)break}while(!0)})}function pr(e){var r=e.start,t=e.index,n=e.count,i=e.subscriber;if(t>=n){i.complete();return}i.next(r),!i.closed&&(e.index=t+1,e.start=r+1,this.schedule(e))}function dr(e,r,t){e===void 0&&(e=0);var n=-1;return W(r)?n=Number(r)<1&&1||Number(r):w(r)&&(t=r),w(t)||(t=L),new a(function(i){var o=W(e)?e:+e-t.now();return t.schedule(vr,o,{index:0,period:n,subscriber:i})})}function vr(e){var r=e.index,t=e.period,n=e.subscriber;if(n.next(r),!n.closed){if(t===-1)return n.complete();e.index=r+1,this.schedule(e,t)}}function br(e,r){return new a(function(t){var n;try{n=e()}catch(u){t.error(u);return}var i;try{i=r(n)}catch(u){t.error(u);return}var o=i?A(i):x,s=o.subscribe(t);return function(){s.unsubscribe(),n&&n.unsubscribe()}})}function yr(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var t=e[e.length-1];return typeof t=="function"&&e.pop(),k(e,void 0).lift(new mr(t))}var mr=function(){function e(r){this.resultSelector=r}return e.prototype.call=function(r,t){return t.subscribe(new gr(r,this.resultSelector))},e}(),gr=function(e){f(r,e);function r(t,n,i){var o=e.call(this,t)||this;return o.resultSelector=n,o.iterators=[],o.active=0,o.resultSelector=typeof n=="function"?n:void 0,o}return r.prototype._next=function(t){var n=this.iterators;m(t)?n.push(new Sr(t)):typeof t[S]=="function"?n.push(new wr(t[S]())):n.push(new Er(this.destination,this,t))},r.prototype._complete=function(){var t=this.iterators,n=t.length;if(this.unsubscribe(),n===0){this.destination.complete();return}this.active=n;for(var i=0;i<n;i++){var o=t[i];if(o.stillUnsubscribed){var s=this.destination;s.add(o.subscribe())}else this.active--}},r.prototype.notifyInactive=function(){this.active--,this.active===0&&this.destination.complete()},r.prototype.checkIterators=function(){for(var t=this.iterators,n=t.length,i=this.destination,o=0;o<n;o++){var s=t[o];if(typeof s.hasValue=="function"&&!s.hasValue())return}for(var u=!1,c=[],o=0;o<n;o++){var s=t[o],d=s.next();if(s.hasCompleted()&&(u=!0),d.done){i.complete();return}c.push(d.value)}this.resultSelector?this._tryresultSelector(c):i.next(c),u&&i.complete()},r.prototype._tryresultSelector=function(t){var n;try{n=this.resultSelector.apply(this,t)}catch(i){this.destination.error(i);return}this.destination.next(n)},r}(b),wr=function(){function e(r){this.iterator=r,this.nextResult=r.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var r=this.nextResult;return this.nextResult=this.iterator.next(),r},e.prototype.hasCompleted=function(){var r=this.nextResult;return Boolean(r&&r.done)},e}(),Sr=function(){function e(r){this.array=r,this.index=0,this.length=0,this.length=r.length}return e.prototype[S]=function(){return this},e.prototype.next=function(r){var t=this.index++,n=this.array;return t<this.length?{value:n[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),Er=function(e){f(r,e);function r(t,n,i){var o=e.call(this,t)||this;return o.parent=n,o.observable=i,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return r.prototype[S]=function(){return this},r.prototype.next=function(){var t=this.buffer;return t.length===0&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},r.prototype.hasValue=function(){return this.buffer.length>0},r.prototype.hasCompleted=function(){return this.buffer.length===0&&this.isComplete},r.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},r.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators()},r.prototype.subscribe=function(){return Nt(this.observable,new jt(this))},r}(Ct),xr=Object.freeze(Object.defineProperty({__proto__:null,Observable:a,ConnectableObservable:Gt,GroupedObservable:zt,observable:_,Subject:O,BehaviorSubject:Qt,ReplaySubject:oe,AsyncSubject:R,asap:he,asapScheduler:bt,async:L,asyncScheduler:yt,queue:pt,queueScheduler:lt,animationFrame:de,animationFrameScheduler:mt,VirtualTimeScheduler:ve,VirtualAction:gt,Scheduler:$,Subscription:v,Subscriber:b,Notification:M,get NotificationKind(){return H},pipe:Dt,noop:wt,identity:C,isObservable:be,ArgumentOutOfRangeError:me,EmptyError:we,ObjectUnsubscribedError:g,UnsubscriptionError:T,TimeoutError:Ee,bindCallback:St,bindNodeCallback:Et,combineLatest:ke,concat:Be,defer:Vt,empty:J,forkJoin:We,from:A,fromEvent:kt,fromEventPattern:Ft,generate:Je,iif:Xe,interval:Ke,merge:er,never:rr,of:X,onErrorResumeNext:G,pairs:nr,partition:cr,race:ar,range:lr,throwError:vt,timer:dr,using:br,zip:yr,scheduled:Tt,EMPTY:x,NEVER:Mt,config:y},Symbol.toStringTag,{value:"Module"})),Ir=Ut(xr);export{a as O,O as S,Ir as r};
