diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..091671c --- /dev/null +++ b/.gitignore @@ -0,0 +1,132 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +# dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +.vite diff --git a/sandbox/LoAF-blockingDuration-multipleEvents/index.html b/sandbox/LoAF-blockingDuration-multipleEvents/index.html new file mode 100644 index 0000000..ef5ff90 --- /dev/null +++ b/sandbox/LoAF-blockingDuration-multipleEvents/index.html @@ -0,0 +1,13 @@ + + + + + + + Document + + + + + + diff --git a/sandbox/LoAF-blockingDuration-multipleEvents/index.js b/sandbox/LoAF-blockingDuration-multipleEvents/index.js new file mode 100644 index 0000000..d468839 --- /dev/null +++ b/sandbox/LoAF-blockingDuration-multipleEvents/index.js @@ -0,0 +1,28 @@ +import loafs from '../web-mightals.js/lib/loafs.js'; + +function block(ms) { + const target = performance.now() + ms; + while (performance.now() < target) {} +} + +myButton.addEventListener('click', () => { + console.log('click'); + block(100); + requestAnimationFrame(() => { + block(100); + console.log('frame'); + }); + document.body.style.backgroundColor = 'red'; +}); + +loafs().subscribe((loaf) => { + const start = loaf.entries[0].startTime; + const drs = loaf.entries[0].desiredRenderStart; + const end = start + loaf.entries[0].duration; + console.log(loaf.entries[0], { start, drs, end }); + + performance.measure('Event', { start, end }); + performance.measure('Frame', { start: drs, end }); + + // TODO: Scripts? +}); \ No newline at end of file diff --git a/sandbox/LoAF-desiredRenderStart/.vite/deps/_metadata.json b/sandbox/LoAF-desiredRenderStart/.vite/deps/_metadata.json deleted file mode 100644 index 56b47ba..0000000 --- a/sandbox/LoAF-desiredRenderStart/.vite/deps/_metadata.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "hash": "7ab503f8", - "browserHash": "e9d82206", - "optimized": { - "rxjs": { - "src": "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/index.js", - "file": "rxjs.js", - "fileHash": "4bf37e6f", - "needsInterop": false - } - }, - "chunks": {} -} \ No newline at end of file diff --git a/sandbox/LoAF-desiredRenderStart/.vite/deps/package.json b/sandbox/LoAF-desiredRenderStart/.vite/deps/package.json deleted file mode 100644 index 3dbc1ca..0000000 --- a/sandbox/LoAF-desiredRenderStart/.vite/deps/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/sandbox/LoAF-desiredRenderStart/.vite/deps/rxjs.js b/sandbox/LoAF-desiredRenderStart/.vite/deps/rxjs.js deleted file mode 100644 index aaa09e6..0000000 --- a/sandbox/LoAF-desiredRenderStart/.vite/deps/rxjs.js +++ /dev/null @@ -1,5577 +0,0 @@ -// ../web-mightals.js/node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) - if (Object.prototype.hasOwnProperty.call(b2, p)) - d2[p] = b2[p]; - }; - return extendStatics(d, b); -}; -function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) - throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) - throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) - return t; - if (y = 0, t) - op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) - _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) - return m.call(o); - if (o && typeof o.length === "number") - return { - next: function() { - if (o && i >= o.length) - o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) - return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) - ar.push(r.value); - } catch (error) { - e = { error }; - } finally { - try { - if (r && !r.done && (m = i["return"])) - m.call(i); - } finally { - if (e) - throw e.error; - } - } - return ar; -} -function __spreadArray(to, from2, pack) { - if (pack || arguments.length === 2) - for (var i = 0, l = from2.length, ar; i < l; i++) { - if (ar || !(i in from2)) { - if (!ar) - ar = Array.prototype.slice.call(from2, 0, i); - ar[i] = from2[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from2)); -} -function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} -function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) - throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) - resume(q[0][0], q[0][1]); - } -} -function __asyncValues(o) { - if (!Symbol.asyncIterator) - throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve, reject) { - v = o[n](v), settle(resolve, reject, v.done, v.value); - }); - }; - } - function settle(resolve, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve({ value: v2, done: d }); - }, reject); - } -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isFunction.js -function isFunction(value) { - return typeof value === "function"; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js -function createErrorClass(createImpl) { - var _super = function(instance) { - Error.call(instance); - instance.stack = new Error().stack; - }; - var ctorFunc = createImpl(_super); - ctorFunc.prototype = Object.create(Error.prototype); - ctorFunc.prototype.constructor = ctorFunc; - return ctorFunc; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js -var UnsubscriptionError = createErrorClass(function(_super) { - return function UnsubscriptionErrorImpl(errors) { - _super(this); - this.message = errors ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function(err, i) { - return i + 1 + ") " + err.toString(); - }).join("\n ") : ""; - this.name = "UnsubscriptionError"; - this.errors = errors; - }; -}); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js -function arrRemove(arr, item) { - if (arr) { - var index = arr.indexOf(item); - 0 <= index && arr.splice(index, 1); - } -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Subscription.js -var Subscription = function() { - function Subscription2(initialTeardown) { - this.initialTeardown = initialTeardown; - this.closed = false; - this._parentage = null; - this._finalizers = null; - } - Subscription2.prototype.unsubscribe = function() { - var e_1, _a, e_2, _b; - var errors; - if (!this.closed) { - this.closed = true; - var _parentage = this._parentage; - if (_parentage) { - this._parentage = null; - if (Array.isArray(_parentage)) { - try { - for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { - var parent_1 = _parentage_1_1.value; - parent_1.remove(this); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) - _a.call(_parentage_1); - } finally { - if (e_1) - throw e_1.error; - } - } - } else { - _parentage.remove(this); - } - } - var initialFinalizer = this.initialTeardown; - if (isFunction(initialFinalizer)) { - try { - initialFinalizer(); - } catch (e) { - errors = e instanceof UnsubscriptionError ? e.errors : [e]; - } - } - var _finalizers = this._finalizers; - if (_finalizers) { - this._finalizers = null; - try { - for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) { - var finalizer = _finalizers_1_1.value; - try { - execFinalizer(finalizer); - } catch (err) { - errors = errors !== null && errors !== void 0 ? errors : []; - if (err instanceof UnsubscriptionError) { - errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors)); - } else { - errors.push(err); - } - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) - _b.call(_finalizers_1); - } finally { - if (e_2) - throw e_2.error; - } - } - } - if (errors) { - throw new UnsubscriptionError(errors); - } - } - }; - Subscription2.prototype.add = function(teardown) { - var _a; - if (teardown && teardown !== this) { - if (this.closed) { - execFinalizer(teardown); - } else { - if (teardown instanceof Subscription2) { - if (teardown.closed || teardown._hasParent(this)) { - return; - } - teardown._addParent(this); - } - (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); - } - } - }; - Subscription2.prototype._hasParent = function(parent) { - var _parentage = this._parentage; - return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent); - }; - Subscription2.prototype._addParent = function(parent) { - var _parentage = this._parentage; - this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; - }; - Subscription2.prototype._removeParent = function(parent) { - var _parentage = this._parentage; - if (_parentage === parent) { - this._parentage = null; - } else if (Array.isArray(_parentage)) { - arrRemove(_parentage, parent); - } - }; - Subscription2.prototype.remove = function(teardown) { - var _finalizers = this._finalizers; - _finalizers && arrRemove(_finalizers, teardown); - if (teardown instanceof Subscription2) { - teardown._removeParent(this); - } - }; - Subscription2.EMPTY = function() { - var empty2 = new Subscription2(); - empty2.closed = true; - return empty2; - }(); - return Subscription2; -}(); -var EMPTY_SUBSCRIPTION = Subscription.EMPTY; -function isSubscription(value) { - return value instanceof Subscription || value && "closed" in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe); -} -function execFinalizer(finalizer) { - if (isFunction(finalizer)) { - finalizer(); - } else { - finalizer.unsubscribe(); - } -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/config.js -var config = { - onUnhandledError: null, - onStoppedNotification: null, - Promise: void 0, - useDeprecatedSynchronousErrorHandling: false, - useDeprecatedNextContext: false -}; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js -var timeoutProvider = { - setTimeout: function(handler, timeout2) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - var delegate = timeoutProvider.delegate; - if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { - return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout2], __read(args))); - } - return setTimeout.apply(void 0, __spreadArray([handler, timeout2], __read(args))); - }, - clearTimeout: function(handle) { - var delegate = timeoutProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); - }, - delegate: void 0 -}; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js -function reportUnhandledError(err) { - timeoutProvider.setTimeout(function() { - var onUnhandledError = config.onUnhandledError; - if (onUnhandledError) { - onUnhandledError(err); - } else { - throw err; - } - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/noop.js -function noop() { -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js -var COMPLETE_NOTIFICATION = function() { - return createNotification("C", void 0, void 0); -}(); -function errorNotification(error) { - return createNotification("E", void 0, error); -} -function nextNotification(value) { - return createNotification("N", value, void 0); -} -function createNotification(kind, value, error) { - return { - kind, - value, - error - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/errorContext.js -var context = null; -function errorContext(cb) { - if (config.useDeprecatedSynchronousErrorHandling) { - var isRoot = !context; - if (isRoot) { - context = { errorThrown: false, error: null }; - } - cb(); - if (isRoot) { - var _a = context, errorThrown = _a.errorThrown, error = _a.error; - context = null; - if (errorThrown) { - throw error; - } - } - } else { - cb(); - } -} -function captureError(err) { - if (config.useDeprecatedSynchronousErrorHandling && context) { - context.errorThrown = true; - context.error = err; - } -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Subscriber.js -var Subscriber = function(_super) { - __extends(Subscriber2, _super); - function Subscriber2(destination) { - var _this = _super.call(this) || this; - _this.isStopped = false; - if (destination) { - _this.destination = destination; - if (isSubscription(destination)) { - destination.add(_this); - } - } else { - _this.destination = EMPTY_OBSERVER; - } - return _this; - } - Subscriber2.create = function(next, error, complete) { - return new SafeSubscriber(next, error, complete); - }; - Subscriber2.prototype.next = function(value) { - if (this.isStopped) { - handleStoppedNotification(nextNotification(value), this); - } else { - this._next(value); - } - }; - Subscriber2.prototype.error = function(err) { - if (this.isStopped) { - handleStoppedNotification(errorNotification(err), this); - } else { - this.isStopped = true; - this._error(err); - } - }; - Subscriber2.prototype.complete = function() { - if (this.isStopped) { - handleStoppedNotification(COMPLETE_NOTIFICATION, this); - } else { - this.isStopped = true; - this._complete(); - } - }; - Subscriber2.prototype.unsubscribe = function() { - if (!this.closed) { - this.isStopped = true; - _super.prototype.unsubscribe.call(this); - this.destination = null; - } - }; - Subscriber2.prototype._next = function(value) { - this.destination.next(value); - }; - Subscriber2.prototype._error = function(err) { - try { - this.destination.error(err); - } finally { - this.unsubscribe(); - } - }; - Subscriber2.prototype._complete = function() { - try { - this.destination.complete(); - } finally { - this.unsubscribe(); - } - }; - return Subscriber2; -}(Subscription); -var _bind = Function.prototype.bind; -function bind(fn, thisArg) { - return _bind.call(fn, thisArg); -} -var ConsumerObserver = function() { - function ConsumerObserver2(partialObserver) { - this.partialObserver = partialObserver; - } - ConsumerObserver2.prototype.next = function(value) { - var partialObserver = this.partialObserver; - if (partialObserver.next) { - try { - partialObserver.next(value); - } catch (error) { - handleUnhandledError(error); - } - } - }; - ConsumerObserver2.prototype.error = function(err) { - var partialObserver = this.partialObserver; - if (partialObserver.error) { - try { - partialObserver.error(err); - } catch (error) { - handleUnhandledError(error); - } - } else { - handleUnhandledError(err); - } - }; - ConsumerObserver2.prototype.complete = function() { - var partialObserver = this.partialObserver; - if (partialObserver.complete) { - try { - partialObserver.complete(); - } catch (error) { - handleUnhandledError(error); - } - } - }; - return ConsumerObserver2; -}(); -var SafeSubscriber = function(_super) { - __extends(SafeSubscriber2, _super); - function SafeSubscriber2(observerOrNext, error, complete) { - var _this = _super.call(this) || this; - var partialObserver; - if (isFunction(observerOrNext) || !observerOrNext) { - partialObserver = { - next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : void 0, - error: error !== null && error !== void 0 ? error : void 0, - complete: complete !== null && complete !== void 0 ? complete : void 0 - }; - } else { - var context_1; - if (_this && config.useDeprecatedNextContext) { - context_1 = Object.create(observerOrNext); - context_1.unsubscribe = function() { - return _this.unsubscribe(); - }; - partialObserver = { - next: observerOrNext.next && bind(observerOrNext.next, context_1), - error: observerOrNext.error && bind(observerOrNext.error, context_1), - complete: observerOrNext.complete && bind(observerOrNext.complete, context_1) - }; - } else { - partialObserver = observerOrNext; - } - } - _this.destination = new ConsumerObserver(partialObserver); - return _this; - } - return SafeSubscriber2; -}(Subscriber); -function handleUnhandledError(error) { - if (config.useDeprecatedSynchronousErrorHandling) { - captureError(error); - } else { - reportUnhandledError(error); - } -} -function defaultErrorHandler(err) { - throw err; -} -function handleStoppedNotification(notification, subscriber) { - var onStoppedNotification = config.onStoppedNotification; - onStoppedNotification && timeoutProvider.setTimeout(function() { - return onStoppedNotification(notification, subscriber); - }); -} -var EMPTY_OBSERVER = { - closed: true, - next: noop, - error: defaultErrorHandler, - complete: noop -}; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/symbol/observable.js -var observable = function() { - return typeof Symbol === "function" && Symbol.observable || "@@observable"; -}(); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/identity.js -function identity(x) { - return x; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/pipe.js -function pipe() { - var fns = []; - for (var _i = 0; _i < arguments.length; _i++) { - fns[_i] = arguments[_i]; - } - return pipeFromArray(fns); -} -function pipeFromArray(fns) { - if (fns.length === 0) { - return identity; - } - if (fns.length === 1) { - return fns[0]; - } - return function piped(input) { - return fns.reduce(function(prev, fn) { - return fn(prev); - }, input); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Observable.js -var Observable = function() { - function Observable2(subscribe) { - if (subscribe) { - this._subscribe = subscribe; - } - } - Observable2.prototype.lift = function(operator) { - var observable2 = new Observable2(); - observable2.source = this; - observable2.operator = operator; - return observable2; - }; - Observable2.prototype.subscribe = function(observerOrNext, error, complete) { - var _this = this; - var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete); - errorContext(function() { - var _a = _this, operator = _a.operator, source = _a.source; - subscriber.add(operator ? operator.call(subscriber, source) : source ? _this._subscribe(subscriber) : _this._trySubscribe(subscriber)); - }); - return subscriber; - }; - Observable2.prototype._trySubscribe = function(sink) { - try { - return this._subscribe(sink); - } catch (err) { - sink.error(err); - } - }; - Observable2.prototype.forEach = function(next, promiseCtor) { - var _this = this; - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor(function(resolve, reject) { - var subscriber = new SafeSubscriber({ - next: function(value) { - try { - next(value); - } catch (err) { - reject(err); - subscriber.unsubscribe(); - } - }, - error: reject, - complete: resolve - }); - _this.subscribe(subscriber); - }); - }; - Observable2.prototype._subscribe = function(subscriber) { - var _a; - return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); - }; - Observable2.prototype[observable] = function() { - return this; - }; - Observable2.prototype.pipe = function() { - var operations = []; - for (var _i = 0; _i < arguments.length; _i++) { - operations[_i] = arguments[_i]; - } - return pipeFromArray(operations)(this); - }; - Observable2.prototype.toPromise = function(promiseCtor) { - var _this = this; - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor(function(resolve, reject) { - var value; - _this.subscribe(function(x) { - return value = x; - }, function(err) { - return reject(err); - }, function() { - return resolve(value); - }); - }); - }; - Observable2.create = function(subscribe) { - return new Observable2(subscribe); - }; - return Observable2; -}(); -function getPromiseCtor(promiseCtor) { - var _a; - return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise; -} -function isObserver(value) { - return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete); -} -function isSubscriber(value) { - return value && value instanceof Subscriber || isObserver(value) && isSubscription(value); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/lift.js -function hasLift(source) { - return isFunction(source === null || source === void 0 ? void 0 : source.lift); -} -function operate(init) { - return function(source) { - if (hasLift(source)) { - return source.lift(function(liftedSource) { - try { - return init(liftedSource, this); - } catch (err) { - this.error(err); - } - }); - } - throw new TypeError("Unable to lift unknown Observable type"); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js -function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { - return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); -} -var OperatorSubscriber = function(_super) { - __extends(OperatorSubscriber2, _super); - function OperatorSubscriber2(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { - var _this = _super.call(this, destination) || this; - _this.onFinalize = onFinalize; - _this.shouldUnsubscribe = shouldUnsubscribe; - _this._next = onNext ? function(value) { - try { - onNext(value); - } catch (err) { - destination.error(err); - } - } : _super.prototype._next; - _this._error = onError ? function(err) { - try { - onError(err); - } catch (err2) { - destination.error(err2); - } finally { - this.unsubscribe(); - } - } : _super.prototype._error; - _this._complete = onComplete ? function() { - try { - onComplete(); - } catch (err) { - destination.error(err); - } finally { - this.unsubscribe(); - } - } : _super.prototype._complete; - return _this; - } - OperatorSubscriber2.prototype.unsubscribe = function() { - var _a; - if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { - var closed_1 = this.closed; - _super.prototype.unsubscribe.call(this); - !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); - } - }; - return OperatorSubscriber2; -}(Subscriber); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/refCount.js -function refCount() { - return operate(function(source, subscriber) { - var connection = null; - source._refCount++; - var refCounter = createOperatorSubscriber(subscriber, void 0, void 0, void 0, function() { - if (!source || source._refCount <= 0 || 0 < --source._refCount) { - connection = null; - return; - } - var sharedConnection = source._connection; - var conn = connection; - connection = null; - if (sharedConnection && (!conn || sharedConnection === conn)) { - sharedConnection.unsubscribe(); - } - subscriber.unsubscribe(); - }); - source.subscribe(refCounter); - if (!refCounter.closed) { - connection = source.connect(); - } - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js -var ConnectableObservable = function(_super) { - __extends(ConnectableObservable2, _super); - function ConnectableObservable2(source, subjectFactory) { - var _this = _super.call(this) || this; - _this.source = source; - _this.subjectFactory = subjectFactory; - _this._subject = null; - _this._refCount = 0; - _this._connection = null; - if (hasLift(source)) { - _this.lift = source.lift; - } - return _this; - } - ConnectableObservable2.prototype._subscribe = function(subscriber) { - return this.getSubject().subscribe(subscriber); - }; - ConnectableObservable2.prototype.getSubject = function() { - var subject = this._subject; - if (!subject || subject.isStopped) { - this._subject = this.subjectFactory(); - } - return this._subject; - }; - ConnectableObservable2.prototype._teardown = function() { - this._refCount = 0; - var _connection = this._connection; - this._subject = this._connection = null; - _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); - }; - ConnectableObservable2.prototype.connect = function() { - var _this = this; - var connection = this._connection; - if (!connection) { - connection = this._connection = new Subscription(); - var subject_1 = this.getSubject(); - connection.add(this.source.subscribe(createOperatorSubscriber(subject_1, void 0, function() { - _this._teardown(); - subject_1.complete(); - }, function(err) { - _this._teardown(); - subject_1.error(err); - }, function() { - return _this._teardown(); - }))); - if (connection.closed) { - this._connection = null; - connection = Subscription.EMPTY; - } - } - return connection; - }; - ConnectableObservable2.prototype.refCount = function() { - return refCount()(this); - }; - return ConnectableObservable2; -}(Observable); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js -var performanceTimestampProvider = { - now: function() { - return (performanceTimestampProvider.delegate || performance).now(); - }, - delegate: void 0 -}; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js -var animationFrameProvider = { - schedule: function(callback) { - var request = requestAnimationFrame; - var cancel = cancelAnimationFrame; - var delegate = animationFrameProvider.delegate; - if (delegate) { - request = delegate.requestAnimationFrame; - cancel = delegate.cancelAnimationFrame; - } - var handle = request(function(timestamp2) { - cancel = void 0; - callback(timestamp2); - }); - return new Subscription(function() { - return cancel === null || cancel === void 0 ? void 0 : cancel(handle); - }); - }, - requestAnimationFrame: function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = animationFrameProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args))); - }, - cancelAnimationFrame: function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = animationFrameProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args))); - }, - delegate: void 0 -}; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js -function animationFrames(timestampProvider) { - return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; -} -function animationFramesFactory(timestampProvider) { - return new Observable(function(subscriber) { - var provider = timestampProvider || performanceTimestampProvider; - var start = provider.now(); - var id = 0; - var run = function() { - if (!subscriber.closed) { - id = animationFrameProvider.requestAnimationFrame(function(timestamp2) { - id = 0; - var now = provider.now(); - subscriber.next({ - timestamp: timestampProvider ? now : timestamp2, - elapsed: now - start - }); - run(); - }); - } - }; - run(); - return function() { - if (id) { - animationFrameProvider.cancelAnimationFrame(id); - } - }; - }); -} -var DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js -var ObjectUnsubscribedError = createErrorClass(function(_super) { - return function ObjectUnsubscribedErrorImpl() { - _super(this); - this.name = "ObjectUnsubscribedError"; - this.message = "object unsubscribed"; - }; -}); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Subject.js -var Subject = function(_super) { - __extends(Subject2, _super); - function Subject2() { - var _this = _super.call(this) || this; - _this.closed = false; - _this.currentObservers = null; - _this.observers = []; - _this.isStopped = false; - _this.hasError = false; - _this.thrownError = null; - return _this; - } - Subject2.prototype.lift = function(operator) { - var subject = new AnonymousSubject(this, this); - subject.operator = operator; - return subject; - }; - Subject2.prototype._throwIfClosed = function() { - if (this.closed) { - throw new ObjectUnsubscribedError(); - } - }; - Subject2.prototype.next = function(value) { - var _this = this; - errorContext(function() { - var e_1, _a; - _this._throwIfClosed(); - if (!_this.isStopped) { - if (!_this.currentObservers) { - _this.currentObservers = Array.from(_this.observers); - } - try { - for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) { - var observer = _c.value; - observer.next(value); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) - _a.call(_b); - } finally { - if (e_1) - throw e_1.error; - } - } - } - }); - }; - Subject2.prototype.error = function(err) { - var _this = this; - errorContext(function() { - _this._throwIfClosed(); - if (!_this.isStopped) { - _this.hasError = _this.isStopped = true; - _this.thrownError = err; - var observers = _this.observers; - while (observers.length) { - observers.shift().error(err); - } - } - }); - }; - Subject2.prototype.complete = function() { - var _this = this; - errorContext(function() { - _this._throwIfClosed(); - if (!_this.isStopped) { - _this.isStopped = true; - var observers = _this.observers; - while (observers.length) { - observers.shift().complete(); - } - } - }); - }; - Subject2.prototype.unsubscribe = function() { - this.isStopped = this.closed = true; - this.observers = this.currentObservers = null; - }; - Object.defineProperty(Subject2.prototype, "observed", { - get: function() { - var _a; - return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; - }, - enumerable: false, - configurable: true - }); - Subject2.prototype._trySubscribe = function(subscriber) { - this._throwIfClosed(); - return _super.prototype._trySubscribe.call(this, subscriber); - }; - Subject2.prototype._subscribe = function(subscriber) { - this._throwIfClosed(); - this._checkFinalizedStatuses(subscriber); - return this._innerSubscribe(subscriber); - }; - Subject2.prototype._innerSubscribe = function(subscriber) { - var _this = this; - var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers; - if (hasError || isStopped) { - return EMPTY_SUBSCRIPTION; - } - this.currentObservers = null; - observers.push(subscriber); - return new Subscription(function() { - _this.currentObservers = null; - arrRemove(observers, subscriber); - }); - }; - Subject2.prototype._checkFinalizedStatuses = function(subscriber) { - var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped; - if (hasError) { - subscriber.error(thrownError); - } else if (isStopped) { - subscriber.complete(); - } - }; - Subject2.prototype.asObservable = function() { - var observable2 = new Observable(); - observable2.source = this; - return observable2; - }; - Subject2.create = function(destination, source) { - return new AnonymousSubject(destination, source); - }; - return Subject2; -}(Observable); -var AnonymousSubject = function(_super) { - __extends(AnonymousSubject2, _super); - function AnonymousSubject2(destination, source) { - var _this = _super.call(this) || this; - _this.destination = destination; - _this.source = source; - return _this; - } - AnonymousSubject2.prototype.next = function(value) { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); - }; - AnonymousSubject2.prototype.error = function(err) { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); - }; - AnonymousSubject2.prototype.complete = function() { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); - }; - AnonymousSubject2.prototype._subscribe = function(subscriber) { - var _a, _b; - return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION; - }; - return AnonymousSubject2; -}(Subject); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js -var BehaviorSubject = function(_super) { - __extends(BehaviorSubject2, _super); - function BehaviorSubject2(_value) { - var _this = _super.call(this) || this; - _this._value = _value; - return _this; - } - Object.defineProperty(BehaviorSubject2.prototype, "value", { - get: function() { - return this.getValue(); - }, - enumerable: false, - configurable: true - }); - BehaviorSubject2.prototype._subscribe = function(subscriber) { - var subscription = _super.prototype._subscribe.call(this, subscriber); - !subscription.closed && subscriber.next(this._value); - return subscription; - }; - BehaviorSubject2.prototype.getValue = function() { - var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value; - if (hasError) { - throw thrownError; - } - this._throwIfClosed(); - return _value; - }; - BehaviorSubject2.prototype.next = function(value) { - _super.prototype.next.call(this, this._value = value); - }; - return BehaviorSubject2; -}(Subject); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js -var dateTimestampProvider = { - now: function() { - return (dateTimestampProvider.delegate || Date).now(); - }, - delegate: void 0 -}; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js -var ReplaySubject = function(_super) { - __extends(ReplaySubject2, _super); - function ReplaySubject2(_bufferSize, _windowTime, _timestampProvider) { - if (_bufferSize === void 0) { - _bufferSize = Infinity; - } - if (_windowTime === void 0) { - _windowTime = Infinity; - } - if (_timestampProvider === void 0) { - _timestampProvider = dateTimestampProvider; - } - var _this = _super.call(this) || this; - _this._bufferSize = _bufferSize; - _this._windowTime = _windowTime; - _this._timestampProvider = _timestampProvider; - _this._buffer = []; - _this._infiniteTimeWindow = true; - _this._infiniteTimeWindow = _windowTime === Infinity; - _this._bufferSize = Math.max(1, _bufferSize); - _this._windowTime = Math.max(1, _windowTime); - return _this; - } - ReplaySubject2.prototype.next = function(value) { - var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime; - if (!isStopped) { - _buffer.push(value); - !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); - } - this._trimBuffer(); - _super.prototype.next.call(this, value); - }; - ReplaySubject2.prototype._subscribe = function(subscriber) { - this._throwIfClosed(); - this._trimBuffer(); - var subscription = this._innerSubscribe(subscriber); - var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer; - var copy = _buffer.slice(); - for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { - subscriber.next(copy[i]); - } - this._checkFinalizedStatuses(subscriber); - return subscription; - }; - ReplaySubject2.prototype._trimBuffer = function() { - var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow; - var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; - _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); - if (!_infiniteTimeWindow) { - var now = _timestampProvider.now(); - var last3 = 0; - for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { - last3 = i; - } - last3 && _buffer.splice(0, last3 + 1); - } - }; - return ReplaySubject2; -}(Subject); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/AsyncSubject.js -var AsyncSubject = function(_super) { - __extends(AsyncSubject2, _super); - function AsyncSubject2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._value = null; - _this._hasValue = false; - _this._isComplete = false; - return _this; - } - AsyncSubject2.prototype._checkFinalizedStatuses = function(subscriber) { - var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete; - if (hasError) { - subscriber.error(thrownError); - } else if (isStopped || _isComplete) { - _hasValue && subscriber.next(_value); - subscriber.complete(); - } - }; - AsyncSubject2.prototype.next = function(value) { - if (!this.isStopped) { - this._value = value; - this._hasValue = true; - } - }; - AsyncSubject2.prototype.complete = function() { - var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete; - if (!_isComplete) { - this._isComplete = true; - _hasValue && _super.prototype.next.call(this, _value); - _super.prototype.complete.call(this); - } - }; - return AsyncSubject2; -}(Subject); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js -var Action = function(_super) { - __extends(Action2, _super); - function Action2(scheduler, work) { - return _super.call(this) || this; - } - Action2.prototype.schedule = function(state, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - return this; - }; - return Action2; -}(Subscription); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js -var intervalProvider = { - setInterval: function(handler, timeout2) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - var delegate = intervalProvider.delegate; - if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { - return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout2], __read(args))); - } - return setInterval.apply(void 0, __spreadArray([handler, timeout2], __read(args))); - }, - clearInterval: function(handle) { - var delegate = intervalProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); - }, - delegate: void 0 -}; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js -var AsyncAction = function(_super) { - __extends(AsyncAction2, _super); - function AsyncAction2(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - _this.pending = false; - return _this; - } - AsyncAction2.prototype.schedule = function(state, delay2) { - var _a; - if (delay2 === void 0) { - delay2 = 0; - } - if (this.closed) { - return this; - } - this.state = state; - var id = this.id; - var scheduler = this.scheduler; - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, delay2); - } - this.pending = true; - this.delay = delay2; - this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay2); - return this; - }; - AsyncAction2.prototype.requestAsyncId = function(scheduler, _id, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay2); - }; - AsyncAction2.prototype.recycleAsyncId = function(_scheduler, id, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - if (delay2 != null && this.delay === delay2 && this.pending === false) { - return id; - } - if (id != null) { - intervalProvider.clearInterval(id); - } - return void 0; - }; - AsyncAction2.prototype.execute = function(state, delay2) { - if (this.closed) { - return new Error("executing a cancelled action"); - } - this.pending = false; - var error = this._execute(state, delay2); - if (error) { - return error; - } else if (this.pending === false && this.id != null) { - this.id = this.recycleAsyncId(this.scheduler, this.id, null); - } - }; - AsyncAction2.prototype._execute = function(state, _delay) { - var errored = false; - var errorValue; - try { - this.work(state); - } catch (e) { - errored = true; - errorValue = e ? e : new Error("Scheduled action threw falsy error"); - } - if (errored) { - this.unsubscribe(); - return errorValue; - } - }; - AsyncAction2.prototype.unsubscribe = function() { - if (!this.closed) { - var _a = this, id = _a.id, scheduler = _a.scheduler; - var actions = scheduler.actions; - this.work = this.state = this.scheduler = null; - this.pending = false; - arrRemove(actions, this); - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, null); - } - this.delay = null; - _super.prototype.unsubscribe.call(this); - } - }; - return AsyncAction2; -}(Action); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/Immediate.js -var nextHandle = 1; -var resolved; -var activeHandles = {}; -function findAndClearHandle(handle) { - if (handle in activeHandles) { - delete activeHandles[handle]; - return true; - } - return false; -} -var Immediate = { - setImmediate: function(cb) { - var handle = nextHandle++; - activeHandles[handle] = true; - if (!resolved) { - resolved = Promise.resolve(); - } - resolved.then(function() { - return findAndClearHandle(handle) && cb(); - }); - return handle; - }, - clearImmediate: function(handle) { - findAndClearHandle(handle); - } -}; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js -var setImmediate = Immediate.setImmediate; -var clearImmediate = Immediate.clearImmediate; -var immediateProvider = { - setImmediate: function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = immediateProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args))); - }, - clearImmediate: function(handle) { - var delegate = immediateProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); - }, - delegate: void 0 -}; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js -var AsapAction = function(_super) { - __extends(AsapAction2, _super); - function AsapAction2(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - AsapAction2.prototype.requestAsyncId = function(scheduler, id, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - if (delay2 !== null && delay2 > 0) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay2); - } - scheduler.actions.push(this); - return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, void 0))); - }; - AsapAction2.prototype.recycleAsyncId = function(scheduler, id, delay2) { - var _a; - if (delay2 === void 0) { - delay2 = 0; - } - if (delay2 != null ? delay2 > 0 : this.delay > 0) { - return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay2); - } - var actions = scheduler.actions; - if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { - immediateProvider.clearImmediate(id); - if (scheduler._scheduled === id) { - scheduler._scheduled = void 0; - } - } - return void 0; - }; - return AsapAction2; -}(AsyncAction); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Scheduler.js -var Scheduler = function() { - function Scheduler2(schedulerActionCtor, now) { - if (now === void 0) { - now = Scheduler2.now; - } - this.schedulerActionCtor = schedulerActionCtor; - this.now = now; - } - Scheduler2.prototype.schedule = function(work, delay2, state) { - if (delay2 === void 0) { - delay2 = 0; - } - return new this.schedulerActionCtor(this, work).schedule(state, delay2); - }; - Scheduler2.now = dateTimestampProvider.now; - return Scheduler2; -}(); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js -var AsyncScheduler = function(_super) { - __extends(AsyncScheduler2, _super); - function AsyncScheduler2(SchedulerAction, now) { - if (now === void 0) { - now = Scheduler.now; - } - var _this = _super.call(this, SchedulerAction, now) || this; - _this.actions = []; - _this._active = false; - return _this; - } - AsyncScheduler2.prototype.flush = function(action) { - var actions = this.actions; - if (this._active) { - actions.push(action); - return; - } - var error; - this._active = true; - do { - if (error = action.execute(action.state, action.delay)) { - break; - } - } while (action = actions.shift()); - this._active = false; - if (error) { - while (action = actions.shift()) { - action.unsubscribe(); - } - throw error; - } - }; - return AsyncScheduler2; -}(Scheduler); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js -var AsapScheduler = function(_super) { - __extends(AsapScheduler2, _super); - function AsapScheduler2() { - return _super !== null && _super.apply(this, arguments) || this; - } - AsapScheduler2.prototype.flush = function(action) { - this._active = true; - var flushId = this._scheduled; - this._scheduled = void 0; - var actions = this.actions; - var error; - action = action || actions.shift(); - do { - if (error = action.execute(action.state, action.delay)) { - break; - } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); - this._active = false; - if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { - action.unsubscribe(); - } - throw error; - } - }; - return AsapScheduler2; -}(AsyncScheduler); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js -var asapScheduler = new AsapScheduler(AsapAction); -var asap = asapScheduler; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/async.js -var asyncScheduler = new AsyncScheduler(AsyncAction); -var async = asyncScheduler; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js -var QueueAction = function(_super) { - __extends(QueueAction2, _super); - function QueueAction2(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - QueueAction2.prototype.schedule = function(state, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - if (delay2 > 0) { - return _super.prototype.schedule.call(this, state, delay2); - } - this.delay = delay2; - this.state = state; - this.scheduler.flush(this); - return this; - }; - QueueAction2.prototype.execute = function(state, delay2) { - return delay2 > 0 || this.closed ? _super.prototype.execute.call(this, state, delay2) : this._execute(state, delay2); - }; - QueueAction2.prototype.requestAsyncId = function(scheduler, id, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - if (delay2 != null && delay2 > 0 || delay2 == null && this.delay > 0) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay2); - } - scheduler.flush(this); - return 0; - }; - return QueueAction2; -}(AsyncAction); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js -var QueueScheduler = function(_super) { - __extends(QueueScheduler2, _super); - function QueueScheduler2() { - return _super !== null && _super.apply(this, arguments) || this; - } - return QueueScheduler2; -}(AsyncScheduler); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/queue.js -var queueScheduler = new QueueScheduler(QueueAction); -var queue = queueScheduler; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js -var AnimationFrameAction = function(_super) { - __extends(AnimationFrameAction2, _super); - function AnimationFrameAction2(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - AnimationFrameAction2.prototype.requestAsyncId = function(scheduler, id, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - if (delay2 !== null && delay2 > 0) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay2); - } - scheduler.actions.push(this); - return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(function() { - return scheduler.flush(void 0); - })); - }; - AnimationFrameAction2.prototype.recycleAsyncId = function(scheduler, id, delay2) { - var _a; - if (delay2 === void 0) { - delay2 = 0; - } - if (delay2 != null ? delay2 > 0 : this.delay > 0) { - return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay2); - } - var actions = scheduler.actions; - if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { - animationFrameProvider.cancelAnimationFrame(id); - scheduler._scheduled = void 0; - } - return void 0; - }; - return AnimationFrameAction2; -}(AsyncAction); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js -var AnimationFrameScheduler = function(_super) { - __extends(AnimationFrameScheduler2, _super); - function AnimationFrameScheduler2() { - return _super !== null && _super.apply(this, arguments) || this; - } - AnimationFrameScheduler2.prototype.flush = function(action) { - this._active = true; - var flushId = this._scheduled; - this._scheduled = void 0; - var actions = this.actions; - var error; - action = action || actions.shift(); - do { - if (error = action.execute(action.state, action.delay)) { - break; - } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); - this._active = false; - if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { - action.unsubscribe(); - } - throw error; - } - }; - return AnimationFrameScheduler2; -}(AsyncScheduler); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js -var animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction); -var animationFrame = animationFrameScheduler; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js -var VirtualTimeScheduler = function(_super) { - __extends(VirtualTimeScheduler2, _super); - function VirtualTimeScheduler2(schedulerActionCtor, maxFrames) { - if (schedulerActionCtor === void 0) { - schedulerActionCtor = VirtualAction; - } - if (maxFrames === void 0) { - maxFrames = Infinity; - } - var _this = _super.call(this, schedulerActionCtor, function() { - return _this.frame; - }) || this; - _this.maxFrames = maxFrames; - _this.frame = 0; - _this.index = -1; - return _this; - } - VirtualTimeScheduler2.prototype.flush = function() { - var _a = this, actions = _a.actions, maxFrames = _a.maxFrames; - var error; - var action; - while ((action = actions[0]) && action.delay <= maxFrames) { - actions.shift(); - this.frame = action.delay; - if (error = action.execute(action.state, action.delay)) { - break; - } - } - if (error) { - while (action = actions.shift()) { - action.unsubscribe(); - } - throw error; - } - }; - VirtualTimeScheduler2.frameTimeFactor = 10; - return VirtualTimeScheduler2; -}(AsyncScheduler); -var VirtualAction = function(_super) { - __extends(VirtualAction2, _super); - function VirtualAction2(scheduler, work, index) { - if (index === void 0) { - index = scheduler.index += 1; - } - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - _this.index = index; - _this.active = true; - _this.index = scheduler.index = index; - return _this; - } - VirtualAction2.prototype.schedule = function(state, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - if (Number.isFinite(delay2)) { - if (!this.id) { - return _super.prototype.schedule.call(this, state, delay2); - } - this.active = false; - var action = new VirtualAction2(this.scheduler, this.work); - this.add(action); - return action.schedule(state, delay2); - } else { - return Subscription.EMPTY; - } - }; - VirtualAction2.prototype.requestAsyncId = function(scheduler, id, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - this.delay = scheduler.frame + delay2; - var actions = scheduler.actions; - actions.push(this); - actions.sort(VirtualAction2.sortActions); - return 1; - }; - VirtualAction2.prototype.recycleAsyncId = function(scheduler, id, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - return void 0; - }; - VirtualAction2.prototype._execute = function(state, delay2) { - if (this.active === true) { - return _super.prototype._execute.call(this, state, delay2); - } - }; - VirtualAction2.sortActions = function(a, b) { - if (a.delay === b.delay) { - if (a.index === b.index) { - return 0; - } else if (a.index > b.index) { - return 1; - } else { - return -1; - } - } else if (a.delay > b.delay) { - return 1; - } else { - return -1; - } - }; - return VirtualAction2; -}(AsyncAction); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/empty.js -var EMPTY = new Observable(function(subscriber) { - return subscriber.complete(); -}); -function empty(scheduler) { - return scheduler ? emptyScheduled(scheduler) : EMPTY; -} -function emptyScheduled(scheduler) { - return new Observable(function(subscriber) { - return scheduler.schedule(function() { - return subscriber.complete(); - }); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js -function isScheduler(value) { - return value && isFunction(value.schedule); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/args.js -function last(arr) { - return arr[arr.length - 1]; -} -function popResultSelector(args) { - return isFunction(last(args)) ? args.pop() : void 0; -} -function popScheduler(args) { - return isScheduler(last(args)) ? args.pop() : void 0; -} -function popNumber(args, defaultValue) { - return typeof last(args) === "number" ? args.pop() : defaultValue; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js -var isArrayLike = function(x) { - return x && typeof x.length === "number" && typeof x !== "function"; -}; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isPromise.js -function isPromise(value) { - return isFunction(value === null || value === void 0 ? void 0 : value.then); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js -function isInteropObservable(input) { - return isFunction(input[observable]); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js -function isAsyncIterable(obj) { - return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js -function createInvalidObservableTypeError(input) { - return new TypeError("You provided " + (input !== null && typeof input === "object" ? "an invalid object" : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js -function getSymbolIterator() { - if (typeof Symbol !== "function" || !Symbol.iterator) { - return "@@iterator"; - } - return Symbol.iterator; -} -var iterator = getSymbolIterator(); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isIterable.js -function isIterable(input) { - return isFunction(input === null || input === void 0 ? void 0 : input[iterator]); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js -function readableStreamLikeToAsyncGenerator(readableStream) { - return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() { - var reader, _a, value, done; - return __generator(this, function(_b) { - switch (_b.label) { - case 0: - reader = readableStream.getReader(); - _b.label = 1; - case 1: - _b.trys.push([1, , 9, 10]); - _b.label = 2; - case 2: - if (false) - return [3, 8]; - return [4, __await(reader.read())]; - case 3: - _a = _b.sent(), value = _a.value, done = _a.done; - if (!done) - return [3, 5]; - return [4, __await(void 0)]; - case 4: - return [2, _b.sent()]; - case 5: - return [4, __await(value)]; - case 6: - return [4, _b.sent()]; - case 7: - _b.sent(); - return [3, 2]; - case 8: - return [3, 10]; - case 9: - reader.releaseLock(); - return [7]; - case 10: - return [2]; - } - }); - }); -} -function isReadableStreamLike(obj) { - return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js -function innerFrom(input) { - if (input instanceof Observable) { - return input; - } - if (input != null) { - if (isInteropObservable(input)) { - return fromInteropObservable(input); - } - if (isArrayLike(input)) { - return fromArrayLike(input); - } - if (isPromise(input)) { - return fromPromise(input); - } - if (isAsyncIterable(input)) { - return fromAsyncIterable(input); - } - if (isIterable(input)) { - return fromIterable(input); - } - if (isReadableStreamLike(input)) { - return fromReadableStreamLike(input); - } - } - throw createInvalidObservableTypeError(input); -} -function fromInteropObservable(obj) { - return new Observable(function(subscriber) { - var obs = obj[observable](); - if (isFunction(obs.subscribe)) { - return obs.subscribe(subscriber); - } - throw new TypeError("Provided object does not correctly implement Symbol.observable"); - }); -} -function fromArrayLike(array) { - return new Observable(function(subscriber) { - for (var i = 0; i < array.length && !subscriber.closed; i++) { - subscriber.next(array[i]); - } - subscriber.complete(); - }); -} -function fromPromise(promise) { - return new Observable(function(subscriber) { - promise.then(function(value) { - if (!subscriber.closed) { - subscriber.next(value); - subscriber.complete(); - } - }, function(err) { - return subscriber.error(err); - }).then(null, reportUnhandledError); - }); -} -function fromIterable(iterable) { - return new Observable(function(subscriber) { - var e_1, _a; - try { - for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { - var value = iterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return; - } - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) - _a.call(iterable_1); - } finally { - if (e_1) - throw e_1.error; - } - } - subscriber.complete(); - }); -} -function fromAsyncIterable(asyncIterable) { - return new Observable(function(subscriber) { - process(asyncIterable, subscriber).catch(function(err) { - return subscriber.error(err); - }); - }); -} -function fromReadableStreamLike(readableStream) { - return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream)); -} -function process(asyncIterable, subscriber) { - var asyncIterable_1, asyncIterable_1_1; - var e_2, _a; - return __awaiter(this, void 0, void 0, function() { - var value, e_2_1; - return __generator(this, function(_b) { - switch (_b.label) { - case 0: - _b.trys.push([0, 5, 6, 11]); - asyncIterable_1 = __asyncValues(asyncIterable); - _b.label = 1; - case 1: - return [4, asyncIterable_1.next()]; - case 2: - if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) - return [3, 4]; - value = asyncIterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return [2]; - } - _b.label = 3; - case 3: - return [3, 1]; - case 4: - return [3, 11]; - case 5: - e_2_1 = _b.sent(); - e_2 = { error: e_2_1 }; - return [3, 11]; - case 6: - _b.trys.push([6, , 9, 10]); - if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) - return [3, 8]; - return [4, _a.call(asyncIterable_1)]; - case 7: - _b.sent(); - _b.label = 8; - case 8: - return [3, 10]; - case 9: - if (e_2) - throw e_2.error; - return [7]; - case 10: - return [7]; - case 11: - subscriber.complete(); - return [2]; - } - }); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js -function executeSchedule(parentSubscription, scheduler, work, delay2, repeat2) { - if (delay2 === void 0) { - delay2 = 0; - } - if (repeat2 === void 0) { - repeat2 = false; - } - var scheduleSubscription = scheduler.schedule(function() { - work(); - if (repeat2) { - parentSubscription.add(this.schedule(null, delay2)); - } else { - this.unsubscribe(); - } - }, delay2); - parentSubscription.add(scheduleSubscription); - if (!repeat2) { - return scheduleSubscription; - } -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js -function observeOn(scheduler, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - return operate(function(source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - return executeSchedule(subscriber, scheduler, function() { - return subscriber.next(value); - }, delay2); - }, function() { - return executeSchedule(subscriber, scheduler, function() { - return subscriber.complete(); - }, delay2); - }, function(err) { - return executeSchedule(subscriber, scheduler, function() { - return subscriber.error(err); - }, delay2); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js -function subscribeOn(scheduler, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - return operate(function(source, subscriber) { - subscriber.add(scheduler.schedule(function() { - return source.subscribe(subscriber); - }, delay2)); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js -function scheduleObservable(input, scheduler) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js -function schedulePromise(input, scheduler) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js -function scheduleArray(input, scheduler) { - return new Observable(function(subscriber) { - var i = 0; - return scheduler.schedule(function() { - if (i === input.length) { - subscriber.complete(); - } else { - subscriber.next(input[i++]); - if (!subscriber.closed) { - this.schedule(); - } - } - }); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js -function scheduleIterable(input, scheduler) { - return new Observable(function(subscriber) { - var iterator2; - executeSchedule(subscriber, scheduler, function() { - iterator2 = input[iterator](); - executeSchedule(subscriber, scheduler, function() { - var _a; - var value; - var done; - try { - _a = iterator2.next(), value = _a.value, done = _a.done; - } catch (err) { - subscriber.error(err); - return; - } - if (done) { - subscriber.complete(); - } else { - subscriber.next(value); - } - }, 0, true); - }); - return function() { - return isFunction(iterator2 === null || iterator2 === void 0 ? void 0 : iterator2.return) && iterator2.return(); - }; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js -function scheduleAsyncIterable(input, scheduler) { - if (!input) { - throw new Error("Iterable cannot be null"); - } - return new Observable(function(subscriber) { - executeSchedule(subscriber, scheduler, function() { - var iterator2 = input[Symbol.asyncIterator](); - executeSchedule(subscriber, scheduler, function() { - iterator2.next().then(function(result) { - if (result.done) { - subscriber.complete(); - } else { - subscriber.next(result.value); - } - }); - }, 0, true); - }); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js -function scheduleReadableStreamLike(input, scheduler) { - return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js -function scheduled(input, scheduler) { - if (input != null) { - if (isInteropObservable(input)) { - return scheduleObservable(input, scheduler); - } - if (isArrayLike(input)) { - return scheduleArray(input, scheduler); - } - if (isPromise(input)) { - return schedulePromise(input, scheduler); - } - if (isAsyncIterable(input)) { - return scheduleAsyncIterable(input, scheduler); - } - if (isIterable(input)) { - return scheduleIterable(input, scheduler); - } - if (isReadableStreamLike(input)) { - return scheduleReadableStreamLike(input, scheduler); - } - } - throw createInvalidObservableTypeError(input); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/from.js -function from(input, scheduler) { - return scheduler ? scheduled(input, scheduler) : innerFrom(input); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/of.js -function of() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - return from(args, scheduler); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/throwError.js -function throwError(errorOrErrorFactory, scheduler) { - var errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function() { - return errorOrErrorFactory; - }; - var init = function(subscriber) { - return subscriber.error(errorFactory()); - }; - return new Observable(scheduler ? function(subscriber) { - return scheduler.schedule(init, 0, subscriber); - } : init); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Notification.js -var NotificationKind; -(function(NotificationKind2) { - NotificationKind2["NEXT"] = "N"; - NotificationKind2["ERROR"] = "E"; - NotificationKind2["COMPLETE"] = "C"; -})(NotificationKind || (NotificationKind = {})); -var Notification = function() { - function Notification2(kind, value, error) { - this.kind = kind; - this.value = value; - this.error = error; - this.hasValue = kind === "N"; - } - Notification2.prototype.observe = function(observer) { - return observeNotification(this, observer); - }; - Notification2.prototype.do = function(nextHandler, errorHandler, completeHandler) { - var _a = this, kind = _a.kind, value = _a.value, error = _a.error; - return kind === "N" ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === "E" ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler(); - }; - Notification2.prototype.accept = function(nextOrObserver, error, complete) { - var _a; - return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next) ? this.observe(nextOrObserver) : this.do(nextOrObserver, error, complete); - }; - Notification2.prototype.toObservable = function() { - var _a = this, kind = _a.kind, value = _a.value, error = _a.error; - var result = kind === "N" ? of(value) : kind === "E" ? throwError(function() { - return error; - }) : kind === "C" ? EMPTY : 0; - if (!result) { - throw new TypeError("Unexpected notification kind " + kind); - } - return result; - }; - Notification2.createNext = function(value) { - return new Notification2("N", value); - }; - Notification2.createError = function(err) { - return new Notification2("E", void 0, err); - }; - Notification2.createComplete = function() { - return Notification2.completeNotification; - }; - Notification2.completeNotification = new Notification2("C"); - return Notification2; -}(); -function observeNotification(notification, observer) { - var _a, _b, _c; - var _d = notification, kind = _d.kind, value = _d.value, error = _d.error; - if (typeof kind !== "string") { - throw new TypeError('Invalid notification, missing "kind"'); - } - kind === "N" ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === "E" ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isObservable.js -function isObservable(obj) { - return !!obj && (obj instanceof Observable || isFunction(obj.lift) && isFunction(obj.subscribe)); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js -var EmptyError = createErrorClass(function(_super) { - return function EmptyErrorImpl() { - _super(this); - this.name = "EmptyError"; - this.message = "no elements in sequence"; - }; -}); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js -function lastValueFrom(source, config2) { - var hasConfig = typeof config2 === "object"; - return new Promise(function(resolve, reject) { - var _hasValue = false; - var _value; - source.subscribe({ - next: function(value) { - _value = value; - _hasValue = true; - }, - error: reject, - complete: function() { - if (_hasValue) { - resolve(_value); - } else if (hasConfig) { - resolve(config2.defaultValue); - } else { - reject(new EmptyError()); - } - } - }); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js -function firstValueFrom(source, config2) { - var hasConfig = typeof config2 === "object"; - return new Promise(function(resolve, reject) { - var subscriber = new SafeSubscriber({ - next: function(value) { - resolve(value); - subscriber.unsubscribe(); - }, - error: reject, - complete: function() { - if (hasConfig) { - resolve(config2.defaultValue); - } else { - reject(new EmptyError()); - } - } - }); - source.subscribe(subscriber); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js -var ArgumentOutOfRangeError = createErrorClass(function(_super) { - return function ArgumentOutOfRangeErrorImpl() { - _super(this); - this.name = "ArgumentOutOfRangeError"; - this.message = "argument out of range"; - }; -}); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js -var NotFoundError = createErrorClass(function(_super) { - return function NotFoundErrorImpl(message) { - _super(this); - this.name = "NotFoundError"; - this.message = message; - }; -}); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/SequenceError.js -var SequenceError = createErrorClass(function(_super) { - return function SequenceErrorImpl(message) { - _super(this); - this.name = "SequenceError"; - this.message = message; - }; -}); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isDate.js -function isValidDate(value) { - return value instanceof Date && !isNaN(value); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/timeout.js -var TimeoutError = createErrorClass(function(_super) { - return function TimeoutErrorImpl(info) { - if (info === void 0) { - info = null; - } - _super(this); - this.message = "Timeout has occurred"; - this.name = "TimeoutError"; - this.info = info; - }; -}); -function timeout(config2, schedulerArg) { - var _a = isValidDate(config2) ? { first: config2 } : typeof config2 === "number" ? { each: config2 } : config2, first2 = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d; - if (first2 == null && each == null) { - throw new TypeError("No timeout provided."); - } - return operate(function(source, subscriber) { - var originalSourceSubscription; - var timerSubscription; - var lastValue = null; - var seen = 0; - var startTimer = function(delay2) { - timerSubscription = executeSchedule(subscriber, scheduler, function() { - try { - originalSourceSubscription.unsubscribe(); - innerFrom(_with({ - meta, - lastValue, - seen - })).subscribe(subscriber); - } catch (err) { - subscriber.error(err); - } - }, delay2); - }; - originalSourceSubscription = source.subscribe(createOperatorSubscriber(subscriber, function(value) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - seen++; - subscriber.next(lastValue = value); - each > 0 && startTimer(each); - }, void 0, void 0, function() { - if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - } - lastValue = null; - })); - !seen && startTimer(first2 != null ? typeof first2 === "number" ? first2 : +first2 - scheduler.now() : each); - }); -} -function timeoutErrorFactory(info) { - throw new TimeoutError(info); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/map.js -function map(project, thisArg) { - return operate(function(source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - subscriber.next(project.call(thisArg, value, index++)); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js -var isArray = Array.isArray; -function callOrApply(fn, args) { - return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args); -} -function mapOneOrManyArgs(fn) { - return map(function(args) { - return callOrApply(fn, args); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js -function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { - if (resultSelector) { - if (isScheduler(resultSelector)) { - scheduler = resultSelector; - } else { - return function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler).apply(this, args).pipe(mapOneOrManyArgs(resultSelector)); - }; - } - } - if (scheduler) { - return function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return bindCallbackInternals(isNodeStyle, callbackFunc).apply(this, args).pipe(subscribeOn(scheduler), observeOn(scheduler)); - }; - } - return function() { - var _this = this; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var subject = new AsyncSubject(); - var uninitialized = true; - return new Observable(function(subscriber) { - var subs = subject.subscribe(subscriber); - if (uninitialized) { - uninitialized = false; - var isAsync_1 = false; - var isComplete_1 = false; - callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args)), [ - function() { - var results = []; - for (var _i2 = 0; _i2 < arguments.length; _i2++) { - results[_i2] = arguments[_i2]; - } - if (isNodeStyle) { - var err = results.shift(); - if (err != null) { - subject.error(err); - return; - } - } - subject.next(1 < results.length ? results : results[0]); - isComplete_1 = true; - if (isAsync_1) { - subject.complete(); - } - } - ])); - if (isComplete_1) { - subject.complete(); - } - isAsync_1 = true; - } - return subs; - }); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js -function bindCallback(callbackFunc, resultSelector, scheduler) { - return bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js -function bindNodeCallback(callbackFunc, resultSelector, scheduler) { - return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js -var isArray2 = Array.isArray; -var getPrototypeOf = Object.getPrototypeOf; -var objectProto = Object.prototype; -var getKeys = Object.keys; -function argsArgArrayOrObject(args) { - if (args.length === 1) { - var first_1 = args[0]; - if (isArray2(first_1)) { - return { args: first_1, keys: null }; - } - if (isPOJO(first_1)) { - var keys = getKeys(first_1); - return { - args: keys.map(function(key) { - return first_1[key]; - }), - keys - }; - } - } - return { args, keys: null }; -} -function isPOJO(obj) { - return obj && typeof obj === "object" && getPrototypeOf(obj) === objectProto; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/createObject.js -function createObject(keys, values) { - return keys.reduce(function(result, key, i) { - return result[key] = values[i], result; - }, {}); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js -function combineLatest() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - var resultSelector = popResultSelector(args); - var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys; - if (observables.length === 0) { - return from([], scheduler); - } - var result = new Observable(combineLatestInit(observables, scheduler, keys ? function(values) { - return createObject(keys, values); - } : identity)); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; -} -function combineLatestInit(observables, scheduler, valueTransform) { - if (valueTransform === void 0) { - valueTransform = identity; - } - return function(subscriber) { - maybeSchedule(scheduler, function() { - var length = observables.length; - var values = new Array(length); - var active = length; - var remainingFirstValues = length; - var _loop_1 = function(i2) { - maybeSchedule(scheduler, function() { - var source = from(observables[i2], scheduler); - var hasFirstValue = false; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - values[i2] = value; - if (!hasFirstValue) { - hasFirstValue = true; - remainingFirstValues--; - } - if (!remainingFirstValues) { - subscriber.next(valueTransform(values.slice())); - } - }, function() { - if (!--active) { - subscriber.complete(); - } - })); - }, subscriber); - }; - for (var i = 0; i < length; i++) { - _loop_1(i); - } - }, subscriber); - }; -} -function maybeSchedule(scheduler, execute, subscription) { - if (scheduler) { - executeSchedule(subscription, scheduler, execute); - } else { - execute(); - } -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js -function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand2, innerSubScheduler, additionalFinalizer) { - var buffer2 = []; - var active = 0; - var index = 0; - var isComplete = false; - var checkComplete = function() { - if (isComplete && !buffer2.length && !active) { - subscriber.complete(); - } - }; - var outerNext = function(value) { - return active < concurrent ? doInnerSub(value) : buffer2.push(value); - }; - var doInnerSub = function(value) { - expand2 && subscriber.next(value); - active++; - var innerComplete = false; - innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function(innerValue) { - onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); - if (expand2) { - outerNext(innerValue); - } else { - subscriber.next(innerValue); - } - }, function() { - innerComplete = true; - }, void 0, function() { - if (innerComplete) { - try { - active--; - var _loop_1 = function() { - var bufferedValue = buffer2.shift(); - if (innerSubScheduler) { - executeSchedule(subscriber, innerSubScheduler, function() { - return doInnerSub(bufferedValue); - }); - } else { - doInnerSub(bufferedValue); - } - }; - while (buffer2.length && active < concurrent) { - _loop_1(); - } - checkComplete(); - } catch (err) { - subscriber.error(err); - } - } - })); - }; - source.subscribe(createOperatorSubscriber(subscriber, outerNext, function() { - isComplete = true; - checkComplete(); - })); - return function() { - additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js -function mergeMap(project, resultSelector, concurrent) { - if (concurrent === void 0) { - concurrent = Infinity; - } - if (isFunction(resultSelector)) { - return mergeMap(function(a, i) { - return map(function(b, ii) { - return resultSelector(a, b, i, ii); - })(innerFrom(project(a, i))); - }, concurrent); - } else if (typeof resultSelector === "number") { - concurrent = resultSelector; - } - return operate(function(source, subscriber) { - return mergeInternals(source, subscriber, project, concurrent); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js -function mergeAll(concurrent) { - if (concurrent === void 0) { - concurrent = Infinity; - } - return mergeMap(identity, concurrent); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js -function concatAll() { - return mergeAll(1); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/concat.js -function concat() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return concatAll()(from(args, popScheduler(args))); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/defer.js -function defer(observableFactory) { - return new Observable(function(subscriber) { - innerFrom(observableFactory()).subscribe(subscriber); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/connectable.js -var DEFAULT_CONFIG = { - connector: function() { - return new Subject(); - }, - resetOnDisconnect: true -}; -function connectable(source, config2) { - if (config2 === void 0) { - config2 = DEFAULT_CONFIG; - } - var connection = null; - var connector = config2.connector, _a = config2.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a; - var subject = connector(); - var result = new Observable(function(subscriber) { - return subject.subscribe(subscriber); - }); - result.connect = function() { - if (!connection || connection.closed) { - connection = defer(function() { - return source; - }).subscribe(subject); - if (resetOnDisconnect) { - connection.add(function() { - return subject = connector(); - }); - } - } - return connection; - }; - return result; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js -function forkJoin() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = popResultSelector(args); - var _a = argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys; - var result = new Observable(function(subscriber) { - var length = sources.length; - if (!length) { - subscriber.complete(); - return; - } - var values = new Array(length); - var remainingCompletions = length; - var remainingEmissions = length; - var _loop_1 = function(sourceIndex2) { - var hasValue = false; - innerFrom(sources[sourceIndex2]).subscribe(createOperatorSubscriber(subscriber, function(value) { - if (!hasValue) { - hasValue = true; - remainingEmissions--; - } - values[sourceIndex2] = value; - }, function() { - return remainingCompletions--; - }, void 0, function() { - if (!remainingCompletions || !hasValue) { - if (!remainingEmissions) { - subscriber.next(keys ? createObject(keys, values) : values); - } - subscriber.complete(); - } - })); - }; - for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { - _loop_1(sourceIndex); - } - }); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js -var nodeEventEmitterMethods = ["addListener", "removeListener"]; -var eventTargetMethods = ["addEventListener", "removeEventListener"]; -var jqueryMethods = ["on", "off"]; -function fromEvent(target, eventName, options, resultSelector) { - if (isFunction(options)) { - resultSelector = options; - options = void 0; - } - if (resultSelector) { - return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector)); - } - var _a = __read(isEventTarget(target) ? eventTargetMethods.map(function(methodName) { - return function(handler) { - return target[methodName](eventName, handler, options); - }; - }) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : [], 2), add = _a[0], remove = _a[1]; - if (!add) { - if (isArrayLike(target)) { - return mergeMap(function(subTarget) { - return fromEvent(subTarget, eventName, options); - })(innerFrom(target)); - } - } - if (!add) { - throw new TypeError("Invalid event target"); - } - return new Observable(function(subscriber) { - var handler = function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return subscriber.next(1 < args.length ? args : args[0]); - }; - add(handler); - return function() { - return remove(handler); - }; - }); -} -function toCommonHandlerRegistry(target, eventName) { - return function(methodName) { - return function(handler) { - return target[methodName](eventName, handler); - }; - }; -} -function isNodeStyleEventEmitter(target) { - return isFunction(target.addListener) && isFunction(target.removeListener); -} -function isJQueryStyleEventEmitter(target) { - return isFunction(target.on) && isFunction(target.off); -} -function isEventTarget(target) { - return isFunction(target.addEventListener) && isFunction(target.removeEventListener); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js -function fromEventPattern(addHandler, removeHandler, resultSelector) { - if (resultSelector) { - return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector)); - } - return new Observable(function(subscriber) { - var handler = function() { - var e = []; - for (var _i = 0; _i < arguments.length; _i++) { - e[_i] = arguments[_i]; - } - return subscriber.next(e.length === 1 ? e[0] : e); - }; - var retValue = addHandler(handler); - return isFunction(removeHandler) ? function() { - return removeHandler(handler, retValue); - } : void 0; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/generate.js -function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) { - var _a, _b; - var resultSelector; - var initialState; - if (arguments.length === 1) { - _a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity : _b, scheduler = _a.scheduler; - } else { - initialState = initialStateOrOptions; - if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) { - resultSelector = identity; - scheduler = resultSelectorOrScheduler; - } else { - resultSelector = resultSelectorOrScheduler; - } - } - function gen() { - var state; - return __generator(this, function(_a2) { - switch (_a2.label) { - case 0: - state = initialState; - _a2.label = 1; - case 1: - if (!(!condition || condition(state))) - return [3, 4]; - return [4, resultSelector(state)]; - case 2: - _a2.sent(); - _a2.label = 3; - case 3: - state = iterate(state); - return [3, 1]; - case 4: - return [2]; - } - }); - } - return defer(scheduler ? function() { - return scheduleIterable(gen(), scheduler); - } : gen); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/iif.js -function iif(condition, trueResult, falseResult) { - return defer(function() { - return condition() ? trueResult : falseResult; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/timer.js -function timer(dueTime, intervalOrScheduler, scheduler) { - if (dueTime === void 0) { - dueTime = 0; - } - if (scheduler === void 0) { - scheduler = async; - } - var intervalDuration = -1; - if (intervalOrScheduler != null) { - if (isScheduler(intervalOrScheduler)) { - scheduler = intervalOrScheduler; - } else { - intervalDuration = intervalOrScheduler; - } - } - return new Observable(function(subscriber) { - var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; - if (due < 0) { - due = 0; - } - var n = 0; - return scheduler.schedule(function() { - if (!subscriber.closed) { - subscriber.next(n++); - if (0 <= intervalDuration) { - this.schedule(void 0, intervalDuration); - } else { - subscriber.complete(); - } - } - }, due); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/interval.js -function interval(period, scheduler) { - if (period === void 0) { - period = 0; - } - if (scheduler === void 0) { - scheduler = asyncScheduler; - } - if (period < 0) { - period = 0; - } - return timer(period, period, scheduler); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/merge.js -function merge() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - var concurrent = popNumber(args, Infinity); - var sources = args; - return !sources.length ? EMPTY : sources.length === 1 ? innerFrom(sources[0]) : mergeAll(concurrent)(from(sources, scheduler)); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/never.js -var NEVER = new Observable(noop); -function never() { - return NEVER; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js -var isArray3 = Array.isArray; -function argsOrArgArray(args) { - return args.length === 1 && isArray3(args[0]) ? args[0] : args; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js -function onErrorResumeNext() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - var nextSources = argsOrArgArray(sources); - return new Observable(function(subscriber) { - var sourceIndex = 0; - var subscribeNext = function() { - if (sourceIndex < nextSources.length) { - var nextSource = void 0; - try { - nextSource = innerFrom(nextSources[sourceIndex++]); - } catch (err) { - subscribeNext(); - return; - } - var innerSubscriber = new OperatorSubscriber(subscriber, void 0, noop, noop); - nextSource.subscribe(innerSubscriber); - innerSubscriber.add(subscribeNext); - } else { - subscriber.complete(); - } - }; - subscribeNext(); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/pairs.js -function pairs(obj, scheduler) { - return from(Object.entries(obj), scheduler); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/not.js -function not(pred, thisArg) { - return function(value, index) { - return !pred.call(thisArg, value, index); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/filter.js -function filter(predicate, thisArg) { - return operate(function(source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - return predicate.call(thisArg, value, index++) && subscriber.next(value); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/partition.js -function partition(source, predicate, thisArg) { - return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))]; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/race.js -function race() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - sources = argsOrArgArray(sources); - return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources)); -} -function raceInit(sources) { - return function(subscriber) { - var subscriptions = []; - var _loop_1 = function(i2) { - subscriptions.push(innerFrom(sources[i2]).subscribe(createOperatorSubscriber(subscriber, function(value) { - if (subscriptions) { - for (var s = 0; s < subscriptions.length; s++) { - s !== i2 && subscriptions[s].unsubscribe(); - } - subscriptions = null; - } - subscriber.next(value); - }))); - }; - for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { - _loop_1(i); - } - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/range.js -function range(start, count2, scheduler) { - if (count2 == null) { - count2 = start; - start = 0; - } - if (count2 <= 0) { - return EMPTY; - } - var end = count2 + start; - return new Observable(scheduler ? function(subscriber) { - var n = start; - return scheduler.schedule(function() { - if (n < end) { - subscriber.next(n++); - this.schedule(); - } else { - subscriber.complete(); - } - }); - } : function(subscriber) { - var n = start; - while (n < end && !subscriber.closed) { - subscriber.next(n++); - } - subscriber.complete(); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/using.js -function using(resourceFactory, observableFactory) { - return new Observable(function(subscriber) { - var resource = resourceFactory(); - var result = observableFactory(resource); - var source = result ? innerFrom(result) : EMPTY; - source.subscribe(subscriber); - return function() { - if (resource) { - resource.unsubscribe(); - } - }; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/zip.js -function zip() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = popResultSelector(args); - var sources = argsOrArgArray(args); - return sources.length ? new Observable(function(subscriber) { - var buffers = sources.map(function() { - return []; - }); - var completed = sources.map(function() { - return false; - }); - subscriber.add(function() { - buffers = completed = null; - }); - var _loop_1 = function(sourceIndex2) { - innerFrom(sources[sourceIndex2]).subscribe(createOperatorSubscriber(subscriber, function(value) { - buffers[sourceIndex2].push(value); - if (buffers.every(function(buffer2) { - return buffer2.length; - })) { - var result = buffers.map(function(buffer2) { - return buffer2.shift(); - }); - subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result); - if (buffers.some(function(buffer2, i) { - return !buffer2.length && completed[i]; - })) { - subscriber.complete(); - } - } - }, function() { - completed[sourceIndex2] = true; - !buffers[sourceIndex2].length && subscriber.complete(); - })); - }; - for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { - _loop_1(sourceIndex); - } - return function() { - buffers = completed = null; - }; - }) : EMPTY; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/audit.js -function audit(durationSelector) { - return operate(function(source, subscriber) { - var hasValue = false; - var lastValue = null; - var durationSubscriber = null; - var isComplete = false; - var endDuration = function() { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - durationSubscriber = null; - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - isComplete && subscriber.complete(); - }; - var cleanupDuration = function() { - durationSubscriber = null; - isComplete && subscriber.complete(); - }; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - hasValue = true; - lastValue = value; - if (!durationSubscriber) { - innerFrom(durationSelector(value)).subscribe(durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)); - } - }, function() { - isComplete = true; - (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/auditTime.js -function auditTime(duration, scheduler) { - if (scheduler === void 0) { - scheduler = asyncScheduler; - } - return audit(function() { - return timer(duration, scheduler); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/buffer.js -function buffer(closingNotifier) { - return operate(function(source, subscriber) { - var currentBuffer = []; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - return currentBuffer.push(value); - }, function() { - subscriber.next(currentBuffer); - subscriber.complete(); - })); - innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, function() { - var b = currentBuffer; - currentBuffer = []; - subscriber.next(b); - }, noop)); - return function() { - currentBuffer = null; - }; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js -function bufferCount(bufferSize, startBufferEvery) { - if (startBufferEvery === void 0) { - startBufferEvery = null; - } - startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; - return operate(function(source, subscriber) { - var buffers = []; - var count2 = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var e_1, _a, e_2, _b; - var toEmit = null; - if (count2++ % startBufferEvery === 0) { - buffers.push([]); - } - try { - for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer2 = buffers_1_1.value; - buffer2.push(value); - if (bufferSize <= buffer2.length) { - toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; - toEmit.push(buffer2); - } - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) - _a.call(buffers_1); - } finally { - if (e_1) - throw e_1.error; - } - } - if (toEmit) { - try { - for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { - var buffer2 = toEmit_1_1.value; - arrRemove(buffers, buffer2); - subscriber.next(buffer2); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) - _b.call(toEmit_1); - } finally { - if (e_2) - throw e_2.error; - } - } - } - }, function() { - var e_3, _a; - try { - for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { - var buffer2 = buffers_2_1.value; - subscriber.next(buffer2); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) - _a.call(buffers_2); - } finally { - if (e_3) - throw e_3.error; - } - } - subscriber.complete(); - }, void 0, function() { - buffers = null; - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js -function bufferTime(bufferTimeSpan) { - var _a, _b; - var otherArgs = []; - for (var _i = 1; _i < arguments.length; _i++) { - otherArgs[_i - 1] = arguments[_i]; - } - var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; - var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; - var maxBufferSize = otherArgs[1] || Infinity; - return operate(function(source, subscriber) { - var bufferRecords = []; - var restartOnEmit = false; - var emit = function(record) { - var buffer2 = record.buffer, subs = record.subs; - subs.unsubscribe(); - arrRemove(bufferRecords, record); - subscriber.next(buffer2); - restartOnEmit && startBuffer(); - }; - var startBuffer = function() { - if (bufferRecords) { - var subs = new Subscription(); - subscriber.add(subs); - var buffer2 = []; - var record_1 = { - buffer: buffer2, - subs - }; - bufferRecords.push(record_1); - executeSchedule(subs, scheduler, function() { - return emit(record_1); - }, bufferTimeSpan); - } - }; - if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { - executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); - } else { - restartOnEmit = true; - } - startBuffer(); - var bufferTimeSubscriber = createOperatorSubscriber(subscriber, function(value) { - var e_1, _a2; - var recordsCopy = bufferRecords.slice(); - try { - for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { - var record = recordsCopy_1_1.value; - var buffer2 = record.buffer; - buffer2.push(value); - maxBufferSize <= buffer2.length && emit(record); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a2 = recordsCopy_1.return)) - _a2.call(recordsCopy_1); - } finally { - if (e_1) - throw e_1.error; - } - } - }, function() { - while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { - subscriber.next(bufferRecords.shift().buffer); - } - bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); - subscriber.complete(); - subscriber.unsubscribe(); - }, void 0, function() { - return bufferRecords = null; - }); - source.subscribe(bufferTimeSubscriber); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js -function bufferToggle(openings, closingSelector) { - return operate(function(source, subscriber) { - var buffers = []; - innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function(openValue) { - var buffer2 = []; - buffers.push(buffer2); - var closingSubscription = new Subscription(); - var emitBuffer = function() { - arrRemove(buffers, buffer2); - subscriber.next(buffer2); - closingSubscription.unsubscribe(); - }; - closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop))); - }, noop)); - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var e_1, _a; - try { - for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer2 = buffers_1_1.value; - buffer2.push(value); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) - _a.call(buffers_1); - } finally { - if (e_1) - throw e_1.error; - } - } - }, function() { - while (buffers.length > 0) { - subscriber.next(buffers.shift()); - } - subscriber.complete(); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js -function bufferWhen(closingSelector) { - return operate(function(source, subscriber) { - var buffer2 = null; - var closingSubscriber = null; - var openBuffer = function() { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - var b = buffer2; - buffer2 = []; - b && subscriber.next(b); - innerFrom(closingSelector()).subscribe(closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop)); - }; - openBuffer(); - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - return buffer2 === null || buffer2 === void 0 ? void 0 : buffer2.push(value); - }, function() { - buffer2 && subscriber.next(buffer2); - subscriber.complete(); - }, void 0, function() { - return buffer2 = closingSubscriber = null; - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/catchError.js -function catchError(selector) { - return operate(function(source, subscriber) { - var innerSub = null; - var syncUnsub = false; - var handledResult; - innerSub = source.subscribe(createOperatorSubscriber(subscriber, void 0, void 0, function(err) { - handledResult = innerFrom(selector(err, catchError(selector)(source))); - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } else { - syncUnsub = true; - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js -function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { - return function(source, subscriber) { - var hasState = hasSeed; - var state = seed; - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var i = index++; - state = hasState ? accumulator(state, value, i) : (hasState = true, value); - emitOnNext && subscriber.next(state); - }, emitBeforeComplete && function() { - hasState && subscriber.next(state); - subscriber.complete(); - })); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/reduce.js -function reduce(accumulator, seed) { - return operate(scanInternals(accumulator, seed, arguments.length >= 2, false, true)); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/toArray.js -var arrReducer = function(arr, value) { - return arr.push(value), arr; -}; -function toArray() { - return operate(function(source, subscriber) { - reduce(arrReducer, [])(source).subscribe(subscriber); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js -function joinAllInternals(joinFn, project) { - return pipe(toArray(), mergeMap(function(sources) { - return joinFn(sources); - }), project ? mapOneOrManyArgs(project) : identity); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js -function combineLatestAll(project) { - return joinAllInternals(combineLatest, project); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/combineAll.js -var combineAll = combineLatestAll; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js -function combineLatest2() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = popResultSelector(args); - return resultSelector ? pipe(combineLatest2.apply(void 0, __spreadArray([], __read(args))), mapOneOrManyArgs(resultSelector)) : operate(function(source, subscriber) { - combineLatestInit(__spreadArray([source], __read(argsOrArgArray(args))))(subscriber); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js -function combineLatestWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return combineLatest2.apply(void 0, __spreadArray([], __read(otherSources))); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js -function concatMap(project, resultSelector) { - return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js -function concatMapTo(innerObservable, resultSelector) { - return isFunction(resultSelector) ? concatMap(function() { - return innerObservable; - }, resultSelector) : concatMap(function() { - return innerObservable; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/concat.js -function concat2() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - return operate(function(source, subscriber) { - concatAll()(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/concatWith.js -function concatWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return concat2.apply(void 0, __spreadArray([], __read(otherSources))); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js -function fromSubscribable(subscribable) { - return new Observable(function(subscriber) { - return subscribable.subscribe(subscriber); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/connect.js -var DEFAULT_CONFIG2 = { - connector: function() { - return new Subject(); - } -}; -function connect(selector, config2) { - if (config2 === void 0) { - config2 = DEFAULT_CONFIG2; - } - var connector = config2.connector; - return operate(function(source, subscriber) { - var subject = connector(); - innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber); - subscriber.add(source.subscribe(subject)); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/count.js -function count(predicate) { - return reduce(function(total, value, i) { - return !predicate || predicate(value, i) ? total + 1 : total; - }, 0); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/debounce.js -function debounce(durationSelector) { - return operate(function(source, subscriber) { - var hasValue = false; - var lastValue = null; - var durationSubscriber = null; - var emit = function() { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - durationSubscriber = null; - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - hasValue = true; - lastValue = value; - durationSubscriber = createOperatorSubscriber(subscriber, emit, noop); - innerFrom(durationSelector(value)).subscribe(durationSubscriber); - }, function() { - emit(); - subscriber.complete(); - }, void 0, function() { - lastValue = durationSubscriber = null; - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js -function debounceTime(dueTime, scheduler) { - if (scheduler === void 0) { - scheduler = asyncScheduler; - } - return operate(function(source, subscriber) { - var activeTask = null; - var lastValue = null; - var lastTime = null; - var emit = function() { - if (activeTask) { - activeTask.unsubscribe(); - activeTask = null; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }; - function emitWhenIdle() { - var targetTime = lastTime + dueTime; - var now = scheduler.now(); - if (now < targetTime) { - activeTask = this.schedule(void 0, targetTime - now); - subscriber.add(activeTask); - return; - } - emit(); - } - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - lastValue = value; - lastTime = scheduler.now(); - if (!activeTask) { - activeTask = scheduler.schedule(emitWhenIdle, dueTime); - subscriber.add(activeTask); - } - }, function() { - emit(); - subscriber.complete(); - }, void 0, function() { - lastValue = activeTask = null; - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js -function defaultIfEmpty(defaultValue) { - return operate(function(source, subscriber) { - var hasValue = false; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - hasValue = true; - subscriber.next(value); - }, function() { - if (!hasValue) { - subscriber.next(defaultValue); - } - subscriber.complete(); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/take.js -function take(count2) { - return count2 <= 0 ? function() { - return EMPTY; - } : operate(function(source, subscriber) { - var seen = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - if (++seen <= count2) { - subscriber.next(value); - if (count2 <= seen) { - subscriber.complete(); - } - } - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js -function ignoreElements() { - return operate(function(source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, noop)); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mapTo.js -function mapTo(value) { - return map(function() { - return value; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js -function delayWhen(delayDurationSelector, subscriptionDelay) { - if (subscriptionDelay) { - return function(source) { - return concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); - }; - } - return mergeMap(function(value, index) { - return innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/delay.js -function delay(due, scheduler) { - if (scheduler === void 0) { - scheduler = asyncScheduler; - } - var duration = timer(due, scheduler); - return delayWhen(function() { - return duration; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js -function dematerialize() { - return operate(function(source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, function(notification) { - return observeNotification(notification, subscriber); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/distinct.js -function distinct(keySelector, flushes) { - return operate(function(source, subscriber) { - var distinctKeys = /* @__PURE__ */ new Set(); - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var key = keySelector ? keySelector(value) : value; - if (!distinctKeys.has(key)) { - distinctKeys.add(key); - subscriber.next(value); - } - })); - flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, function() { - return distinctKeys.clear(); - }, noop)); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js -function distinctUntilChanged(comparator, keySelector) { - if (keySelector === void 0) { - keySelector = identity; - } - comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; - return operate(function(source, subscriber) { - var previousKey; - var first2 = true; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var currentKey = keySelector(value); - if (first2 || !comparator(previousKey, currentKey)) { - first2 = false; - previousKey = currentKey; - subscriber.next(value); - } - })); - }); -} -function defaultCompare(a, b) { - return a === b; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js -function distinctUntilKeyChanged(key, compare) { - return distinctUntilChanged(function(x, y) { - return compare ? compare(x[key], y[key]) : x[key] === y[key]; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js -function throwIfEmpty(errorFactory) { - if (errorFactory === void 0) { - errorFactory = defaultErrorFactory; - } - return operate(function(source, subscriber) { - var hasValue = false; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - hasValue = true; - subscriber.next(value); - }, function() { - return hasValue ? subscriber.complete() : subscriber.error(errorFactory()); - })); - }); -} -function defaultErrorFactory() { - return new EmptyError(); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/elementAt.js -function elementAt(index, defaultValue) { - if (index < 0) { - throw new ArgumentOutOfRangeError(); - } - var hasDefaultValue = arguments.length >= 2; - return function(source) { - return source.pipe(filter(function(v, i) { - return i === index; - }), take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function() { - return new ArgumentOutOfRangeError(); - })); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/endWith.js -function endWith() { - var values = []; - for (var _i = 0; _i < arguments.length; _i++) { - values[_i] = arguments[_i]; - } - return function(source) { - return concat(source, of.apply(void 0, __spreadArray([], __read(values)))); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/every.js -function every(predicate, thisArg) { - return operate(function(source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - if (!predicate.call(thisArg, value, index++, source)) { - subscriber.next(false); - subscriber.complete(); - } - }, function() { - subscriber.next(true); - subscriber.complete(); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js -function exhaustMap(project, resultSelector) { - if (resultSelector) { - return function(source) { - return source.pipe(exhaustMap(function(a, i) { - return innerFrom(project(a, i)).pipe(map(function(b, ii) { - return resultSelector(a, b, i, ii); - })); - })); - }; - } - return operate(function(source, subscriber) { - var index = 0; - var innerSub = null; - var isComplete = false; - source.subscribe(createOperatorSubscriber(subscriber, function(outerValue) { - if (!innerSub) { - innerSub = createOperatorSubscriber(subscriber, void 0, function() { - innerSub = null; - isComplete && subscriber.complete(); - }); - innerFrom(project(outerValue, index++)).subscribe(innerSub); - } - }, function() { - isComplete = true; - !innerSub && subscriber.complete(); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js -function exhaustAll() { - return exhaustMap(identity); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/exhaust.js -var exhaust = exhaustAll; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/expand.js -function expand(project, concurrent, scheduler) { - if (concurrent === void 0) { - concurrent = Infinity; - } - concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; - return operate(function(source, subscriber) { - return mergeInternals(source, subscriber, project, concurrent, void 0, true, scheduler); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/finalize.js -function finalize(callback) { - return operate(function(source, subscriber) { - try { - source.subscribe(subscriber); - } finally { - subscriber.add(callback); - } - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/find.js -function find(predicate, thisArg) { - return operate(createFind(predicate, thisArg, "value")); -} -function createFind(predicate, thisArg, emit) { - var findIndex2 = emit === "index"; - return function(source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var i = index++; - if (predicate.call(thisArg, value, i, source)) { - subscriber.next(findIndex2 ? i : value); - subscriber.complete(); - } - }, function() { - subscriber.next(findIndex2 ? -1 : void 0); - subscriber.complete(); - })); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/findIndex.js -function findIndex(predicate, thisArg) { - return operate(createFind(predicate, thisArg, "index")); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/first.js -function first(predicate, defaultValue) { - var hasDefaultValue = arguments.length >= 2; - return function(source) { - return source.pipe(predicate ? filter(function(v, i) { - return predicate(v, i, source); - }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function() { - return new EmptyError(); - })); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js -function groupBy(keySelector, elementOrOptions, duration, connector) { - return operate(function(source, subscriber) { - var element; - if (!elementOrOptions || typeof elementOrOptions === "function") { - element = elementOrOptions; - } else { - duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector; - } - var groups = /* @__PURE__ */ new Map(); - var notify = function(cb) { - groups.forEach(cb); - cb(subscriber); - }; - var handleError = function(err) { - return notify(function(consumer) { - return consumer.error(err); - }); - }; - var activeGroups = 0; - var teardownAttempted = false; - var groupBySourceSubscriber = new OperatorSubscriber(subscriber, function(value) { - try { - var key_1 = keySelector(value); - var group_1 = groups.get(key_1); - if (!group_1) { - groups.set(key_1, group_1 = connector ? connector() : new Subject()); - var grouped = createGroupedObservable(key_1, group_1); - subscriber.next(grouped); - if (duration) { - var durationSubscriber_1 = createOperatorSubscriber(group_1, function() { - group_1.complete(); - durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); - }, void 0, void 0, function() { - return groups.delete(key_1); - }); - groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); - } - } - group_1.next(element ? element(value) : value); - } catch (err) { - handleError(err); - } - }, function() { - return notify(function(consumer) { - return consumer.complete(); - }); - }, handleError, function() { - return groups.clear(); - }, function() { - teardownAttempted = true; - return activeGroups === 0; - }); - source.subscribe(groupBySourceSubscriber); - function createGroupedObservable(key, groupSubject) { - var result = new Observable(function(groupSubscriber) { - activeGroups++; - var innerSub = groupSubject.subscribe(groupSubscriber); - return function() { - innerSub.unsubscribe(); - --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); - }; - }); - result.key = key; - return result; - } - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js -function isEmpty() { - return operate(function(source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, function() { - subscriber.next(false); - subscriber.complete(); - }, function() { - subscriber.next(true); - subscriber.complete(); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js -function takeLast(count2) { - return count2 <= 0 ? function() { - return EMPTY; - } : operate(function(source, subscriber) { - var buffer2 = []; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - buffer2.push(value); - count2 < buffer2.length && buffer2.shift(); - }, function() { - var e_1, _a; - try { - for (var buffer_1 = __values(buffer2), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { - var value = buffer_1_1.value; - subscriber.next(value); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) - _a.call(buffer_1); - } finally { - if (e_1) - throw e_1.error; - } - } - subscriber.complete(); - }, void 0, function() { - buffer2 = null; - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/last.js -function last2(predicate, defaultValue) { - var hasDefaultValue = arguments.length >= 2; - return function(source) { - return source.pipe(predicate ? filter(function(v, i) { - return predicate(v, i, source); - }) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function() { - return new EmptyError(); - })); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/materialize.js -function materialize() { - return operate(function(source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - subscriber.next(Notification.createNext(value)); - }, function() { - subscriber.next(Notification.createComplete()); - subscriber.complete(); - }, function(err) { - subscriber.next(Notification.createError(err)); - subscriber.complete(); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/max.js -function max(comparer) { - return reduce(isFunction(comparer) ? function(x, y) { - return comparer(x, y) > 0 ? x : y; - } : function(x, y) { - return x > y ? x : y; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js -var flatMap = mergeMap; - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js -function mergeMapTo(innerObservable, resultSelector, concurrent) { - if (concurrent === void 0) { - concurrent = Infinity; - } - if (isFunction(resultSelector)) { - return mergeMap(function() { - return innerObservable; - }, resultSelector, concurrent); - } - if (typeof resultSelector === "number") { - concurrent = resultSelector; - } - return mergeMap(function() { - return innerObservable; - }, concurrent); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js -function mergeScan(accumulator, seed, concurrent) { - if (concurrent === void 0) { - concurrent = Infinity; - } - return operate(function(source, subscriber) { - var state = seed; - return mergeInternals(source, subscriber, function(value, index) { - return accumulator(state, value, index); - }, concurrent, function(value) { - state = value; - }, false, void 0, function() { - return state = null; - }); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/merge.js -function merge2() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - var concurrent = popNumber(args, Infinity); - args = argsOrArgArray(args); - return operate(function(source, subscriber) { - mergeAll(concurrent)(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js -function mergeWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return merge2.apply(void 0, __spreadArray([], __read(otherSources))); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/min.js -function min(comparer) { - return reduce(isFunction(comparer) ? function(x, y) { - return comparer(x, y) < 0 ? x : y; - } : function(x, y) { - return x < y ? x : y; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/multicast.js -function multicast(subjectOrSubjectFactory, selector) { - var subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function() { - return subjectOrSubjectFactory; - }; - if (isFunction(selector)) { - return connect(selector, { - connector: subjectFactory - }); - } - return function(source) { - return new ConnectableObservable(source, subjectFactory); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNextWith.js -function onErrorResumeNextWith() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - var nextSources = argsOrArgArray(sources); - return function(source) { - return onErrorResumeNext.apply(void 0, __spreadArray([source], __read(nextSources))); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js -function pairwise() { - return operate(function(source, subscriber) { - var prev; - var hasPrev = false; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var p = prev; - prev = value; - hasPrev && subscriber.next([p, value]); - hasPrev = true; - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/pluck.js -function pluck() { - var properties = []; - for (var _i = 0; _i < arguments.length; _i++) { - properties[_i] = arguments[_i]; - } - var length = properties.length; - if (length === 0) { - throw new Error("list of properties cannot be empty."); - } - return map(function(x) { - var currentProp = x; - for (var i = 0; i < length; i++) { - var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; - if (typeof p !== "undefined") { - currentProp = p; - } else { - return void 0; - } - } - return currentProp; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/publish.js -function publish(selector) { - return selector ? function(source) { - return connect(selector)(source); - } : function(source) { - return multicast(new Subject())(source); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js -function publishBehavior(initialValue) { - return function(source) { - var subject = new BehaviorSubject(initialValue); - return new ConnectableObservable(source, function() { - return subject; - }); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/publishLast.js -function publishLast() { - return function(source) { - var subject = new AsyncSubject(); - return new ConnectableObservable(source, function() { - return subject; - }); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js -function publishReplay(bufferSize, windowTime2, selectorOrScheduler, timestampProvider) { - if (selectorOrScheduler && !isFunction(selectorOrScheduler)) { - timestampProvider = selectorOrScheduler; - } - var selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : void 0; - return function(source) { - return multicast(new ReplaySubject(bufferSize, windowTime2, timestampProvider), selector)(source); - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/raceWith.js -function raceWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return !otherSources.length ? identity : operate(function(source, subscriber) { - raceInit(__spreadArray([source], __read(otherSources)))(subscriber); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/repeat.js -function repeat(countOrConfig) { - var _a; - var count2 = Infinity; - var delay2; - if (countOrConfig != null) { - if (typeof countOrConfig === "object") { - _a = countOrConfig.count, count2 = _a === void 0 ? Infinity : _a, delay2 = countOrConfig.delay; - } else { - count2 = countOrConfig; - } - } - return count2 <= 0 ? function() { - return EMPTY; - } : operate(function(source, subscriber) { - var soFar = 0; - var sourceSub; - var resubscribe = function() { - sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); - sourceSub = null; - if (delay2 != null) { - var notifier = typeof delay2 === "number" ? timer(delay2) : innerFrom(delay2(soFar)); - var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function() { - notifierSubscriber_1.unsubscribe(); - subscribeToSource(); - }); - notifier.subscribe(notifierSubscriber_1); - } else { - subscribeToSource(); - } - }; - var subscribeToSource = function() { - var syncUnsub = false; - sourceSub = source.subscribe(createOperatorSubscriber(subscriber, void 0, function() { - if (++soFar < count2) { - if (sourceSub) { - resubscribe(); - } else { - syncUnsub = true; - } - } else { - subscriber.complete(); - } - })); - if (syncUnsub) { - resubscribe(); - } - }; - subscribeToSource(); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js -function repeatWhen(notifier) { - return operate(function(source, subscriber) { - var innerSub; - var syncResub = false; - var completions$; - var isNotifierComplete = false; - var isMainComplete = false; - var checkComplete = function() { - return isMainComplete && isNotifierComplete && (subscriber.complete(), true); - }; - var getCompletionSubject = function() { - if (!completions$) { - completions$ = new Subject(); - innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, function() { - if (innerSub) { - subscribeForRepeatWhen(); - } else { - syncResub = true; - } - }, function() { - isNotifierComplete = true; - checkComplete(); - })); - } - return completions$; - }; - var subscribeForRepeatWhen = function() { - isMainComplete = false; - innerSub = source.subscribe(createOperatorSubscriber(subscriber, void 0, function() { - isMainComplete = true; - !checkComplete() && getCompletionSubject().next(); - })); - if (syncResub) { - innerSub.unsubscribe(); - innerSub = null; - syncResub = false; - subscribeForRepeatWhen(); - } - }; - subscribeForRepeatWhen(); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/retry.js -function retry(configOrCount) { - if (configOrCount === void 0) { - configOrCount = Infinity; - } - var config2; - if (configOrCount && typeof configOrCount === "object") { - config2 = configOrCount; - } else { - config2 = { - count: configOrCount - }; - } - var _a = config2.count, count2 = _a === void 0 ? Infinity : _a, delay2 = config2.delay, _b = config2.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; - return count2 <= 0 ? identity : operate(function(source, subscriber) { - var soFar = 0; - var innerSub; - var subscribeForRetry = function() { - var syncUnsub = false; - innerSub = source.subscribe(createOperatorSubscriber(subscriber, function(value) { - if (resetOnSuccess) { - soFar = 0; - } - subscriber.next(value); - }, void 0, function(err) { - if (soFar++ < count2) { - var resub_1 = function() { - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } else { - syncUnsub = true; - } - }; - if (delay2 != null) { - var notifier = typeof delay2 === "number" ? timer(delay2) : innerFrom(delay2(err, soFar)); - var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function() { - notifierSubscriber_1.unsubscribe(); - resub_1(); - }, function() { - subscriber.complete(); - }); - notifier.subscribe(notifierSubscriber_1); - } else { - resub_1(); - } - } else { - subscriber.error(err); - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - }; - subscribeForRetry(); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js -function retryWhen(notifier) { - return operate(function(source, subscriber) { - var innerSub; - var syncResub = false; - var errors$; - var subscribeForRetryWhen = function() { - innerSub = source.subscribe(createOperatorSubscriber(subscriber, void 0, void 0, function(err) { - if (!errors$) { - errors$ = new Subject(); - innerFrom(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, function() { - return innerSub ? subscribeForRetryWhen() : syncResub = true; - })); - } - if (errors$) { - errors$.next(err); - } - })); - if (syncResub) { - innerSub.unsubscribe(); - innerSub = null; - syncResub = false; - subscribeForRetryWhen(); - } - }; - subscribeForRetryWhen(); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/sample.js -function sample(notifier) { - return operate(function(source, subscriber) { - var hasValue = false; - var lastValue = null; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - hasValue = true; - lastValue = value; - })); - innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function() { - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }, noop)); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js -function sampleTime(period, scheduler) { - if (scheduler === void 0) { - scheduler = asyncScheduler; - } - return sample(interval(period, scheduler)); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/scan.js -function scan(accumulator, seed) { - return operate(scanInternals(accumulator, seed, arguments.length >= 2, true)); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js -function sequenceEqual(compareTo, comparator) { - if (comparator === void 0) { - comparator = function(a, b) { - return a === b; - }; - } - return operate(function(source, subscriber) { - var aState = createState(); - var bState = createState(); - var emit = function(isEqual) { - subscriber.next(isEqual); - subscriber.complete(); - }; - var createSubscriber = function(selfState, otherState) { - var sequenceEqualSubscriber = createOperatorSubscriber(subscriber, function(a) { - var buffer2 = otherState.buffer, complete = otherState.complete; - if (buffer2.length === 0) { - complete ? emit(false) : selfState.buffer.push(a); - } else { - !comparator(a, buffer2.shift()) && emit(false); - } - }, function() { - selfState.complete = true; - var complete = otherState.complete, buffer2 = otherState.buffer; - complete && emit(buffer2.length === 0); - sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); - }); - return sequenceEqualSubscriber; - }; - source.subscribe(createSubscriber(aState, bState)); - innerFrom(compareTo).subscribe(createSubscriber(bState, aState)); - }); -} -function createState() { - return { - buffer: [], - complete: false - }; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/share.js -function share(options) { - if (options === void 0) { - options = {}; - } - var _a = options.connector, connector = _a === void 0 ? function() { - return new Subject(); - } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d; - return function(wrapperSource) { - var connection; - var resetConnection; - var subject; - var refCount2 = 0; - var hasCompleted = false; - var hasErrored = false; - var cancelReset = function() { - resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); - resetConnection = void 0; - }; - var reset = function() { - cancelReset(); - connection = subject = void 0; - hasCompleted = hasErrored = false; - }; - var resetAndUnsubscribe = function() { - var conn = connection; - reset(); - conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); - }; - return operate(function(source, subscriber) { - refCount2++; - if (!hasErrored && !hasCompleted) { - cancelReset(); - } - var dest = subject = subject !== null && subject !== void 0 ? subject : connector(); - subscriber.add(function() { - refCount2--; - if (refCount2 === 0 && !hasErrored && !hasCompleted) { - resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); - } - }); - dest.subscribe(subscriber); - if (!connection && refCount2 > 0) { - connection = new SafeSubscriber({ - next: function(value) { - return dest.next(value); - }, - error: function(err) { - hasErrored = true; - cancelReset(); - resetConnection = handleReset(reset, resetOnError, err); - dest.error(err); - }, - complete: function() { - hasCompleted = true; - cancelReset(); - resetConnection = handleReset(reset, resetOnComplete); - dest.complete(); - } - }); - innerFrom(source).subscribe(connection); - } - })(wrapperSource); - }; -} -function handleReset(reset, on) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - if (on === true) { - reset(); - return; - } - if (on === false) { - return; - } - var onSubscriber = new SafeSubscriber({ - next: function() { - onSubscriber.unsubscribe(); - reset(); - } - }); - return innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js -function shareReplay(configOrBufferSize, windowTime2, scheduler) { - var _a, _b, _c; - var bufferSize; - var refCount2 = false; - if (configOrBufferSize && typeof configOrBufferSize === "object") { - _a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime2 = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount2 = _c === void 0 ? false : _c, scheduler = configOrBufferSize.scheduler; - } else { - bufferSize = configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity; - } - return share({ - connector: function() { - return new ReplaySubject(bufferSize, windowTime2, scheduler); - }, - resetOnError: true, - resetOnComplete: false, - resetOnRefCountZero: refCount2 - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/single.js -function single(predicate) { - return operate(function(source, subscriber) { - var hasValue = false; - var singleValue; - var seenValue = false; - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - seenValue = true; - if (!predicate || predicate(value, index++, source)) { - hasValue && subscriber.error(new SequenceError("Too many matching values")); - hasValue = true; - singleValue = value; - } - }, function() { - if (hasValue) { - subscriber.next(singleValue); - subscriber.complete(); - } else { - subscriber.error(seenValue ? new NotFoundError("No matching values") : new EmptyError()); - } - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/skip.js -function skip(count2) { - return filter(function(_, index) { - return count2 <= index; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js -function skipLast(skipCount) { - return skipCount <= 0 ? identity : operate(function(source, subscriber) { - var ring = new Array(skipCount); - var seen = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var valueIndex = seen++; - if (valueIndex < skipCount) { - ring[valueIndex] = value; - } else { - var index = valueIndex % skipCount; - var oldValue = ring[index]; - ring[index] = value; - subscriber.next(oldValue); - } - })); - return function() { - ring = null; - }; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js -function skipUntil(notifier) { - return operate(function(source, subscriber) { - var taking = false; - var skipSubscriber = createOperatorSubscriber(subscriber, function() { - skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); - taking = true; - }, noop); - innerFrom(notifier).subscribe(skipSubscriber); - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - return taking && subscriber.next(value); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js -function skipWhile(predicate) { - return operate(function(source, subscriber) { - var taking = false; - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/startWith.js -function startWith() { - var values = []; - for (var _i = 0; _i < arguments.length; _i++) { - values[_i] = arguments[_i]; - } - var scheduler = popScheduler(values); - return operate(function(source, subscriber) { - (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js -function switchMap(project, resultSelector) { - return operate(function(source, subscriber) { - var innerSubscriber = null; - var index = 0; - var isComplete = false; - var checkComplete = function() { - return isComplete && !innerSubscriber && subscriber.complete(); - }; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); - var innerIndex = 0; - var outerIndex = index++; - innerFrom(project(value, outerIndex)).subscribe(innerSubscriber = createOperatorSubscriber(subscriber, function(innerValue) { - return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); - }, function() { - innerSubscriber = null; - checkComplete(); - })); - }, function() { - isComplete = true; - checkComplete(); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/switchAll.js -function switchAll() { - return switchMap(identity); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js -function switchMapTo(innerObservable, resultSelector) { - return isFunction(resultSelector) ? switchMap(function() { - return innerObservable; - }, resultSelector) : switchMap(function() { - return innerObservable; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/switchScan.js -function switchScan(accumulator, seed) { - return operate(function(source, subscriber) { - var state = seed; - switchMap(function(value, index) { - return accumulator(state, value, index); - }, function(_, innerValue) { - return state = innerValue, innerValue; - })(source).subscribe(subscriber); - return function() { - state = null; - }; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js -function takeUntil(notifier) { - return operate(function(source, subscriber) { - innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function() { - return subscriber.complete(); - }, noop)); - !subscriber.closed && source.subscribe(subscriber); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js -function takeWhile(predicate, inclusive) { - if (inclusive === void 0) { - inclusive = false; - } - return operate(function(source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var result = predicate(value, index++); - (result || inclusive) && subscriber.next(value); - !result && subscriber.complete(); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/tap.js -function tap(observerOrNext, error, complete) { - var tapObserver = isFunction(observerOrNext) || error || complete ? { next: observerOrNext, error, complete } : observerOrNext; - return tapObserver ? operate(function(source, subscriber) { - var _a; - (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - var isUnsub = true; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var _a2; - (_a2 = tapObserver.next) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver, value); - subscriber.next(value); - }, function() { - var _a2; - isUnsub = false; - (_a2 = tapObserver.complete) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver); - subscriber.complete(); - }, function(err) { - var _a2; - isUnsub = false; - (_a2 = tapObserver.error) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver, err); - subscriber.error(err); - }, function() { - var _a2, _b; - if (isUnsub) { - (_a2 = tapObserver.unsubscribe) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver); - } - (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); - })); - }) : identity; -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/throttle.js -function throttle(durationSelector, config2) { - return operate(function(source, subscriber) { - var _a = config2 !== null && config2 !== void 0 ? config2 : {}, _b = _a.leading, leading = _b === void 0 ? true : _b, _c = _a.trailing, trailing = _c === void 0 ? false : _c; - var hasValue = false; - var sendValue = null; - var throttled = null; - var isComplete = false; - var endThrottling = function() { - throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); - throttled = null; - if (trailing) { - send(); - isComplete && subscriber.complete(); - } - }; - var cleanupThrottling = function() { - throttled = null; - isComplete && subscriber.complete(); - }; - var startThrottle = function(value) { - return throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)); - }; - var send = function() { - if (hasValue) { - hasValue = false; - var value = sendValue; - sendValue = null; - subscriber.next(value); - !isComplete && startThrottle(value); - } - }; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - hasValue = true; - sendValue = value; - !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); - }, function() { - isComplete = true; - !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js -function throttleTime(duration, scheduler, config2) { - if (scheduler === void 0) { - scheduler = asyncScheduler; - } - var duration$ = timer(duration, scheduler); - return throttle(function() { - return duration$; - }, config2); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js -function timeInterval(scheduler) { - if (scheduler === void 0) { - scheduler = asyncScheduler; - } - return operate(function(source, subscriber) { - var last3 = scheduler.now(); - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var now = scheduler.now(); - var interval2 = now - last3; - last3 = now; - subscriber.next(new TimeInterval(value, interval2)); - })); - }); -} -var TimeInterval = function() { - function TimeInterval2(value, interval2) { - this.value = value; - this.interval = interval2; - } - return TimeInterval2; -}(); - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js -function timeoutWith(due, withObservable, scheduler) { - var first2; - var each; - var _with; - scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async; - if (isValidDate(due)) { - first2 = due; - } else if (typeof due === "number") { - each = due; - } - if (withObservable) { - _with = function() { - return withObservable; - }; - } else { - throw new TypeError("No observable provided to switch to"); - } - if (first2 == null && each == null) { - throw new TypeError("No timeout provided."); - } - return timeout({ - first: first2, - each, - scheduler, - with: _with - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/timestamp.js -function timestamp(timestampProvider) { - if (timestampProvider === void 0) { - timestampProvider = dateTimestampProvider; - } - return map(function(value) { - return { value, timestamp: timestampProvider.now() }; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/window.js -function window(windowBoundaries) { - return operate(function(source, subscriber) { - var windowSubject = new Subject(); - subscriber.next(windowSubject.asObservable()); - var errorHandler = function(err) { - windowSubject.error(err); - subscriber.error(err); - }; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); - }, function() { - windowSubject.complete(); - subscriber.complete(); - }, errorHandler)); - innerFrom(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, function() { - windowSubject.complete(); - subscriber.next(windowSubject = new Subject()); - }, noop, errorHandler)); - return function() { - windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); - windowSubject = null; - }; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js -function windowCount(windowSize, startWindowEvery) { - if (startWindowEvery === void 0) { - startWindowEvery = 0; - } - var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; - return operate(function(source, subscriber) { - var windows = [new Subject()]; - var starts = []; - var count2 = 0; - subscriber.next(windows[0].asObservable()); - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var e_1, _a; - try { - for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { - var window_1 = windows_1_1.value; - window_1.next(value); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) - _a.call(windows_1); - } finally { - if (e_1) - throw e_1.error; - } - } - var c = count2 - windowSize + 1; - if (c >= 0 && c % startEvery === 0) { - windows.shift().complete(); - } - if (++count2 % startEvery === 0) { - var window_2 = new Subject(); - windows.push(window_2); - subscriber.next(window_2.asObservable()); - } - }, function() { - while (windows.length > 0) { - windows.shift().complete(); - } - subscriber.complete(); - }, function(err) { - while (windows.length > 0) { - windows.shift().error(err); - } - subscriber.error(err); - }, function() { - starts = null; - windows = null; - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js -function windowTime(windowTimeSpan) { - var _a, _b; - var otherArgs = []; - for (var _i = 1; _i < arguments.length; _i++) { - otherArgs[_i - 1] = arguments[_i]; - } - var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; - var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; - var maxWindowSize = otherArgs[1] || Infinity; - return operate(function(source, subscriber) { - var windowRecords = []; - var restartOnClose = false; - var closeWindow = function(record) { - var window2 = record.window, subs = record.subs; - window2.complete(); - subs.unsubscribe(); - arrRemove(windowRecords, record); - restartOnClose && startWindow(); - }; - var startWindow = function() { - if (windowRecords) { - var subs = new Subscription(); - subscriber.add(subs); - var window_1 = new Subject(); - var record_1 = { - window: window_1, - subs, - seen: 0 - }; - windowRecords.push(record_1); - subscriber.next(window_1.asObservable()); - executeSchedule(subs, scheduler, function() { - return closeWindow(record_1); - }, windowTimeSpan); - } - }; - if (windowCreationInterval !== null && windowCreationInterval >= 0) { - executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); - } else { - restartOnClose = true; - } - startWindow(); - var loop = function(cb) { - return windowRecords.slice().forEach(cb); - }; - var terminate = function(cb) { - loop(function(_a2) { - var window2 = _a2.window; - return cb(window2); - }); - cb(subscriber); - subscriber.unsubscribe(); - }; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - loop(function(record) { - record.window.next(value); - maxWindowSize <= ++record.seen && closeWindow(record); - }); - }, function() { - return terminate(function(consumer) { - return consumer.complete(); - }); - }, function(err) { - return terminate(function(consumer) { - return consumer.error(err); - }); - })); - return function() { - windowRecords = null; - }; - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js -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 window2 = new Subject(); - windows.push(window2); - var closingSubscription = new Subscription(); - var closeWindow = function() { - arrRemove(windows, window2); - window2.complete(); - closingSubscription.unsubscribe(); - }; - var closingNotifier; - try { - closingNotifier = innerFrom(closingSelector(openValue)); - } catch (err) { - handleError(err); - return; - } - subscriber.next(window2.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(); - } - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js -function windowWhen(closingSelector) { - return operate(function(source, subscriber) { - var window2; - var closingSubscriber; - var handleError = function(err) { - window2.error(err); - subscriber.error(err); - }; - var openWindow = function() { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window2 === null || window2 === void 0 ? void 0 : window2.complete(); - window2 = new Subject(); - subscriber.next(window2.asObservable()); - var closingNotifier; - try { - closingNotifier = innerFrom(closingSelector()); - } catch (err) { - handleError(err); - return; - } - closingNotifier.subscribe(closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError)); - }; - openWindow(); - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - return window2.next(value); - }, function() { - window2.complete(); - subscriber.complete(); - }, handleError, function() { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window2 = null; - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js -function withLatestFrom() { - var inputs = []; - for (var _i = 0; _i < arguments.length; _i++) { - inputs[_i] = arguments[_i]; - } - var project = popResultSelector(inputs); - return operate(function(source, subscriber) { - var len = inputs.length; - var otherValues = new Array(len); - var hasValue = inputs.map(function() { - return false; - }); - var ready = false; - var _loop_1 = function(i2) { - innerFrom(inputs[i2]).subscribe(createOperatorSubscriber(subscriber, function(value) { - otherValues[i2] = value; - if (!ready && !hasValue[i2]) { - hasValue[i2] = true; - (ready = hasValue.every(identity)) && (hasValue = null); - } - }, noop)); - }; - for (var i = 0; i < len; i++) { - _loop_1(i); - } - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - if (ready) { - var values = __spreadArray([value], __read(otherValues)); - subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values); - } - })); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/zipAll.js -function zipAll(project) { - return joinAllInternals(zip, project); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/zip.js -function zip2() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - return operate(function(source, subscriber) { - zip.apply(void 0, __spreadArray([source], __read(sources))).subscribe(subscriber); - }); -} - -// ../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/operators/zipWith.js -function zipWith() { - var otherInputs = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherInputs[_i] = arguments[_i]; - } - return zip2.apply(void 0, __spreadArray([], __read(otherInputs))); -} -export { - ArgumentOutOfRangeError, - AsyncSubject, - BehaviorSubject, - ConnectableObservable, - EMPTY, - EmptyError, - NEVER, - NotFoundError, - Notification, - NotificationKind, - ObjectUnsubscribedError, - Observable, - ReplaySubject, - Scheduler, - SequenceError, - Subject, - Subscriber, - Subscription, - TimeoutError, - UnsubscriptionError, - VirtualAction, - VirtualTimeScheduler, - animationFrame, - animationFrameScheduler, - animationFrames, - asap, - asapScheduler, - async, - asyncScheduler, - audit, - auditTime, - bindCallback, - bindNodeCallback, - buffer, - bufferCount, - bufferTime, - bufferToggle, - bufferWhen, - catchError, - combineAll, - combineLatest, - combineLatestAll, - combineLatestWith, - concat, - concatAll, - concatMap, - concatMapTo, - concatWith, - config, - connect, - connectable, - count, - debounce, - debounceTime, - defaultIfEmpty, - defer, - delay, - delayWhen, - dematerialize, - distinct, - distinctUntilChanged, - distinctUntilKeyChanged, - elementAt, - empty, - endWith, - every, - exhaust, - exhaustAll, - exhaustMap, - expand, - filter, - finalize, - find, - findIndex, - first, - firstValueFrom, - flatMap, - forkJoin, - from, - fromEvent, - fromEventPattern, - generate, - groupBy, - identity, - ignoreElements, - iif, - interval, - isEmpty, - isObservable, - last2 as last, - lastValueFrom, - map, - mapTo, - materialize, - max, - merge, - mergeAll, - mergeMap, - mergeMapTo, - mergeScan, - mergeWith, - min, - multicast, - never, - noop, - observable, - observeOn, - of, - onErrorResumeNext, - onErrorResumeNextWith, - pairs, - pairwise, - partition, - pipe, - pluck, - publish, - publishBehavior, - publishLast, - publishReplay, - queue, - queueScheduler, - race, - raceWith, - range, - reduce, - refCount, - repeat, - repeatWhen, - retry, - retryWhen, - sample, - sampleTime, - scan, - scheduled, - sequenceEqual, - share, - shareReplay, - single, - skip, - skipLast, - skipUntil, - skipWhile, - startWith, - subscribeOn, - switchAll, - switchMap, - switchMapTo, - switchScan, - take, - takeLast, - takeUntil, - takeWhile, - tap, - throttle, - throttleTime, - throwError, - throwIfEmpty, - timeInterval, - timeout, - timeoutWith, - timer, - timestamp, - toArray, - using, - window, - windowCount, - windowTime, - windowToggle, - windowWhen, - withLatestFrom, - zip, - zipAll, - zipWith -}; -//# sourceMappingURL=rxjs.js.map diff --git a/sandbox/LoAF-desiredRenderStart/.vite/deps/rxjs.js.map b/sandbox/LoAF-desiredRenderStart/.vite/deps/rxjs.js.map deleted file mode 100644 index 03b169c..0000000 --- a/sandbox/LoAF-desiredRenderStart/.vite/deps/rxjs.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../../web-mightals.js/node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/isFunction.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/createErrorClass.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/UnsubscriptionError.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/arrRemove.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/Subscription.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/config.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/reportUnhandledError.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/noop.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/NotificationFactories.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/errorContext.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/Subscriber.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/symbol/observable.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/identity.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/pipe.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/Observable.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/lift.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/refCount.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/ConnectableObservable.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/dom/animationFrames.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/Subject.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/BehaviorSubject.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/ReplaySubject.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/AsyncSubject.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/Action.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/intervalProvider.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/AsyncAction.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/Immediate.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/immediateProvider.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/AsapAction.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/Scheduler.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/asap.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/async.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/QueueAction.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/QueueScheduler.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/queue.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/animationFrame.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/empty.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/isScheduler.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/args.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/isArrayLike.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/isPromise.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/isInteropObservable.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/isAsyncIterable.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/throwUnobservableError.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/symbol/iterator.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/isIterable.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/isReadableStreamLike.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/innerFrom.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/executeSchedule.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/observeOn.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/subscribeOn.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduled/schedulePromise.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduled/scheduleArray.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/scheduled/scheduled.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/from.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/of.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/throwError.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/Notification.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/isObservable.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/EmptyError.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/lastValueFrom.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/firstValueFrom.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/NotFoundError.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/SequenceError.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/isDate.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/timeout.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/map.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/mapOneOrManyArgs.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/bindCallbackInternals.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/bindCallback.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/bindNodeCallback.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/createObject.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/combineLatest.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/mergeInternals.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/mergeMap.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/mergeAll.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/concatAll.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/concat.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/defer.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/connectable.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/forkJoin.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/fromEvent.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/fromEventPattern.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/generate.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/iif.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/timer.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/interval.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/merge.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/never.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/argsOrArgArray.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/onErrorResumeNext.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/pairs.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/util/not.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/filter.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/partition.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/race.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/range.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/using.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/zip.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/audit.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/auditTime.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/buffer.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/bufferCount.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/bufferTime.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/bufferToggle.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/bufferWhen.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/catchError.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/scanInternals.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/reduce.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/toArray.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/joinAllInternals.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/combineLatestAll.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/combineAll.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/combineLatest.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/combineLatestWith.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/concatMap.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/concatMapTo.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/concat.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/concatWith.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/observable/fromSubscribable.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/connect.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/count.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/debounce.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/debounceTime.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/take.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/ignoreElements.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/mapTo.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/delayWhen.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/delay.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/dematerialize.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/distinct.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/throwIfEmpty.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/elementAt.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/endWith.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/every.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/exhaustMap.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/exhaustAll.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/exhaust.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/expand.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/finalize.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/find.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/findIndex.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/first.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/groupBy.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/isEmpty.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/takeLast.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/last.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/materialize.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/max.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/flatMap.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/mergeMapTo.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/mergeScan.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/merge.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/mergeWith.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/min.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/multicast.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/pairwise.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/pluck.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/publish.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/publishBehavior.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/publishLast.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/publishReplay.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/raceWith.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/repeat.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/repeatWhen.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/retry.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/retryWhen.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/sample.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/sampleTime.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/scan.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/sequenceEqual.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/share.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/shareReplay.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/single.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/skip.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/skipLast.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/skipUntil.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/skipWhile.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/startWith.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/switchMap.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/switchAll.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/switchMapTo.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/switchScan.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/takeUntil.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/takeWhile.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/tap.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/throttle.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/throttleTime.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/timeInterval.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/timeoutWith.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/timestamp.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/window.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/windowCount.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/windowTime.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/windowToggle.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/windowWhen.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/withLatestFrom.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/zipAll.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/zip.ts", "../../../web-mightals.js/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/src/internal/operators/zipWith.ts"], - "sourcesContent": ["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n", "/**\n * Returns true if the object is a function.\n * @param value The value to check\n */\nexport function isFunction(value: any): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n", "/**\n * Used to create Error subclasses until the community moves away from ES5.\n *\n * This is because compiling from TypeScript down to ES5 has issues with subclassing Errors\n * as well as other built-in types: https://github.com/Microsoft/TypeScript/issues/12123\n *\n * @param createImpl A factory function to create the actual constructor implementation. The returned\n * function should be a named function that calls `_super` internally.\n */\nexport function createErrorClass(createImpl: (_super: any) => any): T {\n const _super = (instance: any) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n", "import { createErrorClass } from './createErrorClass';\n\nexport interface UnsubscriptionError extends Error {\n readonly errors: any[];\n}\n\nexport interface UnsubscriptionErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (errors: any[]): UnsubscriptionError;\n}\n\n/**\n * An error thrown when one or more errors have occurred during the\n * `unsubscribe` of a {@link Subscription}.\n */\nexport const UnsubscriptionError: UnsubscriptionErrorCtor = createErrorClass(\n (_super) =>\n function UnsubscriptionErrorImpl(this: any, errors: (Error | string)[]) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n }\n);\n", "/**\n * Removes an item from an array, mutating it.\n * @param arr The array to remove the item from\n * @param item The item to remove\n */\nexport function arrRemove(arr: T[] | undefined | null, item: T) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n", "import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { SubscriptionLike, TeardownLogic, Unsubscribable } from './types';\nimport { arrRemove } from './util/arrRemove';\n\n/**\n * Represents a disposable resource, such as the execution of an Observable. A\n * Subscription has one important method, `unsubscribe`, that takes no argument\n * and just disposes the resource held by the subscription.\n *\n * Additionally, subscriptions may be grouped together through the `add()`\n * method, which will attach a child Subscription to the current Subscription.\n * When a Subscription is unsubscribed, all its children (and its grandchildren)\n * will be unsubscribed as well.\n *\n * @class Subscription\n */\nexport class Subscription implements SubscriptionLike {\n /** @nocollapse */\n public static EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n\n /**\n * A flag to indicate whether this Subscription has already been unsubscribed.\n */\n public closed = false;\n\n private _parentage: Subscription[] | Subscription | null = null;\n\n /**\n * The list of registered finalizers to execute upon unsubscription. Adding and removing from this\n * list occurs in the {@link #add} and {@link #remove} methods.\n */\n private _finalizers: Exclude[] | null = null;\n\n /**\n * @param initialTeardown A function executed first as part of the finalization\n * process that is kicked off when {@link #unsubscribe} is called.\n */\n constructor(private initialTeardown?: () => void) {}\n\n /**\n * Disposes the resources held by the subscription. May, for instance, cancel\n * an ongoing Observable execution or cancel any other type of work that\n * started when the Subscription was created.\n * @return {void}\n */\n unsubscribe(): void {\n let errors: any[] | undefined;\n\n if (!this.closed) {\n this.closed = true;\n\n // Remove this from it's parents.\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n } else {\n _parentage.remove(this);\n }\n }\n\n const { initialTeardown: initialFinalizer } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n } catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n\n const { _finalizers } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n } catch (err) {\n errors = errors ?? [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n } else {\n errors.push(err);\n }\n }\n }\n }\n\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n\n /**\n * Adds a finalizer to this subscription, so that finalization will be unsubscribed/called\n * when this subscription is unsubscribed. If this subscription is already {@link #closed},\n * because it has already been unsubscribed, then whatever finalizer is passed to it\n * will automatically be executed (unless the finalizer itself is also a closed subscription).\n *\n * Closed Subscriptions cannot be added as finalizers to any subscription. Adding a closed\n * subscription to a any subscription will result in no operation. (A noop).\n *\n * Adding a subscription to itself, or adding `null` or `undefined` will not perform any\n * operation at all. (A noop).\n *\n * `Subscription` instances that are added to this instance will automatically remove themselves\n * if they are unsubscribed. Functions and {@link Unsubscribable} objects that you wish to remove\n * will need to be removed manually with {@link #remove}\n *\n * @param teardown The finalization logic to add to this subscription.\n */\n add(teardown: TeardownLogic): void {\n // Only add the finalizer if it's not undefined\n // and don't add a subscription to itself.\n if (teardown && teardown !== this) {\n if (this.closed) {\n // If this subscription is already closed,\n // execute whatever finalizer is handed to it automatically.\n execFinalizer(teardown);\n } else {\n if (teardown instanceof Subscription) {\n // We don't add closed subscriptions, and we don't add the same subscription\n // twice. Subscription unsubscribe is idempotent.\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = this._finalizers ?? []).push(teardown);\n }\n }\n }\n\n /**\n * Checks to see if a this subscription already has a particular parent.\n * This will signal that this subscription has already been added to the parent in question.\n * @param parent the parent to check for\n */\n private _hasParent(parent: Subscription) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n\n /**\n * Adds a parent to this subscription so it can be removed from the parent if it\n * unsubscribes on it's own.\n *\n * NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED.\n * @param parent The parent subscription to add\n */\n private _addParent(parent: Subscription) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n\n /**\n * Called on a child when it is removed via {@link #remove}.\n * @param parent The parent to remove\n */\n private _removeParent(parent: Subscription) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n } else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n\n /**\n * Removes a finalizer from this subscription that was previously added with the {@link #add} method.\n *\n * Note that `Subscription` instances, when unsubscribed, will automatically remove themselves\n * from every other `Subscription` they have been added to. This means that using the `remove` method\n * is not a common thing and should be used thoughtfully.\n *\n * If you add the same finalizer instance of a function or an unsubscribable object to a `Subscription` instance\n * more than once, you will need to call `remove` the same number of times to remove all instances.\n *\n * All finalizer instances are removed to free up memory upon unsubscription.\n *\n * @param teardown The finalizer to remove from this subscription\n */\n remove(teardown: Exclude): void {\n const { _finalizers } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\n\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\n\nexport function isSubscription(value: any): value is Subscription {\n return (\n value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))\n );\n}\n\nfunction execFinalizer(finalizer: Unsubscribable | (() => void)) {\n if (isFunction(finalizer)) {\n finalizer();\n } else {\n finalizer.unsubscribe();\n }\n}\n", "import { Subscriber } from './Subscriber';\nimport { ObservableNotification } from './types';\n\n/**\n * The {@link GlobalConfig} object for RxJS. It is used to configure things\n * like how to react on unhandled errors.\n */\nexport const config: GlobalConfig = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n\n/**\n * The global configuration object for RxJS, used to configure things\n * like how to react on unhandled errors. Accessible via {@link config}\n * object.\n */\nexport interface GlobalConfig {\n /**\n * A registration point for unhandled errors from RxJS. These are errors that\n * cannot were not handled by consuming code in the usual subscription path. For\n * example, if you have this configured, and you subscribe to an observable without\n * providing an error handler, errors from that subscription will end up here. This\n * will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onUnhandledError: ((err: any) => void) | null;\n\n /**\n * A registration point for notifications that cannot be sent to subscribers because they\n * have completed, errored or have been explicitly unsubscribed. By default, next, complete\n * and error notifications sent to stopped subscribers are noops. However, sometimes callers\n * might want a different behavior. For example, with sources that attempt to report errors\n * to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead.\n * This will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onStoppedNotification: ((notification: ObservableNotification, subscriber: Subscriber) => void) | null;\n\n /**\n * The promise constructor used by default for {@link Observable#toPromise toPromise} and {@link Observable#forEach forEach}\n * methods.\n *\n * @deprecated As of version 8, RxJS will no longer support this sort of injection of a\n * Promise constructor. If you need a Promise implementation other than native promises,\n * please polyfill/patch Promise as you see appropriate. Will be removed in v8.\n */\n Promise?: PromiseConstructorLike;\n\n /**\n * If true, turns on synchronous error rethrowing, which is a deprecated behavior\n * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe\n * call in a try/catch block. It also enables producer interference, a nasty bug\n * where a multicast can be broken for all observers by a downstream consumer with\n * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BUY TIME\n * FOR MIGRATION REASONS.\n *\n * @deprecated As of version 8, RxJS will no longer support synchronous throwing\n * of unhandled errors. All errors will be thrown on a separate call stack to prevent bad\n * behaviors described above. Will be removed in v8.\n */\n useDeprecatedSynchronousErrorHandling: boolean;\n\n /**\n * If true, enables an as-of-yet undocumented feature from v5: The ability to access\n * `unsubscribe()` via `this` context in `next` functions created in observers passed\n * to `subscribe`.\n *\n * This is being removed because the performance was severely problematic, and it could also cause\n * issues when types other than POJOs are passed to subscribe as subscribers, as they will likely have\n * their `this` context overwritten.\n *\n * @deprecated As of version 8, RxJS will no longer support altering the\n * context of next functions provided as part of an observer to Subscribe. Instead,\n * you will have access to a subscription or a signal or token that will allow you to do things like\n * unsubscribe and test closed status. Will be removed in v8.\n */\n useDeprecatedNextContext: boolean;\n}\n", "import type { TimerHandle } from './timerHandle';\ntype SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearTimeoutFunction = (handle: TimerHandle) => void;\n\ninterface TimeoutProvider {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n delegate:\n | {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n }\n | undefined;\n}\n\nexport const timeoutProvider: TimeoutProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setTimeout(handler: () => void, timeout?: number, ...args) {\n const { delegate } = timeoutProvider;\n if (delegate?.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return (delegate?.clearTimeout || clearTimeout)(handle as any);\n },\n delegate: undefined,\n};\n", "import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\n\n/**\n * Handles an error on another job either with the user-configured {@link onUnhandledError},\n * or by throwing it on that new job so it can be picked up by `window.onerror`, `process.on('error')`, etc.\n *\n * This should be called whenever there is an error that is out-of-band with the subscription\n * or when an error hits a terminal boundary of the subscription and no error handler was provided.\n *\n * @param err the error to report\n */\nexport function reportUnhandledError(err: any) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n // Execute the user-configured error handler.\n onUnhandledError(err);\n } else {\n // Throw so it is picked up by the runtime's uncaught error mechanism.\n throw err;\n }\n });\n}\n", "/* tslint:disable:no-empty */\nexport function noop() { }\n", "import { CompleteNotification, NextNotification, ErrorNotification } from './types';\n\n/**\n * A completion object optimized for memory use and created to be the\n * same \"shape\" as other notifications in v8.\n * @internal\n */\nexport const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined) as CompleteNotification)();\n\n/**\n * Internal use only. Creates an optimized error notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function errorNotification(error: any): ErrorNotification {\n return createNotification('E', undefined, error) as any;\n}\n\n/**\n * Internal use only. Creates an optimized next notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function nextNotification(value: T) {\n return createNotification('N', value, undefined) as NextNotification;\n}\n\n/**\n * Ensures that all notifications created internally have the same \"shape\" in v8.\n *\n * TODO: This is only exported to support a crazy legacy test in `groupBy`.\n * @internal\n */\nexport function createNotification(kind: 'N' | 'E' | 'C', value: any, error: any) {\n return {\n kind,\n value,\n error,\n };\n}\n", "import { config } from '../config';\n\nlet context: { errorThrown: boolean; error: any } | null = null;\n\n/**\n * Handles dealing with errors for super-gross mode. Creates a context, in which\n * any synchronously thrown errors will be passed to {@link captureError}. Which\n * will record the error such that it will be rethrown after the call back is complete.\n * TODO: Remove in v8\n * @param cb An immediately executed function.\n */\nexport function errorContext(cb: () => void) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context!;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n } else {\n // This is the general non-deprecated path for everyone that\n // isn't crazy enough to use super-gross mode (useDeprecatedSynchronousErrorHandling)\n cb();\n }\n}\n\n/**\n * Captures errors only in super-gross mode.\n * @param err the error to capture\n */\nexport function captureError(err: any) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n", "import { isFunction } from './util/isFunction';\nimport { Observer, ObservableNotification } from './types';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\n\n/**\n * Implements the {@link Observer} interface and extends the\n * {@link Subscription} class. While the {@link Observer} is the public API for\n * consuming the values of an {@link Observable}, all Observers get converted to\n * a Subscriber, in order to provide Subscription-like capabilities such as\n * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for\n * implementing operators, but it is rarely used as a public API.\n *\n * @class Subscriber\n */\nexport class Subscriber extends Subscription implements Observer {\n /**\n * A static factory for a Subscriber, given a (potentially partial) definition\n * of an Observer.\n * @param next The `next` callback of an Observer.\n * @param error The `error` callback of an\n * Observer.\n * @param complete The `complete` callback of an\n * Observer.\n * @return A Subscriber wrapping the (partially defined)\n * Observer represented by the given arguments.\n * @nocollapse\n * @deprecated Do not use. Will be removed in v8. There is no replacement for this\n * method, and there is no reason to be creating instances of `Subscriber` directly.\n * If you have a specific use case, please file an issue.\n */\n static create(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber {\n return new SafeSubscriber(next, error, complete);\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected isStopped: boolean = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected destination: Subscriber | Observer; // this `any` is the escape hatch to erase extra type param (e.g. R)\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * There is no reason to directly create an instance of Subscriber. This type is exported for typings reasons.\n */\n constructor(destination?: Subscriber | Observer) {\n super();\n if (destination) {\n this.destination = destination;\n // Automatically chain subscriptions together here.\n // if destination is a Subscription, then it is a Subscriber.\n if (isSubscription(destination)) {\n destination.add(this);\n }\n } else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `next` from\n * the Observable, with a value. The Observable may call this method 0 or more\n * times.\n * @param {T} [value] The `next` value.\n * @return {void}\n */\n next(value?: T): void {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n } else {\n this._next(value!);\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `error` from\n * the Observable, with an attached `Error`. Notifies the Observer that\n * the Observable has experienced an error condition.\n * @param {any} [err] The `error` exception.\n * @return {void}\n */\n error(err?: any): void {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n } else {\n this.isStopped = true;\n this._error(err);\n }\n }\n\n /**\n * The {@link Observer} callback to receive a valueless notification of type\n * `complete` from the Observable. Notifies the Observer that the Observable\n * has finished sending push-based notifications.\n * @return {void}\n */\n complete(): void {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n } else {\n this.isStopped = true;\n this._complete();\n }\n }\n\n unsubscribe(): void {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null!;\n }\n }\n\n protected _next(value: T): void {\n this.destination.next(value);\n }\n\n protected _error(err: any): void {\n try {\n this.destination.error(err);\n } finally {\n this.unsubscribe();\n }\n }\n\n protected _complete(): void {\n try {\n this.destination.complete();\n } finally {\n this.unsubscribe();\n }\n }\n}\n\n/**\n * This bind is captured here because we want to be able to have\n * compatibility with monoid libraries that tend to use a method named\n * `bind`. In particular, a library called Monio requires this.\n */\nconst _bind = Function.prototype.bind;\n\nfunction bind any>(fn: Fn, thisArg: any): Fn {\n return _bind.call(fn, thisArg);\n}\n\n/**\n * Internal optimization only, DO NOT EXPOSE.\n * @internal\n */\nclass ConsumerObserver implements Observer {\n constructor(private partialObserver: Partial>) {}\n\n next(value: T): void {\n const { partialObserver } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n\n error(err: any): void {\n const { partialObserver } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n } catch (error) {\n handleUnhandledError(error);\n }\n } else {\n handleUnhandledError(err);\n }\n }\n\n complete(): void {\n const { partialObserver } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\n\nexport class SafeSubscriber extends Subscriber {\n constructor(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((e?: any) => void) | null,\n complete?: (() => void) | null\n ) {\n super();\n\n let partialObserver: Partial>;\n if (isFunction(observerOrNext) || !observerOrNext) {\n // The first argument is a function, not an observer. The next\n // two arguments *could* be observers, or they could be empty.\n partialObserver = {\n next: (observerOrNext ?? undefined) as (((value: T) => void) | undefined),\n error: error ?? undefined,\n complete: complete ?? undefined,\n };\n } else {\n // The first argument is a partial observer.\n let context: any;\n if (this && config.useDeprecatedNextContext) {\n // This is a deprecated path that made `this.unsubscribe()` available in\n // next handler functions passed to subscribe. This only exists behind a flag\n // now, as it is *very* slow.\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n };\n } else {\n // The \"normal\" path. Just use the partial observer directly.\n partialObserver = observerOrNext;\n }\n }\n\n // Wrap the partial observer to ensure it's a full observer, and\n // make sure proper error handling is accounted for.\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\n\nfunction handleUnhandledError(error: any) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n } else {\n // Ideal path, we report this as an unhandled error,\n // which is thrown on a new call stack.\n reportUnhandledError(error);\n }\n}\n\n/**\n * An error handler used when no error handler was supplied\n * to the SafeSubscriber -- meaning no error handler was supplied\n * do the `subscribe` call on our observable.\n * @param err The error to handle\n */\nfunction defaultErrorHandler(err: any) {\n throw err;\n}\n\n/**\n * A handler for notifications that cannot be sent to a stopped subscriber.\n * @param notification The notification being sent\n * @param subscriber The stopped subscriber\n */\nfunction handleStoppedNotification(notification: ObservableNotification, subscriber: Subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\n\n/**\n * The observer used as a stub for subscriptions where the user did not\n * pass any arguments to `subscribe`. Comes with the default error handling\n * behavior.\n */\nexport const EMPTY_OBSERVER: Readonly> & { closed: true } = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n", "/**\n * Symbol.observable or a string \"@@observable\". Used for interop\n *\n * @deprecated We will no longer be exporting this symbol in upcoming versions of RxJS.\n * Instead polyfill and use Symbol.observable directly *or* use https://www.npmjs.com/package/symbol-observable\n */\nexport const observable: string | symbol = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n", "/**\n * This function takes one parameter and just returns it. Simply put,\n * this is like `(x: T): T => x`.\n *\n * ## Examples\n *\n * This is useful in some cases when using things like `mergeMap`\n *\n * ```ts\n * import { interval, take, map, range, mergeMap, identity } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(5));\n *\n * const result$ = source$.pipe(\n * map(i => range(i)),\n * mergeMap(identity) // same as mergeMap(x => x)\n * );\n *\n * result$.subscribe({\n * next: console.log\n * });\n * ```\n *\n * Or when you want to selectively apply an operator\n *\n * ```ts\n * import { interval, take, identity } from 'rxjs';\n *\n * const shouldLimit = () => Math.random() < 0.5;\n *\n * const source$ = interval(1000);\n *\n * const result$ = source$.pipe(shouldLimit() ? take(5) : identity);\n *\n * result$.subscribe({\n * next: console.log\n * });\n * ```\n *\n * @param x Any value that is returned by this function\n * @returns The value passed as the first parameter to this function\n */\nexport function identity(x: T): T {\n return x;\n}\n", "import { identity } from './identity';\nimport { UnaryFunction } from '../types';\n\nexport function pipe(): typeof identity;\nexport function pipe(fn1: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction,\n ...fns: UnaryFunction[]\n): UnaryFunction;\n\n/**\n * pipe() can be called on one or more functions, each of which can take one argument (\"UnaryFunction\")\n * and uses it to return a value.\n * It returns a function that takes one argument, passes it to the first UnaryFunction, and then\n * passes the result to the next one, passes that result to the next one, and so on. \n */\nexport function pipe(...fns: Array>): UnaryFunction {\n return pipeFromArray(fns);\n}\n\n/** @internal */\nexport function pipeFromArray(fns: Array>): UnaryFunction {\n if (fns.length === 0) {\n return identity as UnaryFunction;\n }\n\n if (fns.length === 1) {\n return fns[0];\n }\n\n return function piped(input: T): R {\n return fns.reduce((prev: any, fn: UnaryFunction) => fn(prev), input as any);\n };\n}\n", "import { Operator } from './Operator';\nimport { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription, Subscription } from './Subscription';\nimport { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A representation of any set of values over any amount of time. This is the most basic building block\n * of RxJS.\n *\n * @class Observable\n */\nexport class Observable implements Subscribable {\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n source: Observable | undefined;\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n operator: Operator | undefined;\n\n /**\n * @constructor\n * @param {Function} subscribe the function that is called when the Observable is\n * initially subscribed to. This function is given a Subscriber, to which new values\n * can be `next`ed, or an `error` method can be called to raise an error, or\n * `complete` can be called to notify of a successful completion.\n */\n constructor(subscribe?: (this: Observable, subscriber: Subscriber) => TeardownLogic) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n\n // HACK: Since TypeScript inherits static properties too, we have to\n // fight against TypeScript here so Subject can have a different static create signature\n /**\n * Creates a new Observable by calling the Observable constructor\n * @owner Observable\n * @method create\n * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor\n * @return {Observable} a new observable\n * @nocollapse\n * @deprecated Use `new Observable()` instead. Will be removed in v8.\n */\n static create: (...args: any[]) => any = (subscribe?: (subscriber: Subscriber) => TeardownLogic) => {\n return new Observable(subscribe);\n };\n\n /**\n * Creates a new Observable, with this Observable instance as the source, and the passed\n * operator defined as the new observable's operator.\n * @method lift\n * @param operator the operator defining the operation to take on the observable\n * @return a new observable with the Operator applied\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * If you have implemented an operator using `lift`, it is recommended that you create an\n * operator by simply returning `new Observable()` directly. See \"Creating new operators from\n * scratch\" section here: https://rxjs.dev/guide/operators\n */\n lift(operator?: Operator): Observable {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n\n subscribe(observerOrNext?: Partial> | ((value: T) => void)): Subscription;\n /** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */\n subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription;\n /**\n * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.\n *\n * Use it when you have all these Observables, but still nothing is happening.\n *\n * `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It\n * might be for example a function that you passed to Observable's constructor, but most of the time it is\n * a library implementation, which defines what will be emitted by an Observable, and when it be will emitted. This means\n * that calling `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often\n * the thought.\n *\n * Apart from starting the execution of an Observable, this method allows you to listen for values\n * that an Observable emits, as well as for when it completes or errors. You can achieve this in two\n * of the following ways.\n *\n * The first way is creating an object that implements {@link Observer} interface. It should have methods\n * defined by that interface, but note that it should be just a regular JavaScript object, which you can create\n * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular, do\n * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also\n * that your object does not have to implement all methods. If you find yourself creating a method that doesn't\n * do anything, you can simply omit it. Note however, if the `error` method is not provided and an error happens,\n * it will be thrown asynchronously. Errors thrown asynchronously cannot be caught using `try`/`catch`. Instead,\n * use the {@link onUnhandledError} configuration option or use a runtime handler (like `window.onerror` or\n * `process.on('error)`) to be notified of unhandled errors. Because of this, it's recommended that you provide\n * an `error` method to avoid missing thrown errors.\n *\n * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods.\n * This means you can provide three functions as arguments to `subscribe`, where the first function is equivalent\n * of a `next` method, the second of an `error` method and the third of a `complete` method. Just as in case of an Observer,\n * if you do not need to listen for something, you can omit a function by passing `undefined` or `null`,\n * since `subscribe` recognizes these functions by where they were placed in function call. When it comes\n * to the `error` function, as with an Observer, if not provided, errors emitted by an Observable will be thrown asynchronously.\n *\n * You can, however, subscribe with no parameters at all. This may be the case where you're not interested in terminal events\n * and you also handled emissions internally by using operators (e.g. using `tap`).\n *\n * Whichever style of calling `subscribe` you use, in both cases it returns a Subscription object.\n * This object allows you to call `unsubscribe` on it, which in turn will stop the work that an Observable does and will clean\n * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback\n * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable.\n *\n * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously.\n * It is an Observable itself that decides when these functions will be called. For example {@link of}\n * by default emits all its values synchronously. Always check documentation for how given Observable\n * will behave when subscribed and if its default behavior can be modified with a `scheduler`.\n *\n * #### Examples\n *\n * Subscribe with an {@link guide/observer Observer}\n *\n * ```ts\n * import { of } from 'rxjs';\n *\n * const sumObserver = {\n * sum: 0,\n * next(value) {\n * console.log('Adding: ' + value);\n * this.sum = this.sum + value;\n * },\n * error() {\n * // We actually could just remove this method,\n * // since we do not really care about errors right now.\n * },\n * complete() {\n * console.log('Sum equals: ' + this.sum);\n * }\n * };\n *\n * of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes.\n * .subscribe(sumObserver);\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Subscribe with functions ({@link deprecations/subscribe-arguments deprecated})\n *\n * ```ts\n * import { of } from 'rxjs'\n *\n * let sum = 0;\n *\n * of(1, 2, 3).subscribe(\n * value => {\n * console.log('Adding: ' + value);\n * sum = sum + value;\n * },\n * undefined,\n * () => console.log('Sum equals: ' + sum)\n * );\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Cancel a subscription\n *\n * ```ts\n * import { interval } from 'rxjs';\n *\n * const subscription = interval(1000).subscribe({\n * next(num) {\n * console.log(num)\n * },\n * complete() {\n * // Will not be called, even when cancelling subscription.\n * console.log('completed!');\n * }\n * });\n *\n * setTimeout(() => {\n * subscription.unsubscribe();\n * console.log('unsubscribed!');\n * }, 2500);\n *\n * // Logs:\n * // 0 after 1s\n * // 1 after 2s\n * // 'unsubscribed!' after 2.5s\n * ```\n *\n * @param {Observer|Function} observerOrNext (optional) Either an observer with methods to be called,\n * or the first of three possible handlers, which is the handler for each value emitted from the subscribed\n * Observable.\n * @param {Function} error (optional) A handler for a terminal event resulting from an error. If no error handler is provided,\n * the error will be thrown asynchronously as unhandled.\n * @param {Function} complete (optional) A handler for a terminal event resulting from successful completion.\n * @return {Subscription} a subscription reference to the registered handlers\n * @method subscribe\n */\n subscribe(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((error: any) => void) | null,\n complete?: (() => void) | null\n ): Subscription {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(\n operator\n ? // We're dealing with a subscription in the\n // operator chain to one of our lifted operators.\n operator.call(subscriber, source)\n : source\n ? // If `source` has a value, but `operator` does not, something that\n // had intimate knowledge of our API, like our `Subject`, must have\n // set it. We're going to just call `_subscribe` directly.\n this._subscribe(subscriber)\n : // In all other cases, we're likely wrapping a user-provided initializer\n // function, so we need to catch errors and handle them appropriately.\n this._trySubscribe(subscriber)\n );\n });\n\n return subscriber;\n }\n\n /** @internal */\n protected _trySubscribe(sink: Subscriber): TeardownLogic {\n try {\n return this._subscribe(sink);\n } catch (err) {\n // We don't need to return anything in this case,\n // because it's just going to try to `add()` to a subscription\n // above.\n sink.error(err);\n }\n }\n\n /**\n * Used as a NON-CANCELLABLE means of subscribing to an observable, for use with\n * APIs that expect promises, like `async/await`. You cannot unsubscribe from this.\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * #### Example\n *\n * ```ts\n * import { interval, take } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(4));\n *\n * async function getTotal() {\n * let total = 0;\n *\n * await source$.forEach(value => {\n * total += value;\n * console.log('observable -> ' + value);\n * });\n *\n * return total;\n * }\n *\n * getTotal().then(\n * total => console.log('Total: ' + total)\n * );\n *\n * // Expected:\n * // 'observable -> 0'\n * // 'observable -> 1'\n * // 'observable -> 2'\n * // 'observable -> 3'\n * // 'Total: 6'\n * ```\n *\n * @param next a handler for each value emitted by the observable\n * @return a promise that either resolves on observable completion or\n * rejects with the handled error\n */\n forEach(next: (value: T) => void): Promise;\n\n /**\n * @param next a handler for each value emitted by the observable\n * @param promiseCtor a constructor function used to instantiate the Promise\n * @return a promise that either resolves on observable completion or\n * rejects with the handled error\n * @deprecated Passing a Promise constructor will no longer be available\n * in upcoming versions of RxJS. This is because it adds weight to the library, for very\n * little benefit. If you need this functionality, it is recommended that you either\n * polyfill Promise, or you create an adapter to convert the returned native promise\n * to whatever promise implementation you wanted. Will be removed in v8.\n */\n forEach(next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise;\n\n forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n try {\n next(value);\n } catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n this.subscribe(subscriber);\n }) as Promise;\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): TeardownLogic {\n return this.source?.subscribe(subscriber);\n }\n\n /**\n * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable\n * @method Symbol.observable\n * @return {Observable} this instance of the observable\n */\n [Symbol_observable]() {\n return this;\n }\n\n /* tslint:disable:max-line-length */\n pipe(): Observable;\n pipe(op1: OperatorFunction): Observable;\n pipe(op1: OperatorFunction, op2: OperatorFunction): Observable;\n pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction,\n op9: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction,\n op9: OperatorFunction,\n ...operations: OperatorFunction[]\n ): Observable;\n /* tslint:enable:max-line-length */\n\n /**\n * Used to stitch together functional operators into a chain.\n * @method pipe\n * @return {Observable} the Observable result of all of the operators having\n * been called in the order they were passed in.\n *\n * ## Example\n *\n * ```ts\n * import { interval, filter, map, scan } from 'rxjs';\n *\n * interval(1000)\n * .pipe(\n * filter(x => x % 2 === 0),\n * map(x => x + x),\n * scan((acc, x) => acc + x)\n * )\n * .subscribe(x => console.log(x));\n * ```\n */\n pipe(...operations: OperatorFunction[]): Observable {\n return pipeFromArray(operations)(this);\n }\n\n /* tslint:disable:max-line-length */\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(): Promise;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: typeof Promise): Promise;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: PromiseConstructorLike): Promise;\n /* tslint:enable:max-line-length */\n\n /**\n * Subscribe to this Observable and get a Promise resolving on\n * `complete` with the last emission (if any).\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * @method toPromise\n * @param [promiseCtor] a constructor function used to instantiate\n * the Promise\n * @return A Promise that resolves with the last value emit, or\n * rejects on an error. If there were no emissions, Promise\n * resolves with undefined.\n * @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise\n */\n toPromise(promiseCtor?: PromiseConstructorLike): Promise {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n let value: T | undefined;\n this.subscribe(\n (x: T) => (value = x),\n (err: any) => reject(err),\n () => resolve(value)\n );\n }) as Promise;\n }\n}\n\n/**\n * Decides between a passed promise constructor from consuming code,\n * A default configured promise constructor, and the native promise\n * constructor and returns it. If nothing can be found, it will throw\n * an error.\n * @param promiseCtor The optional promise constructor to passed by consuming code\n */\nfunction getPromiseCtor(promiseCtor: PromiseConstructorLike | undefined) {\n return promiseCtor ?? config.Promise ?? Promise;\n}\n\nfunction isObserver(value: any): value is Observer {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\n\nfunction isSubscriber(value: any): value is Subscriber {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n", "import { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { OperatorFunction } from '../types';\nimport { isFunction } from './isFunction';\n\n/**\n * Used to determine if an object is an Observable with a lift function.\n */\nexport function hasLift(source: any): source is { lift: InstanceType['lift'] } {\n return isFunction(source?.lift);\n}\n\n/**\n * Creates an `OperatorFunction`. Used to define operators throughout the library in a concise way.\n * @param init The logic to connect the liftedSource to the subscriber at the moment of subscription.\n */\nexport function operate(\n init: (liftedSource: Observable, subscriber: Subscriber) => (() => void) | void\n): OperatorFunction {\n return (source: Observable) => {\n if (hasLift(source)) {\n return source.lift(function (this: Subscriber, liftedSource: Observable) {\n try {\n return init(liftedSource, this);\n } catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n", "import { Subscriber } from '../Subscriber';\n\n/**\n * Creates an instance of an `OperatorSubscriber`.\n * @param destination The downstream subscriber.\n * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any\n * error that occurs in this function is caught and sent to the `error` method of this subscriber.\n * @param onError Handles errors from the subscription, any errors that occur in this handler are caught\n * and send to the `destination` error handler.\n * @param onComplete Handles completion notification from the subscription. Any errors that occur in\n * this handler are sent to the `destination` error handler.\n * @param onFinalize Additional teardown logic here. This will only be called on teardown if the\n * subscriber itself is not already closed. This is called after all other teardown logic is executed.\n */\nexport function createOperatorSubscriber(\n destination: Subscriber,\n onNext?: (value: T) => void,\n onComplete?: () => void,\n onError?: (err: any) => void,\n onFinalize?: () => void\n): Subscriber {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\n\n/**\n * A generic helper for allowing operators to be created with a Subscriber and\n * use closures to capture necessary state from the operator function itself.\n */\nexport class OperatorSubscriber extends Subscriber {\n /**\n * Creates an instance of an `OperatorSubscriber`.\n * @param destination The downstream subscriber.\n * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any\n * error that occurs in this function is caught and sent to the `error` method of this subscriber.\n * @param onError Handles errors from the subscription, any errors that occur in this handler are caught\n * and send to the `destination` error handler.\n * @param onComplete Handles completion notification from the subscription. Any errors that occur in\n * this handler are sent to the `destination` error handler.\n * @param onFinalize Additional finalization logic here. This will only be called on finalization if the\n * subscriber itself is not already closed. This is called after all other finalization logic is executed.\n * @param shouldUnsubscribe An optional check to see if an unsubscribe call should truly unsubscribe.\n * NOTE: This currently **ONLY** exists to support the strange behavior of {@link groupBy}, where unsubscription\n * to the resulting observable does not actually disconnect from the source if there are active subscriptions\n * to any grouped observable. (DO NOT EXPOSE OR USE EXTERNALLY!!!)\n */\n constructor(\n destination: Subscriber,\n onNext?: (value: T) => void,\n onComplete?: () => void,\n onError?: (err: any) => void,\n private onFinalize?: () => void,\n private shouldUnsubscribe?: () => boolean\n ) {\n // It's important - for performance reasons - that all of this class's\n // members are initialized and that they are always initialized in the same\n // order. This will ensure that all OperatorSubscriber instances have the\n // same hidden class in V8. This, in turn, will help keep the number of\n // hidden classes involved in property accesses within the base class as\n // low as possible. If the number of hidden classes involved exceeds four,\n // the property accesses will become megamorphic and performance penalties\n // will be incurred - i.e. inline caches won't be used.\n //\n // The reasons for ensuring all instances have the same hidden class are\n // further discussed in this blog post from Benedikt Meurer:\n // https://benediktmeurer.de/2018/03/23/impact-of-polymorphism-on-component-based-frameworks-like-react/\n super(destination);\n this._next = onNext\n ? function (this: OperatorSubscriber, value: T) {\n try {\n onNext(value);\n } catch (err) {\n destination.error(err);\n }\n }\n : super._next;\n this._error = onError\n ? function (this: OperatorSubscriber, err: any) {\n try {\n onError(err);\n } catch (err) {\n // Send any errors that occur down stream.\n destination.error(err);\n } finally {\n // Ensure finalization.\n this.unsubscribe();\n }\n }\n : super._error;\n this._complete = onComplete\n ? function (this: OperatorSubscriber) {\n try {\n onComplete();\n } catch (err) {\n // Send any errors that occur down stream.\n destination.error(err);\n } finally {\n // Ensure finalization.\n this.unsubscribe();\n }\n }\n : super._complete;\n }\n\n unsubscribe() {\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n const { closed } = this;\n super.unsubscribe();\n // Execute additional teardown if we have any and we didn't already do so.\n !closed && this.onFinalize?.();\n }\n }\n}\n", "import { ConnectableObservable } from '../observable/ConnectableObservable';\nimport { Subscription } from '../Subscription';\nimport { MonoTypeOperatorFunction } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Make a {@link ConnectableObservable} behave like a ordinary observable and automates the way\n * you can connect to it.\n *\n * Internally it counts the subscriptions to the observable and subscribes (only once) to the source if\n * the number of subscriptions is larger than 0. If the number of subscriptions is smaller than 1, it\n * unsubscribes from the source. This way you can make sure that everything before the *published*\n * refCount has only a single subscription independently of the number of subscribers to the target\n * observable.\n *\n * Note that using the {@link share} operator is exactly the same as using the `multicast(() => new Subject())` operator\n * (making the observable hot) and the *refCount* operator in a sequence.\n *\n * ![](refCount.png)\n *\n * ## Example\n *\n * In the following example there are two intervals turned into connectable observables\n * by using the *publish* operator. The first one uses the *refCount* operator, the\n * second one does not use it. You will notice that a connectable observable does nothing\n * until you call its connect function.\n *\n * ```ts\n * import { interval, tap, publish, refCount } from 'rxjs';\n *\n * // Turn the interval observable into a ConnectableObservable (hot)\n * const refCountInterval = interval(400).pipe(\n * tap(num => console.log(`refCount ${ num }`)),\n * publish(),\n * refCount()\n * );\n *\n * const publishedInterval = interval(400).pipe(\n * tap(num => console.log(`publish ${ num }`)),\n * publish()\n * );\n *\n * refCountInterval.subscribe();\n * refCountInterval.subscribe();\n * // 'refCount 0' -----> 'refCount 1' -----> etc\n * // All subscriptions will receive the same value and the tap (and\n * // every other operator) before the `publish` operator will be executed\n * // only once per event independently of the number of subscriptions.\n *\n * publishedInterval.subscribe();\n * // Nothing happens until you call .connect() on the observable.\n * ```\n *\n * @return A function that returns an Observable that automates the connection\n * to ConnectableObservable.\n * @see {@link ConnectableObservable}\n * @see {@link share}\n * @see {@link publish}\n * @deprecated Replaced with the {@link share} operator. How `share` is used\n * will depend on the connectable observable you created just prior to the\n * `refCount` operator.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\nexport function refCount(): MonoTypeOperatorFunction {\n return operate((source, subscriber) => {\n let connection: Subscription | null = null;\n\n (source as any)._refCount++;\n\n const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => {\n if (!source || (source as any)._refCount <= 0 || 0 < --(source as any)._refCount) {\n connection = null;\n return;\n }\n\n ///\n // Compare the local RefCountSubscriber's connection Subscription to the\n // connection Subscription on the shared ConnectableObservable. In cases\n // where the ConnectableObservable source synchronously emits values, and\n // the RefCountSubscriber's downstream Observers synchronously unsubscribe,\n // execution continues to here before the RefCountOperator has a chance to\n // supply the RefCountSubscriber with the shared connection Subscription.\n // For example:\n // ```\n // range(0, 10).pipe(\n // publish(),\n // refCount(),\n // take(5),\n // )\n // .subscribe();\n // ```\n // In order to account for this case, RefCountSubscriber should only dispose\n // the ConnectableObservable's shared connection Subscription if the\n // connection Subscription exists, *and* either:\n // a. RefCountSubscriber doesn't have a reference to the shared connection\n // Subscription yet, or,\n // b. RefCountSubscriber's connection Subscription reference is identical\n // to the shared connection Subscription\n ///\n\n const sharedConnection = (source as any)._connection;\n const conn = connection;\n connection = null;\n\n if (sharedConnection && (!conn || sharedConnection === conn)) {\n sharedConnection.unsubscribe();\n }\n\n subscriber.unsubscribe();\n });\n\n source.subscribe(refCounter);\n\n if (!refCounter.closed) {\n connection = (source as ConnectableObservable).connect();\n }\n });\n}\n", "import { Subject } from '../Subject';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { hasLift } from '../util/lift';\n\n/**\n * @class ConnectableObservable\n * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable.\n * If you are using the `refCount` method of `ConnectableObservable`, use the {@link share} operator\n * instead.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\nexport class ConnectableObservable extends Observable {\n protected _subject: Subject | null = null;\n protected _refCount: number = 0;\n protected _connection: Subscription | null = null;\n\n /**\n * @param source The source observable\n * @param subjectFactory The factory that creates the subject used internally.\n * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable.\n * `new ConnectableObservable(source, factory)` is equivalent to\n * `connectable(source, { connector: factory })`.\n * When the `refCount()` method is needed, the {@link share} operator should be used instead:\n * `new ConnectableObservable(source, factory).refCount()` is equivalent to\n * `source.pipe(share({ connector: factory }))`.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\n constructor(public source: Observable, protected subjectFactory: () => Subject) {\n super();\n // If we have lift, monkey patch that here. This is done so custom observable\n // types will compose through multicast. Otherwise the resulting observable would\n // simply be an instance of `ConnectableObservable`.\n if (hasLift(source)) {\n this.lift = source.lift;\n }\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber) {\n return this.getSubject().subscribe(subscriber);\n }\n\n protected getSubject(): Subject {\n const subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject!;\n }\n\n protected _teardown() {\n this._refCount = 0;\n const { _connection } = this;\n this._subject = this._connection = null;\n _connection?.unsubscribe();\n }\n\n /**\n * @deprecated {@link ConnectableObservable} will be removed in v8. Use {@link connectable} instead.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\n connect(): Subscription {\n let connection = this._connection;\n if (!connection) {\n connection = this._connection = new Subscription();\n const subject = this.getSubject();\n connection.add(\n this.source.subscribe(\n createOperatorSubscriber(\n subject as any,\n undefined,\n () => {\n this._teardown();\n subject.complete();\n },\n (err) => {\n this._teardown();\n subject.error(err);\n },\n () => this._teardown()\n )\n )\n );\n\n if (connection.closed) {\n this._connection = null;\n connection = Subscription.EMPTY;\n }\n }\n return connection;\n }\n\n /**\n * @deprecated {@link ConnectableObservable} will be removed in v8. Use the {@link share} operator instead.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\n refCount(): Observable {\n return higherOrderRefCount()(this) as Observable;\n }\n}\n", "import { TimestampProvider } from '../types';\n\ninterface PerformanceTimestampProvider extends TimestampProvider {\n delegate: TimestampProvider | undefined;\n}\n\nexport const performanceTimestampProvider: PerformanceTimestampProvider = {\n now() {\n // Use the variable rather than `this` so that the function can be called\n // without being bound to the provider.\n return (performanceTimestampProvider.delegate || performance).now();\n },\n delegate: undefined,\n};\n", "import { Subscription } from '../Subscription';\n\ninterface AnimationFrameProvider {\n schedule(callback: FrameRequestCallback): Subscription;\n requestAnimationFrame: typeof requestAnimationFrame;\n cancelAnimationFrame: typeof cancelAnimationFrame;\n delegate:\n | {\n requestAnimationFrame: typeof requestAnimationFrame;\n cancelAnimationFrame: typeof cancelAnimationFrame;\n }\n | undefined;\n}\n\nexport const animationFrameProvider: AnimationFrameProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n schedule(callback) {\n let request = requestAnimationFrame;\n let cancel: typeof cancelAnimationFrame | undefined = cancelAnimationFrame;\n const { delegate } = animationFrameProvider;\n if (delegate) {\n request = delegate.requestAnimationFrame;\n cancel = delegate.cancelAnimationFrame;\n }\n const handle = request((timestamp) => {\n // Clear the cancel function. The request has been fulfilled, so\n // attempting to cancel the request upon unsubscription would be\n // pointless.\n cancel = undefined;\n callback(timestamp);\n });\n return new Subscription(() => cancel?.(handle));\n },\n requestAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return (delegate?.requestAnimationFrame || requestAnimationFrame)(...args);\n },\n cancelAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return (delegate?.cancelAnimationFrame || cancelAnimationFrame)(...args);\n },\n delegate: undefined,\n};\n", "import { Observable } from '../../Observable';\nimport { TimestampProvider } from '../../types';\nimport { performanceTimestampProvider } from '../../scheduler/performanceTimestampProvider';\nimport { animationFrameProvider } from '../../scheduler/animationFrameProvider';\n\n/**\n * An observable of animation frames\n *\n * Emits the amount of time elapsed since subscription and the timestamp on each animation frame.\n * Defaults to milliseconds provided to the requestAnimationFrame's callback. Does not end on its own.\n *\n * Every subscription will start a separate animation loop. Since animation frames are always scheduled\n * by the browser to occur directly before a repaint, scheduling more than one animation frame synchronously\n * should not be much different or have more overhead than looping over an array of events during\n * a single animation frame. However, if for some reason the developer would like to ensure the\n * execution of animation-related handlers are all executed during the same task by the engine,\n * the `share` operator can be used.\n *\n * This is useful for setting up animations with RxJS.\n *\n * ## Examples\n *\n * Tweening a div to move it on the screen\n *\n * ```ts\n * import { animationFrames, map, takeWhile, endWith } from 'rxjs';\n *\n * function tween(start: number, end: number, duration: number) {\n * const diff = end - start;\n * return animationFrames().pipe(\n * // Figure out what percentage of time has passed\n * map(({ elapsed }) => elapsed / duration),\n * // Take the vector while less than 100%\n * takeWhile(v => v < 1),\n * // Finish with 100%\n * endWith(1),\n * // Calculate the distance traveled between start and end\n * map(v => v * diff + start)\n * );\n * }\n *\n * // Setup a div for us to move around\n * const div = document.createElement('div');\n * document.body.appendChild(div);\n * div.style.position = 'absolute';\n * div.style.width = '40px';\n * div.style.height = '40px';\n * div.style.backgroundColor = 'lime';\n * div.style.transform = 'translate3d(10px, 0, 0)';\n *\n * tween(10, 200, 4000).subscribe(x => {\n * div.style.transform = `translate3d(${ x }px, 0, 0)`;\n * });\n * ```\n *\n * Providing a custom timestamp provider\n *\n * ```ts\n * import { animationFrames, TimestampProvider } from 'rxjs';\n *\n * // A custom timestamp provider\n * let now = 0;\n * const customTSProvider: TimestampProvider = {\n * now() { return now++; }\n * };\n *\n * const source$ = animationFrames(customTSProvider);\n *\n * // Log increasing numbers 0...1...2... on every animation frame.\n * source$.subscribe(({ elapsed }) => console.log(elapsed));\n * ```\n *\n * @param timestampProvider An object with a `now` method that provides a numeric timestamp\n */\nexport function animationFrames(timestampProvider?: TimestampProvider) {\n return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES;\n}\n\n/**\n * Does the work of creating the observable for `animationFrames`.\n * @param timestampProvider The timestamp provider to use to create the observable\n */\nfunction animationFramesFactory(timestampProvider?: TimestampProvider) {\n return new Observable<{ timestamp: number; elapsed: number }>((subscriber) => {\n // If no timestamp provider is specified, use performance.now() - as it\n // will return timestamps 'compatible' with those passed to the run\n // callback and won't be affected by NTP adjustments, etc.\n const provider = timestampProvider || performanceTimestampProvider;\n\n // Capture the start time upon subscription, as the run callback can remain\n // queued for a considerable period of time and the elapsed time should\n // represent the time elapsed since subscription - not the time since the\n // first rendered animation frame.\n const start = provider.now();\n\n let id = 0;\n const run = () => {\n if (!subscriber.closed) {\n id = animationFrameProvider.requestAnimationFrame((timestamp: DOMHighResTimeStamp | number) => {\n id = 0;\n // Use the provider's timestamp to calculate the elapsed time. Note that\n // this means - if the caller hasn't passed a provider - that\n // performance.now() will be used instead of the timestamp that was\n // passed to the run callback. The reason for this is that the timestamp\n // passed to the callback can be earlier than the start time, as it\n // represents the time at which the browser decided it would render any\n // queued frames - and that time can be earlier the captured start time.\n const now = provider.now();\n subscriber.next({\n timestamp: timestampProvider ? now : timestamp,\n elapsed: now - start,\n });\n run();\n });\n }\n };\n\n run();\n\n return () => {\n if (id) {\n animationFrameProvider.cancelAnimationFrame(id);\n }\n };\n });\n}\n\n/**\n * In the common case, where the timestamp provided by the rAF API is used,\n * we use this shared observable to reduce overhead.\n */\nconst DEFAULT_ANIMATION_FRAMES = animationFramesFactory();\n", "import { createErrorClass } from './createErrorClass';\n\nexport interface ObjectUnsubscribedError extends Error {}\n\nexport interface ObjectUnsubscribedErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (): ObjectUnsubscribedError;\n}\n\n/**\n * An error thrown when an action is invalid because the object has been\n * unsubscribed.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n *\n * @class ObjectUnsubscribedError\n */\nexport const ObjectUnsubscribedError: ObjectUnsubscribedErrorCtor = createErrorClass(\n (_super) =>\n function ObjectUnsubscribedErrorImpl(this: any) {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n }\n);\n", "import { Operator } from './Operator';\nimport { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { Observer, SubscriptionLike, TeardownLogic } from './types';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A Subject is a special type of Observable that allows values to be\n * multicasted to many Observers. Subjects are like EventEmitters.\n *\n * Every Subject is an Observable and an Observer. You can subscribe to a\n * Subject, and you can call next to feed values as well as error and complete.\n */\nexport class Subject extends Observable implements SubscriptionLike {\n closed = false;\n\n private currentObservers: Observer[] | null = null;\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n observers: Observer[] = [];\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n isStopped = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n hasError = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n thrownError: any = null;\n\n /**\n * Creates a \"subject\" by basically gluing an observer to an observable.\n *\n * @nocollapse\n * @deprecated Recommended you do not use. Will be removed at some point in the future. Plans for replacement still under discussion.\n */\n static create: (...args: any[]) => any = (destination: Observer, source: Observable): AnonymousSubject => {\n return new AnonymousSubject(destination, source);\n };\n\n constructor() {\n // NOTE: This must be here to obscure Observable's constructor.\n super();\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n lift(operator: Operator): Observable {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator as any;\n return subject as any;\n }\n\n /** @internal */\n protected _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n\n next(value: T) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n\n error(err: any) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift()!.error(err);\n }\n }\n });\n }\n\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift()!.complete();\n }\n }\n });\n }\n\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null!;\n }\n\n get observed() {\n return this.observers?.length > 0;\n }\n\n /** @internal */\n protected _trySubscribe(subscriber: Subscriber): TeardownLogic {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n\n /** @internal */\n protected _innerSubscribe(subscriber: Subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n\n /** @internal */\n protected _checkFinalizedStatuses(subscriber: Subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n } else if (isStopped) {\n subscriber.complete();\n }\n }\n\n /**\n * Creates a new Observable with this Subject as the source. You can do this\n * to create custom Observer-side logic of the Subject and conceal it from\n * code that uses the Observable.\n * @return {Observable} Observable that the Subject casts to\n */\n asObservable(): Observable {\n const observable: any = new Observable();\n observable.source = this;\n return observable;\n }\n}\n\n/**\n * @class AnonymousSubject\n */\nexport class AnonymousSubject extends Subject {\n constructor(\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n public destination?: Observer,\n source?: Observable\n ) {\n super();\n this.source = source;\n }\n\n next(value: T) {\n this.destination?.next?.(value);\n }\n\n error(err: any) {\n this.destination?.error?.(err);\n }\n\n complete() {\n this.destination?.complete?.();\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n return this.source?.subscribe(subscriber) ?? EMPTY_SUBSCRIPTION;\n }\n}\n", "import { Subject } from './Subject';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\n\n/**\n * A variant of Subject that requires an initial value and emits its current\n * value whenever it is subscribed to.\n *\n * @class BehaviorSubject\n */\nexport class BehaviorSubject extends Subject {\n constructor(private _value: T) {\n super();\n }\n\n get value(): T {\n return this.getValue();\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n const subscription = super._subscribe(subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n\n getValue(): T {\n const { hasError, thrownError, _value } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n\n next(value: T): void {\n super.next((this._value = value));\n }\n}\n", "import { TimestampProvider } from '../types';\n\ninterface DateTimestampProvider extends TimestampProvider {\n delegate: TimestampProvider | undefined;\n}\n\nexport const dateTimestampProvider: DateTimestampProvider = {\n now() {\n // Use the variable rather than `this` so that the function can be called\n // without being bound to the provider.\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n", "import { Subject } from './Subject';\nimport { TimestampProvider } from './types';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\n\n/**\n * A variant of {@link Subject} that \"replays\" old values to new subscribers by emitting them when they first subscribe.\n *\n * `ReplaySubject` has an internal buffer that will store a specified number of values that it has observed. Like `Subject`,\n * `ReplaySubject` \"observes\" values by having them passed to its `next` method. When it observes a value, it will store that\n * value for a time determined by the configuration of the `ReplaySubject`, as passed to its constructor.\n *\n * When a new subscriber subscribes to the `ReplaySubject` instance, it will synchronously emit all values in its buffer in\n * a First-In-First-Out (FIFO) manner. The `ReplaySubject` will also complete, if it has observed completion; and it will\n * error if it has observed an error.\n *\n * There are two main configuration items to be concerned with:\n *\n * 1. `bufferSize` - This will determine how many items are stored in the buffer, defaults to infinite.\n * 2. `windowTime` - The amount of time to hold a value in the buffer before removing it from the buffer.\n *\n * Both configurations may exist simultaneously. So if you would like to buffer a maximum of 3 values, as long as the values\n * are less than 2 seconds old, you could do so with a `new ReplaySubject(3, 2000)`.\n *\n * ### Differences with BehaviorSubject\n *\n * `BehaviorSubject` is similar to `new ReplaySubject(1)`, with a couple of exceptions:\n *\n * 1. `BehaviorSubject` comes \"primed\" with a single value upon construction.\n * 2. `ReplaySubject` will replay values, even after observing an error, where `BehaviorSubject` will not.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n * @see {@link shareReplay}\n */\nexport class ReplaySubject extends Subject {\n private _buffer: (T | number)[] = [];\n private _infiniteTimeWindow = true;\n\n /**\n * @param bufferSize The size of the buffer to replay on subscription\n * @param windowTime The amount of time the buffered items will stay buffered\n * @param timestampProvider An object with a `now()` method that provides the current timestamp. This is used to\n * calculate the amount of time something has been buffered.\n */\n constructor(\n private _bufferSize = Infinity,\n private _windowTime = Infinity,\n private _timestampProvider: TimestampProvider = dateTimestampProvider\n ) {\n super();\n this._infiniteTimeWindow = _windowTime === Infinity;\n this._bufferSize = Math.max(1, _bufferSize);\n this._windowTime = Math.max(1, _windowTime);\n }\n\n next(value: T): void {\n const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n super.next(value);\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n this._throwIfClosed();\n this._trimBuffer();\n\n const subscription = this._innerSubscribe(subscriber);\n\n const { _infiniteTimeWindow, _buffer } = this;\n // We use a copy here, so reentrant code does not mutate our array while we're\n // emitting it to a new subscriber.\n const copy = _buffer.slice();\n for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i] as T);\n }\n\n this._checkFinalizedStatuses(subscriber);\n\n return subscription;\n }\n\n private _trimBuffer() {\n const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;\n // If we don't have an infinite buffer size, and we're over the length,\n // use splice to truncate the old buffer values off. Note that we have to\n // double the size for instances where we're not using an infinite time window\n // because we're storing the values and the timestamps in the same array.\n const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n\n // Now, if we're not in an infinite time window, remove all values where the time is\n // older than what is allowed.\n if (!_infiniteTimeWindow) {\n const now = _timestampProvider.now();\n let last = 0;\n // Search the array for the first timestamp that isn't expired and\n // truncate the buffer up to that point.\n for (let i = 1; i < _buffer.length && (_buffer[i] as number) <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n }\n}\n", "import { Subject } from './Subject';\nimport { Subscriber } from './Subscriber';\n\n/**\n * A variant of Subject that only emits a value when it completes. It will emit\n * its latest value to all its observers on completion.\n *\n * @class AsyncSubject\n */\nexport class AsyncSubject extends Subject {\n private _value: T | null = null;\n private _hasValue = false;\n private _isComplete = false;\n\n /** @internal */\n protected _checkFinalizedStatuses(subscriber: Subscriber) {\n const { hasError, _hasValue, _value, thrownError, isStopped, _isComplete } = this;\n if (hasError) {\n subscriber.error(thrownError);\n } else if (isStopped || _isComplete) {\n _hasValue && subscriber.next(_value!);\n subscriber.complete();\n }\n }\n\n next(value: T): void {\n if (!this.isStopped) {\n this._value = value;\n this._hasValue = true;\n }\n }\n\n complete(): void {\n const { _hasValue, _value, _isComplete } = this;\n if (!_isComplete) {\n this._isComplete = true;\n _hasValue && super.next(_value!);\n super.complete();\n }\n }\n}\n", "import { Scheduler } from '../Scheduler';\nimport { Subscription } from '../Subscription';\nimport { SchedulerAction } from '../types';\n\n/**\n * A unit of work to be executed in a `scheduler`. An action is typically\n * created from within a {@link SchedulerLike} and an RxJS user does not need to concern\n * themselves about creating and manipulating an Action.\n *\n * ```ts\n * class Action extends Subscription {\n * new (scheduler: Scheduler, work: (state?: T) => void);\n * schedule(state?: T, delay: number = 0): Subscription;\n * }\n * ```\n *\n * @class Action\n */\nexport class Action extends Subscription {\n constructor(scheduler: Scheduler, work: (this: SchedulerAction, state?: T) => void) {\n super();\n }\n /**\n * Schedules this action on its parent {@link SchedulerLike} for execution. May be passed\n * some context object, `state`. May happen at some point in the future,\n * according to the `delay` parameter, if specified.\n * @param {T} [state] Some contextual data that the `work` function uses when\n * called by the Scheduler.\n * @param {number} [delay] Time to wait before executing the work, where the\n * time unit is implicit and defined by the Scheduler.\n * @return {void}\n */\n public schedule(state?: T, delay: number = 0): Subscription {\n return this;\n }\n}\n", "import type { TimerHandle } from './timerHandle';\ntype SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearIntervalFunction = (handle: TimerHandle) => void;\n\ninterface IntervalProvider {\n setInterval: SetIntervalFunction;\n clearInterval: ClearIntervalFunction;\n delegate:\n | {\n setInterval: SetIntervalFunction;\n clearInterval: ClearIntervalFunction;\n }\n | undefined;\n}\n\nexport const intervalProvider: IntervalProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setInterval(handler: () => void, timeout?: number, ...args) {\n const { delegate } = intervalProvider;\n if (delegate?.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return (delegate?.clearInterval || clearInterval)(handle as any);\n },\n delegate: undefined,\n};\n", "import { Action } from './Action';\nimport { SchedulerAction } from '../types';\nimport { Subscription } from '../Subscription';\nimport { AsyncScheduler } from './AsyncScheduler';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsyncAction extends Action {\n public id: TimerHandle | undefined;\n public state?: T;\n // @ts-ignore: Property has no initializer and is not definitely assigned\n public delay: number;\n protected pending: boolean = false;\n\n constructor(protected scheduler: AsyncScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n public schedule(state?: T, delay: number = 0): Subscription {\n if (this.closed) {\n return this;\n }\n\n // Always replace the current state with the new state.\n this.state = state;\n\n const id = this.id;\n const scheduler = this.scheduler;\n\n //\n // Important implementation note:\n //\n // Actions only execute once by default, unless rescheduled from within the\n // scheduled callback. This allows us to implement single and repeat\n // actions via the same code path, without adding API surface area, as well\n // as mimic traditional recursion but across asynchronous boundaries.\n //\n // However, JS runtimes and timers distinguish between intervals achieved by\n // serial `setTimeout` calls vs. a single `setInterval` call. An interval of\n // serial `setTimeout` calls can be individually delayed, which delays\n // scheduling the next `setTimeout`, and so on. `setInterval` attempts to\n // guarantee the interval callback will be invoked more precisely to the\n // interval period, regardless of load.\n //\n // Therefore, we use `setInterval` to schedule single and repeat actions.\n // If the action reschedules itself with the same delay, the interval is not\n // canceled. If the action doesn't reschedule, or reschedules with a\n // different delay, the interval will be canceled after scheduled callback\n // execution.\n //\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n\n // Set the pending flag indicating that this action has been scheduled, or\n // has recursively rescheduled itself.\n this.pending = true;\n\n this.delay = delay;\n // If this action has already an async Id, don't request a new one.\n this.id = this.id ?? this.requestAsyncId(scheduler, this.id, delay);\n\n return this;\n }\n\n protected requestAsyncId(scheduler: AsyncScheduler, _id?: TimerHandle, delay: number = 0): TimerHandle {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n\n protected recycleAsyncId(_scheduler: AsyncScheduler, id?: TimerHandle, delay: number | null = 0): TimerHandle | undefined {\n // If this action is rescheduled with the same delay time, don't clear the interval id.\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n // Otherwise, if the action's delay time is different from the current delay,\n // or the action has been rescheduled before it's executed, clear the interval id\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n\n return undefined;\n }\n\n /**\n * Immediately executes this action and the `work` it contains.\n * @return {any}\n */\n public execute(state: T, delay: number): any {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n } else if (this.pending === false && this.id != null) {\n // Dequeue if the action didn't reschedule itself. Don't call\n // unsubscribe(), because the action could reschedule later.\n // For example:\n // ```\n // scheduler.schedule(function doWork(counter) {\n // /* ... I'm a busy worker bee ... */\n // var originalAction = this;\n // /* wait 100ms before rescheduling the action */\n // setTimeout(function () {\n // originalAction.schedule(counter + 1);\n // }, 100);\n // }, 1000);\n // ```\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n\n protected _execute(state: T, _delay: number): any {\n let errored: boolean = false;\n let errorValue: any;\n try {\n this.work(state);\n } catch (e) {\n errored = true;\n // HACK: Since code elsewhere is relying on the \"truthiness\" of the\n // return here, we can't have it return \"\" or 0 or false.\n // TODO: Clean this up when we refactor schedulers mid-version-8 or so.\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n\n this.work = this.state = this.scheduler = null!;\n this.pending = false;\n\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n\n this.delay = null!;\n super.unsubscribe();\n }\n }\n}\n", "let nextHandle = 1;\n// The promise needs to be created lazily otherwise it won't be patched by Zones\nlet resolved: Promise;\nconst activeHandles: { [key: number]: any } = {};\n\n/**\n * Finds the handle in the list of active handles, and removes it.\n * Returns `true` if found, `false` otherwise. Used both to clear\n * Immediate scheduled tasks, and to identify if a task should be scheduled.\n */\nfunction findAndClearHandle(handle: number): boolean {\n if (handle in activeHandles) {\n delete activeHandles[handle];\n return true;\n }\n return false;\n}\n\n/**\n * Helper functions to schedule and unschedule microtasks.\n */\nexport const Immediate = {\n setImmediate(cb: () => void): number {\n const handle = nextHandle++;\n activeHandles[handle] = true;\n if (!resolved) {\n resolved = Promise.resolve();\n }\n resolved.then(() => findAndClearHandle(handle) && cb());\n return handle;\n },\n\n clearImmediate(handle: number): void {\n findAndClearHandle(handle);\n },\n};\n\n/**\n * Used for internal testing purposes only. Do not export from library.\n */\nexport const TestTools = {\n pending() {\n return Object.keys(activeHandles).length;\n }\n};\n", "import { Immediate } from '../util/Immediate';\nimport type { TimerHandle } from './timerHandle';\nconst { setImmediate, clearImmediate } = Immediate;\n\ntype SetImmediateFunction = (handler: () => void, ...args: any[]) => TimerHandle;\ntype ClearImmediateFunction = (handle: TimerHandle) => void;\n\ninterface ImmediateProvider {\n setImmediate: SetImmediateFunction;\n clearImmediate: ClearImmediateFunction;\n delegate:\n | {\n setImmediate: SetImmediateFunction;\n clearImmediate: ClearImmediateFunction;\n }\n | undefined;\n}\n\nexport const immediateProvider: ImmediateProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setImmediate(...args) {\n const { delegate } = immediateProvider;\n return (delegate?.setImmediate || setImmediate)(...args);\n },\n clearImmediate(handle) {\n const { delegate } = immediateProvider;\n return (delegate?.clearImmediate || clearImmediate)(handle as any);\n },\n delegate: undefined,\n};\n", "import { AsyncAction } from './AsyncAction';\nimport { AsapScheduler } from './AsapScheduler';\nimport { SchedulerAction } from '../types';\nimport { immediateProvider } from './immediateProvider';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsapAction extends AsyncAction {\n constructor(protected scheduler: AsapScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n protected requestAsyncId(scheduler: AsapScheduler, id?: TimerHandle, delay: number = 0): TimerHandle {\n // If delay is greater than 0, request as an async action.\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n // Push the action to the end of the scheduler queue.\n scheduler.actions.push(this);\n // If a microtask has already been scheduled, don't schedule another\n // one. If a microtask hasn't been scheduled yet, schedule one now. Return\n // the current scheduled microtask id.\n return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined)));\n }\n\n protected recycleAsyncId(scheduler: AsapScheduler, id?: TimerHandle, delay: number = 0): TimerHandle | undefined {\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n if (delay != null ? delay > 0 : this.delay > 0) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n // If the scheduler queue has no remaining actions with the same async id,\n // cancel the requested microtask and set the scheduled flag to undefined\n // so the next AsapAction will request its own.\n const { actions } = scheduler;\n if (id != null && actions[actions.length - 1]?.id !== id) {\n immediateProvider.clearImmediate(id);\n if (scheduler._scheduled === id) {\n scheduler._scheduled = undefined;\n }\n }\n // Return undefined so the action knows to request a new async id if it's rescheduled.\n return undefined;\n }\n}\n", "import { Action } from './scheduler/Action';\nimport { Subscription } from './Subscription';\nimport { SchedulerLike, SchedulerAction } from './types';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\n\n/**\n * An execution context and a data structure to order tasks and schedule their\n * execution. Provides a notion of (potentially virtual) time, through the\n * `now()` getter method.\n *\n * Each unit of work in a Scheduler is called an `Action`.\n *\n * ```ts\n * class Scheduler {\n * now(): number;\n * schedule(work, delay?, state?): Subscription;\n * }\n * ```\n *\n * @class Scheduler\n * @deprecated Scheduler is an internal implementation detail of RxJS, and\n * should not be used directly. Rather, create your own class and implement\n * {@link SchedulerLike}. Will be made internal in v8.\n */\nexport class Scheduler implements SchedulerLike {\n public static now: () => number = dateTimestampProvider.now;\n\n constructor(private schedulerActionCtor: typeof Action, now: () => number = Scheduler.now) {\n this.now = now;\n }\n\n /**\n * A getter method that returns a number representing the current time\n * (at the time this function was called) according to the scheduler's own\n * internal clock.\n * @return {number} A number that represents the current time. May or may not\n * have a relation to wall-clock time. May or may not refer to a time unit\n * (e.g. milliseconds).\n */\n public now: () => number;\n\n /**\n * Schedules a function, `work`, for execution. May happen at some point in\n * the future, according to the `delay` parameter, if specified. May be passed\n * some context object, `state`, which will be passed to the `work` function.\n *\n * The given arguments will be processed an stored as an Action object in a\n * queue of actions.\n *\n * @param {function(state: ?T): ?Subscription} work A function representing a\n * task, or some unit of work to be executed by the Scheduler.\n * @param {number} [delay] Time to wait before executing the work, where the\n * time unit is implicit and defined by the Scheduler itself.\n * @param {T} [state] Some contextual data that the `work` function uses when\n * called by the Scheduler.\n * @return {Subscription} A subscription in order to be able to unsubscribe\n * the scheduled work.\n */\n public schedule(work: (this: SchedulerAction, state?: T) => void, delay: number = 0, state?: T): Subscription {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\n", "import { Scheduler } from '../Scheduler';\nimport { Action } from './Action';\nimport { AsyncAction } from './AsyncAction';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsyncScheduler extends Scheduler {\n public actions: Array> = [];\n /**\n * A flag to indicate whether the Scheduler is currently executing a batch of\n * queued actions.\n * @type {boolean}\n * @internal\n */\n public _active: boolean = false;\n /**\n * An internal ID used to track the latest asynchronous task such as those\n * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and\n * others.\n * @type {any}\n * @internal\n */\n public _scheduled: TimerHandle | undefined;\n\n constructor(SchedulerAction: typeof Action, now: () => number = Scheduler.now) {\n super(SchedulerAction, now);\n }\n\n public flush(action: AsyncAction): void {\n const { actions } = this;\n\n if (this._active) {\n actions.push(action);\n return;\n }\n\n let error: any;\n this._active = true;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()!)); // exhaust the scheduler queue\n\n this._active = false;\n\n if (error) {\n while ((action = actions.shift()!)) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n", "import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\nexport class AsapScheduler extends AsyncScheduler {\n public flush(action?: AsyncAction): void {\n this._active = true;\n // The async id that effects a call to flush is stored in _scheduled.\n // Before executing an action, it's necessary to check the action's async\n // id to determine whether it's supposed to be executed in the current\n // flush.\n // Previous implementations of this method used a count to determine this,\n // but that was unsound, as actions that are unsubscribed - i.e. cancelled -\n // are removed from the actions array and that can shift actions that are\n // scheduled to be executed in a subsequent flush into positions at which\n // they are executed within the current flush.\n const flushId = this._scheduled;\n this._scheduled = undefined;\n\n const { actions } = this;\n let error: any;\n action = action || actions.shift()!;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n\n this._active = false;\n\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n", "import { AsapAction } from './AsapAction';\nimport { AsapScheduler } from './AsapScheduler';\n\n/**\n *\n * Asap Scheduler\n *\n * Perform task as fast as it can be performed asynchronously\n *\n * `asap` scheduler behaves the same as {@link asyncScheduler} scheduler when you use it to delay task\n * in time. If however you set delay to `0`, `asap` will wait for current synchronously executing\n * code to end and then it will try to execute given task as fast as possible.\n *\n * `asap` scheduler will do its best to minimize time between end of currently executing code\n * and start of scheduled task. This makes it best candidate for performing so called \"deferring\".\n * Traditionally this was achieved by calling `setTimeout(deferredTask, 0)`, but that technique involves\n * some (although minimal) unwanted delay.\n *\n * Note that using `asap` scheduler does not necessarily mean that your task will be first to process\n * after currently executing code. In particular, if some task was also scheduled with `asap` before,\n * that task will execute first. That being said, if you need to schedule task asynchronously, but\n * as soon as possible, `asap` scheduler is your best bet.\n *\n * ## Example\n * Compare async and asap scheduler<\n * ```ts\n * import { asapScheduler, asyncScheduler } from 'rxjs';\n *\n * asyncScheduler.schedule(() => console.log('async')); // scheduling 'async' first...\n * asapScheduler.schedule(() => console.log('asap'));\n *\n * // Logs:\n * // \"asap\"\n * // \"async\"\n * // ... but 'asap' goes first!\n * ```\n */\n\nexport const asapScheduler = new AsapScheduler(AsapAction);\n\n/**\n * @deprecated Renamed to {@link asapScheduler}. Will be removed in v8.\n */\nexport const asap = asapScheduler;\n", "import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\n/**\n *\n * Async Scheduler\n *\n * Schedule task as if you used setTimeout(task, duration)\n *\n * `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript\n * event loop queue. It is best used to delay tasks in time or to schedule tasks repeating\n * in intervals.\n *\n * If you just want to \"defer\" task, that is to perform it right after currently\n * executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`),\n * better choice will be the {@link asapScheduler} scheduler.\n *\n * ## Examples\n * Use async scheduler to delay task\n * ```ts\n * import { asyncScheduler } from 'rxjs';\n *\n * const task = () => console.log('it works!');\n *\n * asyncScheduler.schedule(task, 2000);\n *\n * // After 2 seconds logs:\n * // \"it works!\"\n * ```\n *\n * Use async scheduler to repeat task in intervals\n * ```ts\n * import { asyncScheduler } from 'rxjs';\n *\n * function task(state) {\n * console.log(state);\n * this.schedule(state + 1, 1000); // `this` references currently executing Action,\n * // which we reschedule with new state and delay\n * }\n *\n * asyncScheduler.schedule(task, 3000, 0);\n *\n * // Logs:\n * // 0 after 3s\n * // 1 after 4s\n * // 2 after 5s\n * // 3 after 6s\n * ```\n */\n\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\n\n/**\n * @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8.\n */\nexport const async = asyncScheduler;\n", "import { AsyncAction } from './AsyncAction';\nimport { Subscription } from '../Subscription';\nimport { QueueScheduler } from './QueueScheduler';\nimport { SchedulerAction } from '../types';\nimport { TimerHandle } from './timerHandle';\n\nexport class QueueAction extends AsyncAction {\n constructor(protected scheduler: QueueScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n public schedule(state?: T, delay: number = 0): Subscription {\n if (delay > 0) {\n return super.schedule(state, delay);\n }\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n }\n\n public execute(state: T, delay: number): any {\n return delay > 0 || this.closed ? super.execute(state, delay) : this._execute(state, delay);\n }\n\n protected requestAsyncId(scheduler: QueueScheduler, id?: TimerHandle, delay: number = 0): TimerHandle {\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n\n if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n\n // Otherwise flush the scheduler starting with this action.\n scheduler.flush(this);\n\n // HACK: In the past, this was returning `void`. However, `void` isn't a valid\n // `TimerHandle`, and generally the return value here isn't really used. So the\n // compromise is to return `0` which is both \"falsy\" and a valid `TimerHandle`,\n // as opposed to refactoring every other instanceo of `requestAsyncId`.\n return 0;\n }\n}\n", "import { AsyncScheduler } from './AsyncScheduler';\n\nexport class QueueScheduler extends AsyncScheduler {\n}\n", "import { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\n\n/**\n *\n * Queue Scheduler\n *\n * Put every next task on a queue, instead of executing it immediately\n *\n * `queue` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler.\n *\n * When used without delay, it schedules given task synchronously - executes it right when\n * it is scheduled. However when called recursively, that is when inside the scheduled task,\n * another task is scheduled with queue scheduler, instead of executing immediately as well,\n * that task will be put on a queue and wait for current one to finish.\n *\n * This means that when you execute task with `queue` scheduler, you are sure it will end\n * before any other task scheduled with that scheduler will start.\n *\n * ## Examples\n * Schedule recursively first, then do something\n * ```ts\n * import { queueScheduler } from 'rxjs';\n *\n * queueScheduler.schedule(() => {\n * queueScheduler.schedule(() => console.log('second')); // will not happen now, but will be put on a queue\n *\n * console.log('first');\n * });\n *\n * // Logs:\n * // \"first\"\n * // \"second\"\n * ```\n *\n * Reschedule itself recursively\n * ```ts\n * import { queueScheduler } from 'rxjs';\n *\n * queueScheduler.schedule(function(state) {\n * if (state !== 0) {\n * console.log('before', state);\n * this.schedule(state - 1); // `this` references currently executing Action,\n * // which we reschedule with new state\n * console.log('after', state);\n * }\n * }, 0, 3);\n *\n * // In scheduler that runs recursively, you would expect:\n * // \"before\", 3\n * // \"before\", 2\n * // \"before\", 1\n * // \"after\", 1\n * // \"after\", 2\n * // \"after\", 3\n *\n * // But with queue it logs:\n * // \"before\", 3\n * // \"after\", 3\n * // \"before\", 2\n * // \"after\", 2\n * // \"before\", 1\n * // \"after\", 1\n * ```\n */\n\nexport const queueScheduler = new QueueScheduler(QueueAction);\n\n/**\n * @deprecated Renamed to {@link queueScheduler}. Will be removed in v8.\n */\nexport const queue = queueScheduler;\n", "import { AsyncAction } from './AsyncAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nimport { SchedulerAction } from '../types';\nimport { animationFrameProvider } from './animationFrameProvider';\nimport { TimerHandle } from './timerHandle';\n\nexport class AnimationFrameAction extends AsyncAction {\n constructor(protected scheduler: AnimationFrameScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n protected requestAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle {\n // If delay is greater than 0, request as an async action.\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n // Push the action to the end of the scheduler queue.\n scheduler.actions.push(this);\n // If an animation frame has already been requested, don't request another\n // one. If an animation frame hasn't been requested yet, request one. Return\n // the current animation frame request id.\n return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined)));\n }\n\n protected recycleAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle | undefined {\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n if (delay != null ? delay > 0 : this.delay > 0) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n // If the scheduler queue has no remaining actions with the same async id,\n // cancel the requested animation frame and set the scheduled flag to\n // undefined so the next AnimationFrameAction will request its own.\n const { actions } = scheduler;\n if (id != null && actions[actions.length - 1]?.id !== id) {\n animationFrameProvider.cancelAnimationFrame(id as number);\n scheduler._scheduled = undefined;\n }\n // Return undefined so the action knows to request a new async id if it's rescheduled.\n return undefined;\n }\n}\n", "import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\nexport class AnimationFrameScheduler extends AsyncScheduler {\n public flush(action?: AsyncAction): void {\n this._active = true;\n // The async id that effects a call to flush is stored in _scheduled.\n // Before executing an action, it's necessary to check the action's async\n // id to determine whether it's supposed to be executed in the current\n // flush.\n // Previous implementations of this method used a count to determine this,\n // but that was unsound, as actions that are unsubscribed - i.e. cancelled -\n // are removed from the actions array and that can shift actions that are\n // scheduled to be executed in a subsequent flush into positions at which\n // they are executed within the current flush.\n const flushId = this._scheduled;\n this._scheduled = undefined;\n\n const { actions } = this;\n let error: any;\n action = action || actions.shift()!;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n\n this._active = false;\n\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n", "import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\n\n/**\n *\n * Animation Frame Scheduler\n *\n * Perform task when `window.requestAnimationFrame` would fire\n *\n * When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler\n * behaviour.\n *\n * Without delay, `animationFrame` scheduler can be used to create smooth browser animations.\n * It makes sure scheduled task will happen just before next browser content repaint,\n * thus performing animations as efficiently as possible.\n *\n * ## Example\n * Schedule div height animation\n * ```ts\n * // html:
\n * import { animationFrameScheduler } from 'rxjs';\n *\n * const div = document.querySelector('div');\n *\n * animationFrameScheduler.schedule(function(height) {\n * div.style.height = height + \"px\";\n *\n * this.schedule(height + 1); // `this` references currently executing Action,\n * // which we reschedule with new state\n * }, 0, 0);\n *\n * // You will see a div element growing in height\n * ```\n */\n\nexport const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\n\n/**\n * @deprecated Renamed to {@link animationFrameScheduler}. Will be removed in v8.\n */\nexport const animationFrame = animationFrameScheduler;\n", "import { AsyncAction } from './AsyncAction';\nimport { Subscription } from '../Subscription';\nimport { AsyncScheduler } from './AsyncScheduler';\nimport { SchedulerAction } from '../types';\nimport { TimerHandle } from './timerHandle';\n\nexport class VirtualTimeScheduler extends AsyncScheduler {\n /** @deprecated Not used in VirtualTimeScheduler directly. Will be removed in v8. */\n static frameTimeFactor = 10;\n\n /**\n * The current frame for the state of the virtual scheduler instance. The difference\n * between two \"frames\" is synonymous with the passage of \"virtual time units\". So if\n * you record `scheduler.frame` to be `1`, then later, observe `scheduler.frame` to be at `11`,\n * that means `10` virtual time units have passed.\n */\n public frame: number = 0;\n\n /**\n * Used internally to examine the current virtual action index being processed.\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n public index: number = -1;\n\n /**\n * This creates an instance of a `VirtualTimeScheduler`. Experts only. The signature of\n * this constructor is likely to change in the long run.\n *\n * @param schedulerActionCtor The type of Action to initialize when initializing actions during scheduling.\n * @param maxFrames The maximum number of frames to process before stopping. Used to prevent endless flush cycles.\n */\n constructor(schedulerActionCtor: typeof AsyncAction = VirtualAction as any, public maxFrames: number = Infinity) {\n super(schedulerActionCtor, () => this.frame);\n }\n\n /**\n * Prompt the Scheduler to execute all of its queued actions, therefore\n * clearing its queue.\n * @return {void}\n */\n public flush(): void {\n const { actions, maxFrames } = this;\n let error: any;\n let action: AsyncAction | undefined;\n\n while ((action = actions[0]) && action.delay <= maxFrames) {\n actions.shift();\n this.frame = action.delay;\n\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n }\n\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n\nexport class VirtualAction extends AsyncAction {\n protected active: boolean = true;\n\n constructor(\n protected scheduler: VirtualTimeScheduler,\n protected work: (this: SchedulerAction, state?: T) => void,\n protected index: number = (scheduler.index += 1)\n ) {\n super(scheduler, work);\n this.index = scheduler.index = index;\n }\n\n public schedule(state?: T, delay: number = 0): Subscription {\n if (Number.isFinite(delay)) {\n if (!this.id) {\n return super.schedule(state, delay);\n }\n this.active = false;\n // If an action is rescheduled, we save allocations by mutating its state,\n // pushing it to the end of the scheduler queue, and recycling the action.\n // But since the VirtualTimeScheduler is used for testing, VirtualActions\n // must be immutable so they can be inspected later.\n const action = new VirtualAction(this.scheduler, this.work);\n this.add(action);\n return action.schedule(state, delay);\n } else {\n // If someone schedules something with Infinity, it'll never happen. So we\n // don't even schedule it.\n return Subscription.EMPTY;\n }\n }\n\n protected requestAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay: number = 0): TimerHandle {\n this.delay = scheduler.frame + delay;\n const { actions } = scheduler;\n actions.push(this);\n (actions as Array>).sort(VirtualAction.sortActions);\n return 1;\n }\n\n protected recycleAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay: number = 0): TimerHandle | undefined {\n return undefined;\n }\n\n protected _execute(state: T, delay: number): any {\n if (this.active === true) {\n return super._execute(state, delay);\n }\n }\n\n private static sortActions(a: VirtualAction, b: VirtualAction) {\n if (a.delay === b.delay) {\n if (a.index === b.index) {\n return 0;\n } else if (a.index > b.index) {\n return 1;\n } else {\n return -1;\n }\n } else if (a.delay > b.delay) {\n return 1;\n } else {\n return -1;\n }\n }\n}\n", "import { Observable } from '../Observable';\nimport { SchedulerLike } from '../types';\n\n/**\n * A simple Observable that emits no items to the Observer and immediately\n * emits a complete notification.\n *\n * Just emits 'complete', and nothing else.\n *\n * ![](empty.png)\n *\n * A simple Observable that only emits the complete notification. It can be used\n * for composing with other Observables, such as in a {@link mergeMap}.\n *\n * ## Examples\n *\n * Log complete notification\n *\n * ```ts\n * import { EMPTY } from 'rxjs';\n *\n * EMPTY.subscribe({\n * next: () => console.log('Next'),\n * complete: () => console.log('Complete!')\n * });\n *\n * // Outputs\n * // Complete!\n * ```\n *\n * Emit the number 7, then complete\n *\n * ```ts\n * import { EMPTY, startWith } from 'rxjs';\n *\n * const result = EMPTY.pipe(startWith(7));\n * result.subscribe(x => console.log(x));\n *\n * // Outputs\n * // 7\n * ```\n *\n * Map and flatten only odd numbers to the sequence `'a'`, `'b'`, `'c'`\n *\n * ```ts\n * import { interval, mergeMap, of, EMPTY } from 'rxjs';\n *\n * const interval$ = interval(1000);\n * const result = interval$.pipe(\n * mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : EMPTY),\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following to the console:\n * // x is equal to the count on the interval, e.g. (0, 1, 2, 3, ...)\n * // x will occur every 1000ms\n * // if x % 2 is equal to 1, print a, b, c (each on its own)\n * // if x % 2 is not equal to 1, nothing will be output\n * ```\n *\n * @see {@link Observable}\n * @see {@link NEVER}\n * @see {@link of}\n * @see {@link throwError}\n */\nexport const EMPTY = new Observable((subscriber) => subscriber.complete());\n\n/**\n * @param scheduler A {@link SchedulerLike} to use for scheduling\n * the emission of the complete notification.\n * @deprecated Replaced with the {@link EMPTY} constant or {@link scheduled} (e.g. `scheduled([], scheduler)`). Will be removed in v8.\n */\nexport function empty(scheduler?: SchedulerLike) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\n\nfunction emptyScheduled(scheduler: SchedulerLike) {\n return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete()));\n}\n", "import { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport function isScheduler(value: any): value is SchedulerLike {\n return value && isFunction(value.schedule);\n}\n", "import { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\n\nfunction last(arr: T[]): T | undefined {\n return arr[arr.length - 1];\n}\n\nexport function popResultSelector(args: any[]): ((...args: unknown[]) => unknown) | undefined {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\n\nexport function popScheduler(args: any[]): SchedulerLike | undefined {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\n\nexport function popNumber(args: any[], defaultValue: number): number {\n return typeof last(args) === 'number' ? args.pop()! : defaultValue;\n}\n", "export const isArrayLike = ((x: any): x is ArrayLike => x && typeof x.length === 'number' && typeof x !== 'function');", "import { isFunction } from \"./isFunction\";\n\n/**\n * Tests to see if the object is \"thennable\".\n * @param value the object to test\n */\nexport function isPromise(value: any): value is PromiseLike {\n return isFunction(value?.then);\n}\n", "import { InteropObservable } from '../types';\nimport { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being Observable (but not necessary an Rx Observable) */\nexport function isInteropObservable(input: any): input is InteropObservable {\n return isFunction(input[Symbol_observable]);\n}\n", "import { isFunction } from './isFunction';\n\nexport function isAsyncIterable(obj: any): obj is AsyncIterable {\n return Symbol.asyncIterator && isFunction(obj?.[Symbol.asyncIterator]);\n}\n", "/**\n * Creates the TypeError to throw if an invalid object is passed to `from` or `scheduled`.\n * @param input The object that was passed.\n */\nexport function createInvalidObservableTypeError(input: any) {\n // TODO: We should create error codes that can be looked up, so this can be less verbose.\n return new TypeError(\n `You provided ${\n input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`\n } where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`\n );\n}\n", "export function getSymbolIterator(): symbol {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator' as any;\n }\n\n return Symbol.iterator;\n}\n\nexport const iterator = getSymbolIterator();\n", "import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being an Iterable */\nexport function isIterable(input: any): input is Iterable {\n return isFunction(input?.[Symbol_iterator]);\n}\n", "import { ReadableStreamLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport async function* readableStreamLikeToAsyncGenerator(readableStream: ReadableStreamLike): AsyncGenerator {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { value, done } = await reader.read();\n if (done) {\n return;\n }\n yield value!;\n }\n } finally {\n reader.releaseLock();\n }\n}\n\nexport function isReadableStreamLike(obj: any): obj is ReadableStreamLike {\n // We don't want to use instanceof checks because they would return\n // false for instances from another Realm, like an