import{c as V,b as ln}from"./skip-3c1bbf36.js";import{aN as d,ac as v,a1 as cn,aO as kn,X as F,a0 as R,a9 as S,aP as M,ah as U,a2 as A,aj as B,aQ as G,aR as C,ab as x,aa as Y,a5 as O,af as I,a4 as Wn,aS as vn,ag as E,Y as T,$ as N,aT as k,aU as $,ao as sn,aE as W,ay as Fn,as as dn,aK as q,aC as Cn,a3 as J,ai as Q,aB as hn,aV as pn,aW as Mn,aD as Ln,al as zn,am as Dn,aJ as P,aX as Un}from"./index-c4efa424.js";function $n(){return d(function(t,n){var e=null;t._refCount++;var r=v(n,void 0,void 0,void 0,function(){if(!t||t._refCount<=0||0<--t._refCount){e=null;return}var a=t._connection,u=e;e=null,a&&(!u||a===u)&&a.unsubscribe(),n.unsubscribe()});t.subscribe(r),r.closed||(e=t.connect())})}var Z=function(t){cn(n,t);function n(e,r){var a=t.call(this)||this;return a.source=e,a.subjectFactory=r,a._subject=null,a._refCount=0,a._connection=null,kn(e)&&(a.lift=e.lift),a}return n.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},n.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},n.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,e==null||e.unsubscribe()},n.prototype.connect=function(){var e=this,r=this._connection;if(!r){r=this._connection=new F;var a=this.getSubject();r.add(this.source.subscribe(v(a,void 0,function(){e._teardown(),a.complete()},function(u){e._teardown(),a.error(u)},function(){return e._teardown()}))),r.closed&&(this._connection=null,r=F.EMPTY)}return r},n.prototype.refCount=function(){return $n()(this)},n}(R),qn=function(t){cn(n,t);function n(){var e=t!==null&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}return n.prototype._checkFinalizedStatuses=function(e){var r=this,a=r.hasError,u=r._hasValue,i=r._value,o=r.thrownError,f=r.isStopped,l=r._isComplete;a?e.error(o):(f||l)&&(u&&e.next(i),e.complete())},n.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},n.prototype.complete=function(){var e=this,r=e._hasValue,a=e._value,u=e._isComplete;u||(this._isComplete=!0,r&&t.prototype.next.call(this,a),t.prototype.complete.call(this))},n}(S);function mn(){for(var t=[],n=0;n0&&w(a)},void 0,void 0,function(){h!=null&&h.closed||h==null||h.unsubscribe(),y=null})),!p&&w(r!=null?typeof r=="number"?r:+r-f.now():a)})}function Xn(t){throw new Jn(t)}var Yn=Array.isArray,On=Object.getPrototypeOf,Qn=Object.prototype,Zn=Object.keys;function Hn(t){if(t.length===1){var n=t[0];if(Yn(n))return{args:n,keys:null};if(_n(n)){var e=Zn(n);return{args:e.map(function(r){return n[r]}),keys:e}}}return{args:t,keys:null}}function _n(t){return t&&typeof t=="object"&&On(t)===Qn}function nt(t,n){return t.reduce(function(e,r,a){return e[r]=n[a],e},{})}function tt(){for(var t=[],n=0;n=0?C(l,u,g,i,!0):s=!0,g();var h=v(l,function(y){var p,w,b=c.slice();try{for(var j=k(b),D=j.next();!D.done;D=j.next()){var tn=D.value,en=tn.buffer;en.push(y),o<=en.length&&m(tn)}}catch(jn){p={error:jn}}finally{try{D&&!D.done&&(w=j.return)&&w.call(j)}finally{if(p)throw p.error}}},function(){for(;c!=null&&c.length;)l.next(c.shift().buffer);h==null||h.unsubscribe(),l.complete(),l.unsubscribe()},void 0,function(){return c=null});f.subscribe(h)})}function kt(t,n){return d(function(e,r){var a=[];x(t).subscribe(v(r,function(u){var i=[];a.push(i);var o=new F,f=function(){$(a,i),r.next(i),o.unsubscribe()};o.add(x(n(u)).subscribe(v(r,f,E)))},E)),e.subscribe(v(r,function(u){var i,o;try{for(var f=k(a),l=f.next();!l.done;l=f.next()){var c=l.value;c.push(u)}}catch(s){i={error:s}}finally{try{l&&!l.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}},function(){for(;a.length>0;)r.next(a.shift());r.complete()}))})}function Wt(t){return d(function(n,e){var r=null,a=null,u=function(){a==null||a.unsubscribe();var i=r;r=[],i&&e.next(i),x(t()).subscribe(a=v(e,u,E))};u(),n.subscribe(v(e,function(i){return r==null?void 0:r.push(i)},function(){r&&e.next(r),e.complete()},void 0,function(){return r=a=null}))})}function it(t){return d(function(n,e){var r=null,a=!1,u;r=n.subscribe(v(e,void 0,void 0,function(i){u=x(t(i,it(t)(n))),r?(r.unsubscribe(),r=null,u.subscribe(e)):a=!0})),a&&(r.unsubscribe(),r=null,u.subscribe(e))})}function bn(t,n,e,r,a){return function(u,i){var o=e,f=n,l=0;u.subscribe(v(i,function(c){var s=l++;f=o?t(f,c,s):(o=!0,c),r&&i.next(f)},a&&function(){o&&i.next(f),i.complete()}))}}function K(t,n){return d(bn(t,n,arguments.length>=2,!1,!0))}var ot=function(t,n){return t.push(n),t};function ft(){return d(function(t,n){K(ot,[])(t).subscribe(n)})}function En(t,n){return sn(ft(),W(function(e){return t(e)}),n?O(n):I)}function lt(t){return En(tt,t)}var Ft=lt;function Sn(){for(var t=[],n=0;n=2;return function(r){return r.pipe(Q(function(a,u){return u===t}),q(1),e?_(n):nn(function(){return new an}))}}function Bt(){for(var t=[],n=0;n=2;return function(r){return r.pipe(t?Q(function(a,u){return t(a,u,r)}):I,q(1),e?_(n):nn(function(){return new J}))}}function Zt(t,n,e,r){return d(function(a,u){var i;!n||typeof n=="function"?i=n:(e=n.duration,i=n.element,r=n.connector);var o=new Map,f=function(h){o.forEach(h),h(u)},l=function(h){return f(function(y){return y.error(h)})},c=0,s=!1,m=new vn(u,function(h){try{var y=t(h),p=o.get(y);if(!p){o.set(y,p=r?r():new S);var w=g(y,p);if(u.next(w),e){var b=v(p,function(){p.complete(),b==null||b.unsubscribe()},void 0,void 0,function(){return o.delete(y)});m.add(x(e(w)).subscribe(b))}}p.next(i?i(h):h)}catch(j){l(j)}},function(){return f(function(h){return h.complete()})},l,function(){return o.clear()},function(){return s=!0,c===0});a.subscribe(m);function g(h,y){var p=new R(function(w){c++;var b=y.subscribe(w);return function(){b.unsubscribe(),--c===0&&s&&m.unsubscribe()}});return p.key=h,p}})}function Ht(){return d(function(t,n){t.subscribe(v(n,function(){n.next(!1),n.complete()},function(){n.next(!0),n.complete()}))})}function mt(t){return t<=0?function(){return B}:d(function(n,e){var r=[];n.subscribe(v(e,function(a){r.push(a),t=2;return function(r){return r.pipe(t?Q(function(a,u){return t(a,u,r)}):I,mt(1),e?_(n):nn(function(){return new J}))}}function ne(){return d(function(t,n){t.subscribe(v(n,function(e){n.next(X.createNext(e))},function(){n.next(X.createComplete()),n.complete()},function(e){n.next(X.createError(e)),n.complete()}))})}function te(t){return K(A(t)?function(n,e){return t(n,e)>0?n:e}:function(n,e){return n>e?n:e})}var ee=W;function re(t,n,e){return e===void 0&&(e=1/0),A(n)?W(function(){return t},n,e):(typeof n=="number"&&(e=n),W(function(){return t},e))}function ae(t,n,e){return e===void 0&&(e=1/0),d(function(r,a){var u=n;return pn(r,a,function(i,o){return t(u,i,o)},e,function(i){u=i},!1,void 0,function(){return u=null})})}function gt(){for(var t=[],n=0;n=2,!0))}function xe(t,n){return n===void 0&&(n=function(e,r){return e===r}),d(function(e,r){var a=fn(),u=fn(),i=function(f){r.next(f),r.complete()},o=function(f,l){var c=v(r,function(s){var m=l.buffer,g=l.complete;m.length===0?g?i(!1):f.buffer.push(s):!n(s,m.shift())&&i(!1)},function(){f.complete=!0;var s=l.complete,m=l.buffer;s&&i(m.length===0),c==null||c.unsubscribe()});return c};e.subscribe(o(a,u)),x(t).subscribe(o(u,a))})}function fn(){return{buffer:[],complete:!1}}function be(t){return d(function(n,e){var r=!1,a,u=!1,i=0;n.subscribe(v(e,function(o){u=!0,(!t||t(o,i++,n))&&(r&&e.error(new Gn("Too many matching values")),r=!0,a=o)},function(){r?(e.next(a),e.complete()):e.error(u?new Bn("No matching values"):new J)}))})}function Ee(t){return t<=0?I:d(function(n,e){var r=new Array(t),a=0;return n.subscribe(v(e,function(u){var i=a++;if(i0?n:t;return d(function(r,a){var u=[new S],i=[],o=0;a.next(u[0].asObservable()),r.subscribe(v(a,function(f){var l,c;try{for(var s=k(u),m=s.next();!m.done;m=s.next()){var g=m.value;g.next(f)}}catch(p){l={error:p}}finally{try{m&&!m.done&&(c=s.return)&&c.call(s)}finally{if(l)throw l.error}}var h=o-t+1;if(h>=0&&h%e===0&&u.shift().complete(),++o%e===0){var y=new S;u.push(y),a.next(y.asObservable())}},function(){for(;u.length>0;)u.shift().complete();a.complete()},function(f){for(;u.length>0;)u.shift().error(f);a.error(f)},function(){i=null,u=null}))})}function Le(t){for(var n,e,r=[],a=1;a=0?C(l,u,g,i,!0):s=!0,g();var h=function(p){return c.slice().forEach(p)},y=function(p){h(function(w){var b=w.window;return p(b)}),p(l),l.unsubscribe()};return f.subscribe(v(l,function(p){h(function(w){w.window.next(p),o<=++w.seen&&m(w)})},function(){return y(function(p){return p.complete()})},function(p){return y(function(w){return w.error(p)})})),function(){c=null}})}function ze(t,n){return d(function(e,r){var a=[],u=function(i){for(;0