1 line
No EOL
5.8 KiB
JSON
1 line
No EOL
5.8 KiB
JSON
{"ast":null,"code":"import { Subject } from '../Subject';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function window(windowBoundaries) {\n return function windowOperatorFunction(source) {\n return source.lift(new WindowOperator(windowBoundaries));\n };\n}\nclass WindowOperator {\n constructor(windowBoundaries) {\n this.windowBoundaries = windowBoundaries;\n }\n call(subscriber, source) {\n const windowSubscriber = new WindowSubscriber(subscriber);\n const sourceSubscription = source.subscribe(windowSubscriber);\n if (!sourceSubscription.closed) {\n windowSubscriber.add(innerSubscribe(this.windowBoundaries, new SimpleInnerSubscriber(windowSubscriber)));\n }\n return sourceSubscription;\n }\n}\nclass WindowSubscriber extends SimpleOuterSubscriber {\n constructor(destination) {\n super(destination);\n this.window = new Subject();\n destination.next(this.window);\n }\n notifyNext() {\n this.openWindow();\n }\n notifyError(error) {\n this._error(error);\n }\n notifyComplete() {\n this._complete();\n }\n _next(value) {\n this.window.next(value);\n }\n _error(err) {\n this.window.error(err);\n this.destination.error(err);\n }\n _complete() {\n this.window.complete();\n this.destination.complete();\n }\n _unsubscribe() {\n this.window = null;\n }\n openWindow() {\n const prevWindow = this.window;\n if (prevWindow) {\n prevWindow.complete();\n }\n const destination = this.destination;\n const newWindow = this.window = new Subject();\n destination.next(newWindow);\n }\n}","map":{"version":3,"names":["Subject","SimpleOuterSubscriber","innerSubscribe","SimpleInnerSubscriber","window","windowBoundaries","windowOperatorFunction","source","lift","WindowOperator","constructor","call","subscriber","windowSubscriber","WindowSubscriber","sourceSubscription","subscribe","closed","add","destination","next","notifyNext","openWindow","notifyError","error","_error","notifyComplete","_complete","_next","value","err","complete","_unsubscribe","prevWindow","newWindow"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/window.js"],"sourcesContent":["import { Subject } from '../Subject';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function window(windowBoundaries) {\n return function windowOperatorFunction(source) {\n return source.lift(new WindowOperator(windowBoundaries));\n };\n}\nclass WindowOperator {\n constructor(windowBoundaries) {\n this.windowBoundaries = windowBoundaries;\n }\n call(subscriber, source) {\n const windowSubscriber = new WindowSubscriber(subscriber);\n const sourceSubscription = source.subscribe(windowSubscriber);\n if (!sourceSubscription.closed) {\n windowSubscriber.add(innerSubscribe(this.windowBoundaries, new SimpleInnerSubscriber(windowSubscriber)));\n }\n return sourceSubscription;\n }\n}\nclass WindowSubscriber extends SimpleOuterSubscriber {\n constructor(destination) {\n super(destination);\n this.window = new Subject();\n destination.next(this.window);\n }\n notifyNext() {\n this.openWindow();\n }\n notifyError(error) {\n this._error(error);\n }\n notifyComplete() {\n this._complete();\n }\n _next(value) {\n this.window.next(value);\n }\n _error(err) {\n this.window.error(err);\n this.destination.error(err);\n }\n _complete() {\n this.window.complete();\n this.destination.complete();\n }\n _unsubscribe() {\n this.window = null;\n }\n openWindow() {\n const prevWindow = this.window;\n if (prevWindow) {\n prevWindow.complete();\n }\n const destination = this.destination;\n const newWindow = this.window = new Subject();\n destination.next(newWindow);\n }\n}\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,YAAY;AACpC,SAASC,qBAAqB,EAAEC,cAAc,EAAEC,qBAAqB,QAAQ,mBAAmB;AAChG,OAAO,SAASC,MAAMA,CAACC,gBAAgB,EAAE;EACrC,OAAO,SAASC,sBAAsBA,CAACC,MAAM,EAAE;IAC3C,OAAOA,MAAM,CAACC,IAAI,CAAC,IAAIC,cAAc,CAACJ,gBAAgB,CAAC,CAAC;EAC5D,CAAC;AACL;AACA,MAAMI,cAAc,CAAC;EACjBC,WAAWA,CAACL,gBAAgB,EAAE;IAC1B,IAAI,CAACA,gBAAgB,GAAGA,gBAAgB;EAC5C;EACAM,IAAIA,CAACC,UAAU,EAAEL,MAAM,EAAE;IACrB,MAAMM,gBAAgB,GAAG,IAAIC,gBAAgB,CA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