{"version":3,"sources":["node_modules/@newrelic/browser-agent/dist/esm/common/util/map-own.js","node_modules/@newrelic/browser-agent/dist/esm/common/drain/drain.js","node_modules/@newrelic/browser-agent/dist/esm/common/event-listener/event-listener-opts.js","node_modules/@newrelic/browser-agent/dist/esm/common/wrap/wrap-function.js"],"sourcesContent":["/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @typedef {function} MapOwnCallback\n * @param {string} key Object key\n * @param {any} value Object value\n * @returns {any}\n */\n\n/**\n * Iterates the own enumerable properties of an object passing the key and value pair to a given\n * callback function.\n * @param {object} obj Input object to iterate over. If null or undefined, an empty array will be returned.\n * @param {MapOwnCallback} fn A callback function called for each property. The callback should take the key\n * and value from the object iteration and return some value.\n * @returns {any[]} An array of values returned by the callback function.\n */\nexport const mapOwn = (obj, fn) => Object.entries(obj || {}).map(_ref => {\n let [key, value] = _ref;\n return fn(key, value);\n});","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { ee } from '../event-emitter/contextual-ee';\nimport { mapOwn } from '../util/map-own';\nimport { registerHandler as defaultRegister } from '../event-emitter/register-handler';\nimport { featurePriority } from '../../loaders/features/features';\nconst registry = {};\n\n/**\n * Adds an entry to the centralized drain registry specifying that a particular agent has events of a particular named\n * event-group \"bucket\" that should be drained at the time the agent drains all its buffered events. Buffered events\n * accumulate because instrumentation begins as soon as possible, before the agent has finished lazy-loading the code\n * responsible for aggregating and reporting captured data.\n * @param {string} agentIdentifier - A 16 character string uniquely identifying the agent.\n * @param {string} group - The named \"bucket\" for the events this feature will be bucketing for later collection.\n */\nexport function registerDrain(agentIdentifier, group) {\n // Here `item` captures the registered properties of a feature-group: whether it is ready for its buffered events\n // to be drained (`staged`) and the `priority` order in which it should be drained relative to other feature groups.\n const item = {\n staged: false,\n priority: featurePriority[group] || 0\n };\n curateRegistry(agentIdentifier);\n if (!registry[agentIdentifier].get(group)) registry[agentIdentifier].set(group, item);\n}\n\n/**\n * Removes an item from the registry and immediately re-checks if the registry is ready to \"drain all\"\n * @param {*} agentIdentifier - A 16 character string uniquely identifying the agent.\n * @param {*} group - The named \"bucket\" to be removed from the registry\n */\nexport function deregisterDrain(agentIdentifier, group) {\n if (!agentIdentifier || !registry[agentIdentifier]) return;\n if (registry[agentIdentifier].get(group)) registry[agentIdentifier].delete(group);\n drainGroup(agentIdentifier, group, false);\n if (registry[agentIdentifier].size) checkCanDrainAll(agentIdentifier);\n}\n\n/**\n * Registers the specified agent with the centralized event buffer registry if it is not already registered.\n * Agents without an identifier (as in the case of some tests) will be excluded from the registry.\n * @param {string} agentIdentifier - A 16 character string uniquely identifying an agent.\n */\nfunction curateRegistry(agentIdentifier) {\n if (!agentIdentifier) throw new Error('agentIdentifier required');\n if (!registry[agentIdentifier]) registry[agentIdentifier] = new Map();\n}\n\n/**\n * Drain buffered events out of the event emitter. Each feature should have its events bucketed by \"group\" and drain\n * its own named group explicitly, when ready.\n * @param {string} agentIdentifier - A unique 16 character ID corresponding to an instantiated agent.\n * @param {string} featureName - A named group into which the feature's buffered events are bucketed.\n * @param {boolean} force - Whether to force the drain to occur immediately, bypassing the registry and staging logic.\n */\nexport function drain() {\n let agentIdentifier = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n let featureName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'feature';\n let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n curateRegistry(agentIdentifier);\n // If the feature for the specified agent is not in the registry, that means the instrument file was bypassed.\n // This could happen in tests, or loaders that directly import the aggregator. In these cases it is safe to\n // drain the feature group immediately rather than waiting to drain all at once.\n if (!agentIdentifier || !registry[agentIdentifier].get(featureName) || force) return drainGroup(agentIdentifier, featureName);\n\n // When `drain` is called, this feature is ready to drain (staged).\n registry[agentIdentifier].get(featureName).staged = true;\n checkCanDrainAll(agentIdentifier);\n}\n\n/** Checks all items in the registry to see if they have been \"staged\". If ALL items are staged, it will drain all registry items (drainGroup). It not, nothing will happen */\nfunction checkCanDrainAll(agentIdentifier) {\n // Only when the event-groups for all features are ready to drain (staged) do we execute the drain. This has the effect\n // that the last feature to call drain triggers drain for all features.\n const items = Array.from(registry[agentIdentifier]);\n if (items.every(_ref => {\n let [key, values] = _ref;\n return values.staged;\n })) {\n items.sort((a, b) => a[1].priority - b[1].priority);\n items.forEach(_ref2 => {\n let [group] = _ref2;\n registry[agentIdentifier].delete(group);\n drainGroup(agentIdentifier, group);\n });\n }\n}\n\n/**\n * Drains all the buffered (backlog) events for a particular feature's event-group by emitting each event to each of\n * the subscribed handlers for the group.\n * @param {*} group - The name of a particular feature's event \"bucket\".\n */\nfunction drainGroup(agentIdentifier, group) {\n let activateGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n const baseEE = agentIdentifier ? ee.get(agentIdentifier) : ee;\n const handlers = defaultRegister.handlers; // other storage in registerHandler\n if (!baseEE.backlog || !handlers) return;\n\n // Only activated features being drained should run queued listeners on buffered events. Deactivated features only need to release memory.\n if (activateGroup) {\n const bufferedEventsInGroup = baseEE.backlog[group];\n const groupHandlers = handlers[group]; // each group in the registerHandler storage\n if (groupHandlers) {\n // We don't cache the length of the buffer while looping because events might still be added while processing.\n for (let i = 0; bufferedEventsInGroup && i < bufferedEventsInGroup.length; ++i) {\n // eslint-disable-line no-unmodified-loop-condition\n emitEvent(bufferedEventsInGroup[i], groupHandlers);\n }\n mapOwn(groupHandlers, function (eventType, handlerRegistrationList) {\n mapOwn(handlerRegistrationList, function (i, registration) {\n // registration is an array of: [targetEE, eventHandler]\n registration[0].on(eventType, registration[1]);\n });\n });\n }\n }\n if (!baseEE.isolatedBacklog) delete handlers[group];\n baseEE.backlog[group] = null;\n baseEE.emit('drain-' + group, []); // TODO: Code exists purely for a unit test and needs to be refined\n}\n\n/**\n * Processes the specified event using all relevant handler functions associated with a particular feature, based on\n * whether the the handler is meant to apply to events of this type. (Event type is a descriptive string set at the\n * time an event is originally created by instrumentation, as with calls to the `handle` method.)\n * @param {*} evt - A single event to be emitted to (processed by) eligible handler functions.\n * @param {*} groupHandlers - A set of handler functions associated with a particular feature's event-group.\n */\nfunction emitEvent(evt, groupHandlers) {\n var type = evt[1];\n mapOwn(groupHandlers[type], function (i, registration) {\n var sourceEE = evt[0];\n var ee = registration[0];\n if (ee === sourceEE) {\n var handler = registration[1];\n var ctx = evt[3];\n var args = evt[2];\n handler.apply(ctx, args);\n }\n });\n}","import { globalScope } from '../constants/runtime';\n\n/*\n * See https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#safely_detecting_option_support\n */\nlet passiveSupported = false;\nlet signalSupported = false;\ntry {\n const options = {\n get passive() {\n // this function will be called when the browser attempts to access the passive property\n passiveSupported = true;\n return false;\n },\n get signal() {\n signalSupported = true;\n return false;\n }\n };\n globalScope.addEventListener('test', null, options);\n globalScope.removeEventListener('test', null, options);\n} catch (err) {}\nexport function eventListenerOpts(useCapture, abortSignal) {\n return passiveSupported || signalSupported ? {\n capture: !!useCapture,\n passive: passiveSupported,\n // passive defaults to false\n signal: abortSignal\n } : !!useCapture; // mainly just IE11 doesn't support third param options under EventTarget API\n}\n\n/** Do not use this within the worker context. */\nexport function windowAddEventListener(event, listener) {\n let capture = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let abortSignal = arguments.length > 3 ? arguments[3] : undefined;\n window.addEventListener(event, listener, eventListenerOpts(capture, abortSignal));\n}\n/** Do not use this within the worker context. */\nexport function documentAddEventListener(event, listener) {\n let capture = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let abortSignal = arguments.length > 3 ? arguments[3] : undefined;\n document.addEventListener(event, listener, eventListenerOpts(capture, abortSignal));\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @file Provides helper functions for wrapping functions in various scenarios.\n */\n\nimport { ee } from '../event-emitter/contextual-ee';\nimport { bundleId } from '../ids/bundle-id';\nexport const flag = \"nr@original:\".concat(bundleId);\n\n/**\n * A convenience alias of `hasOwnProperty`.\n * @type {function}\n */\nvar has = Object.prototype.hasOwnProperty;\n\n/**\n * For tracking whether an event is already being emitted inside the wrapper.\n * @type {boolean}\n */\nvar inWrapper = false;\n\n// eslint-disable-next-line\nexport default createWrapperWithEmitter;\n\n/**\n * Wraps a function in order to emit events on start, end, and error.\n * @param {Object} [emitter] - The desired emitter for events emitted by the wrapper. Defaults to the global emitter.\n * @param {boolean} always - If `true`, emit events even if already emitting an event.\n * @returns {function} The wrapped function.\n */\nexport function createWrapperWithEmitter(emitter, always) {\n emitter || (emitter = ee);\n wrapFn.inPlace = inPlace;\n\n /**\n * A flag used to determine if a native function has already been wrapped.\n * As a property on a wrapped function, contains the original function.\n * @type {string}\n */\n wrapFn.flag = flag;\n return wrapFn;\n\n /**\n * Wraps a function with event emitting functionality.\n * @param {function} fn - The function to wrap.\n * @param {string} prefix - A prefix for the names of emitted events.\n * @param {function|object} getContext - The function or object that will serve as the 'this' context for handlers of events emitted by this wrapper.\n * @param {string} methodName - The name of the method being wrapped.\n * @param {boolean} bubble - If true, emitted events should also bubble up to the old emitter upon which the `emitter` in the current scope was based (if it defines one).\n * @returns {function} The wrapped function.\n */\n function wrapFn(fn, prefix, getContext, methodName, bubble) {\n // Unless fn is both wrappable and unwrapped, return it unchanged.\n if (notWrappable(fn)) return fn;\n if (!prefix) prefix = '';\n nrWrapper[flag] = fn;\n copy(fn, nrWrapper, emitter);\n return nrWrapper;\n\n /**\n * A wrapper function that emits events before and after calling the wrapped function.\n * Any arguments will be passed along to the original function.\n * @returns {any} The return value of the wrapped function.\n */\n function nrWrapper() {\n var args;\n var originalThis;\n var ctx;\n var result;\n try {\n originalThis = this;\n args = [...arguments];\n if (typeof getContext === 'function') {\n ctx = getContext(args, originalThis);\n } else {\n ctx = getContext || {};\n }\n } catch (e) {\n report([e, '', [args, originalThis, methodName], ctx], emitter);\n }\n\n // Warning: start events may mutate args!\n safeEmit(prefix + 'start', [args, originalThis, methodName], ctx, bubble);\n try {\n result = fn.apply(originalThis, args);\n return result;\n } catch (err) {\n safeEmit(prefix + 'err', [args, originalThis, err], ctx, bubble);\n\n // rethrow error so we don't effect execution by observing.\n throw err;\n } finally {\n // happens no matter what.\n safeEmit(prefix + 'end', [args, originalThis, result], ctx, bubble);\n }\n }\n }\n\n /**\n * Creates wrapper functions around each of an array of methods on a specified object.\n * @param {Object} obj The object to which the specified methods belong.\n * @param {string[]} methods An array of method names to be wrapped.\n * @param {string} [prefix=''] A prefix to add to the names of emitted events. If `-` is the first character, also\n * adds the method name before the prefix.\n * @param {function|object} [getContext] The function or object that will serve as the 'this' context for handlers\n * of events emitted by this wrapper.\n * @param {boolean} [bubble=false] If `true`, emitted events should also bubble up to the old emitter upon which\n * the `emitter` in the current scope was based (if it defines one).\n */\n function inPlace(obj, methods, prefix, getContext, bubble) {\n if (!prefix) prefix = '';\n\n // If prefix starts with '-' set this boolean to add the method name to the prefix before passing each one to wrap.\n const prependMethodPrefix = prefix.charAt(0) === '-';\n for (let i = 0; i < methods.length; i++) {\n const method = methods[i];\n const fn = obj[method];\n\n // Unless fn is both wrappable and unwrapped, bail so we don't add extra properties with undefined values.\n if (notWrappable(fn)) continue;\n obj[method] = wrapFn(fn, prependMethodPrefix ? method + prefix : prefix, getContext, method, bubble);\n }\n }\n\n /**\n * Emits an event using the `emit` method of the `emitter` object in the executing scope, but only if an event is not\n * already being emitted (except when the executing scope defines `always` as `true`).\n * @param {string} evt - The name of the event to be emitted.\n * @param {array} arr - An array of arguments to pass with the event.\n * @param {Object} store - The function or object that will serve as the 'this'\n * context when applying handler functions for this event.\n * @param {boolean} bubble - If `true`, emitted events should also\n * bubble up to the old emitter upon which the `emitter` in the\n * executing scope was based (if it defines one).\n */\n function safeEmit(evt, arr, store, bubble) {\n if (inWrapper && !always) return;\n var prev = inWrapper;\n inWrapper = true;\n try {\n emitter.emit(evt, arr, store, always, bubble);\n } catch (e) {\n report([e, evt, arr, store], emitter);\n }\n inWrapper = prev;\n }\n}\n\n/**\n * Emits an \"internal-error\" event. Used to report errors encountered when emitting events using `safeEmit`.\n * @param {array} args - Arguments to be passed to the \"internal-error\" event.\n * @param {Object} [emitter] - The (optional) desired event emitter. Defaults to the global event emitter.\n */\nfunction report(args, emitter) {\n emitter || (emitter = ee);\n try {\n emitter.emit('internal-error', args);\n } catch (err) {\n // do nothing\n }\n}\n\n/**\n * Copies properties from one object to another. Used for creating a wrapper function from an original function and for\n * copying an original function to a property of a wrapper function named by `flag` in the executing context.\n * @param {Object} from - The source function or object.\n * @param {Object} to - The destination function or object.\n * @param {Object} [emitter] - The (optional) desired event emitter if errors are encountered while copying.\n * Defaults to the global event emitter.\n * @returns {object} - The destination founction or object with copied properties.\n */\nfunction copy(from, to, emitter) {\n if (Object.defineProperty && Object.keys) {\n // Create accessors that proxy to actual function\n try {\n var keys = Object.keys(from);\n // eslint-disable-next-line\n keys.forEach(function (key) {\n Object.defineProperty(to, key, {\n get: function () {\n return from[key];\n },\n // eslint-disable-next-line\n set: function (val) {\n from[key] = val;\n return val;\n }\n });\n });\n return to;\n } catch (e) {\n report([e], emitter);\n }\n }\n // fall back to copying properties\n for (var i in from) {\n if (has.call(from, i)) {\n to[i] = from[i];\n }\n }\n return to;\n}\n\n/**\n * Determines whether a function is eligible to be wrapped in part based on whether it has already been wrapped.\n * @param {function} fn - The function in question.\n * @returns {boolean} Whether the passed function is ineligible to be wrapped.\n */\nfunction notWrappable(fn) {\n return !(fn && typeof fn === 'function' && fn.apply && !fn[flag]);\n}"],"mappings":"sIAoBO,IAAMA,EAAS,CAACC,EAAKC,IAAO,OAAO,QAAQD,GAAO,CAAC,CAAC,EAAE,IAAIE,GAAQ,CACvE,GAAI,CAACC,EAAKC,CAAK,EAAIF,EACnB,OAAOD,EAAGE,EAAKC,CAAK,CACtB,CAAC,ECdD,IAAMC,EAAW,CAAC,EAUX,SAASC,EAAcC,EAAiBC,EAAO,CAGp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EAAQ,KAAK2B,EAAKC,EAAKC,EAAO5B,EAAQS,CAAM,CAC9C,OAASQ,EAAG,CACVC,EAAO,CAACD,EAAGS,EAAKC,EAAKC,CAAK,EAAG7B,CAAO,CACtC,CACA8B,EAAYC,EACd,CACF,CAOA,SAASZ,EAAOL,EAAMd,EAAS,CAC7BA,IAAYA,EAAUE,GACtB,GAAI,CACFF,EAAQ,KAAK,iBAAkBc,CAAI,CACrC,MAAc,CAEd,CACF,CAWA,SAASD,EAAKmB,EAAMC,EAAIjC,EAAS,CAC/B,GAAI,OAAO,gBAAkB,OAAO,KAElC,GAAI,CACF,IAAIkC,EAAO,OAAO,KAAKF,CAAI,EAE3B,OAAAE,EAAK,QAAQ,SAAUC,EAAK,CAC1B,OAAO,eAAeF,EAAIE,EAAK,CAC7B,IAAK,UAAY,CACf,OAAOH,EAAKG,CAAG,CACjB,EAEA,IAAK,SAAUC,EAAK,CAClB,OAAAJ,EAAKG,CAAG,EAAIC,EACLA,CACT,CACF,CAAC,CACH,CAAC,EACMH,CACT,OAASf,EAAG,CACVC,EAAO,CAACD,CAAC,EAAGlB,CAAO,CACrB,CAGF,QAASyB,KAAKO,EACRK,EAAI,KAAKL,EAAMP,CAAC,IAClBQ,EAAGR,CAAC,EAAIO,EAAKP,CAAC,GAGlB,OAAOQ,CACT,CAOA,SAAStB,EAAaL,EAAI,CACxB,MAAO,EAAEA,GAAM,OAAOA,GAAO,YAAcA,EAAG,OAAS,CAACA,EAAGD,CAAI,EACjE","names":["mapOwn","obj","fn","_ref","key","value","registry","registerDrain","agentIdentifier","group","item","featurePriority","curateRegistry","deregisterDrain","drainGroup","checkCanDrainAll","drain","featureName","force","items","_ref","key","values","a","b","_ref2","activateGroup","baseEE","globalInstance","handlers","defaultRegister","bufferedEventsInGroup","groupHandlers","i","emitEvent","mapOwn","eventType","handlerRegistrationList","registration","evt","type","sourceEE","ee","handler","ctx","args","passiveSupported","signalSupported","options","globalScope","eventListenerOpts","useCapture","abortSignal","windowAddEventListener","event","listener","capture","documentAddEventListener","flag","bundleId","has","inWrapper","createWrapperWithEmitter","emitter","always","globalInstance","wrapFn","inPlace","flag","fn","prefix","getContext","methodName","bubble","notWrappable","nrWrapper","copy","args","originalThis","ctx","result","e","report","safeEmit","err","obj","methods","prependMethodPrefix","i","method","evt","arr","store","inWrapper","prev","from","to","keys","key","val","has"],"x_google_ignoreList":[0,1,2,3]}