{"ast":null,"code":"import _inherits from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/createSuper\";\nimport _classCallCheck from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/createClass\";\nimport { Subscriber } from '../Subscriber';\nexport function filter(predicate, thisArg) {\n  return function filterOperatorFunction(source) {\n    return source.lift(new FilterOperator(predicate, thisArg));\n  };\n}\n\nvar FilterOperator = /*#__PURE__*/function () {\n  function FilterOperator(predicate, thisArg) {\n    _classCallCheck(this, FilterOperator);\n\n    this.predicate = predicate;\n    this.thisArg = thisArg;\n  }\n\n  _createClass(FilterOperator, [{\n    key: \"call\",\n    value: function call(subscriber, source) {\n      return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));\n    }\n  }]);\n\n  return FilterOperator;\n}();\n\nvar FilterSubscriber = /*#__PURE__*/function (_Subscriber) {\n  _inherits(FilterSubscriber, _Subscriber);\n\n  var _super = _createSuper(FilterSubscriber);\n\n  function FilterSubscriber(destination, predicate, thisArg) {\n    var _this;\n\n    _classCallCheck(this, FilterSubscriber);\n\n    _this = _super.call(this, destination);\n    _this.predicate = predicate;\n    _this.thisArg = thisArg;\n    _this.count = 0;\n    return _this;\n  }\n\n  _createClass(FilterSubscriber, [{\n    key: \"_next\",\n    value: function _next(value) {\n      var result;\n\n      try {\n        result = this.predicate.call(this.thisArg, value, this.count++);\n      } catch (err) {\n        this.destination.error(err);\n        return;\n      }\n\n      if (result) {\n        this.destination.next(value);\n      }\n    }\n  }]);\n\n  return FilterSubscriber;\n}(Subscriber); //# sourceMappingURL=filter.js.map","map":null,"metadata":{},"sourceType":"module"}