Server IP : 150.95.80.236 / Your IP : 18.191.103.28 Web Server : Apache System : Linux host-150-95-80-236 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : social-telecare ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/pcu.in.th/api-uat.pcu.in.th/node_modules/rxjs/dist/esm5/internal/operators/ |
Upload File : |
import { __values } from "tslib"; import { Subject } from '../Subject'; import { Subscription } from '../Subscription'; import { operate } from '../util/lift'; import { innerFrom } from '../observable/innerFrom'; import { createOperatorSubscriber } from './OperatorSubscriber'; import { noop } from '../util/noop'; import { arrRemove } from '../util/arrRemove'; export function windowToggle(openings, closingSelector) { return operate(function (source, subscriber) { var windows = []; var handleError = function (err) { while (0 < windows.length) { windows.shift().error(err); } subscriber.error(err); }; innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) { var window = new Subject(); windows.push(window); var closingSubscription = new Subscription(); var closeWindow = function () { arrRemove(windows, window); window.complete(); closingSubscription.unsubscribe(); }; var closingNotifier; try { closingNotifier = innerFrom(closingSelector(openValue)); } catch (err) { handleError(err); return; } subscriber.next(window.asObservable()); closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError))); }, noop)); source.subscribe(createOperatorSubscriber(subscriber, function (value) { var e_1, _a; var windowsCopy = windows.slice(); try { for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { var window_1 = windowsCopy_1_1.value; window_1.next(value); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1); } finally { if (e_1) throw e_1.error; } } }, function () { while (0 < windows.length) { windows.shift().complete(); } subscriber.complete(); }, handleError, function () { while (0 < windows.length) { windows.shift().unsubscribe(); } })); }); } //# sourceMappingURL=windowToggle.js.map