{"ast":null,"code":"import _get from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/get\";\nimport _getPrototypeOf from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _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 { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function timeoutWith(due, withObservable) {\n  var scheduler = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : async;\n  return function (source) {\n    var absoluteTimeout = isDate(due);\n    var waitFor = absoluteTimeout ? +due - scheduler.now() : Math.abs(due);\n    return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));\n  };\n}\n\nvar TimeoutWithOperator = /*#__PURE__*/function () {\n  function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {\n    _classCallCheck(this, TimeoutWithOperator);\n\n    this.waitFor = waitFor;\n    this.absoluteTimeout = absoluteTimeout;\n    this.withObservable = withObservable;\n    this.scheduler = scheduler;\n  }\n\n  _createClass(TimeoutWithOperator, [{\n    key: \"call\",\n    value: function call(subscriber, source) {\n      return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));\n    }\n  }]);\n\n  return TimeoutWithOperator;\n}();\n\nvar TimeoutWithSubscriber = /*#__PURE__*/function (_SimpleOuterSubscribe) {\n  _inherits(TimeoutWithSubscriber, _SimpleOuterSubscribe);\n\n  var _super = _createSuper(TimeoutWithSubscriber);\n\n  function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {\n    var _this;\n\n    _classCallCheck(this, TimeoutWithSubscriber);\n\n    _this = _super.call(this, destination);\n    _this.absoluteTimeout = absoluteTimeout;\n    _this.waitFor = waitFor;\n    _this.withObservable = withObservable;\n    _this.scheduler = scheduler;\n\n    _this.scheduleTimeout();\n\n    return _this;\n  }\n\n  _createClass(TimeoutWithSubscriber, [{\n    key: \"scheduleTimeout\",\n    value: function scheduleTimeout() {\n      var action = this.action;\n\n      if (action) {\n        this.action = action.schedule(this, this.waitFor);\n      } else {\n        this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));\n      }\n    }\n  }, {\n    key: \"_next\",\n    value: function _next(value) {\n      if (!this.absoluteTimeout) {\n        this.scheduleTimeout();\n      }\n\n      _get(_getPrototypeOf(TimeoutWithSubscriber.prototype), \"_next\", this).call(this, value);\n    }\n  }, {\n    key: \"_unsubscribe\",\n    value: function _unsubscribe() {\n      this.action = undefined;\n      this.scheduler = null;\n      this.withObservable = null;\n    }\n  }], [{\n    key: \"dispatchTimeout\",\n    value: function dispatchTimeout(subscriber) {\n      var withObservable = subscriber.withObservable;\n\n      subscriber._unsubscribeAndRecycle();\n\n      subscriber.add(innerSubscribe(withObservable, new SimpleInnerSubscriber(subscriber)));\n    }\n  }]);\n\n  return TimeoutWithSubscriber;\n}(SimpleOuterSubscriber); //# sourceMappingURL=timeoutWith.js.map","map":null,"metadata":{},"sourceType":"module"}