diff --git a/inst/www/shared/shiny.js b/inst/www/shared/shiny.js
index 4faf615e1d..5fa7990021 100644
--- a/inst/www/shared/shiny.js
+++ b/inst/www/shared/shiny.js
@@ -6191,7 +6191,7 @@
return import_jquery6.default(scope).find("ul.nav.shiny-tab-input");
},
getValue: function getValue(el) {
- var anchor = isBS3() ? import_jquery6.default(el).find("li:not(.dropdown).active > a") : import_jquery6.default(el).find(".nav-link:not(.dropdown-toggle).active, .dropdown-menu > .dropdown-item.active");
+ var anchor = isBS3() ? import_jquery6.default(el).find("li:not(.dropdown).active > a") : import_jquery6.default(el).find(".nav-link:not(.dropdown-toggle).active, .dropdown-menu .dropdown-item.active");
if (anchor.length === 1)
return this._getTabName(anchor);
return null;
@@ -6200,7 +6200,7 @@
var self2 = this;
var success = false;
if (value) {
- var anchors = isBS3() ? import_jquery6.default(el).find("li:not(.dropdown) > a") : import_jquery6.default(el).find(".nav-link:not(.dropdown-toggle), .dropdown-menu > .dropdown-item");
+ var anchors = isBS3() ? import_jquery6.default(el).find("li:not(.dropdown) > a") : import_jquery6.default(el).find(".nav-link:not(.dropdown-toggle), .dropdown-menu .dropdown-item");
anchors.each(function() {
if (self2._getTabName(import_jquery6.default(this)) === value) {
import_jquery6.default(this).tab("show");
@@ -7843,7 +7843,7 @@
var Shiny;
function setShiny(Shiny_) {
Shiny = Shiny_;
- Shiny.version = "1.6.0.9000";
+ Shiny.version = "1.6.0.9001";
Shiny.$escape = $escape;
Shiny.compareVersion = compareVersion;
}
diff --git a/inst/www/shared/shiny.js.map b/inst/www/shared/shiny.js.map
index a0029782ff..2a98e72e9e 100644
--- a/inst/www/shared/shiny.js.map
+++ b/inst/www/shared/shiny.js.map
@@ -1,7 +1,7 @@
{
"version": 3,
"sources": ["globals:jquery", "../../../srcts/node_modules/core-js/internals/global.js", "../../../srcts/node_modules/core-js/internals/fails.js", "../../../srcts/node_modules/core-js/internals/descriptors.js", "../../../srcts/node_modules/core-js/internals/object-property-is-enumerable.js", "../../../srcts/node_modules/core-js/internals/create-property-descriptor.js", "../../../srcts/node_modules/core-js/internals/classof-raw.js", "../../../srcts/node_modules/core-js/internals/indexed-object.js", "../../../srcts/node_modules/core-js/internals/require-object-coercible.js", "../../../srcts/node_modules/core-js/internals/to-indexed-object.js", "../../../srcts/node_modules/core-js/internals/is-object.js", "../../../srcts/node_modules/core-js/internals/to-primitive.js", "../../../srcts/node_modules/core-js/internals/has.js", "../../../srcts/node_modules/core-js/internals/document-create-element.js", "../../../srcts/node_modules/core-js/internals/ie8-dom-define.js", "../../../srcts/node_modules/core-js/internals/object-get-own-property-descriptor.js", "../../../srcts/node_modules/core-js/internals/an-object.js", "../../../srcts/node_modules/core-js/internals/object-define-property.js", "../../../srcts/node_modules/core-js/internals/create-non-enumerable-property.js", "../../../srcts/node_modules/core-js/internals/set-global.js", "../../../srcts/node_modules/core-js/internals/shared-store.js", "../../../srcts/node_modules/core-js/internals/inspect-source.js", "../../../srcts/node_modules/core-js/internals/native-weak-map.js", "../../../srcts/node_modules/core-js/internals/is-pure.js", "../../../srcts/node_modules/core-js/internals/shared.js", "../../../srcts/node_modules/core-js/internals/uid.js", "../../../srcts/node_modules/core-js/internals/shared-key.js", "../../../srcts/node_modules/core-js/internals/hidden-keys.js", "../../../srcts/node_modules/core-js/internals/internal-state.js", "../../../srcts/node_modules/core-js/internals/redefine.js", "../../../srcts/node_modules/core-js/internals/path.js", "../../../srcts/node_modules/core-js/internals/get-built-in.js", "../../../srcts/node_modules/core-js/internals/to-integer.js", "../../../srcts/node_modules/core-js/internals/to-length.js", "../../../srcts/node_modules/core-js/internals/to-absolute-index.js", "../../../srcts/node_modules/core-js/internals/array-includes.js", "../../../srcts/node_modules/core-js/internals/object-keys-internal.js", "../../../srcts/node_modules/core-js/internals/enum-bug-keys.js", "../../../srcts/node_modules/core-js/internals/object-get-own-property-names.js", "../../../srcts/node_modules/core-js/internals/object-get-own-property-symbols.js", "../../../srcts/node_modules/core-js/internals/own-keys.js", "../../../srcts/node_modules/core-js/internals/copy-constructor-properties.js", "../../../srcts/node_modules/core-js/internals/is-forced.js", "../../../srcts/node_modules/core-js/internals/export.js", "../../../srcts/node_modules/core-js/internals/array-method-is-strict.js", "../../../srcts/node_modules/core-js/internals/whitespaces.js", "../../../srcts/node_modules/core-js/internals/string-trim.js", "../../../srcts/node_modules/core-js/internals/number-parse-int.js", "../../../srcts/node_modules/core-js/internals/is-array.js", "../../../srcts/node_modules/core-js/internals/to-object.js", "../../../srcts/node_modules/core-js/internals/create-property.js", "../../../srcts/node_modules/core-js/internals/native-symbol.js", "../../../srcts/node_modules/core-js/internals/use-symbol-as-uid.js", "../../../srcts/node_modules/core-js/internals/well-known-symbol.js", "../../../srcts/node_modules/core-js/internals/array-species-create.js", "../../../srcts/node_modules/core-js/internals/engine-user-agent.js", "../../../srcts/node_modules/core-js/internals/engine-v8-version.js", "../../../srcts/node_modules/core-js/internals/array-method-has-species-support.js", "../../../srcts/node_modules/core-js/internals/this-number-value.js", "../../../srcts/node_modules/core-js/internals/object-keys.js", "../../../srcts/node_modules/core-js/internals/to-string-tag-support.js", "../../../srcts/node_modules/core-js/internals/classof.js", "../../../srcts/node_modules/core-js/internals/object-to-string.js", "../../../srcts/node_modules/core-js/internals/number-parse-float.js", "../../../srcts/node_modules/core-js/internals/regexp-flags.js", "../../../srcts/node_modules/core-js/internals/regexp-sticky-helpers.js", "../../../srcts/node_modules/core-js/internals/regexp-exec.js", "../../../srcts/node_modules/core-js/modules/es.regexp.exec.js", "../../../srcts/node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js", "../../../srcts/node_modules/core-js/internals/string-multibyte.js", "../../../srcts/node_modules/core-js/internals/advance-string-index.js", "../../../srcts/node_modules/core-js/internals/get-substitution.js", "../../../srcts/node_modules/core-js/internals/regexp-exec-abstract.js", "../../../srcts/node_modules/core-js/internals/is-regexp.js", "../../../srcts/node_modules/core-js/internals/a-function.js", "../../../srcts/node_modules/core-js/internals/species-constructor.js", "../../../srcts/node_modules/core-js/internals/function-bind-context.js", "../../../srcts/node_modules/core-js/internals/array-iteration.js", "../../../srcts/node_modules/core-js/internals/object-define-properties.js", "../../../srcts/node_modules/core-js/internals/html.js", "../../../srcts/node_modules/core-js/internals/object-create.js", "../../../srcts/node_modules/core-js/internals/add-to-unscopables.js", "../../../srcts/node_modules/core-js/internals/array-for-each.js", "../../../srcts/node_modules/core-js/internals/array-reduce.js", "../../../srcts/node_modules/core-js/internals/engine-is-node.js", "../../../srcts/node_modules/core-js/internals/array-buffer-native.js", "../../../srcts/node_modules/core-js/internals/redefine-all.js", "../../../srcts/node_modules/core-js/internals/an-instance.js", "../../../srcts/node_modules/core-js/internals/to-index.js", "../../../srcts/node_modules/core-js/internals/ieee754.js", "../../../srcts/node_modules/core-js/internals/correct-prototype-getter.js", "../../../srcts/node_modules/core-js/internals/object-get-prototype-of.js", "../../../srcts/node_modules/core-js/internals/a-possible-prototype.js", "../../../srcts/node_modules/core-js/internals/object-set-prototype-of.js", "../../../srcts/node_modules/core-js/internals/array-fill.js", "../../../srcts/node_modules/core-js/internals/set-to-string-tag.js", "../../../srcts/node_modules/core-js/internals/array-buffer.js", "../../../srcts/node_modules/core-js/internals/set-species.js", "../../../srcts/node_modules/core-js/internals/inherit-if-required.js", "../../../srcts/node_modules/core-js/internals/object-to-array.js", "../../../srcts/node_modules/core-js/internals/same-value.js", "../../../srcts/node_modules/core-js/internals/string-trim-forced.js", "../../../srcts/node_modules/core-js/internals/dom-iterables.js", "../../../srcts/src/main.ts", "../../../srcts/src/initialize/disableForm.ts", "../../../srcts/src/initialize/history.ts", "../../../srcts/node_modules/core-js/modules/es.array.index-of.js", "../../../srcts/node_modules/core-js/modules/es.parse-int.js", "../../../srcts/src/initialize/browser.ts", "../../../srcts/src/utils/browser.ts", "../../../srcts/src/utils/userAgent.ts", "../../../srcts/src/window/libraries.ts", "../../../srcts/node_modules/core-js/modules/es.array.concat.js", "../../../srcts/node_modules/core-js/modules/es.array.slice.js", "../../../srcts/node_modules/core-js/modules/es.array.splice.js", "../../../srcts/node_modules/core-js/modules/es.number.to-precision.js", "../../../srcts/node_modules/core-js/modules/es.object.keys.js", "../../../srcts/node_modules/core-js/modules/es.object.to-string.js", "../../../srcts/node_modules/core-js/modules/es.parse-float.js", "../../../srcts/src/utils/index.ts", "../../../srcts/node_modules/core-js/modules/es.regexp.to-string.js", "../../../srcts/node_modules/core-js/modules/es.string.replace.js", "../../../srcts/node_modules/core-js/modules/es.string.split.js", "../../../srcts/src/window/pixelRatio.ts", "../../../srcts/src/utils/blob.ts", "../../../srcts/src/shiny.ts", "../../../srcts/src/window/blobBuilder.ts", "../../../srcts/src/window/userAgent.ts", "../../../srcts/src/initialize/index.ts", "../../../srcts/node_modules/core-js/modules/es.array.filter.js", "../../../srcts/node_modules/core-js/modules/es.array.find.js", "../../../srcts/node_modules/core-js/modules/es.array.for-each.js", "../../../srcts/node_modules/core-js/modules/es.array.join.js", "../../../srcts/node_modules/core-js/modules/es.array.map.js", "../../../srcts/node_modules/core-js/modules/es.array.reduce.js", "../../../srcts/node_modules/core-js/modules/es.array-buffer.constructor.js", "../../../srcts/node_modules/core-js/modules/es.array-buffer.slice.js", "../../../srcts/node_modules/core-js/modules/es.data-view.js", "../../../srcts/node_modules/core-js/modules/es.function.name.js", "../../../srcts/node_modules/core-js/modules/es.number.constructor.js", "../../../srcts/node_modules/core-js/modules/es.object.entries.js", "../../../srcts/node_modules/core-js/modules/es.string.match.js", "../../../srcts/node_modules/core-js/modules/es.string.search.js", "../../../srcts/node_modules/core-js/modules/es.string.trim.js", "../../../srcts/node_modules/core-js/modules/web.dom-collections.for-each.js", "../../../srcts/src/file/FileProcessor.ts", "../../../srcts/src/index.ts"],
- "sourcesContent": ["module.exports = window.jQuery", "var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n /* global globalThis -- safe */\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n", "module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n", "var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n", "'use strict';\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n", "module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n", "var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n", "var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n", "// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n", "// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n", "module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n", "var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n", "var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n", "var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n", "var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n", "var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n", "var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n", "var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n", "var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n", "var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n", "var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n", "var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n", "var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n", "module.exports = false;\n", "var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.9.0',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '\u00A9 2021 Denis Pushkarev (zloirock.ru)'\n});\n", "var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n", "var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n", "module.exports = {};\n", "var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n", "var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var state;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) {\n createNonEnumerableProperty(value, 'name', key);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n", "var global = require('../internals/global');\n\nmodule.exports = global;\n", "var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n", "var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.es/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n", "var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n", "var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n", "var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n", "var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n", "// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n", "var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n", "exports.f = Object.getOwnPropertySymbols;\n", "var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n", "var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n", "var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n", "var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n", "'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n", "// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n", "var requireObjectCoercible = require('../internals/require-object-coercible');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = String(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n", "var global = require('../internals/global');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar $parseInt = global.parseInt;\nvar hex = /^[+-]?0[Xx]/;\nvar FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;\n\n// `parseInt` method\n// https://tc39.es/ecma262/#sec-parseint-string-radix\nmodule.exports = FORCED ? function parseInt(string, radix) {\n var S = trim(String(string));\n return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));\n} : $parseInt;\n", "var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\nmodule.exports = Array.isArray || function isArray(arg) {\n return classof(arg) == 'Array';\n};\n", "var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n", "'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPrimitive(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n", "var fails = require('../internals/fails');\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n /* global Symbol -- required for testing */\n return !String(Symbol());\n});\n", "var NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n /* global Symbol -- safe */\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n", "var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name)) {\n if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];\n else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n } return WellKnownSymbolsStore[name];\n};\n", "var isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};\n", "var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n", "var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n", "var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n", "var classof = require('../internals/classof-raw');\n\n// `thisNumberValue` abstract operation\n// https://tc39.es/ecma262/#sec-thisnumbervalue\nmodule.exports = function (value) {\n if (typeof value != 'number' && classof(value) != 'Number') {\n throw TypeError('Incorrect invocation');\n }\n return +value;\n};\n", "var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n", "var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n", "var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n", "'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n", "var global = require('../internals/global');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar $parseFloat = global.parseFloat;\nvar FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity;\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\nmodule.exports = FORCED ? function parseFloat(string) {\n var trimmedString = trim(String(string));\n var result = $parseFloat(trimmedString);\n return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;\n} : $parseFloat;\n", "'use strict';\nvar anObject = require('../internals/an-object');\n\n// `RegExp.prototype.flags` getter implementation\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.dotAll) result += 's';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n", "'use strict';\n\nvar fails = require('./fails');\n\n// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,\n// so we use an intermediate function.\nfunction RE(s, f) {\n return RegExp(s, f);\n}\n\nexports.UNSUPPORTED_Y = fails(function () {\n // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\n var re = RE('a', 'y');\n re.lastIndex = 2;\n return re.exec('abcd') != null;\n});\n\nexports.BROKEN_CARET = fails(function () {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n var re = RE('^r', 'gy');\n re.lastIndex = 2;\n return re.exec('str') != null;\n});\n", "'use strict';\nvar regexpFlags = require('./regexp-flags');\nvar stickyHelpers = require('./regexp-sticky-helpers');\n\nvar nativeExec = RegExp.prototype.exec;\n// This always refers to the native implementation, because the\n// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n// which loads this file before patching the method.\nvar nativeReplace = String.prototype.replace;\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\n// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n var sticky = UNSUPPORTED_Y && re.sticky;\n var flags = regexpFlags.call(re);\n var source = re.source;\n var charsAdded = 0;\n var strCopy = str;\n\n if (sticky) {\n flags = flags.replace('y', '');\n if (flags.indexOf('g') === -1) {\n flags += 'g';\n }\n\n strCopy = String(str).slice(re.lastIndex);\n // Support anchored sticky behavior.\n if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\\n')) {\n source = '(?: ' + source + ')';\n strCopy = ' ' + strCopy;\n charsAdded++;\n }\n // ^(? + rx + ) is needed, in combination with some str slicing, to\n // simulate the 'y' flag.\n reCopy = new RegExp('^(?:' + source + ')', flags);\n }\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(sticky ? reCopy : re, strCopy);\n\n if (sticky) {\n if (match) {\n match.input = match.input.slice(charsAdded);\n match[0] = match[0].slice(charsAdded);\n match.index = re.lastIndex;\n re.lastIndex += match[0].length;\n } else re.lastIndex = 0;\n } else if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n", "'use strict';\nvar $ = require('../internals/export');\nvar exec = require('../internals/regexp-exec');\n\n// `RegExp.prototype.exec` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.exec\n$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {\n exec: exec\n});\n", "'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar regexpExec = require('../internals/regexp-exec');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n return ''.replace(re, '$') !== '7';\n});\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n return 'a'.replace(/./, '$0') === '$0';\n})();\n\nvar REPLACE = wellKnownSymbol('replace');\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n if (/./[REPLACE]) {\n return /./[REPLACE]('a', '$0') === '';\n }\n return false;\n})();\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\nmodule.exports = function (KEY, length, exec, sham) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () { execCalled = true; return null; };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n (KEY === 'replace' && !(\n REPLACE_SUPPORTS_NAMED_GROUPS &&\n REPLACE_KEEPS_$0 &&\n !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n )) ||\n (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n }, {\n REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,\n REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n });\n var stringMethod = methods[0];\n var regexMethod = methods[1];\n\n redefine(String.prototype, KEY, stringMethod);\n redefine(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return regexMethod.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return regexMethod.call(string, this); }\n );\n }\n\n if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);\n};\n", "var toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.{ codePointAt, at }` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = String(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n", "'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.es/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n};\n", "var toObject = require('../internals/to-object');\n\nvar floor = Math.floor;\nvar replace = ''.replace;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d\\d?)/g;\n\n// https://tc39.es/ecma262/#sec-getsubstitution\nmodule.exports = function (matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return replace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n};\n", "var classof = require('./classof-raw');\nvar regexpExec = require('./regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.es/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n if (typeof result !== 'object') {\n throw TypeError('RegExp exec method returned something other than an Object or null');\n }\n return result;\n }\n\n if (classof(R) !== 'RegExp') {\n throw TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return regexpExec.call(R, S);\n};\n\n", "var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n", "module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n", "var anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);\n};\n", "var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n", "var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_OUT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push.call(target, value); // filterOut\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterOut` method\n // https://github.com/tc39/proposal-array-filtering\n filterOut: createMethod(7)\n};\n", "var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n", "var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n", "var anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n /* global ActiveXObject -- old IE */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n", "var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n", "'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n} : [].forEach;\n", "var aFunction = require('../internals/a-function');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n", "var classof = require('../internals/classof-raw');\nvar global = require('../internals/global');\n\nmodule.exports = classof(global.process) == 'process';\n", "module.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';\n", "var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n", "module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n};\n", "var toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\n\n// `ToIndex` abstract operation\n// https://tc39.es/ecma262/#sec-toindex\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length or index');\n return length;\n};\n", "// IEEE754 conversions based on https://github.com/feross/ieee754\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nvar pack = function (number, mantissaLength, bytes) {\n var buffer = new Array(bytes);\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;\n var index = 0;\n var exponent, mantissa, c;\n number = abs(number);\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number != number || number === Infinity) {\n // eslint-disable-next-line no-self-compare -- NaN check\n mantissa = number != number ? 1 : 0;\n exponent = eMax;\n } else {\n exponent = floor(log(number) / LN2);\n if (number * (c = pow(2, -exponent)) < 1) {\n exponent--;\n c *= 2;\n }\n if (exponent + eBias >= 1) {\n number += rt / c;\n } else {\n number += rt * pow(2, 1 - eBias);\n }\n if (number * c >= 2) {\n exponent++;\n c /= 2;\n }\n if (exponent + eBias >= eMax) {\n mantissa = 0;\n exponent = eMax;\n } else if (exponent + eBias >= 1) {\n mantissa = (number * c - 1) * pow(2, mantissaLength);\n exponent = exponent + eBias;\n } else {\n mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);\n exponent = 0;\n }\n }\n for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);\n exponent = exponent << mantissaLength | mantissa;\n exponentLength += mantissaLength;\n for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);\n buffer[--index] |= sign * 128;\n return buffer;\n};\n\nvar unpack = function (buffer, mantissaLength) {\n var bytes = buffer.length;\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var nBits = exponentLength - 7;\n var index = bytes - 1;\n var sign = buffer[index--];\n var exponent = sign & 127;\n var mantissa;\n sign >>= 7;\n for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);\n mantissa = exponent & (1 << -nBits) - 1;\n exponent >>= -nBits;\n nBits += mantissaLength;\n for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);\n if (exponent === 0) {\n exponent = 1 - eBias;\n } else if (exponent === eMax) {\n return mantissa ? NaN : sign ? -Infinity : Infinity;\n } else {\n mantissa = mantissa + pow(2, mantissaLength);\n exponent = exponent - eBias;\n } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);\n};\n\nmodule.exports = {\n pack: pack,\n unpack: unpack\n};\n", "var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n", "var has = require('../internals/has');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype : null;\n};\n", "var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n};\n", "/* eslint-disable no-proto -- safe */\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n", "'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.fill` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.fill\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = toLength(O.length);\n var argumentsLength = arguments.length;\n var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n var end = argumentsLength > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n", "var defineProperty = require('../internals/object-define-property').f;\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n", "'use strict';\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefineAll = require('../internals/redefine-all');\nvar fails = require('../internals/fails');\nvar anInstance = require('../internals/an-instance');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar IEEE754 = require('../internals/ieee754');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar arrayFill = require('../internals/array-fill');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length';\nvar WRONG_INDEX = 'Wrong index';\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\nvar $ArrayBuffer = NativeArrayBuffer;\nvar $DataView = global[DATA_VIEW];\nvar $DataViewPrototype = $DataView && $DataView[PROTOTYPE];\nvar ObjectPrototype = Object.prototype;\nvar RangeError = global.RangeError;\n\nvar packIEEE754 = IEEE754.pack;\nvar unpackIEEE754 = IEEE754.unpack;\n\nvar packInt8 = function (number) {\n return [number & 0xFF];\n};\n\nvar packInt16 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF];\n};\n\nvar packInt32 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];\n};\n\nvar unpackInt32 = function (buffer) {\n return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];\n};\n\nvar packFloat32 = function (number) {\n return packIEEE754(number, 23, 4);\n};\n\nvar packFloat64 = function (number) {\n return packIEEE754(number, 52, 8);\n};\n\nvar addGetter = function (Constructor, key) {\n defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });\n};\n\nvar get = function (view, count, index, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = bytes.slice(start, start + count);\n return isLittleEndian ? pack : pack.reverse();\n};\n\nvar set = function (view, count, index, conversion, value, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = conversion(+value);\n for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];\n};\n\nif (!NATIVE_ARRAY_BUFFER) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n setInternalState(this, {\n bytes: arrayFill.call(new Array(byteLength), 0),\n byteLength: byteLength\n });\n if (!DESCRIPTORS) this.byteLength = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = getInternalState(buffer).byteLength;\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n setInternalState(this, {\n buffer: buffer,\n byteLength: byteLength,\n byteOffset: offset\n });\n if (!DESCRIPTORS) {\n this.buffer = buffer;\n this.byteLength = byteLength;\n this.byteOffset = offset;\n }\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, 'byteLength');\n addGetter($DataView, 'buffer');\n addGetter($DataView, 'byteLength');\n addGetter($DataView, 'byteOffset');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);\n }\n });\n} else {\n /* eslint-disable no-new -- required for testing */\n if (!fails(function () {\n NativeArrayBuffer(1);\n }) || !fails(function () {\n new NativeArrayBuffer(-1);\n }) || fails(function () {\n new NativeArrayBuffer();\n new NativeArrayBuffer(1.5);\n new NativeArrayBuffer(NaN);\n return NativeArrayBuffer.name != ARRAY_BUFFER;\n })) {\n /* eslint-enable no-new -- required for testing */\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new NativeArrayBuffer(toIndex(length));\n };\n var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];\n for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) {\n createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);\n }\n }\n ArrayBufferPrototype.constructor = $ArrayBuffer;\n }\n\n // WebKit bug - the same parent prototype for typed arrays and data view\n if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {\n setPrototypeOf($DataViewPrototype, ObjectPrototype);\n }\n\n // iOS Safari 7.x bug\n var testView = new $DataView(new $ArrayBuffer(2));\n var nativeSetInt8 = $DataViewPrototype.setInt8;\n testView.setInt8(0, 2147483648);\n testView.setInt8(1, 2147483649);\n if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {\n setInt8: function setInt8(byteOffset, value) {\n nativeSetInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n nativeSetInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, { unsafe: true });\n}\n\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\n\nmodule.exports = {\n ArrayBuffer: $ArrayBuffer,\n DataView: $DataView\n};\n", "'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n", "var isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n setPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n typeof (NewTarget = dummy.constructor) == 'function' &&\n NewTarget !== Wrapper &&\n isObject(NewTargetPrototype = NewTarget.prototype) &&\n NewTargetPrototype !== Wrapper.prototype\n ) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};\n", "var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n", "// `SameValue` abstract operation\n// https://tc39.es/ecma262/#sec-samevalue\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare -- NaN check\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n", "var fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n", "// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n", "import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.find.js\";\nimport \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.reduce.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.array-buffer.constructor.js\";\nimport \"core-js/modules/es.array-buffer.slice.js\";\nimport \"core-js/modules/es.data-view.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.object.entries.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.parse-float.js\";\nimport \"core-js/modules/es.parse-int.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/es.string.match.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport \"core-js/modules/es.string.search.js\";\nimport \"core-js/modules/es.string.split.js\";\nimport \"core-js/modules/es.string.trim.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/* eslint \"@typescript-eslint/ban-ts-comment\": 0 */\n// @ts-nocheck\n\n/* eslint \"camelcase\": 0 */\n\n/* eslint \"@typescript-eslint/no-unused-vars\": 0 */\n\n/* eslint \"@typescript-eslint/no-this-alias\": 0 */\n\n/* eslint \"@typescript-eslint/no-empty-function\": 0 */\n\n/* eslint \"no-prototype-builtins\": 0 */\n\n/* eslint \"prefer-const\": 0 */\n\n/* eslint \"no-constant-condition\": 0 */\nimport $ from \"jquery\";\njQuery = $;\nimport { escapeHTML, randomId, strToBool, getStyle, roundSignif, parseDate, formatDateUTC, makeResizeFilter, pixelRatio, scopeExprToFunc, asArray, mergeSort, $escape, mapValues, isnan, equal, updateLabel, getComputedLinkColor, makeBlob, isBS3 } from \"./utils\";\nimport { isQt, isIE, IEVersion } from \"./utils/browser\";\nimport { FileProcessor } from \"./file/FileProcessor\";\nimport { Shiny } from \"./shiny\";\n\nfunction main() {\n // \"_start.js\"\n // \u221A\n // \"utils.js\"\n // \u221A\n // \"browser.js\"\n // \u221A\n // \"input_rate.js\"\n var Invoker = function Invoker(target, func) {\n this.target = target;\n this.func = func;\n };\n\n (function () {\n this.normalCall = this.immediateCall = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n this.func.apply(this.target, args);\n };\n }).call(Invoker.prototype);\n\n var Debouncer = function Debouncer(target, func, delayMs) {\n this.target = target;\n this.func = func;\n this.delayMs = delayMs;\n this.timerId = null;\n this.args = null;\n };\n\n (function () {\n this.normalCall = function () {\n var self = this;\n this.$clearTimer();\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n this.args = args;\n this.timerId = setTimeout(function () {\n // IE8 doesn't reliably clear timeout, so this additional\n // check is needed\n if (self.timerId === null) return;\n self.$clearTimer();\n self.$invoke();\n }, this.delayMs);\n };\n\n this.immediateCall = function () {\n this.$clearTimer();\n\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n this.args = args;\n this.$invoke();\n };\n\n this.isPending = function () {\n return this.timerId !== null;\n };\n\n this.$clearTimer = function () {\n if (this.timerId !== null) {\n clearTimeout(this.timerId);\n this.timerId = null;\n }\n };\n\n this.$invoke = function () {\n this.func.apply(this.target, this.args);\n this.args = null;\n };\n }).call(Debouncer.prototype);\n\n var Throttler = function Throttler(target, func, delayMs) {\n this.target = target;\n this.func = func;\n this.delayMs = delayMs;\n this.timerId = null;\n this.args = null;\n };\n\n (function () {\n this.normalCall = function () {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n var self = this;\n this.args = args;\n\n if (this.timerId === null) {\n this.$invoke();\n this.timerId = setTimeout(function () {\n var _self$normalCall;\n\n // IE8 doesn't reliably clear timeout, so this additional\n // check is needed\n if (self.timerId === null) return;\n self.$clearTimer();\n if (args.length > 0) (_self$normalCall = self.normalCall).apply.apply(_self$normalCall, [self].concat(args));\n }, this.delayMs);\n }\n };\n\n this.immediateCall = function () {\n this.$clearTimer();\n\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n\n this.args = args;\n this.$invoke();\n };\n\n this.isPending = function () {\n return this.timerId !== null;\n };\n\n this.$clearTimer = function () {\n if (this.timerId !== null) {\n clearTimeout(this.timerId);\n this.timerId = null;\n }\n };\n\n this.$invoke = function () {\n this.func.apply(this.target, this.args);\n this.args = null;\n };\n }).call(Throttler.prototype); // Returns a debounced version of the given function.\n // Debouncing means that when the function is invoked,\n // there is a delay of `threshold` milliseconds before\n // it is actually executed, and if the function is\n // invoked again before that threshold has elapsed then\n // the clock starts over.\n //\n // For example, if a function is debounced with a\n // threshold of 1000ms, then calling it 17 times at\n // 900ms intervals will result in a single execution\n // of the underlying function, 1000ms after the 17th\n // call.\n\n function debounce(threshold, func) {\n var timerId = null;\n var self, args;\n return function () {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n self = this;\n\n if (timerId !== null) {\n clearTimeout(timerId);\n timerId = null;\n }\n\n timerId = setTimeout(function () {\n // IE8 doesn't reliably clear timeout, so this additional\n // check is needed\n if (timerId === null) return;\n timerId = null;\n func.apply(self, args);\n }, threshold);\n };\n } // Returns a throttled version of the given function.\n // Throttling means that the underlying function will\n // be executed no more than once every `threshold`\n // milliseconds.\n //\n // For example, if a function is throttled with a\n // threshold of 1000ms, then calling it 17 times at\n // 900ms intervals will result in something like 15\n // or 16 executions of the underlying function.\n // eslint-disable-next-line no-unused-vars\n\n\n function throttle(threshold, func) {\n var executionPending = false;\n var timerId = null;\n var self, args;\n\n function throttled() {\n self = null;\n args = null;\n\n for (var _len7 = arguments.length, argumentVals = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n argumentVals[_key7] = arguments[_key7];\n }\n\n if (timerId === null) {\n // Haven't seen a call recently. Execute now and\n // start a timer to buffer any subsequent calls.\n timerId = setTimeout(function () {\n // When time expires, clear the timer; and if\n // there has been a call in the meantime, repeat.\n timerId = null;\n\n if (executionPending) {\n executionPending = false;\n throttled.apply(self, args);\n }\n }, threshold);\n func.apply(this, argumentVals);\n } else {\n // Something executed recently. Don't do anything\n // except set up target/arguments to be called later\n executionPending = true;\n self = this;\n args = argumentVals;\n }\n }\n\n return throttled;\n } // Schedules data to be sent to shinyapp at the next setTimeout(0).\n // Batches multiple input calls into one websocket message.\n\n\n var InputBatchSender = function InputBatchSender(shinyapp) {\n this.shinyapp = shinyapp;\n this.timerId = null;\n this.pendingData = {};\n this.reentrant = false;\n this.lastChanceCallback = [];\n };\n\n (function () {\n this.setInput = function (nameType, value, opts) {\n this.pendingData[nameType] = value;\n\n if (!this.reentrant) {\n if (opts.priority === \"event\") {\n this.$sendNow();\n } else if (!this.timerId) {\n this.timerId = setTimeout(this.$sendNow.bind(this), 0);\n }\n }\n };\n\n this.$sendNow = function () {\n if (this.reentrant) {\n console.trace(\"Unexpected reentrancy in InputBatchSender!\");\n }\n\n this.reentrant = true;\n\n try {\n this.timerId = null;\n $.each(this.lastChanceCallback, function (i, callback) {\n callback();\n });\n var currentData = this.pendingData;\n this.pendingData = {};\n this.shinyapp.sendInput(currentData);\n } finally {\n this.reentrant = false;\n }\n };\n }).call(InputBatchSender.prototype);\n\n var InputNoResendDecorator = function InputNoResendDecorator(target, initialValues) {\n this.target = target;\n this.lastSentValues = this.reset(initialValues);\n };\n\n (function () {\n this.setInput = function (nameType, value, opts) {\n var _splitInputNameType = splitInputNameType(nameType),\n inputName = _splitInputNameType.name,\n inputType = _splitInputNameType.inputType;\n\n var jsonValue = JSON.stringify(value);\n\n if (opts.priority !== \"event\" && this.lastSentValues[inputName] && this.lastSentValues[inputName].jsonValue === jsonValue && this.lastSentValues[inputName].inputType === inputType) {\n return;\n }\n\n this.lastSentValues[inputName] = {\n jsonValue: jsonValue,\n inputType: inputType\n };\n this.target.setInput(nameType, value, opts);\n };\n\n this.reset = function () {\n var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Given an object with flat name-value format:\n // { x: \"abc\", \"y.shiny.number\": 123 }\n // Create an object in cache format and save it:\n // { x: { jsonValue: '\"abc\"', inputType: \"\" },\n // y: { jsonValue: \"123\", inputType: \"shiny.number\" } }\n var cacheValues = {};\n\n for (var inputName in values) {\n if (values.hasOwnProperty(inputName)) {\n var _splitInputNameType2 = splitInputNameType(inputName),\n name = _splitInputNameType2.name,\n inputType = _splitInputNameType2.inputType;\n\n cacheValues[name] = {\n jsonValue: JSON.stringify(values[inputName]),\n inputType: inputType\n };\n }\n }\n\n this.lastSentValues = cacheValues;\n };\n\n this.forget = function (name) {\n delete this.lastSentValues[name];\n };\n }).call(InputNoResendDecorator.prototype);\n\n var InputEventDecorator = function InputEventDecorator(target) {\n this.target = target;\n };\n\n (function () {\n this.setInput = function (nameType, value, opts) {\n var evt = jQuery.Event(\"shiny:inputchanged\");\n var input = splitInputNameType(nameType);\n evt.name = input.name;\n evt.inputType = input.inputType;\n evt.value = value;\n evt.binding = opts.binding;\n evt.el = opts.el;\n evt.priority = opts.priority;\n $(opts.el).trigger(evt);\n\n if (!evt.isDefaultPrevented()) {\n var name = evt.name;\n if (evt.inputType !== \"\") name += \":\" + evt.inputType; // Most opts aren't passed along to lower levels in the input decorator\n // stack.\n\n this.target.setInput(name, evt.value, {\n priority: opts.priority\n });\n }\n };\n }).call(InputEventDecorator.prototype);\n\n var InputRateDecorator = function InputRateDecorator(target) {\n this.target = target;\n this.inputRatePolicies = {};\n };\n\n (function () {\n // Note that the first argument of setInput() and setRatePolicy()\n // are passed both the input name (i.e., inputId) and type.\n // https://github.com/rstudio/shiny/blob/67d3a/srcjs/init_shiny.js#L111-L126\n // However, $ensureInit() and $doSetInput() are meant to be passed just\n // the input name (i.e., inputId), which is why we distinguish between\n // nameType and name.\n this.setInput = function (nameType, value, opts) {\n var _splitInputNameType3 = splitInputNameType(nameType),\n inputName = _splitInputNameType3.name;\n\n this.$ensureInit(inputName);\n if (opts.priority !== \"deferred\") this.inputRatePolicies[inputName].immediateCall(nameType, value, opts);else this.inputRatePolicies[inputName].normalCall(nameType, value, opts);\n };\n\n this.setRatePolicy = function (nameType, mode, millis) {\n var _splitInputNameType4 = splitInputNameType(nameType),\n inputName = _splitInputNameType4.name;\n\n if (mode === \"direct\") {\n this.inputRatePolicies[inputName] = new Invoker(this, this.$doSetInput);\n } else if (mode === \"debounce\") {\n this.inputRatePolicies[inputName] = new Debouncer(this, this.$doSetInput, millis);\n } else if (mode === \"throttle\") {\n this.inputRatePolicies[inputName] = new Throttler(this, this.$doSetInput, millis);\n }\n };\n\n this.$ensureInit = function (name) {\n if (!(name in this.inputRatePolicies)) this.setRatePolicy(name, \"direct\");\n };\n\n this.$doSetInput = function (nameType, value, opts) {\n this.target.setInput(nameType, value, opts);\n };\n }).call(InputRateDecorator.prototype);\n\n var InputDeferDecorator = function InputDeferDecorator(target) {\n this.target = target;\n this.pendingInput = {};\n };\n\n (function () {\n this.setInput = function (nameType, value, opts) {\n if (/^\\./.test(nameType)) this.target.setInput(nameType, value, opts);else this.pendingInput[nameType] = {\n value: value,\n opts: opts\n };\n };\n\n this.submit = function () {\n for (var nameType in this.pendingInput) {\n if (this.pendingInput.hasOwnProperty(nameType)) {\n var _this$pendingInput$na = this.pendingInput[nameType],\n value = _this$pendingInput$na.value,\n opts = _this$pendingInput$na.opts;\n this.target.setInput(nameType, value, opts);\n }\n }\n };\n }).call(InputDeferDecorator.prototype);\n\n var InputValidateDecorator = function InputValidateDecorator(target) {\n this.target = target;\n };\n\n (function () {\n this.setInput = function (nameType, value, opts) {\n if (!nameType) throw \"Can't set input with empty name.\";\n opts = addDefaultInputOpts(opts);\n this.target.setInput(nameType, value, opts);\n };\n }).call(InputValidateDecorator.prototype); // Merge opts with defaults, and return a new object.\n\n function addDefaultInputOpts(opts) {\n opts = $.extend({\n priority: \"immediate\",\n binding: null,\n el: null\n }, opts);\n\n if (opts && typeof opts.priority !== \"undefined\") {\n switch (opts.priority) {\n case \"deferred\":\n case \"immediate\":\n case \"event\":\n break;\n\n default:\n throw new Error(\"Unexpected input value mode: '\" + opts.priority + \"'\");\n }\n }\n\n return opts;\n }\n\n function splitInputNameType(nameType) {\n var name2 = nameType.split(\":\");\n return {\n name: name2[0],\n inputType: name2.length > 1 ? name2[1] : \"\"\n };\n } // \"shinyapp.js\"\n\n\n var ShinyApp = function ShinyApp() {\n this.$socket = null; // Cached input values\n\n this.$inputValues = {}; // Input values at initialization (and reconnect)\n\n this.$initialInput = {}; // Output bindings\n\n this.$bindings = {}; // Cached values/errors\n\n this.$values = {};\n this.$errors = {}; // Conditional bindings (show/hide element based on expression)\n\n this.$conditionals = {};\n this.$pendingMessages = [];\n this.$activeRequests = {};\n this.$nextRequestId = 0;\n this.$allowReconnect = false;\n };\n\n (function () {\n this.connect = function (initialInput) {\n if (this.$socket) throw \"Connect was already called on this application object\";\n this.$socket = this.createSocket();\n this.$initialInput = initialInput;\n $.extend(this.$inputValues, initialInput);\n this.$updateConditionals();\n };\n\n this.isConnected = function () {\n return !!this.$socket;\n };\n\n var scheduledReconnect = null;\n\n this.reconnect = function () {\n // This function can be invoked directly even if there's a scheduled\n // reconnect, so be sure to clear any such scheduled reconnects.\n clearTimeout(scheduledReconnect);\n if (this.isConnected()) throw \"Attempted to reconnect, but already connected.\";\n this.$socket = this.createSocket();\n this.$initialInput = $.extend({}, this.$inputValues);\n this.$updateConditionals();\n };\n\n this.createSocket = function () {\n var self = this;\n\n var createSocketFunc = Shiny.createSocket || function () {\n var protocol = \"ws:\";\n if (window.location.protocol === \"https:\") protocol = \"wss:\";\n var defaultPath = window.location.pathname; // some older WebKit browsers return the pathname already decoded;\n // if we find invalid URL characters in the path, encode them\n\n if (!/^([$#!&-;=?-[\\]_a-z~]|%[0-9a-fA-F]{2})+$/.test(defaultPath)) {\n defaultPath = encodeURI(defaultPath); // Bizarrely, QtWebKit requires us to encode these characters *twice*\n\n if (isQt()) {\n defaultPath = encodeURI(defaultPath);\n }\n }\n\n if (!/\\/$/.test(defaultPath)) defaultPath += \"/\";\n defaultPath += \"websocket/\";\n var ws = new WebSocket(protocol + \"//\" + window.location.host + defaultPath);\n ws.binaryType = \"arraybuffer\";\n return ws;\n };\n\n var socket = createSocketFunc();\n var hasOpened = false;\n\n socket.onopen = function () {\n hasOpened = true;\n $(document).trigger({\n type: \"shiny:connected\",\n socket: socket\n });\n self.onConnected();\n socket.send(JSON.stringify({\n method: \"init\",\n data: self.$initialInput\n }));\n\n while (self.$pendingMessages.length) {\n var msg = self.$pendingMessages.shift();\n socket.send(msg);\n }\n };\n\n socket.onmessage = function (e) {\n self.dispatchMessage(e.data);\n }; // Called when a successfully-opened websocket is closed, or when an\n // attempt to open a connection fails.\n\n\n socket.onclose = function () {\n // These things are needed only if we've successfully opened the\n // websocket.\n if (hasOpened) {\n $(document).trigger({\n type: \"shiny:disconnected\",\n socket: socket\n });\n self.$notifyDisconnected();\n }\n\n self.onDisconnected(); // Must be run before self.$removeSocket()\n\n self.$removeSocket();\n };\n\n return socket;\n };\n\n this.sendInput = function (values) {\n var msg = JSON.stringify({\n method: \"update\",\n data: values\n });\n this.$sendMsg(msg);\n $.extend(this.$inputValues, values);\n this.$updateConditionals();\n };\n\n this.$notifyDisconnected = function () {\n if (window.parent) {\n window.parent.postMessage(\"disconnected\", \"*\");\n }\n };\n\n this.$removeSocket = function () {\n this.$socket = null;\n };\n\n this.$scheduleReconnect = function (delay) {\n var self = this;\n scheduledReconnect = setTimeout(function () {\n self.reconnect();\n }, delay);\n }; // How long should we wait before trying the next reconnection?\n // The delay will increase with subsequent attempts.\n // .next: Return the time to wait for next connection, and increment counter.\n // .reset: Reset the attempt counter.\n\n\n var reconnectDelay = function () {\n var attempts = 0; // Time to wait before each reconnection attempt. If we go through all of\n // these values, repeated use the last one. Add 500ms to each one so that\n // in the last 0.5s, it shows \"...\"\n\n var delays = [1500, 1500, 2500, 2500, 5500, 5500, 10500];\n return {\n next: function next() {\n var i = attempts; // Instead of going off the end, use the last one\n\n if (i >= delays.length) {\n i = delays.length - 1;\n }\n\n attempts++;\n return delays[i];\n },\n reset: function reset() {\n attempts = 0;\n }\n };\n }();\n\n this.onDisconnected = function () {\n // Add gray-out overlay, if not already present\n var $overlay = $(\"#shiny-disconnected-overlay\");\n\n if ($overlay.length === 0) {\n $(document.body).append('');\n } // To try a reconnect, both the app (this.$allowReconnect) and the\n // server (this.$socket.allowReconnect) must allow reconnections, or\n // session$allowReconnect(\"force\") was called. The \"force\" option should\n // only be used for testing.\n\n\n if (this.$allowReconnect === true && this.$socket.allowReconnect === true || this.$allowReconnect === \"force\") {\n var delay = reconnectDelay.next();\n Shiny.showReconnectDialog(delay);\n this.$scheduleReconnect(delay);\n }\n };\n\n this.onConnected = function () {\n $(\"#shiny-disconnected-overlay\").remove();\n Shiny.hideReconnectDialog();\n reconnectDelay.reset();\n }; // NB: Including blobs will cause IE to break!\n // TODO: Make blobs work with Internet Explorer\n //\n // Websocket messages are normally one-way--i.e. the client passes a\n // message to the server but there is no way for the server to provide\n // a response to that specific message. makeRequest provides a way to\n // do asynchronous RPC over websocket. Each request has a method name\n // and arguments, plus optionally one or more binary blobs can be\n // included as well. The request is tagged with a unique number that\n // the server will use to label the corresponding response.\n //\n // @param method A string that tells the server what logic to run.\n // @param args An array of objects that should also be passed to the\n // server in JSON-ified form.\n // @param onSuccess A function that will be called back if the server\n // responds with success. If the server provides a value in the\n // response, the function will be called with it as the only argument.\n // @param onError A function that will be called back if the server\n // responds with error, or if the request fails for any other reason.\n // The parameter to onError will be a string describing the error.\n // @param blobs Optionally, an array of Blob, ArrayBuffer, or string\n // objects that will be made available to the server as part of the\n // request. Strings will be encoded using UTF-8.\n\n\n this.makeRequest = function (method, args, onSuccess, onError, blobs) {\n var requestId = this.$nextRequestId;\n\n while (this.$activeRequests[requestId]) {\n requestId = (requestId + 1) % 1000000000;\n }\n\n this.$nextRequestId = requestId + 1;\n this.$activeRequests[requestId] = {\n onSuccess: onSuccess,\n onError: onError\n };\n var msg = JSON.stringify({\n method: method,\n args: args,\n tag: requestId\n });\n\n if (blobs) {\n // We have binary data to transfer; form a different kind of packet.\n // Start with a 4-byte signature, then for each blob, emit 4 bytes for\n // the length followed by the blob. The json payload is UTF-8 encoded\n // and used as the first blob.\n var uint32_to_buf = function uint32_to_buf(val) {\n var buffer = new ArrayBuffer(4);\n var view = new DataView(buffer);\n view.setUint32(0, val, true); // little-endian\n\n return buffer;\n };\n\n var payload = [];\n payload.push(uint32_to_buf(0x01020202)); // signature\n\n var jsonBuf = makeBlob([msg]);\n payload.push(uint32_to_buf(jsonBuf.size));\n payload.push(jsonBuf);\n\n for (var i = 0; i < blobs.length; i++) {\n payload.push(uint32_to_buf(blobs[i].byteLength || blobs[i].size || 0));\n payload.push(blobs[i]);\n }\n\n msg = makeBlob(payload);\n }\n\n this.$sendMsg(msg);\n };\n\n this.$sendMsg = function (msg) {\n if (!this.$socket.readyState) {\n this.$pendingMessages.push(msg);\n } else {\n this.$socket.send(msg);\n }\n };\n\n this.receiveError = function (name, error) {\n if (this.$errors[name] === error) return;\n this.$errors[name] = error;\n delete this.$values[name];\n var binding = this.$bindings[name];\n var evt = jQuery.Event(\"shiny:error\");\n evt.name = name;\n evt.error = error;\n evt.binding = binding;\n $(binding ? binding.el : document).trigger(evt);\n\n if (!evt.isDefaultPrevented() && binding && binding.onValueError) {\n binding.onValueError(evt.error);\n }\n };\n\n this.receiveOutput = function (name, value) {\n var binding = this.$bindings[name];\n var evt = jQuery.Event(\"shiny:value\");\n evt.name = name;\n evt.value = value;\n evt.binding = binding;\n\n if (this.$values[name] === value) {\n $(binding ? binding.el : document).trigger(evt);\n return undefined;\n }\n\n this.$values[name] = value;\n delete this.$errors[name];\n $(binding ? binding.el : document).trigger(evt);\n\n if (!evt.isDefaultPrevented() && binding) {\n binding.onValueChange(evt.value);\n }\n\n return value;\n };\n\n this.bindOutput = function (id, binding) {\n if (!id) throw \"Can't bind an element with no ID\";\n if (this.$bindings[id]) throw \"Duplicate binding for ID \" + id;\n this.$bindings[id] = binding;\n if (this.$values[id] !== undefined) binding.onValueChange(this.$values[id]);else if (this.$errors[id] !== undefined) binding.onValueError(this.$errors[id]);\n return binding;\n };\n\n this.unbindOutput = function (id, binding) {\n if (this.$bindings[id] === binding) {\n delete this.$bindings[id];\n return true;\n } else {\n return false;\n }\n }; // Narrows a scopeComponent -- an input or output object -- to one constrained\n // by nsPrefix. Returns a new object with keys removed and renamed as\n // necessary.\n\n\n function narrowScopeComponent(scopeComponent, nsPrefix) {\n return Object.keys(scopeComponent).filter(function (k) {\n return k.indexOf(nsPrefix) === 0;\n }).map(function (k) {\n return _defineProperty({}, k.substring(nsPrefix.length), scopeComponent[k]);\n }).reduce(function (obj, pair) {\n return $.extend(obj, pair);\n }, {});\n } // Narrows a scope -- an object with input and output \"subComponents\" -- to\n // one constrained by the nsPrefix string.\n //\n // If nsPrefix is null or empty, returns scope without modification.\n //\n // Otherwise, returns a new object with keys in subComponents removed and\n // renamed as necessary.\n\n\n function narrowScope(scope, nsPrefix) {\n if (nsPrefix) {\n return {\n input: narrowScopeComponent(scope.input, nsPrefix),\n output: narrowScopeComponent(scope.output, nsPrefix)\n };\n }\n\n return scope;\n }\n\n this.$updateConditionals = function () {\n $(document).trigger({\n type: \"shiny:conditional\"\n });\n var inputs = {}; // Input keys use \"name:type\" format; we don't want the user to\n // have to know about the type suffix when referring to inputs.\n\n for (var name in this.$inputValues) {\n if (this.$inputValues.hasOwnProperty(name)) {\n var shortName = name.replace(/:.*/, \"\");\n inputs[shortName] = this.$inputValues[name];\n }\n }\n\n var scope = {\n input: inputs,\n output: this.$values\n };\n var conditionals = $(document).find(\"[data-display-if]\");\n\n for (var i = 0; i < conditionals.length; i++) {\n var el = $(conditionals[i]);\n var condFunc = el.data(\"data-display-if-func\");\n\n if (!condFunc) {\n var condExpr = el.attr(\"data-display-if\");\n condFunc = scopeExprToFunc(condExpr);\n el.data(\"data-display-if-func\", condFunc);\n }\n\n var nsPrefix = el.attr(\"data-ns-prefix\");\n var nsScope = narrowScope(scope, nsPrefix);\n var show = condFunc(nsScope);\n var showing = el.css(\"display\") !== \"none\";\n\n if (show !== showing) {\n if (show) {\n el.trigger(\"show\");\n el.show();\n el.trigger(\"shown\");\n } else {\n el.trigger(\"hide\");\n el.hide();\n el.trigger(\"hidden\");\n }\n }\n }\n }; // Message handler management functions =================================\n // Records insertion order of handlers. Maps number to name. This is so\n // we can dispatch messages to handlers in the order that handlers were\n // added.\n\n\n var messageHandlerOrder = []; // Keep track of handlers by name. Maps name to handler function.\n\n var messageHandlers = {}; // Two categories of message handlers: those that are from Shiny, and those\n // that are added by the user. The Shiny ones handle messages in\n // msgObj.values, msgObj.errors, and so on. The user ones handle messages\n // in msgObj.custom.foo and msgObj.custom.bar.\n\n var customMessageHandlerOrder = [];\n var customMessageHandlers = {}; // Adds Shiny (internal) message handler\n\n function addMessageHandler(type, handler) {\n if (messageHandlers[type]) {\n throw 'handler for message of type \"' + type + '\" already added.';\n }\n\n if (typeof handler !== \"function\") {\n throw \"handler must be a function.\";\n }\n\n if (handler.length !== 1) {\n throw \"handler must be a function that takes one argument.\";\n }\n\n messageHandlerOrder.push(type);\n messageHandlers[type] = handler;\n } // Adds custom message handler - this one is exposed to the user\n\n\n function addCustomMessageHandler(type, handler) {\n // Remove any previously defined handlers so that only the most recent one\n // will be called\n if (customMessageHandlers[type]) {\n var typeIdx = customMessageHandlerOrder.indexOf(type);\n\n if (typeIdx !== -1) {\n customMessageHandlerOrder.splice(typeIdx, 1);\n delete customMessageHandlers[type];\n }\n }\n\n if (typeof handler !== \"function\") {\n throw \"handler must be a function.\";\n }\n\n if (handler.length !== 1) {\n throw \"handler must be a function that takes one argument.\";\n }\n\n customMessageHandlerOrder.push(type);\n customMessageHandlers[type] = handler;\n }\n\n Shiny.addCustomMessageHandler = addCustomMessageHandler;\n\n this.dispatchMessage = function (data) {\n var msgObj = {};\n\n if (typeof data === \"string\") {\n msgObj = JSON.parse(data);\n } else {\n // data is arraybuffer\n var len = new DataView(data, 0, 1).getUint8(0);\n var typedv = new DataView(data, 1, len);\n var typebuf = [];\n\n for (var i = 0; i < len; i++) {\n typebuf.push(String.fromCharCode(typedv.getUint8(i)));\n }\n\n var type = typebuf.join(\"\");\n data = data.slice(len + 1);\n msgObj.custom = {};\n msgObj.custom[type] = data;\n }\n\n var evt = jQuery.Event(\"shiny:message\");\n evt.message = msgObj;\n $(document).trigger(evt);\n if (evt.isDefaultPrevented()) return; // Send msgObj.foo and msgObj.bar to appropriate handlers\n\n this._sendMessagesToHandlers(evt.message, messageHandlers, messageHandlerOrder);\n\n this.$updateConditionals();\n }; // A function for sending messages to the appropriate handlers.\n // - msgObj: the object containing messages, with format {msgObj.foo, msObj.bar\n\n\n this._sendMessagesToHandlers = function (msgObj, handlers, handlerOrder) {\n // Dispatch messages to handlers, if handler is present\n for (var i = 0; i < handlerOrder.length; i++) {\n var msgType = handlerOrder[i];\n\n if (msgObj.hasOwnProperty(msgType)) {\n // Execute each handler with 'this' referring to the present value of\n // 'this'\n handlers[msgType].call(this, msgObj[msgType]);\n }\n }\n }; // Message handlers =====================================================\n\n\n addMessageHandler(\"values\", function (message) {\n for (var name in this.$bindings) {\n if (this.$bindings.hasOwnProperty(name)) this.$bindings[name].showProgress(false);\n }\n\n for (var key in message) {\n if (message.hasOwnProperty(key)) this.receiveOutput(key, message[key]);\n }\n });\n addMessageHandler(\"errors\", function (message) {\n for (var key in message) {\n if (message.hasOwnProperty(key)) this.receiveError(key, message[key]);\n }\n });\n addMessageHandler(\"inputMessages\", function (message) {\n // inputMessages should be an array\n for (var i = 0; i < message.length; i++) {\n var $obj = $(\".shiny-bound-input#\" + $escape(message[i].id));\n var inputBinding = $obj.data(\"shiny-input-binding\"); // Dispatch the message to the appropriate input object\n\n if ($obj.length > 0) {\n if (!$obj.attr(\"aria-live\")) $obj.attr(\"aria-live\", \"polite\");\n var el = $obj[0];\n var evt = jQuery.Event(\"shiny:updateinput\");\n evt.message = message[i].message;\n evt.binding = inputBinding;\n $(el).trigger(evt);\n if (!evt.isDefaultPrevented()) inputBinding.receiveMessage(el, evt.message);\n }\n }\n });\n addMessageHandler(\"javascript\", function (message) {\n /*jshint evil: true */\n eval(message);\n });\n addMessageHandler(\"console\", function (message) {\n for (var i = 0; i < message.length; i++) {\n if (console.log) console.log(message[i]);\n }\n });\n addMessageHandler(\"progress\", function (message) {\n if (message.type && message.message) {\n var handler = progressHandlers[message.type];\n if (handler) handler.call(this, message.message);\n }\n });\n addMessageHandler(\"notification\", function (message) {\n if (message.type === \"show\") Shiny.notifications.show(message.message);else if (message.type === \"remove\") Shiny.notifications.remove(message.message);else throw \"Unkown notification type: \" + message.type;\n });\n addMessageHandler(\"modal\", function (message) {\n if (message.type === \"show\") Shiny.modal.show(message.message);else if (message.type === \"remove\") Shiny.modal.remove(); // For 'remove', message content isn't used\n else throw \"Unkown modal type: \" + message.type;\n });\n addMessageHandler(\"response\", function (message) {\n var requestId = message.tag;\n var request = this.$activeRequests[requestId];\n\n if (request) {\n delete this.$activeRequests[requestId];\n if (\"value\" in message) request.onSuccess(message.value);else request.onError(message.error);\n }\n });\n addMessageHandler(\"allowReconnect\", function (message) {\n if (message === true || message === false || message === \"force\") {\n this.$allowReconnect = message;\n } else {\n throw \"Invalid value for allowReconnect: \" + message;\n }\n });\n addMessageHandler(\"custom\", function (message) {\n // For old-style custom messages - should deprecate and migrate to new\n // method\n if (Shiny.oncustommessage) {\n Shiny.oncustommessage(message);\n } // Send messages.foo and messages.bar to appropriate handlers\n\n\n this._sendMessagesToHandlers(message, customMessageHandlers, customMessageHandlerOrder);\n });\n addMessageHandler(\"config\", function (message) {\n this.config = {\n workerId: message.workerId,\n sessionId: message.sessionId\n };\n if (message.user) Shiny.user = message.user;\n $(document).trigger(\"shiny:sessioninitialized\");\n });\n addMessageHandler(\"busy\", function (message) {\n if (message === \"busy\") {\n $(document.documentElement).addClass(\"shiny-busy\");\n $(document).trigger(\"shiny:busy\");\n } else if (message === \"idle\") {\n $(document.documentElement).removeClass(\"shiny-busy\");\n $(document).trigger(\"shiny:idle\");\n }\n });\n addMessageHandler(\"recalculating\", function (message) {\n if (message.hasOwnProperty(\"name\") && message.hasOwnProperty(\"status\")) {\n var binding = this.$bindings[message.name];\n $(binding ? binding.el : null).trigger({\n type: \"shiny:\" + message.status\n });\n }\n });\n addMessageHandler(\"reload\", function (message) {\n window.location.reload();\n });\n addMessageHandler(\"shiny-insert-ui\", function (message) {\n var targets = $(message.selector);\n\n if (targets.length === 0) {\n // render the HTML and deps to a null target, so\n // the side-effect of rendering the deps, singletons,\n // and still occur\n console.warn('The selector you chose (\"' + message.selector + '\") could not be found in the DOM.');\n Shiny.renderHtml(message.content.html, $([]), message.content.deps);\n } else {\n targets.each(function (i, target) {\n Shiny.renderContent(target, message.content, message.where);\n return message.multiple;\n });\n }\n });\n addMessageHandler(\"shiny-remove-ui\", function (message) {\n var els = $(message.selector);\n els.each(function (i, el) {\n Shiny.unbindAll(el, true);\n $(el).remove(); // If `multiple` is false, returning false terminates the function\n // and no other elements are removed; if `multiple` is true,\n // returning true continues removing all remaining elements.\n\n return message.multiple;\n });\n });\n addMessageHandler(\"frozen\", function (message) {\n for (var i = 0; i < message.ids.length; i++) {\n Shiny.forgetLastInputValue(message.ids[i]);\n }\n });\n\n function getTabset(id) {\n var $tabset = $(\"#\" + $escape(id));\n if ($tabset.length === 0) throw \"There is no tabsetPanel (or navbarPage or navlistPanel) \" + \"with id equal to '\" + id + \"'\";\n return $tabset;\n }\n\n function getTabContent($tabset) {\n var tabsetId = $tabset.attr(\"data-tabsetid\");\n var $tabContent = $(\"div.tab-content[data-tabsetid='\" + $escape(tabsetId) + \"']\");\n return $tabContent;\n }\n\n function getTargetTabs($tabset, $tabContent, target) {\n var dataValue = \"[data-value='\" + $escape(target) + \"']\";\n var $aTag = $tabset.find(\"a\" + dataValue);\n var $liTag = $aTag.parent();\n\n if ($liTag.length === 0) {\n throw \"There is no tabPanel (or navbarMenu) with value\" + \" (or menuName) equal to '\" + target + \"'\";\n }\n\n var $liTags = [];\n var $divTags = [];\n\n if ($aTag.attr(\"data-toggle\") === \"dropdown\") {\n // dropdown\n var $dropdownTabset = $aTag.find(\"+ ul.dropdown-menu\");\n var dropdownId = $dropdownTabset.attr(\"data-tabsetid\");\n var $dropdownLiTags = $dropdownTabset.find(\"a[data-toggle='tab']\").parent(\"li\");\n $dropdownLiTags.each(function (i, el) {\n $liTags.push($(el));\n });\n var selector = \"div.tab-pane[id^='tab-\" + $escape(dropdownId) + \"']\";\n var $dropdownDivs = $tabContent.find(selector);\n $dropdownDivs.each(function (i, el) {\n $divTags.push($(el));\n });\n } else {\n // regular tab\n $divTags.push($tabContent.find(\"div\" + dataValue));\n }\n\n return {\n $liTag: $liTag,\n $liTags: $liTags,\n $divTags: $divTags\n };\n }\n\n addMessageHandler(\"shiny-insert-tab\", function (message) {\n var $parentTabset = getTabset(message.inputId);\n var $tabset = $parentTabset;\n var $tabContent = getTabContent($tabset);\n var tabsetId = $parentTabset.attr(\"data-tabsetid\");\n var $divTag = $(message.divTag.html);\n var $liTag = $(message.liTag.html);\n var $aTag = $liTag.find(\"> a\"); // Unless the item is being prepended/appended, the target tab\n // must be provided\n\n var target = null;\n var $targetLiTag = null;\n\n if (message.target !== null) {\n target = getTargetTabs($tabset, $tabContent, message.target);\n $targetLiTag = target.$liTag;\n } // If the item is to be placed inside a navbarMenu (dropdown),\n // change the value of $tabset from the parent's ul tag to the\n // dropdown's ul tag\n\n\n var dropdown = getDropdown();\n\n if (dropdown !== null) {\n if ($aTag.attr(\"data-toggle\") === \"dropdown\") throw \"Cannot insert a navbarMenu inside another one\";\n $tabset = dropdown.$tabset;\n tabsetId = dropdown.id;\n } // For regular tab items, fix the href (of the li > a tag)\n // and the id (of the div tag). This does not apply to plain\n // text items (which function as dividers and headers inside\n // navbarMenus) and whole navbarMenus (since those get\n // constructed from scratch on the R side and therefore\n // there are no ids that need matching)\n\n\n if ($aTag.attr(\"data-toggle\") === \"tab\") {\n var index = getTabIndex($tabset, tabsetId);\n var tabId = \"tab-\" + tabsetId + \"-\" + index;\n $liTag.find(\"> a\").attr(\"href\", \"#\" + tabId);\n $divTag.attr(\"id\", tabId);\n } // actually insert the item into the right place\n\n\n if (message.position === \"before\") {\n if ($targetLiTag) {\n $targetLiTag.before($liTag);\n } else {\n $tabset.append($liTag);\n }\n } else if (message.position === \"after\") {\n if ($targetLiTag) {\n $targetLiTag.after($liTag);\n } else {\n $tabset.prepend($liTag);\n }\n }\n\n Shiny.renderContent($liTag[0], {\n html: $liTag.html(),\n deps: message.liTag.deps\n }); // jcheng 2017-07-28: This next part might look a little insane versus the\n // more obvious `$tabContent.append($divTag);`, but there's a method to the\n // madness.\n //\n // 1) We need to load the dependencies, and this needs to happen before\n // any scripts in $divTag get a chance to run.\n // 2) The scripts in $divTag need to run only once.\n // 3) The contents of $divTag need to be sent through renderContent so that\n // singletons may be registered and/or obeyed, and so that inputs/outputs\n // may be bound.\n //\n // Add to these constraints these facts:\n //\n // A) The (non-jQuery) DOM manipulation functions don't cause scripts to\n // run, but the jQuery functions all do.\n // B) renderContent must be called on an element that's attached to the\n // document.\n // C) $divTag may be of length > 1 (e.g. navbarMenu). I also noticed text\n // elements consisting of just \"\\n\" being included in the nodeset of\n // $divTag.\n // D) renderContent has a bug where only position \"replace\" (the default)\n // uses the jQuery functions, so other positions like \"beforeend\" will\n // prevent child script tags from running.\n //\n // In theory the same problem exists for $liTag but since that content is\n // much less likely to include arbitrary scripts, we're skipping it.\n //\n // This code could be nicer if we didn't use renderContent, but rather the\n // lower-level functions that renderContent uses. Like if we pre-process\n // the value of message.divTag.html for singletons, we could do that, then\n // render dependencies, then do $tabContent.append($divTag).\n\n Shiny.renderContent($tabContent[0], {\n html: \"\",\n deps: message.divTag.deps\n }, \"beforeend\");\n $divTag.get().forEach(function (el) {\n // Must not use jQuery for appending el to the doc, we don't want any\n // scripts to run (since they will run when renderContent takes a crack).\n $tabContent[0].appendChild(el); // If `el` itself is a script tag, this approach won't work (the script\n // won't be run), since we're only sending innerHTML through renderContent\n // and not the whole tag. That's fine in this case because we control the\n // R code that generates this HTML, and we know that the element is not\n // a script tag.\n\n Shiny.renderContent(el, el.innerHTML || el.textContent);\n });\n\n if (message.select) {\n $liTag.find(\"a\").tab(\"show\");\n }\n /* Barbara -- August 2017\n Note: until now, the number of tabs in a tabsetPanel (or navbarPage\n or navlistPanel) was always fixed. So, an easy way to give an id to\n a tab was simply incrementing a counter. (Just like it was easy to\n give a random 4-digit number to identify the tabsetPanel). Now that\n we're introducing dynamic tabs, we must retrieve these numbers and\n fix the dummy id given to the tab in the R side -- there, we always\n set the tab id (counter dummy) to \"id\" and the tabset id to \"tsid\")\n */\n\n\n function getTabIndex($tabset, tabsetId) {\n // The 0 is to ensure this works for empty tabsetPanels as well\n var existingTabIds = [0]; // loop through all existing tabs, find the one with highest id\n // (since this is based on a numeric counter), and increment\n\n $tabset.find(\"a[data-toggle='tab']\").each(function () {\n var $tab = $(this);\n\n if ($tab.length > 0) {\n // remove leading url if it exists. (copy of bootstrap url stripper)\n var href = $tab.attr(\"href\").replace(/.*(?=#[^\\s]+$)/, \"\"); // remove tab id to get the index\n\n var _index = href.replace(\"#tab-\" + tabsetId + \"-\", \"\");\n\n existingTabIds.push(Number(_index));\n }\n });\n return Math.max.apply(null, existingTabIds) + 1;\n } // Finds out if the item will be placed inside a navbarMenu\n // (dropdown). If so, returns the dropdown tabset (ul tag)\n // and the dropdown tabsetid (to be used to fix the tab ID)\n\n\n function getDropdown() {\n if (message.menuName !== null) {\n // menuName is only provided if the user wants to prepend\n // or append an item inside a navbarMenu (dropdown)\n var $dropdownATag = $(\"a.dropdown-toggle[data-value='\" + $escape(message.menuName) + \"']\");\n\n if ($dropdownATag.length === 0) {\n throw \"There is no navbarMenu with menuName equal to '\" + message.menuName + \"'\";\n }\n\n var $dropdownTabset = $dropdownATag.find(\"+ ul.dropdown-menu\");\n var dropdownId = $dropdownTabset.attr(\"data-tabsetid\");\n return {\n $tabset: $dropdownTabset,\n id: dropdownId\n };\n } else if (message.target !== null) {\n // if our item is to be placed next to a tab that is inside\n // a navbarMenu, our item will also be inside\n var $uncleTabset = $targetLiTag.parent(\"ul\");\n\n if ($uncleTabset.hasClass(\"dropdown-menu\")) {\n var uncleId = $uncleTabset.attr(\"data-tabsetid\");\n return {\n $tabset: $uncleTabset,\n id: uncleId\n };\n }\n }\n\n return null;\n }\n }); // If the given tabset has no active tabs, select the first one\n\n function ensureTabsetHasVisibleTab($tabset) {\n var inputBinding = $tabset.data(\"shiny-input-binding\"); // Use the getValue() method to avoid duplicating the CSS selector\n // for querying the DOM for the currently active tab\n\n if (!inputBinding.getValue($tabset)) {\n // Note: destTabValue may be null. We still want to proceed\n // through the below logic and setValue so that the input\n // value for the tabset gets updated (i.e. input$tabsetId\n // should be null if there are no tabs).\n var destTabValue = getFirstTab($tabset);\n var evt = jQuery.Event(\"shiny:updateinput\");\n evt.binding = inputBinding;\n $tabset.trigger(evt);\n inputBinding.setValue($tabset[0], destTabValue);\n }\n } // Given a tabset ul jquery object, return the value of the first tab\n // (in document order) that's visible and able to be selected.\n\n\n function getFirstTab($ul) {\n return $ul.find(\"li:visible a[data-toggle='tab']\").first().attr(\"data-value\") || null;\n }\n\n function tabApplyFunction(target, func) {\n var liTags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n $.each(target, function (key, el) {\n if (key === \"$liTag\") {\n // $liTag is always just one jQuery element\n func(el);\n } else if (key === \"$divTags\") {\n // $divTags is always an array (even if length = 1)\n $.each(el, function (i, div) {\n func(div);\n });\n } else if (liTags && key === \"$liTags\") {\n // $liTags is always an array (even if length = 0)\n $.each(el, function (i, div) {\n func(div);\n });\n }\n });\n }\n\n addMessageHandler(\"shiny-remove-tab\", function (message) {\n var $tabset = getTabset(message.inputId);\n var $tabContent = getTabContent($tabset);\n var target = getTargetTabs($tabset, $tabContent, message.target);\n tabApplyFunction(target, removeEl);\n ensureTabsetHasVisibleTab($tabset);\n\n function removeEl($el) {\n Shiny.unbindAll($el, true);\n $el.remove();\n }\n });\n addMessageHandler(\"shiny-change-tab-visibility\", function (message) {\n var $tabset = getTabset(message.inputId);\n var $tabContent = getTabContent($tabset);\n var target = getTargetTabs($tabset, $tabContent, message.target);\n tabApplyFunction(target, changeVisibility, true);\n ensureTabsetHasVisibleTab($tabset);\n\n function changeVisibility($el) {\n if (message.type === \"show\") $el.css(\"display\", \"\");else if (message.type === \"hide\") {\n $el.hide();\n $el.removeClass(\"active\");\n }\n }\n });\n addMessageHandler(\"updateQueryString\", function (message) {\n // leave the bookmarking code intact\n if (message.mode === \"replace\") {\n window.history.replaceState(null, null, message.queryString);\n return;\n }\n\n var what = null;\n if (message.queryString.charAt(0) === \"#\") what = \"hash\";else if (message.queryString.charAt(0) === \"?\") what = \"query\";else throw \"The 'query' string must start with either '?' \" + \"(to update the query string) or with '#' (to \" + \"update the hash).\";\n var path = window.location.pathname;\n var oldQS = window.location.search;\n var oldHash = window.location.hash;\n /* Barbara -- December 2016\n Note: we could check if the new QS and/or hash are different\n from the old one(s) and, if not, we could choose not to push\n a new state (whether or not we would replace it is moot/\n inconsequential). However, I think that it is better to\n interpret each call to `updateQueryString` as representing\n new state (even if the message.queryString is the same), so\n that check isn't even performed as of right now.\n */\n\n var relURL = path;\n if (what === \"query\") relURL += message.queryString;else relURL += oldQS + message.queryString; // leave old QS if it exists\n\n window.history.pushState(null, null, relURL); // for the case when message.queryString has both a query string\n // and a hash (`what = \"hash\"` allows us to trigger the\n // hashchange event)\n\n if (message.queryString.indexOf(\"#\") !== -1) what = \"hash\"; // for the case when there was a hash before, but there isn't\n // any hash now (e.g. for when only the query string is updated)\n\n if (window.location.hash !== oldHash) what = \"hash\"; // This event needs to be triggered manually because pushState() never\n // causes a hashchange event to be fired,\n\n if (what === \"hash\") $(document).trigger(\"hashchange\");\n });\n addMessageHandler(\"resetBrush\", function (message) {\n Shiny.resetBrush(message.brushId);\n }); // Progress reporting ====================================================\n\n var progressHandlers = {\n // Progress for a particular object\n binding: function binding(message) {\n var key = message.id;\n var binding = this.$bindings[key];\n\n if (binding) {\n $(binding.el).trigger({\n type: \"shiny:outputinvalidated\",\n binding: binding,\n name: key\n });\n if (binding.showProgress) binding.showProgress(true);\n }\n },\n // Open a page-level progress bar\n open: function open(message) {\n if (message.style === \"notification\") {\n // For new-style (starting in Shiny 0.14) progress indicators that use\n // the notification API.\n // Progress bar starts hidden; will be made visible if a value is provided\n // during updates.\n Shiny.notifications.show({\n html: \"