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IAAItH,SAIrC,IAAIyG,EAAmByD,IACpBrB,EAAQE,UAAUzB,EAAY,IAAItH,KAAKkK,IACvC7C,QAAQ8C,IAAG,qBAAsB,IAAInK,KAAKkK,GAASzM,kBACnDkJ,EAAYiD,OACZjD,EAAYtE,oBACZ0H,KArGNK,SKdA1E,EAAc,IAAA9D,IAAuBtW,EAAA,SAAA8E,QAA6C,SAAOyR,OAAAC,KAAAf,KAAGrK","sources":["node_modules/@parcel/runtime-js/lib/helpers/bundle-manifest.js","node_modules/@parcel/runtime-js/lib/runtime-074a1d5ef3a52976.js","node_modules/regenerator-runtime/runtime.js","node_modules/tslib/tslib.es6.js","node_modules/rxjs/src/internal/util/isFunction.ts","node_modules/rxjs/src/internal/util/UnsubscriptionError.ts","node_modules/rxjs/src/internal/util/createErrorClass.ts","node_modules/rxjs/src/internal/util/arrRemove.ts","node_modules/rxjs/src/internal/Subscription.ts","node_modules/rxjs/src/internal/config.ts","node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts","node_modules/rxjs/src/internal/util/noop.ts","node_modules/rxjs/src/internal/NotificationFactories.ts","node_modules/rxjs/src/internal/Subscriber.ts","node_modules/rxjs/src/internal/util/reportUnhandledError.ts","node_modules/rxjs/src/internal/symbol/observable.ts","node_modules/rxjs/src/internal/util/identity.ts","node_modules/rxjs/src/internal/util/pipe.ts","node_modules/rxjs/src/internal/Observable.ts","src/clock/clock.ts","src/theme/theme.ts","src/util/day.ts","src/util/urlParam.ts","src/config.ts","src/util/parseTimeToMs.ts","src/util/loadImage.ts","src/connection/connection.ts","src/util/mod.ts","src/util/divmod.ts","node_modules/@parcel/runtime-js/lib/runtime-9943879241c0394f.js","src/util/drawText.ts","src/display/display.ts","src/util/getContext.ts","package.json","src/lib/hyper.ts","src/online.ts","src/page/init.ts","src/lib/githubCorner.ts","src/page/page.ts","src/storage/storage.ts","node_modules/@parcel/runtime-js/lib/runtime-bf8d7000329ee20a.js"],"sourcesContent":["\"use strict\";\n\nvar mapping = {};\n\nfunction register(pairs) {\n var keys = Object.keys(pairs);\n\n for (var i = 0; i < keys.length; i++) {\n mapping[keys[i]] = pairs[keys[i]];\n }\n}\n\nfunction resolve(id) {\n var resolved = mapping[id];\n\n if (resolved == null) {\n throw new Error('Could not resolve bundle with id ' + id);\n }\n\n return resolved;\n}\n\nmodule.exports.register = register;\nmodule.exports.resolve = resolve;","require('./helpers/bundle-manifest').register(JSON.parse(\"{\\\"4enHZ\\\":\\\"index.c9828623.js\\\",\\\"iVt8N\\\":\\\"pixelDigits.6bacbaa2.png\\\",\\\"cVQis\\\":\\\"serviceworker.js\\\"}\"));","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\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); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\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);\r\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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\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","import { createErrorClass } from './createErrorClass';\n\nexport interface UnsubscriptionError extends Error {\n readonly errors: any[];\n}\n\nexport interface UnsubscriptionErrorCtor {\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 * 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","/**\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 teardowns to execute upon unsubscription. Adding and removing from this\n * list occurs in the {@link #add} and {@link #remove} methods.\n */\n private _teardowns: Exclude[] | null = null;\n\n /**\n * @param initialTeardown A function executed first as part of the teardown\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 (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n } else {\n _parentage?.remove(this);\n }\n\n const { initialTeardown } = this;\n if (isFunction(initialTeardown)) {\n try {\n initialTeardown();\n } catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n\n const { _teardowns } = this;\n if (_teardowns) {\n this._teardowns = null;\n for (const teardown of _teardowns) {\n try {\n execTeardown(teardown);\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 teardown to this subscription, so that teardown 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 teardown is passed to it\n * will automatically be executed (unless the teardown itself is also a closed subscription).\n *\n * Closed Subscriptions cannot be added as teardowns 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 teardown logic to add to this subscription.\n */\n add(teardown: TeardownLogic): void {\n // Only add the teardown 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 teardown is handed to it automatically.\n execTeardown(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._teardowns = this._teardowns ?? []).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 teardown 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 teardown instance of a function or an unsubscribable object to a `Subcription` instance\n * more than once, you will need to call `remove` the same number of times to remove all instances.\n *\n * All teardown instances are removed to free up memory upon unsubscription.\n *\n * @param teardown The teardown to remove from this subscription\n */\n remove(teardown: Exclude): void {\n const { _teardowns } = this;\n _teardowns && arrRemove(_teardowns, 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 execTeardown(teardown: Unsubscribable | (() => void)) {\n if (isFunction(teardown)) {\n teardown();\n } else {\n teardown.unsubscribe();\n }\n}\n","import { Subscriber } from './Subscriber';\nimport { ObservableNotification } from './types';\n\n/**\n * The global configuration object for RxJS, used to configure things\n * like what Promise constructor should used to create Promises\n */\nexport const config = {\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: null as ((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: null as ((notification: ObservableNotification, subscriber: Subscriber) => void) | null,\n\n /**\n * The promise constructor used by default for methods such as\n * {@link toPromise} and {@link forEach}\n *\n * @deprecated remove in v8. 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 Promises as you see appropriate.\n */\n Promise: undefined as PromiseConstructorLike | undefined,\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 remove in v8. 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.\n */\n useDeprecatedSynchronousErrorHandling: false,\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 remove in v8. 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.\n */\n useDeprecatedNextContext: false,\n};\n","type SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => number;\ntype ClearTimeoutFunction = (handle: number) => 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(...args) {\n const { delegate } = timeoutProvider;\n return (delegate?.setTimeout || setTimeout)(...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return (delegate?.clearTimeout || clearTimeout)(handle);\n },\n delegate: undefined,\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 { 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';\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 method, and there is no reason to be creating instances of `Subscriber` directly. 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 protected isStopped: boolean = false;\n protected destination: Subscriber | Observer; // this `any` is the escape hatch to erase extra type param (e.g. R)\n\n /**\n * @deprecated Do not use directly. 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 }\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\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 next: ((value: T) => void) | undefined;\n if (isFunction(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 next = observerOrNext;\n } else if (observerOrNext) {\n // The first argument is an observer object, we have to pull the handlers\n // off and capture the owner object as the context. That is because we're\n // going to put them all in a new destination with ensured methods\n // for `next`, `error`, and `complete`. That's part of what makes this\n // the \"Safe\" Subscriber.\n ({ next, error, complete } = observerOrNext);\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 } else {\n context = observerOrNext;\n }\n next = next?.bind(context);\n error = error?.bind(context);\n complete = complete?.bind(context);\n }\n\n // Once we set the destination, the superclass `Subscriber` will\n // do it's magic in the `_next`, `_error`, and `_complete` methods.\n this.destination = {\n next: next ? maybeWrapForDeprecatedSyncErrorHandling(next, this) : noop,\n error: maybeWrapForDeprecatedSyncErrorHandling(error ? error : defaultErrorHandler, this),\n complete: complete ? maybeWrapForDeprecatedSyncErrorHandling(complete, this) : noop,\n };\n }\n}\n\n/**\n * Checks to see if the user has chosen to use the super gross deprecated error handling that\n * no one should ever use, ever. If they did choose that path, we need to catch their error\n * so we can stick it on a super-secret property and check it after the subscription is done\n * in the `Observable` subscribe call.\n *\n * We have to do this, because if we simply rethrow the error, it will be caught by any upstream\n * try/catch blocks and send back down again, basically playing ping-pong with the error until the\n * downstream runs out of chances to rethrow and it gives up.\n *\n * In the general case, for non-crazy people, this just returns the handler directly.\n *\n * @param handler The handler to wrap\n * @param instance The SafeSubscriber instance we're going to mark if there's an error.\n */\nfunction maybeWrapForDeprecatedSyncErrorHandling(handler: (arg?: any) => void, instance: SafeSubscriber) {\n return config.useDeprecatedSynchronousErrorHandling\n ? (arg?: any) => {\n try {\n handler(arg);\n } catch (err) {\n (instance as any).__syncError = err;\n }\n }\n : handler;\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 // TODO: Remove in v8.\n if (config.useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n reportUnhandledError(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","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","/** Symbol.observable or a string \"@@observable\". Used for interop */\nexport const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n","export function identity(x: T): T {\n return x;\n}\n","import { identity } from './identity';\nimport { UnaryFunction } from '../types';\n\n/* tslint:disable:max-line-length */\nexport function pipe(): UnaryFunction;\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(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction, fn7: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction, fn7: UnaryFunction, fn8: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction, fn7: UnaryFunction, fn8: UnaryFunction, fn9: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction, fn7: UnaryFunction, fn8: UnaryFunction, fn9: UnaryFunction, ...fns: UnaryFunction[]): UnaryFunction;\n/* tslint:enable:max-line-length */\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","/**\n * @prettier\n */\nimport { 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';\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 /** @deprecated This is an internal implementation detail, do not use. */\n protected source: Observable | undefined;\n\n /** @deprecated This is an internal implementation detail, do not use. */\n protected 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 cold 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 cold observable\n * @nocollapse\n * @deprecated use new Observable() instead\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 This is an internal implementation detail, do not use directly. If you have implemented an operator\n * using `lift`, it is recommended that you create an operator by simply returning `new Observable()` directly.\n * See \"Creating new operators from scratch\" section here: https://rxjs.dev/guide/operators\n */\n protected lift(operator?: Operator): Observable {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n\n subscribe(observer?: Partial>): Subscription;\n /** @deprecated Use an observer instead of a complete callback */\n subscribe(next: null | undefined, error: null | undefined, complete: () => void): Subscription;\n /** @deprecated Use an observer instead of an error callback */\n subscribe(next: null | undefined, error: (error: any) => void, complete?: () => void): Subscription;\n /** @deprecated Use an observer instead of a complete callback */\n subscribe(next: (value: T) => void, error: null | undefined, complete: () => void): Subscription;\n subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): 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, all errors will\n * be left uncaught.\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 Observer,\n * if you do not need to listen for something, you can omit a function, preferably by passing `undefined` or `null`,\n * since `subscribe` recognizes these functions by where they were placed in function call. When it comes\n * to `error` function, just as before, if not provided, errors emitted by an Observable will be thrown.\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 * ## Example\n * ### Subscribe with an Observer\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\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 * ```ts\n * import { interval } from 'rxjs';\n *\n * const subscription = interval(1000).subscribe(\n * num => console.log(num),\n * undefined,\n * () => {\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 as unhandled.\n * @param {Function} complete (optional) A handler for a terminal event resulting from successful completion.\n * @return {ISubscription} 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 // If we have an operator, it's the result of a lift, and we let the lift\n // mechanism do the subscription for us in the operator call. Otherwise,\n // if we have a source, it's a trusted observable we own, and we can call\n // the `_subscribe` without wrapping it in a try/catch. If we are supposed to\n // use the deprecated sync error handling, then we don't need the try/catch either\n // otherwise, it may be from a user-made observable instance, and we want to\n // wrap it in a try/catch so we can handle errors appropriately.\n const { operator, source } = this;\n subscriber.add(\n operator\n ? operator.call(subscriber, source)\n : source || config.useDeprecatedSynchronousErrorHandling\n ? this._subscribe(subscriber)\n : this._trySubscribe(subscriber)\n );\n\n if (config.useDeprecatedSynchronousErrorHandling) {\n // In the case of the deprecated sync error handling,\n // we need to crawl forward through our subscriber chain and\n // look to see if there's any synchronously thrown errors.\n // Does this suck for perf? Yes. So stop using the deprecated sync\n // error handling already. We're removing this in v8.\n let dest: any = subscriber;\n while (dest) {\n if (dest.__syncError) {\n throw dest.__syncError;\n }\n dest = dest.destination;\n }\n }\n return subscriber;\n }\n\n /** @deprecated This is an internal implementation detail, do not use. */\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 } from 'rxjs';\n * import { take } from 'rxjs/operators';\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 * @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 remove in v8. 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.\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 // Must be declared in a separate statement to avoid a ReferenceError when\n // accessing subscription below in the closure due to Temporal Dead Zone.\n let subscription: Subscription;\n subscription = this.subscribe(\n (value) => {\n try {\n next(value);\n } catch (err) {\n reject(err);\n subscription?.unsubscribe();\n }\n },\n reject,\n resolve\n );\n }) as Promise;\n }\n\n /** @internal This is an internal implementation detail, do not use. */\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 * ```ts\n * import { interval } from 'rxjs';\n * import { map, filter, scan } from 'rxjs/operators';\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 operations.length ? pipeFromArray(operations)(this) : this;\n }\n\n /* tslint:disable:max-line-length */\n /** @deprecated Deprecated use {@link firstValueFrom} or {@link lastValueFrom} instead */\n toPromise(): Promise;\n /** @deprecated Deprecated use {@link firstValueFrom} or {@link lastValueFrom} instead */\n toPromise(PromiseCtor: typeof Promise): Promise;\n /** @deprecated Deprecated use {@link firstValueFrom} or {@link lastValueFrom} instead */\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 Deprecated use {@link firstValueFrom} or {@link lastValueFrom} instead\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","/**\n * Clock\n *\n * Produce a clock which tries to tick every **p** ms and accepts to skip ticks\n * if for some reason, it has run late. For each tick, it outputs the reached\n * target time. This time usually is the previous time incremeted by the period,\n * but it may be more if the clock has run late.\n * (because e.g. the page's JS was paused by the web browser)\n */\n\nimport { Observable } from 'rxjs'\n\n/**\n * createObservableClock\n *\n * @param period time between two ticks in ms\n * @returns {Observable} the observable clock, paused until a .subscribe occures\n */\nexport let createObservableClock = (period: number) => {\n return new Observable((subscriber) => {\n let timeoutId: NodeJS.Timeout\n let initialTime = Date.now()\n\n let tick = () => {\n let now = Date.now()\n let tickCount = Math.floor((now - initialTime) / period)\n let reachedTime = initialTime + tickCount * period\n let targetDelta = reachedTime + period - now\n subscriber.next(reachedTime)\n\n timeoutId = setTimeout(tick, targetDelta)\n }\n\n timeoutId = setTimeout(tick, 0)\n\n return () => {\n clearTimeout(timeoutId)\n }\n })\n}\n","export interface ThemeConfig {\n theme?: string\n color: string\n}\n\n/**\n * A few sets of colors\n *\n * disconnected -> background color while disconnected\n * connected -> background color while connected\n * background -> canvas background color\n * ruler -> color for the ruler dots\n * open -> color for a dash waiting for the network response\n * success -> color for dash after a successful of its request\n * failure -> color for dash after a failure of its request\n */\nexport let colorObject = {\n semantic: [\n 'disconnected=#f77',\n 'connected=#000',\n 'background=#111',\n 'ruler=#ccc',\n 'textbg=#ccc',\n 'open=#DD2',\n 'success=#5c5',\n 'failure=#e55',\n ].join('=='),\n dark: [\n 'disconnected=#fff',\n 'connected=#000',\n 'background=#111',\n 'ruler=#ccc',\n 'textbg=#ccc',\n 'open=#777',\n 'success=#444',\n 'failure=#eee',\n ].join('=='),\n light: [\n 'disconnected=#000',\n 'connected=#ddd',\n 'background=#eee',\n 'ruler=#000',\n 'textbg=#fff',\n 'open=#777',\n 'success=#ccc',\n 'failure=#222',\n ].join('=='),\n}\n\nexport interface Theme {\n disconnected: string\n connected: string\n\n background: string\n ruler: string\n textbg: string\n open: string\n\n success: string\n failure: string\n}\n\nexport let nameList: (keyof Theme)[] = [\n 'disconnected',\n 'connected',\n 'background',\n 'ruler',\n 'textbg',\n 'open',\n 'success',\n 'failure',\n]\n\nexport let nameMap: Record = {}\n\nnameList.forEach((name) => {\n nameMap[name] = name\n nameMap[name[0]] = name\n})\n\nexport let parseTheme = (config: ThemeConfig) => {\n let theme = {} as Theme\n\n if (config.theme) {\n theme = parseTheme({ color: colorObject[config.theme] || colorObject.semantic })\n }\n\n if (config.color.length === 0) {\n return theme\n }\n\n let pieceList = config.color.split(/==\\b/) // the name cannot be empty but the value can\n\n pieceList.forEach((piece) => {\n let nameValue = piece.split('=')\n if (nameValue.length < 2) {\n return // skip\n }\n theme[nameMap[nameValue[0]]] = nameValue.slice(1).join('=')\n })\n\n return theme\n}\n","export let day = (time: Date) => {\n return time.toISOString().split('T')[0]\n}\n","export type DefaultConfigObject = {\n [K in keyof T]: (param: Indirect) => T[K]\n}\n\nexport type Indirect = {\n [K in keyof T]: () => T[K]\n}\n\nexport let spacelessUrl = (location: Location) => {\n let spaceLessURL = location.href.replace(/ |%20/g, '')\n\n if (spaceLessURL.includes(' ')) throw new Error()\n\n if (location.href !== spaceLessURL) {\n location.replace(spaceLessURL)\n }\n\n if (location.href.includes(' ')) throw new Error()\n}\n\nexport let urlRemoveParam = (location: Location, param: string) => {\n let newHref = location.href.replace(new RegExp(`#${param}(=[^#]*|$|(#))`, 'g'), '$1')\n\n if (location.href !== newHref) {\n if (!newHref.includes('#')) {\n newHref += '#'\n }\n location.href = newHref\n }\n}\n\nexport let getUrlParam = (location: Location, defaultConfig: DefaultConfigObject) => {\n let config: T = {} as any\n\n // get and split the parameter string\n let pieceList = location.hash.split('#').slice(1)\n for (let k = pieceList.length - 1; k >= 0; k--) {\n if (pieceList[k] === '') {\n pieceList[k - 1] = `${pieceList[k - 1]}#${pieceList[k + 1]}`\n pieceList.splice(k, 2)\n }\n }\n\n // process the parameter string into the config object to get the user-defined config\n pieceList.forEach((piece) => {\n let key: string\n let valueList: string[]\n let value\n if (piece.includes('=')) {\n ;[key, ...valueList] = piece.split('=')\n value = valueList.join('=')\n if (!isNaN(value)) {\n value = +value\n }\n } else {\n key = piece\n value = true\n }\n\n config[key] = value\n })\n\n // build the stacked config object, which handles dependency resolution\n let stackedConfig = {} as Indirect\n Object.keys(defaultConfig).forEach((key) => {\n stackedConfig[key] = () => {\n if (!(key in config)) {\n config[key] = defaultConfig[key](stackedConfig)\n }\n return config[key]\n }\n })\n\n Object.keys(defaultConfig).forEach((key) => {\n if (!(key in config)) {\n config[key] = defaultConfig[key](stackedConfig)\n }\n })\n\n return config\n}\n","import { parseTheme } from './theme/theme'\nimport { OnlineConfig } from './type/onlineConfig'\nimport { day } from './util/day'\nimport { parseTimeToMs } from './util/parseTimeToMs'\nimport { getUrlParam, spacelessUrl, urlRemoveParam } from './util/urlParam'\n\nexport let parseConfig = (location: Location) => {\n spacelessUrl(location)\n\n let config = getUrlParam(location, {\n // programmer\n debug: () => false,\n // canvas\n clear: () => false,\n // clock\n fast: () => false,\n period: ({ fast }) => {\n if (fast()) {\n return '125ms'\n } else {\n return '500ms'\n }\n },\n slowPeriod: () => '1s',\n conditionalPeriod: ({ period: visiblePeriod, slowPeriod: nonVisiblePeriod }) => {\n if (document.visibilityState === 'visible') {\n return visiblePeriod()\n } else {\n return nonVisiblePeriod()\n }\n },\n periodNumber: ({ conditionalPeriod }) => {\n return parseTimeToMs(conditionalPeriod())\n },\n pixelPeriod: ({ periodNumber }) => {\n return (8 * periodNumber()) / 1000\n },\n timezone: () => new Date().getTimezoneOffset(),\n timeoffset: () => 0,\n compoundOffset: ({ timezone, timeoffset }) => timeoffset() - timezone() * 60,\n // connection\n fail: () => false,\n timeout: () => 500,\n targetCount: () => 2,\n targetList: ({ targetCount }) => {\n let targetArray = [\n 'https://www.bing.com/s/a/bing_p.ico',\n 'https://www.google.com/favicon.ico',\n ]\n return targetArray.slice(0, targetCount()).join('==')\n },\n // page\n title: () => false,\n connectedTitle: ({ title }) => (title() ? 'CONNECTED' : 'Online'),\n disconnectedTitle: ({ title }) => (title() ? 'DISCONNECTED' : 'Online'),\n // rightside canvas\n right: () => day(new Date(Date.now() - 86400 * 1000)),\n // theme\n theme: () => 'semantic',\n color: () => '',\n themeObject: ({ theme, color }) => parseTheme({ theme: theme(), color: color() }),\n })\n\n if (config.fast) {\n urlRemoveParam(location, 'speed')\n urlRemoveParam(location, 'fill')\n }\n\n return config\n}\n","export let parseTimeToMs = (timeDescription: string) => {\n let unit = (timeDescription.toLowerCase().match(/(ms|s|h|d)$/) ?? ['ms'])[0]\n return (\n (parseFloat(timeDescription) || 1) *\n ({\n ms: 1,\n s: 1000,\n h: 3600 * 1000,\n d: 86400 * 1000,\n }[unit] ?? 1)\n )\n}\n","export function loadImage(url: string) {\n return new Promise((resolve, reject) => {\n let image = new Image()\n image.onload = () => resolve(image)\n image.onerror = (event, source, lineno, colno, error) => reject(error ?? event)\n image.src = url\n })\n}\n","/**\n * Test whether internet is available by loading an image\n */\n\nimport { OnlineConfig } from '../type/onlineConfig'\nimport { loadImage } from '../util/loadImage'\nimport { urlRemoveParam } from '../util/urlParam'\n\nexport let pingTest = (config: OnlineConfig, location: Location) => {\n let imageUrlList = config.targetList.split('==')\n let startTime = new Date().getTime()\n\n return new Promise((resolve, reject) => {\n if (config.fail) {\n urlRemoveParam(location, 'fail')\n setTimeout(() => {\n reject('fake timeout')\n }, config.timeout)\n return\n }\n\n let handle = () => {\n clearTimeout(errorTimeoutId)\n resolve(new Date().getTime() - startTime)\n }\n\n imageUrlList.forEach((imageUrl) => {\n loadImage(imageUrl + '?t=' + (startTime % (86400 * 100))).then(handle)\n })\n\n let errorTimeoutId = setTimeout(() => {\n reject('timeout')\n }, config.timeout)\n })\n}\n","export let mod = (a: number, b: number) => ((a % b) + b) % b\n","import { mod } from './mod'\n\nexport let divmod = (a: number, b: number) => {\n return [~~(a / b), mod(a, b)]\n}\n","module.exports = new __parcel__URL__(require('./helpers/bundle-manifest').resolve(\"iVt8N\")).toString();","import { Pair } from '../type/pair'\nimport fontUrl from '../../asset/typeface/pixelDigits.png'\nimport { loadImage } from './loadImage'\n\nexport let getDrawText = async () => {\n let font = await loadImage(fontUrl)\n\n return {\n drawText: (\n ctx: CanvasRenderingContext2D,\n position: Pair,\n text: string,\n backgroundColor: string,\n ) => {\n if (backgroundColor) {\n ctx.fillStyle = backgroundColor\n }\n ctx.fillRect(position.x, position.y + 1, 6 * text.length + 1, 9)\n ;[...text].forEach((c, k) => {\n if (isNaN(parseInt(c, 10))) {\n return\n }\n let sx = 10 * +c\n let dx = 6 * k\n let w = 6\n let h = 10\n let { x, y } = position\n ctx.drawImage(font, sx, 0, w, h, x + dx + 1, y, w, h)\n })\n },\n }\n}\n","import { OnlineConfig } from '../type/onlineConfig'\nimport { divmod } from '../util/divmod'\nimport { getDrawText } from '../util/drawText'\nimport { getContext2d } from '../util/getContext'\n\nlet getHeadLocation = (p: number) => {\n let [q, y8] = divmod(p, 8) // eigth of seconds ~ x coordinate\n let [r, x] = divmod(q, 15 * 60) // one quarter hour is 15 minutes and one minute is 60 seconds\n let [_, y1] = divmod(r, 24 * 4) // one day is 24 hours and one hour is 4 quarter hours\n return { y: y8 + 8 * y1, x }\n}\n\nexport interface DisplayProp {\n canvas: HTMLCanvasElement\n getConfig: () => OnlineConfig\n}\n\nexport let createDisplay = ({ canvas, getConfig }: DisplayProp) => {\n let { ctx } = getContext2d(canvas)\n\n const restore = (image: HTMLImageElement) => {\n ctx.drawImage(image, 0, 0)\n }\n\n const wipe = () => {\n ctx.fillStyle = getConfig().themeObject.background\n ctx.fillRect(0, 0, canvas.width, canvas.height)\n }\n\n const open = (targetTime: number) => {\n let pixelTime = (8 * targetTime) / 1000\n let { pixelPeriod } = getConfig()\n\n pixelTime -= pixelTime % pixelPeriod\n let { x, y } = getHeadLocation(pixelTime)\n let [w, h] = divmod(pixelPeriod + 8 - 1, 8) // -1\n h += 1 // +1\n\n let theme = getConfig().themeObject\n ctx.fillStyle = theme.open\n ctx.fillRect(x, y, w, h)\n if (x % canvas.width <= 14) {\n drawTimeIndicator()\n }\n\n return {\n closeSuccess: () => {\n ctx.fillStyle = theme.success\n ctx.fillRect(x, y, w, h)\n },\n closeError: () => {\n ctx.fillStyle = theme.failure\n ctx.fillRect(x, y, w, h)\n },\n }\n }\n\n let drawTimeIndicator = () => {}\n // Rulers and indications\n getDrawText().then((drawer) => {\n drawTimeIndicator = () => {\n let bg = getConfig().themeObject.textbg\n\n Array.from({ length: 25 }, (_, k25) => {\n // hour labels\n let y = 8 * 4 * k25 // 8 pixels, 4 rows per hour\n drawer.drawText(ctx, { y, x: 0 }, ` ${k25}`.slice(-2), bg)\n\n // dots\n ctx.fillStyle = getConfig().themeObject.ruler\n Array.from({ length: 1920 / 2 / 5 }, (_, k192) => {\n ctx.fillRect(k192 * 5, y - 1, 1, 2)\n })\n Array.from({ length: 15 }, (_, k15) => {\n ctx.fillRect(k15 * 60, y - 5, 1, 10)\n })\n })\n }\n\n drawTimeIndicator()\n })\n\n return {\n open,\n wipe,\n restore,\n drawTimeIndicator: () => {\n drawTimeIndicator()\n },\n }\n}\n","export let getContext2d = (canvas: HTMLCanvasElement) => {\n let ctx = canvas.getContext('2d')\n if (ctx === null) {\n throw new Error()\n }\n return { ctx }\n}\n\nexport let getContextWebGl2 = (canvas: HTMLCanvasElement) => {\n let gl = canvas.getContext('webgl2')\n if (gl === null) {\n throw new Error()\n }\n return { gl }\n}\n","{\n \"name\": \"online\",\n \"description\": \"\",\n \"repository\": \"https://github.com/mathieucaroff/online\",\n \"license\": \"ISC\",\n \"version\": \"1.0.0\",\n \"scripts\": {\n \"build\": \"parcel build src/index.html --dist-dir public\",\n \"mcabuild\": \"parcel build src/index.html --public-url online.d\",\n \"serve\": \"parcel serve src/index.html\"\n },\n \"devDependencies\": {\n \"@parcel/packager-raw-url\": \"2.3.2\",\n \"@parcel/transformer-webmanifest\": \"2.3.2\",\n \"@types/node\": \"^13.9.1\",\n \"parcel\": \"^2.3.2\",\n \"prettier\": \"^2.5.1\",\n \"ts-node\": \"^8.6.2\",\n \"typescript\": \"^4.6.2\"\n },\n \"dependencies\": {\n \"rxjs\": \"^7.0.0-beta.0\"\n }\n}\n","// function create()\n// from\n// https://github.com/mathieucaroff/xadom/blob/37570300c7/src/util/xaUtil.ts\n\n/**\n * deepUpdate -- beware it will loop infintely and crash the process by\n * running out of memory if given cyclic references.\n *\n * @param destination the object that will be written to\n * @param source the object whose data will be read and copied\n */\nfunction deepUpdate(destination, source) {\n Object.entries(source).forEach(([key, value]) => {\n if (typeof value === 'object' && value !== null) {\n if (typeof destination[key] !== 'object' || destination[key] === null) {\n destination[key] = {}\n }\n deepUpdate(destination[key], value)\n } else {\n destination[key] = value\n }\n })\n}\n\n/**\n * create an HTML Element\n *\n * @param name The html name of the element to create\n * @param attribute An object associating keys to values for the created element\n * @param children An array of children elements\n */\nfunction h(\n name: K,\n attribute?: Partial & Record,\n children?: Element[],\n): HTMLElementTagNameMap[K]\n\nfunction h(\n name: K,\n attribute?: Record,\n children?: Element[],\n): HTMLElementTagNameMap[K]\n\nfunction h(\n name: string,\n attribute?: Record,\n children?: Element[],\n): T\n\nfunction h(\n name: K,\n attribute: Partial & Record = {},\n children: Element[] = [],\n) {\n let elem = document.createElement(name)\n\n Object.entries(attribute).forEach(([name, value]) => {\n if (elem[name] === undefined) {\n elem.setAttribute(name, value)\n } else if (typeof elem[name] === 'object' && elem[name] !== null) {\n deepUpdate(elem[name], value)\n } else {\n elem[name] = value\n }\n })\n\n children.forEach((child) => {\n elem.appendChild(child)\n })\n\n return elem\n}\n\nexport { h }\n","import 'regenerator-runtime/runtime'\n\nimport { Subscription } from 'rxjs'\nimport { createObservableClock } from './clock/clock'\nimport { parseConfig } from './config'\nimport { pingTest } from './connection/connection'\nimport { createDisplay } from './display/display'\nimport { initPage } from './page/init'\nimport { createPage } from './page/page'\nimport { createStorage } from './storage/storage'\nimport { OnlineConfig } from './type/onlineConfig'\nimport { loadImage } from './util/loadImage'\nimport { urlRemoveParam } from './util/urlParam'\n\nmain()\n\nexport async function main() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.register(new URL('serviceworker.ts', import.meta.url), {\n type: 'module',\n })\n }\n\n const setUpdateInterval = () => {\n clockSub.unsubscribe()\n clockSub = createObservableClock(config.periodNumber).subscribe((targetTime) => {\n let localTime = targetTime + config.compoundOffset * 1000\n let day = localTime - (localTime % (86400 * 1000))\n if (day !== lastDay) {\n handleDayChange(lastDay)\n lastDay = day\n }\n let closer = displayLeft.open(localTime)\n\n pingTest(config, location)\n .then(() => {\n page.markConnected()\n closer.closeSuccess()\n })\n .catch(() => {\n page.markOffline()\n closer.closeError()\n })\n })\n }\n\n let config = parseConfig(location)\n console.info('config', config)\n\n let now = Date.now() + config.compoundOffset * 1000\n let lastDay = now - (now % (86400 * 1000))\n\n // Initialize the page\n let { canvasLeft, canvasRight } = initPage({ config, document, window })\n let page = createPage({ document, getConfig: () => config })\n\n let storage = createStorage()\n\n let displayLeft = createDisplay({ canvas: canvasLeft, getConfig: () => config })\n let displayRight = createDisplay({ canvas: canvasRight, getConfig: () => config })\n\n // Initialize the configuration and make it auto-update the state\n let clockSub: Subscription = Subscription.EMPTY\n\n const runConfig = (config: OnlineConfig, lastConfig: OnlineConfig) => {\n if (config.clear) {\n localStorage.removeItem('image')\n displayLeft.wipe()\n displayLeft.drawTimeIndicator()\n urlRemoveParam(location, 'clear')\n }\n\n if (config.conditionalPeriod !== lastConfig.conditionalPeriod) {\n // (Re)-Start ticking\n setUpdateInterval()\n }\n\n let rightImageDataUrl = storage.loadImageFromDay(config.right)\n if (rightImageDataUrl) {\n loadImage(rightImageDataUrl).then(displayRight.restore)\n } else {\n displayRight.wipe()\n displayRight.drawTimeIndicator()\n }\n }\n\n runConfig(config, {} as any)\n\n const updateConfig = () => {\n let lastConfig: OnlineConfig = config\n config = parseConfig(location)\n runConfig(config, lastConfig)\n }\n\n window.addEventListener('hashchange', updateConfig)\n document.addEventListener('visibilitychange', updateConfig)\n\n // Restoring / Backing up the canvas image\n let imageDataUrl = storage.loadImage(new Date())\n if (imageDataUrl) {\n displayLeft.restore(await loadImage(imageDataUrl))\n } else {\n displayLeft.wipe() // make the canvas non-transparent and grey\n }\n\n window.addEventListener('beforeunload', () => {\n storage.saveImage(canvasLeft, new Date())\n })\n\n // handleDayChange\n let handleDayChange = (lastDay: number) => {\n storage.saveImage(canvasLeft, new Date(lastDay))\n console.log(`handledDayChange (${new Date(lastDay).toISOString()})`)\n displayLeft.wipe()\n displayLeft.drawTimeIndicator()\n updateConfig()\n }\n}\n","import { repository } from '../../package.json'\nimport { githubCornerHTML } from '../lib/githubCorner'\nimport { OnlineConfig } from '../type/onlineConfig'\nimport { h } from '../lib/hyper'\n\ninterface InitProp {\n config: OnlineConfig\n document: Document\n window: Window\n}\n\nexport let initPage = (prop: InitProp) => {\n let { document } = prop\n\n let canvasLeft = h('canvas', {\n className: 'drawarea',\n width: 900, // 15 * 60\n height: 768, // 8 * 24 * 4\n })\n let canvasRight = h('canvas', {\n className: 'drawarea',\n width: 900,\n height: 768,\n })\n\n let corner = h('i', {\n innerHTML: githubCornerHTML(repository),\n })\n\n document.body.append(\n h('h1', {\n textContent: document.title,\n className: 'inline',\n }),\n h('div', {}, [canvasLeft, canvasRight]),\n corner,\n )\n\n return {\n canvasLeft,\n canvasRight,\n }\n}\n","export let githubCornerHTML = (repositoryUrl: string) => {\n return ``\n}\n","import { OnlineConfig } from '../type/onlineConfig'\n\nexport interface PageProp {\n getConfig: () => OnlineConfig\n document: Document\n}\n\nexport let createPage = ({ document, getConfig }: PageProp) => {\n let status: 'unknown' | 'connected' | 'disconnected' = 'unknown'\n\n let favicon = document.getElementById('favicon') as HTMLLinkElement\n let faviconConnected = document.getElementById('faviconConnected') as HTMLLinkElement\n let faviconDisconnected = document.getElementById('faviconDisconnected') as HTMLLinkElement\n\n return {\n markConnected: () => {\n if (status !== 'connected') {\n status = 'connected'\n favicon.href = faviconConnected.href\n document.title = getConfig().connectedTitle\n document.documentElement.style.backgroundColor = getConfig().themeObject.connected\n }\n },\n markOffline: () => {\n if (status !== 'disconnected') {\n status = 'disconnected'\n favicon.href = faviconDisconnected.href\n document.title = getConfig().disconnectedTitle\n document.documentElement.style.backgroundColor = getConfig().themeObject.disconnected\n }\n },\n }\n}\n","import { day } from '../util/day'\n\nexport let createStorage = () => {\n let imageName = (time: Date) => `image${day(time)}`\n\n return {\n saveImage: (canvas: HTMLCanvasElement, time: Date) => {\n localStorage.setItem(imageName(time), canvas.toDataURL('image/png'))\n },\n loadImage: (time: Date) => {\n return localStorage.getItem(imageName(time))\n },\n loadImageFromDay: (dayName: string) => {\n return localStorage.getItem(`image${dayName}`)\n },\n }\n}\n","module.exports = new __parcel__URL__(require('./helpers/bundle-manifest').resolve(\"cVQis\")).toString();"],"names":["$18c11f3350a906ea$export$6503ec6e8aabbaf","$18c11f3350a906ea$export$f7ad0328861e2f03","$18c11f3350a906ea$var$mapping","pairs","keys","Object","i","length","id","resolved","Error","parcelRequire","register","JSON","parse","$7238a34a955809b2$var$runtime","exports","undefined","Op","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err1","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","done","GenStateSuspendedYield","makeInvokeMethod","fn","call","err","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","value1","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","next1","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","object","key1","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","$5c96a02c592fcff1$var$extendStatics","d1","b1","Array","d","b","p","$5c96a02c592fcff1$export$a8ba968b8961cb8a","String","__","$5c96a02c592fcff1$export$19a8beecd37a4c45","o","m","s","$5c96a02c592fcff1$export$8d051b38c9118094","n","r","e","ar","to","from","j","il","$c1aa42b0603892d6$export$f6e2535fb5126e54","createImpl","ctorFunc","$f587043ffd615a90$export$c9648b76fd580c34","_super","errors","message","map","toString","join","instance","stack","$2b94c03d07e501cc$export$dae3f38077fc36c0","arr","item","index","indexOf","splice","$8343668acd7c4a9b$export$f55210826850c514","initialTeardown","closed","_parentage","_teardowns","empty","unsubscribe","isArray","_parentage_1","_parentage_1_1","remove","_teardowns_1","_teardowns_1_1","teardown_1","$8343668acd7c4a9b$var$execTeardown","$5c96a02c592fcff1$export$1216008129fb82ed","add","teardown","_hasParent","_addParent","_a","parent","includes","_removeParent","EMPTY","$8343668acd7c4a9b$export$4f9221cbada3c4fc","$ca336efb1b4fb564$export$e506a1d27d1eaa20","onUnhandledError","onStoppedNotification","useDeprecatedSynchronousErrorHandling","useDeprecatedNextContext","$c07b5bfa3b9d4401$export$365aa6bd3c788e3d","setTimeout","args","_i","arguments","apply","clearTimeout","$528e75db69787807$export$8793edee2d425525","$0ba077a4cdfd9739$export$b7f97edb34bc1f87","$0ba077a4cdfd9739$export$9c8f6e8d39c60cf3","kind","$cf8ce74b80455e9f$export$60959659b2c22881","destination","_this","isStopped","$cf8ce74b80455e9f$export$88d395d20619a0af","$cf8ce74b80455e9f$export$94eeb6a328cab6c7","$cf8ce74b80455e9f$var$handleStoppedNotification","$0ba077a4cdfd9739$export$ff9346b0d1d30313","_next","_error","_complete","observerOrNext","context_1","bind","$cf8ce74b80455e9f$var$maybeWrapForDeprecatedSyncErrorHandling","$cf8ce74b80455e9f$var$defaultErrorHandler","handler","__syncError","$18eb28ff53cc4943$export$ebf645db02d3e99f","notification","subscriber","$eaf29fccbded6ed3$export$5ab46cbf6120b33a","observable","$7569c528cdd9d182$export$f0954fd7d5368655","x","$0f1e8e2d1fe93adf$export$71f88a61afaa14d7","fns","input","reduce","$4f562137a990678a$export$77cea355fa80b5f4","subscribe","_subscribe","lift","operator","source","$4f562137a990678a$var$isObserver","_trySubscribe","dest","sink","promiseCtor","$4f562137a990678a$var$getPromiseCtor","subscription","pipe","operations","toPromise","$a9484fd40cfd560e$export$8469c5cf29495b63","semantic","dark","light","$a9484fd40cfd560e$export$195c829e27e715f0","$a9484fd40cfd560e$export$6f921d1328061d63","config","theme","color","split","piece","nameValue","$14bef17d3290cc1f$export$d2d39d1adcc883a2","time","toISOString","$864ea5d16c681f72$export$152c75557c67e1e3","location","param","newHref","href","replace","RegExp","$9d936a2aecb96285$export$ddb7710e72db552d","spaceLessURL","$864ea5d16c681f72$export$6a698c833ff1a59f","defaultConfig","pieceList","hash","k","valueList","stackedConfig","$864ea5d16c681f72$export$95fb6d2a52edc159","debug","clear","fast","period","slowPeriod","conditionalPeriod","visiblePeriod","nonVisiblePeriod","document","visibilityState","periodNumber","timeDescription","unit","toLowerCase","match","parseFloat","ms","h","$c623f68e53350d92$export$87a58e325bf95624","pixelPeriod","timezone","Date","getTimezoneOffset","timeoffset","compoundOffset","fail","timeout","targetCount","targetList","title","connectedTitle","disconnectedTitle","right","now","themeObject","$358404a569beabf5$export$fe58198efe02b173","url","image","Image","onload","onerror","event","lineno","colno","src","$9562acb571a1e828$export$842a2cf37af977e1","a","$e9cf4a91e7c365f8$export$7cb533f05108f0eb","$2cc68518a4bbeaa1$exports","URL","import","meta","$76596671fee4e156$export$630b3f7014e81311","canvas","getConfig","ctx","getContext","$529c64a3e472f280$export$860b0424cb04a816","drawTimeIndicator","font","$parcel$interopDefault","drawText","position","text","backgroundColor","fillStyle","fillRect","y","c","parseInt","sx","dx","drawImage","$ab94a39034c784e0$export$e78f17887151ab9f","drawer","bg","textbg","_","k25","ruler","k192","k15","targetTime","pixelTime","q","y8","y1","$76596671fee4e156$var$getHeadLocation","w","open","width","closeSuccess","success","closeError","failure","background","height","$8f13b60c0ee5b277$exports","$bcb3b2f57e8e5246$var$deepUpdate","entries","$bcb3b2f57e8e5246$export$dda1d9f60106f0e9","name1","attribute","children","elem","createElement","setAttribute","child","appendChild","navigator","serviceWorker","$56873add52ad6cca$exports","setUpdateInterval","clockSub","config1","timeoutId","initialTime","tick","tickCount","Math","floor","reachedTime","targetDelta","localTime","day","lastDay1","handleDayChange","closer","displayLeft","imageUrlList","startTime","getTime","errorTimeoutId","imageUrl","$f3d35702c48c16b9$export$cc13e3bbedcbea7b","page","markConnected","markOffline","console","canvasLeft","canvasRight","prop","className","corner","innerHTML","repositoryUrl","repository","body","append","textContent","$15cdec2ac6ae6cc6$export$cbd0a4babc275a37","window","status","favicon","getElementById","faviconConnected","faviconDisconnected","documentElement","style","connected","disconnected","$86196d0242f50845$export$eea1b38e4aaafc7d","storage","imageName","saveImage","localStorage","setItem","toDataURL","loadImage","getItem","loadImageFromDay","dayName","$138355eb0e9c7ec2$export$d184a47a971dd4b9","displayRight","runConfig","lastConfig","removeItem","wipe","rightImageDataUrl","restore","updateConfig","addEventListener","imageDataUrl","lastDay","log","$1053f19fe9e082fb$export$f22da7240b7add18"],"version":3,"file":"index.c9828623.js.map"}