{"version":3,"sources":["node_modules/@newrelic/browser-agent/dist/esm/common/util/console.js","node_modules/@newrelic/browser-agent/dist/esm/common/session/constants.js","node_modules/@newrelic/browser-agent/dist/esm/common/timing/now.js","node_modules/@newrelic/browser-agent/dist/esm/common/constants/runtime.js","node_modules/@newrelic/browser-agent/dist/esm/common/ids/unique-id.js","node_modules/@newrelic/browser-agent/dist/esm/common/window/nreum.js","node_modules/@newrelic/browser-agent/dist/esm/common/config/state/configurable.js","node_modules/@newrelic/browser-agent/dist/esm/common/config/state/info.js","node_modules/@newrelic/browser-agent/dist/esm/features/logging/constants.js","node_modules/@newrelic/browser-agent/dist/esm/common/dom/query-selector.js","node_modules/@newrelic/browser-agent/dist/esm/common/config/state/init.js","node_modules/@newrelic/browser-agent/dist/esm/common/constants/env.npm.js","node_modules/@newrelic/browser-agent/dist/esm/common/config/state/runtime.js","node_modules/@newrelic/browser-agent/dist/esm/common/config/state/loader-config.js","node_modules/@newrelic/browser-agent/dist/esm/common/config/state/originals.js","node_modules/@newrelic/browser-agent/dist/esm/common/config/config.js","node_modules/@newrelic/browser-agent/dist/esm/common/ids/bundle-id.js","node_modules/@newrelic/browser-agent/dist/esm/common/util/get-or-set.js","node_modules/@newrelic/browser-agent/dist/esm/common/event-emitter/event-context.js","node_modules/@newrelic/browser-agent/dist/esm/common/event-emitter/contextual-ee.js","node_modules/@newrelic/browser-agent/dist/esm/common/event-emitter/handle.js","node_modules/@newrelic/browser-agent/dist/esm/features/metrics/constants.js"],"sourcesContent":["/**\n * A helper method to warn to the console with New Relic: decoration\n * @param {string} message The primary message to warn\n * @param {*} [secondary] Secondary data to include, usually an error or object\n * @returns\n */\nexport function warn(message, secondary) {\n if (typeof console.warn !== 'function') return;\n console.warn(\"New Relic: \".concat(message));\n if (secondary) console.warn(secondary);\n}","export const PREFIX = 'NRBA';\nexport const DEFAULT_KEY = 'SESSION';\nexport const DEFAULT_EXPIRES_MS = 14400000;\nexport const DEFAULT_INACTIVE_MS = 1800000;\nexport const SESSION_EVENTS = {\n STARTED: 'session-started',\n PAUSE: 'session-pause',\n RESET: 'session-reset',\n RESUME: 'session-resume',\n UPDATE: 'session-update'\n};\nexport const SESSION_EVENT_TYPES = {\n SAME_TAB: 'same-tab',\n CROSS_TAB: 'cross-tab'\n};\nexport const MODE = {\n OFF: 0,\n FULL: 1,\n ERROR: 2\n};","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// This is our own layer around performance.now. It's not strictly necessary, but we keep it in case of future mod-ing of the value for refactor purpose.\nexport function now() {\n return Math.floor(performance.now());\n}","/**\n * @file Contains constants about the environment the agent is running\n * within. These values are derived at the time the agent is first loaded.\n * @copyright 2023 New Relic Corporation. All rights reserved.\n * @license Apache-2.0\n */\n\nimport { now } from '../timing/now';\n\n/**\n * Indicates if the agent is running within a normal browser window context.\n */\nexport const isBrowserScope = typeof window !== 'undefined' && !!window.document;\n\n/**\n * Indicates if the agent is running within a worker context.\n */\nexport const isWorkerScope = typeof WorkerGlobalScope !== 'undefined' && (typeof self !== 'undefined' && self instanceof WorkerGlobalScope && self.navigator instanceof WorkerNavigator || typeof globalThis !== 'undefined' && globalThis instanceof WorkerGlobalScope && globalThis.navigator instanceof WorkerNavigator);\nexport const globalScope = isBrowserScope ? window : typeof WorkerGlobalScope !== 'undefined' && (typeof self !== 'undefined' && self instanceof WorkerGlobalScope && self || typeof globalThis !== 'undefined' && globalThis instanceof WorkerGlobalScope && globalThis);\nexport const loadedAsDeferredBrowserScript = globalScope?.document?.readyState === 'complete';\nexport const initiallyHidden = Boolean(globalScope?.document?.visibilityState === 'hidden');\nexport const initialLocation = '' + globalScope?.location;\nexport const isiOS = /iPad|iPhone|iPod/.test(globalScope.navigator?.userAgent);\n\n/**\n * Shared Web Workers introduced in iOS 16.0+ and n/a in 15.6-\n *\n * It was discovered in Safari 14 (https://bugs.webkit.org/show_bug.cgi?id=225305) that the buffered flag in PerformanceObserver\n * did not work. This affects our onFCP metric in particular since web-vitals uses that flag to retrieve paint timing entries.\n * This was fixed in v16+.\n */\nexport const iOSBelow16 = isiOS && typeof SharedWorker === 'undefined';\nexport const ffVersion = (() => {\n const match = globalScope.navigator?.userAgent?.match(/Firefox[/\\s](\\d+\\.\\d+)/);\n if (Array.isArray(match) && match.length >= 2) {\n return +match[1];\n }\n return 0;\n})();\nexport const isIE = Boolean(isBrowserScope && window.document.documentMode); // deprecated property that only works in IE\n\nexport const supportsSendBeacon = !!globalScope.navigator?.sendBeacon;\n\n/**\n * Represents the absolute timestamp in milliseconds that the page was loaded\n * according to the browser's local clock.\n * @type {number}\n */\nexport const originTime = Date.now() - now();","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { globalScope } from '../constants/runtime';\nconst uuidv4Template = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n\n/**\n * Creates a random single hexadecimal value from a provided random value\n * table and corresponding index. If a random value table is not provided,\n * Math.random will be used to generate the value.\n *\n * @param {Uint8Array} valueTable Random value table typically generated using\n * the built-in crypto engine.\n * @param {int} tableIndex The index of the value table to use for generating\n * the hexadecimal value.\n * @returns {int} single hexadecimal value in decimal format\n */\nfunction getRandomValue(valueTable, tableIndex) {\n if (valueTable) {\n /**\n * The value table could have any number value in the given index. Use\n * bitwise AND to ensure the value we generate is a valid hex value.\n * x & 15 will ensure the value converted to hex using `toString(16)`\n * falls within the range of 0 and 15 inclusively.\n */\n return valueTable[tableIndex] & 15;\n } else {\n return Math.random() * 16 | 0;\n }\n}\n\n/**\n * Generates a RFC compliant UUIDv4 using native browser crypto engine. If the browser\n * does not support the crypto engine, the function will fallback to insecure Math.random()\n * @returns {string} uuid version 4 string\n */\nexport function generateUuid() {\n const crypto = globalScope?.crypto || globalScope?.msCrypto;\n let randomValueTable;\n let randomValueIndex = 0;\n if (crypto && crypto.getRandomValues) {\n // For a UUID, we only need 30 characters since two characters are pre-defined\n // eslint-disable-next-line\n randomValueTable = crypto.getRandomValues(new Uint8Array(30));\n }\n return uuidv4Template.split('').map(templateInput => {\n if (templateInput === 'x') {\n return getRandomValue(randomValueTable, randomValueIndex++).toString(16);\n } else if (templateInput === 'y') {\n // this is the uuid variant per spec (8, 9, a, b)\n // % 4, then shift to get values 8-11\n return (getRandomValue() & 0x3 | 0x8).toString(16);\n } else {\n return templateInput;\n }\n }).join('');\n}\n\n/**\n * Generates a string of the given length containing only hexadecimal\n * value 0-9 and a-f.\n * @param {int} length length of the string to generate\n * @returns {string} generated hex string\n */\nexport function generateRandomHexString(length) {\n const crypto = globalScope?.crypto || globalScope?.msCrypto;\n let randomValueTable;\n let randomValueIndex = 0;\n if (crypto && crypto.getRandomValues) {\n // eslint-disable-next-line\n randomValueTable = crypto.getRandomValues(new Uint8Array(length));\n }\n const chars = [];\n for (var i = 0; i < length; i++) {\n chars.push(getRandomValue(randomValueTable, randomValueIndex++).toString(16));\n }\n return chars.join('');\n}\n\n/**\n * Generates a 16 character length hexadecimal string.\n * per DT-spec.\n * @see generateRandomHexString\n * @returns {string} generated hex string\n */\nexport function generateSpanId() {\n return generateRandomHexString(16);\n}\n\n/**\n * Generates a 32 character length hexadecimal string.\n * per DT-spec.\n * @see generateRandomHexString\n * @returns {string} generated hex string\n */\nexport function generateTraceId() {\n return generateRandomHexString(32);\n}","import { globalScope } from '../constants/runtime';\nimport { now } from '../timing/now';\nexport const defaults = {\n beacon: 'bam.nr-data.net',\n errorBeacon: 'bam.nr-data.net'\n};\nexport function gosNREUM() {\n if (!globalScope.NREUM) {\n globalScope.NREUM = {};\n }\n if (typeof globalScope.newrelic === 'undefined') globalScope.newrelic = globalScope.NREUM;\n return globalScope.NREUM;\n}\nexport function gosNREUMInfo() {\n let nr = gosNREUM();\n const externallySupplied = nr.info || {};\n nr.info = {\n beacon: defaults.beacon,\n errorBeacon: defaults.errorBeacon,\n ...externallySupplied\n };\n return nr;\n}\nexport function gosNREUMLoaderConfig() {\n let nr = gosNREUM();\n const externallySupplied = nr.loader_config || {};\n nr.loader_config = {\n ...externallySupplied\n };\n return nr;\n}\nexport function gosNREUMInit() {\n let nr = gosNREUM();\n const externallySupplied = nr.init || {};\n nr.init = {\n ...externallySupplied\n };\n return nr;\n}\nexport function gosNREUMOriginals() {\n let nr = gosNREUM();\n if (!nr.o) {\n nr.o = {\n ST: globalScope.setTimeout,\n SI: globalScope.setImmediate,\n CT: globalScope.clearTimeout,\n XHR: globalScope.XMLHttpRequest,\n REQ: globalScope.Request,\n EV: globalScope.Event,\n PR: globalScope.Promise,\n MO: globalScope.MutationObserver,\n // this'll be undefined if not in a web window\n FETCH: globalScope.fetch\n };\n }\n return nr;\n}\nexport function setNREUMInitializedAgent(id, newAgentInstance) {\n let nr = gosNREUM();\n nr.initializedAgents ??= {};\n newAgentInstance.initializedAt = {\n ms: now(),\n date: new Date()\n };\n nr.initializedAgents[id] = newAgentInstance;\n}\n\n/**\n * Get the agent instance under the associated identifier on the global newrelic object.\n * @see setNREUMInitializedAgents\n * @returns Existing agent instance under newrelic.initializedAgent[id], or undefined if it does not exist.\n */\nexport function getNREUMInitializedAgent(id) {\n let nr = gosNREUM();\n return nr.initializedAgents?.[id];\n}\nexport function addToNREUM(fnName, fn) {\n let nr = gosNREUM();\n nr[fnName] = fn;\n}\nexport function NREUMinitialized() {\n const nr = gosNREUM();\n nr.initialized = true;\n}\nexport function gosCDN() {\n gosNREUMInfo();\n gosNREUMInit();\n gosNREUMOriginals();\n gosNREUMLoaderConfig();\n return gosNREUM();\n}","import { warn } from '../../util/console';\nexport function getModeledObject(obj, model) {\n try {\n if (!obj || typeof obj !== 'object') return warn('Setting a Configurable requires an object as input');\n if (!model || typeof model !== 'object') return warn('Setting a Configurable requires a model to set its initial properties');\n // allow getters and setters to pass from model to target\n const output = Object.create(Object.getPrototypeOf(model), Object.getOwnPropertyDescriptors(model));\n const target = Object.keys(output).length === 0 ? obj : output;\n for (let key in target) {\n if (obj[key] === undefined) continue;\n try {\n if (obj[key] === null) {\n output[key] = null;\n continue;\n }\n if (Array.isArray(obj[key]) && Array.isArray(model[key])) output[key] = Array.from(new Set([...obj[key], ...model[key]]));else if (typeof obj[key] === 'object' && typeof model[key] === 'object') output[key] = getModeledObject(obj[key], model[key]);else output[key] = obj[key];\n } catch (e) {\n warn('An error occurred while setting a property of a Configurable', e);\n }\n }\n return output;\n } catch (err) {\n warn('An error occured while setting a Configurable', err);\n }\n}","import { defaults as nrDefaults, getNREUMInitializedAgent } from '../../window/nreum';\nimport { getModeledObject } from './configurable';\nconst model = {\n // preset defaults\n beacon: nrDefaults.beacon,\n errorBeacon: nrDefaults.errorBeacon,\n // others must be populated by user\n licenseKey: undefined,\n applicationID: undefined,\n sa: undefined,\n queueTime: undefined,\n applicationTime: undefined,\n ttGuid: undefined,\n user: undefined,\n account: undefined,\n product: undefined,\n extra: undefined,\n jsAttributes: {},\n userAttributes: undefined,\n atts: undefined,\n transactionName: undefined,\n tNamePlain: undefined\n};\nconst _cache = {};\nexport function isValid(id) {\n try {\n const info = getInfo(id);\n return !!info.licenseKey && !!info.errorBeacon && !!info.applicationID;\n } catch (err) {\n return false;\n }\n}\nexport function getInfo(id) {\n if (!id) throw new Error('All info objects require an agent identifier!');\n if (!_cache[id]) throw new Error(\"Info for \".concat(id, \" was never set\"));\n return _cache[id];\n}\nexport function setInfo(id, obj) {\n if (!id) throw new Error('All info objects require an agent identifier!');\n _cache[id] = getModeledObject(obj, model);\n const agentInst = getNREUMInitializedAgent(id);\n if (agentInst) agentInst.info = _cache[id];\n}","import { FEATURE_NAMES } from '../../loaders/features/features';\nexport const LOG_LEVELS = {\n ERROR: 'ERROR',\n WARN: 'WARN',\n INFO: 'INFO',\n DEBUG: 'DEBUG',\n TRACE: 'TRACE'\n};\nexport const LOGGING_EVENT_EMITTER_CHANNEL = 'log';\nexport const FEATURE_NAME = FEATURE_NAMES.logging;\nexport const MAX_PAYLOAD_SIZE = 1000000;\nexport const LOGGING_FAILURE_MESSAGE = 'failed to wrap logger: ';\nexport const LOGGING_LEVEL_FAILURE_MESSAGE = 'invalid log level: ';\nexport const LOGGING_IGNORED = 'ignored log: ';","export const isValidSelector = selector => {\n if (!selector || typeof selector !== 'string') return false;\n try {\n document.createDocumentFragment().querySelector(selector);\n } catch {\n return false;\n }\n return true;\n};","import { LOG_LEVELS } from '../../../features/logging/constants';\nimport { isValidSelector } from '../../dom/query-selector';\nimport { DEFAULT_EXPIRES_MS, DEFAULT_INACTIVE_MS } from '../../session/constants';\nimport { warn } from '../../util/console';\nimport { getNREUMInitializedAgent } from '../../window/nreum';\nimport { getModeledObject } from './configurable';\nconst nrMask = '[data-nr-mask]';\nconst model = () => {\n const hiddenState = {\n mask_selector: '*',\n block_selector: '[data-nr-block]',\n mask_input_options: {\n color: false,\n date: false,\n 'datetime-local': false,\n email: false,\n month: false,\n number: false,\n range: false,\n search: false,\n tel: false,\n text: false,\n time: false,\n url: false,\n week: false,\n // unify textarea and select element with text input\n textarea: false,\n select: false,\n password: true // This will be enforced to always be true in the setter\n }\n };\n return {\n ajax: {\n deny_list: undefined,\n block_internal: true,\n enabled: true,\n harvestTimeSeconds: 10,\n autoStart: true\n },\n distributed_tracing: {\n enabled: undefined,\n exclude_newrelic_header: undefined,\n cors_use_newrelic_header: undefined,\n cors_use_tracecontext_headers: undefined,\n allowed_origins: undefined\n },\n feature_flags: [],\n harvest: {\n tooManyRequestsDelay: 60\n },\n jserrors: {\n enabled: true,\n harvestTimeSeconds: 10,\n autoStart: true\n },\n logging: {\n enabled: true,\n harvestTimeSeconds: 10,\n autoStart: true,\n level: LOG_LEVELS.INFO\n },\n metrics: {\n enabled: true,\n autoStart: true\n },\n obfuscate: undefined,\n page_action: {\n enabled: true,\n harvestTimeSeconds: 30,\n autoStart: true\n },\n page_view_event: {\n enabled: true,\n autoStart: true\n },\n page_view_timing: {\n enabled: true,\n harvestTimeSeconds: 30,\n long_task: false,\n autoStart: true\n },\n privacy: {\n cookies_enabled: true\n },\n // *cli - per discussion, default should be true\n proxy: {\n assets: undefined,\n // if this value is set, it will be used to overwrite the webpack asset path used to fetch assets\n beacon: undefined // likewise for the url to which we send analytics\n },\n session: {\n expiresMs: DEFAULT_EXPIRES_MS,\n inactiveMs: DEFAULT_INACTIVE_MS\n },\n session_replay: {\n // feature settings\n autoStart: true,\n enabled: false,\n harvestTimeSeconds: 60,\n preload: false,\n // if true, enables the agent to load rrweb immediately instead of waiting to do so after the window.load event\n sampling_rate: 10,\n // float from 0 - 100\n error_sampling_rate: 100,\n // float from 0 - 100\n collect_fonts: false,\n // serialize fonts for collection without public asset url, this is currently broken in RRWeb -- https://github.com/rrweb-io/rrweb/issues/1304. When fixed, revisit with test cases\n inline_images: false,\n // serialize images for collection without public asset url -- right now this is only useful for testing as it easily generates payloads too large to be harvested\n inline_stylesheet: true,\n // serialize css for collection without public asset url\n // recording config settings\n mask_all_inputs: true,\n // this has a getter/setter to facilitate validation of the selectors\n get mask_text_selector() {\n return hiddenState.mask_selector;\n },\n set mask_text_selector(val) {\n if (isValidSelector(val)) hiddenState.mask_selector = \"\".concat(val, \",\").concat(nrMask);else if (val === '' || val === null) hiddenState.mask_selector = nrMask;else warn('An invalid session_replay.mask_selector was provided. \\'*\\' will be used.', val);\n },\n // these properties only have getters because they are enforcable constants and should error if someone tries to override them\n get block_class() {\n return 'nr-block';\n },\n get ignore_class() {\n return 'nr-ignore';\n },\n get mask_text_class() {\n return 'nr-mask';\n },\n // props with a getter and setter are used to extend enforcable constants with customer input\n // we must preserve data-nr-block no matter what else the customer sets\n get block_selector() {\n return hiddenState.block_selector;\n },\n set block_selector(val) {\n if (isValidSelector(val)) hiddenState.block_selector += \",\".concat(val);else if (val !== '') warn('An invalid session_replay.block_selector was provided and will not be used', val);\n },\n // password: must always be present and true no matter what customer sets\n get mask_input_options() {\n return hiddenState.mask_input_options;\n },\n set mask_input_options(val) {\n if (val && typeof val === 'object') hiddenState.mask_input_options = {\n ...val,\n password: true\n };else warn('An invalid session_replay.mask_input_option was provided and will not be used', val);\n }\n },\n session_trace: {\n enabled: true,\n harvestTimeSeconds: 10,\n autoStart: true\n },\n soft_navigations: {\n enabled: true,\n harvestTimeSeconds: 10,\n autoStart: true\n },\n spa: {\n enabled: true,\n harvestTimeSeconds: 10,\n autoStart: true\n },\n ssl: undefined\n };\n};\nconst _cache = {};\nconst missingAgentIdError = 'All configuration objects require an agent identifier!';\nexport function getConfiguration(id) {\n if (!id) throw new Error(missingAgentIdError);\n if (!_cache[id]) throw new Error(\"Configuration for \".concat(id, \" was never set\"));\n return _cache[id];\n}\nexport function setConfiguration(id, obj) {\n if (!id) throw new Error(missingAgentIdError);\n _cache[id] = getModeledObject(obj, model());\n const agentInst = getNREUMInitializedAgent(id);\n if (agentInst) agentInst.init = _cache[id];\n}\nexport function getConfigurationValue(id, path) {\n if (!id) throw new Error(missingAgentIdError);\n var val = getConfiguration(id);\n if (val) {\n var parts = path.split('.');\n for (var i = 0; i < parts.length - 1; i++) {\n val = val[parts[i]];\n if (typeof val !== 'object') return;\n }\n val = val[parts[parts.length - 1]];\n }\n return val;\n}\n\n// TO DO: a setConfigurationValue equivalent may be nice so individual\n// properties can be tuned instead of reseting the whole model per call to `setConfiguration(agentIdentifier, {})`","/**\n * @file This file exposes NPM build environment variables. These variables will\n * be overridden with babel.\n */\n\n/**\n * Exposes the version of the agent\n */\nexport const VERSION = \"1.262.0\";\n\n/**\n * Exposes the build type of the agent\n * Valid values are LOCAL, PROD, DEV\n */\nexport const BUILD_ENV = 'NPM';\n\n/**\n * Exposes the distribution method of the agent\n * Valid valuse are CDN, NPM\n */\nexport const DIST_METHOD = 'NPM';\n\n/**\n * Exposes the lib version of rrweb\n */\nexport const RRWEB_VERSION = \"2.0.0-alpha.12\";","import { getModeledObject } from './configurable';\nimport { getNREUMInitializedAgent } from '../../window/nreum';\nimport { globalScope, originTime } from '../../constants/runtime';\nimport { BUILD_ENV, DIST_METHOD, VERSION } from \"../../constants/env.npm\";\nconst readonly = {\n buildEnv: BUILD_ENV,\n distMethod: DIST_METHOD,\n version: VERSION,\n originTime\n};\nconst model = {\n customTransaction: undefined,\n disabled: false,\n isolatedBacklog: false,\n loaderType: undefined,\n maxBytes: 30000,\n onerror: undefined,\n origin: '' + globalScope.location,\n ptid: undefined,\n releaseIds: {},\n /** Agent-specific metadata found in the RUM call response. ex. entityGuid */\n appMetadata: {},\n session: undefined,\n denyList: undefined,\n harvestCount: 0,\n timeKeeper: undefined\n};\nconst _cache = {};\nexport function getRuntime(id) {\n if (!id) throw new Error('All runtime objects require an agent identifier!');\n if (!_cache[id]) throw new Error(\"Runtime for \".concat(id, \" was never set\"));\n return _cache[id];\n}\nexport function setRuntime(id, obj) {\n if (!id) throw new Error('All runtime objects require an agent identifier!');\n _cache[id] = {\n ...getModeledObject(obj, model),\n ...readonly\n };\n const agentInst = getNREUMInitializedAgent(id);\n if (agentInst) agentInst.runtime = _cache[id];\n}","import { getNREUMInitializedAgent } from '../../window/nreum';\nimport { getModeledObject } from './configurable';\nconst model = {\n accountID: undefined,\n trustKey: undefined,\n agentID: undefined,\n licenseKey: undefined,\n applicationID: undefined,\n xpid: undefined\n};\nconst _cache = {};\nexport function getLoaderConfig(id) {\n if (!id) throw new Error('All loader-config objects require an agent identifier!');\n if (!_cache[id]) throw new Error(\"LoaderConfig for \".concat(id, \" was never set\"));\n return _cache[id];\n}\nexport function setLoaderConfig(id, obj) {\n if (!id) throw new Error('All loader-config objects require an agent identifier!');\n _cache[id] = getModeledObject(obj, model);\n const agentInst = getNREUMInitializedAgent(id);\n if (agentInst) agentInst.loader_config = _cache[id];\n}","import { gosNREUMOriginals } from '../../window/nreum';\nexport const originals = gosNREUMOriginals().o;","import { getInfo, isValid, setInfo } from './state/info';\nimport { getConfiguration, getConfigurationValue, setConfiguration } from './state/init';\nimport { getLoaderConfig, setLoaderConfig } from './state/loader-config';\nimport { originals } from './state/originals';\nimport { getRuntime, setRuntime } from './state/runtime';\nfunction isConfigured(agentIdentifier) {\n return isValid(agentIdentifier);\n}\n\n// This module acts as a hub that bundles the static and dynamic properties used by each agent instance into one single interface\nexport { getInfo, setInfo, getConfiguration, getConfigurationValue, setConfiguration, getLoaderConfig, setLoaderConfig, originals, getRuntime, setRuntime, isConfigured };","/**\n * @file Contains a unique identifier for the running agent bundle\n * when loaded.\n * @copyright 2023 New Relic Corporation. All rights reserved.\n * @license Apache-2.0\n */\n\nimport { generateUuid } from './unique-id';\n\n/**\n * Provides a unique id for the current agent bundle\n */\nexport const bundleId = generateUuid();","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nvar has = Object.prototype.hasOwnProperty;\n\n/**\n * Always returns the current value of obj[prop], even if it has to set it first. Sets properties as non-enumerable if possible.\n *\n * @param {Object} obj - The object to get or set the property on.\n * @param {string} prop - The name of the property.\n * @param {Function} getVal - A function that returns the value to be set if the property does not exist.\n * @returns {*} The value of the property in the object.\n */\nexport function getOrSet(obj, prop, getVal) {\n // If the value exists return it.\n if (has.call(obj, prop)) return obj[prop];\n var val = getVal();\n\n // Attempt to set the property so it's not enumerable\n if (Object.defineProperty && Object.keys) {\n try {\n Object.defineProperty(obj, prop, {\n value: val,\n // old IE inherits non-write-ability\n writable: true,\n enumerable: false\n });\n return val;\n } catch (e) {\n // Can't report internal errors,\n // because GOS is a dependency of the reporting mechanisms\n }\n }\n\n // fall back to setting normally\n obj[prop] = val;\n return val;\n}","export class EventContext {\n constructor(contextId) {\n this.contextId = contextId;\n }\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { gosNREUM } from '../window/nreum';\nimport { getOrSet } from '../util/get-or-set';\nimport { getRuntime } from '../config/config';\nimport { EventContext } from './event-context';\nimport { bundleId } from '../ids/bundle-id';\n\n// create a unique id to store event context data for the current agent bundle\nconst contextId = \"nr@context:\".concat(bundleId);\n// create global emitter instance that can be shared among bundles\nconst globalInstance = ee(undefined, 'globalEE');\n\n// Only override the exposed event emitter if one has not already been exposed\nconst nr = gosNREUM();\nif (!nr.ee) {\n nr.ee = globalInstance;\n}\nexport { globalInstance as ee, contextId };\nfunction ee(old, debugId) {\n var handlers = {};\n var bufferGroupMap = {};\n var emitters = {};\n // In cases where multiple agents can run on a page, the event backlogs of feature event emitters must be isolated\n // to prevent event emitter context and buffers from \"bubbling up\" to other agents operating in the scope.\n // An example of this is our MicroAgent loader package, which sets this property to true to prevent overlap.\n var isolatedBacklog = false;\n try {\n // We only want to check the runtime configuration for `isolatedBacklog` if the event emitter belongs to a feature.\n // For feature event emitters, the debugId will be an agentIdentifier with a length of 16. In contrast, some of our\n // tests do not namespace the event emitter with an agentID and just use the parent (which has no ID).\n isolatedBacklog = debugId.length !== 16 ? false : getRuntime(debugId).isolatedBacklog;\n } catch (err) {\n // Do nothing for now.\n }\n var emitter = {\n on: addEventListener,\n addEventListener,\n removeEventListener,\n emit,\n get: getOrCreate,\n listeners,\n context,\n buffer: bufferEventsByGroup,\n abort,\n isBuffering,\n debugId,\n backlog: isolatedBacklog ? {} : old && typeof old.backlog === 'object' ? old.backlog : {},\n isolatedBacklog\n };\n function abort() {\n emitter._aborted = true;\n Object.keys(emitter.backlog).forEach(key => {\n delete emitter.backlog[key];\n });\n }\n Object.defineProperty(emitter, 'aborted', {\n get: () => {\n let aborted = emitter._aborted || false;\n if (aborted) return aborted;else if (old) {\n aborted = old.aborted;\n }\n return aborted;\n }\n });\n return emitter;\n function context(contextOrStore) {\n if (contextOrStore && contextOrStore instanceof EventContext) {\n return contextOrStore;\n } else if (contextOrStore) {\n return getOrSet(contextOrStore, contextId, () => new EventContext(contextId));\n } else {\n return new EventContext(contextId);\n }\n }\n function emit(type, args, contextOrStore, force, bubble) {\n if (bubble !== false) bubble = true;\n if (globalInstance.aborted && !force) {\n return;\n }\n if (old && bubble) old.emit(type, args, contextOrStore);\n var ctx = context(contextOrStore);\n var handlersArray = listeners(type);\n var len = handlersArray.length;\n\n // Apply each handler function in the order they were added\n // to the context with the arguments\n\n for (var i = 0; i < len; i++) handlersArray[i].apply(ctx, args);\n\n // Buffer after emitting for consistent ordering\n var bufferGroup = getBuffer()[bufferGroupMap[type]];\n if (bufferGroup) {\n bufferGroup.push([emitter, type, args, ctx]);\n }\n\n // Return the context so that the module that emitted can see what was done.\n return ctx;\n }\n function addEventListener(type, fn) {\n // Retrieve type from handlers, if it doesn't exist assign the default and retrieve it.\n handlers[type] = listeners(type).concat(fn);\n }\n function removeEventListener(type, fn) {\n var listeners = handlers[type];\n if (!listeners) return;\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i] === fn) {\n listeners.splice(i, 1);\n }\n }\n }\n function listeners(type) {\n return handlers[type] || [];\n }\n function getOrCreate(name) {\n return emitters[name] = emitters[name] || ee(emitter, name);\n }\n function bufferEventsByGroup(types, group) {\n const eventBuffer = getBuffer();\n group = group || 'feature';\n\n // do not buffer events if agent has been aborted\n if (emitter.aborted) return;\n Object.entries(types || {}).forEach(_ref => {\n let [_, type] = _ref;\n bufferGroupMap[type] = group;\n if (!(group in eventBuffer)) {\n eventBuffer[group] = [];\n }\n });\n }\n function isBuffering(type) {\n var bufferGroup = getBuffer()[bufferGroupMap[type]];\n return !!bufferGroup;\n }\n\n // buffer is associated with a base emitter, since there are two\n // (global and scoped to the current bundle), it is now part of the emitter\n function getBuffer() {\n return emitter.backlog;\n }\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { ee as globalInstance } from './contextual-ee';\nexport var handleEE = globalInstance.get('handle');\nexport function handle(type, args, ctx, group, ee) {\n if (ee) {\n ee.buffer([type], group);\n ee.emit(type, args, ctx);\n } else {\n handleEE.buffer([type], group);\n handleEE.emit(type, args, ctx);\n }\n}","import { FEATURE_NAMES } from '../../loaders/features/features';\nexport const FEATURE_NAME = FEATURE_NAMES.metrics;\nexport const SUPPORTABILITY_METRIC = 'sm';\nexport const CUSTOM_METRIC = 'cm';\nexport const SUPPORTABILITY_METRIC_CHANNEL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,OAAOmB,EAAG,CAAC,CAG3B,CACA,SAASnB,EAAUW,EAAM,CACvB,OAAOrB,EAASqB,CAAI,GAAK,CAAC,CAC5B,CACA,SAASZ,GAAYwB,EAAM,CACzB,OAAO/B,EAAS+B,CAAI,EAAI/B,EAAS+B,CAAI,GAAKpC,GAAGQ,EAAS4B,CAAI,CAC5D,CACA,SAASrB,GAAoBsB,EAAOC,EAAO,CACzC,IAAMC,EAAcL,EAAU,EAC9BI,EAAQA,GAAS,UAGb,CAAA9B,EAAQ,SACZ,OAAO,QAAQ6B,GAAS,CAAC,CAAC,EAAE,QAAQG,GAAQ,CAC1C,GAAI,CAACC,EAAGjB,CAAI,EAAIgB,EAChBpC,EAAeoB,CAAI,EAAIc,EACjBA,KAASC,IACbA,EAAYD,CAAK,EAAI,CAAC,EAE1B,CAAC,CACH,CACA,SAASrB,GAAYO,EAAM,CACzB,IAAIS,EAAcC,EAAU,EAAE9B,EAAeoB,CAAI,CAAC,EAClD,MAAO,CAAC,CAACS,CACX,CAIA,SAASC,GAAY,CACnB,OAAO1B,EAAQ,OACjB,CACF,CC3IO,IAAIkC,GAAWC,EAAe,IAAI,QAAQ,EAC1C,SAASC,GAAOC,EAAMC,EAAMC,EAAKC,EAAOC,EAAI,CAC7CA,GACFA,EAAG,OAAO,CAACJ,CAAI,EAAGG,CAAK,EACvBC,EAAG,KAAKJ,EAAMC,EAAMC,CAAG,IAEvBL,GAAS,OAAO,CAACG,CAAI,EAAGG,CAAK,EAC7BN,GAAS,KAAKG,EAAMC,EAAMC,CAAG,EAEjC,CCdO,IAAMG,GAAeC,EAAc,QAC7BC,GAAwB,KACxBC,GAAgB,KAChBC,GAAgC,6BAChCC,GAAwB","names":["warn","message","secondary","PREFIX","DEFAULT_KEY","SESSION_EVENTS","SESSION_EVENT_TYPES","MODE","now","isBrowserScope","isWorkerScope","globalScope","loadedAsDeferredBrowserScript","initiallyHidden","initialLocation","isiOS","iOSBelow16","ffVersion","match","isIE","supportsSendBeacon","originTime","now","uuidv4Template","getRandomValue","valueTable","tableIndex","generateUuid","crypto","globalScope","randomValueTable","randomValueIndex","templateInput","generateRandomHexString","length","chars","i","generateSpanId","generateTraceId","defaults","gosNREUM","globalScope","gosNREUMInfo","nr","externallySupplied","__spreadValues","gosNREUMLoaderConfig","gosNREUMInit","gosNREUMOriginals","setNREUMInitializedAgent","id","newAgentInstance","now","getNREUMInitializedAgent","addToNREUM","fnName","fn","gosCDN","gosNREUMInfo","gosNREUMInit","gosNREUMOriginals","gosNREUMLoaderConfig","gosNREUM","getModeledObject","obj","model","warn","output","target","key","e","err","model","defaults","_cache","isValid","id","info","getInfo","setInfo","obj","getModeledObject","agentInst","getNREUMInitializedAgent","LOG_LEVELS","LOGGING_EVENT_EMITTER_CHANNEL","FEATURE_NAME","FEATURE_NAMES","MAX_PAYLOAD_SIZE","LOGGING_FAILURE_MESSAGE","LOGGING_LEVEL_FAILURE_MESSAGE","LOGGING_IGNORED","isValidSelector","selector","nrMask","model","hiddenState","LOG_LEVELS","val","isValidSelector","warn","__spreadProps","__spreadValues","_cache","missingAgentIdError","getConfiguration","id","setConfiguration","obj","getModeledObject","agentInst","getNREUMInitializedAgent","getConfigurationValue","path","parts","i","VERSION","BUILD_ENV","DIST_METHOD","RRWEB_VERSION","readonly","BUILD_ENV","DIST_METHOD","VERSION","originTime","model","globalScope","_cache","getRuntime","id","setRuntime","obj","__spreadValues","getModeledObject","agentInst","getNREUMInitializedAgent","model","_cache","getLoaderConfig","id","setLoaderConfig","obj","getModeledObject","agentInst","getNREUMInitializedAgent","originals","gosNREUMOriginals","isConfigured","agentIdentifier","isValid","bundleId","generateUuid","has","getOrSet","obj","prop","getVal","val","EventContext","contextId","contextId","bundleId","globalInstance","ee","nr","gosNREUM","ee","old","debugId","handlers","bufferGroupMap","emitters","isolatedBacklog","getRuntime","emitter","addEventListener","removeEventListener","emit","getOrCreate","listeners","context","bufferEventsByGroup","abort","isBuffering","key","aborted","contextOrStore","EventContext","getOrSet","contextId","type","args","force","bubble","globalInstance","ctx","handlersArray","len","i","bufferGroup","getBuffer","fn","name","types","group","eventBuffer","_ref","_","handleEE","globalInstance","handle","type","args","ctx","group","ee","FEATURE_NAME","FEATURE_NAMES","SUPPORTABILITY_METRIC","CUSTOM_METRIC","SUPPORTABILITY_METRIC_CHANNEL","CUSTOM_METRIC_CHANNEL"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]}