{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nexport function count(predicate) {\n return source => source.lift(new CountOperator(predicate, source));\n}\nclass CountOperator {\n constructor(predicate, source) {\n this.predicate = predicate;\n this.source = source;\n }\n call(subscriber, source) {\n return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));\n }\n}\nclass CountSubscriber extends Subscriber {\n constructor(destination, predicate, source) {\n super(destination);\n this.predicate = predicate;\n this.source = source;\n this.count = 0;\n this.index = 0;\n }\n _next(value) {\n if (this.predicate) {\n this._tryPredicate(value);\n } else {\n this.count++;\n }\n }\n _tryPredicate(value) {\n let result;\n try {\n result = this.predicate(value, this.index++, this.source);\n } catch (err) {\n this.destination.error(err);\n return;\n }\n if (result) {\n this.count++;\n }\n }\n _complete() {\n this.destination.next(this.count);\n this.destination.complete();\n }\n}","map":{"version":3,"names":["Subscriber","count","predicate","source","lift","CountOperator","constructor","call","subscriber","subscribe","CountSubscriber","destination","index","_next","value","_tryPredicate","result","err","error","_complete","next","complete"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/count.js"],"sourcesContent":["import { Subscriber } from '../Subscriber';\nexport function count(predicate) {\n return (source) => source.lift(new CountOperator(predicate, source));\n}\nclass CountOperator {\n constructor(predicate, source) {\n this.predicate = predicate;\n this.source = source;\n }\n call(subscriber, source) {\n return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));\n }\n}\nclass CountSubscriber extends Subscriber {\n constructor(destination, predicate, source) {\n super(destination);\n this.predicate = predicate;\n this.source = source;\n this.count = 0;\n this.index = 0;\n }\n _next(value) {\n if (this.predicate) {\n this._tryPredicate(value);\n }\n else {\n this.count++;\n }\n }\n _tryPredicate(value) {\n let result;\n try {\n result = this.predicate(value, this.index++, this.source);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n if (result) {\n this.count++;\n }\n }\n _complete() {\n this.destination.next(this.count);\n this.destination.complete();\n }\n}\n"],"mappings":"AAAA,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A,IAAID,MAAM,EAAE;MACR,IAAI,CAACf,KAAK,EAAE;IAChB;EACJ;EACAkB,SAASA,CAAA,EAAG;IACR,IAAI,CAACR,WAAW,CAACS,IAAI,CAAC,IAAI,CAACnB,KAAK,CAAC;IACjC,IAAI,CAACU,WAAW,CAACU,QAAQ,CAAC,CAAC;EAC/B;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}