{"version":3,"file":"psm.legacy.min.umd.js","sources":["../../../node_modules/core-js/internals/global.js","../../../node_modules/core-js/internals/fails.js","../../../node_modules/core-js/internals/descriptors.js","../../../node_modules/core-js/internals/object-property-is-enumerable.js","../../../node_modules/core-js/internals/create-property-descriptor.js","../../../node_modules/core-js/internals/classof-raw.js","../../../node_modules/core-js/internals/indexed-object.js","../../../node_modules/core-js/internals/require-object-coercible.js","../../../node_modules/core-js/internals/to-indexed-object.js","../../../node_modules/core-js/internals/is-object.js","../../../node_modules/core-js/internals/to-primitive.js","../../../node_modules/core-js/internals/to-object.js","../../../node_modules/core-js/internals/has.js","../../../node_modules/core-js/internals/document-create-element.js","../../../node_modules/core-js/internals/ie8-dom-define.js","../../../node_modules/core-js/internals/object-get-own-property-descriptor.js","../../../node_modules/core-js/internals/an-object.js","../../../node_modules/core-js/internals/object-define-property.js","../../../node_modules/core-js/internals/create-non-enumerable-property.js","../../../node_modules/core-js/internals/set-global.js","../../../node_modules/core-js/internals/shared-store.js","../../../node_modules/core-js/internals/inspect-source.js","../../../node_modules/core-js/internals/internal-state.js","../../../node_modules/core-js/internals/native-weak-map.js","../../../node_modules/core-js/internals/shared.js","../../../node_modules/core-js/internals/uid.js","../../../node_modules/core-js/internals/shared-key.js","../../../node_modules/core-js/internals/hidden-keys.js","../../../node_modules/core-js/internals/engine-v8-version.js","../../../node_modules/core-js/internals/redefine.js","../../../node_modules/core-js/internals/path.js","../../../node_modules/core-js/internals/get-built-in.js","../../../node_modules/core-js/internals/to-integer.js","../../../node_modules/core-js/internals/to-length.js","../../../node_modules/core-js/internals/to-absolute-index.js","../../../node_modules/core-js/internals/array-includes.js","../../../node_modules/core-js/internals/object-keys-internal.js","../../../node_modules/core-js/internals/enum-bug-keys.js","../../../node_modules/core-js/internals/object-get-own-property-names.js","../../../node_modules/core-js/internals/object-get-own-property-symbols.js","../../../node_modules/core-js/internals/own-keys.js","../../../node_modules/core-js/internals/copy-constructor-properties.js","../../../node_modules/core-js/internals/is-forced.js","../../../node_modules/core-js/internals/export.js","../../../node_modules/core-js/internals/is-array.js","../../../node_modules/core-js/internals/create-property.js","../../../node_modules/core-js/internals/engine-user-agent.js","../../../node_modules/core-js/internals/native-symbol.js","../../../node_modules/core-js/internals/use-symbol-as-uid.js","../../../node_modules/core-js/internals/well-known-symbol.js","../../../node_modules/core-js/internals/array-species-create.js","../../../node_modules/core-js/internals/array-method-has-species-support.js","../../../node_modules/core-js/modules/es.array.concat.js","../../../node_modules/core-js/internals/a-function.js","../../../node_modules/core-js/internals/function-bind-context.js","../../../node_modules/core-js/internals/array-iteration.js","../../../node_modules/core-js/modules/es.array.filter.js","../../../node_modules/core-js/internals/object-keys.js","../../../node_modules/core-js/internals/object-create.js","../../../node_modules/core-js/internals/object-define-properties.js","../../../node_modules/core-js/internals/html.js","../../../node_modules/core-js/internals/add-to-unscopables.js","../../../node_modules/core-js/modules/es.array.find.js","../../../node_modules/core-js/modules/es.array.includes.js","../../../node_modules/core-js/internals/array-reduce.js","../../../node_modules/core-js/internals/array-method-is-strict.js","../../../node_modules/core-js/internals/engine-is-node.js","../../../node_modules/core-js/modules/es.array.reduce.js","../../../node_modules/core-js/modules/es.array.slice.js","../../../node_modules/core-js/internals/object-assign.js","../../../node_modules/core-js/modules/es.object.assign.js","../../../node_modules/core-js/internals/native-promise-constructor.js","../../../node_modules/core-js/internals/object-set-prototype-of.js","../../../node_modules/core-js/internals/a-possible-prototype.js","../../../node_modules/core-js/internals/set-to-string-tag.js","../../../node_modules/core-js/internals/set-species.js","../../../node_modules/core-js/internals/iterators.js","../../../node_modules/core-js/internals/is-array-iterator-method.js","../../../node_modules/core-js/internals/to-string-tag-support.js","../../../node_modules/core-js/internals/classof.js","../../../node_modules/core-js/internals/get-iterator-method.js","../../../node_modules/core-js/internals/iterator-close.js","../../../node_modules/core-js/internals/iterate.js","../../../node_modules/core-js/internals/check-correctness-of-iteration.js","../../../node_modules/core-js/internals/task.js","../../../node_modules/core-js/internals/species-constructor.js","../../../node_modules/core-js/internals/engine-is-ios.js","../../../node_modules/core-js/internals/microtask.js","../../../node_modules/core-js/internals/engine-is-webos-webkit.js","../../../node_modules/core-js/modules/es.promise.js","../../../node_modules/core-js/internals/new-promise-capability.js","../../../node_modules/core-js/internals/perform.js","../../../node_modules/core-js/internals/engine-is-browser.js","../../../node_modules/core-js/internals/host-report-errors.js","../../../node_modules/core-js/internals/an-instance.js","../../../node_modules/core-js/internals/redefine-all.js","../../../node_modules/core-js/internals/promise-resolve.js","../../../node_modules/core-js/internals/regexp-flags.js","../../../node_modules/core-js/internals/regexp-sticky-helpers.js","../../../node_modules/core-js/modules/es.regexp.flags.js","../../../node_modules/core-js/internals/is-regexp.js","../../../node_modules/core-js/internals/not-a-regexp.js","../../../node_modules/core-js/internals/correct-is-regexp-logic.js","../../../node_modules/core-js/modules/es.string.includes.js","../../../node_modules/core-js/internals/regexp-exec.js","../../../node_modules/core-js/modules/es.regexp.exec.js","../../../node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js","../../../node_modules/core-js/internals/same-value.js","../../../node_modules/core-js/modules/es.string.search.js","../../../node_modules/core-js/internals/regexp-exec-abstract.js","../node_modules/uuid/dist/esm-browser/rng.js","../node_modules/uuid/dist/esm-browser/regex.js","../node_modules/uuid/dist/esm-browser/validate.js","../node_modules/uuid/dist/esm-browser/stringify.js","../node_modules/uuid/dist/esm-browser/v4.js","../../../node_modules/component-url/index.js","../../../node_modules/component-cookie/node_modules/ms/index.js","../../../node_modules/component-cookie/node_modules/debug/debug.js","../../../node_modules/component-cookie/index.js","../../../node_modules/component-cookie/node_modules/debug/browser.js","../../../node_modules/@segment/top-domain/lib/index.js","../../cookie/dist/cdp-cookie.esm.js","../../utils/node_modules/uuid/dist/esm-browser/rng.js","../../utils/node_modules/uuid/dist/esm-browser/validate.js","../../utils/node_modules/uuid/dist/esm-browser/stringify.js","../../utils/node_modules/uuid/dist/esm-browser/v4.js","../../utils/dist/logger-a05604f1.esm.js","../../feature-flag-client/dist/featureFlagStorage-5712976a.esm.js","../../../node_modules/core-js/internals/iterators-core.js","../../../node_modules/core-js/internals/correct-prototype-getter.js","../../../node_modules/core-js/internals/object-get-prototype-of.js","../../../node_modules/core-js/internals/create-iterator-constructor.js","../../../node_modules/core-js/internals/define-iterator.js","../../../node_modules/core-js/modules/es.array.iterator.js","../../feature-flag-client/dist/cdp-feature-flag-client.esm.js","../../../node_modules/@lukeed/uuid/dist/index.mjs","../../../node_modules/unfetch/dist/unfetch.module.js","../../../node_modules/uuid/lib/bytesToUuid.js","../../../node_modules/@ndhoule/keys/index.js","../../../node_modules/uuid/lib/rng-browser.js","../../../node_modules/uuid/v1.js","../../../node_modules/uuid/v4.js","../../../node_modules/uuid/index.js","../../../node_modules/@segment/localstorage-retry/lib/engine.js","../../../node_modules/@ndhoule/each/index.js","../../../node_modules/@segment/localstorage-retry/lib/store.js","../../../node_modules/@segment/localstorage-retry/lib/schedule.js","../../../node_modules/@segment/localstorage-retry/node_modules/debug/debug.js","../../../node_modules/component-emitter/index.js","../../../node_modules/@segment/localstorage-retry/lib/index.js","../../../node_modules/core-js/internals/inherit-if-required.js","../../../node_modules/core-js/modules/es.regexp.constructor.js","../../../node_modules/core-js/modules/es.function.name.js","../../../node_modules/core-js/internals/whitespaces.js","../../../node_modules/core-js/internals/string-trim.js","../../../node_modules/core-js/modules/es.number.constructor.js","../../../node_modules/core-js/internals/object-to-array.js","../../../node_modules/core-js/modules/es.object.entries.js","../src/utils/constants.ts","../src/privacy.ts","../src/utils/browser.ts","../src/utils/sendRequest.ts","../src/utils/logger.ts","../src/identity.ts","../../../node_modules/core-js/modules/es.array.some.js","../src/adViewability.ts","../src/engagement.ts","../src/utils/hydratePayload.ts","../src/inbrain.ts","../src/utils/payloadBuilder.ts","../src/utils/processQueue.ts","../src/heartbeat.ts","../src/Psm.ts","../src/index.ts","../src/payloadCore.ts"],"sourcesContent":["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 // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\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 // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.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} : $propertyIsEnumerable;\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 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","var toObject = require('../internals/to-object');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function hasOwn(it, key) {\n return hasOwnProperty.call(toObject(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 // eslint-disable-next-line es/no-object-defineproperty -- requied for testing\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\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(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\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(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 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 OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\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 || shared.state) {\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 if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\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 if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\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 inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\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.12.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 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 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] < 4 ? 1 : 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 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\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.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","var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(arg) {\n return classof(arg) == 'Array';\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 getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n return !String(Symbol()) ||\n // Chrome 38 Symbol has incorrect toString conversion\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\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) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n if (NATIVE_SYMBOL && has(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n }\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 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","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\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/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n});\n\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n// `Array.prototype.concat` method\n// https://tc39.es/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n concat: function concat(arg) {\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n if (isConcatSpreadable(E)) {\n len = toLength(E.length);\n if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n createProperty(A, n++, E);\n }\n }\n A.length = n;\n return A;\n }\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 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","'use strict';\nvar $ = require('../internals/export');\nvar $filter = require('../internals/array-iteration').filter;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');\n\n// `Array.prototype.filter` method\n// https://tc39.es/ecma262/#sec-array.prototype.filter\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\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\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\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 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\n// eslint-disable-next-line es/no-object-defineproperties -- safe\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 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 $ = require('../internals/export');\nvar $find = require('../internals/array-iteration').find;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND = 'find';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.find` method\n// https://tc39.es/ecma262/#sec-array.prototype.find\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND);\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\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","'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","var classof = require('../internals/classof-raw');\nvar global = require('../internals/global');\n\nmodule.exports = classof(global.process) == 'process';\n","'use strict';\nvar $ = require('../internals/export');\nvar $reduce = require('../internals/array-reduce').left;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar CHROME_VERSION = require('../internals/engine-v8-version');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar STRICT_METHOD = arrayMethodIsStrict('reduce');\n// Chrome 80-82 has a critical bug\n// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\nvar CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;\n\n// `Array.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-array.prototype.reduce\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {\n reduce: function reduce(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.es/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line es/no-symbol -- safe\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n","var $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\n// eslint-disable-next-line es/no-object-assign -- required for testing\n$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {\n assign: assign\n});\n","var global = require('../internals/global');\n\nmodule.exports = global.Promise;\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.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\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","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","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 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","module.exports = {};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\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","var classof = require('../internals/classof');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","var anObject = require('../internals/an-object');\n\nmodule.exports = function (iterator) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) {\n return anObject(returnMethod.call(iterator)).value;\n }\n};\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = iterFn.call(iterable);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator);\n throw error;\n }\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar bind = require('../internals/function-bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar location = global.location;\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins -- safe\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(id + '', location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func -- spec requirement\n (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (IS_NODE) {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n typeof postMessage == 'function' &&\n !global.importScripts &&\n location && location.protocol !== 'file:' &&\n !fails(post)\n ) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\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 userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /(?:iphone|ipod|ipad).*applewebkit/i.test(userAgent);\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar macrotask = require('../internals/task').set;\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_WEBOS_WEBKIT = require('../internals/engine-is-webos-webkit');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar document = global.document;\nvar process = global.process;\nvar Promise = global.Promise;\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n // workaround of WebKit ~ iOS Safari 10.1 bug\n promise.constructor = Promise;\n then = promise.then;\n notify = function () {\n then.call(promise, flush);\n };\n // Node.js without promises\n } else if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n};\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /web0s(?!.*chrome)/i.test(userAgent);\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar isObject = require('../internals/is-object');\nvar aFunction = require('../internals/a-function');\nvar anInstance = require('../internals/an-instance');\nvar inspectSource = require('../internals/inspect-source');\nvar iterate = require('../internals/iterate');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar promiseResolve = require('../internals/promise-resolve');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar InternalStateModule = require('../internals/internal-state');\nvar isForced = require('../internals/is-forced');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_BROWSER = require('../internals/engine-is-browser');\nvar IS_NODE = require('../internals/engine-is-node');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar NativePromisePrototype = NativePromise && NativePromise.prototype;\nvar PromiseConstructor = NativePromise;\nvar PromiseConstructorPrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar SUBCLASSING = false;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n // We need Promise#finally in the pure version for preventing prototype pollution\n if (IS_PURE && !PromiseConstructorPrototype['finally']) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;\n // Detect correctness of subclassing with @@species support\n var promise = new PromiseConstructor(function (resolve) { resolve(1); });\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n if (!SUBCLASSING) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\n\nvar notify = function (state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, state, unwrap) {\n return function (value) {\n fn(state, value, unwrap);\n };\n};\n\nvar internalReject = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (state.facade === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, wrapper, state),\n bind(internalReject, wrapper, state)\n );\n } catch (error) {\n internalReject(wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(state, false);\n }\n } catch (error) {\n internalReject({ done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aFunction(executor);\n Internal.call(this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, state), bind(internalReject, state));\n } catch (error) {\n internalReject(state, error);\n }\n };\n PromiseConstructorPrototype = PromiseConstructor.prototype;\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructorPrototype, {\n // `Promise.prototype.then` method\n // https://tc39.es/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify(state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.es/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, state);\n this.reject = bind(internalReject, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && typeof NativePromise == 'function' && NativePromisePrototype !== Object.prototype) {\n nativeThen = NativePromisePrototype.then;\n\n if (!SUBCLASSING) {\n // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n nativeThen.call(that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n\n // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\n redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });\n }\n\n // make `.constructor === Promise` work for native promise-based APIs\n try {\n delete NativePromisePrototype.constructor;\n } catch (error) { /* empty */ }\n\n // make `instanceof Promise` work for native promise-based APIs\n if (setPrototypeOf) {\n setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);\n }\n }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.es/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.es/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.es/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.es/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n iterate(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar aFunction = require('../internals/a-function');\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n};\n\n// 25.4.1.5 NewPromiseCapability(C)\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","module.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","module.exports = typeof window == 'object';\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\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 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","var anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar newPromiseCapability = require('../internals/new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\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","var DESCRIPTORS = require('../internals/descriptors');\nvar objectDefinePropertyModule = require('../internals/object-define-property');\nvar regExpFlags = require('../internals/regexp-flags');\nvar UNSUPPORTED_Y = require('../internals/regexp-sticky-helpers').UNSUPPORTED_Y;\n\n// `RegExp.prototype.flags` getter\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\n// eslint-disable-next-line es/no-regexp-prototype-flags -- required for testing\nif (DESCRIPTORS && (/./g.flags != 'g' || UNSUPPORTED_Y)) {\n objectDefinePropertyModule.f(RegExp.prototype, 'flags', {\n configurable: true,\n get: regExpFlags\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","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (error1) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (error2) { /* empty */ }\n } return false;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\n// `String.prototype.includes` method\n// https://tc39.es/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~String(requireObjectCoercible(this))\n .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\n/* eslint-disable regexp/no-assertion-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */\n/* eslint-disable regexp/no-useless-quantifier -- testing */\nvar regexpFlags = require('./regexp-flags');\nvar stickyHelpers = require('./regexp-sticky-helpers');\nvar shared = require('./shared');\n\nvar nativeExec = RegExp.prototype.exec;\nvar nativeReplace = shared('native-string-replace', 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.\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 regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\nvar RegExpPrototype = RegExp.prototype;\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 // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing\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 var $exec = regexp.exec;\n if ($exec === regexpExec || $exec === RegExpPrototype.exec) {\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(RegExpPrototype, 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(RegExpPrototype[SYMBOL], 'sham', true);\n};\n","// `SameValue` abstract operation\n// https://tc39.es/ecma262/#sec-samevalue\n// eslint-disable-next-line es/no-object-is -- safe\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","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar sameValue = require('../internals/same-value');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.es/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = requireObjectCoercible(this);\n var searcher = regexp == undefined ? undefined : regexp[SEARCH];\n return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@search\n function (regexp) {\n var res = maybeCallNative(nativeSearch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regExpExec(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\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","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n// find the complete implementation of crypto (msCrypto) on IE11.\nvar getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","\n/**\n * Parse the given `url`.\n *\n * @param {String} str\n * @return {Object}\n * @api public\n */\n\nexports.parse = function(url){\n var a = document.createElement('a');\n a.href = url;\n return {\n href: a.href,\n host: a.host || location.host,\n port: ('0' === a.port || '' === a.port) ? port(a.protocol) : a.port,\n hash: a.hash,\n hostname: a.hostname || location.hostname,\n pathname: a.pathname.charAt(0) != '/' ? '/' + a.pathname : a.pathname,\n protocol: !a.protocol || ':' == a.protocol ? location.protocol : a.protocol,\n search: a.search,\n query: a.search.slice(1)\n };\n};\n\n/**\n * Check if `url` is absolute.\n *\n * @param {String} url\n * @return {Boolean}\n * @api public\n */\n\nexports.isAbsolute = function(url){\n return 0 == url.indexOf('//') || !!~url.indexOf('://');\n};\n\n/**\n * Check if `url` is relative.\n *\n * @param {String} url\n * @return {Boolean}\n * @api public\n */\n\nexports.isRelative = function(url){\n return !exports.isAbsolute(url);\n};\n\n/**\n * Check if `url` is cross domain.\n *\n * @param {String} url\n * @return {Boolean}\n * @api public\n */\n\nexports.isCrossDomain = function(url){\n url = exports.parse(url);\n var location = exports.parse(window.location.href);\n return url.hostname !== location.hostname\n || url.port !== location.port\n || url.protocol !== location.protocol;\n};\n\n/**\n * Return default port for `protocol`.\n *\n * @param {String} protocol\n * @return {String}\n * @api private\n */\nfunction port (protocol){\n switch (protocol) {\n case 'http:':\n return 80;\n case 'https:':\n return 443;\n default:\n return location.port;\n }\n}\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} options\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options){\n options = options || {};\n if ('string' == typeof val) return parse(val);\n return options.long\n ? long(val)\n : short(val);\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = '' + str;\n if (str.length > 10000) return;\n var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);\n if (!match) return;\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction short(ms) {\n if (ms >= d) return Math.round(ms / d) + 'd';\n if (ms >= h) return Math.round(ms / h) + 'h';\n if (ms >= m) return Math.round(ms / m) + 'm';\n if (ms >= s) return Math.round(ms / s) + 's';\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction long(ms) {\n return plural(ms, d, 'day')\n || plural(ms, h, 'hour')\n || plural(ms, m, 'minute')\n || plural(ms, s, 'second')\n || ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n if (ms < n) return;\n if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;\n return Math.ceil(ms / n) + ' ' + name + 's';\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = debug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require('ms');\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lowercased letter, i.e. \"n\".\n */\n\nexports.formatters = {};\n\n/**\n * Previously assigned color.\n */\n\nvar prevColor = 0;\n\n/**\n * Previous log timestamp.\n */\n\nvar prevTime;\n\n/**\n * Select a color.\n *\n * @return {Number}\n * @api private\n */\n\nfunction selectColor() {\n return exports.colors[prevColor++ % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction debug(namespace) {\n\n // define the `disabled` version\n function disabled() {\n }\n disabled.enabled = false;\n\n // define the `enabled` version\n function enabled() {\n\n var self = enabled;\n\n // set `diff` timestamp\n var curr = +new Date();\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n\n // add the `color` if not set\n if (null == self.useColors) self.useColors = exports.useColors();\n if (null == self.color && self.useColors) self.color = selectColor();\n\n var args = Array.prototype.slice.call(arguments);\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %o\n args = ['%o'].concat(args);\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n if ('function' === typeof exports.formatArgs) {\n args = exports.formatArgs.apply(self, args);\n }\n var logFn = enabled.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n enabled.enabled = true;\n\n var fn = exports.enabled(namespace) ? enabled : disabled;\n\n fn.namespace = namespace;\n\n return fn;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n var split = (namespaces || '').split(/[\\s,]+/);\n var len = split.length;\n\n for (var i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n","\n/**\n * Module dependencies.\n */\n\nvar debug = require('debug')('cookie');\n\n/**\n * Set or get cookie `name` with `value` and `options` object.\n *\n * @param {String} name\n * @param {String} value\n * @param {Object} options\n * @return {Mixed}\n * @api public\n */\n\nmodule.exports = function(name, value, options){\n switch (arguments.length) {\n case 3:\n case 2:\n return set(name, value, options);\n case 1:\n return get(name);\n default:\n return all();\n }\n};\n\n/**\n * Set cookie `name` to `value`.\n *\n * @param {String} name\n * @param {String} value\n * @param {Object} options\n * @api private\n */\n\nfunction set(name, value, options) {\n options = options || {};\n var str = encode(name) + '=' + encode(value);\n\n if (null == value) options.maxage = -1;\n\n if (options.maxage) {\n options.expires = new Date(+new Date + options.maxage);\n }\n\n if (options.path) str += '; path=' + options.path;\n if (options.domain) str += '; domain=' + options.domain;\n if (options.expires) str += '; expires=' + options.expires.toUTCString();\n if (options.secure) str += '; secure';\n\n document.cookie = str;\n}\n\n/**\n * Return all cookies.\n *\n * @return {Object}\n * @api private\n */\n\nfunction all() {\n var str;\n try {\n str = document.cookie;\n } catch (err) {\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(err.stack || err);\n }\n return {};\n }\n return parse(str);\n}\n\n/**\n * Get cookie `name`.\n *\n * @param {String} name\n * @return {String}\n * @api private\n */\n\nfunction get(name) {\n return all()[name];\n}\n\n/**\n * Parse cookie `str`.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nfunction parse(str) {\n var obj = {};\n var pairs = str.split(/ *; */);\n var pair;\n if ('' == pairs[0]) return obj;\n for (var i = 0; i < pairs.length; ++i) {\n pair = pairs[i].split('=');\n obj[decode(pair[0])] = decode(pair[1]);\n }\n return obj;\n}\n\n/**\n * Encode.\n */\n\nfunction encode(value){\n try {\n return encodeURIComponent(value);\n } catch (e) {\n debug('error `encode(%o)` - %o', value, e)\n }\n}\n\n/**\n * Decode.\n */\n\nfunction decode(value) {\n try {\n return decodeURIComponent(value);\n } catch (e) {\n debug('error `decode(%o)` - %o', value, e)\n }\n}\n","\n/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require('./debug');\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n && 'undefined' != typeof chrome.storage\n ? chrome.storage.local\n : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n 'lightseagreen',\n 'forestgreen',\n 'goldenrod',\n 'dodgerblue',\n 'darkorchid',\n 'crimson'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n return JSON.stringify(v);\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n try {\n if (null == namespaces) {\n exports.storage.removeItem('debug');\n } else {\n exports.storage.debug = namespaces;\n }\n } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n var r;\n try {\n r = exports.storage.debug;\n } catch(e) {}\n return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage(){\n try {\n return window.localStorage;\n } catch (e) {}\n}\n","'use strict';\n\n/**\n * Module dependencies.\n */\n\nvar parse = require('component-url').parse;\nvar cookie = require('component-cookie');\n\n/**\n * Get the top domain.\n *\n * The function constructs the levels of domain and attempts to set a global\n * cookie on each one when it succeeds it returns the top level domain.\n *\n * The method returns an empty string when the hostname is an ip or `localhost`.\n *\n * Example levels:\n *\n * domain.levels('http://www.google.co.uk');\n * // => [\"co.uk\", \"google.co.uk\", \"www.google.co.uk\"]\n *\n * Example:\n *\n * domain('http://localhost:3000/baz');\n * // => ''\n * domain('http://dev:3000/baz');\n * // => ''\n * domain('http://127.0.0.1:3000/baz');\n * // => ''\n * domain('http://segment.io/baz');\n * // => 'segment.io'\n *\n * @param {string} url\n * @return {string}\n * @api public\n */\nfunction domain(url) {\n var cookie = exports.cookie;\n var levels = exports.levels(url);\n\n // Lookup the real top level one.\n for (var i = 0; i < levels.length; ++i) {\n var cname = '__tld__';\n var domain = levels[i];\n var opts = { domain: '.' + domain };\n\n cookie(cname, 1, opts);\n if (cookie(cname)) {\n cookie(cname, null, opts);\n return domain;\n }\n }\n\n return '';\n}\n\n/**\n * Levels returns all levels of the given url.\n *\n * @param {string} url\n * @return {Array}\n * @api public\n */\ndomain.levels = function(url) {\n var host = parse(url).hostname;\n var parts = host.split('.');\n var last = parts[parts.length - 1];\n var levels = [];\n\n // Ip address.\n if (parts.length === 4 && last === parseInt(last, 10)) {\n return levels;\n }\n\n // Localhost.\n if (parts.length <= 1) {\n return levels;\n }\n\n // Create levels.\n for (var i = parts.length - 2; i >= 0; --i) {\n levels.push(parts.slice(i).join('.'));\n }\n\n return levels;\n};\n\n/**\n * Expose cookie on domain.\n */\ndomain.cookie = cookie;\n\n/*\n * Exports.\n */\n\nexports = module.exports = domain;\n","import findTopDomain from '@segment/top-domain';\nexport { default as findTopDomain } from '@segment/top-domain';\n\nconst debug = (...args) => {\n if (window.location.search.search(/[?&]wmpsm_debug=[1t]/) !== -1) {\n console.info(...args);\n }\n};\nfunction cookieHelper(name, value, options) {\n switch (arguments.length) {\n case 3:\n case 2:\n return set(name, value, options);\n\n case 1:\n return get(name);\n\n default:\n return all();\n }\n}\n/**\n * Set cookie `name` to `value`.\n */\n\nfunction set(name, value, options) {\n options = options || {};\n let str = encode(name) + '=' + encode(value);\n\n if (options.encode === false) {\n str = name + '=' + value;\n }\n\n if (null == value) options.maxage = -1;\n\n if (options.maxage && !options.expires) {\n options.expires = new Date(+new Date() + options.maxage);\n }\n\n if (options.path) str += '; Path=' + options.path;\n if (options.domain) str += '; Domain=' + options.domain;\n if (options.expires) str += '; Expires=' + options.expires.toUTCString();\n if (options.samesite) str += '; SameSite=' + options.samesite;\n if (options.secure) str += '; Secure';\n debug('[COOKIE]: cookie.helper.set()', str, options);\n document.cookie = str;\n}\n/**\n * Return all cookies.\n */\n\n\nfunction all() {\n let str;\n\n try {\n str = document.cookie;\n } catch (err) {\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(err.stack || err);\n }\n\n return {};\n }\n\n return parse(str);\n}\n/**\n * Get cookie `name`.\n */\n\n\nfunction get(name) {\n const val = all()[name];\n debug(`[COOKIE]: helper.get() - getting ${name} cookie value ${val}`);\n return val;\n}\n/**\n * Parse cookie `str`.\n */\n\n\nfunction parse(str) {\n const obj = {};\n const pairs = str.split(/ *; */);\n if ('' == pairs[0]) return obj;\n\n for (let i = 0; i < pairs.length; ++i) {\n const cookieName = pairs[i].substr(0, pairs[i].indexOf('='));\n const cookieValue = pairs[i].substr(pairs[i].indexOf('=') + 1);\n obj[decode(cookieName)] = decode(cookieValue);\n }\n\n return obj;\n}\n\nfunction encode(value) {\n try {\n return encodeURIComponent(value);\n } catch (err) {// ignore\n }\n}\n\nfunction decode(value) {\n try {\n return decodeURIComponent(value);\n } catch (err) {// ignore\n }\n}\n\nclass Cookie {\n constructor(options) {\n this._options = {};\n this.options = this.options.bind(this);\n this.set = this.set.bind(this);\n this.get = this.get.bind(this);\n this.getAll = this.getAll.bind(this);\n this.remove = this.remove.bind(this);\n this.options(options);\n }\n\n options(options) {\n if (arguments.length === 0) return this._options;\n options = options || {};\n let domain = options.domain || `.${findTopDomain(window.location.href)}`;\n\n if (domain === '.') {\n domain = null;\n }\n\n this._options = {\n maxage: 31536000000,\n path: '/',\n samesite: 'Lax',\n encode: true,\n ...options,\n domain\n }; // http://curl.haxx.se/rfc/cookie_spec.html\n // https://publicsuffix.org/list/effective_tld_names.dat\n //\n // try setting a dummy cookie with the options\n // if the cookie isn't set, it probably means\n // that the domain is on the public suffix list\n // like myapp.deployment.com or localhost / ip.\n\n this.set('psm:test', true, this._options);\n\n if (!this.get('psm:test')) {\n debug('[Cookie]: psm:test cookie could not be set at domain: ', this._options.domain);\n const reg = new RegExp(document.location.hostname, 'g');\n\n if (document.referrer !== '' && document.referrer.search(reg) === -1) {\n this._options.samesite = 'None';\n } else {\n this._options.domain = null;\n }\n }\n\n this.remove('psm:test');\n debug('[COOKIE]: this._options', this._options);\n }\n\n set(name, value, options = {}) {\n const opts = { ...this._options,\n ...options\n };\n debug('[COOKIE]: this.set() options', opts);\n\n try {\n if (typeof value !== 'string') {\n value = JSON.stringify(value);\n } // @ts-ignore\n\n\n cookieHelper(name, value === 'null' ? null : value, opts);\n return true;\n } catch (err) {\n debug('[COOKIE]: this.set() encountered an error', err);\n return false;\n }\n }\n\n get(name) {\n const value = cookieHelper(name);\n\n try {\n return JSON.parse(value);\n } catch (err) {\n // debug('[COOKIE]: this.get() encountered an error', err);\n return value || null;\n }\n }\n\n getAll() {\n return cookieHelper();\n }\n\n remove(name) {\n try {\n cookieHelper(name, null, { ...this._options\n });\n return true;\n } catch (err) {\n debug('[COOKIE]: this.remove() encountered an error', err);\n return false;\n }\n }\n\n}\nconst cookie = new Cookie();\n\nexport { Cookie, cookie };\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n// find the complete implementation of crypto (msCrypto) on IE11.\nvar getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n\n return getRandomValues(rnds8);\n}","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import fetch from 'unfetch';\nimport { v4 } from 'uuid';\n\nfunction getCurrentTime() {\n return new Date().toISOString();\n}\n\n/**\n * helper function for http methods ie. GET, POST, etc.\n * @param request\n * @returns request\n */\nasync function makeRequest(request) {\n const headers = {\n 'Content-Type': 'application/json',\n ...request.headers\n };\n const response = await fetch(request.url, {\n method: request.method,\n headers,\n body: extractRequestPayload(request)\n });\n\n if (response.ok) {\n return extractResponsePayload(response);\n }\n\n const error = new Error(response.statusText);\n error.response = response;\n return Promise.reject(error);\n}\n\nfunction extractRequestPayload(request) {\n if (typeof request.payload === 'string') {\n return request.payload;\n } else if (request.payload instanceof String) {\n return request.payload.valueOf();\n } else {\n return JSON.stringify(request.payload);\n }\n}\n\nasync function extractResponsePayload(response) {\n let headers = ''; // Matches the headers structure from XMLHttpRequest.getAllResponseHeaders() used in older versions of Utils\n\n if (response.headers) {\n response.headers.entries().forEach(entry => headers += `${entry[0]}: ${entry[1]}\\r\\n`);\n }\n\n const responsePayload = {\n status: response.status,\n statusText: response.statusText,\n headers: headers,\n data: '' // Matches previous defaulting logic\n\n }; // Must use .json() to extract payload body\n\n try {\n const responseJson = await response.json();\n responsePayload.data = responseJson; // Must have catch to prevent unhandled exceptions\n } catch (e) {\n }\n\n return responsePayload;\n}\n\nfunction isEnvNode() {\n try {\n return typeof process !== 'undefined' && typeof process.versions.node !== 'undefined';\n } catch (error) {\n return false;\n }\n}\nfunction generateUUID() {\n return v4();\n}\n\n//@ts-nocheck\n\nfunction getGeoLocation() {\n return new Promise((resolve, reject) => {\n const request = {\n url: 'https://geo.ngtv.io/locate',\n method: 'GET'\n };\n makeRequest(request).then(response => resolve(response.data)).catch(error => {\n // TODO - need to revisit once logger will finalise\n // errorLogger(error);\n return reject(error);\n });\n });\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nclass Logger {\n constructor(url, metadata) {\n this.url = void 0;\n this.metadata = void 0;\n this.level = void 0;\n this.url = url;\n this.metadata = metadata;\n this.level = window.location.search.search(/[?&]psm_debug=[1t]/) !== -1 ? 'debug' : 'error';\n }\n\n transport(level, scope, caller, ...args) {\n const payload = {\n message: {\n version: this.metadata.version,\n level,\n appId: this.metadata.appId,\n wmukid: this.metadata.wmukid,\n eventId: generateUUID(),\n timestamp: new Date().toISOString(),\n brand: this.metadata.brand,\n domain: this.metadata.domain,\n userAgent: window.navigator.userAgent.toString(),\n platform: 'Web',\n scope,\n caller,\n data: args\n }\n };\n makeRequest({\n url: this.url,\n method: 'POST',\n payload: JSON.stringify(payload, null, 2),\n headers: {\n type: 'application/json'\n }\n });\n }\n\n debug(scope, caller, ...args) {\n if (this.level !== 'debug') {\n return;\n }\n\n console.info('[PSM]', scope, caller, ...args);\n this.transport('debug', scope, caller, ...args);\n }\n\n error(scope, caller, ...args) {\n if (this.level === 'debug') {\n console.error('[PSM]', scope, caller, ...args);\n }\n\n this.transport('error', scope, caller, ...args);\n }\n\n}\n\nexport { Logger as L, generateUUID as a, getCurrentTime as b, extractRequestPayload as e, getGeoLocation as g, isEnvNode as i, makeRequest as m };\n","var config = {\n\tffLibraryVersionCode: 1,\n\tffLibraryVersionName: \"1.0.2-beta\",\n\tffLibraryLanguage: \"Javascript\",\n\tminimumPollFrequencySeconds: 60\n};\n\nconst APP_USER_ID = 'wmAppUserId';\nconst FEATURE_FLAG_CONFIG = 'wmFeatureFlagConfig';\nconst FEATURE_FLAG_USER_ID = 'wmFeatureFlagUserId';\nconst FEATURE_FLAG_CONFIG_ETAG = 'wmFeatureFlagConfigEtag';\nconst FEATURE_FLAG_RESULTS = 'wmFeatureFlagResults';\nconst CONFIG_CACHE_START = 'wmConfigCacheStart';\nconst CACHE_USED = 'Cache was used due to remote loading failing.';\nconst FALLBACK_USED_REMOTE_LOAD_FAILED = 'Fallback used because remote config loading failed.';\nconst FALLBACK_OR_CACHE_USED_REMOTE_LOAD_FAILED = 'Fallback or cache used because remote config loading failed.';\nconst FALLBACK_USED_FLAG_NOT_IN_REMOTE = 'Fallback used because a requested flag was present in it and not the remote.';\nconst REMOTE_CONFIG_USED_NO_FALLBACK_PRESENT = 'Remote config used because a fallback config is not present.';\nconst FAILED_TO_READ_CONFIG_FROM_STORAGE = 'There was a problem reading the config object from storage, possibly due to invalid config JSON.';\nconst UNABLE_TO_ACCESS_LOCAL_STORAGE = 'Unable to access localStorage';\nconst UNABLE_TO_ACCESS_SESSION_STORAGE = 'Unable to access sessionStorage';\nconst MULTIPLE_INSTANCES_SUPPORT = 'A clientId must be provided for multiple instance support.';\n\n/**\n * @module wm-feature-flag-client\n */\nclass FeatureFlagStorage {\n constructor(storageType, clientId) {\n this.storageType = void 0;\n this.clientId = void 0;\n this.storage = void 0;\n this.warnings = void 0;\n this.storageType = storageType;\n this.clientId = clientId;\n this.warnings = [];\n\n if (!this.clientId) {\n const warning = {\n code: 'MULTIPLE_INSTANCES_SUPPORT',\n message: `${MULTIPLE_INSTANCES_SUPPORT}`\n };\n this.warnings.push(warning);\n }\n\n switch (this.storageType) {\n case 'localStorage':\n try {\n this.storage = localStorage;\n } catch (error) {\n const warning = {\n code: 'UNABLE_TO_ACCESS_LOCAL_STORAGE',\n message: `${UNABLE_TO_ACCESS_LOCAL_STORAGE}: ${error}`\n };\n this.warnings.push(warning);\n }\n\n break;\n\n case 'sessionStorage':\n try {\n this.storage = sessionStorage;\n } catch (error) {\n const warning = {\n code: 'UNABLE_TO_ACCESS_SESSION_STORAGE',\n message: `${UNABLE_TO_ACCESS_SESSION_STORAGE}: ${error}`\n };\n this.warnings.push(warning);\n }\n\n break;\n\n case 'inMemory': // todo: implement an in-memory storage option for non-browser env\n\n default:\n try {\n this.storage = localStorage;\n break;\n } catch (error) {\n const warning = {\n code: 'UNABLE_TO_ACCESS_LOCAL_STORAGE',\n message: `${UNABLE_TO_ACCESS_LOCAL_STORAGE}: ${error}`\n };\n this.warnings.push(warning);\n }\n\n }\n }\n\n get(key) {\n let storeItem;\n if (typeof Storage === 'undefined') return;\n let storageKey = key;\n if (this.clientId) storageKey = `${storageKey}-${this.clientId}`;\n\n try {\n storeItem = this.storage.getItem(storageKey);\n } catch (error) {\n const warning = {\n code: 'UNABLE_TO_ACCESS_LOCAL_STORAGE',\n message: `${UNABLE_TO_ACCESS_LOCAL_STORAGE}: ${error}`\n };\n this.warnings.push(warning);\n }\n\n return storeItem;\n }\n\n set(key, value) {\n if (typeof Storage === 'undefined') return;\n let storageKey = key;\n if (this.clientId) storageKey = `${storageKey}-${this.clientId}`;\n\n try {\n this.storage.setItem(storageKey, value);\n } catch (error) {\n const warning = {\n code: 'UNABLE_TO_ACCESS_LOCAL_STORAGE',\n message: `${UNABLE_TO_ACCESS_LOCAL_STORAGE}: ${error}`\n };\n this.warnings.push(warning);\n }\n\n return;\n }\n\n delete(key) {\n if (typeof Storage === 'undefined') return;\n let storageKey = key;\n if (this.clientId) storageKey = `${storageKey}-${this.clientId}`;\n\n try {\n this.storage.deleteItem(storageKey);\n } catch (error) {\n const warning = {\n code: 'UNABLE_TO_ACCESS_LOCAL_STORAGE',\n message: `${UNABLE_TO_ACCESS_LOCAL_STORAGE}: ${error}`\n };\n this.warnings.push(warning);\n }\n\n return;\n }\n\n}\n\nexport { APP_USER_ID as A, CONFIG_CACHE_START as C, FeatureFlagStorage as F, REMOTE_CONFIG_USED_NO_FALLBACK_PRESENT as R, FEATURE_FLAG_CONFIG as a, FEATURE_FLAG_CONFIG_ETAG as b, config as c, FEATURE_FLAG_USER_ID as d, CACHE_USED as e, FALLBACK_USED_REMOTE_LOAD_FAILED as f, FALLBACK_OR_CACHE_USED_REMOTE_LOAD_FAILED as g, FEATURE_FLAG_RESULTS as h, FALLBACK_USED_FLAG_NOT_IN_REMOTE as i, FAILED_TO_READ_CONFIG_FROM_STORAGE as j };\n","'use strict';\nvar fails = require('../internals/fails');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nif ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {\n createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\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\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\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","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","import { generateUUID, makeRequest } from '@turnercode/cdp-utils-js';\nimport { c as config, F as FeatureFlagStorage, a as FEATURE_FLAG_CONFIG, b as FEATURE_FLAG_CONFIG_ETAG, R as REMOTE_CONFIG_USED_NO_FALLBACK_PRESENT, A as APP_USER_ID, d as FEATURE_FLAG_USER_ID, C as CONFIG_CACHE_START, e as CACHE_USED, f as FALLBACK_USED_REMOTE_LOAD_FAILED, g as FALLBACK_OR_CACHE_USED_REMOTE_LOAD_FAILED, h as FEATURE_FLAG_RESULTS, i as FALLBACK_USED_FLAG_NOT_IN_REMOTE, j as FAILED_TO_READ_CONFIG_FROM_STORAGE } from './featureFlagStorage-5712976a.esm.js';\nimport 'core-js/modules/es.array.iterator';\n\nconst setPolyfills = () => {\n /* Object.entries polyfill */\n if (!Object.entries) {\n Object.entries = function (obj) {\n const ownProps = Object.keys(obj);\n let i = ownProps.length;\n const resArray = new Array(i); // preallocate the Array\n\n while (i--) resArray[i] = [ownProps[i], obj[ownProps[i]]];\n\n return resArray;\n };\n }\n /* Array.prototype.find polyfill */\n\n\n if (!Array.prototype.find) {\n Object.defineProperty(Array.prototype, 'find', {\n value: function (predicate) {\n // 1. Let O be ? ToObject(this value).\n if (this == null) {\n throw TypeError('\"this\" is null or not defined');\n }\n\n const o = Object(this); // 2. Let len be ? ToLength(? Get(O, \"length\")).\n\n const len = o.length >>> 0; // 3. If IsCallable(predicate) is false, throw a TypeError exception.\n\n if (typeof predicate !== 'function') {\n throw TypeError('predicate must be a function');\n } // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.\n // eslint-disable-next-line prefer-rest-params\n\n\n const thisArg = arguments[1]; // 5. Let k be 0.\n\n let k = 0; // 6. Repeat, while k < len\n\n while (k < len) {\n // a. Let Pk be ! ToString(k).\n // b. Let kValue be ? Get(O, Pk).\n // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).\n // d. If testResult is true, return kValue.\n const kValue = o[k];\n\n if (predicate.call(thisArg, kValue, k, o)) {\n return kValue;\n } // e. Increase k by 1.\n\n\n k++;\n } // 7. Return undefined.\n\n\n return undefined;\n },\n configurable: true,\n writable: true\n });\n }\n};\n\nconst ERROR = 'input is invalid type';\nconst HEX_CHARS = '0123456789abcdef'.split('');\nconst EXTRA = [-2147483648, 8388608, 32768, 128];\nconst SHIFT = [24, 16, 8, 0];\nconst K = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2];\nclass Sha256 {\n constructor() {\n this.blocks = [];\n this.h0 = void 0;\n this.h1 = void 0;\n this.h2 = void 0;\n this.h3 = void 0;\n this.h4 = void 0;\n this.h5 = void 0;\n this.h6 = void 0;\n this.h7 = void 0;\n this.block = void 0;\n this.start = void 0;\n this.bytes = void 0;\n this.hBytes = void 0;\n this.finalized = void 0;\n this.hashed = void 0;\n this.first = void 0;\n this.lastByteIndex = void 0;\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; // 256\n\n this.h0 = 0x6a09e667;\n this.h1 = 0xbb67ae85;\n this.h2 = 0x3c6ef372;\n this.h3 = 0xa54ff53a;\n this.h4 = 0x510e527f;\n this.h5 = 0x9b05688c;\n this.h6 = 0x1f83d9ab;\n this.h7 = 0x5be0cd19;\n this.block = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n }\n\n create() {\n return this;\n }\n\n update(message) {\n if (this.finalized) {\n return;\n }\n\n let notString;\n const type = typeof message;\n\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(ERROR);\n } else if (message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ArrayBuffer.isView(message)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n\n notString = true;\n }\n\n let code,\n index = 0,\n i;\n const length = message.length,\n blocks = this.blocks;\n\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | code >> 6) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | code >> 12) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + ((code & 0x3ff) << 10 | message.charCodeAt(++index) & 0x3ff);\n blocks[i >> 2] |= (0xf0 | code >> 18) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | code >> 12 & 0x3f) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n\n if (i >= 64) {\n this.block = blocks[16];\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n\n if (this.bytes > 4294967295) {\n this.hBytes += this.bytes / 4294967296 << 0;\n this.bytes = this.bytes % 4294967296;\n }\n\n return this;\n }\n\n finalize() {\n if (this.finalized) {\n return;\n }\n\n this.finalized = true;\n const blocks = this.blocks,\n i = this.lastByteIndex;\n blocks[16] = this.block;\n blocks[i >> 2] |= EXTRA[i & 3];\n this.block = blocks[16];\n\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n\n blocks[14] = this.hBytes << 3 | this.bytes >>> 29;\n blocks[15] = this.bytes << 3;\n this.hash();\n }\n\n hash() {\n let a = this.h0,\n b = this.h1,\n c = this.h2,\n d = this.h3,\n e = this.h4,\n f = this.h5,\n g = this.h6,\n h = this.h7,\n j,\n s0,\n s1,\n maj,\n t1,\n t2,\n ch,\n ab,\n da,\n cd,\n bc;\n const blocks = this.blocks;\n\n for (j = 16; j < 64; ++j) {\n // rightrotate\n t1 = blocks[j - 15];\n s0 = (t1 >>> 7 | t1 << 25) ^ (t1 >>> 18 | t1 << 14) ^ t1 >>> 3;\n t1 = blocks[j - 2];\n s1 = (t1 >>> 17 | t1 << 15) ^ (t1 >>> 19 | t1 << 13) ^ t1 >>> 10;\n blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0;\n }\n\n bc = b & c;\n\n for (j = 0; j < 64; j += 4) {\n if (this.first) {\n ab = 704751109;\n t1 = blocks[0] - 210244248;\n h = t1 - 1521486534 << 0;\n d = t1 + 143694565 << 0;\n this.first = false;\n } else {\n s0 = (a >>> 2 | a << 30) ^ (a >>> 13 | a << 19) ^ (a >>> 22 | a << 10);\n s1 = (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7);\n ab = a & b;\n maj = ab ^ a & c ^ bc;\n ch = e & f ^ ~e & g;\n t1 = h + s1 + ch + K[j] + blocks[j];\n t2 = s0 + maj;\n h = d + t1 << 0;\n d = t1 + t2 << 0;\n }\n\n s0 = (d >>> 2 | d << 30) ^ (d >>> 13 | d << 19) ^ (d >>> 22 | d << 10);\n s1 = (h >>> 6 | h << 26) ^ (h >>> 11 | h << 21) ^ (h >>> 25 | h << 7);\n da = d & a;\n maj = da ^ d & b ^ ab;\n ch = h & e ^ ~h & f;\n t1 = g + s1 + ch + K[j + 1] + blocks[j + 1];\n t2 = s0 + maj;\n g = c + t1 << 0;\n c = t1 + t2 << 0;\n s0 = (c >>> 2 | c << 30) ^ (c >>> 13 | c << 19) ^ (c >>> 22 | c << 10);\n s1 = (g >>> 6 | g << 26) ^ (g >>> 11 | g << 21) ^ (g >>> 25 | g << 7);\n cd = c & d;\n maj = cd ^ c & a ^ da;\n ch = g & h ^ ~g & e;\n t1 = f + s1 + ch + K[j + 2] + blocks[j + 2];\n t2 = s0 + maj;\n f = b + t1 << 0;\n b = t1 + t2 << 0;\n s0 = (b >>> 2 | b << 30) ^ (b >>> 13 | b << 19) ^ (b >>> 22 | b << 10);\n s1 = (f >>> 6 | f << 26) ^ (f >>> 11 | f << 21) ^ (f >>> 25 | f << 7);\n bc = b & c;\n maj = bc ^ b & d ^ cd;\n ch = f & g ^ ~f & h;\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n t2 = s0 + maj;\n e = a + t1 << 0;\n a = t1 + t2 << 0;\n }\n\n this.h0 = this.h0 + a << 0;\n this.h1 = this.h1 + b << 0;\n this.h2 = this.h2 + c << 0;\n this.h3 = this.h3 + d << 0;\n this.h4 = this.h4 + e << 0;\n this.h5 = this.h5 + f << 0;\n this.h6 = this.h6 + g << 0;\n this.h7 = this.h7 + h << 0;\n }\n\n hex() {\n this.finalize();\n const h0 = this.h0,\n h1 = this.h1,\n h2 = this.h2,\n h3 = this.h3,\n h4 = this.h4,\n h5 = this.h5,\n h6 = this.h6,\n h7 = this.h7;\n let hex = HEX_CHARS[h0 >> 28 & 0x0f] + HEX_CHARS[h0 >> 24 & 0x0f] + HEX_CHARS[h0 >> 20 & 0x0f] + HEX_CHARS[h0 >> 16 & 0x0f] + HEX_CHARS[h0 >> 12 & 0x0f] + HEX_CHARS[h0 >> 8 & 0x0f] + HEX_CHARS[h0 >> 4 & 0x0f] + HEX_CHARS[h0 & 0x0f] + HEX_CHARS[h1 >> 28 & 0x0f] + HEX_CHARS[h1 >> 24 & 0x0f] + HEX_CHARS[h1 >> 20 & 0x0f] + HEX_CHARS[h1 >> 16 & 0x0f] + HEX_CHARS[h1 >> 12 & 0x0f] + HEX_CHARS[h1 >> 8 & 0x0f] + HEX_CHARS[h1 >> 4 & 0x0f] + HEX_CHARS[h1 & 0x0f] + HEX_CHARS[h2 >> 28 & 0x0f] + HEX_CHARS[h2 >> 24 & 0x0f] + HEX_CHARS[h2 >> 20 & 0x0f] + HEX_CHARS[h2 >> 16 & 0x0f] + HEX_CHARS[h2 >> 12 & 0x0f] + HEX_CHARS[h2 >> 8 & 0x0f] + HEX_CHARS[h2 >> 4 & 0x0f] + HEX_CHARS[h2 & 0x0f] + HEX_CHARS[h3 >> 28 & 0x0f] + HEX_CHARS[h3 >> 24 & 0x0f] + HEX_CHARS[h3 >> 20 & 0x0f] + HEX_CHARS[h3 >> 16 & 0x0f] + HEX_CHARS[h3 >> 12 & 0x0f] + HEX_CHARS[h3 >> 8 & 0x0f] + HEX_CHARS[h3 >> 4 & 0x0f] + HEX_CHARS[h3 & 0x0f] + HEX_CHARS[h4 >> 28 & 0x0f] + HEX_CHARS[h4 >> 24 & 0x0f] + HEX_CHARS[h4 >> 20 & 0x0f] + HEX_CHARS[h4 >> 16 & 0x0f] + HEX_CHARS[h4 >> 12 & 0x0f] + HEX_CHARS[h4 >> 8 & 0x0f] + HEX_CHARS[h4 >> 4 & 0x0f] + HEX_CHARS[h4 & 0x0f] + HEX_CHARS[h5 >> 28 & 0x0f] + HEX_CHARS[h5 >> 24 & 0x0f] + HEX_CHARS[h5 >> 20 & 0x0f] + HEX_CHARS[h5 >> 16 & 0x0f] + HEX_CHARS[h5 >> 12 & 0x0f] + HEX_CHARS[h5 >> 8 & 0x0f] + HEX_CHARS[h5 >> 4 & 0x0f] + HEX_CHARS[h5 & 0x0f] + HEX_CHARS[h6 >> 28 & 0x0f] + HEX_CHARS[h6 >> 24 & 0x0f] + HEX_CHARS[h6 >> 20 & 0x0f] + HEX_CHARS[h6 >> 16 & 0x0f] + HEX_CHARS[h6 >> 12 & 0x0f] + HEX_CHARS[h6 >> 8 & 0x0f] + HEX_CHARS[h6 >> 4 & 0x0f] + HEX_CHARS[h6 & 0x0f];\n hex += HEX_CHARS[h7 >> 28 & 0x0f] + HEX_CHARS[h7 >> 24 & 0x0f] + HEX_CHARS[h7 >> 20 & 0x0f] + HEX_CHARS[h7 >> 16 & 0x0f] + HEX_CHARS[h7 >> 12 & 0x0f] + HEX_CHARS[h7 >> 8 & 0x0f] + HEX_CHARS[h7 >> 4 & 0x0f] + HEX_CHARS[h7 & 0x0f];\n return hex;\n }\n\n toString() {\n return this.hex();\n }\n\n digest() {\n this.finalize();\n const h0 = this.h0,\n h1 = this.h1,\n h2 = this.h2,\n h3 = this.h3,\n h4 = this.h4,\n h5 = this.h5,\n h6 = this.h6,\n h7 = this.h7;\n const arr = [h0 >> 24 & 0xff, h0 >> 16 & 0xff, h0 >> 8 & 0xff, h0 & 0xff, h1 >> 24 & 0xff, h1 >> 16 & 0xff, h1 >> 8 & 0xff, h1 & 0xff, h2 >> 24 & 0xff, h2 >> 16 & 0xff, h2 >> 8 & 0xff, h2 & 0xff, h3 >> 24 & 0xff, h3 >> 16 & 0xff, h3 >> 8 & 0xff, h3 & 0xff, h4 >> 24 & 0xff, h4 >> 16 & 0xff, h4 >> 8 & 0xff, h4 & 0xff, h5 >> 24 & 0xff, h5 >> 16 & 0xff, h5 >> 8 & 0xff, h5 & 0xff, h6 >> 24 & 0xff, h6 >> 16 & 0xff, h6 >> 8 & 0xff, h6 & 0xff];\n arr.push(h7 >> 24 & 0xff, h7 >> 16 & 0xff, h7 >> 8 & 0xff, h7 & 0xff);\n return arr;\n }\n\n array() {\n return this.digest();\n }\n\n arrayBuffer() {\n this.finalize();\n const buffer = new ArrayBuffer(32);\n const dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0);\n dataView.setUint32(4, this.h1);\n dataView.setUint32(8, this.h2);\n dataView.setUint32(12, this.h3);\n dataView.setUint32(16, this.h4);\n dataView.setUint32(20, this.h5);\n dataView.setUint32(24, this.h6);\n dataView.setUint32(28, this.h7);\n return buffer;\n }\n\n}\n\n/**\n * @module wm-feature-flag-client\n */\n/* set polyfills for IE11 support */\n\nsetPolyfills();\n/**\n * Provides core feature flag querying functionality for\n * determining which features are enabled for a specific user.\n * @implements {IFlagFlagClient}\n */\n\nclass FeatureFlagClient {\n /**\n * Creates a new instance of the [FeatureFlagClient] class.\n * @param context The conext object containing the userId and config data\n * @param config Optional. The feature flag config file.\n *\n * @remarks\n * The config file at location context.configUrl will be fetched from AWS S3 unless a config file is provided\n */\n constructor(context, fallbackConfig, quickInit = false) {\n this.config = void 0;\n this.configRefreshIntervalDefault = void 0;\n this.context = void 0;\n this.fallbackConfig = void 0;\n this.featureFlagUserId = void 0;\n this.initialized = void 0;\n this.libraryLanguage = void 0;\n this.storage = void 0;\n this.quickInit = void 0;\n this.globalWarnings = void 0;\n\n this.addStorageWarnings = () => {\n const addStorageWarningsWarnings = [];\n\n if (this.storage.warnings && this.storage.warnings.length > 0) {\n this.storage.warnings.map(warning => {\n addStorageWarningsWarnings.push(warning);\n });\n }\n\n return addStorageWarningsWarnings;\n };\n\n this.targetingPropsToLowerCase = targetingProperties => {\n return Object.entries(targetingProperties).reduce((acc, [key, value]) => {\n let valueLowerCase;\n if (typeof value === 'string') valueLowerCase = value.toLowerCase();\n\n if (Array.isArray(value)) {\n valueLowerCase = value.map(entry => entry.toLowerCase());\n }\n\n acc[key.toLowerCase()] = valueLowerCase;\n return acc;\n }, {});\n };\n\n if (!context) throw new Error('Please provide a context object to the constructor.');\n if (!context.configUrl && !fallbackConfig) throw new Error('Please provide either a config url or a valid config object.');\n this.config = undefined;\n this.configRefreshIntervalDefault = config.minimumPollFrequencySeconds;\n this.context = context;\n this.fallbackConfig = fallbackConfig;\n this.featureFlagUserId = '';\n this.libraryLanguage = config.ffLibraryLanguage;\n this.initialized = false;\n this.quickInit = quickInit;\n const storageType = context && context.storageType ? context.storageType : '';\n this.storage = new FeatureFlagStorage(storageType, context.clientId);\n this.globalWarnings = [];\n }\n /**\n * Creates a hash of the userId and saltKey (using browser'crypto / msCrytpo' api)\n * @param userId The userId used to create the hash\n * @param salt The salt used to create the hash\n * @return {string} hash\n */\n\n\n createHash(userId, salt) {\n const sha256 = new Sha256();\n const hash = sha256.create();\n hash.update(`${userId}${salt}`);\n const hashValue = hash.hex();\n return hashValue;\n }\n /**\n * Creates a user id\n * @return {string} userId\n */\n\n\n createUserId() {\n const userId = generateUUID();\n return userId;\n }\n /**\n * Creates a 2-digit string from the hash to be used as an index for\n * comparing against the rollout percentage of the feature to determine\n * whether the feature is enabled or disabled\n * @param hash\n * @return {string} 2-digit segment of the hash\n */\n\n\n getUserFeatureIndex(hash) {\n const hashSegment = parseInt(hash.substring(0, 10), 16);\n return hashSegment.toString().slice(-2);\n }\n /**\n * Initialization code to ensure that the userId, config and ffLibraryLanguage are set\n * @return {void}\n */\n\n\n async init() {\n const initWarnings = [];\n const {\n config,\n fallbackConfig,\n initialized,\n featureFlagUserId,\n libraryLanguage,\n storage,\n configRefreshIntervalDefault,\n quickInit\n } = this;\n const {\n configUrl,\n userId,\n configRefreshInterval\n } = this.context; // get user-defined refresh interval or use default if none provided\n\n const cfgRefreshInterval = typeof configRefreshInterval !== 'undefined' ? configRefreshInterval : configRefreshIntervalDefault;\n const cacheIsExpired = this.checkConfigCacheExpiry(cfgRefreshInterval); // initialization steps:\n // 1. ensure we have feature flag configuration. first look for config in storage,\n // otherwise fetch it from configUrl location\n\n if (!config || cacheIsExpired) {\n const configFromStorage = storage.get(FEATURE_FLAG_CONFIG);\n\n try {\n if (configFromStorage) this.config = JSON.parse(configFromStorage);\n } catch (error) {\n const warning = {\n code: 'FAILED_TO_READ_CONFIG_FROM_STORAGE',\n message: FAILED_TO_READ_CONFIG_FROM_STORAGE\n };\n initWarnings.push(warning);\n }\n\n if (!configFromStorage || cacheIsExpired) {\n // check if config file has changed before downloading\n // by populating 'If-None-Match' header with value of the previous etag\n // get config file (if it has been updated), save it in storage along with new eTag\n if (configUrl) {\n // set fallback config as default in case remote fetch fails\n if (!cacheIsExpired && fallbackConfig) this.updateConfig(fallbackConfig);\n let prevETag = storage.get(FEATURE_FLAG_CONFIG_ETAG) || '-1'; // if no config in storage, fetch file\n\n prevETag = !configFromStorage ? '-1' : prevETag;\n\n try {\n if (quickInit && fallbackConfig) {\n if (!configFromStorage) this.updateConfig(fallbackConfig);\n this.loadAndSetRemoteConfig(configUrl, prevETag);\n return initWarnings;\n }\n\n if (quickInit && !fallbackConfig) {\n const warning = {\n code: 'REMOTE_CONFIG_USED_NO_FALLBACK_PRESENT',\n message: REMOTE_CONFIG_USED_NO_FALLBACK_PRESENT\n };\n initWarnings.push(warning);\n }\n\n await this.loadAndSetRemoteConfig(configUrl, prevETag);\n } catch (error) {\n // log and continue to use cached file version, or set fallbackConfig if available\n if (configFromStorage || fallbackConfig) {\n this.setNoNewConfigWarning();\n } else {\n throw new Error(`Failed to load config file - no config url or default config provided. ${error}`);\n }\n }\n } else {\n // use fallbackConfig if there is no configUrl\n if (!fallbackConfig) throw new Error('Failed to load config file - no config url or default config provided.');\n this.updateConfig(fallbackConfig);\n }\n }\n } // pass through if instance already initialized\n\n\n if (initialized) return initWarnings; // 2. ensure we have a userId. if it's not in the context object, check storage.\n\n if (!userId) {\n const _userId = storage.get(APP_USER_ID);\n\n if (_userId) this.context.userId = _userId;\n } else {\n storage.set(APP_USER_ID, userId);\n } // 3. ensure we have a featureFlagUserId. if there isn't one in storage, create one.\n\n\n if (!featureFlagUserId) {\n const ffUserId = storage.get(FEATURE_FLAG_USER_ID);\n if (ffUserId) this.featureFlagUserId = ffUserId;\n\n if (!ffUserId) {\n this.featureFlagUserId = this.createUserId();\n storage.set(FEATURE_FLAG_USER_ID, this.featureFlagUserId);\n }\n } // 4. ensure that the ffLibraryLanguage property is set\n\n\n if (!this.context.userTargetingProperties || this.context.userTargetingProperties && !this.context.userTargetingProperties.ffLibraryLanguage) {\n const userTargetingProperties = {\n ffLibraryLanguage: libraryLanguage\n };\n this.updateContext(undefined, userTargetingProperties);\n }\n\n this.initialized = true;\n return initWarnings;\n }\n /**\n * Determine whether the flag config has been cached longer than the desired interval\n * @param interval The maximum time (in ms) to cache the config file before fetching a new copy\n * @return {boolean}\n */\n\n\n checkConfigCacheExpiry(interval) {\n const {\n storage\n } = this;\n const now = new Date();\n let expired = false;\n\n const setIntervalStart = timestamp => storage.set(CONFIG_CACHE_START, timestamp); // check for a timestamp in browser storage\n\n\n const configCacheStartSerialized = storage.get(CONFIG_CACHE_START); // if there's no timestamp in browser storage, create one\n\n if (!configCacheStartSerialized) {\n const _now = new Date();\n\n setIntervalStart(JSON.stringify(_now.getTime()));\n }\n\n const configCacheStart = configCacheStartSerialized ? JSON.parse(configCacheStartSerialized) : now.getTime();\n const cacheTimeElapsed = now.getTime() - configCacheStart; // in ms\n\n expired = cacheTimeElapsed > interval ? true : false;\n\n if (expired === true) {\n const _now2 = new Date();\n\n setIntervalStart(JSON.stringify(_now2.getTime()));\n }\n\n return expired;\n }\n\n async isFeatureEnabled(flagName) {\n return (await this.queryFeatureFlag(flagName)).enabled;\n }\n /**\n * When remote fetch of config file fails (or is unchanged - 304)\n * set warning and appropriate backup config\n * @param interval The maximum time (in ms) to cache the config file before fetching a new copy\n * @return {void}\n */\n\n\n setNoNewConfigWarning() {\n const {\n fallbackConfig,\n storage\n } = this;\n const configFromStorage = storage.get(FEATURE_FLAG_CONFIG); // if there is no new config file version available, handle the 304 error\n // log and continue to use cached file version, or set fallbackConfig if available\n\n if (configFromStorage) {\n const warning = {\n code: 'CACHE_USED',\n message: CACHE_USED\n };\n this.globalWarnings.push(warning);\n } else if (!configFromStorage && fallbackConfig) {\n this.globalWarnings.push({\n code: 'FALLBACK_USED_REMOTE_LOAD_FAILED',\n message: CACHE_USED\n });\n this.updateConfig(fallbackConfig);\n }\n } // Taken directly from the FF Client repo codebase\n\n\n parseHeaders(responseHeaders) {\n const responseHeadersArray = responseHeaders.split('\\r\\n');\n return responseHeadersArray.reduce(function (acc, current) {\n const parts = current.split(': '); // @ts-ignore\n\n acc[parts[0]] = parts[1];\n return acc;\n }, {});\n }\n\n async loadAndSetRemoteConfig(configUrl, prevETag) {\n try {\n const response = await this.loadConfig(configUrl, prevETag);\n\n if (response) {\n this.config = response.data ? response.data : this.config;\n\n if (!response.data) {\n this.globalWarnings.push({\n code: 'FALLBACK_USED_REMOTE_LOAD_FAILED',\n message: FALLBACK_USED_REMOTE_LOAD_FAILED\n });\n }\n\n let eTag = response.headers && response.headers.etag ? response.headers.etag : '';\n\n if (response.headers && typeof response.headers === 'string') {\n const responseHeaders = this.parseHeaders(response.headers);\n eTag = responseHeaders.etag;\n }\n\n if (eTag) this.storage.set(FEATURE_FLAG_CONFIG_ETAG, eTag); // store config to temp storage\n\n this.storage.set(FEATURE_FLAG_CONFIG, JSON.stringify(this.config));\n }\n } catch (err) {\n // remote fetch unsuccessfull, go to cache (or fallback)\n this.globalWarnings.push({\n code: 'FALLBACK_OR_CACHE_USED_REMOTE_LOAD_FAILED',\n message: FALLBACK_OR_CACHE_USED_REMOTE_LOAD_FAILED\n });\n this.setNoNewConfigWarning();\n }\n }\n /**\n * Loads the config file from the configUrl location\n * @param configUrl Uri for the desired feature flag config file\n * @param eTag The value of the etag header from the previous request, default to -1\n */\n\n\n async loadConfig(configUrl, eTag = '-1') {\n let response;\n const url = `${configUrl}?version=${config.ffLibraryVersionCode}`;\n const headers = {\n 'If-None-Match': eTag\n };\n\n try {\n response = await makeRequest({\n url,\n method: 'GET',\n headers\n });\n } catch (error) {\n throw new Error(`Failed to fetch config file: ${error}`);\n }\n\n return response;\n }\n /**\n * Update the config object\n * @param config A feature flag configuration file\n */\n\n\n updateConfig(config) {\n this.config = config;\n this.storage.set(FEATURE_FLAG_CONFIG, JSON.stringify(config));\n }\n /**\n * Update the context object\n * @param userId a string id\n * @param userTargeting an object conatining user cohort targeting criteria\n * @param replaceAllTargeting a boolean the determine where or not to replace all targeting\n */\n\n\n updateContext(userId, userTargeting, replaceAllTargeting) {\n const newContext = { ...this.context\n };\n if (userId) newContext.userId = userId;\n\n if (replaceAllTargeting) {\n newContext.userTargetingProperties = userTargeting;\n } else {\n const mergedTargetingProperties = { ...newContext.userTargetingProperties,\n ...userTargeting\n };\n newContext.userTargetingProperties = mergedTargetingProperties;\n }\n\n this.context = newContext;\n }\n /**\n * Add Storage warnings to FeatureFlagClient.warnings array\n * @param warnings An array of IWarning objects\n */\n\n\n /**\n * Determine which cohort configuration from the feature config file to use\n * @param context The conext object containing the userId and config data\n * @param cohortConfigs cohort configuration objects from the feature config file\n * @return {ICohortConfig}\n */\n getCohortConfig(context, cohortConfigs) {\n // set a defaut cohort config in case no matches found\n const defaultIdType = context.userId ? 'appUserId' : 'ffUserId';\n let cohortConfig = {\n rolloutValue: '-1',\n cohortPriority: 1,\n stickinessProperty: defaultIdType\n }; // sort by 'cohortPriority' property\n\n const cohortConfigsSorted = [...cohortConfigs];\n cohortConfigsSorted.sort((a, b) => a.cohortPriority > b.cohortPriority ? 1 : -1); // transform context keys to lower case for case insensitive matching\n\n const clientTargetingProperties = this.targetingPropsToLowerCase(context.userTargetingProperties); // identify cohort config to use by validating all 'cohortCriteria' fields\n\n const matchedCohortConfig = cohortConfigsSorted.find(cohortConfig => {\n let matchDetected = false; // if there is no userId provider and the stickinessProperty specifies userId - do not match\n\n if (!context.userId && cohortConfig.stickinessProperty === 'appUserId') return false; // if no cohort criteria is present, consider the cohort a match\n\n if (!cohortConfig.cohortCriteria || cohortConfig.cohortCriteria.length < 1) return true;\n const cohortFields = cohortConfig.cohortCriteria; // iterate through cohort criteria\n\n for (let i = 0; i < cohortFields.length; i++) {\n let {\n requiredFieldName\n } = cohortFields[i];\n const {\n requiredFieldValues\n } = cohortFields[i];\n requiredFieldName = requiredFieldName.toLowerCase(); // if at least one cohort field value is present in context object, consider the filed validated\n\n const cohortFieldFoundInContext = requiredFieldValues.some(fieldValue => {\n fieldValue = fieldValue.toLowerCase(); // match if fieldValue is empty string and property is absent in clientTargetingProperties\n // eslint-disable-next-line no-prototype-builtins\n\n if (!clientTargetingProperties.hasOwnProperty(requiredFieldName) && fieldValue === '') return true; // check for both string and array values of the matching property\n\n if (typeof clientTargetingProperties[requiredFieldName] === 'string') return clientTargetingProperties[requiredFieldName] === fieldValue;\n\n if (Array.isArray(clientTargetingProperties[requiredFieldName])) {\n return clientTargetingProperties[requiredFieldName].some(contextValue => contextValue === fieldValue);\n }\n });\n matchDetected = cohortFieldFoundInContext;\n if (!matchDetected) break;\n }\n\n return matchDetected;\n }); // overwrite default cohort config if a matching config was found\n\n if (matchedCohortConfig) cohortConfig = { ...matchedCohortConfig\n };\n return cohortConfig;\n }\n /**\n * set feature flag results into storage\n * @param results Either a single result (object) or an array of results\n * @return {IQueryFeatureResult[]}\n */\n\n\n cacheFlagResults(results) {\n const {\n storage\n } = this;\n let prevResults = [],\n prevResultsReduced = [],\n newResults = []; // populate newResults array from results argument\n\n if (Array.isArray(results)) {\n newResults = results ? [...results] : [];\n } else {\n newResults.push(results);\n } // get cached flag values from storage and deserialize\n\n\n const storedResultsString = storage.get(FEATURE_FLAG_RESULTS);\n const storedResults = storedResultsString ? JSON.parse(storedResultsString) : [];\n prevResults = [...storedResults]; // filter out duplicates from prevResults\n\n if (prevResults.length > 0) {\n prevResultsReduced = prevResults.reduce((accumulator, currentValue) => {\n if (newResults.find(result => result.flagId === currentValue.flagId)) {\n return accumulator;\n } else {\n return [...accumulator, currentValue];\n }\n }, []);\n } // merge previous and new results and set into storage\n\n\n const mergedResults = [...prevResultsReduced, ...newResults];\n storage.set(FEATURE_FLAG_RESULTS, JSON.stringify(mergedResults));\n return mergedResults;\n }\n /**\n * check if the flag's enabled value has changed compared with the cached value\n * @param result The processed new flag to compare\n * @return {boolean}\n */\n\n\n checkIfFlagUpdated(result) {\n const {\n storage\n } = this; // get cached flag values from storage and deserialize\n\n const storedResultsString = storage.get(FEATURE_FLAG_RESULTS);\n const storedResults = storedResultsString ? JSON.parse(storedResultsString) : []; // if no results in storage, return true (ie, flag updated)\n\n if (storedResults.length < 1) return true; // compare values of stored flag and fetched flag\n\n const prevFlag = storedResults.find(prevFlag => prevFlag.flagId === result.flagId);\n if (!prevFlag) return true;\n const hasFlagChanged = prevFlag.enabled !== result.enabled;\n return hasFlagChanged;\n }\n /**\n * Checks whether or not a given feature is enabled for a specific user\n * @param flagId\n * @param isQueryAll is this part of a queryAllFeatureFlags call?\n * @return {IQueryFeatureResult} response object containing feature name, 'enabled' boolean and userId\n */\n\n\n async queryFeatureFlag(flagId, isQueryAll = false) {\n const {\n context,\n fallbackConfig\n } = this;\n let enabled = false,\n flagConfig,\n flagName,\n hashId,\n operationalId,\n userFeatureIndex,\n userIdType = 'appUserId',\n warnings = [];\n\n const mergeWarnings = arrayToMerge => {\n const globalWarnings = isQueryAll ? [] : this.globalWarnings;\n return warnings.concat(arrayToMerge, globalWarnings);\n };\n\n const getFlagConfig = (config, flagId) => {\n return config.flags.find(flag => flag.id === flagId);\n };\n\n const getFallbackConfig = (fallbackConfig, flagId) => {\n flagConfig = getFlagConfig(fallbackConfig, flagId);\n\n if (flagConfig) {\n const addStorageWarningsWarnings = this.addStorageWarnings();\n warnings = mergeWarnings(addStorageWarningsWarnings);\n const result = {\n clientId: context.clientId,\n flagId: flagConfig.id,\n flagName: flagConfig.name ? flagConfig.name : undefined,\n enabled: flagConfig.defaultValue,\n updatedSinceLastQuery: true,\n warnings: warnings\n };\n result.updatedSinceLastQuery = this.checkIfFlagUpdated(result);\n this.cacheFlagResults(result);\n return result;\n }\n };\n\n try {\n const initWwarnings = await this.init();\n warnings = initWwarnings.concat(warnings);\n operationalId = this.context.userId ? this.context.userId : undefined;\n if (!this.config || !this.config.flags) throw new Error('Operation failed - no config file or invalid config file detected.'); // get the feature flag configuration matching the feature name provided\n\n flagConfig = getFlagConfig(this.config, flagId); // if the flag is not found, try again using the fallbackConfig, if available\n\n if (!flagConfig) {\n if (fallbackConfig) {\n const response = getFallbackConfig(fallbackConfig, flagId);\n\n if (response) {\n const warning = {\n code: 'FALLBACK_USED_FLAG_NOT_IN_REMOTE',\n message: FALLBACK_USED_FLAG_NOT_IN_REMOTE\n };\n warnings.push(warning);\n return response;\n }\n } // if there's still no match throw and error\n\n\n throw new Error('Flag not found');\n }\n\n const {\n cohorts,\n defaultValue,\n name,\n type\n } = flagConfig;\n if (type && type.toLowerCase() !== 'boolean' && !isQueryAll) throw new Error('Flag not found'); // if there are no cohorts (ie fallbackConfig) return early\n\n if (!cohorts || cohorts.length < 1) {\n const _addStorageWarningsWarnings = this.addStorageWarnings();\n\n warnings = mergeWarnings(_addStorageWarningsWarnings);\n const _result = {\n clientId: context.clientId,\n flagId: flagConfig.id,\n flagName: name,\n enabled: flagConfig.defaultValue,\n updatedSinceLastQuery: true,\n warnings: warnings\n };\n _result.updatedSinceLastQuery = this.checkIfFlagUpdated(_result);\n this.cacheFlagResults(_result);\n return _result;\n }\n\n flagName = name; // determine the feature's cohort config\n\n const cohortConfig = this.getCohortConfig(context, cohorts);\n let {\n rolloutValue\n } = cohortConfig;\n const {\n stickinessProperty\n } = cohortConfig;\n rolloutValue = rolloutValue || '0'; // create the hash and 'user feature index' (derived from hash)\n\n const saltKey = flagConfig.id;\n hashId = this.context.userId ? this.context.userId : undefined; // use the ffUserId if specified by cohort config\n\n if (stickinessProperty === 'ffUserId') {\n operationalId = this.featureFlagUserId;\n userIdType = 'ffUserId';\n hashId = operationalId;\n }\n\n const hash = hashId ? this.createHash(hashId, saltKey) : undefined;\n userFeatureIndex = hash ? this.getUserFeatureIndex(hash) : '-1';\n enabled = parseInt(userFeatureIndex, 10) < parseInt(rolloutValue, 10); // determine whether or not flag is enabled for the given user\n // attempt to use the defaultValue if either there is no cohort config match or an invalid userFeatureIndex\n\n if (parseInt(rolloutValue, 10) < 0 || parseInt(userFeatureIndex, 10) < 0 || parseInt(userFeatureIndex, 10) > 99) {\n if (typeof defaultValue === 'undefined') {\n // try fallback config\n if (fallbackConfig) {\n const response = getFallbackConfig(fallbackConfig, flagId);\n if (response) return response; // if there's still no match throw and error\n\n throw new Error('Flag not found');\n }\n\n throw new Error('Unable to determine flag default value');\n }\n\n enabled = defaultValue;\n }\n } catch (error) {\n throw new Error(`Failed to query feature flag: ${error}`);\n }\n\n const addStorageWarningsWarnings = this.addStorageWarnings();\n warnings = mergeWarnings(addStorageWarningsWarnings);\n const result = {\n flagId: flagId,\n flagName: flagName,\n enabled: enabled,\n updatedSinceLastQuery: true,\n clientId: context.clientId,\n userId: operationalId,\n userIdType: userIdType,\n warnings: warnings\n };\n result.updatedSinceLastQuery = this.checkIfFlagUpdated(result);\n this.cacheFlagResults(result);\n return result;\n }\n /**\n * Checks availability of all features for a specific user\n * @return {IQueryFeatureResult[]} array of feature flag data objects\n */\n\n\n async queryAllFeatureFlags() {\n var _this = this;\n\n await this.init();\n const {\n config\n } = this;\n if (!config || !config.flags) throw new Error('No config file or invalid config file detected.');\n const featureFlagResponse = {\n anyFlagsUpdatedSinceLastQuery: false,\n globalWarnings: this.globalWarnings,\n results: []\n };\n const promises = config.flags.map(async function (flag) {\n const featureFlagData = await _this.queryFeatureFlag(flag.id, true);\n if (featureFlagData.updatedSinceLastQuery === true) featureFlagResponse.anyFlagsUpdatedSinceLastQuery = true;\n featureFlagResponse.results.push(featureFlagData);\n });\n return Promise.all(promises).then(() => featureFlagResponse);\n }\n\n}\n\nexport { FeatureFlagClient };\n","var IDX=256, HEX=[], BUFFER;\nwhile (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);\n\nexport function v4() {\n\tvar i=0, num, out='';\n\n\tif (!BUFFER || ((IDX + 16) > 256)) {\n\t\tBUFFER = Array(i=256);\n\t\twhile (i--) BUFFER[i] = 256 * Math.random() | 0;\n\t\ti = IDX = 0;\n\t}\n\n\tfor (; i < 16; i++) {\n\t\tnum = BUFFER[IDX + i];\n\t\tif (i==6) out += HEX[num & 15 | 64];\n\t\telse if (i==8) out += HEX[num & 63 | 128];\n\t\telse out += HEX[num];\n\n\t\tif (i & 1 && i > 1 && i < 11) out += '-';\n\t}\n\n\tIDX++;\n\treturn out;\n}\n","export default function(e,n){return n=n||{},new Promise(function(t,r){var s=new XMLHttpRequest,o=[],u=[],i={},a=function(){return{ok:2==(s.status/100|0),statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:a,headers:{keys:function(){return o},entries:function(){return u},get:function(e){return i[e.toLowerCase()]},has:function(e){return e.toLowerCase()in i}}}};for(var l in s.open(n.method||\"get\",e,!0),s.onload=function(){s.getAllResponseHeaders().replace(/^(.*?):[^\\S\\n]*([\\s\\S]*?)$/gm,function(e,n,t){o.push(n=n.toLowerCase()),u.push([n,t]),i[n]=i[n]?i[n]+\",\"+t:t}),t(a())},s.onerror=r,s.withCredentials=\"include\"==n.credentials,n.headers)s.setRequestHeader(l,n.headers[l]);s.send(n.body||null)})}\n//# sourceMappingURL=unfetch.module.js.map\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","'use strict';\n\nvar hop = Object.prototype.hasOwnProperty;\nvar strCharAt = String.prototype.charAt;\nvar toStr = Object.prototype.toString;\n\n/**\n * Returns the character at a given index.\n *\n * @param {string} str\n * @param {number} index\n * @return {string|undefined}\n */\n// TODO: Move to a library\nvar charAt = function(str, index) {\n return strCharAt.call(str, index);\n};\n\n/**\n * hasOwnProperty, wrapped as a function.\n *\n * @name has\n * @api private\n * @param {*} context\n * @param {string|number} prop\n * @return {boolean}\n */\n\n// TODO: Move to a library\nvar has = function has(context, prop) {\n return hop.call(context, prop);\n};\n\n/**\n * Returns true if a value is a string, otherwise false.\n *\n * @name isString\n * @api private\n * @param {*} val\n * @return {boolean}\n */\n\n// TODO: Move to a library\nvar isString = function isString(val) {\n return toStr.call(val) === '[object String]';\n};\n\n/**\n * Returns true if a value is array-like, otherwise false. Array-like means a\n * value is not null, undefined, or a function, and has a numeric `length`\n * property.\n *\n * @name isArrayLike\n * @api private\n * @param {*} val\n * @return {boolean}\n */\n// TODO: Move to a library\nvar isArrayLike = function isArrayLike(val) {\n return val != null && (typeof val !== 'function' && typeof val.length === 'number');\n};\n\n\n/**\n * indexKeys\n *\n * @name indexKeys\n * @api private\n * @param {} target\n * @param {Function} pred\n * @return {Array}\n */\nvar indexKeys = function indexKeys(target, pred) {\n pred = pred || has;\n\n var results = [];\n\n for (var i = 0, len = target.length; i < len; i += 1) {\n if (pred(target, i)) {\n results.push(String(i));\n }\n }\n\n return results;\n};\n\n/**\n * Returns an array of an object's owned keys.\n *\n * @name objectKeys\n * @api private\n * @param {*} target\n * @param {Function} pred Predicate function used to include/exclude values from\n * the resulting array.\n * @return {Array}\n */\nvar objectKeys = function objectKeys(target, pred) {\n pred = pred || has;\n\n var results = [];\n\n for (var key in target) {\n if (pred(target, key)) {\n results.push(String(key));\n }\n }\n\n return results;\n};\n\n/**\n * Creates an array composed of all keys on the input object. Ignores any non-enumerable properties.\n * More permissive than the native `Object.keys` function (non-objects will not throw errors).\n *\n * @name keys\n * @api public\n * @category Object\n * @param {Object} source The value to retrieve keys from.\n * @return {Array} An array containing all the input `source`'s keys.\n * @example\n * keys({ likes: 'avocado', hates: 'pineapple' });\n * //=> ['likes', 'pineapple'];\n *\n * // Ignores non-enumerable properties\n * var hasHiddenKey = { name: 'Tim' };\n * Object.defineProperty(hasHiddenKey, 'hidden', {\n * value: 'i am not enumerable!',\n * enumerable: false\n * })\n * keys(hasHiddenKey);\n * //=> ['name'];\n *\n * // Works on arrays\n * keys(['a', 'b', 'c']);\n * //=> ['0', '1', '2']\n *\n * // Skips unpopulated indices in sparse arrays\n * var arr = [1];\n * arr[4] = 4;\n * keys(arr);\n * //=> ['0', '4']\n */\nvar keys = function keys(source) {\n if (source == null) {\n return [];\n }\n\n // IE6-8 compatibility (string)\n if (isString(source)) {\n return indexKeys(source, charAt);\n }\n\n // IE6-8 compatibility (arguments)\n if (isArrayLike(source)) {\n return indexKeys(source, has);\n }\n\n return objectKeys(source);\n};\n\n/*\n * Exports.\n */\n\nmodule.exports = keys;\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","'use strict';\n\nvar keys = require('@ndhoule/keys');\nvar uuid = require('uuid').v4;\n\nvar inMemoryStore = {\n _data: {},\n length: 0,\n setItem: function(key, value) {\n this._data[key] = value;\n this.length = keys(this._data).length;\n return value;\n },\n getItem: function(key) {\n if (key in this._data) {\n return this._data[key];\n }\n return null;\n },\n removeItem: function(key) {\n if (key in this._data) {\n delete this._data[key];\n }\n this.length = keys(this._data).length;\n return null;\n },\n clear: function() {\n this._data = {};\n this.length = 0;\n },\n key: function(index) {\n return keys(this._data)[index];\n }\n};\n\nfunction isSupportedNatively() {\n try {\n if (!window.localStorage) return false;\n var key = uuid();\n window.localStorage.setItem(key, 'test_value');\n var value = window.localStorage.getItem(key);\n window.localStorage.removeItem(key);\n\n // handle localStorage silently failing\n return value === 'test_value';\n } catch (e) {\n // Can throw if localStorage is disabled\n return false;\n }\n}\n\nfunction pickStorage() {\n if (isSupportedNatively()) {\n return window.localStorage;\n }\n // fall back to in-memory\n return inMemoryStore;\n}\n\n// Return a shared instance\nmodule.exports.defaultEngine = pickStorage();\n// Expose the in-memory store explicitly for testing\nmodule.exports.inMemoryEngine = inMemoryStore;\n","'use strict';\n\n/*\n * Module dependencies.\n */\n\nvar keys = require('@ndhoule/keys');\n\nvar objToString = Object.prototype.toString;\n\n/**\n * Tests if a value is a number.\n *\n * @name isNumber\n * @api private\n * @param {*} val The value to test.\n * @return {boolean} Returns `true` if `val` is a number, otherwise `false`.\n */\n// TODO: Move to library\nvar isNumber = function isNumber(val) {\n var type = typeof val;\n return type === 'number' || (type === 'object' && objToString.call(val) === '[object Number]');\n};\n\n/**\n * Tests if a value is an array.\n *\n * @name isArray\n * @api private\n * @param {*} val The value to test.\n * @return {boolean} Returns `true` if the value is an array, otherwise `false`.\n */\n// TODO: Move to library\nvar isArray = typeof Array.isArray === 'function' ? Array.isArray : function isArray(val) {\n return objToString.call(val) === '[object Array]';\n};\n\n/**\n * Tests if a value is array-like. Array-like means the value is not a function and has a numeric\n * `.length` property.\n *\n * @name isArrayLike\n * @api private\n * @param {*} val\n * @return {boolean}\n */\n// TODO: Move to library\nvar isArrayLike = function isArrayLike(val) {\n return val != null && (isArray(val) || (val !== 'function' && isNumber(val.length)));\n};\n\n/**\n * Internal implementation of `each`. Works on arrays and array-like data structures.\n *\n * @name arrayEach\n * @api private\n * @param {Function(value, key, collection)} iterator The function to invoke per iteration.\n * @param {Array} array The array(-like) structure to iterate over.\n * @return {undefined}\n */\nvar arrayEach = function arrayEach(iterator, array) {\n for (var i = 0; i < array.length; i += 1) {\n // Break iteration early if `iterator` returns `false`\n if (iterator(array[i], i, array) === false) {\n break;\n }\n }\n};\n\n/**\n * Internal implementation of `each`. Works on objects.\n *\n * @name baseEach\n * @api private\n * @param {Function(value, key, collection)} iterator The function to invoke per iteration.\n * @param {Object} object The object to iterate over.\n * @return {undefined}\n */\nvar baseEach = function baseEach(iterator, object) {\n var ks = keys(object);\n\n for (var i = 0; i < ks.length; i += 1) {\n // Break iteration early if `iterator` returns `false`\n if (iterator(object[ks[i]], ks[i], object) === false) {\n break;\n }\n }\n};\n\n/**\n * Iterate over an input collection, invoking an `iterator` function for each element in the\n * collection and passing to it three arguments: `(value, index, collection)`. The `iterator`\n * function can end iteration early by returning `false`.\n *\n * @name each\n * @api public\n * @param {Function(value, key, collection)} iterator The function to invoke per iteration.\n * @param {Array|Object|string} collection The collection to iterate over.\n * @return {undefined} Because `each` is run only for side effects, always returns `undefined`.\n * @example\n * var log = console.log.bind(console);\n *\n * each(log, ['a', 'b', 'c']);\n * //-> 'a', 0, ['a', 'b', 'c']\n * //-> 'b', 1, ['a', 'b', 'c']\n * //-> 'c', 2, ['a', 'b', 'c']\n * //=> undefined\n *\n * each(log, 'tim');\n * //-> 't', 2, 'tim'\n * //-> 'i', 1, 'tim'\n * //-> 'm', 0, 'tim'\n * //=> undefined\n *\n * // Note: Iteration order not guaranteed across environments\n * each(log, { name: 'tim', occupation: 'enchanter' });\n * //-> 'tim', 'name', { name: 'tim', occupation: 'enchanter' }\n * //-> 'enchanter', 'occupation', { name: 'tim', occupation: 'enchanter' }\n * //=> undefined\n */\nvar each = function each(iterator, collection) {\n return (isArrayLike(collection) ? arrayEach : baseEach).call(this, iterator, collection);\n};\n\n/*\n * Exports.\n */\n\nmodule.exports = each;\n","'use strict';\n\nvar defaultEngine = require('./engine').defaultEngine;\nvar inMemoryEngine = require('./engine').inMemoryEngine;\nvar each = require('@ndhoule/each');\nvar keys = require('@ndhoule/keys');\nvar json = JSON;\n\n/**\n* Store Implementation with dedicated\n*/\n\nfunction Store(name, id, keys, optionalEngine) {\n this.id = id;\n this.name = name;\n this.keys = keys || {};\n this.engine = optionalEngine || defaultEngine;\n this.originalEngine = this.engine;\n}\n\n/**\n* Set value by key.\n*/\n\nStore.prototype.set = function(key, value) {\n var compoundKey = this._createValidKey(key);\n if (!compoundKey) return;\n try {\n this.engine.setItem(compoundKey, json.stringify(value));\n } catch (err) {\n if (isQuotaExceeded(err)) {\n // switch to inMemory engine\n this._swapEngine();\n // and save it there\n this.set(key, value);\n }\n }\n};\n\n/**\n* Get by Key.\n*/\n\nStore.prototype.get = function(key) {\n try {\n var str = this.engine.getItem(this._createValidKey(key));\n if (str === null) {\n return null;\n }\n return json.parse(str);\n } catch (err) {\n return null;\n }\n};\n\n/**\n * Get original engine\n */\n\nStore.prototype.getOriginalEngine = function() {\n return this.originalEngine;\n};\n\n/**\n* Remove by Key.\n*/\n\nStore.prototype.remove = function(key) {\n this.engine.removeItem(this._createValidKey(key));\n};\n\n/**\n* Ensure the key is valid\n*/\n\nStore.prototype._createValidKey = function(key) {\n var name = this.name;\n var id = this.id;\n\n if (!keys(this.keys).length) return [name, id, key].join('.');\n\n // validate and return undefined if invalid key\n var compoundKey;\n each(function(value) {\n if (value === key) {\n compoundKey = [name, id, key].join('.');\n }\n }, this.keys);\n return compoundKey;\n};\n\n/**\n* Switch to inMemoryEngine, bringing any existing data with.\n*/\n\nStore.prototype._swapEngine = function() {\n var self = this;\n\n // grab existing data, but only for this page's queue instance, not all\n // better to keep other queues in localstorage to be flushed later\n // than to pull them into memory and remove them from durable storage\n each(function(key) {\n var value = self.get(key);\n inMemoryEngine.setItem([self.name, self.id, key].join('.'), value);\n self.remove(key);\n }, this.keys);\n\n this.engine = inMemoryEngine;\n};\n\nmodule.exports = Store;\n\nfunction isQuotaExceeded(e) {\n var quotaExceeded = false;\n if (e.code) {\n switch (e.code) {\n case 22:\n quotaExceeded = true;\n break;\n case 1014:\n // Firefox\n if (e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {\n quotaExceeded = true;\n }\n break;\n default:\n break;\n }\n } else if (e.number === -2147024882) {\n // Internet Explorer 8\n quotaExceeded = true;\n }\n return quotaExceeded;\n}\n","'use strict';\n\nvar each = require('@ndhoule/each');\n\nvar CLOCK_LATE_FACTOR = 2;\n\nvar defaultClock = {\n setTimeout: function(fn, ms) {\n return window.setTimeout(fn, ms);\n },\n clearTimeout: function(id) {\n return window.clearTimeout(id);\n },\n Date: window.Date\n};\n\nvar clock = defaultClock;\n\nvar modes = {\n ASAP: 1,\n RESCHEDULE: 2,\n ABANDON: 3\n};\n\nfunction Schedule() {\n this.tasks = {};\n this.nextId = 1;\n}\n\nSchedule.prototype.now = function() {\n return +new clock.Date();\n};\n\nSchedule.prototype.run = function(task, timeout, mode) {\n var id = this.nextId++;\n\n this.tasks[id] = clock.setTimeout(this._handle(id, task, timeout, mode || modes.ASAP), timeout);\n return id;\n};\n\nSchedule.prototype.cancel = function(id) {\n if (this.tasks[id]) {\n clock.clearTimeout(this.tasks[id]);\n delete this.tasks[id];\n }\n};\n\nSchedule.prototype.cancelAll = function() {\n each(clock.clearTimeout, this.tasks);\n this.tasks = {};\n};\n\nSchedule.prototype._handle = function(id, callback, timeout, mode) {\n var self = this;\n var start = self.now();\n return function() {\n delete self.tasks[id];\n if (mode >= modes.RESCHEDULE && start + timeout * CLOCK_LATE_FACTOR < self.now()) {\n if (mode === modes.RESCHEDULE) {\n self.run(callback, timeout, mode);\n }\n return;\n }\n return callback();\n };\n};\n\nSchedule.setClock = function(newClock) {\n clock = newClock;\n};\n\nSchedule.resetClock = function() {\n clock = defaultClock;\n};\n\nSchedule.Modes = modes;\n\nmodule.exports = Schedule;\n","\n/**\n * Expose `debug()` as the module.\n */\n\nmodule.exports = debug;\n\n/**\n * Create a debugger with the given `name`.\n *\n * @param {String} name\n * @return {Type}\n * @api public\n */\n\nfunction debug(name) {\n if (!debug.enabled(name)) return function(){};\n\n return function(fmt){\n fmt = coerce(fmt);\n\n var curr = new Date;\n var ms = curr - (debug[name] || curr);\n debug[name] = curr;\n\n fmt = name\n + ' '\n + fmt\n + ' +' + debug.humanize(ms);\n\n // This hackery is required for IE8\n // where `console.log` doesn't have 'apply'\n window.console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n }\n}\n\n/**\n * The currently active debug mode names.\n */\n\ndebug.names = [];\ndebug.skips = [];\n\n/**\n * Enables a debug mode by name. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} name\n * @api public\n */\n\ndebug.enable = function(name) {\n try {\n localStorage.debug = name;\n } catch(e){}\n\n var split = (name || '').split(/[\\s,]+/)\n , len = split.length;\n\n for (var i = 0; i < len; i++) {\n name = split[i].replace('*', '.*?');\n if (name[0] === '-') {\n debug.skips.push(new RegExp('^' + name.substr(1) + '$'));\n }\n else {\n debug.names.push(new RegExp('^' + name + '$'));\n }\n }\n};\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\ndebug.disable = function(){\n debug.enable('');\n};\n\n/**\n * Humanize the given `ms`.\n *\n * @param {Number} m\n * @return {String}\n * @api private\n */\n\ndebug.humanize = function(ms) {\n var sec = 1000\n , min = 60 * 1000\n , hour = 60 * min;\n\n if (ms >= hour) return (ms / hour).toFixed(1) + 'h';\n if (ms >= min) return (ms / min).toFixed(1) + 'm';\n if (ms >= sec) return (ms / sec | 0) + 's';\n return ms + 'ms';\n};\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\ndebug.enabled = function(name) {\n for (var i = 0, len = debug.skips.length; i < len; i++) {\n if (debug.skips[i].test(name)) {\n return false;\n }\n }\n for (var i = 0, len = debug.names.length; i < len; i++) {\n if (debug.names[i].test(name)) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Coerce `val`.\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n\n// persist\n\ntry {\n if (window.localStorage) debug.enable(localStorage.debug);\n} catch(e){}\n","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n\r\n // Remove event specific arrays for event types that no\r\n // one is subscribed for to avoid memory leak.\r\n if (callbacks.length === 0) {\r\n delete this._callbacks['$' + event];\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n\r\n var args = new Array(arguments.length - 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n for (var i = 1; i < arguments.length; i++) {\r\n args[i - 1] = arguments[i];\r\n }\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n","'use strict';\n\nvar uuid = require('@lukeed/uuid').v4;\nvar Store = require('./store');\nvar each = require('@ndhoule/each');\nvar Schedule = require('./schedule');\nvar debug = require('debug')('localstorage-retry');\nvar Emitter = require('component-emitter');\n\n// Some browsers don't support Function.prototype.bind, so just including a simplified version here\nfunction bind(func, obj) {\n return function() {\n return func.apply(obj, arguments);\n };\n}\n\n/**\n * @callback processFunc\n * @param {Mixed} item The item added to the queue to process\n * @param {Function} done A function to call when processing is completed.\n * @param {Error} Optional error parameter if the processing failed\n * @param {Response} Optional response parameter to emit for async handling\n */\n\n/**\n * Constructs a Queue backed by localStorage\n *\n * @constructor\n * @param {String} name The name of the queue. Will be used to find abandoned queues and retry their items\n * @param {Object} [opts] Optional argument to override `maxItems`, `maxAttempts`, `minRetryDelay, `maxRetryDelay`, `backoffFactor` and `backoffJitter`.\n * @param {processFunc} fn The function to call in order to process an item added to the queue\n */\nfunction Queue(name, opts, fn) {\n if (typeof opts === 'function') fn = opts;\n this.name = name;\n this.id = uuid();\n this.fn = fn;\n this.maxItems = opts.maxItems || Infinity;\n this.maxAttempts = opts.maxAttempts || Infinity;\n\n this.backoff = {\n MIN_RETRY_DELAY: opts.minRetryDelay || 1000,\n MAX_RETRY_DELAY: opts.maxRetryDelay || 30000,\n FACTOR: opts.backoffFactor || 2,\n JITTER: opts.backoffJitter || 0\n };\n\n // painstakingly tuned. that's why they're not \"easily\" configurable\n this.timeouts = {\n ACK_TIMER: 1000,\n RECLAIM_TIMER: 3000,\n RECLAIM_TIMEOUT: 10000,\n RECLAIM_WAIT: 500\n };\n\n this.keys = {\n IN_PROGRESS: 'inProgress',\n QUEUE: 'queue',\n RECLAIM_START: 'reclaimStart',\n RECLAIM_END: 'reclaimEnd',\n ACK: 'ack'\n };\n\n this._schedule = new Schedule();\n this._processId = 0;\n\n // Set up our empty queues\n this._store = new Store(this.name, this.id, this.keys);\n this._store.set(this.keys.IN_PROGRESS, {});\n this._store.set(this.keys.QUEUE, []);\n\n // bind recurring tasks for ease of use\n this._ack = bind(this._ack, this);\n this._checkReclaim = bind(this._checkReclaim, this);\n this._processHead = bind(this._processHead, this);\n\n this._running = false;\n}\n\n/**\n * Mix in event emitter\n */\n\nEmitter(Queue.prototype);\n\n/**\n * Starts processing the queue\n */\nQueue.prototype.start = function() {\n if (this._running) {\n this.stop();\n }\n this._running = true;\n this._ack();\n this._checkReclaim();\n this._processHead();\n};\n\n/**\n * Stops processing the queue\n */\nQueue.prototype.stop = function() {\n this._schedule.cancelAll();\n this._running = false;\n};\n\n/**\n * Decides whether to retry. Overridable.\n *\n * @param {Object} item The item being processed\n * @param {Number} attemptNumber The attemptNumber (1 for first retry)\n * @param {Error} error The error from previous attempt, if there was one\n * @return {Boolean} Whether to requeue the message\n */\nQueue.prototype.shouldRetry = function(_, attemptNumber) {\n if (attemptNumber > this.maxAttempts) return false;\n return true;\n};\n\n/**\n * Calculates the delay (in ms) for a retry attempt\n *\n * @param {Number} attemptNumber The attemptNumber (1 for first retry)\n * @return {Number} The delay in milliseconds to wait before attempting a retry\n */\nQueue.prototype.getDelay = function(attemptNumber) {\n var ms = this.backoff.MIN_RETRY_DELAY * Math.pow(this.backoff.FACTOR, attemptNumber);\n if (this.backoff.JITTER) {\n var rand = Math.random();\n var deviation = Math.floor(rand * this.backoff.JITTER * ms);\n if (Math.floor(rand * 10) < 5) {\n ms -= deviation;\n } else {\n ms += deviation;\n }\n }\n return Number(Math.min(ms, this.backoff.MAX_RETRY_DELAY).toPrecision(1));\n};\n\n/**\n * Adds an item to the queue\n *\n * @param {Mixed} item The item to process\n */\nQueue.prototype.addItem = function(item) {\n this._enqueue({\n item: item,\n attemptNumber: 0,\n time: this._schedule.now(),\n id: uuid()\n });\n};\n\n/**\n * Adds an item to the retry queue\n *\n * @param {Mixed} item The item to retry\n * @param {Number} attemptNumber The attempt number (1 for first retry)\n * @param {Error} [error] The error from previous attempt, if there was one\n * @param {String} [id] The id of the queued message used for tracking duplicate entries\n */\nQueue.prototype.requeue = function(item, attemptNumber, error, id) {\n if (this.shouldRetry(item, attemptNumber, error)) {\n this._enqueue({\n item: item,\n attemptNumber: attemptNumber,\n time: this._schedule.now() + this.getDelay(attemptNumber),\n id: id || uuid()\n });\n } else {\n this.emit('discard', item, attemptNumber);\n }\n};\n\nQueue.prototype._enqueue = function(entry) {\n var queue = this._store.get(this.keys.QUEUE) || [];\n queue = queue.slice(-(this.maxItems - 1));\n queue.push(entry);\n queue = queue.sort(function(a,b) {\n return a.time - b.time;\n });\n\n this._store.set(this.keys.QUEUE, queue);\n\n if (this._running) {\n this._processHead();\n }\n};\n\nQueue.prototype._processHead = function() {\n var self = this;\n var store = this._store;\n\n // cancel the scheduled task if it exists\n this._schedule.cancel(this._processId);\n\n // Pop the head off the queue\n var queue = store.get(this.keys.QUEUE) || [];\n var inProgress = store.get(this.keys.IN_PROGRESS) || {};\n var now = this._schedule.now();\n var toRun = [];\n\n function enqueue(el, id) {\n toRun.push({\n item: el.item,\n done: function handle(err, res) {\n var inProgress = store.get(self.keys.IN_PROGRESS) || {};\n delete inProgress[id];\n store.set(self.keys.IN_PROGRESS, inProgress);\n self.emit('processed', err, res, el.item);\n if (err) {\n self.requeue(el.item, el.attemptNumber + 1, err, el.id);\n }\n }\n });\n }\n\n var inProgressSize = Object.keys(inProgress).length;\n\n while (queue.length && queue[0].time <= now && inProgressSize++ < self.maxItems) {\n var el = queue.shift();\n var id = uuid();\n\n // Save this to the in progress map\n inProgress[id] = {\n item: el.item,\n attemptNumber: el.attemptNumber,\n time: self._schedule.now()\n };\n\n enqueue(el, id);\n }\n\n store.set(this.keys.QUEUE, queue);\n store.set(this.keys.IN_PROGRESS, inProgress);\n\n each(function(el) {\n // TODO: handle fn timeout\n try {\n self.fn(el.item, el.done);\n } catch (err) {\n debug('Process function threw error: ' + err);\n }\n }, toRun);\n\n // re-read the queue in case the process function finished immediately or added another item\n queue = store.get(this.keys.QUEUE) || [];\n this._schedule.cancel(this._processId);\n if (queue.length > 0) {\n this._processId = this._schedule.run(this._processHead, queue[0].time - now, Schedule.Modes.ASAP);\n }\n};\n\n// Ack continuously to prevent other tabs from claiming our queue\nQueue.prototype._ack = function() {\n this._store.set(this.keys.ACK, this._schedule.now());\n this._store.set(this.keys.RECLAIM_START, null);\n this._store.set(this.keys.RECLAIM_END, null);\n this._schedule.run(this._ack, this.timeouts.ACK_TIMER, Schedule.Modes.ASAP);\n};\n\nQueue.prototype._checkReclaim = function() {\n var self = this;\n\n function tryReclaim(store) {\n store.set(self.keys.RECLAIM_START, self.id);\n store.set(self.keys.ACK, self._schedule.now());\n\n self._schedule.run(function() {\n if (store.get(self.keys.RECLAIM_START) !== self.id) return;\n store.set(self.keys.RECLAIM_END, self.id);\n\n self._schedule.run(function() {\n if (store.get(self.keys.RECLAIM_END) !== self.id) return;\n if (store.get(self.keys.RECLAIM_START) !== self.id) return;\n self._reclaim(store.id);\n }, self.timeouts.RECLAIM_WAIT, Schedule.Modes.ABANDON);\n }, self.timeouts.RECLAIM_WAIT, Schedule.Modes.ABANDON);\n }\n\n function findOtherQueues(name) {\n var res = [];\n var storage = self._store.getOriginalEngine();\n for (var i = 0; i < storage.length; i++) {\n var k = storage.key(i);\n var parts = k.split('.');\n if (parts.length !== 3) continue;\n if (parts[0] !== name) continue;\n if (parts[2] !== 'ack') continue;\n res.push(new Store(name, parts[1], self.keys));\n }\n return res;\n }\n\n each(function(store) {\n if (store.id === self.id) return;\n if (self._schedule.now() - store.get(self.keys.ACK) < self.timeouts.RECLAIM_TIMEOUT) return;\n tryReclaim(store);\n }, findOtherQueues(this.name));\n\n this._schedule.run(this._checkReclaim, this.timeouts.RECLAIM_TIMER, Schedule.Modes.RESCHEDULE);\n};\n\nQueue.prototype._reclaim = function(id) {\n var self = this;\n var other = new Store(this.name, id, this.keys);\n\n var our = {\n queue: this._store.get(this.keys.QUEUE) || []\n };\n\n var their = {\n inProgress: other.get(this.keys.IN_PROGRESS) || {},\n queue: other.get(this.keys.QUEUE) || []\n };\n\n var trackMessageIds = [];\n\n var addConcatQueue = function(queue, incrementAttemptNumberBy) {\n each(function(el) {\n var id = el.id || uuid();\n if (trackMessageIds.indexOf(id) >= 0) {\n self.emit('duplication', el.item, el.attemptNumber);\n } else {\n our.queue.push({\n item: el.item,\n attemptNumber: el.attemptNumber + incrementAttemptNumberBy,\n time: self._schedule.now(),\n id: id\n });\n trackMessageIds.push(id);\n }\n }, queue);\n };\n\n // add their queue to ours, resetting run-time to immediate and copying the attempt#\n addConcatQueue(their.queue, 0);\n\n // if the queue is abandoned, all the in-progress are failed. retry them immediately and increment the attempt#\n addConcatQueue(their.inProgress, 1);\n\n our.queue = our.queue.sort(function(a,b) {\n return a.time - b.time;\n });\n\n this._store.set(this.keys.QUEUE, our.queue);\n\n // remove all keys\n other.remove(this.keys.IN_PROGRESS);\n other.remove(this.keys.QUEUE);\n other.remove(this.keys.RECLAIM_START);\n other.remove(this.keys.RECLAIM_END);\n other.remove(this.keys.ACK);\n\n // process the new items we claimed\n this._processHead();\n};\n\nmodule.exports = Queue;\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 global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar isRegExp = require('../internals/is-regexp');\nvar getFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar enforceInternalState = require('../internals/internal-state').enforce;\nvar setSpecies = require('../internals/set-species');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\nvar NativeRegExp = global.RegExp;\nvar RegExpPrototype = NativeRegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n\n// \"new\" should create a new object, old webkit bug\nvar CORRECT_NEW = new NativeRegExp(re1) !== re1;\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\n\nvar FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () {\n re2[MATCH] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';\n})));\n\n// `RegExp` constructor\n// https://tc39.es/ecma262/#sec-regexp-constructor\nif (FORCED) {\n var RegExpWrapper = function RegExp(pattern, flags) {\n var thisIsRegExp = this instanceof RegExpWrapper;\n var patternIsRegExp = isRegExp(pattern);\n var flagsAreUndefined = flags === undefined;\n var sticky;\n\n if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {\n return pattern;\n }\n\n if (CORRECT_NEW) {\n if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;\n } else if (pattern instanceof RegExpWrapper) {\n if (flagsAreUndefined) flags = getFlags.call(pattern);\n pattern = pattern.source;\n }\n\n if (UNSUPPORTED_Y) {\n sticky = !!flags && flags.indexOf('y') > -1;\n if (sticky) flags = flags.replace(/y/g, '');\n }\n\n var result = inheritIfRequired(\n CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),\n thisIsRegExp ? this : RegExpPrototype,\n RegExpWrapper\n );\n\n if (UNSUPPORTED_Y && sticky) {\n var state = enforceInternalState(result);\n state.sticky = true;\n }\n\n return result;\n };\n var proxy = function (key) {\n key in RegExpWrapper || defineProperty(RegExpWrapper, key, {\n configurable: true,\n get: function () { return NativeRegExp[key]; },\n set: function (it) { NativeRegExp[key] = it; }\n });\n };\n var keys = getOwnPropertyNames(NativeRegExp);\n var index = 0;\n while (keys.length > index) proxy(keys[index++]);\n RegExpPrototype.constructor = RegExpWrapper;\n RegExpWrapper.prototype = RegExpPrototype;\n redefine(global, 'RegExp', RegExpWrapper);\n}\n\n// https://tc39.es/ecma262/#sec-get-regexp-@@species\nsetSpecies('RegExp');\n","var DESCRIPTORS = require('../internals/descriptors');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.es/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !(NAME in FunctionPrototype)) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\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","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof-raw');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar create = require('../internals/object-create');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\n\n// Opera ~12 has broken Object#toString\nvar BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;\n\n// `ToNumber` abstract operation\n// https://tc39.es/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n var it = toPrimitive(argument, false);\n var first, third, radix, maxCode, digits, length, index, code;\n if (typeof it == 'string' && it.length > 2) {\n it = trim(it);\n first = it.charCodeAt(0);\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n default: return +it;\n }\n digits = it.slice(2);\n length = digits.length;\n for (index = 0; index < length; index++) {\n code = digits.charCodeAt(index);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\n// `Number` constructor\n// https://tc39.es/ecma262/#sec-number-constructor\nif (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n var NumberWrapper = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var dummy = this;\n return dummy instanceof NumberWrapper\n // check on 1..constructor(foo) case\n && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)\n ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);\n };\n for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES2015 (in case, if modules with ES2015 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +\n // ESNext\n 'fromString,range'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {\n defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));\n }\n }\n NumberWrapper.prototype = NumberPrototype;\n NumberPrototype.constructor = NumberWrapper;\n redefine(global, NUMBER, NumberWrapper);\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","var $ = require('../internals/export');\nvar $entries = require('../internals/object-to-array').entries;\n\n// `Object.entries` method\n// https://tc39.es/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n entries: function entries(O) {\n return $entries(O);\n }\n});\n","export const MAX_SESSION_DURATION = 1800000; // 30 minutes in ms\nexport const HEARTBEAT_INTERVAL = 30000; // 30 seconds in ms\nexport const AD_IN_VIEW_PERCENTAGE = 50;\n\nexport const URLS = {\n lightningOrigin: 'https://lightning.warnermediacdn.com',\n iFramePath: {\n DEV: '/cdptest/psmtk/getcdpid.html',\n TEST: '/cdptest/psmtk/getcdpid.html',\n PROD: '/cdp/psmtk/getcdpid.html',\n INTEGRATION: '/cdptest/psmtk/getcdpid.html',\n AUTOMATED_TEST: '/cdptest/psmtk/getcdpid.html',\n },\n thirdPartyCookie: '/cdp/psmtk/start.html',\n carouselScript: '/cdp/psm/assets/swiper/swiper-bundle.min.js',\n carouselStyles: '/cdp/psm/assets/swiper/swiper-bundle.min.css',\n locate: 'https://geo.ngtv.io/locate',\n featureFlag: {\n DEV: 'https://wmff.warnermediacdn.com/psm_2_dev_full.json',\n TEST: 'https://wmff.warnermediacdn.com/psm_2_qa_full.json',\n PROD: 'https://wmff.warnermediacdn.com/psm_2_prod_full.json',\n INTEGRATION: 'https://wmff.warnermediacdn.com/psm_2_brand_integration_full.json',\n AUTOMATED_TEST: 'https://wmff.warnermediacdn.com/psm_2_automated_test_full.json',\n },\n identity: {\n DEV: 'https://dev.receive.wmcdp.io/v1/reg',\n TEST: 'https://test.receive.wmcdp.io/v1/reg',\n PROD: 'https://receive.wmcdp.io/v1/reg',\n INTEGRATION: 'https://test.receive.wmcdp.io/v1/reg',\n AUTOMATED_TEST: 'https://test.receive.wmcdp.io/v1/reg',\n },\n inbrain: {\n DEV: 'https://dev.inbrain.wmcdp.io/v1/render',\n TEST: 'https://test.inbrain.wmcdp.io/v1/render',\n PROD: 'https://inbrain.wmcdp.io/v1/render',\n INTEGRATION: 'https://test.inbrain.wmcdp.io/v1/render',\n AUTOMATED_TEST: 'https://test.inbrain.wmcdp.io/v1/render',\n },\n idresolve: {\n DEV: 'https://dev.psm.wmcdp.io/v1/resolve',\n TEST: 'https://test.psm.wmcdp.io/v1/resolve',\n PROD: 'https://psm.wmcdp.io/v1/resolve',\n INTEGRATION: 'https://integration.psm.wmcdp.io/v1/resolve',\n AUTOMATED_TEST: 'https://test.psm.wmcdp.io/v1/resolve',\n },\n logs: {\n DEV: 'https://dev.receive.wmcdp.io/v1/reg',\n TEST: 'https://test.receive.wmcdp.io/v1/reg',\n PROD: 'https://receive.wmcdp.io/v1/reg',\n INTEGRATION: 'https://test.receive.wmcdp.io/v1/reg',\n AUTOMATED_TEST: 'https://test.receive.wmcdp.io/v1/reg',\n },\n authSvc: {\n DEV: 'https://dev.token.wmcdp.io/v1/token',\n TEST: 'https://test.token.wmcdp.io/v1/token',\n PROD: 'https://token.wmcdp.io/v1/token',\n INTEGRATION: 'https://test.token.wmcdp.io/v1/token',\n AUTOMATED_TEST: 'https://test.token.wmcdp.io/v1/token',\n },\n};\n\nexport const CCPA_LOCATIONS = ['US', 'PR', 'VI', 'UM', ''];\n\n// Local FF config for FFClient quick init\nexport const featureFlagLocalConfig = {\n featureFlagLibraryVersion: '0.1',\n flags: [\n {\n defaultValue: true,\n id: 'doppler-identity-onstart',\n cohorts: [],\n name: 'FALLBACK_doppler-identity-onstart',\n type: 'boolean',\n },\n {\n defaultValue: true,\n id: 'doppler-identity-oncomplete',\n cohorts: [],\n name: 'FALLBACK_doppler-identity-oncomplete',\n type: 'boolean',\n },\n {\n defaultValue: true,\n id: 'doppler-session',\n cohorts: [],\n name: 'FALLBACK_doppler-session',\n type: 'boolean',\n },\n {\n defaultValue: true,\n id: 'doppler-privacy',\n cohorts: [],\n name: 'FALLBACK_doppler-privacy',\n type: 'boolean',\n },\n {\n defaultValue: true,\n id: 'doppler-telemetry',\n cohorts: [],\n name: 'FALLBACK_doppler-telemetry',\n type: 'boolean',\n },\n {\n defaultValue: true,\n id: 'doppler-consent-update',\n cohorts: [],\n name: 'FALLBACK_doppler-consent-update',\n type: 'boolean',\n },\n {\n defaultValue: false,\n id: 'doppler-heartbeat-event',\n cohorts: [],\n name: 'FALLBACK_doppler-heartbeat-event',\n type: 'boolean',\n },\n {\n defaultValue: false,\n id: 'doppler-pubsub-event',\n cohorts: [],\n name: 'FALLBACK_doppler-pubsub-event',\n type: 'boolean',\n },\n {\n defaultValue: true,\n id: 'doppler-send-logs',\n cohorts: [],\n name: 'FALLBACK_doppler-send-logs',\n type: 'boolean',\n },\n {\n defaultValue: false,\n id: 'doppler-send-token-event',\n cohorts: [],\n name: 'FALLBACK_doppler-send-token-event',\n type: 'boolean',\n },\n {\n defaultValue: false,\n id: 'outside-us-location-check',\n cohorts: [],\n name: 'FALLBACK_outside_us_location_check',\n type: 'boolean',\n },\n {\n defaultValue: false,\n id: 'idresolve',\n cohorts: [],\n name: 'FALLBACK_idresolve',\n type: 'boolean',\n },\n {\n defaultValue: false,\n id: 'sendAuthToken',\n cohorts: [],\n name: 'FALLBACK_sendAuthToken',\n type: 'boolean',\n },\n {\n defaultValue: false,\n id: 'sendHHID',\n cohorts: [],\n name: 'FALLBACK_sendHHID',\n type: 'boolean',\n },\n {\n defaultValue: false,\n id: 'inbrain',\n cohorts: [],\n name: 'FALLBACK_inbrain',\n type: 'boolean',\n },\n {\n defaultValue: false,\n id: 'auth-service',\n cohorts: [],\n name: 'FALLBACK_auth-service',\n type: 'boolean',\n },\n {\n defaultValue: false,\n id: 'isInAuthTokenExperiment',\n cohorts: [],\n name: 'FALLBACK_isInAuthTokenExperiment',\n type: 'boolean',\n },\n {\n defaultValue: false,\n id: 'isInHHIDExperiment',\n cohorts: [],\n name: 'FALLBACK_isInHHIDExperiment',\n type: 'boolean',\n },\n {\n defaultValue: false,\n id: 'sendWMSegs',\n cohorts: [],\n name: 'FALLBACK_sendWMSegs',\n type: 'boolean',\n },\n {\n defaultValue: false,\n id: 'inBrainTemplateBeta',\n cohorts: [],\n name: 'FALLBACK_inBrainTemplateBeta',\n type: 'boolean',\n },\n {\n defaultValue: false,\n id: 'inBrainRecommendationsBeta',\n cohorts: [],\n name: 'FALLBACK_inBrainRecommendationsBeta',\n type: 'boolean',\n },\n ],\n};\n\n// Default flag values in case there's an issue with the FF client\nexport const featureFlagDefaults = {\n 'auth-service': false,\n 'doppler-identity-onstart': true,\n 'doppler-identity-oncomplete': true,\n 'doppler-session': true,\n 'doppler-privacy': true,\n 'doppler-telemetry': true,\n 'doppler-consent-update': true,\n 'doppler-heartbeat-event': false,\n 'doppler-pubsub-event': false,\n 'outside-us-location-check': false,\n 'doppler-send-logs': true,\n 'doppler-send-token-event': false,\n idresolve: false,\n sendAuthToken: false,\n sendHHID: false,\n inbrain: false,\n isInAuthTokenExperiment: false,\n isInHHIDExperiment: false,\n sendWMSegs: false,\n inBrainTemplateBeta: false,\n inBrainRecommendationsBeta: false,\n // for unit tests\n 'test-enabled': true,\n 'test-disabled': false,\n};\n\nexport const queueOptions = {\n minRetryDelay: 30000,\n maxRetryDelay: 120000,\n maxItems: 5,\n maxAttempts: 10,\n backoffFactor: 2,\n backoffJitter: 0,\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { cookie } from '@turnercode/cdp-cookie';\nimport { CCPA_LOCATIONS } from './utils/constants';\nimport { USPrivacyString } from './USPrivacyString';\n\nexport type USPData = {\n version: number;\n uspString?: string;\n uspapiLoaded?: boolean;\n};\n\nexport type USPAPICall = {\n __uspapiCall?: {\n command: string;\n parameter: any;\n version: number;\n callId: string;\n };\n};\n\nexport type USPAPIReturn = {\n __uspapiReturn?: {\n returnValue: string;\n success: boolean;\n callId: string;\n };\n};\n\nexport type TCData = {\n // base64url-encoded TC string with segments\n tcString: string;\n // 1.1 or 2\n tcfPolicyVersion: number;\n cmpId: number;\n cmpVersion: number;\n /**\n * true - GDPR Applies\n * false - GDPR Does not apply\n * undefined - unknown whether GDPR Applies\n */\n gdprApplies: boolean | undefined;\n\n /*\n * see addEventListener command\n */\n eventStatus: string;\n\n /**\n * see Ping Status Codes in following table\n */\n cmpStatus: string;\n\n /**\n * If this TCData is sent to the callback of addEventListener: number,\n * the unique ID assigned by the CMP to the listener function registered\n * via addEventListener.\n * Others: undefined.\n */\n listenerId: number | undefined;\n\n /*\n * true - if using a service-specific or publisher-specific TC String\n * false - if using a global TC String.\n */\n isServiceSpecific: boolean;\n\n /**\n * true - CMP is using publisher-customized stack descriptions\n * false - CMP is NOT using publisher-customized stack descriptions\n */\n useNonStandardStacks: boolean;\n\n /**\n * Country code of the country that determines the legislation of\n * reference. Normally corresponds to the country code of the country\n * in which the publisher's business entity is established.\n * Format is a two-letter ISO 3166-1 alpha-2 country code.\n */\n publisherCC: string;\n\n /**\n * Only exists on service-specific TC\n *\n * true - Purpose 1 not disclosed at all. CMPs use PublisherCC to\n * indicate the publisher's country of establishment to help Vendors\n * determine whether the vendor requires Purpose 1 consent.\n *\n * false - There is no special Purpose 1 treatment status. Purpose 1 was\n * disclosed normally (consent) as expected by TCF Policy\n */\n purposeOneTreatment: boolean;\n\n /**\n * Only exists on global-scope TC\n */\n outOfBand: {\n allowedVendors: {\n /**\n * true - Vendor is allowed to use an Out-of-Band Legal Basis\n * false | undefined - Vendor is NOT allowed to use an Out-of-Band Legal Basis\n */\n '[vendor id]': boolean | undefined;\n };\n disclosedVendors: {\n /**\n * true - Vendor has been disclosed to the user\n * false | undefined - Vendor has been disclosed to the user\n */\n '[vendor id]': boolean | undefined;\n };\n };\n purpose: {\n consents: {\n /**\n * true - Consent\n * false | undefined - No Consent.\n */\n '[purpose id]': boolean | undefined;\n };\n legitimateInterests: {\n /**\n * true - Legitimate Interest Established\n * false | undefined - No Legitimate Interest Established\n */\n '[purpose id]': boolean | undefined;\n };\n };\n vendor: {\n consents: {\n /**\n * true - Consent\n * false | undefined - No Consent\n */\n '[vendor id]': boolean | undefined;\n };\n legitimateInterests: {\n /**\n * true - Legitimate Interest Established\n * false | undefined - No Legitimate Interest Established\n */\n '[vendor id]': boolean | undefined;\n };\n };\n specialFeatureOptins: {\n /**\n * true - Special Feature Opted Into\n * false | undefined - Special Feature NOT Opted Into\n */\n '[special feature id]': boolean | undefined;\n };\n publisher: {\n consents: {\n /**\n * true - Consent\n * false | undefined - No Consent\n */\n '[purpose id]': boolean | undefined;\n };\n legitimateInterests: {\n /**\n * true - Legitimate Interest Established\n * false | undefined - No Legitimate Interest Established\n */\n '[purpose id]': boolean | undefined;\n };\n customPurpose: {\n consents: {\n /**\n * true - Consent\n * false | undefined - No Consent\n */\n '[purpose id]': boolean | undefined;\n };\n legitimateInterests: {\n /**\n * true - Legitimate Interest Established\n * false | undefined - No Legitimate Interest Established\n */\n '[purpose id]': boolean | undefined;\n };\n };\n restrictions: {\n '[purpose id]': {\n /**\n * 0 - Not Allowed\n * 1 - Require Consent\n * 2 - Require Legitimate Interest\n */\n '[vendor id]': number;\n };\n };\n };\n};\n\nexport interface USPAPI {\n __uspapi(command: string, version: number, callback: (...args: any) => void, parameter?: any): void;\n\n __uspapi(command: 'getUSPData', version: 1, callback: (uspData: USPData, success: boolean) => void): void;\n\n __uspapi(command: 'ping', version: 1, callback: (uspData: USPData, success: boolean) => void): void;\n}\n\nexport type WindowWithUSPAPI = Window & USPAPI;\n\nconst win = window as any;\n\nexport const uspString = new USPrivacyString();\n\n/**\n * Internal function to find a frame, if it exists\n *\n * @param {string} locator - Locator string to use to find frame\n * @returns {object} - Child frame object if found, else null\n */\nexport function findFrame(locator: string): HTMLElement | HTMLIFrameElement {\n let cmpFrame = null;\n let w: Window;\n\n for (w = win; w; w = w.parent) {\n try {\n if (w.frames && w.frames[locator]) {\n cmpFrame = w;\n break;\n }\n } catch (e) {\n throw new Error(e);\n }\n if (w === win.top) {\n break;\n }\n }\n return cmpFrame;\n}\n\nfunction createIabStub(locatorName: string): void {\n const addFrame = (): boolean => {\n if (!win.frames[locatorName]) {\n if (document.body) {\n const iframe = document.createElement('iframe');\n\n iframe.style.cssText = 'display:none';\n iframe.name = locatorName;\n document.body.appendChild(iframe);\n } else {\n setTimeout(addFrame, 5);\n }\n return true;\n }\n return false;\n };\n\n const uspMsgHandler = (event: MessageEvent) => {\n try {\n const msgIsString = typeof event.data === 'string';\n let i: USPAPICall['__uspapiCall'];\n let json: USPAPICall;\n\n try {\n json = msgIsString ? JSON.parse(event.data) : event.data;\n } catch (e) {\n json = {};\n }\n if (typeof json === 'object' && json !== null && '__uspapiCall' in json) {\n i = json.__uspapiCall;\n win.__uspapi(\n i.command,\n i.version,\n function (retValue: string, success: boolean) {\n const returnMsg: USPAPIReturn = {};\n\n returnMsg.__uspapiReturn = {\n returnValue: retValue,\n success,\n callId: i.callId,\n };\n\n if (event.source instanceof Window) {\n event.source.postMessage(msgIsString ? JSON.stringify(returnMsg) : returnMsg, '*');\n }\n },\n i.parameter\n );\n }\n } catch (e) {\n // TODO - log error ... errorLogger('Privacy', '_uspMsgHandler', e);\n }\n };\n\n const usingUspFrame = findFrame('__uspapiLocator');\n\n /* CCPA IAB handler must always be defined, even in GDPR regions... */\n if (usingUspFrame === null) {\n /* But only for the top frame */\n addFrame();\n win.__uspapi['msgHandler'] = uspMsgHandler;\n win.addEventListener('message', win.__uspapi['msgHandler'], false);\n }\n}\n\nexport function initPrivacy(enabled = true, countryCode: string) {\n const api = {\n isPrivacyEnabled(): boolean {\n return enabled;\n },\n getUSPString(): string {\n return uspString.getUSPrivacyString();\n },\n getUSPData(): USPData {\n return {\n version: uspString.getVersion(),\n uspString: uspString.getUSPrivacyString(),\n };\n },\n setUSPString(str: string): boolean {\n return uspString.setUSPrivacyString(str);\n },\n ccpaShareData(): string {\n if (CCPA_LOCATIONS.includes(countryCode)) {\n uspString.setUSPrivacyString('1YNN');\n }\n return uspString.getUSPrivacyString();\n },\n ccpaDoNotShare(): string {\n if (CCPA_LOCATIONS.includes(countryCode)) {\n uspString.setUSPrivacyString('1YYN');\n }\n return uspString.getUSPrivacyString();\n },\n };\n\n win.WM = win.WM || {};\n win.WM.CDP = win.WM.CDP || {};\n\n if (enabled) {\n win.__uspapi = function __uspapi(\n command: string,\n version: number,\n callback: (uspData: USPData, success: boolean) => void\n ): void {\n if (command === 'getUSPData' && Number(version) === 1) {\n callback({ version, uspString: uspString.getUSPrivacyString() }, true);\n } else if (command === 'ccpaDoNotShare') {\n callback({ version, uspString: api.ccpaDoNotShare() }, true);\n } else if (command === 'ccpaShareData') {\n callback({ version, uspString: api.ccpaShareData() }, true);\n } else if (command === 'ping') {\n callback({ version, uspapiLoaded: true }, true);\n } else {\n callback(null, false);\n }\n };\n createIabStub('__uspapiLocator');\n\n const str = cookie.get('usprivacy') as string;\n\n if (str) {\n uspString.setUSPrivacyString(str);\n } else if (CCPA_LOCATIONS.includes(countryCode)) {\n uspString.setUSPrivacyString('1YNN');\n } else {\n uspString.setUSPrivacyString('1---');\n }\n\n Object.assign(win.WM.CDP, api);\n }\n\n return api;\n}\n\nexport function checkOutsideUS(\n categories: Record = {}\n): Promise<{ shouldLoad: boolean; categories: Record[] }> {\n return new Promise((resolve) => {\n if (typeof win.__tcfapi !== 'function') {\n resolve({\n shouldLoad: false,\n categories: [],\n });\n }\n\n const defaultCategories = {\n '1': 'data-store',\n '3': 'ads-person-prof',\n '5': 'content-person-prof',\n '6': 'consent-person',\n '8': 'measure-content',\n '9': 'measure-market',\n '10': 'product-develop',\n ...categories,\n };\n\n win.__tcfapi('getTCData', 2, (tcData: TCData, success: boolean) => {\n if (success && 'purpose' in tcData && 'legitimateInterests' in tcData.purpose) {\n const combined = { ...tcData.purpose.legitimateInterests, ...tcData.purpose.consents };\n const result: Record[] = [];\n let shouldLoad = true;\n\n Object.entries(defaultCategories).forEach(([id, name]) => {\n if (combined[id]) {\n result.push({ [name]: combined[id] });\n } else {\n result.push({ [name]: false });\n shouldLoad = false;\n }\n });\n\n resolve({\n shouldLoad,\n categories: result.concat([\n { 'special-purpose-1': true },\n { 'special-purpose-2': true },\n { 'feature-1': true },\n { 'feature-2': true },\n { 'feature-3': true },\n ]),\n });\n }\n resolve({\n shouldLoad: false,\n categories: [],\n });\n });\n });\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nconst win = window as any;\nconst nav = navigator as any;\nconst doc = document as any;\n\n/**\n * `navigator.cookieEnabled` cannot detect custom or nuanced cookie-blocking configurations.\n * For example, when blocking cookies via the Advanced Privacy Settings in IE, it always returns true.\n * There can be issues with site-specific exceptions.\n *\n * @see https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cookies.js Taken from here\n */\nexport function cookiesEnabled(): boolean {\n // try..catch because some in situations `document.cookie` is exposed but throws a\n // SecurityError if you try to access it; e.g. documents created from data URIs\n // or in sandboxed iframes (depending on flags/context)\n try {\n // Create test cookie\n doc.cookie = 'cookietest=1; SameSite=Strict;';\n const result = doc.cookie.indexOf('cookietest=') !== 1;\n // Delete test cookie\n doc.cookie = 'cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT';\n return result;\n } catch (err) {\n return false;\n }\n}\n\n/**\n * Checks that localStorage is available, accounting for\n * a `SecurityError` being thrown in Firefox if \"always ask\" is enabled\n * for cookies.\n */\nexport function hasLocalStorage(): boolean {\n try {\n return !!win.localStorage;\n } catch (err) {\n return true;\n }\n}\n\n/**\n * Checks that localStorage is accessible, accounting for private mode in some\n * browsers.\n */\nexport function localStorageAccessible(): boolean {\n const test = '__psm_test__';\n\n if (!hasLocalStorage()) {\n return false;\n }\n try {\n win.localStorage.setItem(test, test);\n win.localStorage.removeItem(test);\n return true;\n } catch (err) {\n return false;\n }\n}\n\n/**\n * Gets the current viewport.\n *\n * Code based on:\n * - http://andylangton.co.uk/articles/javascript/get-viewport-size-javascript/\n * - http://responsejs.com/labs/dimensions/\n */\nexport function detectViewport(): string {\n let alias: Window | HTMLElement = win;\n let modifier = 'inner';\n\n if (!('innerWidth' in win)) {\n modifier = 'client';\n alias = document.documentElement || document.body;\n }\n\n const width = alias[modifier + 'Width'];\n const height = alias[modifier + 'Height'];\n\n if (width >= 0 && height >= 0) {\n return width + 'x' + height;\n } else {\n return null;\n }\n}\n\n/**\n * Gets the total width and height of the current document\n */\nexport function detectDocumentSize(): number[] {\n const de = document.documentElement;\n const be = document.body;\n const bh = be ? Math.max(be.offsetHeight, be.scrollHeight) : 0;\n const w = Math.max(de.clientWidth, de.offsetWidth, de.scrollWidth);\n const h = Math.max(de.clientHeight, de.offsetHeight, de.scrollHeight, bh);\n\n return isNaN(w) || isNaN(h) ? [0, 0] : [w, h];\n}\n\nexport function getScreenResolution(): string {\n return win.screen.width + 'x' + win.screen.height;\n}\n\n/**\n * Extract hostname from URL\n */\nexport function getHostname(url: string): string {\n const matches = new RegExp('^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)').exec(url);\n\n return matches ? matches[1] : url;\n}\n\n/**\n * Get page referrer. In the case of a single-page app,\n * if the URL changes without the page reloading, pass\n * in the old URL. It will be returned unless overriden\n * by a \"refer(r)er\" parameter in the querystring.\n *\n * @param string oldLocation Optional.\n * @return string The referrer\n */\nexport function getReferrer(oldLocation?: string): string {\n let referrer = '';\n\n if (oldLocation) {\n return oldLocation;\n }\n\n try {\n referrer = win.top.document.referrer;\n } catch (err) {\n if (win.parent) {\n try {\n referrer = win.parent.document.referrer;\n } catch (err) {\n referrer = '';\n }\n }\n }\n\n if (referrer === '') {\n referrer = document.referrer;\n }\n\n return referrer;\n}\n\n/**\n * Throttles a function, i.e. do not allow the function to be invoked more than\n * once every X milliseconds.\n *\n * @param callback The function to throttle\n * @param wait The amount of time in milliseconds by which to throttle\n */\nexport function throttle(callback: (..._: T) => void, wait: number): (..._: T) => void {\n let queuedToRun: NodeJS.Timeout | undefined;\n let previouslyRun: number;\n\n return function invokeFn(...args: T) {\n const now = Date.now();\n queuedToRun = clearTimeout(queuedToRun) as undefined;\n if (!previouslyRun || now - previouslyRun >= wait) {\n callback(...args);\n previouslyRun = now;\n } else {\n queuedToRun = setTimeout(invokeFn.bind(null, ...args), wait - (now - previouslyRun));\n }\n };\n}\n\n/**\n * Checks that a DOM element is not hidden by another element with a higher z-index\n * using document.getElementFromPoint(). To be safe, the center of the expected element is used\n * to account for border radius.\n */\nexport function isElementVisible(el: Element) {\n const rect = el.getBoundingClientRect();\n\n return el.contains(doc.elementFromPoint(rect.right - rect.width / 2, rect.bottom - rect.height / 2));\n}\n\n/**\n * Determines the current browser\n */\nexport function setBrowser(): string {\n const userAgent = navigator.userAgent;\n\n const isSafari =\n userAgent.indexOf('Safari') > -1 &&\n userAgent.indexOf('Chrome') === -1 &&\n userAgent.indexOf('Chromium') === -1 &&\n userAgent.indexOf('CriOS') === -1 &&\n userAgent.indexOf('EdgiOS') === -1 &&\n userAgent.indexOf('FxiOS') === -1;\n\n const isFirefox =\n (userAgent.indexOf('Firefox') > -1 || userAgent.indexOf('FxiOS') > -1) && userAgent.indexOf('Seamonkey') === -1;\n\n const isChrome =\n (userAgent.indexOf('Chrome') > -1 || userAgent.indexOf('CriOS') > -1) &&\n userAgent.indexOf('Chromium') === -1 &&\n userAgent.indexOf('Edg') === -1 &&\n userAgent.indexOf('OPR') === -1;\n\n const isEdge = userAgent.indexOf('Edg') > -1;\n\n switch (true) {\n case isSafari:\n return 'safari';\n case isFirefox:\n return 'firefox';\n case isChrome:\n return 'chrome';\n case isEdge:\n return 'edge';\n default:\n return 'unknown';\n }\n}\n\n/**\n * Return a value from a name-value pair in a query string\n */\nexport function fromQueryString(field: string, url: string) {\n const match = new RegExp('^[^#]*[?&]' + field + '=([^&#]*)').exec(url);\n if (!match) {\n return null;\n }\n return decodeURIComponent(match[1].replace(/\\+/g, ' '));\n}\n\n/**\n * Add name-value pair to the query string of a URL\n */\nexport function updateQueryString(url: string, name: string, value: string) {\n const initialQsParams = name + '=' + value;\n const hashSplit = url.split('#');\n const qsSplit = hashSplit[0].split('?');\n const beforeQuerystring = qsSplit.shift();\n // Necessary because a querystring may contain multiple question marks\n let querystring = qsSplit.join('?');\n if (!querystring) {\n querystring = initialQsParams;\n } else {\n // Whether this is the first time the link has been decorated\n let initialDecoration = true;\n const qsFields = querystring.split('&');\n for (let i = 0; i < qsFields.length; i++) {\n if (qsFields[i].substr(0, name.length + 1) === name + '=') {\n initialDecoration = false;\n qsFields[i] = initialQsParams;\n querystring = qsFields.join('&');\n break;\n }\n }\n if (initialDecoration) {\n querystring = initialQsParams + '&' + querystring;\n }\n }\n hashSplit[0] = beforeQuerystring + '?' + querystring;\n return hashSplit.join('#');\n}\n","export type RequestOptions = {\n method?: string;\n headers?: Record;\n body?: Parameters[0];\n};\n\ninterface RequestErrorOptions {\n request: XMLHttpRequest;\n url: string;\n opts: RequestOptions;\n}\n\nexport class SendRequestError extends Error {\n context: {\n url: string;\n code: number;\n headers: Record;\n method: string;\n };\n\n constructor(options: RequestErrorOptions) {\n const { request, url, opts } = options;\n const message = request.responseText ? request.responseText : 'network failure';\n\n super(message);\n // this.name = 'SendRequestError';\n this.context = {\n url: url,\n code: request.status,\n headers: opts.headers,\n method: opts.method,\n };\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function sendRequest(url: string, options: RequestOptions = {}): Promise {\n return new Promise((resolve, reject) => {\n const request = new XMLHttpRequest();\n\n request.open(options.method || 'get', url);\n request.onload = () => {\n if (((request.status / 100) | 0) == 2) {\n try {\n // GET requests will return a parseable response\n resolve(JSON.parse(request.responseText));\n } catch (err) {\n // POST requests to Doppler do not include a response, or return an error string\n resolve(request.responseText);\n }\n } else {\n // Non 200 status codes\n reject(new SendRequestError({ request, url, opts: options }));\n }\n };\n request.onerror = () => {\n reject(new SendRequestError({ request, url, opts: options }));\n };\n\n for (const i in options.headers) {\n request.setRequestHeader(i, options.headers[i]);\n }\n\n request.send(options.body || null);\n });\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { IQueryFeatureResult } from '@turnercode/feature-flag-client';\nimport Queue from '@segment/localstorage-retry';\nimport { URLS, queueOptions } from './constants';\nimport { hasLocalStorage } from './browser';\nimport { sendRequest, SendRequestError } from './sendRequest';\nimport { Psm } from '../Psm';\nimport pkg from '../../package.json';\n\nconst win = window;\nlet logger: Queue;\nlet environment: string;\nlet values: Psm;\n\nexport interface LogOptions {\n flgs?: IQueryFeatureResult[];\n err?: Error | SendRequestError;\n methodName: string;\n eventType: string;\n wmukid?: string;\n context?: object;\n message?: string;\n}\n\nexport function createLogger(psm: Psm) {\n environment = psm.config.psmEnvironment ? psm.config.psmEnvironment.toUpperCase() : 'PROD';\n values = psm;\n\n logger = new Queue('logger', queueOptions, (item: any, done: any) => {\n if (/bot|crawl|spider/i.test(win.navigator.userAgent)) {\n return done(null, {});\n }\n item.ts = new Date().toISOString();\n sendRequest(URLS.logs[environment], {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(item),\n })\n .then((res) => done(null, res))\n .catch((err) => done(err));\n });\n\n logger.start();\n}\n\n/**\n * Not intended to be called directly. Only to be invoked by debug(), warn(), and error()\n * and only exported for testing purposes.\n */\nexport function log(options: LogOptions, level: string) {\n let message: string;\n let stack: string;\n let additionalContext: object;\n\n if (options.err) {\n message = options.err.toString();\n stack = options.err.stack;\n additionalContext = options.err['context'] || {};\n } else {\n message = options.message;\n additionalContext = options.context;\n }\n\n const item = {\n brand: values.config.brand,\n device: {\n type: win.navigator.platform,\n userAgent: win.navigator.userAgent,\n },\n eventName: level,\n eventProperties: {\n logMessage: message,\n method: options.methodName,\n featureFlagValues: values.getFlags(),\n stackTrace: stack,\n },\n eventType: 'log',\n eventTimestamp: new Date().toISOString(),\n library: {\n name: 'PrismJS',\n version: pkg.version,\n initConfig: values.config,\n },\n platform: 'web',\n session: values.session, // cannot update session values here, as it creates an infinite loop!\n wmukid: values.wmukid,\n };\n\n const localStorageDebugFlag = hasLocalStorage() && win.localStorage.getItem('wmpsm_debug') == 'true';\n const queryStringDebugFlag = win.location.search.includes('wmpsm_debug');\n\n if (level !== 'debug') {\n if (localStorageDebugFlag || queryStringDebugFlag || environment === 'AUTOMATED_TEST') {\n if (environment === 'AUTOMATED_TEST') {\n console[level](`[PSM]: ${level}:`, JSON.stringify(item.eventProperties));\n } else {\n console[level](`[PSM]: ${level}:`, item);\n }\n } else {\n if (item.eventProperties.featureFlagValues['doppler-send-logs']) {\n logger.addItem(item);\n }\n }\n } else {\n if (localStorageDebugFlag || queryStringDebugFlag || environment === 'AUTOMATED_TEST') {\n if (environment === 'AUTOMATED_TEST') {\n console.log(`[PSM]: DEBUG`, JSON.stringify(item.eventProperties));\n } else {\n console.log(`[PSM]: DEBUG`, item);\n }\n }\n }\n\n return item;\n}\n\nexport function info(options: LogOptions) {\n return log(options, 'info');\n}\n\nexport function debug(options: LogOptions) {\n return log(options, 'debug');\n}\n\nexport function warn(options: LogOptions) {\n return log(options, 'warn');\n}\n\nexport function error(options: LogOptions) {\n return log(options, 'error');\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { v4 as uuid } from 'uuid';\nimport { cookie } from '@turnercode/cdp-cookie';\nimport { findFrame } from './privacy';\nimport { cookiesEnabled, fromQueryString } from './utils/browser';\nimport { URLS } from './utils/constants';\nimport { debug } from './utils/logger';\nimport { sendRequest } from './utils/sendRequest';\n\nexport type WmukidValue =\n | string\n | {\n id: string;\n version: string;\n timestamp: string;\n };\n\nexport type CdpidValue = string | { cdpId: string; wmukId: string };\n\nexport let is3PCookiesEnabled = null;\n\nconst win = window as any;\nconst doc = document as any;\n\n/**\n * Initializes the Prism identity module, which is responsible for:\n * - Managing the WMUKID\n * - Capturing third-party IDs\n * - Sending data to Doppler\n *\n * @param core The Prism core payload and API manager\n * @param cb Function invoked after tracking an identity registration\n */\nexport function initIdentity(env: string): { wmukid: string; cdpid: string } {\n let wmukid: WmukidValue = '';\n let wmukidStable = '';\n let cdpid: CdpidValue = '';\n\n function isUUID(id: string) {\n const uuidV4Regex = /^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;\n const uuid = id.match(uuidV4Regex);\n if (uuid === null) {\n return false;\n }\n return true;\n }\n\n function searchURL(): string | null {\n const utm_term = fromQueryString('utm_term', win.location.href);\n const match = new RegExp(/cdpid_([0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12})/i).exec(\n utm_term\n );\n let cdpid = null;\n if (match) {\n cdpid = match[1];\n }\n return cdpid;\n }\n\n function updateCdpData(cdpId: string, wmukId: string) {\n const cdpidValid = isUUID(cdpId);\n if (!cdpidValid) {\n debug({\n message: `CDPID value ${JSON.stringify(cdpid)} is invalid. Returning without updating`,\n methodName: 'updateCdpData',\n eventType: 'cdpid',\n });\n return;\n }\n cdpId = searchURL() || cdpId; // If no prior CPDID on current page, update with CPDPID in url from inbrain\n cookie.set('CDPID', JSON.stringify({ cdpId, wmukId }), {\n samesite: 'None',\n secure: true,\n encode: false,\n });\n }\n\n // Add Third Party Cookie\n const thirdPartyIFrame = doc.createElement('iframe');\n thirdPartyIFrame.setAttribute('id', 'psm_thirdparty');\n thirdPartyIFrame.setAttribute('style', 'display:none');\n thirdPartyIFrame.setAttribute('src', URLS.lightningOrigin + URLS.thirdPartyCookie);\n doc.body.appendChild(thirdPartyIFrame);\n\n win.addEventListener(\n 'message',\n (e: MessageEvent) => {\n if (e.origin === URLS.lightningOrigin) {\n if (e.data === 'PSM:3PCunsupported') {\n // Third party cookies are NOT supported\n is3PCookiesEnabled = false;\n } else if (e.data === 'PSM:3PCsupported') {\n // Third party cookies ARE supported\n is3PCookiesEnabled = true;\n } else {\n debug({\n message: `Updating CDPID from iFrame value: ${JSON.stringify(e.data)}`,\n methodName: 'initIdentity',\n eventType: 'message',\n });\n updateCdpData(e.data, wmukidStable);\n }\n }\n },\n false\n );\n\n if (cookiesEnabled()) {\n wmukid = cookie.get('WMUKID') as WmukidValue;\n wmukidStable = cookie.get('WMUKID_STABLE') as string;\n cdpid = cookie.get('CDPID') as CdpidValue;\n const cdpidValid = cdpid && typeof cdpid === 'object' && 'cdpId' in cdpid && isUUID(cdpid.cdpId);\n\n debug({\n message: `[PSM]: Cookies enabled. Retrieving ID values\nWMUKID: ${JSON.stringify(wmukid)}\nWMUKID_STABLE: ${wmukidStable}\nCDPID: ${JSON.stringify(cdpid)}\n`,\n methodName: 'initIdentity',\n eventType: 'identity',\n });\n\n if (wmukidStable == null) {\n if (wmukid == null) {\n // If the WMUKID does not exist, generate one, set a cookie, and track the newly-registered ID\n wmukidStable = uuid();\n debug({\n message: `WMUKID and WMUKID_STABLE cookies not found. Generating WMUKID_STABLE value: ${wmukidStable}`,\n methodName: 'initIdentity',\n eventType: 'identity',\n });\n } else if (typeof wmukid === 'object' && 'id' in wmukid) {\n // If a legacy WMUKID cookie exists, pull the ID value from it\n wmukidStable = wmukid.id;\n debug({\n message: `Legacy WMUKID value ${wmukid.id} found. Setting WMUKID_STABLE value: ${wmukidStable}`,\n methodName: 'initIdentity',\n eventType: 'identity',\n });\n } else {\n wmukidStable = wmukid;\n debug({\n message: `WMUKID string value ${wmukid} found. Setting WMUKID_STABLE value: ${wmukidStable}`,\n methodName: 'initIdentity',\n eventType: 'identity',\n });\n }\n }\n\n debug({\n message: `Setting WMUKID_STABLE cookie to ${wmukidStable}. Cookie options: ${JSON.stringify(cookie.options())}`,\n methodName: 'initIdentity',\n eventType: 'identity',\n });\n cookie.set('WMUKID_STABLE', wmukidStable);\n\n if (cdpid === null || !cdpidValid) {\n if (findFrame('prism_toolkit') === null) {\n const iframe = doc.createElement('iframe');\n iframe.setAttribute('id', 'prism_toolkit');\n iframe.setAttribute('style', 'display:none');\n iframe.setAttribute('src', URLS.lightningOrigin + URLS.iFramePath[env]);\n doc.body.appendChild(iframe);\n }\n } else if (typeof cdpid === 'object' && 'cdpId' in cdpid && 'wmukId' in cdpid && cdpidValid) {\n const cdpidStr: string = cdpid.cdpId;\n const wmukidStr: string = cdpid.wmukId;\n\n if (wmukidStable !== wmukidStr) {\n debug({\n message: `Updating CDPID value ${cdpidStr} with WMUKID: ${wmukidStable}`,\n methodName: 'initIdentity',\n eventType: 'cdpid',\n });\n updateCdpData(cdpidStr, wmukidStable);\n } else {\n debug({\n message: `CDPID cookie has already been set to value ${JSON.stringify(\n cdpid\n )}. To start a new test, delete the CDPID cookie on this domain and lightning.warnermediacdn.com.`,\n methodName: 'initIdentity',\n eventType: 'cdpid',\n });\n }\n }\n }\n\n return { wmukid: wmukidStable, cdpid: cdpid as string };\n}\n\nexport async function initIdentityAsync(env: string): Promise<{ wmukid: string; cdpid: string }> {\n return new Promise((resolve) => {\n const ids = initIdentity(env);\n // Resolve immediately for automated test since useFakeTimers/setTimeout is causing timeout error\n if (env === 'AUTOMATED_TEST') {\n return resolve({ wmukid: ids.wmukid, cdpid: ids.cdpid });\n }\n let counter = 0;\n (function waitForCdpId() {\n ids.cdpid = cookie.get('CDPID') as string;\n if (ids.cdpid || counter >= 20) {\n return resolve({ wmukid: ids.wmukid, cdpid: ids.cdpid });\n }\n counter++;\n setTimeout(waitForCdpId, 50);\n })();\n });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar $some = require('../internals/array-iteration').some;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('some');\n\n// `Array.prototype.some` method\n// https://tc39.es/ecma262/#sec-array.prototype.some\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {\n some: function some(callbackfn /* , thisArg */) {\n return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","import { isElementVisible } from './utils/browser';\n\ndeclare global {\n interface Window {\n googletag: googletag.Googletag;\n }\n}\n\nexport interface SlotMetrics {\n slotId: string;\n slotSize: string;\n adUnitPath?: string;\n totalViewTime: number;\n lastViewStarted: number;\n visibleOnStart: boolean;\n adWasViewed: boolean;\n rfv?: string;\n creativeId?: string;\n lineItemId?: string;\n totalHoverTime: number;\n lastHoverStarted: number;\n}\n\nconst win = window;\nconst doc = document;\nlet adObserver: IntersectionObserver;\n\nexport const registeredSlots: SlotMetrics[] = [];\n\nwin.googletag = win.googletag || (({ cmd: [] } as unknown) as googletag.Googletag);\n\nconst log = (...args: string[]) => {\n if (win.location.search.search(/[?&]wmpsm_debug=[1t]/) !== -1) {\n console.log('[PSM]:', ...args);\n }\n};\n\nconst timeInSeconds = () => Math.round(Date.now() / 1000);\n\nconst addDistinctRegisteredSlot = (slot: SlotMetrics) => {\n if (!registeredSlots.some((regSlot) => slot.slotId === regSlot.slotId)) {\n registeredSlots.push(slot);\n }\n};\n\nexport function initAdViewListeners(): void {\n adObserver = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n const slotId = entry.target.id;\n const inViewPercentage = Math.round(entry.intersectionRatio) * 100;\n const rect = entry.boundingClientRect;\n\n if (entry.isIntersecting) {\n if (entry.intersectionRatio >= 0.5 && isElementVisible(entry.target)) {\n log(`slotVisibilityChanged - ${slotId} is in view. (${inViewPercentage}% in view)`);\n registeredSlots.forEach((slot) => {\n if (slot.slotId === slotId) {\n slot.visibleOnStart = true;\n slot.adWasViewed = true;\n slot.slotSize = `${rect.width}x${rect.height}`;\n updateSlotTimer(slot);\n }\n });\n }\n } else {\n // if an ad is not considered in view, flag it as not visible and reset lastViewStarted\n log(`slotVisibilityChanged - ${slotId} is no longer in view. (${inViewPercentage}% in view)`);\n registeredSlots.forEach((slot) => {\n if (slot.slotId === slotId) {\n slot.visibleOnStart = false;\n slot.lastViewStarted = 0;\n slot.lastHoverStarted = 0;\n }\n });\n }\n });\n },\n {\n root: null,\n rootMargin: '0px',\n threshold: [0.0, 0.5, 1.0],\n }\n );\n\n win.googletag.cmd.push(() => {\n win.googletag.pubads().addEventListener('slotRenderEnded', (e: googletag.events.SlotRenderEndedEvent) => {\n const slotId = e.slot.getSlotElementId();\n const adUnitPath = e.slot.getAdUnitPath();\n const elem = doc.getElementById(slotId);\n let slotSize = '0x0';\n\n if (e.size) {\n if (typeof e.size === 'string') {\n slotSize = e.size;\n } else {\n slotSize = e.size.join('x');\n }\n }\n\n const slot: SlotMetrics = {\n slotId,\n slotSize,\n adUnitPath,\n totalViewTime: 0,\n lastViewStarted: 0,\n visibleOnStart: false,\n adWasViewed: false,\n rfv: e.slot.getTargeting('rfv')[0],\n creativeId: e.slot.getTargeting('creativeId')[0],\n lineItemId: e.slot.getTargeting('lineItemId')[0],\n totalHoverTime: 0,\n lastHoverStarted: 0,\n };\n\n addDistinctRegisteredSlot(slot);\n\n if (elem) {\n adObserver.observe(elem);\n adListeners(elem, slot);\n }\n });\n\n win.googletag\n .pubads()\n .addEventListener('slotVisibilityChanged', (e: googletag.events.SlotVisibilityChangedEvent) => {\n const slotId = e.slot.getSlotElementId();\n registeredSlots.forEach((slot) => {\n if (slot.slotId === slotId) {\n slot.rfv = e.slot.getTargeting('rfv')[0];\n (slot.creativeId = e.slot.getTargeting('creativeId')[0]),\n (slot.lineItemId = e.slot.getTargeting('lineItemId')[0]);\n }\n });\n });\n\n win.googletag\n .pubads()\n .getSlots()\n .forEach((slot: googletag.Slot) => {\n const slotId = slot.getSlotElementId();\n const elem = doc.getElementById(slotId);\n let rect = {\n width: 0,\n height: 0,\n };\n\n if (elem) {\n rect = elem.getBoundingClientRect();\n }\n\n const adSlot: SlotMetrics = {\n slotId,\n slotSize: rect ? `${Math.round(rect.width)}x${Math.round(rect.height)}` : '0x0',\n adUnitPath: slot.getAdUnitPath(),\n totalViewTime: 0,\n lastViewStarted: 0,\n visibleOnStart: false,\n adWasViewed: false,\n rfv: slot.getTargeting('rfv')[0],\n creativeId: slot.getTargeting('creativeId')[0],\n lineItemId: slot.getTargeting('lineItemId')[0],\n totalHoverTime: 0,\n lastHoverStarted: 0,\n };\n\n addDistinctRegisteredSlot(adSlot);\n\n if (elem) {\n adObserver.observe(elem);\n adListeners(elem, adSlot);\n }\n });\n });\n\n // listen for the inbrain.loaded event and retrieve array of DOM IDs\n // each Inbrain promo item should be registered as a distinct ad slot\n doc.addEventListener('inbrain.loaded', ((e: CustomEvent) => {\n e.detail.forEach((target) => {\n const elem = doc.getElementById(target);\n\n if (elem) {\n const rect = elem.getBoundingClientRect();\n\n addDistinctRegisteredSlot({\n slotId: target,\n slotSize: rect ? `${Math.round(rect.width)}x${Math.round(rect.height)}` : '0x0',\n totalViewTime: 0,\n lastViewStarted: 0,\n visibleOnStart: false,\n adWasViewed: false,\n totalHoverTime: 0,\n lastHoverStarted: 0,\n });\n\n adObserver.observe(elem);\n }\n });\n }) as EventListener);\n}\n\nexport function onHiddenAds() {\n // remove ad slots from the set of visible slots and mark them as inactive\n // so we can restore them when a user tabs back into the document\n registeredSlots.forEach((slot) => {\n if (slot.visibleOnStart) {\n slot.lastViewStarted = 0;\n }\n const elem = doc.getElementById(slot.slotId);\n\n if (elem) {\n adObserver.unobserve(elem);\n }\n });\n}\n\nexport function onVisibleAds() {\n // reset the last view started to the current time when the document first becomes visible\n registeredSlots.forEach((slot) => {\n if (slot.visibleOnStart) {\n slot.lastViewStarted = timeInSeconds();\n }\n const elem = doc.getElementById(slot.slotId);\n\n if (elem) {\n adObserver.observe(elem);\n }\n });\n}\n\nexport function setAdViewMetrics() {\n registeredSlots.forEach((slot) => {\n if (slot.visibleOnStart) {\n updateSlotTimer(slot);\n }\n });\n}\n\nexport function resetAdViewMetrics() {\n registeredSlots.forEach((slot) => {\n slot.totalViewTime = 0;\n slot.totalHoverTime = 0;\n slot.adWasViewed = false;\n });\n}\n\nfunction updateSlotTimer(slot: SlotMetrics) {\n const lastStarted = slot.lastViewStarted;\n const currentTime = timeInSeconds();\n\n // if the timer is currently running\n if (lastStarted) {\n // compute the difference between the current time and the start time\n // to determine the number of seconds the ad slot has been visible since the last\n // time it became visible\n const diff = currentTime - lastStarted;\n\n slot.totalViewTime += diff;\n }\n\n // update the last viewed time to the current time\n slot.lastViewStarted = currentTime;\n}\n\nfunction updateAdHoverTimer(event: string, slot: SlotMetrics) {\n const currentTime = timeInSeconds();\n let diff = 0;\n\n if (slot.lastHoverStarted !== 0) {\n diff = currentTime - slot.lastHoverStarted;\n }\n\n if (event === 'mouseleave') {\n slot.totalHoverTime += diff;\n } else {\n slot.lastHoverStarted = currentTime;\n }\n}\n\nfunction adListeners(target: HTMLElement, slot: SlotMetrics): void {\n target.addEventListener('mouseenter', () => {\n updateAdHoverTimer('mouseenter', slot);\n });\n\n target.addEventListener('mouseleave', () => {\n updateAdHoverTimer('mouseleave', slot);\n });\n}\n","import { EngagementMetrics } from './payloadCore';\nimport { detectDocumentSize, throttle } from './utils/browser';\nimport { HEARTBEAT_INTERVAL } from './utils/constants';\n\nconst win = window;\nconst doc = document;\n\nconst documentEvents = ['mousedown', 'mousemove', 'keydown'];\nconst windowEvents = ['scroll', 'focus'];\n\nexport let lastEngagementEvent: number;\nexport let hbStartTimestamp: string = new Date().toISOString();\n\nexport let engagement: EngagementMetrics = {\n totalTime: 0,\n engagedTime: 0,\n interval: HEARTBEAT_INTERVAL / 1000,\n maxScrollDepth: win.scrollY < 0 ? 0 : win.scrollY,\n currentScrollPosition: win.scrollY < 0 ? 0 : win.scrollY,\n didScrollUpDuringInterval: false,\n};\n\nfunction handleEngagementEvent() {\n const current = win.scrollY < 0 ? 0 : win.scrollY;\n const totalHeight = detectDocumentSize()[1];\n\n if (current > engagement.currentScrollPosition) {\n engagement.maxScrollDepth = current >= totalHeight ? totalHeight : current;\n }\n if (current < engagement.currentScrollPosition) {\n engagement.didScrollUpDuringInterval = true;\n }\n engagement.currentScrollPosition = current;\n\n const now = new Date();\n\n // if we have a timestamp that denotes the last engagement event\n if (lastEngagementEvent) {\n // calculate the difference between the current time and the last engagement event in seconds\n const diff = Math.round((now.getTime() - lastEngagementEvent) / 1000);\n\n // if the difference is within a 3 second window, consider the difference \"engaged\" time\n // and add it to the engaged time total\n if (diff <= 3) {\n engagement.engagedTime += diff;\n }\n }\n\n // reset the last engagement event time to the current time\n lastEngagementEvent = now.getTime();\n}\n\nexport function initEngagementEvents() {\n documentEvents.forEach((event) => {\n doc.addEventListener(event, throttle(handleEngagementEvent, 1000));\n });\n\n windowEvents.forEach((event) => {\n win.addEventListener(event, throttle(handleEngagementEvent, 1000));\n });\n}\n\nexport function setEngagementMetrics() {\n const now = new Date();\n const start = new Date(hbStartTimestamp);\n\n engagement.totalTime = Math.round((now.getTime() - start.getTime()) / 1000);\n}\n\nexport function resetHbInterval() {\n const scroll = win.scrollY < 0 ? 0 : win.scrollY;\n engagement = {\n totalTime: 0,\n engagedTime: 0,\n interval: HEARTBEAT_INTERVAL / 1000,\n maxScrollDepth: scroll,\n currentScrollPosition: scroll,\n didScrollUpDuringInterval: false,\n };\n hbStartTimestamp = new Date().toISOString();\n lastEngagementEvent = Date.now();\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { cookie, findTopDomain } from '@turnercode/cdp-cookie';\nimport { Psm } from '../Psm';\nimport { PayloadCore } from '../payloadCore';\nimport {\n cookiesEnabled,\n getReferrer,\n localStorageAccessible,\n detectViewport,\n getScreenResolution,\n detectDocumentSize,\n} from './browser';\nimport pkg from '../../package.json';\nimport { registeredSlots } from '../adViewability';\nimport { engagement } from '../engagement';\nimport { is3PCookiesEnabled } from '../identity';\nimport { getInbrainMetrics } from '../inbrain';\n\nconst win = window as any;\nconst doc = document as any;\n\nexport type HydrateOptions = {\n psm: Psm;\n core: PayloadCore;\n};\n\nexport function getAdsTransactionId(): string {\n if (typeof win.turner_getTransactionId === 'function') {\n const adsTransactionId = win.turner_getTransactionId();\n return adsTransactionId;\n }\n return null;\n}\n\nexport function getAdsGUID(): string {\n if (cookiesEnabled()) {\n const adsGUID = cookie.get('ug') as string;\n return adsGUID;\n }\n return null;\n}\n\n/**\n * Adapted from https://github.com/turnercode/digital-ads/blob/develop/src/Modules/Krux/index.js#L33\n */\nexport function getKruxId(): string {\n if (localStorageAccessible()) {\n return win.localStorage.getItem('kxkuid');\n } else if (cookiesEnabled()) {\n return cookie.get('kxkuid') as string;\n } else {\n return null;\n }\n}\n\nexport function getAttUuid(): string {\n if (cookiesEnabled()) {\n const att = cookie.get('firstpartyuid') as { id: string; timestamp: string };\n if (att && typeof att === 'object' && 'id' in att) {\n return att.id;\n } else {\n return null;\n }\n }\n return null;\n}\n\nexport function getOptanonConsentCookie(): string | null {\n let optanonConsentCookie = null;\n if (cookiesEnabled()) {\n optanonConsentCookie = cookie.get('OptanonConsent') as string;\n }\n return optanonConsentCookie;\n}\n\nfunction grabIDFromAMCVCookie(id) {\n const AMCVCookie = cookie.get('AMCV_7FF852E2556756057F000101@AdobeOrg') as string;\n\n if (AMCVCookie) {\n // The AMCV cookie stores ids in the following format: key1 | value1 | key2 | value2\n const AMCVSplit = AMCVCookie.split('|');\n\n // grabs the index of the id key\n const idKeyIndex = AMCVSplit.indexOf(id);\n\n // condition to ensure the id exists on the AMCV cookie, if not skip and return null below\n if (idKeyIndex != -1) {\n // grabs the id value using the id key index as a base and increments by 1 given\n const idValueIndex = idKeyIndex + 1;\n\n return AMCVSplit[idValueIndex];\n }\n }\n return null;\n}\n\nexport function getEcid(): string | null {\n const s_ecid = cookie.get('s_ecid') as string;\n const s_vi = cookie.get('s_vi') as string;\n const ecid = s_ecid ? s_ecid : s_vi ? s_vi : grabIDFromAMCVCookie('MCMID');\n return ecid;\n}\n\nexport function getCnnUid(): string | null {\n let cnnUid = null;\n let zionObj = null;\n if (localStorageAccessible()) {\n zionObj = win.localStorage.getItem('zion.cnn_uid');\n\n if (zionObj) {\n try {\n zionObj = JSON.parse(zionObj);\n cnnUid = zionObj.id;\n } catch {\n if (win.location.search.includes('wmpsm_debug')) {\n console.error('[PSM] Error parsing zion.cnn_uid to JSON');\n }\n }\n }\n }\n\n return cnnUid;\n}\n\nexport function getConvivaId(): string | null {\n if (localStorageAccessible()) {\n const convivaIdKey = ['Conviva/sdkConfig', 'Conviva.sdkConfig', 'top-player::Conviva.sdkConfig'];\n let clientId = null;\n for (let i = 0; i < convivaIdKey.length; i++) {\n clientId = win.localStorage.getItem(convivaIdKey[i]);\n if (clientId) {\n try {\n const convivaObj = JSON.parse(clientId);\n return convivaObj.clId;\n } catch {\n if (win.location.search.includes('wmpsm_debug')) {\n console.error('[PSM] Error parsing Conviva ID to JSON');\n }\n }\n }\n }\n }\n return null;\n}\n\nexport function getZionId(): string | null {\n let zionId = null;\n if (win.ZionMessageBus) {\n const zionBus = win.ZionMessageBus.getInstance();\n const idObjects = zionBus.watching.id_found.messageQueue;\n\n if (idObjects && idObjects instanceof Array) {\n const zaidObject = idObjects.find((idObject) => {\n const message = idObject.message?.type;\n\n if (typeof message === 'string') {\n return message.toLowerCase() === 'zaid';\n }\n });\n zionId = zaidObject ? zaidObject.message.value : null;\n }\n }\n return zionId;\n}\n\n/**\n * Returns the metadata property value as defined by its locations\n *\n * @param locations array of locations to look up\n * @param dynDataObj global object to store dynamic data\n * @returns the metadata property value\n */\nexport function getMetadataPropValue(locations: string[], dynDataObj?: string): string | null {\n let propValue = null;\n if (locations) {\n for (let location of locations) {\n if (typeof location !== 'string') continue;\n if (dynDataObj) location = location.replace(/^data/, dynDataObj);\n const propArr = location.match(/[^.[\\]()]+/g);\n for (let i = 0; i < propArr.length; i++) {\n if (i === 0) propValue = win;\n propValue = propValue[propArr[i]];\n if (typeof propValue === 'function') {\n propValue = propValue();\n }\n if (typeof propValue === 'undefined') {\n propValue = null;\n break;\n }\n }\n if (propValue) return propValue;\n }\n }\n return propValue;\n}\n\n/**\n * Returns page/video metadata properties as defined by its configuration\n *\n * @param metadataConfig configuration to retrieve page/video metadata properties\n * @param type metadata type (page or video)\n * @returns the page/video metadata\n */\nexport function getContentMetadata(metadataConfig: Record, type: string): any {\n const metadata = {};\n metadataConfig &&\n metadataConfig[type] &&\n metadataConfig[type].forEach((prop) => {\n let propValue = getMetadataPropValue(prop.staticLocations);\n if (!propValue) {\n propValue = getMetadataPropValue(prop.dynamicLocations, 'psmPubSubData.' + type);\n }\n metadata[prop.name] = propValue;\n });\n return metadata;\n}\n\nexport const hydratePayload = (psm: Psm, core: PayloadCore) => {\n const totalSize = detectDocumentSize();\n\n core.setPlatform(psm.config.platform);\n core.addEntry('companyName', 'WarnerMedia');\n core.setBrand(psm.config.brand);\n core.setSubBrand(psm.config.subBrand);\n core.setProductName(psm.config.brand);\n core.setLibrary({ name: 'PrismJS', version: pkg.version, initConfig: psm.config });\n core.setDevice({\n type: win.navigator.platform,\n userAgent: win.navigator.userAgent,\n totalWidth: totalSize[0],\n totalHeight: totalSize[1],\n screenResolution: getScreenResolution(),\n viewportSize: detectViewport(),\n });\n core.setNavigationProperties({\n url: win.location.href,\n rootDomain: findTopDomain(win.location.href),\n referrer: getReferrer(),\n path: win.location.pathname,\n search: win.location.search,\n title: doc.title,\n });\n core.setClientResolvedIp(psm.location.ip_address);\n core.setLocation({\n city: psm.location.states[0].cities[0],\n state: psm.location.states[0].state,\n country: psm.location.country,\n zip: psm.location.states[0].zipcodes[0],\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone || null,\n locale: win.navigator.language,\n language: win.navigator.language.split('-')[0] || null,\n });\n core.setConsentProperties({\n uspString: cookie.get('usprivacy') as string,\n consentRule: psm.consentRule,\n optanonConsent: getOptanonConsentCookie(),\n });\n core.setIABCategories({\n consentCategories: psm.consentCategories,\n });\n core.setWMUKID(psm.wmukid as string);\n core.setEventProperties({\n cookiesEnabled: cookiesEnabled(),\n thirdPartyCookiesEnabled: is3PCookiesEnabled,\n doNotTrack: win.navigator.doNotTrack || win.doNotTrack ? true : false,\n featureFlagValues: psm.getFlags(),\n cookies: cookie.getAll(),\n automatedTest: psm.config.psmEnvironment === 'AUTOMATED_TEST',\n heartbeat: engagement,\n inbrain: getInbrainMetrics(),\n });\n core.setSessionProperties(psm.session);\n core.setAdsProperties({\n guid: getAdsGUID(),\n transid: getAdsTransactionId(),\n ads: registeredSlots,\n });\n core.setThirdPartyIds({\n attuuid: getAttUuid(),\n cdpid: psm.getCDPID(),\n cnnuid: getCnnUid(),\n convivaid: getConvivaId(),\n ecid: getEcid(),\n kruxid: getKruxId(),\n liverampatsid: cookie.get('tok_lr') as string,\n tradedeskuid: cookie.get('tok_ttuid') as string,\n wmhhid: cookie.get('wmhhid') as string,\n wminid: cookie.get('wminid') as string,\n zionid: getZionId(),\n hhidVersion: cookie.get('hhidVersion') as string,\n });\n core.setContentMetadata({\n page: getContentMetadata(psm.config.contentMetadata, 'page'),\n video: getContentMetadata(psm.config.contentMetadata, 'video'),\n });\n};\n","// /* eslint-disable @typescript-eslint/no-explicit-any */\nimport { cookie } from '@turnercode/cdp-cookie';\nimport { sendRequest } from './utils/sendRequest';\nimport { URLS } from './utils/constants';\nimport { Psm } from './Psm';\nimport { error, debug } from './utils/logger';\nimport { hydratePayload } from './utils/hydratePayload';\nimport { PayloadCore, InbrainMetrics } from './payloadCore';\n\nconst win = window as any;\nconst doc = document as any;\nconst promoLoadedEventsSent = [];\nconst promoVisibleEventsSent = [];\nconst controlEventsSent = [];\nlet core: PayloadCore;\nlet inbrainMetrics: InbrainMetrics;\n\n// Utility method for logs.\nconst log = (...args: string[]) => {\n if (win.location.search.search(/[?&]wmpsm_debug=[1t]/) !== -1) {\n console.log('[PSM]:', ...args);\n }\n};\n\n// Utility method to make requests.\nfunction sendEvent(options) {\n const { env, data } = options;\n\n try {\n sendRequest(URLS.identity[env], {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(data),\n });\n } catch (err) {\n debug({\n err,\n eventType: 'inbrain',\n methodName: 'sendEvent',\n });\n }\n}\n\n// Checks to see if the promo should render into the page.\nfunction shouldRender({ domain, pages }) {\n // Checks for a domain match\n if (win.location.hostname != domain) {\n return false;\n }\n\n // Checks for a page path match allowing wildcards\n const matches: boolean[] = [];\n\n try {\n pages.forEach((path) => {\n const splitPathForPromo = path.split('/');\n const splitPathFromWindow = window.location.pathname.split('/');\n\n let pathMatch = true;\n splitPathFromWindow.forEach((pathitem, index) => {\n if (splitPathForPromo[index] != '*') {\n if (splitPathForPromo[index] != pathitem) {\n pathMatch = false;\n }\n }\n });\n matches.push(pathMatch);\n });\n } catch (err) {\n error({\n err,\n eventType: 'inbrain',\n methodName: 'shouldRender',\n });\n return false;\n }\n\n return matches.indexOf(true) != -1;\n}\n\n// Wait for an element that satisfies a DOM selector to exist, then resolve with the element.\nfunction elementReady(selector: string): Promise {\n return new Promise((resolve) => {\n let elem = doc.querySelector(selector);\n\n if (elem) {\n resolve(elem);\n }\n\n new MutationObserver((_, observer) => {\n elem = doc.querySelector(selector);\n\n if (elem) {\n resolve(elem);\n observer.disconnect();\n }\n }).observe(doc.documentElement, {\n childList: true,\n subtree: true,\n });\n });\n}\n\n// Initializes the swiper carousel.\nfunction initCarousel() {\n return new Promise((resolve, reject) => {\n const swiperStyles = doc.createElement('link');\n swiperStyles.type = 'text/css';\n swiperStyles.rel = 'stylesheet';\n swiperStyles.href = URLS.lightningOrigin + URLS.carouselStyles;\n const s = doc.head.getElementsByTagName('link')[0];\n\n if (s && s.parentElement) {\n s.parentElement.insertBefore(swiperStyles, s);\n } else {\n doc.head.appendChild(swiperStyles);\n }\n\n const swiperScript = doc.createElement('script');\n swiperScript.type = 'text/javascript';\n swiperScript.src = URLS.lightningOrigin + URLS.carouselScript;\n swiperScript.addEventListener('load', () => {\n // @ts-ignore\n win.inbrainCarousel = new Swiper('.inbrain-carousel', {\n watchSlidesProgress: true,\n slidesPerView: 'auto',\n spaceBetween: 20,\n navigation: {\n nextEl: '.inbrain-control-next',\n prevEl: '.inbrain-control-prev',\n },\n });\n\n resolve(true);\n });\n doc.head.appendChild(swiperScript);\n });\n}\n\n// Grabs the correct promo content URL and adds in needed params.\nfunction getContentURL(psm, env: string) {\n const wmhhid = cookie.get('wmhhid') as any;\n const usp = cookie.get('usprivacy') as string;\n const location = psm.getLocationProperties();\n const device = psm.getDeviceProperties();\n const ids = psm.getIds();\n\n let inbrainURL = URLS.inbrain[env];\n inbrainURL += `?wmukid=${encodeURIComponent(psm.wmukid)}`;\n inbrainURL += `&cdpid=${encodeURIComponent(psm.getCDPID())}`;\n inbrainURL += `&url=${encodeURIComponent(window.location.href)}`;\n inbrainURL += `&usp=${encodeURIComponent(usp)}`;\n inbrainURL += `&inBrainTemplateBeta=${psm.queryFlag('inBrainTemplateBeta')}`;\n inbrainURL += `&inBrainRecommendationsBeta=${psm.queryFlag('inBrainRecommendationsBeta')}`;\n inbrainURL += `&deviceType=${encodeURIComponent(device.type)}`;\n inbrainURL += `&location=${encodeURIComponent(location.state)}`;\n inbrainURL += `&language=${encodeURIComponent(location.language)}`;\n inbrainURL += `&ecid=${encodeURIComponent(ids.ecid)}`;\n inbrainURL += `&kruxid=${encodeURIComponent(ids.kruxid)}`;\n\n if (ids.attuuid) {\n inbrainURL += `&attuuid=${encodeURIComponent(ids.attuuid)}`;\n }\n\n if (wmhhid) {\n inbrainURL += `&wmhhid=${encodeURIComponent(wmhhid)}`;\n }\n\n return inbrainURL;\n}\n\nfunction setInbrainMetrics(options) {\n const { psm, id, promoPosition, destinationURL } = options;\n inbrainMetrics = {\n id,\n promoPosition,\n destinationURL,\n featureFlagValues: psm.getFlags(),\n };\n}\n\nexport function getInbrainMetrics(): InbrainMetrics {\n return inbrainMetrics;\n}\n\nexport async function initInbrain(psm: Psm, payloadCore: PayloadCore) {\n // grab the environment from prism\n const env = psm.config.psmEnvironment.toUpperCase();\n core = payloadCore;\n\n // checks inbrain FF to see if inbrain is enabled. We don't want to load the carousel.\n if (!psm.queryFlag('inbrain')) {\n return;\n }\n\n // check to ensure the load within the US\n if (psm.wmukid == 'Unknown') {\n return;\n }\n\n log('INBRAIN v2.0.4');\n\n let response = null;\n try {\n // grab inbrain promo content for this domain from the CDN\n response = await sendRequest(getContentURL(psm, env));\n } catch (err) {\n error({\n err,\n eventType: 'inbrain',\n methodName: 'initInbrain',\n });\n return;\n }\n\n if (!response) {\n return;\n }\n\n const { domain, pages, target, placement, html } = response;\n\n // make sure domain and page matches the promo\n if (!shouldRender({ domain, pages })) {\n return;\n }\n\n // wait until target element exists in the DOM\n elementReady(target).then(() => {\n let renderedHTML;\n try {\n renderedHTML = decodeURIComponent(html);\n } catch (err) {\n error({\n err,\n eventType: 'inbrain',\n methodName: 'initInbrainV2',\n });\n return;\n }\n\n switch (placement) {\n case 'within':\n doc.querySelector(target).innerHTML = renderedHTML;\n break;\n case 'before':\n doc.querySelector(target).insertAdjacentHTML('beforebegin', renderedHTML);\n break;\n case 'after':\n doc.querySelector(target).insertAdjacentHTML('afterend', renderedHTML);\n break;\n }\n\n // Initializes the carousel.\n initCarousel().then(() => {\n // Send off impression events for promos loaded into the carousel.\n sendPromoLoadedEvents({ psm, env });\n\n // listen for the user to click the carousel scroll button then send\n // viewable impressions for the promos in the carousel, but only for\n // promos that haven't sent viewable impression\n win.inbrainCarousel.on('slideChange', function () {\n sendPromoLoadedEvents({ psm, env });\n sendPromoVisibleEvents({ psm, env });\n });\n\n win.addEventListener('resize', () => {\n sendPromoLoadedEvents({ psm, env });\n });\n\n // Send inbrain viewed events once a promo item is more than 50% in the viewport\n // for at least 1 second.\n new IntersectionObserver(\n (entries, observer) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting || entry.intersectionRatio >= 0.5) {\n sendPromoVisibleEvents({ psm, env });\n observer.disconnect();\n }\n });\n },\n {\n root: null,\n rootMargin: '0px',\n threshold: [0.0, 0.5, 1.0],\n }\n ).observe(doc.querySelector(target));\n });\n\n // Attach click event listeners to all promos.\n grabAllPromos().forEach((elem: any) => {\n const id = elem.dataset.inbrain;\n const promoPosition = elem.dataset.slotindex;\n const destinationURL = elem.href;\n\n elem.addEventListener('click', () => {\n setInbrainMetrics({ psm, id, promoPosition, destinationURL });\n hydratePayload(psm, core);\n core.trackInbrain('Inbrain Click', new Date().toISOString(), (data) => {\n sendEvent({\n env,\n data,\n });\n });\n });\n });\n });\n}\n\n// Grabs all promos loaded into the carousel.\nfunction grabCarouselPromos(grabIDs = false) {\n const elements = document.querySelectorAll('.swiper-slide-visible > div > a');\n if (grabIDs) {\n const elementIDs = [];\n elements.forEach((el: any) => {\n elementIDs.push(el.dataset.inbrain);\n });\n return elementIDs;\n }\n return elements;\n}\n\n// Grabs all promos, regardless of whether or not they are in the carousel.\nfunction grabAllPromos() {\n return doc.querySelectorAll('[data-inbrain]');\n}\n\n// Utility method to send all promo loaded events.\nfunction sendPromoLoadedEvents({ psm, env }) {\n grabCarouselPromos().forEach((elem) => {\n const id = elem.dataset.inbrain;\n\n if (!promoLoadedEventsSent.includes(id)) {\n setInbrainMetrics({ psm, id });\n hydratePayload(psm, core);\n core.trackInbrain('Inbrain Promo Loaded', new Date().toISOString(), (data) => {\n sendEvent({\n env,\n data,\n });\n });\n promoLoadedEventsSent.push(id);\n }\n });\n}\n\n// Utility method to send all promo visible events.\nfunction sendPromoVisibleEvents({ psm, env }) {\n grabCarouselPromos().forEach((elem) => {\n const id = elem.dataset.inbrain;\n if (!promoVisibleEventsSent.includes(id)) {\n setInbrainMetrics({ psm, id });\n hydratePayload(psm, core);\n core.trackInbrain('Inbrain Promo Visible', new Date().toISOString(), (data) => {\n sendEvent({\n env,\n data,\n });\n });\n promoVisibleEventsSent.push(id);\n }\n });\n}\n\nfunction sendInbrainControlEvents({ html, psm, env }) {\n const renderedHTML = decodeURIComponent(html);\n const arr = renderedHTML.split('data-slotindex=\"');\n\n for (let i = 1; i < arr.length; i++) {\n const promoPosition = arr[i].charAt(0);\n\n const dataset = arr[i].match(/data-inbrain=\"(.+)\"/g);\n const elem = dataset[0].split('=')[1];\n const id = elem.replaceAll('\"', '');\n\n if (!controlEventsSent.includes(id)) {\n setInbrainMetrics({ psm, id, promoPosition });\n hydratePayload(psm, core);\n core.trackInbrain('Inbrain Control', new Date().toISOString(), (data) => {\n sendEvent({\n env,\n data,\n });\n });\n controlEventsSent.push(id);\n }\n }\n}\n","export interface PayloadMap {\n [key: string]: unknown;\n}\n\nexport interface PayloadData {\n add: (key: string, value?: string) => void;\n addMap: (map: PayloadMap) => void;\n addJson: (key: string, json: Record) => void;\n build: () => PayloadMap;\n}\n\nexport function isJson(property: unknown): boolean {\n const record = property as Record | null | undefined;\n return (\n typeof record !== 'undefined' &&\n record !== null &&\n (record.constructor === {}.constructor || record.constructor === [].constructor)\n );\n}\n\nexport function isNonEmptyJson(property: Record): boolean {\n if (!isJson(property)) {\n return false;\n }\n for (const key in property) {\n if (Object.prototype.hasOwnProperty.call(property, key)) {\n return true;\n }\n }\n return false;\n}\n\nexport function payloadBuilder(): PayloadData {\n const payload: PayloadMap = {};\n\n const add = (key: string, value?: unknown): void => {\n if (value != null && value !== '') {\n // null also checks undefined\n payload[key] = value;\n }\n };\n\n const addMap = (map: PayloadMap): void => {\n for (const key in map) {\n if (Object.prototype.hasOwnProperty.call(map, key)) {\n add(key, map[key]);\n }\n }\n };\n\n const addJson = (key: string, json?: Record): void => {\n if (json && isNonEmptyJson(json)) {\n const str = JSON.stringify(json);\n add(key, str);\n }\n };\n\n const build = (): PayloadMap => {\n return payload;\n };\n\n return {\n add,\n addMap,\n addJson,\n build,\n };\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { sendRequest } from './sendRequest';\nimport { debug } from './logger';\n\nconst win = window as any;\n\nexport function processQueue(url: string) {\n return (item: any, done: any) => {\n const bots = ['bot', 'crawl', 'spider'];\n const reg = new RegExp(bots.join('|'), 'i');\n if (reg.test(win.navigator.userAgent)) {\n return done(null, {});\n }\n item.sentAtTimestamp = new Date().toISOString();\n sendRequest(url, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(item),\n })\n .then((res) => done(null, res))\n .catch((err) => {\n debug({\n err,\n methodName: 'sendRequest',\n eventType: item.eventType || 'queue',\n });\n done(err);\n });\n };\n}\n","import { onHiddenAds, onVisibleAds } from './adViewability';\nimport { HEARTBEAT_INTERVAL } from './utils/constants';\nimport { resetHbInterval } from './engagement';\nimport { resetAdViewMetrics } from './adViewability';\n\nconst win = window;\nconst doc = document;\n\nlet refreshIntervalId: number | null = null;\n\nexport function initHeartbeat(callback: (..._: T) => void, sendBeacon: () => void) {\n doc.addEventListener(\n 'visibilitychange',\n () => {\n if (doc.visibilityState === 'hidden') {\n onHiddenAds();\n // pause heartbeats\n win.clearInterval(refreshIntervalId as number);\n refreshIntervalId = null;\n sendBeacon();\n } else {\n onVisibleAds();\n // resume heartbeats\n resetAdViewMetrics();\n resetHbInterval();\n refreshIntervalId = refreshIntervalId || win.setInterval(callback, HEARTBEAT_INTERVAL);\n }\n },\n false\n );\n\n refreshIntervalId = win.setInterval(callback, HEARTBEAT_INTERVAL);\n}\n","import { v4 as uuid } from 'uuid';\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { cookie, findTopDomain } from '@turnercode/cdp-cookie';\nimport { FeatureFlagClient, IQueryFeatureResult } from '@turnercode/cdp-feature-flag-client';\nimport Queue from '@segment/localstorage-retry';\nimport { initIdentityAsync, WmukidValue, CdpidValue } from './identity';\nimport { initInbrain } from './inbrain';\nimport {\n PayloadCore,\n payloadCore,\n SessionProperties,\n Ids,\n UserConsentEventDetails,\n AdsProperties,\n ConsentProperties,\n Device,\n Library,\n LocationProperties,\n NavigationProperties,\n} from './payloadCore';\n// import { initPrivacy, USPData, uspString } from './privacy';\nimport { initAdViewListeners, setAdViewMetrics, resetAdViewMetrics, registeredSlots } from './adViewability';\nimport { CCPA_LOCATIONS, URLS, MAX_SESSION_DURATION, featureFlagDefaults, queueOptions } from './utils/constants';\nimport { fromQueryString, getReferrer, setBrowser } from './utils/browser';\nimport {\n getAdsGUID,\n getAdsTransactionId,\n getAttUuid,\n getCnnUid,\n getConvivaId,\n getEcid,\n getKruxId,\n getOptanonConsentCookie,\n getZionId,\n hydratePayload,\n} from './utils/hydratePayload';\nimport { processQueue } from './utils/processQueue';\nimport { sendRequest } from './utils/sendRequest';\nimport { createLogger, error, warn, info, debug } from './utils/logger';\nimport pkg from '../package.json';\nimport { checkOutsideUS } from './privacy';\nimport { initEngagementEvents, setEngagementMetrics, resetHbInterval } from './engagement';\nimport { initHeartbeat } from './heartbeat';\n\nexport interface PsmConfig {\n iab_categories?: [];\n platform?: string;\n brand: string;\n subBrand?: string;\n psmEnvironment: string;\n cookieDomain?: string;\n cookieSameSite?: string;\n cookieSecure?: boolean;\n cookieExpires?: number;\n countryCode?: string;\n topics?: {\n page: string[];\n video: string[];\n };\n contentMetadata?: {\n page: any[];\n video: any[];\n };\n inbrainBetaURL?: string;\n}\n\nexport interface Geolocation {\n asn: {\n id: string;\n name: string;\n };\n continent: string;\n continentName: string;\n country: string;\n country_alpha2: string;\n country_alpha3: string;\n ip_address: string;\n lat?: string;\n lon?: string;\n proxy: null | string;\n states: {\n cities: string[];\n counties: string[];\n state: string;\n zipcodes: string[];\n }[];\n}\n\nexport interface AuthTokenResolveRequest {\n wmukid: string;\n brand: string;\n ids: Ids;\n consentProperties: ConsentObject;\n authentication: AuthObject[];\n}\n\nexport interface ConsentObject {\n usp: string;\n}\n\nexport interface AuthObject {\n provider: string;\n details: AuthDetailsObject;\n}\n\nexport interface AuthDetailsObject {\n id: string;\n url?: string;\n}\n\nexport interface AuthTokenResolveResponse {\n tokens: AuthServiceTokenObject[];\n}\n\nexport interface AuthServiceTokenObject {\n provider: string;\n token: string;\n expiration: string;\n refreshToken?: string;\n}\n\nexport interface IdResolveResponse {\n wmhhid?: string;\n wminid?: string;\n wmsegs?: string;\n hhidVersion?: number;\n wmResolvedUserData: { [key: string]: any };\n}\n\nconst win = window as any;\nconst doc = win.document as any;\n\nexport class Psm {\n /**\n * Flag set to true when Prism has initialized\n */\n ready = false;\n\n /**\n * Default values from Prism config\n */\n config: PsmConfig = {\n platform: 'web',\n brand: '',\n subBrand: '',\n psmEnvironment: undefined,\n cookieSameSite: 'Lax',\n cookieSecure: false,\n cookieExpires: 31536000000, // 1 year in miliseconds\n };\n\n /**\n * Feature flag client instance\n */\n ffClient: FeatureFlagClient;\n\n /**\n * Feature flags\n */\n flags: IQueryFeatureResult[] = [];\n\n /**\n * Request queue for Doppler privacy API\n */\n privacyQueue: Queue;\n\n /**\n * Request queue for Doppler identity API\n */\n identityQueue: Queue;\n\n /**\n * Request queue for Doppler telemetry API\n */\n telemetryQueue: Queue;\n\n /**\n * Geolocation API response\n */\n location: Partial = {\n asn: {\n id: '',\n name: '',\n },\n continent: '',\n continentName: '',\n country: '',\n country_alpha2: '',\n country_alpha3: '',\n ip_address: '',\n lat: '',\n lon: '',\n proxy: null,\n states: [\n {\n cities: [],\n counties: [],\n state: '',\n zipcodes: [],\n },\n ],\n };\n\n /**\n * WMUKID from cookie or generated when Prism is initialized\n */\n wmukid: WmukidValue = null;\n\n /**\n * CDPID from cookie or generated when Prism is initialized\n */\n cdpid: CdpidValue = null;\n\n /**\n * Country code value for location-guarded logic\n */\n countryCode: string;\n\n /**\n * Session properties as determine on initialization\n */\n session: SessionProperties;\n\n /**\n * User's browser -- currently only sets to Safari or Unknown\n */\n browser: string;\n\n /**\n * Consent Rule to track how Prism was loaded based on user consent\n */\n consentRule = 'Other';\n\n /**\n * Consent categories used loading Prism for non-US users\n */\n consentCategories: Record;\n\n constructor() {\n win.WM = win.WM || {};\n win.WM.PSM = win.WM.PSM || {};\n win.WM.PSM.initPsm = this.initPsm.bind(this);\n win.WM.PSM.getVersion = this.getVersion.bind(this);\n win.WM.PSM.getWMUKID = this.getWMUKID.bind(this);\n win.WM.PSM.getCDPID = this.getCDPID.bind(this);\n win.WM.PSM.getConfig = this.getConfig.bind(this);\n win.WM.PSM.getFlags = this.getFlags.bind(this);\n win.WM.PSM.getAdsProperties = this.getAdsProperties.bind(this);\n win.WM.PSM.getConsentProperties = this.getConsentProperties.bind(this);\n win.WM.PSM.getBrand = this.getBrand.bind(this);\n win.WM.PSM.getDeviceProperties = this.getDeviceProperties.bind(this);\n win.WM.PSM.getIds = this.getIds.bind(this);\n win.WM.PSM.getLibrary = this.getLibrary.bind(this);\n win.WM.PSM.getLocationProperties = this.getLocationProperties.bind(this);\n win.WM.PSM.getDeviceProperties = this.getDeviceProperties.bind(this);\n win.WM.PSM.getNavigationProperties = this.getNavigationProperties.bind(this);\n win.WM.PSM.getSessionProperties = this.getSessionProperties.bind(this);\n win.WM.PSM.isDopplerIdentityOnStartEnabled = () => this.queryFlag('doppler-identity-onstart');\n win.WM.PSM.isDopplerIdentityOnCompleteEnabled = () => this.queryFlag('doppler-identity-oncomplete');\n win.WM.PSM.isDopplerPrivacyEnabled = () => this.queryFlag('doppler-privacy');\n win.WM.PSM.isDopplerTelemetryEnabled = () => this.queryFlag('doppler-telemetry');\n }\n\n async initPsm(config: PsmConfig): Promise {\n if (this.ready) return;\n this.config = Object.assign(this.config, config);\n\n createLogger(this);\n\n if (typeof config === 'undefined') {\n const err = new Error('[PSM]: Please provide a valid configuration to initPsm');\n error({\n err,\n eventType: 'configValidation',\n methodName: 'initPsm',\n });\n throw err;\n }\n\n const init = async () => {\n const env = config.psmEnvironment.toUpperCase();\n const core: PayloadCore = payloadCore();\n\n // this.privacyQueue = new Queue('privacy', queueOptions, processQueue(URLS.privacy[env]));\n this.identityQueue = new Queue('identity', queueOptions, processQueue(URLS.identity[env]));\n // this.telemetryQueue = new Queue('telemetry', queueOptions, processQueue(URLS.telemetry[env]));\n\n if (win.location !== window.parent.location) {\n // detecting if Prism is loading from iFrame\n console.log('[PSM]: Failing to load Prism from iFrame');\n return;\n }\n\n // initPrivacy(config.enablePrivacy, this.countryCode);\n const ids = await initIdentityAsync(env);\n\n this.wmukid = ids.wmukid;\n this.cdpid = ids.cdpid;\n\n // Set session properties with initial page load parameter\n this.setSessionProperties(true);\n\n // Resolve IDs\n this.resolveIds();\n\n // Set sendAuthToken cookie\n this.setSendAuthToken();\n\n // Set sendHHID cookie\n this.setSendHHIDCookie();\n\n // Set isInAuthTokenExperiment cookie\n this.setIsInExperiment('isInAuthTokenExperiment');\n\n // Set isInHHIDExperiment cookie\n this.setIsInExperiment('isInHHIDExperiment');\n\n // Set sendWMSegs cookie\n this.setSendWMSegs();\n\n // resolve auth token\n this.resolveAuthTokens(core);\n\n hydratePayload(this, core);\n\n // Publish to ZionMessageBus\n if (win.ZionMessageBus) {\n win.ZionMessageBus.getInstance().publish('id_found', { type: 'wmukid', value: this.wmukid });\n }\n\n core.trackIdentityRegistration('identity on page start', new Date().toISOString(), (data) => {\n if (this.queryFlag('doppler-identity-onstart')) {\n this.identityQueue.addItem(data);\n this.resetNewSessionFields();\n }\n\n if (env === 'AUTOMATED_TEST') {\n win.localStorage.setItem('payload-on-start', JSON.stringify(data));\n }\n });\n win.addEventListener('load', () => {\n this.setSessionProperties();\n hydratePayload(this, core);\n core.trackIdentityRegistration('identity on page complete', new Date().toISOString(), (data) => {\n if (this.queryFlag('doppler-identity-oncomplete')) {\n this.identityQueue.addItem(data);\n\n if (env === 'AUTOMATED_TEST') {\n win.localStorage.setItem('payload-on-complete', JSON.stringify(data));\n }\n this.resetNewSessionFields();\n }\n });\n });\n doc.addEventListener('userConsentChanged', (data: { detail: UserConsentEventDetails }) => {\n debug({\n message: 'userConsentChanged event received',\n methodName: 'initPsm',\n eventType: 'privacy',\n context: { eventDetails: data.detail },\n });\n this.setSessionProperties();\n hydratePayload(this, core);\n core.trackConsentUpdated('userConsentChanged', data.detail, new Date().toISOString(), (data) => {\n if (this.queryFlag('doppler-consent-update')) {\n debug({\n message: 'Consent Update event registered',\n methodName: 'initPsm',\n eventType: 'privacy',\n context: { payload: data },\n });\n this.identityQueue.addItem(data);\n this.resetNewSessionFields();\n }\n });\n });\n\n if (this.queryFlag('doppler-heartbeat-event')) {\n initAdViewListeners();\n initEngagementEvents();\n // Send event only if wmukid is not unknown\n if (this.wmukid !== 'Unknown') {\n const sendPageExitHB = () => {\n setEngagementMetrics();\n hydratePayload(this, core);\n core.trackPageExit('visibilitychange', new Date().toISOString(), (data) => {\n data.sentAtTimestamp = new Date().toISOString();\n win.navigator.sendBeacon(URLS.identity[env], JSON.stringify(data));\n });\n };\n // heartbeat for tracking total time\n initHeartbeat(() => {\n setAdViewMetrics();\n setEngagementMetrics();\n this.setSessionProperties();\n hydratePayload(this, core);\n core.trackHeartbeat(new Date().toISOString(), (data) => {\n this.identityQueue.addItem(data);\n this.resetNewSessionFields();\n resetHbInterval();\n resetAdViewMetrics();\n });\n }, sendPageExitHB);\n\n // Add event listeners for pageExit\n win.addEventListener('beforeunload', () => {\n setEngagementMetrics();\n hydratePayload(this, core);\n core.trackPageExit('beforeunload', new Date().toISOString(), (data) => {\n data.sentAtTimestamp = new Date().toISOString();\n win.navigator.sendBeacon(URLS.identity[env], JSON.stringify(data));\n });\n });\n\n win.addEventListener('pagehide', (event) => {\n if (!event.persisted) {\n setEngagementMetrics();\n hydratePayload(this, core);\n core.trackPageExit('pagehide', new Date().toISOString(), (data) => {\n data.sentAtTimestamp = new Date().toISOString();\n win.navigator.sendBeacon(URLS.identity[env], JSON.stringify(data));\n });\n }\n });\n }\n }\n\n if (this.queryFlag('doppler-pubsub-event')) {\n for (const type in config.topics) {\n config.topics[type].forEach((topic: string) => {\n win.PubSub &&\n win.PubSub.subscribe(topic, (...args: any[]) => {\n let data = typeof args[1] === 'object' ? args[1] : args[0];\n data = Object.keys(data).length < 3 && data.video ? data.video : data;\n win.psmPubSubData = win.psmPubSubData || {};\n win.psmPubSubData[type] = win.psmPubSubData[type] || {};\n Object.assign(win.psmPubSubData[type], data);\n hydratePayload(this, core);\n core.trackPubSub(topic, new Date().toISOString(), (data) => {\n this.identityQueue.addItem(data);\n this.resetNewSessionFields();\n });\n });\n });\n }\n }\n\n // this.privacyQueue.start();\n this.identityQueue.start();\n // this.telemetryQueue.start();\n\n try {\n initInbrain(this, core);\n } catch (err) {\n // add logging\n error({\n err,\n eventType: 'inbrain',\n methodName: 'initInbrain',\n });\n }\n\n this.ready = true;\n };\n\n this.validateConfig(config);\n\n this.countryCode =\n this.hasProperty('countryCode', config) &&\n typeof config.countryCode !== 'undefined' &&\n this.config.countryCode.length\n ? this.config.countryCode.toUpperCase()\n : '';\n\n if (CCPA_LOCATIONS.includes(this.countryCode) || this.countryCode === '') {\n try {\n this.location = await sendRequest(URLS.locate);\n this.countryCode = this.countryCode === '' ? this.location.country_alpha2 : this.countryCode;\n } catch (err) {\n error({\n err,\n methodName: 'sendRequest',\n eventType: 'geolocation',\n });\n this.location.country = undefined;\n this.location.country_alpha2 = undefined;\n }\n }\n\n try {\n const { shouldLoad, categories } = await checkOutsideUS();\n if (CCPA_LOCATIONS.includes(this.countryCode)) {\n this.consentRule = 'US';\n } else if (shouldLoad && categories.length > 0) {\n this.consentRule = 'GDPR';\n }\n this.consentCategories = categories.reduce((acc, obj) => {\n return {\n ...acc,\n ...obj,\n };\n }, {});\n } catch (err) {\n console.log('[PSM]: Error encountered during location check', err);\n this.consentCategories = {};\n }\n\n cookie.options({\n domain: this.config.cookieDomain,\n maxage: this.config.cookieExpires,\n path: '/',\n samesite: this.config.cookieSameSite,\n secure: this.config.cookieSecure,\n });\n\n this.browser = setBrowser();\n const clientId = `psmFFClient-${this.config.brand}-${this.config.subBrand}`;\n\n this.ffClient = new FeatureFlagClient({\n configUrl: URLS.featureFlag[config.psmEnvironment.toUpperCase()],\n configRefreshInterval: 60000,\n userTargetingProperties: {\n Platform: ['Web'],\n Brand: [config.brand],\n Browser: this.browser,\n ClientID: clientId,\n CountryCode: this.countryCode,\n },\n clientId: clientId,\n });\n\n try {\n const flags = await this.ffClient.queryAllFeatureFlags();\n this.flags = flags.results;\n // Check Outside US feature flag\n if (this.consentRule === 'US' || (this.consentRule === 'GDPR' && this.queryFlag('outside-us-location-check'))) {\n await init();\n }\n } catch (err) {\n error({\n err,\n methodName: 'queryAllFeatureFlags',\n eventType: 'featureFlagging',\n });\n await init();\n }\n }\n\n setSendHHIDCookie() {\n const sendHHID = this.queryFlag('sendHHID');\n return cookie.set('sendHHID', sendHHID);\n }\n\n setSendAuthToken() {\n const sendAuthToken = this.queryFlag('sendAuthToken');\n return cookie.set('sendAuthToken', sendAuthToken);\n }\n\n setIsInExperiment(name: string) {\n const value = this.queryFlag(name);\n return cookie.set(name, value);\n }\n\n setSendWMSegs() {\n const sendWMSegs = this.queryFlag('sendWMSegs');\n return cookie.set('sendWMSegs', sendWMSegs);\n }\n\n async resolveIds() {\n // Confirm IDR service is enabled\n if (!this.queryFlag('idresolve')) {\n debug({\n message: '[PSM]: idresolve flag is disabled',\n methodName: 'resolveIds',\n eventType: 'idresolution',\n });\n return false;\n }\n\n // Check if previous IDR request happened within 24 hours\n const idrTimestampCookie = cookie.get('idrTimestamp') as string | null;\n if (idrTimestampCookie) {\n const idrTimestamp = new Date(idrTimestampCookie);\n const currentTimestamp = new Date();\n const idrLifespan = (currentTimestamp.getTime() - idrTimestamp.getTime()) / 1000 / 60 / 60; // Get lifespan in hours\n\n if (idrLifespan < 24) {\n info({\n message: `[PSM]: IDR lifespan, ${idrLifespan}, less than 24 hours`,\n methodName: 'resolveIds',\n eventType: 'idresolution',\n });\n return false;\n }\n }\n const idrRequestBody = {\n wmukid: this.getWMUKID(),\n // TODO: Replace with abstracted `getThirdPartyIds` method when it exists\n ids: {\n attuuid: getAttUuid(),\n cdpid: this.getCDPID(),\n cnnuid: getCnnUid(),\n convivaid: getConvivaId(),\n ecid: getEcid(),\n kruxid: getKruxId(),\n wmhhid: cookie.get('wmhhid'),\n wminid: cookie.get('wminid'),\n zionid: getZionId(),\n },\n };\n\n // Make IDR request\n try {\n const idrResponse: IdResolveResponse = await sendRequest(URLS.idresolve[this.config.psmEnvironment], {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(idrRequestBody),\n });\n const { wmhhid, wminid, wmsegs, hhidVersion } = idrResponse;\n\n if (!wmhhid) {\n cookie.remove('wmhhid');\n }\n\n if (!wmsegs) {\n localStorage.removeItem('wmsegs');\n }\n\n wmhhid && cookie.set('wmhhid', wmhhid);\n hhidVersion && cookie.set('hhidVersion', hhidVersion.toString());\n wminid && cookie.set('wminid', wminid);\n wmsegs && localStorage.setItem('wmsegs', wmsegs);\n } catch (err) {\n debug({\n err,\n eventType: 'idresolution',\n methodName: 'sendRequest',\n });\n }\n // Set IDR timestamp regardless of IDR response\n cookie.set('idrTimestamp', new Date());\n\n return true;\n }\n\n async resolveAuthTokens(core: PayloadCore) {\n // Confirm auth service is enabled\n if (!this.queryFlag('auth-service')) {\n debug({\n message: '[PSM]: auth-service flag is disabled',\n methodName: 'resolveAuthTokens',\n eventType: 'authService',\n });\n return false;\n }\n let newToken = true;\n let tokenUpdated = false;\n\n // Check if previous auth service request happened within 24 hours\n const resolveAuthTimestampCookie = cookie.get('resolveAuthTimestamp') as string | null;\n if (resolveAuthTimestampCookie) {\n const authTimestamp = new Date(resolveAuthTimestampCookie);\n const authLifespan = (Date.now() - authTimestamp.getTime()) / 1000 / 60 / 60; // Get lifespan in hours\n\n if (authLifespan < 24) {\n info({\n message: `Resolve Auth Token lifespan, ${authLifespan}, less than 24 hours`,\n methodName: 'resolveAuthTokens',\n eventType: 'authService',\n });\n return false;\n }\n }\n\n // Generate Liveramp Object\n let liverampObject;\n let zetaObject;\n let brazeObject;\n let cnnAuthObject;\n let tradeDeskObject;\n const tok_lr_cookie = cookie.get('tok_lr') as string;\n const lr_env_cookie = cookie.get('_lr_env') as string;\n const tok_ttuid_cookie = cookie.get('tok_ttuid') as string;\n\n const liverampEnv = lr_env_cookie ? lr_env_cookie : tok_lr_cookie;\n\n // Add Liveramp obj once\n if (liverampEnv) {\n liverampObject = {\n provider: 'Liveramp ATS',\n details: {\n id: liverampEnv,\n },\n };\n newToken = false;\n tokenUpdated = true;\n }\n\n // Generate Zeta Object\n\n // Confirm Parameters are present\n const bt_ts = fromQueryString('bt_ts', win.location.href);\n const utm_term = fromQueryString('utm_term', win.location.href);\n\n if (bt_ts && utm_term) {\n // Check if bt_ts is less than 24 hours old\n const btLifespan = (Date.now() - parseInt(bt_ts)) / 1000 / 60 / 60;\n\n if (btLifespan > 24) {\n info({\n message: `bt_ts Parameter lifespan, ${btLifespan}, greater than 24 hours`,\n methodName: 'resolveAuthTokens',\n eventType: 'authService',\n });\n return false;\n }\n\n zetaObject = {\n provider: 'zeta',\n details: {\n id: utm_term,\n },\n };\n }\n\n // Generate Braze Object\n const primo = fromQueryString('primo', win.location.href);\n if (primo) {\n brazeObject = {\n provider: 'braze',\n details: {\n id: primo,\n },\n };\n }\n\n // Generate CNN Auth Object\n const cnnUid = getCnnUid();\n if (cnnUid) {\n cnnAuthObject = {\n provider: 'cnnAuthentication',\n details: {\n id: cnnUid,\n },\n };\n }\n\n if (tok_ttuid_cookie) {\n tradeDeskObject = {\n provider: 'tradedesk',\n details: {\n id: tok_ttuid_cookie,\n },\n };\n }\n\n // Return if neither LR envelope or Zeta info is valid\n if (!liverampEnv && (!utm_term || !bt_ts) && !primo && !cnnUid) {\n debug({\n message: '[PSM]: No token information present',\n methodName: 'resolveAuthTokens',\n eventType: 'authService',\n });\n return false;\n }\n\n // Compile all auth objects\n const authObjects = [];\n if (liverampObject?.provider) {\n authObjects.push(liverampObject);\n }\n if (zetaObject?.provider) {\n authObjects.push(zetaObject);\n }\n if (brazeObject?.provider) {\n authObjects.push(brazeObject);\n }\n if (cnnAuthObject?.provider) {\n authObjects.push(cnnAuthObject);\n }\n\n if (tradeDeskObject?.provider) {\n authObjects.push(tradeDeskObject);\n }\n\n const authTokenRequestBody: AuthTokenResolveRequest = {\n wmukid: this.getWMUKID(),\n brand: this.config.brand,\n ids: {\n attuuid: getAttUuid(),\n cdpid: this.getCDPID(),\n convivaid: getConvivaId(),\n ecid: getEcid(),\n kruxid: getKruxId(),\n wmhhid: cookie.get('wmhhid') as string,\n wminid: cookie.get('wminid') as string,\n zionid: getZionId(),\n },\n consentProperties: { usp: cookie.get('usprivacy') as string },\n authentication: authObjects,\n };\n\n // Make IDR request\n try {\n const authResponse: AuthTokenResolveResponse = await sendRequest(URLS.authSvc[this.config.psmEnvironment], {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(authTokenRequestBody),\n });\n const { tokens } = authResponse;\n const liverampToken: AuthServiceTokenObject = tokens.filter((token) => token.provider === 'liveramp')[0];\n cookie.set('tok_lr', liverampToken.token, {\n expires: new Date(liverampToken.expiration),\n });\n if (lr_env_cookie && !tok_lr_cookie) {\n cookie.remove('_lr_env');\n }\n\n const tradeDeskToken: AuthServiceTokenObject = tokens.filter((token) => token.provider === 'tradedesk')[0];\n cookie.set('tok_ttuid', tradeDeskToken.token, {\n expires: new Date(tradeDeskToken.expiration),\n });\n cookie.set('tok_ttuid_refresh', tradeDeskToken.refreshToken, {\n expires: new Date(tradeDeskToken.expiration),\n });\n } catch (err) {\n debug({\n err,\n eventType: 'authService',\n methodName: 'resolveAuthTokens',\n });\n }\n\n this.setSessionProperties();\n hydratePayload(this, core);\n if (newToken) {\n core.trackTokenEvent('new token', new Date().toISOString(), (data) => {\n if (this.queryFlag('doppler-send-token-event')) {\n this.identityQueue.addItem(data);\n this.resetNewSessionFields();\n }\n });\n }\n\n if (tokenUpdated) {\n core.trackTokenEvent('token updated', new Date().toISOString(), (data) => {\n if (this.queryFlag('doppler-send-token-event')) {\n this.identityQueue.addItem(data);\n this.resetNewSessionFields();\n }\n });\n }\n\n // Set IDR timestamp regardless of IDR response\n cookie.set('resolveAuthTimestamp', new Date());\n\n return true;\n }\n\n getPageLoadId(sessionStart, initialPageLoad) {\n const pageLoadIdCookie = cookie.get('psmPageLoadId') as string | null;\n const pageLoadIdInt = pageLoadIdCookie && parseInt(pageLoadIdCookie);\n let pageLoadId = pageLoadIdInt;\n if (sessionStart) {\n pageLoadId = 1;\n }\n if (!sessionStart && initialPageLoad && pageLoadIdInt) {\n pageLoadId = pageLoadIdInt + 1;\n }\n return pageLoadId;\n }\n\n setSessionProperties(initialPageLoad = false) {\n const currentTimestamp = new Date();\n let sessionProperties: SessionProperties = {\n isSessionStart: true,\n pageloadid: this.getPageLoadId(true, initialPageLoad),\n psmLastActiveTimestamp: currentTimestamp.toISOString(),\n psmSessionStart: currentTimestamp.toISOString(),\n sessionDuration: 0,\n sessionid: uuid(),\n };\n\n // Get all stored session info\n const prevSessionId = cookie.get('psmSessionId') as string | null;\n const prevSessionStartCookie = cookie.get('psmSessionStart') as string | null;\n const prevLastActiveTimestampCookie = cookie.get('psmLastActiveTimestamp') as string | null;\n\n if (prevSessionId !== null) {\n const prevLastActiveTimestamp = new Date(prevLastActiveTimestampCookie);\n const prevSessionStartTimestamp = new Date(prevSessionStartCookie);\n const timeSinceLastActivity = currentTimestamp.getTime() - prevLastActiveTimestamp.getTime(); // time past in miliseconds\n\n // if session >max time, then create new session\n if (timeSinceLastActivity > MAX_SESSION_DURATION) {\n info({\n message: `[PSM]: Session ${prevSessionId} timed out after ${timeSinceLastActivity / 1000} seconds.`,\n methodName: 'setSessionProperties',\n eventType: 'session',\n });\n sessionProperties = {\n ...sessionProperties,\n previousSession: {\n psmLastActiveTimestamp: prevLastActiveTimestampCookie,\n psmSessionStart: prevSessionStartCookie,\n sessionDuration: (prevLastActiveTimestamp.getTime() - prevSessionStartTimestamp.getTime()) / 1000,\n sessionid: prevSessionId,\n },\n };\n // If session ({ ...flagObj, [curr.flagId]: curr }), {});\n }\n\n getAdsProperties(): AdsProperties {\n return {\n guid: getAdsGUID() || '',\n transid: getAdsTransactionId() || '',\n ads: registeredSlots,\n };\n }\n\n getConsentProperties(): ConsentProperties {\n return {\n uspString: cookie.get('usprivacy') as string,\n consentRule: this.consentRule,\n optanonConsent: getOptanonConsentCookie() || '',\n };\n }\n\n getBrand(): string {\n return this.config.brand;\n }\n\n getDeviceProperties(): Device {\n return {\n type: win.navigator.platform,\n userAgent: win.navigator.userAgent,\n };\n }\n\n getIds(): Ids {\n return {\n attuuid: getAttUuid() || '',\n cdpid: this.getCDPID(),\n cnnuid: getCnnUid() || '',\n convivaid: getConvivaId() || '',\n ecid: getEcid() || '',\n kruxid: getKruxId() || '',\n liverampatsid: cookie.get('tok_lr') as string,\n wmhhid: cookie.get('wmhhid') as string,\n wminid: cookie.get('wminid') as string,\n zionid: getZionId() || '',\n };\n }\n\n getLibrary(): Library {\n return {\n name: 'Prism JS',\n version: pkg.version,\n initConfig: this.config,\n };\n }\n\n getLocationProperties(): LocationProperties {\n return {\n city: this.location.states[0].cities[0],\n state: this.location.states[0].state,\n country: this.location.country,\n zip: this.location.states[0].zipcodes[0],\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone || null,\n locale: win.navigator.language,\n language: win.navigator.language.split('-')[0] || null,\n };\n }\n\n getNavigationProperties(): NavigationProperties {\n return {\n url: win.location.href,\n rootDomain: findTopDomain(win.location.href),\n referrer: getReferrer(),\n path: win.location.pathname,\n search: win.location.search,\n title: doc.title,\n };\n }\n\n getSessionProperties(): SessionProperties {\n return this.session;\n }\n\n queryFlag(flagId: string): boolean {\n let flagEnabled: boolean = featureFlagDefaults[flagId] || false;\n try {\n const { enabled } = this.flags.find((flag) => {\n return flag.flagId === flagId;\n });\n\n flagEnabled = enabled;\n } catch (err) {\n warn({\n err,\n methodName: 'queryFlag',\n eventType: 'featureFlagging',\n });\n }\n\n return flagEnabled;\n }\n\n private validateConfig(config: Partial) {\n const errors: string[] = [];\n\n if (!this.hasProperty('psmEnvironment', config)) errors.push('Please specify your psmEnvironment.');\n if (!this.hasProperty('brand', config)) errors.push('Please specify your brand.');\n\n if (errors.length) {\n const err = new Error(['[PSM]: Invalid configuration provided.'].concat(errors).join('\\n'));\n\n error({\n err,\n methodName: 'validateConfig',\n eventType: 'configValidation',\n });\n throw err;\n }\n }\n\n private hasProperty(prop: string, obj: any) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n }\n}\n","import { Psm } from './Psm';\n\nexport const psm: Psm = new Psm();\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { v4 as uuid } from 'uuid';\nimport { payloadBuilder, PayloadData, PayloadMap } from './utils/payloadBuilder';\nimport { PsmConfig } from './Psm';\nimport { SlotMetrics } from './adViewability';\n\nexport type Timestamp = number | string;\n\nexport type Ids = {\n attuuid?: string;\n cdpid?: string;\n cnnuid?: string;\n convivaid?: string;\n ecid?: string;\n kruxid?: string;\n liverampatsid?: string;\n tradedeskuid?: string;\n wmhhid?: string;\n wminid?: string;\n zionid?: string;\n hhidVersion?: string;\n};\n\nexport type Device = {\n type: string;\n name?: string;\n model?: string;\n osName?: string;\n osVersion?: string;\n userAgent: string;\n totalWidth?: number;\n totalHeight?: number;\n screenResolution?: string;\n viewportSize?: string;\n};\n\nexport type WMUCLibrary = {\n version: string;\n usingPsm: boolean;\n initConfig?: any;\n};\n\nexport type Library = {\n name: string;\n version: string;\n initConfig: PsmConfig;\n wmucLibrary?: WMUCLibrary;\n};\n\nexport type NavigationProperties = {\n url: string;\n rootDomain: string;\n referrer: string;\n path: string;\n search: string;\n title: string;\n};\n\nexport type LocationProperties = {\n city: string;\n state: string;\n country: string;\n zip: string;\n timezone: string;\n locale?: string;\n language: string;\n};\n\nexport type ConsentProperties = {\n uspString: string;\n consentRule: string;\n optanonConsent?: string;\n};\n\nexport type EngagementMetrics = {\n totalTime?: number;\n engagedTime: number;\n interval: number;\n maxScrollDepth: number;\n currentScrollPosition: number;\n didScrollUpDuringInterval: boolean;\n};\n\nexport type InbrainMetrics = {\n id: any;\n promoPosition?: string;\n destinationURL?: string;\n featureFlagValues: any;\n};\n\nexport type EventProperties = {\n optOut?: boolean;\n doNotSell?: boolean;\n doNotTrack?: boolean;\n cookiesEnabled?: boolean;\n thirdPartyCookiesEnabled?: boolean;\n inPrivateBrowsing?: boolean;\n featureFlagValues: any;\n cookies: any;\n automatedTest?: boolean;\n eventTrigger?: string;\n wmucLibrary?: any;\n heartbeat?: EngagementMetrics;\n inbrain?: InbrainMetrics;\n};\n\nexport type SessionProperties = {\n isSessionStart: boolean;\n pageloadid: number;\n previousSession?: {\n sessionid: string;\n sessionDuration: number;\n psmLastActiveTimestamp: string;\n psmSessionStart: string;\n };\n psmLastActiveTimestamp: string;\n psmSessionStart: string;\n sessionDuration: number;\n sessionid: string;\n};\n\nexport type UserConsentEventDetails = {\n usp?: string;\n region?: string;\n tcf?: string;\n time?: Timestamp;\n new?: Record;\n old?: Record;\n};\n\nexport type IABConsentCategories = {\n consentCategories?: Record;\n};\n\nexport type AdsProperties = {\n guid?: string;\n transid?: string;\n ads?: SlotMetrics[];\n};\n\nexport type ContentMetadata = {\n page?: any;\n video?: any;\n};\n\nexport interface PayloadCore {\n /**\n * Set a persistent key-value pair to be added to every payload\n *\n * @param key Field name\n * @param value Field value\n */\n addEntry(key: string, value: string | boolean | object | number): void;\n\n /**\n * Denote the platform from which an event is generated\n */\n setPlatform(platform: string): void;\n\n /**\n * Add a brand name to every payload\n */\n setBrand(brand: string): void;\n\n /**\n * Add a sub brand name to every payload\n */\n setSubBrand(subBrand: string): void;\n\n /**\n * Add a product name to every payload\n */\n setProductName(productName: string): void;\n\n /**\n * Add a WarnerMedia Unknown Identifier value to every payload\n */\n setWMUKID(wmukid: string): void;\n\n /**\n * Add a set of third-party identifiers to every payload\n */\n setThirdPartyIds(ids: Partial): void;\n\n /**\n * Sets all of the useful device data available from window.navigator\n */\n setDevice(device: Device): void;\n\n /**\n * Capture a set of location details from the page\n */\n setNavigationProperties(ctx: NavigationProperties): void;\n\n /**\n * Add IP address resolved from a geolocation call to every payload\n */\n setClientResolvedIp(ip: string): void;\n\n /**\n * Add geolocation information to every payload\n */\n setLocation(location: LocationProperties): void;\n\n /**\n * Add consent state to every payload\n */\n setConsentProperties(props: ConsentProperties): void;\n\n /**\n * Add IAB consent categories every payload\n */\n setIABCategories(props: IABConsentCategories): void;\n\n /**\n * Add Prism-specific metadata to every payload\n */\n setLibrary(library: Library): void;\n\n /**\n * Grabs optOut, doNotSell, and featureFlagValues and adds them to the eventProperties object\n */\n setEventProperties(props: EventProperties): void;\n\n /**\n * Add user session info to every payload\n */\n setSessionProperties(props: SessionProperties): void;\n\n /**\n * Add ad properties info to every payload\n */\n setAdsProperties(props: AdsProperties): void;\n\n /**\n * Add content metadata to every payload\n */\n setContentMetadata(metadata: ContentMetadata): void;\n\n /**\n * Record an event denoting a page view / visit\n */\n trackAppLoad(ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData;\n\n /**\n * Log that the user is still viewing the current page\n */\n trackHeartbeat(ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData;\n\n /**\n * Log event that comes from PubSub subscription\n */\n trackPubSub(eventName: string, ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData;\n\n /**\n * Log that a new identity has been generated for the user\n */\n trackIdentityRegistration(eventName: string, ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData;\n\n /**\n * Log that the auth token has been changed\n */\n trackTokenEvent(eventName: string, ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData;\n\n /**\n * Log that the user has exited the page\n */\n trackPageExit(eventTrigger: string, ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData;\n\n /**\n * Log that the user has updated consent for privacy\n */\n trackConsentUpdated(\n eventTrigger: string,\n eventDetails?: UserConsentEventDetails,\n ts?: Timestamp,\n cb?: (payload: PayloadMap) => void\n ): PayloadData;\n\n /**\n * Log that the user has granted consent for privacy\n */\n trackConsentGranted(ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData;\n\n /**\n * Log that the user has withdrawn consent for privacy\n */\n trackConsentWithdrawn(ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData;\n\n /**\n * Log the inbrain events\n */\n trackInbrain(eventName: string, ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData;\n}\n\n/**\n * Generate or transform a timestamp.\n *\n * @param timestamp optional timestamp number (UNIX time) or date string\n */\nfunction getTimestamp(timestamp?: Timestamp): string {\n if (timestamp == null || timestamp == undefined) {\n return new Date().toISOString();\n }\n return new Date(timestamp).toISOString();\n}\n\n/**\n * Returns a copy of a JSON object with null and undefined properties removed\n *\n * @param payload JSON object to clean\n * @returns A cleaned copy of the JSON object\n */\nexport const removeEmptyProperties = (payload: PayloadMap): PayloadMap => {\n const result = {};\n\n if (Array.isArray(payload)) {\n return payload;\n } else {\n Object.entries(payload).forEach(([key, value]) => {\n if (value === Object(value)) {\n result[key] = removeEmptyProperties(value as PayloadMap);\n } else if (value !== null && value !== undefined) {\n result[key] = payload[key];\n }\n });\n }\n\n return result;\n};\n\n/**\n * Prism Core factory. This factory function returns a core API object, common to all Prism modules.\n *\n * @param callback Function to be applied to every payload fragment\n * @returns the Prism core\n */\nexport function payloadCore(callback?: (data: PayloadData) => void): PayloadCore {\n // Map of key-value pairs that get added to every payload\n const payloadMap: PayloadMap = {};\n\n /**\n * Set a persistent key-value pair to be added to every payload\n * @param key Field name\n * @param value Field value\n */\n const addEntry = (key: string, value: string | boolean | object | number) => {\n payloadMap[key] = value;\n };\n\n /**\n * Gets called by every \"track\" method\n *\n * @param data The payload\n * @param timestamp Timestamp of the event\n * @param cb A callback function triggered after an event is tracked\n */\n const track = (data: PayloadData, timestamp?: Timestamp, cb?: (data: PayloadMap) => void): PayloadData => {\n // add all common pairs\n data.addMap(removeEmptyProperties(payloadMap));\n // generate an event timestamp\n data.add('eventTimestamp', getTimestamp(timestamp));\n // generate an event ID\n data.add('eventId', uuid());\n\n if (typeof callback === 'function') {\n callback(data);\n }\n\n try {\n cb && cb(data.build());\n } catch (err) {\n console.warn('[PSM]: error running custom callback');\n }\n\n return data;\n };\n\n return {\n addEntry,\n\n setPlatform(platform: string): void {\n addEntry('platform', platform);\n },\n\n setBrand(brand: string): void {\n addEntry('brand', brand);\n },\n\n setSubBrand(brand: string): void {\n addEntry('subBrand', brand);\n },\n\n setProductName(productName: string): void {\n addEntry('productName', productName);\n },\n\n setWMUKID(wmukid: string): void {\n addEntry('wmukid', wmukid);\n },\n\n setThirdPartyIds(ids: Partial): void {\n addEntry('ids', ids);\n },\n\n setDevice(device: Device): void {\n addEntry('device', device);\n },\n\n setNavigationProperties(props: NavigationProperties): void {\n addEntry('navigationProperties', props);\n },\n\n setClientResolvedIp(ip: string): void {\n addEntry('clientResolvedIp', ip);\n },\n\n setLocation(location: LocationProperties): void {\n addEntry('location', location);\n },\n\n setConsentProperties(props: ConsentProperties): void {\n addEntry('consentProperties', props);\n },\n\n setIABCategories(props: IABConsentCategories): void {\n addEntry('iabConsentCategories', props);\n },\n\n setLibrary(library: Library): void {\n const win = window as any;\n const wmObject = win.WM as any;\n const wmuc = wmObject?.UserConsent as any;\n let wmucLibrary = null;\n\n if (wmuc) {\n wmucLibrary = {\n version: wmuc.getVersion(),\n usingPsm: wmuc.usingPSM(),\n initConfig: wmObject.UserConsentConfig,\n };\n }\n\n addEntry('library', { wmucLibrary, ...library });\n },\n\n setEventProperties(props: EventProperties): void {\n addEntry('eventProperties', props);\n },\n\n setSessionProperties(props: SessionProperties): void {\n addEntry('session', props);\n },\n\n setAdsProperties(props: AdsProperties): void {\n addEntry('adsProperties', props);\n },\n\n setContentMetadata(metadata: ContentMetadata): void {\n addEntry('contentMetadata', metadata);\n },\n\n trackAppLoad(ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData {\n const data = payloadBuilder();\n\n data.add('eventType', 'telemetry');\n data.add('eventName', 'appLoad');\n\n return track(data, ts, cb);\n },\n\n trackHeartbeat(ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData {\n const data = payloadBuilder();\n\n data.add('eventType', 'telemetry');\n data.add('eventName', 'heartbeat');\n\n return track(data, ts, cb);\n },\n\n trackPubSub(eventName: string, ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData {\n const data = payloadBuilder();\n const eventProperties = {\n eventTrigger: 'pubsub',\n };\n\n data.add('eventType', 'telemetry');\n data.add('eventName', eventName);\n addEntry('eventProperties', eventProperties);\n\n return track(data, ts, cb);\n },\n\n trackIdentityRegistration(eventName: string, ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData {\n const data = payloadBuilder();\n\n data.add('eventType', 'identity');\n data.add('eventName', eventName);\n\n return track(data, ts, cb);\n },\n\n trackTokenEvent(eventName: string, ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData {\n const data = payloadBuilder();\n\n data.add('eventType', 'token');\n data.add('eventName', eventName);\n\n return track(data, ts, cb);\n },\n\n trackConsentUpdated(\n eventTrigger: string,\n eventDetails?: UserConsentEventDetails,\n ts?: Timestamp,\n cb?: (payload: PayloadMap) => void\n ): PayloadData {\n const data = payloadBuilder();\n const eventProperties = {\n eventTrigger,\n uspString: eventDetails?.usp,\n region: eventDetails?.region,\n };\n\n data.add('eventType', 'privacy');\n data.add('eventName', 'consent update');\n addEntry('eventProperties', eventProperties);\n\n return track(data, ts, cb);\n },\n\n trackConsentGranted(ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData {\n const data = payloadBuilder();\n\n data.add('eventType', 'privacy');\n data.add('eventName', 'ccpaShareData');\n\n return track(data, ts, cb);\n },\n\n trackConsentWithdrawn(ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData {\n const data = payloadBuilder();\n\n data.add('eventType', 'privacy');\n data.add('eventName', 'ccpaShareData');\n\n return track(data, ts, cb);\n },\n\n trackPageExit(eventTrigger: string, ts?: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData {\n const data = payloadBuilder();\n\n data.add('eventType', 'telemetry');\n data.add('eventName', 'pageExit');\n data.add('eventTrigger', eventTrigger);\n\n return track(data, ts, cb);\n },\n\n trackInbrain(eventName: string, ts: Timestamp, cb?: (payload: PayloadMap) => void): PayloadData {\n const data = payloadBuilder();\n\n data.add('eventType', 'telemetry');\n data.add('eventName', eventName);\n return track(data, ts, cb);\n },\n };\n}\n"],"names":["check","it","Math","globalThis","window","self","global","Function","exec","error","fails","Object","defineProperty","get","$propertyIsEnumerable","propertyIsEnumerable","getOwnPropertyDescriptor","call","1","V","descriptor","this","enumerable","bitmap","value","configurable","writable","toString","slice","split","classof","undefined","TypeError","IndexedObject","requireObjectCoercible","input","PREFERRED_STRING","isObject","fn","val","valueOf","argument","hasOwnProperty","key","toObject","document","EXISTS","createElement","DESCRIPTORS","a","$getOwnPropertyDescriptor","O","P","toIndexedObject","toPrimitive","IE8_DOM_DEFINE","has","createPropertyDescriptor","propertyIsEnumerableModule","f","String","$defineProperty","Attributes","anObject","object","definePropertyModule","createNonEnumerableProperty","setGlobal","functionToString","store","inspectSource","set","WeakMap","test","module","push","version","mode","copyright","id","postfix","random","keys","shared","uid","NATIVE_WEAK_MAP","state","wmget","wmhas","wmset","metadata","facade","STATE","sharedKey","hiddenKeys","objectHas","match","enforce","getterFor","TYPE","type","getInternalState","InternalStateModule","enforceInternalState","TEMPLATE","options","unsafe","simple","noTargetGet","source","join","prototype","aFunction","variable","namespace","method","arguments","length","path","ceil","floor","isNaN","min","toInteger","max","index","integer","createMethod","IS_INCLUDES","$this","el","fromIndex","toLength","toAbsoluteIndex","includes","indexOf","require$$0","names","i","result","enumBugKeys","concat","getOwnPropertyNames","internalObjectKeys","getOwnPropertySymbols","getBuiltIn","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","target","ownKeys","getOwnPropertyDescriptorModule","replacement","isForced","feature","detection","data","normalize","POLYFILL","NATIVE","string","replace","toLowerCase","targetProperty","sourceProperty","TARGET","GLOBAL","STATIC","stat","forced","copyConstructorProperties","sham","redefine","Array","isArray","arg","propertyKey","process","versions","v8","userAgent","Symbol","V8_VERSION","NATIVE_SYMBOL","iterator","WellKnownSymbolsStore","createWellKnownSymbol","USE_SYMBOL_AS_UID","withoutSetter","name","SPECIES","wellKnownSymbol","originalArray","C","constructor","METHOD_NAME","array","foo","Boolean","IS_CONCAT_SPREADABLE","IS_CONCAT_SPREADABLE_SUPPORT","SPECIES_SUPPORT","arrayMethodHasSpeciesSupport","isConcatSpreadable","spreadable","$","proto","k","len","E","A","arraySpeciesCreate","n","createProperty","that","b","c","apply","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","IS_FILTER_OUT","NO_HOLES","callbackfn","specificCreate","boundFunction","bind","create","forEach","map","filter","some","every","find","findIndex","filterOut","$filter","HAS_SPECIES_SUPPORT","activeXDocument","defineProperties","Properties","objectKeys","IE_PROTO","EmptyConstructor","scriptTag","content","LT","NullProtoObject","domain","ActiveXObject","iframeDocument","iframe","write","close","temp","parentWindow","NullProtoObjectViaActiveX","documentCreateElement","style","display","html","appendChild","src","contentWindow","open","F","UNSCOPABLES","ArrayPrototype","$find","SKIPS_HOLES","addToUnscopables","$includes","IS_RIGHT","argumentsLength","memo","left","right","$reduce","STRICT_METHOD","arrayMethodIsStrict","IS_NODE","CHROME_VERSION","reduce","nativeSlice","start","end","Constructor","fin","$assign","assign","B","symbol","chr","T","S","j","Promise","setPrototypeOf","setter","CORRECT_SETTER","aPossiblePrototype","__proto__","TO_STRING_TAG","TAG","CONSTRUCTOR_NAME","ITERATOR","CORRECT_ARGUMENTS","classofRaw","TO_STRING_TAG_SUPPORT","tag","tryGet","callee","returnMethod","Result","stopped","iterable","unboundFunction","iterFn","next","step","AS_ENTRIES","IS_ITERATOR","INTERRUPTED","stop","condition","iteratorClose","callFn","Iterators","getIteratorMethod","done","SAFE_CLOSING","called","iteratorWithReturn","return","from","defer","channel","port","location","setImmediate","clear","clearImmediate","MessageChannel","Dispatch","counter","queue","run","runner","listener","event","post","postMessage","protocol","host","args","nextTick","now","IS_IOS","port2","port1","onmessage","addEventListener","importScripts","removeChild","setTimeout","flush","head","last","notify","toggle","node","promise","then","macrotask","require$$1","MutationObserver","WebKitMutationObserver","queueMicrotaskDescriptor","queueMicrotask","parent","exit","enter","IS_WEBOS_WEBKIT","resolve","createTextNode","observe","characterData","Internal","OwnPromiseCapability","PromiseWrapper","nativeThen","task","PromiseCapability","reject","$$resolve","$$reject","setInternalState","getInternalPromiseState","NativePromisePrototype","NativePromise","PromiseConstructor","PromiseConstructorPrototype","newPromiseCapability","newPromiseCapabilityModule","newGenericPromiseCapability","DISPATCH_EVENT","createEvent","dispatchEvent","NATIVE_REJECTION_EVENT","PromiseRejectionEvent","SUBCLASSING","FORCED","GLOBAL_CORE_JS_PROMISE","FakePromise","IS_BROWSER","INCORRECT_ITERATION","SKIP_CLOSING","ITERATION_SUPPORT","all","checkCorrectnessOfIteration","isThenable","isReject","notified","chain","reactions","microtask","ok","exited","reaction","handler","fail","rejection","onHandleUnhandled","onUnhandled","reason","initEvent","console","hostReportErrors","isUnhandled","perform","emit","unwrap","internalReject","internalResolve","wrapper","executor","anInstance","redefineAll","onFulfilled","onRejected","defaultConstructor","catch","wrap","setToStringTag","setSpecies","r","capability","x","promiseCapability","promiseResolve","$promiseResolve","values","remaining","iterate","alreadyCalled","race","ignoreCase","multiline","dotAll","unicode","sticky","RE","s","RegExp","re","lastIndex","flags","UNSUPPORTED_Y","objectDefinePropertyModule","regExpFlags","MATCH","isRegExp","regexp","error1","error2","correctIsRegExpLogic","searchString","notARegExp","nativeExec","nativeReplace","patchedExec","UPDATES_LAST_INDEX_WRONG","re1","re2","stickyHelpers","BROKEN_CARET","NPCG_INCLUDED","str","reCopy","regexpFlags","charsAdded","strCopy","RegExpPrototype","REPLACE","groups","originalExec","is","y","KEY","SEARCH","nativeSearch","maybeCallNative","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","methods","nativeMethod","arg2","forceStringMethod","$exec","regexpExec","searcher","res","rx","previousLastIndex","sameValue","R","regExpExec","regexMethod","getRandomValues","crypto","msCrypto","rnds8","Uint8Array","rng","Error","validate","uuid","REGEX","byteToHex","substr","v4","buf","offset","rnds","arr","stringify","exports","url","href","hash","hostname","pathname","charAt","search","query","isAbsolute","parse","m","h","d","parseFloat","ms","plural","long","round","short","disabled","enabled","curr","Date","prevTime","diff","prev","useColors","color","selectColor","coerce","format","formatter","formatters","splice","formatArgs","logFn","log","stack","message","enable","namespaces","save","skips","prevColor","colors","debug","load","storage","e","humanize","lastC","removeItem","documentElement","firebug","exception","table","navigator","parseInt","$1","chrome","local","localStorage","localstorage","v","JSON","encode","maxage","expires","toUTCString","secure","cookie","err","pair","obj","pairs","decode","encodeURIComponent","decodeURIComponent","levels","opts","parts","info","cookieHelper","samesite","cookieName","cookieValue","_options","getAll","remove","findTopDomain","reg","referrer","extractRequestPayload","request","payload","IteratorPrototype","PrototypeOfArrayIteratorPrototype","arrayIterator","CACHE_USED","FeatureFlagStorage","storageType","clientId","warnings","code","UNABLE_TO_ACCESS_LOCAL_STORAGE","sessionStorage","UNABLE_TO_ACCESS_SESSION_STORAGE","storeItem","Storage","storageKey","getItem","setItem","deleteItem","getPrototypeOf","ObjectPrototype","CORRECT_PROTOTYPE_GETTER","BUGGY_SAFARI_ITERATORS","returnThis","IteratorsCore","_catch","body","recover","Iterable","NAME","IteratorConstructor","DEFAULT","IS_SET","kind","createIteratorConstructor","CurrentIteratorPrototype","getIterationMethod","KIND","defaultIterator","IterablePrototype","INCORRECT_VALUES_NAME","nativeIterator","anyNativeIterator","entries","defineIterator","iterated","Arguments","ERROR","HEX_CHARS","EXTRA","SHIFT","K","Sha256","blocks","h0","h1","h2","h3","h4","h5","h6","h7","block","bytes","hBytes","finalized","hashed","first","lastByteIndex","update","notString","ArrayBuffer","isView","charCodeAt","finalize","t1","ab","da","cd","bc","g","hex","digest","arrayBuffer","buffer","dataView","DataView","setUint32","ownProps","resArray","predicate","o","thisArg","kValue","BUFFER","FeatureFlagClient","context","fallbackConfig","quickInit","config","configRefreshIntervalDefault","featureFlagUserId","initialized","libraryLanguage","globalWarnings","addStorageWarnings","addStorageWarningsWarnings","_this2","warning","targetingPropsToLowerCase","targetingProperties","acc","valueLowerCase","entry","configUrl","createHash","userId","salt","createUserId","getUserFeatureIndex","substring","init","initWarnings","_userId","_this4","ffUserId","userTargetingProperties","ffLibraryLanguage","updateContext","configRefreshInterval","cacheIsExpired","checkConfigCacheExpiry","configFromStorage","updateConfig","prevETag","loadAndSetRemoteConfig","_exit2","setNoNewConfigWarning","interval","expired","setIntervalStart","timestamp","configCacheStartSerialized","_now","getTime","configCacheStart","_now2","isFeatureEnabled","flagName","queryFeatureFlag","parseHeaders","responseHeaders","current","_this8","loadConfig","response","eTag","headers","etag","If-None-Match","Content-Type","XMLHttpRequest","const","onload","getAllResponseHeaders","status","statusText","responseURL","text","responseText","json","blob","Blob","clone","onerror","withCredentials","credentials","setRequestHeader","send","fetch","responsePayload","responseJson","extractResponsePayload","makeRequest","userTargeting","replaceAllTargeting","newContext","mergedTargetingProperties","getCohortConfig","cohortConfigs","cohortConfig","rolloutValue","cohortPriority","stickinessProperty","cohortConfigsSorted","sort","clientTargetingProperties","matchedCohortConfig","matchDetected","cohortCriteria","cohortFields","requiredFieldName","requiredFieldValues","cohortFieldFoundInContext","fieldValue","contextValue","cacheFlagResults","results","prevResults","prevResultsReduced","newResults","storedResultsString","storedResults","accumulator","currentValue","flagId","mergedResults","checkIfFlagUpdated","prevFlag","isQueryAll","flagConfig","hashId","operationalId","userFeatureIndex","_this10","mergeWarnings","updatedSinceLastQuery","userIdType","arrayToMerge","getFlagConfig","flag","getFallbackConfig","defaultValue","initWwarnings","_exit6","cohorts","_addStorageWarningsWarnings","_result","queryAllFeatureFlags","_this","_this12","featureFlagResponse","anyFlagsUpdatedSinceLastQuery","promises","featureFlagData","IDX","HEX","num","out","hop","strCharAt","toStr","prop","indexKeys","pred","isArrayLike","_nodeId","_clockseq","_lastMSecs","_lastNSecs","ii","bytesToUuid","v1","clockseq","seedBytes","msecs","nsecs","dt","tl","tmh","inMemoryStore","_data","isSupportedNatively","objToString","arrayEach","baseEach","ks","collection","isNumber","defaultEngine","inMemoryEngine","Store","optionalEngine","engine","originalEngine","compoundKey","_createValidKey","quotaExceeded","number","isQuotaExceeded","_swapEngine","getOriginalEngine","each","defaultClock","clearTimeout","clock","modes","ASAP","RESCHEDULE","ABANDON","Schedule","tasks","nextId","timeout","_handle","cancel","cancelAll","callback","setClock","newClock","resetClock","Modes","fmt","disable","toFixed","Emitter","mixin","on","_callbacks","once","off","removeListener","removeAllListeners","removeEventListener","cb","callbacks","listeners","hasListeners","func","Queue","maxItems","Infinity","maxAttempts","backoff","MIN_RETRY_DELAY","minRetryDelay","MAX_RETRY_DELAY","maxRetryDelay","FACTOR","backoffFactor","JITTER","backoffJitter","timeouts","ACK_TIMER","RECLAIM_TIMER","RECLAIM_TIMEOUT","RECLAIM_WAIT","IN_PROGRESS","QUEUE","RECLAIM_START","RECLAIM_END","ACK","_schedule","_processId","_store","_ack","_checkReclaim","_processHead","_running","shouldRetry","_","attemptNumber","getDelay","pow","rand","deviation","Number","toPrecision","addItem","item","_enqueue","time","requeue","inProgress","toRun","enqueue","inProgressSize","shift","_reclaim","tryReclaim","findOtherQueues","other","our","their","trackMessageIds","addConcatQueue","incrementAttemptNumberBy","dummy","Wrapper","NewTarget","NewTargetPrototype","require$$2","NativeRegExp","CORRECT_NEW","RegExpWrapper","pattern","thisIsRegExp","patternIsRegExp","flagsAreUndefined","getFlags","inheritIfRequired","proxy","FunctionPrototype","FunctionPrototypeToString","nameRE","whitespace","ltrim","rtrim","trim","require$$3","NativeNumber","NumberPrototype","BROKEN_CLASSOF","toNumber","third","radix","maxCode","digits","NaN","NumberWrapper","TO_ENTRIES","$entries","URLS","lightningOrigin","iFramePath","DEV","TEST","PROD","INTEGRATION","AUTOMATED_TEST","thirdPartyCookie","carouselScript","carouselStyles","locate","featureFlag","identity","inbrain","idresolve","logs","authSvc","CCPA_LOCATIONS","featureFlagDefaults","auth-service","doppler-identity-onstart","doppler-identity-oncomplete","doppler-session","doppler-privacy","doppler-telemetry","doppler-consent-update","doppler-heartbeat-event","doppler-pubsub-event","outside-us-location-check","doppler-send-logs","doppler-send-token-event","sendAuthToken","sendHHID","isInAuthTokenExperiment","isInHHIDExperiment","sendWMSegs","inBrainTemplateBeta","inBrainRecommendationsBeta","test-enabled","test-disabled","queueOptions","win","doc","cookiesEnabled","hasLocalStorage","localStorageAccessible","detectViewport","alias","modifier","width","height","detectDocumentSize","de","be","bh","offsetHeight","scrollHeight","w","clientWidth","offsetWidth","scrollWidth","clientHeight","getReferrer","oldLocation","top","throttle","wait","queuedToRun","previouslyRun","invokeFn","fromQueryString","field","SendRequestError","sendRequest","logger","environment","level","brand","device","platform","eventName","eventProperties","logMessage","methodName","featureFlagValues","stackTrace","eventType","eventTimestamp","toISOString","library","initConfig","session","wmukid","localStorageDebugFlag","queryStringDebugFlag","is3PCookiesEnabled","$some","adObserver","registeredSlots","googletag","cmd","timeInSeconds","addDistinctRegisteredSlot","slot","regSlot","slotId","resetAdViewMetrics","totalViewTime","totalHoverTime","adWasViewed","updateSlotTimer","lastStarted","lastViewStarted","currentTime","updateAdHoverTimer","lastHoverStarted","adListeners","lastEngagementEvent","documentEvents","windowEvents","hbStartTimestamp","engagement","totalTime","engagedTime","HEARTBEAT_INTERVAL","maxScrollDepth","scrollY","currentScrollPosition","didScrollUpDuringInterval","handleEngagementEvent","totalHeight","setEngagementMetrics","resetHbInterval","scroll","getAdsTransactionId","turner_getTransactionId","getAdsGUID","getKruxId","getAttUuid","att","getOptanonConsentCookie","optanonConsentCookie","getEcid","s_ecid","s_vi","AMCVCookie","AMCVSplit","idKeyIndex","grabIDFromAMCVCookie","getCnnUid","cnnUid","zionObj","getConvivaId","convivaIdKey","clId","getZionId","zionId","ZionMessageBus","idObjects","getInstance","watching","id_found","messageQueue","zaidObject","idObject","_idObject$message","getMetadataPropValue","locations","dynDataObj","propValue","propArr","getContentMetadata","metadataConfig","staticLocations","dynamicLocations","core","inbrainMetrics","hydratePayload","psm","totalSize","setPlatform","addEntry","setBrand","setSubBrand","subBrand","setProductName","setLibrary","setDevice","totalWidth","screenResolution","screen","viewportSize","setNavigationProperties","rootDomain","title","setClientResolvedIp","ip_address","setLocation","city","states","cities","country","zip","zipcodes","timezone","Intl","DateTimeFormat","resolvedOptions","timeZone","locale","language","setConsentProperties","uspString","consentRule","optanonConsent","setIABCategories","consentCategories","setWMUKID","setEventProperties","thirdPartyCookiesEnabled","doNotTrack","cookies","automatedTest","psmEnvironment","heartbeat","setSessionProperties","setAdsProperties","guid","transid","ads","setThirdPartyIds","attuuid","cdpid","getCDPID","cnnuid","convivaid","ecid","kruxid","liverampatsid","tradedeskuid","wmhhid","wminid","zionid","hhidVersion","setContentMetadata","page","contentMetadata","video","initInbrain","payloadCore","selector","placement","pages","matches","splitPathForPromo","splitPathFromWindow","pathMatch","pathitem","shouldRender","elem","querySelector","observer","disconnect","childList","subtree","renderedHTML","innerHTML","insertAdjacentHTML","swiperStyles","rel","getElementsByTagName","parentElement","insertBefore","swiperScript","inbrainCarousel","Swiper","watchSlidesProgress","slidesPerView","spaceBetween","navigation","nextEl","prevEl","sendPromoLoadedEvents","env","sendPromoVisibleEvents","IntersectionObserver","isIntersecting","intersectionRatio","root","rootMargin","threshold","querySelectorAll","dataset","promoPosition","slotindex","destinationURL","setInbrainMetrics","trackInbrain","sendEvent","toUpperCase","queryFlag","usp","getLocationProperties","getDeviceProperties","ids","getIds","inbrainURL","getContentURL","promoLoadedEventsSent","promoVisibleEventsSent","grabCarouselPromos","grabIDs","elements","elementIDs","payloadBuilder","add","addMap","addJson","property","isJson","isNonEmptyJson","build","refreshIntervalId","cookieSameSite","cookieSecure","cookieExpires","asn","continent","continentName","country_alpha2","country_alpha3","lat","lon","counties","WM","PSM","initPsm","getVersion","getWMUKID","getConfig","getAdsProperties","getConsentProperties","getBrand","getLibrary","getNavigationProperties","getSessionProperties","isDopplerIdentityOnStartEnabled","isDopplerIdentityOnCompleteEnabled","isDopplerPrivacyEnabled","isDopplerTelemetryEnabled","cookieDomain","browser","isSafari","isFirefox","isChrome","isEdge","setBrowser","ffClient","Platform","Brand","Browser","ClientID","CountryCode","countryCode","categories","__tcfapi","shouldLoad","defaultCategories","3","5","6","8","9","10","tcData","success","purpose","combined","legitimateInterests","consents","special-purpose-1","special-purpose-2","feature-1","feature-2","feature-3","ready","ts","createLogger","payloadMap","track","removeEmptyProperties","getTimestamp","warn","productName","props","ip","wmObject","wmuc","UserConsent","wmucLibrary","usingPsm","usingPSM","UserConsentConfig","trackAppLoad","trackHeartbeat","trackPubSub","eventTrigger","trackIdentityRegistration","trackTokenEvent","trackConsentUpdated","eventDetails","region","trackConsentGranted","trackConsentWithdrawn","trackPageExit","identityQueue","sentAtTimestamp","wmukidStable","isUUID","updateCdpData","cdpId","wmukId","utm_term","searchURL","thirdPartyIFrame","setAttribute","origin","cdpidValid","cdpidStr","locator","cmpFrame","frames","findFrame","initIdentity","waitForCdpId","initIdentityAsync","resolveIds","setSendAuthToken","setSendHHIDCookie","setIsInExperiment","setSendWMSegs","resolveAuthTokens","publish","resetNewSessionFields","detail","inViewPercentage","rect","boundingClientRect","getBoundingClientRect","contains","elementFromPoint","bottom","isElementVisible","visibleOnStart","slotSize","pubads","getSlotElementId","adUnitPath","getAdUnitPath","getElementById","size","rfv","getTargeting","creativeId","lineItemId","getSlots","adSlot","sendBeacon","visibilityState","unobserve","clearInterval","setInterval","initHeartbeat","persisted","topics","topic","PubSub","subscribe","psmPubSubData","validateConfig","hasProperty","_this6","idrTimestampCookie","idrTimestamp","idrLifespan","idrRequestBody","idrResponse","wmsegs","newToken","tokenUpdated","liverampObject","zetaObject","brazeObject","cnnAuthObject","tradeDeskObject","resolveAuthTimestampCookie","authTimestamp","authLifespan","tok_lr_cookie","lr_env_cookie","tok_ttuid_cookie","liverampEnv","provider","details","bt_ts","btLifespan","primo","authObjects","_liverampObject","_zetaObject","_brazeObject","_cnnAuthObject","_tradeDeskObject","authTokenRequestBody","consentProperties","authentication","authResponse","tokens","liverampToken","token","expiration","tradeDeskToken","refreshToken","getPageLoadId","sessionStart","initialPageLoad","pageLoadIdCookie","pageLoadIdInt","pageLoadId","currentTimestamp","sessionProperties","isSessionStart","pageloadid","psmLastActiveTimestamp","psmSessionStart","sessionDuration","sessionid","prevSessionId","prevSessionStartCookie","prevLastActiveTimestampCookie","prevLastActiveTimestamp","prevSessionStartTimestamp","timeSinceLastActivity","previousSession","flagObj","flagEnabled","errors"],"mappings":"4hBAAA,IAAIA,EAAQ,SAAUC,GACpB,OAAOA,GAAMA,EAAGC,MAAQA,MAAQD,KAMhCD,EAA2B,iBAAdG,YAA0BA,aACvCH,EAAuB,iBAAVI,QAAsBA,SAEnCJ,EAAqB,iBAARK,MAAoBA,OACjCL,EAAuB,iBAAVM,GAAsBA,IAElC,WAAc,YAAd,IAAmCC,SAAS,cAATA,KCbrB,SAAUC,GACzB,IACE,QAASA,IACT,MAAOC,GACP,cCDcC,EAAM,WAEtB,OAA8E,GAAvEC,OAAOC,eAAe,GAAI,EAAG,CAAEC,IAAK,WAAc,YAAe,KCJtEC,EAAwB,GAAGC,qBAE3BC,EAA2BL,OAAOK,8BAGpBA,IAA6BF,EAAsBG,KAAK,CAAEC,EAAG,GAAK,GAI1D,SAA8BC,GACtD,IAAIC,EAAaJ,EAAyBK,KAAMF,GAChD,QAASC,GAAcA,EAAWE,YAChCR,KCba,SAAUS,EAAQC,GACjC,MAAO,CACLF,aAAuB,EAATC,GACdE,eAAyB,EAATF,GAChBG,WAAqB,EAATH,GACZC,MAAOA,ICLPG,EAAW,GAAGA,WA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