import{a as t}from"./chunk-de721f0a.js";import{a as e,b as n,c as r,d as i,e as s,f as o,g as a,h as u,i as c,j as h,k as f,l as d,m as l,n as p,o as v,p as x,q as m,r as y,s as b}from"./chunk-fec5a75d.js";function g(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new w(t,e,n))}}var w=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new _(t,this.accumulator,this.seed,this.hasSeed))},t}(),_=function(e){function n(t,n,r,i){var s=e.call(this,t)||this;return s.accumulator=n,s._seed=r,s.hasSeed=i,s.index=0,s}return t(n,e),Object.defineProperty(n.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),n.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},n.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},n}(r);function S(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return h(function(t,e){return function(n){for(var r=n,i=0;i<e;i++){var s=r[t[i]];if(void 0===s)return;r=s}return r}}(t,n))(e)}}function j(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];l(n)?t.pop():n=null;var r=t.length;return p(1!==r||n?r>0?x(t,n):m(n):v(t[0]),e)}}function k(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new O(t,e))}}var O=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new C(t,this.predicate,this.inclusive))},t}(),C=function(e){function n(t,n,r){var i=e.call(this,t)||this;return i.predicate=n,i.inclusive=r,i.index=0,i}return t(n,e),n.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}this.nextOrComplete(t,e)},n.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())},n}(r);export{j as a,g as b,S as c,k as d};